public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; // create request var request = new Amazon.CodePipeline.Model.AcknowledgeThirdPartyJobRequest(); if (cmdletContext.ClientToken != null) { request.ClientToken = cmdletContext.ClientToken; } if (cmdletContext.JobId != null) { request.JobId = cmdletContext.JobId; } if (cmdletContext.Nonce != null) { request.Nonce = cmdletContext.Nonce; } 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 AcknowledgeThirdPartyJob operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the AcknowledgeThirdPartyJob 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<AcknowledgeThirdPartyJobResponse> AcknowledgeThirdPartyJobAsync(AcknowledgeThirdPartyJobRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new AcknowledgeThirdPartyJobRequestMarshaller(); var unmarshaller = AcknowledgeThirdPartyJobResponseUnmarshaller.Instance; return InvokeAsync<AcknowledgeThirdPartyJobRequest,AcknowledgeThirdPartyJobResponse>(request, marshaller, unmarshaller, cancellationToken); }
/// <summary> /// Confirms a job worker has received the specified job. Only used for partner actions. /// </summary> /// <param name="request">Container for the necessary parameters to execute the AcknowledgeThirdPartyJob service method.</param> /// /// <returns>The response from the AcknowledgeThirdPartyJob service method, as returned by CodePipeline.</returns> /// <exception cref="Amazon.CodePipeline.Model.InvalidClientTokenException"> /// The client token was specified in an invalid format /// </exception> /// <exception cref="Amazon.CodePipeline.Model.InvalidNonceException"> /// The specified nonce was specified in an invalid format. /// </exception> /// <exception cref="Amazon.CodePipeline.Model.JobNotFoundException"> /// The specified job was specified in an invalid format or cannot be found. /// </exception> /// <exception cref="Amazon.CodePipeline.Model.ValidationException"> /// The validation was specified in an invalid format. /// </exception> public AcknowledgeThirdPartyJobResponse AcknowledgeThirdPartyJob(AcknowledgeThirdPartyJobRequest request) { var marshaller = new AcknowledgeThirdPartyJobRequestMarshaller(); var unmarshaller = AcknowledgeThirdPartyJobResponseUnmarshaller.Instance; return Invoke<AcknowledgeThirdPartyJobRequest,AcknowledgeThirdPartyJobResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Confirms a job worker has received the specified job. Only used for partner actions. /// </summary> /// <param name="clientToken">The clientToken portion of the clientId and clientToken pair used to verify that the calling entity is allowed access to the job and its details.</param> /// <param name="jobId">The unique system-generated ID of the job.</param> /// <param name="nonce">A system-generated random number that AWS CodePipeline uses to ensure that the job is being worked on by only one job worker. This number must be returned in the response.</param> /// /// <returns>The response from the AcknowledgeThirdPartyJob service method, as returned by CodePipeline.</returns> /// <exception cref="Amazon.CodePipeline.Model.InvalidClientTokenException"> /// The client token was specified in an invalid format /// </exception> /// <exception cref="Amazon.CodePipeline.Model.InvalidNonceException"> /// The specified nonce was specified in an invalid format. /// </exception> /// <exception cref="Amazon.CodePipeline.Model.JobNotFoundException"> /// The specified job was specified in an invalid format or cannot be found. /// </exception> /// <exception cref="Amazon.CodePipeline.Model.ValidationException"> /// The validation was specified in an invalid format. /// </exception> public AcknowledgeThirdPartyJobResponse AcknowledgeThirdPartyJob(string clientToken, string jobId, string nonce) { var request = new AcknowledgeThirdPartyJobRequest(); request.ClientToken = clientToken; request.JobId = jobId; request.Nonce = nonce; return AcknowledgeThirdPartyJob(request); }
/// <summary> /// Confirms a job worker has received the specified job. Only used for partner actions. /// </summary> /// <param name="clientToken">The clientToken portion of the clientId and clientToken pair used to verify that the calling entity is allowed access to the job and its details.</param> /// <param name="jobId">The unique system-generated ID of the job.</param> /// <param name="nonce">A system-generated random number that AWS CodePipeline uses to ensure that the job is being worked on by only one job worker. This number must be returned in the response.</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 AcknowledgeThirdPartyJob service method, as returned by CodePipeline.</returns> /// <exception cref="Amazon.CodePipeline.Model.InvalidClientTokenException"> /// The client token was specified in an invalid format /// </exception> /// <exception cref="Amazon.CodePipeline.Model.InvalidNonceException"> /// The specified nonce was specified in an invalid format. /// </exception> /// <exception cref="Amazon.CodePipeline.Model.JobNotFoundException"> /// The specified job was specified in an invalid format or cannot be found. /// </exception> /// <exception cref="Amazon.CodePipeline.Model.ValidationException"> /// The validation was specified in an invalid format. /// </exception> public Task<AcknowledgeThirdPartyJobResponse> AcknowledgeThirdPartyJobAsync(string clientToken, string jobId, string nonce, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var request = new AcknowledgeThirdPartyJobRequest(); request.ClientToken = clientToken; request.JobId = jobId; request.Nonce = nonce; return AcknowledgeThirdPartyJobAsync(request, cancellationToken); }
private Amazon.CodePipeline.Model.AcknowledgeThirdPartyJobResponse CallAWSServiceOperation(IAmazonCodePipeline client, Amazon.CodePipeline.Model.AcknowledgeThirdPartyJobRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS CodePipeline", "AcknowledgeThirdPartyJob"); try { #if DESKTOP return(client.AcknowledgeThirdPartyJob(request)); #elif CORECLR return(client.AcknowledgeThirdPartyJobAsync(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 AcknowledgeThirdPartyJob operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the AcknowledgeThirdPartyJob operation on AmazonCodePipelineClient.</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 EndAcknowledgeThirdPartyJob /// operation.</returns> public IAsyncResult BeginAcknowledgeThirdPartyJob(AcknowledgeThirdPartyJobRequest request, AsyncCallback callback, object state) { var marshaller = new AcknowledgeThirdPartyJobRequestMarshaller(); var unmarshaller = AcknowledgeThirdPartyJobResponseUnmarshaller.Instance; return BeginInvoke<AcknowledgeThirdPartyJobRequest>(request, marshaller, unmarshaller, callback, state); }