Container for the parameters to the CreateJob operation.

This operation initiates the process of scheduling an upload or download of your data. You include in the request a manifest that describes the data transfer specifics. The response to the request includes a job ID, which you can use in other operations, a signature that you use to identify your storage device, and the address where you should ship your storage device.

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

            if (cmdletContext.APIVersion != null)
            {
                request.APIVersion = cmdletContext.APIVersion;
            }
            if (cmdletContext.JobType != null)
            {
                request.JobType = cmdletContext.JobType;
            }
            if (cmdletContext.Manifest != null)
            {
                request.Manifest = cmdletContext.Manifest;
            }
            if (cmdletContext.ManifestAddendum != null)
            {
                request.ManifestAddendum = cmdletContext.ManifestAddendum;
            }
            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 CreateJob operation.
        /// <seealso cref="Amazon.ImportExport.IAmazonImportExport.CreateJob"/>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the CreateJob 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<CreateJobResponse> CreateJobAsync(CreateJobRequest request, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new CreateJobRequestMarshaller();
            var unmarshaller = CreateJobResponseUnmarshaller.GetInstance();
            return Invoke<IRequest, CreateJobRequest, CreateJobResponse>(request, marshaller, unmarshaller, signer, cancellationToken);
        }
コード例 #3
0
        /// <summary>
        /// <para> This operation initiates the process of scheduling an upload or download of your data. You include in the request a manifest that
        /// describes the data transfer specifics. The response to the request includes a job ID, which you can use in other operations, a signature
        /// that you use to identify your storage device, and the address where you should ship your storage device. </para>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the CreateJob service method on AmazonImportExport.</param>
        /// 
        /// <returns>The response from the CreateJob service method, as returned by AmazonImportExport.</returns>
        /// 
        /// <exception cref="T:Amazon.ImportExport.Model.MalformedManifestException" />
        /// <exception cref="T:Amazon.ImportExport.Model.InvalidAddressException" />
        /// <exception cref="T:Amazon.ImportExport.Model.BucketPermissionException" />
        /// <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.MissingCustomsException" />
        /// <exception cref="T:Amazon.ImportExport.Model.NoSuchBucketException" />
        /// <exception cref="T:Amazon.ImportExport.Model.InvalidAccessKeyIdException" />
        /// <exception cref="T:Amazon.ImportExport.Model.InvalidManifestFieldException" />
        /// <exception cref="T:Amazon.ImportExport.Model.InvalidCustomsException" />
        /// <exception cref="T:Amazon.ImportExport.Model.MissingManifestFieldException" />
		public CreateJobResponse CreateJob(CreateJobRequest request)
        {
            var task = CreateJobAsync(request);
            try
            {
                return task.Result;
            }
            catch(AggregateException e)
            {
                ExceptionDispatchInfo.Capture(e.InnerException).Throw();
                return null;
            }
        }
コード例 #4
0
 IAsyncResult invokeCreateJob(CreateJobRequest createJobRequest, AsyncCallback callback, object state, bool synchronized)
 {
     IRequest irequest = new CreateJobRequestMarshaller().Marshall(createJobRequest);
     var unmarshaller = CreateJobResponseUnmarshaller.GetInstance();
     AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller);
     Invoke(result);
     return result;
 }
コード例 #5
0
 /// <summary>
 /// <para> This operation initiates the process of scheduling an upload or download of your data. You include in the request a manifest that
 /// describes the data transfer specifics. The response to the request includes a job ID, which you can use in other operations, a signature
 /// that you use to identify your storage device, and the address where you should ship your storage device. </para>
 /// </summary>
 /// 
 /// <param name="createJobRequest">Container for the necessary parameters to execute the CreateJob service method on AmazonImportExport.</param>
 /// 
 /// <returns>The response from the CreateJob service method, as returned by AmazonImportExport.</returns>
 /// 
 /// <exception cref="MalformedManifestException"/>
 /// <exception cref="InvalidAddressException"/>
 /// <exception cref="BucketPermissionException"/>
 /// <exception cref="InvalidParameterException"/>
 /// <exception cref="MultipleRegionsException"/>
 /// <exception cref="MissingParameterException"/>
 /// <exception cref="InvalidFileSystemException"/>
 /// <exception cref="MissingCustomsException"/>
 /// <exception cref="NoSuchBucketException"/>
 /// <exception cref="InvalidAccessKeyIdException"/>
 /// <exception cref="InvalidManifestFieldException"/>
 /// <exception cref="InvalidCustomsException"/>
 /// <exception cref="MissingManifestFieldException"/>
 /// <exception cref="CreateJobQuotaExceededException"/>
 /// <exception cref="InvalidJobIdException"/>
 public CreateJobResponse CreateJob(CreateJobRequest createJobRequest)
 {
     IAsyncResult asyncResult = invokeCreateJob(createJobRequest, null, null, true);
     return EndCreateJob(asyncResult);
 }
コード例 #6
0
 /// <summary>
 /// Initiates the asynchronous execution of the CreateJob operation.
 /// <seealso cref="Amazon.ImportExport.AmazonImportExport.CreateJob"/>
 /// </summary>
 /// 
 /// <param name="createJobRequest">Container for the necessary parameters to execute the CreateJob 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 EndCreateJob
 ///         operation.</returns>
 public IAsyncResult BeginCreateJob(CreateJobRequest createJobRequest, AsyncCallback callback, object state)
 {
     return invokeCreateJob(createJobRequest, callback, state, false);
 }
