/// <summary>
        /// Represents the failure of a third party job as returned to the pipeline by a job worker.
        /// Only used for partner actions.
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the PutThirdPartyJobFailureResult service method.</param>
        /// 
        /// <returns>The response from the PutThirdPartyJobFailureResult 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.InvalidJobStateException">
        /// The specified job state 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 PutThirdPartyJobFailureResultResponse PutThirdPartyJobFailureResult(PutThirdPartyJobFailureResultRequest request)
        {
            var marshaller = new PutThirdPartyJobFailureResultRequestMarshaller();
            var unmarshaller = PutThirdPartyJobFailureResultResponseUnmarshaller.Instance;

            return Invoke<PutThirdPartyJobFailureResultRequest,PutThirdPartyJobFailureResultResponse>(request, marshaller, unmarshaller);
        }
        /// <summary>
        /// Initiates the asynchronous execution of the PutThirdPartyJobFailureResult operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the PutThirdPartyJobFailureResult 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<PutThirdPartyJobFailureResultResponse> PutThirdPartyJobFailureResultAsync(PutThirdPartyJobFailureResultRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new PutThirdPartyJobFailureResultRequestMarshaller();
            var unmarshaller = PutThirdPartyJobFailureResultResponseUnmarshaller.Instance;

            return InvokeAsync<PutThirdPartyJobFailureResultRequest,PutThirdPartyJobFailureResultResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }
 /// <summary>
 /// Represents the failure of a third party job as returned to the pipeline by a job worker.
 /// Only used for partner actions.
 /// </summary>
 /// <param name="jobId">The ID of the job that failed. This is the same ID returned from PollForThirdPartyJobs.</param>
 /// <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="failureDetails">A property of PutThirdPartyJobFailureResultRequest used to execute the PutThirdPartyJobFailureResult service method.</param>
 /// 
 /// <returns>The response from the PutThirdPartyJobFailureResult 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.InvalidJobStateException">
 /// The specified job state 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 PutThirdPartyJobFailureResultResponse PutThirdPartyJobFailureResult(string jobId, string clientToken, FailureDetails failureDetails)
 {
     var request = new PutThirdPartyJobFailureResultRequest();
     request.JobId = jobId;
     request.ClientToken = clientToken;
     request.FailureDetails = failureDetails;
     return PutThirdPartyJobFailureResult(request);
 }
Ejemplo n.º 4
0
 private Amazon.CodePipeline.Model.PutThirdPartyJobFailureResultResponse CallAWSServiceOperation(IAmazonCodePipeline client, Amazon.CodePipeline.Model.PutThirdPartyJobFailureResultRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS CodePipeline", "PutThirdPartyJobFailureResult");
     try
     {
         #if DESKTOP
         return(client.PutThirdPartyJobFailureResult(request));
         #elif CORECLR
         return(client.PutThirdPartyJobFailureResultAsync(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;
     }
 }
Ejemplo n.º 5
0
        public object Execute(ExecutorContext context)
        {
            var cmdletContext = context as CmdletContext;
            // create request
            var request = new Amazon.CodePipeline.Model.PutThirdPartyJobFailureResultRequest();

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

            // populate FailureDetails
            var requestFailureDetailsIsNull = true;

            request.FailureDetails = new Amazon.CodePipeline.Model.FailureDetails();
            System.String requestFailureDetails_failureDetails_ExternalExecutionId = null;
            if (cmdletContext.FailureDetails_ExternalExecutionId != null)
            {
                requestFailureDetails_failureDetails_ExternalExecutionId = cmdletContext.FailureDetails_ExternalExecutionId;
            }
            if (requestFailureDetails_failureDetails_ExternalExecutionId != null)
            {
                request.FailureDetails.ExternalExecutionId = requestFailureDetails_failureDetails_ExternalExecutionId;
                requestFailureDetailsIsNull = false;
            }
            System.String requestFailureDetails_failureDetails_Message = null;
            if (cmdletContext.FailureDetails_Message != null)
            {
                requestFailureDetails_failureDetails_Message = cmdletContext.FailureDetails_Message;
            }
            if (requestFailureDetails_failureDetails_Message != null)
            {
                request.FailureDetails.Message = requestFailureDetails_failureDetails_Message;
                requestFailureDetailsIsNull    = false;
            }
            Amazon.CodePipeline.FailureType requestFailureDetails_failureDetails_Type = null;
            if (cmdletContext.FailureDetails_Type != null)
            {
                requestFailureDetails_failureDetails_Type = cmdletContext.FailureDetails_Type;
            }
            if (requestFailureDetails_failureDetails_Type != null)
            {
                request.FailureDetails.Type = requestFailureDetails_failureDetails_Type;
                requestFailureDetailsIsNull = false;
            }
            // determine if request.FailureDetails should be set to null
            if (requestFailureDetailsIsNull)
            {
                request.FailureDetails = null;
            }
            if (cmdletContext.JobId != null)
            {
                request.JobId = cmdletContext.JobId;
            }

            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);
        }
Ejemplo n.º 6
0
 /// <summary>
 /// Represents the failure of a third party job as returned to the pipeline by a job worker.
 /// Only used for partner actions.
 /// </summary>
 /// <param name="jobId">The ID of the job that failed. This is the same ID returned from PollForThirdPartyJobs.</param>
 /// <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="failureDetails">A property of PutThirdPartyJobFailureResultRequest used to execute the PutThirdPartyJobFailureResult service method.</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 PutThirdPartyJobFailureResult 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.InvalidJobStateException">
 /// The specified job state 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<PutThirdPartyJobFailureResultResponse> PutThirdPartyJobFailureResultAsync(string jobId, string clientToken, FailureDetails failureDetails, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
 {
     var request = new PutThirdPartyJobFailureResultRequest();
     request.JobId = jobId;
     request.ClientToken = clientToken;
     request.FailureDetails = failureDetails;
     return PutThirdPartyJobFailureResultAsync(request, cancellationToken);
 }
        /// <summary>
        /// Initiates the asynchronous execution of the PutThirdPartyJobFailureResult operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the PutThirdPartyJobFailureResult 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 EndPutThirdPartyJobFailureResult
        ///         operation.</returns>
        public IAsyncResult BeginPutThirdPartyJobFailureResult(PutThirdPartyJobFailureResultRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new PutThirdPartyJobFailureResultRequestMarshaller();
            var unmarshaller = PutThirdPartyJobFailureResultResponseUnmarshaller.Instance;

            return BeginInvoke<PutThirdPartyJobFailureResultRequest>(request, marshaller, unmarshaller,
                callback, state);
        }