Container for the parameters to the DeleteIdentityPool operation. Deletes a user pool. Once a pool is deleted, users will not be able to authenticate with the pool.

You must use AWS Developer credentials to call this API.

Inheritance: AmazonCognitoIdentityRequest
Esempio n. 1
0
        public object Execute(ExecutorContext context)
        {
            var cmdletContext = context as CmdletContext;
            // create request
            var request = new Amazon.CognitoIdentity.Model.DeleteIdentityPoolRequest();

            if (cmdletContext.IdentityPoolId != null)
            {
                request.IdentityPoolId = cmdletContext.IdentityPoolId;
            }

            CmdletOutput output;

            // issue call
            var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint);

            try
            {
                var    response       = CallAWSServiceOperation(client, request);
                object pipelineOutput = null;
                pipelineOutput = cmdletContext.Select(response, this);
                output         = new CmdletOutput
                {
                    PipelineOutput  = pipelineOutput,
                    ServiceResponse = response
                };
            }
            catch (Exception e)
            {
                output = new CmdletOutput {
                    ErrorResponse = e
                };
            }

            return(output);
        }
        /// <summary>
        /// Deletes a user pool. Once a pool is deleted, users will not be able to authenticate
        /// with the pool.
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the DeleteIdentityPool service method.</param>
        /// 
        /// <returns>The response from the DeleteIdentityPool service method, as returned by CognitoIdentity.</returns>
        /// <exception cref="Amazon.CognitoIdentity.Model.InternalErrorException">
        /// Thrown when the service encounters an error during processing the request.
        /// </exception>
        /// <exception cref="Amazon.CognitoIdentity.Model.InvalidParameterException">
        /// Thrown for missing or bad input parameter(s).
        /// </exception>
        /// <exception cref="Amazon.CognitoIdentity.Model.NotAuthorizedException">
        /// Thrown when a user is not authorized to access the requested resource.
        /// </exception>
        /// <exception cref="Amazon.CognitoIdentity.Model.ResourceNotFoundException">
        /// Thrown when the requested resource (for example, a dataset or record) does not exist.
        /// </exception>
        /// <exception cref="Amazon.CognitoIdentity.Model.TooManyRequestsException">
        /// Thrown when a request is throttled.
        /// </exception>
        internal DeleteIdentityPoolResponse DeleteIdentityPool(DeleteIdentityPoolRequest request)
        {
            var marshaller = new DeleteIdentityPoolRequestMarshaller();
            var unmarshaller = DeleteIdentityPoolResponseUnmarshaller.Instance;

            return Invoke<DeleteIdentityPoolRequest,DeleteIdentityPoolResponse>(request, marshaller, unmarshaller);
        }
 /// <summary>
 /// Initiates the asynchronous execution of the DeleteIdentityPool operation.
 /// </summary>
 /// 
 /// <param name="request">Container for the necessary parameters to execute the DeleteIdentityPool operation on AmazonCognitoIdentityClient.</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 DeleteIdentityPoolAsync(DeleteIdentityPoolRequest request, AmazonServiceCallback<DeleteIdentityPoolRequest, DeleteIdentityPoolResponse> callback, AsyncOptions options = null)
 {
     options = options == null?new AsyncOptions():options;
     var marshaller = new DeleteIdentityPoolRequestMarshaller();
     var unmarshaller = DeleteIdentityPoolResponseUnmarshaller.Instance;
     Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null;
     if(callback !=null )
         callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { 
             AmazonServiceResult<DeleteIdentityPoolRequest,DeleteIdentityPoolResponse> responseObject 
                     = new AmazonServiceResult<DeleteIdentityPoolRequest,DeleteIdentityPoolResponse>((DeleteIdentityPoolRequest)req, (DeleteIdentityPoolResponse)res, ex , ao.State);    
                 callback(responseObject); 
         };
     BeginInvoke<DeleteIdentityPoolRequest>(request, marshaller, unmarshaller, options, callbackHelper);
 }
 /// <summary>
 /// Deletes a user pool. Once a pool is deleted, users will not be able to authenticate
 /// with the pool.
 /// </summary>
 /// <param name="identityPoolId">An identity pool ID in the format REGION:GUID.</param>
 /// 
 /// <returns>The response from the DeleteIdentityPool service method, as returned by CognitoIdentity.</returns>
 /// <exception cref="Amazon.CognitoIdentity.Model.InternalErrorException">
 /// Thrown when the service encounters an error during processing the request.
 /// </exception>
 /// <exception cref="Amazon.CognitoIdentity.Model.InvalidParameterException">
 /// Thrown for missing or bad input parameter(s).
 /// </exception>
 /// <exception cref="Amazon.CognitoIdentity.Model.NotAuthorizedException">
 /// Thrown when a user is not authorized to access the requested resource.
 /// </exception>
 /// <exception cref="Amazon.CognitoIdentity.Model.ResourceNotFoundException">
 /// Thrown when the requested resource (for example, a dataset or record) does not exist.
 /// </exception>
 /// <exception cref="Amazon.CognitoIdentity.Model.TooManyRequestsException">
 /// Thrown when a request is throttled.
 /// </exception>
 public void DeleteIdentityPoolAsync(string identityPoolId, AmazonServiceCallback<DeleteIdentityPoolRequest, DeleteIdentityPoolResponse> callback, AsyncOptions options = null)
 {
     var request = new DeleteIdentityPoolRequest();
     request.IdentityPoolId = identityPoolId;
     DeleteIdentityPoolAsync(request, callback, options);
 }
        /// <summary>
        /// Initiates the asynchronous execution of the DeleteIdentityPool operation.
        /// <seealso cref="Amazon.CognitoIdentity.IAmazonCognitoIdentity.DeleteIdentityPool"/>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the DeleteIdentityPool 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<DeleteIdentityPoolResponse> DeleteIdentityPoolAsync(DeleteIdentityPoolRequest request, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new DeleteIdentityPoolRequestMarshaller();
            var unmarshaller = DeleteIdentityPoolResponseUnmarshaller.GetInstance();
            return Invoke<IRequest, DeleteIdentityPoolRequest, DeleteIdentityPoolResponse>(request, marshaller, unmarshaller, signer, cancellationToken);
        }
        /// <summary>
        /// Deletes a user pool. Once a pool is deleted, users will not be able to authenticate
        /// with the pool.
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the DeleteIdentityPool service method.</param>
        /// 
        /// <returns>The response from the DeleteIdentityPool service method, as returned by CognitoIdentity.</returns>
        /// <exception cref="T:Amazon.CognitoIdentity.Model.InternalErrorException">
        /// Thrown when the service encounters an error during processing the request.
        /// </exception>
        /// <exception cref="T:Amazon.CognitoIdentity.Model.InvalidParameterException">
        /// Thrown for missing or bad input parameter(s).
        /// </exception>
        /// <exception cref="T:Amazon.CognitoIdentity.Model.NotAuthorizedException">
        /// Thrown when a user is not authorized to access the requested resource.
        /// </exception>
        /// <exception cref="T:Amazon.CognitoIdentity.Model.ResourceNotFoundException">
        /// Thrown when the requested resource (for example, a dataset or record) does not exist.
        /// </exception>
        /// <exception cref="T:Amazon.CognitoIdentity.Model.TooManyRequestsException">
        /// Thrown when a request is throttled.
        /// </exception>
		public DeleteIdentityPoolResponse DeleteIdentityPool(DeleteIdentityPoolRequest request)
        {
            var task = DeleteIdentityPoolAsync(request);
            try
            {
                return task.Result;
            }
            catch(AggregateException e)
            {
                ExceptionDispatchInfo.Capture(e.InnerException).Throw();
                return null;
            }
        }
        /// <summary>
        /// Initiates the asynchronous execution of the DeleteIdentityPool operation.
        /// <seealso cref="Amazon.CognitoIdentity.IAmazonCognitoIdentity"/>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the DeleteIdentityPool operation on AmazonCognitoIdentityClient.</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 EndDeleteIdentityPool
        ///         operation.</returns>
        public IAsyncResult BeginDeleteIdentityPool(DeleteIdentityPoolRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new DeleteIdentityPoolRequestMarshaller();
            var unmarshaller = DeleteIdentityPoolResponseUnmarshaller.Instance;

            return BeginInvoke<DeleteIdentityPoolRequest>(request, marshaller, unmarshaller,
                callback, state);
        }
        /// <summary>
        /// Initiates the asynchronous execution of the DeleteIdentityPool operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the DeleteIdentityPool 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<DeleteIdentityPoolResponse> DeleteIdentityPoolAsync(DeleteIdentityPoolRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new DeleteIdentityPoolRequestMarshaller();
            var unmarshaller = DeleteIdentityPoolResponseUnmarshaller.Instance;

            return InvokeAsync<DeleteIdentityPoolRequest,DeleteIdentityPoolResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }
 /// <summary>
 /// Deletes a user pool. Once a pool is deleted, users will not be able to authenticate
 /// with the pool.
 /// 
 ///  
 /// <para>
 /// You must use AWS Developer credentials to call this API.
 /// </para>
 /// </summary>
 /// <param name="identityPoolId">An identity pool ID in the format REGION:GUID.</param>
 /// <param name="cancellationToken">
 ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
 /// </param>
 /// 
 /// <returns>The response from the DeleteIdentityPool service method, as returned by CognitoIdentity.</returns>
 /// <exception cref="Amazon.CognitoIdentity.Model.InternalErrorException">
 /// Thrown when the service encounters an error during processing the request.
 /// </exception>
 /// <exception cref="Amazon.CognitoIdentity.Model.InvalidParameterException">
 /// Thrown for missing or bad input parameter(s).
 /// </exception>
 /// <exception cref="Amazon.CognitoIdentity.Model.NotAuthorizedException">
 /// Thrown when a user is not authorized to access the requested resource.
 /// </exception>
 /// <exception cref="Amazon.CognitoIdentity.Model.ResourceNotFoundException">
 /// Thrown when the requested resource (for example, a dataset or record) does not exist.
 /// </exception>
 /// <exception cref="Amazon.CognitoIdentity.Model.TooManyRequestsException">
 /// Thrown when a request is throttled.
 /// </exception>
 public Task<DeleteIdentityPoolResponse> DeleteIdentityPoolAsync(string identityPoolId, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
 {
     var request = new DeleteIdentityPoolRequest();
     request.IdentityPoolId = identityPoolId;
     return DeleteIdentityPoolAsync(request, cancellationToken);
 }
 /// <summary>
 /// Deletes a user pool. Once a pool is deleted, users will not be able to authenticate
 /// with the pool.
 /// 
 ///  
 /// <para>
 /// You must use AWS Developer credentials to call this API.
 /// </para>
 /// </summary>
 /// <param name="identityPoolId">An identity pool ID in the format REGION:GUID.</param>
 /// 
 /// <returns>The response from the DeleteIdentityPool service method, as returned by CognitoIdentity.</returns>
 /// <exception cref="Amazon.CognitoIdentity.Model.InternalErrorException">
 /// Thrown when the service encounters an error during processing the request.
 /// </exception>
 /// <exception cref="Amazon.CognitoIdentity.Model.InvalidParameterException">
 /// Thrown for missing or bad input parameter(s).
 /// </exception>
 /// <exception cref="Amazon.CognitoIdentity.Model.NotAuthorizedException">
 /// Thrown when a user is not authorized to access the requested resource.
 /// </exception>
 /// <exception cref="Amazon.CognitoIdentity.Model.ResourceNotFoundException">
 /// Thrown when the requested resource (for example, a dataset or record) does not exist.
 /// </exception>
 /// <exception cref="Amazon.CognitoIdentity.Model.TooManyRequestsException">
 /// Thrown when a request is throttled.
 /// </exception>
 public DeleteIdentityPoolResponse DeleteIdentityPool(string identityPoolId)
 {
     var request = new DeleteIdentityPoolRequest();
     request.IdentityPoolId = identityPoolId;
     return DeleteIdentityPool(request);
 }
        IAsyncResult invokeDeleteIdentityPool(DeleteIdentityPoolRequest request, AsyncCallback callback, object state, bool synchronized)
        {
            var marshaller = new DeleteIdentityPoolRequestMarshaller();
            var unmarshaller = DeleteIdentityPoolResponseUnmarshaller.Instance;

            return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer);
        }
 /// <summary>
 /// Initiates the asynchronous execution of the DeleteIdentityPool operation.
 /// <seealso cref="Amazon.CognitoIdentity.IAmazonCognitoIdentity"/>
 /// </summary>
 /// 
 /// <param name="request">Container for the necessary parameters to execute the DeleteIdentityPool operation on AmazonCognitoIdentityClient.</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 EndDeleteIdentityPool
 ///         operation.</returns>
 public IAsyncResult BeginDeleteIdentityPool(DeleteIdentityPoolRequest request, AsyncCallback callback, object state)
 {
     return invokeDeleteIdentityPool(request, callback, state, false);
 }
 /// <summary>
 /// Deletes a user pool. Once a pool is deleted, users will not be able to authenticate
 /// with the pool.
 /// </summary>
 /// <param name="request">Container for the necessary parameters to execute the DeleteIdentityPool service method.</param>
 /// 
 /// <returns>The response from the DeleteIdentityPool service method, as returned by CognitoIdentity.</returns>
 /// <exception cref="InternalErrorException">
 /// Thrown when the service encounters an error during processing the request.
 /// </exception>
 /// <exception cref="InvalidParameterException">
 /// Thrown for missing or bad input parameter(s).
 /// </exception>
 /// <exception cref="NotAuthorizedException">
 /// Thrown when a user is not authorized to access the requested resource.
 /// </exception>
 /// <exception cref="ResourceNotFoundException">
 /// Thrown when the requested resource (for example, a dataset or record) does not exist.
 /// </exception>
 /// <exception cref="TooManyRequestsException">
 /// Thrown when a request is throttled.
 /// </exception>
 public DeleteIdentityPoolResponse DeleteIdentityPool(DeleteIdentityPoolRequest request)
 {
     IAsyncResult asyncResult = invokeDeleteIdentityPool(request, null, null, true);
     return EndDeleteIdentityPool(asyncResult);
 }
Esempio n. 14
0
 private Amazon.CognitoIdentity.Model.DeleteIdentityPoolResponse CallAWSServiceOperation(IAmazonCognitoIdentity client, Amazon.CognitoIdentity.Model.DeleteIdentityPoolRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Cognito Identity", "DeleteIdentityPool");
     try
     {
         #if DESKTOP
         return(client.DeleteIdentityPool(request));
         #elif CORECLR
         return(client.DeleteIdentityPoolAsync(request).GetAwaiter().GetResult());
         #else
                 #error "Unknown build edition"
         #endif
     }
     catch (AmazonServiceException exc)
     {
         var webException = exc.InnerException as System.Net.WebException;
         if (webException != null)
         {
             throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException);
         }
         throw;
     }
 }