1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`GetJobOutput`](crate::operation::get_job_output::builders::GetJobOutputFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`account_id(impl ::std::convert::Into<String>)`](crate::operation::get_job_output::builders::GetJobOutputFluentBuilder::account_id) / [`set_account_id(Option<String>)`](crate::operation::get_job_output::builders::GetJobOutputFluentBuilder::set_account_id): <p>The <code>AccountId</code> value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single '<code>-</code>' (hyphen), in which case Amazon S3 Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens ('-') in the ID.</p>
    ///   - [`vault_name(impl ::std::convert::Into<String>)`](crate::operation::get_job_output::builders::GetJobOutputFluentBuilder::vault_name) / [`set_vault_name(Option<String>)`](crate::operation::get_job_output::builders::GetJobOutputFluentBuilder::set_vault_name): <p>The name of the vault.</p>
    ///   - [`job_id(impl ::std::convert::Into<String>)`](crate::operation::get_job_output::builders::GetJobOutputFluentBuilder::job_id) / [`set_job_id(Option<String>)`](crate::operation::get_job_output::builders::GetJobOutputFluentBuilder::set_job_id): <p>The job ID whose data is downloaded.</p>
    ///   - [`range(impl ::std::convert::Into<String>)`](crate::operation::get_job_output::builders::GetJobOutputFluentBuilder::range) / [`set_range(Option<String>)`](crate::operation::get_job_output::builders::GetJobOutputFluentBuilder::set_range): <p>The range of bytes to retrieve from the output. For example, if you want to download the first 1,048,576 bytes, specify the range as <code>bytes=0-1048575</code>. By default, this operation downloads the entire output.</p>  <p>If the job output is large, then you can use a range to retrieve a portion of the output. This allows you to download the entire output in smaller chunks of bytes. For example, suppose you have 1 GB of job output you want to download and you decide to download 128 MB chunks of data at a time, which is a total of eight Get Job Output requests. You use the following process to download the job output:</p>  <ol>   <li> <p>Download a 128 MB chunk of output by specifying the appropriate byte range. Verify that all 128 MB of data was received.</p> </li>   <li> <p>Along with the data, the response includes a SHA256 tree hash of the payload. You compute the checksum of the payload on the client and compare it with the checksum you received in the response to ensure you received all the expected data.</p> </li>   <li> <p>Repeat steps 1 and 2 for all the eight 128 MB chunks of output data, each time specifying the appropriate byte range.</p> </li>   <li> <p>After downloading all the parts of the job output, you have a list of eight checksum values. Compute the tree hash of these values to find the checksum of the entire output. Using the <code>DescribeJob</code> API, obtain job information of the job that provided you the output. The response includes the checksum of the entire archive stored in Amazon S3 Glacier. You compare this value with the checksum you computed to ensure you have downloaded the entire archive content with no errors.</p> <p></p> </li>  </ol>
    /// - On success, responds with [`GetJobOutputOutput`](crate::operation::get_job_output::GetJobOutputOutput) with field(s):
    ///   - [`body(ByteStream)`](crate::operation::get_job_output::GetJobOutputOutput::body): <p>The job data, either archive data or inventory data.</p>
    ///   - [`checksum(Option<String>)`](crate::operation::get_job_output::GetJobOutputOutput::checksum): <p>The checksum of the data in the response. This header is returned only when retrieving the output for an archive retrieval job. Furthermore, this header appears only under the following conditions:</p>  <ul>   <li> <p>You get the entire range of the archive.</p> </li>   <li> <p>You request a range to return of the archive that starts and ends on a multiple of 1 MB. For example, if you have an 3.1 MB archive and you specify a range to return that starts at 1 MB and ends at 2 MB, then the x-amz-sha256-tree-hash is returned as a response header.</p> </li>   <li> <p>You request a range of the archive to return that starts on a multiple of 1 MB and goes to the end of the archive. For example, if you have a 3.1 MB archive and you specify a range that starts at 2 MB and ends at 3.1 MB (the end of the archive), then the x-amz-sha256-tree-hash is returned as a response header.</p> </li>  </ul>
    ///   - [`status(i32)`](crate::operation::get_job_output::GetJobOutputOutput::status): <p>The HTTP response code for a job output request. The value depends on whether a range was specified in the request.</p>
    ///   - [`content_range(Option<String>)`](crate::operation::get_job_output::GetJobOutputOutput::content_range): <p>The range of bytes returned by Amazon S3 Glacier. If only partial output is downloaded, the response provides the range of bytes Amazon S3 Glacier returned. For example, bytes 0-1048575/8388608 returns the first 1 MB from 8 MB.</p>
    ///   - [`accept_ranges(Option<String>)`](crate::operation::get_job_output::GetJobOutputOutput::accept_ranges): <p>Indicates the range units accepted. For more information, see <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html">RFC2616</a>. </p>
    ///   - [`content_type(Option<String>)`](crate::operation::get_job_output::GetJobOutputOutput::content_type): <p>The Content-Type depends on whether the job output is an archive or a vault inventory. For archive data, the Content-Type is application/octet-stream. For vault inventory, if you requested CSV format when you initiated the job, the Content-Type is text/csv. Otherwise, by default, vault inventory is returned as JSON, and the Content-Type is application/json.</p>
    ///   - [`archive_description(Option<String>)`](crate::operation::get_job_output::GetJobOutputOutput::archive_description): <p>The description of an archive.</p>
    /// - On failure, responds with [`SdkError<GetJobOutputError>`](crate::operation::get_job_output::GetJobOutputError)
    pub fn get_job_output(
        &self,
    ) -> crate::operation::get_job_output::builders::GetJobOutputFluentBuilder {
        crate::operation::get_job_output::builders::GetJobOutputFluentBuilder::new(
            self.handle.clone(),
        )
    }
}