public void IdentityTests() { CognitoIdentity.CreateIdentityPool(out poolId, out poolName); // Add retry logic to handle the eventual consistence of the identity pool getting created GetIdentityPoolConfigurationResponse config = null; UtilityMethods.WaitUntilSuccess(() => config = Client.GetIdentityPoolConfiguration(poolId)); Assert.IsNotNull(config); Assert.AreEqual(poolId, config.IdentityPoolId); Assert.IsNull(config.PushSync); var usages = GetAllIdentityPoolUsages(); Assert.IsNotNull(usages); Assert.AreNotEqual(0, usages.Count); int usagesCount = usages.Count; usages = GetAllIdentityPoolUsages(); Assert.IsNotNull(usages); Assert.AreNotEqual(0, usages.Count); Assert.AreEqual(usagesCount, usages.Count); // Eventual consistency for IAM role UtilityMethods.WaitUntilSuccess(() => TestAuthenticatedClient(usePoolRoles: true)); UtilityMethods.WaitUntilSuccess(() => TestAuthenticatedClient(usePoolRoles: false)); }
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { GetIdentityPoolConfigurationResponse response = new GetIdentityPoolConfigurationResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("CognitoStreams", targetDepth)) { var unmarshaller = CognitoStreamsUnmarshaller.Instance; response.CognitoStreams = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("IdentityPoolId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.IdentityPoolId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("PushSync", targetDepth)) { var unmarshaller = PushSyncUnmarshaller.Instance; response.PushSync = unmarshaller.Unmarshall(context); continue; } } return(response); }