/// <summary> /// Gets a list of identity pools registered with Cognito. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListIdentityPoolUsage service method.</param> /// /// <returns>The response from the ListIdentityPoolUsage service method, as returned by CognitoSync.</returns> /// <exception cref="InternalErrorException"> /// Indicates an internal service error. /// </exception> /// <exception cref="InvalidParameterException"> /// Thrown when a request parameter does not comply with the associated constraints. /// </exception> /// <exception cref="NotAuthorizedException"> /// Thrown when a user is not authorized to access the requested resource. /// </exception> public ListIdentityPoolUsageResponse ListIdentityPoolUsage(ListIdentityPoolUsageRequest request) { var marshaller = new ListIdentityPoolUsageRequestMarshaller(); var unmarshaller = ListIdentityPoolUsageResponseUnmarshaller.Instance; return(Invoke <ListIdentityPoolUsageRequest, ListIdentityPoolUsageResponse>(request, marshaller, unmarshaller)); }
internal virtual ListIdentityPoolUsageResponse ListIdentityPoolUsage(ListIdentityPoolUsageRequest request) { var marshaller = ListIdentityPoolUsageRequestMarshaller.Instance; var unmarshaller = ListIdentityPoolUsageResponseUnmarshaller.Instance; return(Invoke <ListIdentityPoolUsageRequest, ListIdentityPoolUsageResponse>(request, marshaller, unmarshaller)); }
/// <summary> /// Initiates the asynchronous execution of the ListIdentityPoolUsage operation. /// <seealso cref="Amazon.CognitoSync.IAmazonCognitoSync"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListIdentityPoolUsage operation.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// <returns>The task object representing the asynchronous operation.</returns> public Task <ListIdentityPoolUsageResponse> ListIdentityPoolUsageAsync(ListIdentityPoolUsageRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new ListIdentityPoolUsageRequestMarshaller(); var unmarshaller = ListIdentityPoolUsageResponseUnmarshaller.Instance; return(Invoke <IRequest, ListIdentityPoolUsageRequest, ListIdentityPoolUsageResponse>(request, marshaller, unmarshaller, signer, cancellationToken)); }
IAsyncResult invokeListIdentityPoolUsage(ListIdentityPoolUsageRequest request, AsyncCallback callback, object state, bool synchronized) { var marshaller = new ListIdentityPoolUsageRequestMarshaller(); var unmarshaller = ListIdentityPoolUsageResponseUnmarshaller.Instance; return(Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer)); }
/// <summary> /// Initiates the asynchronous execution of the ListIdentityPoolUsage operation. /// <seealso cref="Amazon.CognitoSync.IAmazonCognitoSync"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListIdentityPoolUsage operation on AmazonCognitoSyncClient.</param> /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param> /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.</param> /// /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndListIdentityPoolUsage /// operation.</returns> public IAsyncResult BeginListIdentityPoolUsage(ListIdentityPoolUsageRequest request, AsyncCallback callback, object state) { var marshaller = new ListIdentityPoolUsageRequestMarshaller(); var unmarshaller = ListIdentityPoolUsageResponseUnmarshaller.Instance; return(BeginInvoke <ListIdentityPoolUsageRequest>(request, marshaller, unmarshaller, callback, state)); }
internal virtual ListIdentityPoolUsageResponse ListIdentityPoolUsage(ListIdentityPoolUsageRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = ListIdentityPoolUsageRequestMarshaller.Instance; options.ResponseUnmarshaller = ListIdentityPoolUsageResponseUnmarshaller.Instance; return(Invoke <ListIdentityPoolUsageResponse>(request, options)); }
internal ListIdentityPoolUsageResponse ListIdentityPoolUsage(ListIdentityPoolUsageRequest request) { var task = ListIdentityPoolUsageAsync(request); try { return(task.Result); } catch (AggregateException e) { ExceptionDispatchInfo.Capture(e.InnerException).Throw(); return(null); } }
/// <summary> /// Initiates the asynchronous execution of the ListIdentityPoolUsage operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListIdentityPoolUsage operation on AmazonCognitoSyncClient.</param> /// <param name="callback">An Action delegate that is invoked when the operation completes.</param> /// <param name="options">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.</param> public void ListIdentityPoolUsageAsync(ListIdentityPoolUsageRequest request, AmazonServiceCallback <ListIdentityPoolUsageRequest, ListIdentityPoolUsageResponse> callback, AsyncOptions options = null) { options = options == null?new AsyncOptions():options; var marshaller = new ListIdentityPoolUsageRequestMarshaller(); var unmarshaller = ListIdentityPoolUsageResponseUnmarshaller.Instance; Action <AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null; if (callback != null) { callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { AmazonServiceResult <ListIdentityPoolUsageRequest, ListIdentityPoolUsageResponse> responseObject = new AmazonServiceResult <ListIdentityPoolUsageRequest, ListIdentityPoolUsageResponse>((ListIdentityPoolUsageRequest)req, (ListIdentityPoolUsageResponse)res, ex, ao.State); callback(responseObject); } } ; BeginInvoke <ListIdentityPoolUsageRequest>(request, marshaller, unmarshaller, options, callbackHelper); }
private static IEnumerable <IdentityPoolUsage> GetAllIdentityPoolUsagesHelper() { var request = new ListIdentityPoolUsageRequest { MaxResults = MaxResults }; ListIdentityPoolUsageResult result; do { result = Client.ListIdentityPoolUsage(request); foreach (var usage in result.IdentityPoolUsages) { Assert.IsFalse(string.IsNullOrEmpty(usage.IdentityPoolId)); yield return(usage); } request.NextToken = result.NextToken; } while (!string.IsNullOrEmpty(result.NextToken)); }
/// <summary> /// Initiates the asynchronous execution of the ListIdentityPoolUsage operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListIdentityPoolUsage operation.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// <returns>The task object representing the asynchronous operation.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/ListIdentityPoolUsage">REST API Reference for ListIdentityPoolUsage Operation</seealso> public virtual Task <ListIdentityPoolUsageResponse> ListIdentityPoolUsageAsync(ListIdentityPoolUsageRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = ListIdentityPoolUsageRequestMarshaller.Instance; var unmarshaller = ListIdentityPoolUsageResponseUnmarshaller.Instance; return(InvokeAsync <ListIdentityPoolUsageRequest, ListIdentityPoolUsageResponse>(request, marshaller, unmarshaller, cancellationToken)); }
/// <summary> /// Initiates the asynchronous execution of the ListIdentityPoolUsage operation. /// <seealso cref="Amazon.CognitoSync.IAmazonCognitoSync"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListIdentityPoolUsage operation on AmazonCognitoSyncClient.</param> /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param> /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.</param> /// /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndListIdentityPoolUsage /// operation.</returns> public IAsyncResult BeginListIdentityPoolUsage(ListIdentityPoolUsageRequest request, AsyncCallback callback, object state) { return(invokeListIdentityPoolUsage(request, callback, state, false)); }
/// <summary> /// Gets a list of identity pools registered with Cognito. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListIdentityPoolUsage service method.</param> /// /// <returns>The response from the ListIdentityPoolUsage service method, as returned by CognitoSync.</returns> /// <exception cref="InternalErrorException"> /// Indicates an internal service error. /// </exception> /// <exception cref="InvalidParameterException"> /// Thrown when a request parameter does not comply with the associated constraints. /// </exception> /// <exception cref="NotAuthorizedException"> /// Thrown when a user is not authorized to access the requested resource. /// </exception> public ListIdentityPoolUsageResponse ListIdentityPoolUsage(ListIdentityPoolUsageRequest request) { IAsyncResult asyncResult = invokeListIdentityPoolUsage(request, null, null, true); return(EndListIdentityPoolUsage(asyncResult)); }