public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; // create request var request = new Amazon.IdentityManagement.Model.DeleteSAMLProviderRequest(); if (cmdletContext.SAMLProviderArn != null) { request.SAMLProviderArn = cmdletContext.SAMLProviderArn; } 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 DeleteSAMLProvider operation. /// <seealso cref="Amazon.IdentityManagement.IAmazonIdentityManagementService"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeleteSAMLProvider 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<DeleteSAMLProviderResponse> DeleteSAMLProviderAsync(DeleteSAMLProviderRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DeleteSAMLProviderRequestMarshaller(); var unmarshaller = DeleteSAMLProviderResponseUnmarshaller.Instance; return InvokeAsync<DeleteSAMLProviderRequest,DeleteSAMLProviderResponse>(request, marshaller, unmarshaller, cancellationToken); }
internal DeleteSAMLProviderResponse DeleteSAMLProvider(DeleteSAMLProviderRequest request) { var marshaller = new DeleteSAMLProviderRequestMarshaller(); var unmarshaller = DeleteSAMLProviderResponseUnmarshaller.Instance; return Invoke<DeleteSAMLProviderRequest,DeleteSAMLProviderResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the DeleteSAMLProvider operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeleteSAMLProvider 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 EndDeleteSAMLProvider /// operation.</returns> public IAsyncResult BeginDeleteSAMLProvider(DeleteSAMLProviderRequest request, AsyncCallback callback, object state) { var marshaller = new DeleteSAMLProviderRequestMarshaller(); var unmarshaller = DeleteSAMLProviderResponseUnmarshaller.Instance; return BeginInvoke<DeleteSAMLProviderRequest>(request, marshaller, unmarshaller, callback, state); }
/// <summary> /// Initiates the asynchronous execution of the DeleteSAMLProvider operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeleteSAMLProvider 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 DeleteSAMLProviderAsync(DeleteSAMLProviderRequest request, AmazonServiceCallback<DeleteSAMLProviderRequest, DeleteSAMLProviderResponse> callback, AsyncOptions options = null) { options = options == null?new AsyncOptions():options; var marshaller = new DeleteSAMLProviderRequestMarshaller(); var unmarshaller = DeleteSAMLProviderResponseUnmarshaller.Instance; Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null; if(callback !=null ) callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { AmazonServiceResult<DeleteSAMLProviderRequest,DeleteSAMLProviderResponse> responseObject = new AmazonServiceResult<DeleteSAMLProviderRequest,DeleteSAMLProviderResponse>((DeleteSAMLProviderRequest)req, (DeleteSAMLProviderResponse)res, ex , ao.State); callback(responseObject); }; BeginInvoke<DeleteSAMLProviderRequest>(request, marshaller, unmarshaller, options, callbackHelper); }
/// <summary> /// Initiates the asynchronous execution of the DeleteSAMLProvider operation. /// <seealso cref="Amazon.IdentityManagement.IAmazonIdentityManagementService.DeleteSAMLProvider"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeleteSAMLProvider 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<DeleteSAMLProviderResponse> DeleteSAMLProviderAsync(DeleteSAMLProviderRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DeleteSAMLProviderRequestMarshaller(); var unmarshaller = DeleteSAMLProviderResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, DeleteSAMLProviderRequest, DeleteSAMLProviderResponse>(request, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }
/// <summary> /// <para>Deletes a SAML provider.</para> <para>Deleting the provider does not update any roles that reference the SAML provider as a principal /// in their trust policies. Any attempt to assume a role that references a SAML provider that has been deleted will fail. </para> /// <para><b>NOTE:</b>This operation requires Signature Version 4.</para> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeleteSAMLProvider service method on /// AmazonIdentityManagementService.</param> /// /// <exception cref="T:Amazon.IdentityManagement.Model.InvalidInputException" /> public DeleteSAMLProviderResponse DeleteSAMLProvider(DeleteSAMLProviderRequest request) { var task = DeleteSAMLProviderAsync(request); try { return task.Result; } catch(AggregateException e) { throw e.InnerException; } }
/// <summary> /// <para>Deletes a SAML provider.</para> <para>Deleting the provider does not update any roles that reference the SAML provider as a principal /// in their trust policies. Any attempt to assume a role that references a SAML provider that has been deleted will fail. </para> /// <para><b>NOTE:</b>This operation requires Signature Version 4.</para> /// </summary> /// /// <param name="deleteSAMLProviderRequest">Container for the necessary parameters to execute the DeleteSAMLProvider service method on /// AmazonIdentityManagementService.</param> /// /// <exception cref="T:Amazon.IdentityManagement.Model.InvalidInputException" /> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public Task<DeleteSAMLProviderResponse> DeleteSAMLProviderAsync(DeleteSAMLProviderRequest deleteSAMLProviderRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DeleteSAMLProviderRequestMarshaller(); var unmarshaller = DeleteSAMLProviderResponseUnmarshaller.GetInstance(); return Invoke<IRequest, DeleteSAMLProviderRequest, DeleteSAMLProviderResponse>(deleteSAMLProviderRequest, marshaller, unmarshaller, signer, cancellationToken); }
internal DeleteSAMLProviderResponse DeleteSAMLProvider(DeleteSAMLProviderRequest request) { var task = DeleteSAMLProviderAsync(request); try { return task.Result; } catch(AggregateException e) { ExceptionDispatchInfo.Capture(e.InnerException).Throw(); return null; } }
private Amazon.IdentityManagement.Model.DeleteSAMLProviderResponse CallAWSServiceOperation(IAmazonIdentityManagementService client, Amazon.IdentityManagement.Model.DeleteSAMLProviderRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Identity and Access Management", "DeleteSAMLProvider"); try { #if DESKTOP return(client.DeleteSAMLProvider(request)); #elif CORECLR return(client.DeleteSAMLProviderAsync(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; } }
IAsyncResult invokeDeleteSAMLProvider(DeleteSAMLProviderRequest request, AsyncCallback callback, object state, bool synchronized) { var marshaller = new DeleteSAMLProviderRequestMarshaller(); var unmarshaller = DeleteSAMLProviderResponseUnmarshaller.Instance; return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer); }
/// <summary> /// Initiates the asynchronous execution of the DeleteSAMLProvider operation. /// <seealso cref="Amazon.IdentityManagement.IAmazonIdentityManagementService"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeleteSAMLProvider 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 EndDeleteSAMLProvider /// operation.</returns> public IAsyncResult BeginDeleteSAMLProvider(DeleteSAMLProviderRequest request, AsyncCallback callback, object state) { return invokeDeleteSAMLProvider(request, callback, state, false); }
/// <summary> /// Deletes a SAML provider. /// /// /// <para> /// Deleting the provider does not update any roles that reference the SAML provider as /// a principal in their trust policies. Any attempt to assume a role that references /// a SAML provider that has been deleted will fail. /// </para> /// <note>This operation requires <a href="http://docs.aws.amazon.com/general/latest/gr/signature-version-4.html">Signature /// Version 4</a>.</note> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteSAMLProvider service method.</param> /// /// <returns>The response from the DeleteSAMLProvider service method, as returned by IdentityManagementService.</returns> /// <exception cref="InvalidInputException"> /// /// </exception> /// <exception cref="LimitExceededException"> /// The request was rejected because it attempted to create resources beyond the current /// AWS account limits. The error message describes the limit exceeded. /// </exception> /// <exception cref="NoSuchEntityException"> /// The request was rejected because it referenced an entity that does not exist. The /// error message describes the entity. /// </exception> public DeleteSAMLProviderResponse DeleteSAMLProvider(DeleteSAMLProviderRequest request) { IAsyncResult asyncResult = invokeDeleteSAMLProvider(request, null, null, true); return EndDeleteSAMLProvider(asyncResult); }
IAsyncResult invokeDeleteSAMLProvider(DeleteSAMLProviderRequest deleteSAMLProviderRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new DeleteSAMLProviderRequestMarshaller().Marshall(deleteSAMLProviderRequest); var unmarshaller = DeleteSAMLProviderResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }