示例#1
0
        public void GetJobManifestMarshallTest()
        {
            var request    = InstantiateClassGenerator.Execute <GetJobManifestRequest>();
            var marshaller = new GetJobManifestRequestMarshaller();

            var internalRequest = marshaller.Marshall(request);
            var jsonRequest     = UTF8Encoding.UTF8.GetString(internalRequest.Content);

            Comparer.CompareObjectToJson <GetJobManifestRequest>(request, jsonRequest);

            var webResponse = new WebResponseData
            {
                Headers =
                {
                    { "x-amzn-RequestId", Guid.NewGuid().ToString() },
                    { "x-amz-crc32",      "0"                       }
                }
            };
            var jsonResponse = new JsonSampleGenerator(service_model, service_model.FindOperation("GetJobManifest").ResponseStructure).Execute();

            webResponse.Headers.Add("Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString());
            UnmarshallerContext context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), false, webResponse);
            var response = GetJobManifestResponseUnmarshaller.Instance.Unmarshall(context)
                           as GetJobManifestResponse;

            InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);
        }
示例#2
0
        /// <summary>
        /// Returns a link to an Amazon S3 presigned URL for the manifest file associated with
        /// the specified <code>JobId</code> value. You can access the manifest file for up to
        /// 60 minutes after this request has been made. To access the manifest file after 60
        /// minutes have passed, you'll have to make another call to the <code>GetJobManifest</code>
        /// action.
        ///
        ///
        /// <para>
        /// The manifest is an encrypted file that you can download after your job enters the
        /// <code>WithCustomer</code> status. The manifest is decrypted by using the <code>UnlockCode</code>
        /// code value, when you pass both values to the Snowball through the Snowball client
        /// when the client is started for the first time.
        /// </para>
        ///
        /// <para>
        /// As a best practice, we recommend that you don't save a copy of an <code>UnlockCode</code>
        /// value in the same location as the manifest file for that job. Saving these separately
        /// helps prevent unauthorized parties from gaining access to the Snowball associated
        /// with that job.
        /// </para>
        ///
        /// <para>
        /// Note that the credentials of a given job, including its manifest file and unlock code,
        /// expire 90 days after the job is created.
        /// </para>
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the GetJobManifest service method.</param>
        ///
        /// <returns>The response from the GetJobManifest service method, as returned by Snowball.</returns>
        /// <exception cref="Amazon.Snowball.Model.InvalidJobStateException">
        /// The action can't be performed because the job's current state doesn't allow that action
        /// to be performed.
        /// </exception>
        /// <exception cref="Amazon.Snowball.Model.InvalidResourceException">
        /// The specified resource can't be found. Check the information you provided in your
        /// last request, and try again.
        /// </exception>
        public GetJobManifestResponse GetJobManifest(GetJobManifestRequest request)
        {
            var marshaller   = new GetJobManifestRequestMarshaller();
            var unmarshaller = GetJobManifestResponseUnmarshaller.Instance;

            return(Invoke <GetJobManifestRequest, GetJobManifestResponse>(request, marshaller, unmarshaller));
        }
        internal virtual GetJobManifestResponse GetJobManifest(GetJobManifestRequest request)
        {
            var marshaller = new GetJobManifestRequestMarshaller();
            var unmarshaller = GetJobManifestResponseUnmarshaller.Instance;

            return Invoke<GetJobManifestRequest,GetJobManifestResponse>(request, marshaller, unmarshaller);
        }
示例#4
0
        /// <summary>
        /// Initiates the asynchronous execution of the GetJobManifest operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the GetJobManifest operation on AmazonSnowballClient.</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 EndGetJobManifest
        ///         operation.</returns>
        public IAsyncResult BeginGetJobManifest(GetJobManifestRequest request, AsyncCallback callback, object state)
        {
            var marshaller   = new GetJobManifestRequestMarshaller();
            var unmarshaller = GetJobManifestResponseUnmarshaller.Instance;

            return(BeginInvoke <GetJobManifestRequest>(request, marshaller, unmarshaller,
                                                       callback, state));
        }
        /// <summary>
        /// Initiates the asynchronous execution of the GetJobManifest operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the GetJobManifest 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 <GetJobManifestResponse> GetJobManifestAsync(GetJobManifestRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new GetJobManifestRequestMarshaller();
            var unmarshaller = GetJobManifestResponseUnmarshaller.Instance;

            return(InvokeAsync <GetJobManifestRequest, GetJobManifestResponse>(request, marshaller,
                                                                               unmarshaller, cancellationToken));
        }
示例#6
0
        /// <summary>
        /// Initiates the asynchronous execution of the GetJobManifest operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the GetJobManifest 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<GetJobManifestResponse> GetJobManifestAsync(GetJobManifestRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new GetJobManifestRequestMarshaller();
            var unmarshaller = GetJobManifestResponseUnmarshaller.Instance;

            return InvokeAsync<GetJobManifestRequest,GetJobManifestResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }
示例#7
0
        internal GetJobManifestResponse GetJobManifest(GetJobManifestRequest request)
        {
            var marshaller = new GetJobManifestRequestMarshaller();
            var unmarshaller = GetJobManifestResponseUnmarshaller.Instance;

            return Invoke<GetJobManifestRequest,GetJobManifestResponse>(request, marshaller, unmarshaller);
        }
示例#8
0
        /// <summary>
        /// Initiates the asynchronous execution of the GetJobManifest operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the GetJobManifest operation on AmazonSnowballClient.</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 EndGetJobManifest
        ///         operation.</returns>
        public IAsyncResult BeginGetJobManifest(GetJobManifestRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new GetJobManifestRequestMarshaller();
            var unmarshaller = GetJobManifestResponseUnmarshaller.Instance;

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