public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; // create request var request = new Amazon.IdentityManagement.Model.DeleteAccountAliasRequest(); if (cmdletContext.AccountAlias != null) { request.AccountAlias = cmdletContext.AccountAlias; } 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> /// Initiates the asynchronous execution of the DeleteAccountAlias operation. /// <seealso cref="Amazon.IdentityManagement.IAmazonIdentityManagementService"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeleteAccountAlias 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<DeleteAccountAliasResponse> DeleteAccountAliasAsync(DeleteAccountAliasRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DeleteAccountAliasRequestMarshaller(); var unmarshaller = DeleteAccountAliasResponseUnmarshaller.Instance; return InvokeAsync<DeleteAccountAliasRequest,DeleteAccountAliasResponse>(request, marshaller, unmarshaller, cancellationToken); }
internal DeleteAccountAliasResponse DeleteAccountAlias(DeleteAccountAliasRequest request) { var marshaller = new DeleteAccountAliasRequestMarshaller(); var unmarshaller = DeleteAccountAliasResponseUnmarshaller.Instance; return Invoke<DeleteAccountAliasRequest,DeleteAccountAliasResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the DeleteAccountAlias operation. /// <seealso cref="Amazon.IdentityManagement.AmazonIdentityManagementService.DeleteAccountAlias"/> /// </summary> /// /// <param name="deleteAccountAliasRequest">Container for the necessary parameters to execute the DeleteAccountAlias operation on /// AmazonIdentityManagementService.</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> public IAsyncResult BeginDeleteAccountAlias(DeleteAccountAliasRequest deleteAccountAliasRequest, AsyncCallback callback, object state) { return invokeDeleteAccountAlias(deleteAccountAliasRequest, callback, state, false); }
IAsyncResult invokeDeleteAccountAlias(DeleteAccountAliasRequest deleteAccountAliasRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new DeleteAccountAliasRequestMarshaller().Marshall(deleteAccountAliasRequest); var unmarshaller = DeleteAccountAliasResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// <para>Deletes the specified AWS account alias. For information about using an AWS account alias, see Using an Alias for Your AWS Account ID /// in <i>Using AWS Identity and Access Management</i> .</para> /// </summary> /// /// <param name="deleteAccountAliasRequest">Container for the necessary parameters to execute the DeleteAccountAlias service method on /// AmazonIdentityManagementService.</param> /// /// <exception cref="NoSuchEntityException"/> public DeleteAccountAliasResponse DeleteAccountAlias(DeleteAccountAliasRequest deleteAccountAliasRequest) { IAsyncResult asyncResult = invokeDeleteAccountAlias(deleteAccountAliasRequest, null, null, true); return EndDeleteAccountAlias(asyncResult); }
/// <summary> /// Initiates the asynchronous execution of the DeleteAccountAlias operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeleteAccountAlias operation on AmazonIdentityManagementServiceClient.</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 EndDeleteAccountAlias /// operation.</returns> public IAsyncResult BeginDeleteAccountAlias(DeleteAccountAliasRequest request, AsyncCallback callback, object state) { var marshaller = new DeleteAccountAliasRequestMarshaller(); var unmarshaller = DeleteAccountAliasResponseUnmarshaller.Instance; return BeginInvoke<DeleteAccountAliasRequest>(request, marshaller, unmarshaller, callback, state); }
private Amazon.IdentityManagement.Model.DeleteAccountAliasResponse CallAWSServiceOperation(IAmazonIdentityManagementService client, Amazon.IdentityManagement.Model.DeleteAccountAliasRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Identity and Access Management", "DeleteAccountAlias"); try { #if DESKTOP return(client.DeleteAccountAlias(request)); #elif CORECLR return(client.DeleteAccountAliasAsync(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; } }
/// <summary> /// Initiates the asynchronous execution of the DeleteAccountAlias operation. /// <seealso cref="Amazon.IdentityManagement.IAmazonIdentityManagementService.DeleteAccountAlias"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeleteAccountAlias 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 async Task<DeleteAccountAliasResponse> DeleteAccountAliasAsync(DeleteAccountAliasRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DeleteAccountAliasRequestMarshaller(); var unmarshaller = DeleteAccountAliasResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, DeleteAccountAliasRequest, DeleteAccountAliasResponse>(request, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }
/// <summary> /// Initiates the asynchronous execution of the DeleteAccountAlias operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeleteAccountAlias operation on AmazonIdentityManagementServiceClient.</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 DeleteAccountAliasAsync(DeleteAccountAliasRequest request, AmazonServiceCallback<DeleteAccountAliasRequest, DeleteAccountAliasResponse> callback, AsyncOptions options = null) { options = options == null?new AsyncOptions():options; var marshaller = new DeleteAccountAliasRequestMarshaller(); var unmarshaller = DeleteAccountAliasResponseUnmarshaller.Instance; Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null; if(callback !=null ) callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { AmazonServiceResult<DeleteAccountAliasRequest,DeleteAccountAliasResponse> responseObject = new AmazonServiceResult<DeleteAccountAliasRequest,DeleteAccountAliasResponse>((DeleteAccountAliasRequest)req, (DeleteAccountAliasResponse)res, ex , ao.State); callback(responseObject); }; BeginInvoke<DeleteAccountAliasRequest>(request, marshaller, unmarshaller, options, callbackHelper); }
/// <summary> /// <para>Deletes the specified AWS account alias. For information about using an AWS account alias, see <a href="http://docs.aws.amazon.com/IAM/latest/UserGuide/AccountAlias.html">Using an Alias for Your AWS Account ID</a> in <i>Using AWS /// Identity and Access Management</i> .</para> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeleteAccountAlias service method on /// AmazonIdentityManagementService.</param> /// /// <exception cref="T:Amazon.IdentityManagement.Model.NoSuchEntityException" /> /// <exception cref="T:Amazon.IdentityManagement.Model.LimitExceededException" /> public DeleteAccountAliasResponse DeleteAccountAlias(DeleteAccountAliasRequest request) { var task = DeleteAccountAliasAsync(request); try { return task.Result; } catch(AggregateException e) { throw e.InnerException; } }
/// <summary> /// <para>Deletes the specified AWS account alias. For information about using an AWS account alias, see <a href="http://docs.aws.amazon.com/IAM/latest/UserGuide/AccountAlias.html">Using an Alias for Your AWS Account ID</a> in <i>Using AWS /// Identity and Access Management</i> .</para> /// </summary> /// /// <param name="deleteAccountAliasRequest">Container for the necessary parameters to execute the DeleteAccountAlias service method on /// AmazonIdentityManagementService.</param> /// /// <exception cref="T:Amazon.IdentityManagement.Model.NoSuchEntityException" /> /// <exception cref="T:Amazon.IdentityManagement.Model.LimitExceededException" /> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public Task<DeleteAccountAliasResponse> DeleteAccountAliasAsync(DeleteAccountAliasRequest deleteAccountAliasRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DeleteAccountAliasRequestMarshaller(); var unmarshaller = DeleteAccountAliasResponseUnmarshaller.GetInstance(); return Invoke<IRequest, DeleteAccountAliasRequest, DeleteAccountAliasResponse>(deleteAccountAliasRequest, marshaller, unmarshaller, signer, cancellationToken); }
internal DeleteAccountAliasResponse DeleteAccountAlias(DeleteAccountAliasRequest request) { var task = DeleteAccountAliasAsync(request); try { return task.Result; } catch(AggregateException e) { ExceptionDispatchInfo.Capture(e.InnerException).Throw(); return null; } }
IAsyncResult invokeDeleteAccountAlias(DeleteAccountAliasRequest request, AsyncCallback callback, object state, bool synchronized) { var marshaller = new DeleteAccountAliasRequestMarshaller(); var unmarshaller = DeleteAccountAliasResponseUnmarshaller.Instance; return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer); }
/// <summary> /// <para>Deletes the specified AWS account alias. For information about using an AWS account alias, see Using an Alias for Your AWS Account ID /// in <i>Using AWS Identity and Access Management</i> .</para> /// </summary> /// /// <param name="deleteAccountAliasRequest">Container for the necessary parameters to execute the DeleteAccountAlias service method on /// AmazonIdentityManagementService.</param> /// /// <exception cref="NoSuchEntityException"/> public DeleteAccountAliasResponse DeleteAccountAlias(DeleteAccountAliasRequest deleteAccountAliasRequest) { IRequest<DeleteAccountAliasRequest> request = new DeleteAccountAliasRequestMarshaller().Marshall(deleteAccountAliasRequest); DeleteAccountAliasResponse response = Invoke<DeleteAccountAliasRequest, DeleteAccountAliasResponse> (request, this.signer, DeleteAccountAliasResponseUnmarshaller.GetInstance()); return response; }