Container for the parameters to the UpdateJob operation.

You use this operation to change the parameters specified in the original manifest file by supplying a new manifest file. The manifest file attached to this request replaces the original manifest file. You can only use the operation after a CreateJob request but before the data transfer starts and you can only use it on jobs you own.

Inheritance: Amazon.Runtime.AmazonWebServiceRequest
コード例 #1
0
        public object Execute(ExecutorContext context)
        {
            var cmdletContext = context as CmdletContext;
            // create request
            var request = new Amazon.ImportExport.Model.UpdateJobRequest();

            if (cmdletContext.APIVersion != null)
            {
                request.APIVersion = cmdletContext.APIVersion;
            }
            if (cmdletContext.JobId != null)
            {
                request.JobId = cmdletContext.JobId;
            }
            if (cmdletContext.JobType != null)
            {
                request.JobType = cmdletContext.JobType;
            }
            if (cmdletContext.Manifest != null)
            {
                request.Manifest = cmdletContext.Manifest;
            }
            if (cmdletContext.ValidateOnly != null)
            {
                request.ValidateOnly = cmdletContext.ValidateOnly.Value;
            }

            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);
        }
コード例 #2
0
        /// <summary>
        /// Initiates the asynchronous execution of the UpdateJob operation.
        /// <seealso cref="Amazon.ImportExport.IAmazonImportExport.UpdateJob"/>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the UpdateJob 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<UpdateJobResponse> UpdateJobAsync(UpdateJobRequest request, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new UpdateJobRequestMarshaller();
            var unmarshaller = UpdateJobResponseUnmarshaller.GetInstance();
            return Invoke<IRequest, UpdateJobRequest, UpdateJobResponse>(request, marshaller, unmarshaller, signer, cancellationToken);
        }
コード例 #3
0
        /// <summary>
        /// <para> You use this operation to change the parameters specified in the original manifest file by supplying a new manifest file. The
        /// manifest file attached to this request replaces the original manifest file. You can only use the operation after a CreateJob request but
        /// before the data transfer starts and you can only use it on jobs you own. </para>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the UpdateJob service method on AmazonImportExport.</param>
        /// 
        /// <returns>The response from the UpdateJob service method, as returned by AmazonImportExport.</returns>
        /// 
        /// <exception cref="T:Amazon.ImportExport.Model.MalformedManifestException" />
        /// <exception cref="T:Amazon.ImportExport.Model.BucketPermissionException" />
        /// <exception cref="T:Amazon.ImportExport.Model.InvalidAddressException" />
        /// <exception cref="T:Amazon.ImportExport.Model.InvalidParameterException" />
        /// <exception cref="T:Amazon.ImportExport.Model.MultipleRegionsException" />
        /// <exception cref="T:Amazon.ImportExport.Model.MissingParameterException" />
        /// <exception cref="T:Amazon.ImportExport.Model.InvalidFileSystemException" />
        /// <exception cref="T:Amazon.ImportExport.Model.CanceledJobIdException" />
        /// <exception cref="T:Amazon.ImportExport.Model.MissingCustomsException" />
        /// <exception cref="T:Amazon.ImportExport.Model.NoSuchBucketException" />
        /// <exception cref="T:Amazon.ImportExport.Model.ExpiredJobIdException" />
        /// <exception cref="T:Amazon.ImportExport.Model.InvalidAccessKeyIdException" />
        /// <exception cref="T:Amazon.ImportExport.Model.InvalidCustomsException" />
        /// <exception cref="T:Amazon.ImportExport.Model.InvalidManifestFieldException" />
        /// <exception cref="T:Amazon.ImportExport.Model.MissingManifestFieldException" />
        /// <exception cref="T:Amazon.ImportExport.Model.InvalidJobIdException" />
		public UpdateJobResponse UpdateJob(UpdateJobRequest request)
        {
            var task = UpdateJobAsync(request);
            try
            {
                return task.Result;
            }
            catch(AggregateException e)
            {
                ExceptionDispatchInfo.Capture(e.InnerException).Throw();
                return null;
            }
        }
コード例 #4
0
 IAsyncResult invokeUpdateJob(UpdateJobRequest updateJobRequest, AsyncCallback callback, object state, bool synchronized)
 {
     IRequest irequest = new UpdateJobRequestMarshaller().Marshall(updateJobRequest);
     var unmarshaller = UpdateJobResponseUnmarshaller.GetInstance();
     AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller);
     Invoke(result);
     return result;
 }