コード例 #7
0
        /// <summary>
        /// Initiates the asynchronous execution of the CreateJob operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the CreateJob 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<CreateJobResponse> CreateJobAsync(CreateJobRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new CreateJobRequestMarshaller();
            var unmarshaller = CreateJobResponseUnmarshaller.Instance;

            return InvokeAsync<CreateJobRequest,CreateJobResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }
コード例 #8
0
        internal CreateJobResponse CreateJob(CreateJobRequest request)
        {
            var marshaller = new CreateJobRequestMarshaller();
            var unmarshaller = CreateJobResponseUnmarshaller.Instance;

            return Invoke<CreateJobRequest,CreateJobResponse>(request, marshaller, unmarshaller);
        }
コード例 #9
0
        /// <summary>
        /// Initiates the asynchronous execution of the CreateJob operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the CreateJob 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 EndCreateJob
        ///         operation.</returns>
        public IAsyncResult BeginCreateJob(CreateJobRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new CreateJobRequestMarshaller();
            var unmarshaller = CreateJobResponseUnmarshaller.Instance;

            return BeginInvoke<CreateJobRequest>(request, marshaller, unmarshaller,
                callback, state);
        }
コード例 #10
0
 /// <summary>
 /// <para> This operation initiates the process of scheduling an upload or
 /// download of your data. You include in the request a manifest that
 /// describes the data transfer specifics. The response to the request
 /// includes a job ID, which you can use in other operations, a signature
 /// that you use to identify your storage device, and the address where
 /// you should ship your storage device. </para>
 /// </summary>
 /// 
 /// <param name="createJobRequest">Container for the necessary parameters
 ///           to execute the CreateJob service method on AmazonImportExport.</param>
 /// 
 /// <returns>The response from the CreateJob service method, as returned
 ///         by AmazonImportExport.</returns>
 /// 
 /// <exception cref="MalformedManifestException"/>
 /// <exception cref="InvalidAddressException"/>
 /// <exception cref="BucketPermissionException"/>
 /// <exception cref="InvalidParameterException"/>
 /// <exception cref="MultipleRegionsException"/>
 /// <exception cref="MissingParameterException"/>
 /// <exception cref="InvalidFileSystemException"/>
 /// <exception cref="MissingCustomsException"/>
 /// <exception cref="NoSuchBucketException"/>
 /// <exception cref="InvalidAccessKeyIdException"/>
 /// <exception cref="InvalidManifestFieldException"/>
 /// <exception cref="InvalidCustomsException"/>
 /// <exception cref="MissingManifestFieldException"/>
 /// <exception cref="CreateJobQuotaExceededException"/>
 public CreateJobResponse CreateJob(CreateJobRequest createJobRequest)
 {
     IRequest<CreateJobRequest> request = new CreateJobRequestMarshaller().Marshall(createJobRequest);
     CreateJobResponse response = Invoke<CreateJobRequest, CreateJobResponse> (request, this.signer, CreateJobResponseUnmarshaller.GetInstance());
     return response;
 }
コード例 #11
0
        /// <summary>
        /// <para> This operation initiates the process of scheduling an upload or download of your data. You include in the request a manifest that
        /// describes the data transfer specifics. The response to the request includes a job ID, which you can use in other operations, a signature
        /// that you use to identify your storage device, and the address where you should ship your storage device. </para>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the CreateJob service method on AmazonImportExport.</param>
        /// 
        /// <returns>The response from the CreateJob service method, as returned by AmazonImportExport.</returns>
        /// 
        /// <exception cref="T:Amazon.ImportExport.Model.MalformedManifestException" />
        /// <exception cref="T:Amazon.ImportExport.Model.InvalidAddressException" />
        /// <exception cref="T:Amazon.ImportExport.Model.BucketPermissionException" />
        /// <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.MissingCustomsException" />
        /// <exception cref="T:Amazon.ImportExport.Model.NoSuchBucketException" />
        /// <exception cref="T:Amazon.ImportExport.Model.InvalidAccessKeyIdException" />
        /// <exception cref="T:Amazon.ImportExport.Model.InvalidManifestFieldException" />
        /// <exception cref="T:Amazon.ImportExport.Model.InvalidCustomsException" />
        /// <exception cref="T:Amazon.ImportExport.Model.MissingManifestFieldException" />
		public CreateJobResponse CreateJob(CreateJobRequest request)
        {
            var task = CreateJobAsync(request);
            try
            {
                return task.Result;
            }
            catch(AggregateException e)
            {
                throw e.InnerException;
            }
        }
コード例 #12
0
        /// <summary>
        /// Initiates the asynchronous execution of the CreateJob operation.
        /// <seealso cref="Amazon.ImportExport.IAmazonImportExport.CreateJob"/>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the CreateJob 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<CreateJobResponse> CreateJobAsync(CreateJobRequest request, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new CreateJobRequestMarshaller();
            var unmarshaller = CreateJobResponseUnmarshaller.GetInstance();
            var response = await Invoke<IRequest, CreateJobRequest, CreateJobResponse>(request, marshaller, unmarshaller, signer, cancellationToken)
                .ConfigureAwait(continueOnCapturedContext: false);
            return response;
        }
コード例 #13
0
 private Amazon.ImportExport.Model.CreateJobResponse CallAWSServiceOperation(IAmazonImportExport client, Amazon.ImportExport.Model.CreateJobRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Import/Export", "CreateJob");
     try
     {
         #if DESKTOP
         return(client.CreateJob(request));
         #elif CORECLR
         return(client.CreateJobAsync(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;
     }
 }