aws_sdk_glacier/operation/list_multipart_uploads/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::list_multipart_uploads::_list_multipart_uploads_output::ListMultipartUploadsOutputBuilder;
3
4pub use crate::operation::list_multipart_uploads::_list_multipart_uploads_input::ListMultipartUploadsInputBuilder;
5
6impl crate::operation::list_multipart_uploads::builders::ListMultipartUploadsInputBuilder {
7    /// Sends a request with this input using the given client.
8    pub async fn send_with(
9        self,
10        client: &crate::Client,
11    ) -> ::std::result::Result<
12        crate::operation::list_multipart_uploads::ListMultipartUploadsOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::list_multipart_uploads::ListMultipartUploadsError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.list_multipart_uploads();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `ListMultipartUploads`.
24///
25/// <p>This operation lists in-progress multipart uploads for the specified vault. An in-progress multipart upload is a multipart upload that has been initiated by an <code>InitiateMultipartUpload</code> request, but has not yet been completed or aborted. The list returned in the List Multipart Upload response has no guaranteed order.</p>
26/// <p>The List Multipart Uploads operation supports pagination. By default, this operation returns up to 50 multipart uploads in the response. You should always check the response for a <code>marker</code> at which to continue the list; if there are no more items the <code>marker</code> is <code>null</code>. To return a list of multipart uploads that begins at a specific upload, set the <code>marker</code> request parameter to the value you obtained from a previous List Multipart Upload request. You can also limit the number of uploads returned in the response by specifying the <code>limit</code> parameter in the request.</p>
27/// <p>Note the difference between this operation and listing parts (<code>ListParts</code>). The List Multipart Uploads operation lists all multipart uploads for a vault and does not require a multipart upload ID. The List Parts operation requires a multipart upload ID since parts are associated with a single upload.</p>
28/// <p>An AWS account has full permission to perform all operations (actions). However, AWS Identity and Access Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform specific actions. For more information, see <a href="https://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html">Access Control Using AWS Identity and Access Management (IAM)</a>.</p>
29/// <p>For conceptual information and the underlying REST API, see <a href="https://docs.aws.amazon.com/amazonglacier/latest/dev/working-with-archives.html">Working with Archives in Amazon S3 Glacier</a> and <a href="https://docs.aws.amazon.com/amazonglacier/latest/dev/api-multipart-list-uploads.html">List Multipart Uploads </a> in the <i>Amazon Glacier Developer Guide</i>.</p>
30#[derive(::std::clone::Clone, ::std::fmt::Debug)]
31pub struct ListMultipartUploadsFluentBuilder {
32    handle: ::std::sync::Arc<crate::client::Handle>,
33    inner: crate::operation::list_multipart_uploads::builders::ListMultipartUploadsInputBuilder,
34    config_override: ::std::option::Option<crate::config::Builder>,
35}
36impl
37    crate::client::customize::internal::CustomizableSend<
38        crate::operation::list_multipart_uploads::ListMultipartUploadsOutput,
39        crate::operation::list_multipart_uploads::ListMultipartUploadsError,
40    > for ListMultipartUploadsFluentBuilder
41{
42    fn send(
43        self,
44        config_override: crate::config::Builder,
45    ) -> crate::client::customize::internal::BoxFuture<
46        crate::client::customize::internal::SendResult<
47            crate::operation::list_multipart_uploads::ListMultipartUploadsOutput,
48            crate::operation::list_multipart_uploads::ListMultipartUploadsError,
49        >,
50    > {
51        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
52    }
53}
54impl ListMultipartUploadsFluentBuilder {
55    /// Creates a new `ListMultipartUploadsFluentBuilder`.
56    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
57        Self {
58            handle,
59            inner: ::std::default::Default::default(),
60            config_override: ::std::option::Option::None,
61        }
62    }
63    /// Access the ListMultipartUploads as a reference.
64    pub fn as_input(&self) -> &crate::operation::list_multipart_uploads::builders::ListMultipartUploadsInputBuilder {
65        &self.inner
66    }
67    /// Sends the request and returns the response.
68    ///
69    /// If an error occurs, an `SdkError` will be returned with additional details that
70    /// can be matched against.
71    ///
72    /// By default, any retryable failures will be retried twice. Retry behavior
73    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
74    /// set when configuring the client.
75    pub async fn send(
76        self,
77    ) -> ::std::result::Result<
78        crate::operation::list_multipart_uploads::ListMultipartUploadsOutput,
79        ::aws_smithy_runtime_api::client::result::SdkError<
80            crate::operation::list_multipart_uploads::ListMultipartUploadsError,
81            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
82        >,
83    > {
84        let input = self
85            .inner
86            .build()
87            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
88        let runtime_plugins = crate::operation::list_multipart_uploads::ListMultipartUploads::operation_runtime_plugins(
89            self.handle.runtime_plugins.clone(),
90            &self.handle.conf,
91            self.config_override,
92        );
93        crate::operation::list_multipart_uploads::ListMultipartUploads::orchestrate(&runtime_plugins, input).await
94    }
95
96    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
97    pub fn customize(
98        self,
99    ) -> crate::client::customize::CustomizableOperation<
100        crate::operation::list_multipart_uploads::ListMultipartUploadsOutput,
101        crate::operation::list_multipart_uploads::ListMultipartUploadsError,
102        Self,
103    > {
104        crate::client::customize::CustomizableOperation::new(self)
105    }
106    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
107        self.set_config_override(::std::option::Option::Some(config_override.into()));
108        self
109    }
110
111    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
112        self.config_override = config_override;
113        self
114    }
115    /// Create a paginator for this request
116    ///
117    /// Paginators are used by calling [`send().await`](crate::operation::list_multipart_uploads::paginator::ListMultipartUploadsPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
118    pub fn into_paginator(self) -> crate::operation::list_multipart_uploads::paginator::ListMultipartUploadsPaginator {
119        crate::operation::list_multipart_uploads::paginator::ListMultipartUploadsPaginator::new(self.handle, self.inner)
120    }
121    /// <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>
122    pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
123        self.inner = self.inner.account_id(input.into());
124        self
125    }
126    /// <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>
127    pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
128        self.inner = self.inner.set_account_id(input);
129        self
130    }
131    /// <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>
132    pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
133        self.inner.get_account_id()
134    }
135    /// <p>The name of the vault.</p>
136    pub fn vault_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
137        self.inner = self.inner.vault_name(input.into());
138        self
139    }
140    /// <p>The name of the vault.</p>
141    pub fn set_vault_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
142        self.inner = self.inner.set_vault_name(input);
143        self
144    }
145    /// <p>The name of the vault.</p>
146    pub fn get_vault_name(&self) -> &::std::option::Option<::std::string::String> {
147        self.inner.get_vault_name()
148    }
149    /// <p>Specifies the maximum number of uploads returned in the response body. If this value is not specified, the List Uploads operation returns up to 50 uploads.</p>
150    pub fn limit(mut self, input: i32) -> Self {
151        self.inner = self.inner.limit(input);
152        self
153    }
154    /// <p>Specifies the maximum number of uploads returned in the response body. If this value is not specified, the List Uploads operation returns up to 50 uploads.</p>
155    pub fn set_limit(mut self, input: ::std::option::Option<i32>) -> Self {
156        self.inner = self.inner.set_limit(input);
157        self
158    }
159    /// <p>Specifies the maximum number of uploads returned in the response body. If this value is not specified, the List Uploads operation returns up to 50 uploads.</p>
160    pub fn get_limit(&self) -> &::std::option::Option<i32> {
161        self.inner.get_limit()
162    }
163    /// <p>An opaque string used for pagination. This value specifies the upload at which the listing of uploads should begin. Get the marker value from a previous List Uploads response. You need only include the marker if you are continuing the pagination of results started in a previous List Uploads request.</p>
164    pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
165        self.inner = self.inner.marker(input.into());
166        self
167    }
168    /// <p>An opaque string used for pagination. This value specifies the upload at which the listing of uploads should begin. Get the marker value from a previous List Uploads response. You need only include the marker if you are continuing the pagination of results started in a previous List Uploads request.</p>
169    pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
170        self.inner = self.inner.set_marker(input);
171        self
172    }
173    /// <p>An opaque string used for pagination. This value specifies the upload at which the listing of uploads should begin. Get the marker value from a previous List Uploads response. You need only include the marker if you are continuing the pagination of results started in a previous List Uploads request.</p>
174    pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
175        self.inner.get_marker()
176    }
177}