コード例 #5
0
 /// <summary>
 /// <para> You use this operation to change the parameters specified in the original manifest file by supplying a new manifest file. The
 /// manifest file attached to this request replaces the original manifest file. You can only use the operation after a CreateJob request but
 /// before the data transfer starts and you can only use it on jobs you own. </para>
 /// </summary>
 /// 
 /// <param name="updateJobRequest">Container for the necessary parameters to execute the UpdateJob service method on AmazonImportExport.</param>
 /// 
 /// <returns>The response from the UpdateJob service method, as returned by AmazonImportExport.</returns>
 /// 
 /// <exception cref="MalformedManifestException"/>
 /// <exception cref="BucketPermissionException"/>
 /// <exception cref="InvalidAddressException"/>
 /// <exception cref="InvalidParameterException"/>
 /// <exception cref="UnableToUpdateJobIdException"/>
 /// <exception cref="MultipleRegionsException"/>
 /// <exception cref="MissingParameterException"/>
 /// <exception cref="InvalidFileSystemException"/>
 /// <exception cref="CanceledJobIdException"/>
 /// <exception cref="MissingCustomsException"/>
 /// <exception cref="NoSuchBucketException"/>
 /// <exception cref="ExpiredJobIdException"/>
 /// <exception cref="InvalidAccessKeyIdException"/>
 /// <exception cref="InvalidCustomsException"/>
 /// <exception cref="InvalidManifestFieldException"/>
 /// <exception cref="MissingManifestFieldException"/>
 /// <exception cref="InvalidJobIdException"/>
 public UpdateJobResponse UpdateJob(UpdateJobRequest updateJobRequest)
 {
     IAsyncResult asyncResult = invokeUpdateJob(updateJobRequest, null, null, true);
     return EndUpdateJob(asyncResult);
 }
コード例 #6
0
 /// <summary>
 /// Initiates the asynchronous execution of the UpdateJob operation.
 /// <seealso cref="Amazon.ImportExport.AmazonImportExport.UpdateJob"/>
 /// </summary>
 /// 
 /// <param name="updateJobRequest">Container for the necessary parameters to execute the UpdateJob operation on AmazonImportExport.</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 EndUpdateJob
 ///         operation.</returns>
 public IAsyncResult BeginUpdateJob(UpdateJobRequest updateJobRequest, AsyncCallback callback, object state)
 {
     return invokeUpdateJob(updateJobRequest, callback, state, false);
 }
コード例 #7
0
        /// <summary>
        /// Initiates the asynchronous execution of the UpdateJob operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the UpdateJob 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<UpdateJobResponse> UpdateJobAsync(UpdateJobRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new UpdateJobRequestMarshaller();
            var unmarshaller = UpdateJobResponseUnmarshaller.Instance;

            return InvokeAsync<UpdateJobRequest,UpdateJobResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }
コード例 #8
0
        internal UpdateJobResponse UpdateJob(UpdateJobRequest request)
        {
            var marshaller = new UpdateJobRequestMarshaller();
            var unmarshaller = UpdateJobResponseUnmarshaller.Instance;

            return Invoke<UpdateJobRequest,UpdateJobResponse>(request, marshaller, unmarshaller);
        }
コード例 #9
0
        /// <summary>
        /// Initiates the asynchronous execution of the UpdateJob operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the UpdateJob operation on AmazonImportExportClient.</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 EndUpdateJob
        ///         operation.</returns>
        public IAsyncResult BeginUpdateJob(UpdateJobRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new UpdateJobRequestMarshaller();
            var unmarshaller = UpdateJobResponseUnmarshaller.Instance;

            return BeginInvoke<UpdateJobRequest>(request, marshaller, unmarshaller,
                callback, state);
        }
コード例 #10
0
 /// <summary>
 /// <para> You use this operation to change the parameters specified in
 /// the original manifest file by supplying a new manifest file. The
 /// manifest file attached to this request replaces the original manifest
 /// file. You can only use the operation after a CreateJob request but
 /// before the data transfer starts and you can only use it on jobs you
 /// own. </para>
 /// </summary>
 /// 
 /// <param name="updateJobRequest">Container for the necessary parameters
 ///           to execute the UpdateJob service method on AmazonImportExport.</param>
 /// 
 /// <returns>The response from the UpdateJob service method, as returned
 ///         by AmazonImportExport.</returns>
 /// 
 /// <exception cref="MalformedManifestException"/>
 /// <exception cref="BucketPermissionException"/>
 /// <exception cref="InvalidAddressException"/>
 /// <exception cref="InvalidParameterException"/>
 /// <exception cref="UnableToUpdateJobIdException"/>
 /// <exception cref="MultipleRegionsException"/>
 /// <exception cref="MissingParameterException"/>
 /// <exception cref="InvalidFileSystemException"/>
 /// <exception cref="CanceledJobIdException"/>
 /// <exception cref="MissingCustomsException"/>
 /// <exception cref="NoSuchBucketException"/>
 /// <exception cref="ExpiredJobIdException"/>
 /// <exception cref="InvalidAccessKeyIdException"/>
 /// <exception cref="InvalidCustomsException"/>
 /// <exception cref="InvalidManifestFieldException"/>
 /// <exception cref="MissingManifestFieldException"/>
 /// <exception cref="InvalidJobIdException"/>
 public UpdateJobResponse UpdateJob(UpdateJobRequest updateJobRequest)
 {
     IRequest<UpdateJobRequest> request = new UpdateJobRequestMarshaller().Marshall(updateJobRequest);
     UpdateJobResponse response = Invoke<UpdateJobRequest, UpdateJobResponse> (request, this.signer, UpdateJobResponseUnmarshaller.GetInstance());
     return response;
 }
コード例 #11
0
        /// <summary>
        /// <para> You use this operation to change the parameters specified in the original manifest file by supplying a new manifest file. The
        /// manifest file attached to this request replaces the original manifest file. You can only use the operation after a CreateJob request but
        /// before the data transfer starts and you can only use it on jobs you own. </para>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the UpdateJob service method on AmazonImportExport.</param>
        /// 
        /// <returns>The response from the UpdateJob service method, as returned by AmazonImportExport.</returns>
        /// 
        /// <exception cref="T:Amazon.ImportExport.Model.MalformedManifestException" />
        /// <exception cref="T:Amazon.ImportExport.Model.BucketPermissionException" />
        /// <exception cref="T:Amazon.ImportExport.Model.InvalidAddressException" />
        /// <exception cref="T:Amazon.ImportExport.Model.InvalidParameterException" />
        /// <exception cref="T:Amazon.ImportExport.Model.MultipleRegionsException" />
        /// <exception cref="T:Amazon.ImportExport.Model.MissingParameterException" />
        /// <exception cref="T:Amazon.ImportExport.Model.InvalidFileSystemException" />
        /// <exception cref="T:Amazon.ImportExport.Model.CanceledJobIdException" />
        /// <exception cref="T:Amazon.ImportExport.Model.MissingCustomsException" />
        /// <exception cref="T:Amazon.ImportExport.Model.NoSuchBucketException" />
        /// <exception cref="T:Amazon.ImportExport.Model.ExpiredJobIdException" />
        /// <exception cref="T:Amazon.ImportExport.Model.InvalidAccessKeyIdException" />
        /// <exception cref="T:Amazon.ImportExport.Model.InvalidCustomsException" />
        /// <exception cref="T:Amazon.ImportExport.Model.InvalidManifestFieldException" />
        /// <exception cref="T:Amazon.ImportExport.Model.MissingManifestFieldException" />
        /// <exception cref="T:Amazon.ImportExport.Model.InvalidJobIdException" />
		public UpdateJobResponse UpdateJob(UpdateJobRequest request)
        {
            var task = UpdateJobAsync(request);
            try
            {
                return task.Result;
            }
            catch(AggregateException e)
            {
                throw e.InnerException;
            }
        }
コード例 #12
0
        /// <summary>
        /// Initiates the asynchronous execution of the UpdateJob operation.
        /// <seealso cref="Amazon.ImportExport.IAmazonImportExport.UpdateJob"/>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the UpdateJob 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<UpdateJobResponse> UpdateJobAsync(UpdateJobRequest request, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new UpdateJobRequestMarshaller();
            var unmarshaller = UpdateJobResponseUnmarshaller.GetInstance();
            var response = await Invoke<IRequest, UpdateJobRequest, UpdateJobResponse>(request, marshaller, unmarshaller, signer, cancellationToken)
                .ConfigureAwait(continueOnCapturedContext: false);
            return response;
        }
コード例 #13
0
 private Amazon.ImportExport.Model.UpdateJobResponse CallAWSServiceOperation(IAmazonImportExport client, Amazon.ImportExport.Model.UpdateJobRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Import/Export", "UpdateJob");
     try
     {
         #if DESKTOP
         return(client.UpdateJob(request));
         #elif CORECLR
         return(client.UpdateJobAsync(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;
     }
 }