public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; // create request var request = new Amazon.IdentityManagement.Model.UpdateSAMLProviderRequest(); if (cmdletContext.SAMLMetadataDocument != null) { request.SAMLMetadataDocument = cmdletContext.SAMLMetadataDocument; } 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 UpdateSAMLProvider operation. /// <seealso cref="Amazon.IdentityManagement.IAmazonIdentityManagementService"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdateSAMLProvider 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<UpdateSAMLProviderResponse> UpdateSAMLProviderAsync(UpdateSAMLProviderRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new UpdateSAMLProviderRequestMarshaller(); var unmarshaller = UpdateSAMLProviderResponseUnmarshaller.Instance; return InvokeAsync<UpdateSAMLProviderRequest,UpdateSAMLProviderResponse>(request, marshaller, unmarshaller, cancellationToken); }
internal UpdateSAMLProviderResponse UpdateSAMLProvider(UpdateSAMLProviderRequest request) { var marshaller = new UpdateSAMLProviderRequestMarshaller(); var unmarshaller = UpdateSAMLProviderResponseUnmarshaller.Instance; return Invoke<UpdateSAMLProviderRequest,UpdateSAMLProviderResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the UpdateSAMLProvider operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdateSAMLProvider 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 EndUpdateSAMLProvider /// operation.</returns> public IAsyncResult BeginUpdateSAMLProvider(UpdateSAMLProviderRequest request, AsyncCallback callback, object state) { var marshaller = new UpdateSAMLProviderRequestMarshaller(); var unmarshaller = UpdateSAMLProviderResponseUnmarshaller.Instance; return BeginInvoke<UpdateSAMLProviderRequest>(request, marshaller, unmarshaller, callback, state); }
/// <summary> /// Initiates the asynchronous execution of the UpdateSAMLProvider operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdateSAMLProvider 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 UpdateSAMLProviderAsync(UpdateSAMLProviderRequest request, AmazonServiceCallback<UpdateSAMLProviderRequest, UpdateSAMLProviderResponse> callback, AsyncOptions options = null) { options = options == null?new AsyncOptions():options; var marshaller = new UpdateSAMLProviderRequestMarshaller(); var unmarshaller = UpdateSAMLProviderResponseUnmarshaller.Instance; Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null; if(callback !=null ) callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { AmazonServiceResult<UpdateSAMLProviderRequest,UpdateSAMLProviderResponse> responseObject = new AmazonServiceResult<UpdateSAMLProviderRequest,UpdateSAMLProviderResponse>((UpdateSAMLProviderRequest)req, (UpdateSAMLProviderResponse)res, ex , ao.State); callback(responseObject); }; BeginInvoke<UpdateSAMLProviderRequest>(request, marshaller, unmarshaller, options, callbackHelper); }
/// <summary> /// Initiates the asynchronous execution of the UpdateSAMLProvider operation. /// <seealso cref="Amazon.IdentityManagement.IAmazonIdentityManagementService.UpdateSAMLProvider"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdateSAMLProvider 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<UpdateSAMLProviderResponse> UpdateSAMLProviderAsync(UpdateSAMLProviderRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new UpdateSAMLProviderRequestMarshaller(); var unmarshaller = UpdateSAMLProviderResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, UpdateSAMLProviderRequest, UpdateSAMLProviderResponse>(request, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }
/// <summary> /// <para>Updates the metadata document for an existing SAML provider.</para> <para><b>NOTE:</b>This operation requires Signature Version /// 4.</para> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdateSAMLProvider service method on /// AmazonIdentityManagementService.</param> /// /// <returns>The response from the UpdateSAMLProvider service method, as returned by AmazonIdentityManagementService.</returns> /// /// <exception cref="T:Amazon.IdentityManagement.Model.InvalidInputException" /> /// <exception cref="T:Amazon.IdentityManagement.Model.NoSuchEntityException" /> /// <exception cref="T:Amazon.IdentityManagement.Model.LimitExceededException" /> public UpdateSAMLProviderResponse UpdateSAMLProvider(UpdateSAMLProviderRequest request) { var task = UpdateSAMLProviderAsync(request); try { return task.Result; } catch(AggregateException e) { throw e.InnerException; } }
private Amazon.IdentityManagement.Model.UpdateSAMLProviderResponse CallAWSServiceOperation(IAmazonIdentityManagementService client, Amazon.IdentityManagement.Model.UpdateSAMLProviderRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Identity and Access Management", "UpdateSAMLProvider"); try { #if DESKTOP return(client.UpdateSAMLProvider(request)); #elif CORECLR return(client.UpdateSAMLProviderAsync(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> /// <para>Updates the metadata document for an existing SAML provider.</para> <para><b>NOTE:</b>This operation requires Signature Version /// 4.</para> /// </summary> /// /// <param name="updateSAMLProviderRequest">Container for the necessary parameters to execute the UpdateSAMLProvider service method on /// AmazonIdentityManagementService.</param> /// /// <returns>The response from the UpdateSAMLProvider service method, as returned by AmazonIdentityManagementService.</returns> /// /// <exception cref="T:Amazon.IdentityManagement.Model.InvalidInputException" /> /// <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<UpdateSAMLProviderResponse> UpdateSAMLProviderAsync(UpdateSAMLProviderRequest updateSAMLProviderRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new UpdateSAMLProviderRequestMarshaller(); var unmarshaller = UpdateSAMLProviderResponseUnmarshaller.GetInstance(); return Invoke<IRequest, UpdateSAMLProviderRequest, UpdateSAMLProviderResponse>(updateSAMLProviderRequest, marshaller, unmarshaller, signer, cancellationToken); }
internal UpdateSAMLProviderResponse UpdateSAMLProvider(UpdateSAMLProviderRequest request) { var task = UpdateSAMLProviderAsync(request); try { return task.Result; } catch(AggregateException e) { ExceptionDispatchInfo.Capture(e.InnerException).Throw(); return null; } }
IAsyncResult invokeUpdateSAMLProvider(UpdateSAMLProviderRequest request, AsyncCallback callback, object state, bool synchronized) { var marshaller = new UpdateSAMLProviderRequestMarshaller(); var unmarshaller = UpdateSAMLProviderResponseUnmarshaller.Instance; return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer); }
/// <summary> /// Initiates the asynchronous execution of the UpdateSAMLProvider operation. /// <seealso cref="Amazon.IdentityManagement.IAmazonIdentityManagementService"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdateSAMLProvider 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 EndUpdateSAMLProvider /// operation.</returns> public IAsyncResult BeginUpdateSAMLProvider(UpdateSAMLProviderRequest request, AsyncCallback callback, object state) { return invokeUpdateSAMLProvider(request, callback, state, false); }
/// <summary> /// Updates the metadata document for an existing SAML provider. /// /// <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 UpdateSAMLProvider service method.</param> /// /// <returns>The response from the UpdateSAMLProvider 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 UpdateSAMLProviderResponse UpdateSAMLProvider(UpdateSAMLProviderRequest request) { IAsyncResult asyncResult = invokeUpdateSAMLProvider(request, null, null, true); return EndUpdateSAMLProvider(asyncResult); }
IAsyncResult invokeUpdateSAMLProvider(UpdateSAMLProviderRequest updateSAMLProviderRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new UpdateSAMLProviderRequestMarshaller().Marshall(updateSAMLProviderRequest); var unmarshaller = UpdateSAMLProviderResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }