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 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::create_data_repository_task::_create_data_repository_task_output::CreateDataRepositoryTaskOutputBuilder;
pub use crate::operation::create_data_repository_task::_create_data_repository_task_input::CreateDataRepositoryTaskInputBuilder;
impl CreateDataRepositoryTaskInputBuilder {
/// Sends a request with this input using the given client.
pub async fn send_with(
self,
client: &crate::Client,
) -> ::std::result::Result<
crate::operation::create_data_repository_task::CreateDataRepositoryTaskOutput,
::aws_smithy_http::result::SdkError<
crate::operation::create_data_repository_task::CreateDataRepositoryTaskError,
::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
>,
> {
let mut fluent_builder = client.create_data_repository_task();
fluent_builder.inner = self;
fluent_builder.send().await
}
}
/// Fluent builder constructing a request to `CreateDataRepositoryTask`.
///
/// <p>Creates an Amazon FSx for Lustre data repository task. You use data repository tasks to perform bulk operations between your Amazon FSx file system and its linked data repositories. An example of a data repository task is exporting any data and metadata changes, including POSIX metadata, to files, directories, and symbolic links (symlinks) from your FSx file system to a linked data repository. A <code>CreateDataRepositoryTask</code> operation will fail if a data repository is not linked to the FSx file system. To learn more about data repository tasks, see <a href="https://docs.aws.amazon.com/fsx/latest/LustreGuide/data-repository-tasks.html">Data Repository Tasks</a>. To learn more about linking a data repository to your file system, see <a href="https://docs.aws.amazon.com/fsx/latest/LustreGuide/create-dra-linked-data-repo.html">Linking your file system to an S3 bucket</a>.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct CreateDataRepositoryTaskFluentBuilder {
handle: ::std::sync::Arc<crate::client::Handle>,
inner: crate::operation::create_data_repository_task::builders::CreateDataRepositoryTaskInputBuilder,
config_override: ::std::option::Option<crate::config::Builder>,
}
impl CreateDataRepositoryTaskFluentBuilder {
/// Creates a new `CreateDataRepositoryTask`.
pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
Self {
handle,
inner: ::std::default::Default::default(),
config_override: ::std::option::Option::None,
}
}
/// Access the CreateDataRepositoryTask as a reference.
pub fn as_input(&self) -> &crate::operation::create_data_repository_task::builders::CreateDataRepositoryTaskInputBuilder {
&self.inner
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> ::std::result::Result<
crate::operation::create_data_repository_task::CreateDataRepositoryTaskOutput,
::aws_smithy_http::result::SdkError<
crate::operation::create_data_repository_task::CreateDataRepositoryTaskError,
::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
>,
> {
let input = self.inner.build().map_err(::aws_smithy_http::result::SdkError::construction_failure)?;
let runtime_plugins = crate::operation::create_data_repository_task::CreateDataRepositoryTask::operation_runtime_plugins(
self.handle.runtime_plugins.clone(),
&self.handle.conf,
self.config_override,
);
crate::operation::create_data_repository_task::CreateDataRepositoryTask::orchestrate(&runtime_plugins, input).await
}
/// Consumes this builder, creating a customizable operation that can be modified before being
/// sent.
// TODO(enableNewSmithyRuntimeCleanup): Remove `async` and `Result` once we switch to orchestrator
pub async fn customize(
self,
) -> ::std::result::Result<
crate::client::customize::orchestrator::CustomizableOperation<
crate::operation::create_data_repository_task::CreateDataRepositoryTaskOutput,
crate::operation::create_data_repository_task::CreateDataRepositoryTaskError,
>,
::aws_smithy_http::result::SdkError<crate::operation::create_data_repository_task::CreateDataRepositoryTaskError>,
> {
::std::result::Result::Ok(crate::client::customize::orchestrator::CustomizableOperation {
customizable_send: ::std::boxed::Box::new(move |config_override| {
::std::boxed::Box::pin(async { self.config_override(config_override).send().await })
}),
config_override: None,
interceptors: vec![],
runtime_plugins: vec![],
})
}
pub(crate) fn config_override(mut self, config_override: impl Into<crate::config::Builder>) -> Self {
self.set_config_override(Some(config_override.into()));
self
}
pub(crate) fn set_config_override(&mut self, config_override: Option<crate::config::Builder>) -> &mut Self {
self.config_override = config_override;
self
}
/// <p>Specifies the type of data repository task to create.</p>
pub fn r#type(mut self, input: crate::types::DataRepositoryTaskType) -> Self {
self.inner = self.inner.r#type(input);
self
}
/// <p>Specifies the type of data repository task to create.</p>
pub fn set_type(mut self, input: ::std::option::Option<crate::types::DataRepositoryTaskType>) -> Self {
self.inner = self.inner.set_type(input);
self
}
/// <p>Specifies the type of data repository task to create.</p>
pub fn get_type(&self) -> &::std::option::Option<crate::types::DataRepositoryTaskType> {
self.inner.get_type()
}
/// Appends an item to `Paths`.
///
/// To override the contents of this collection use [`set_paths`](Self::set_paths).
///
/// <p>A list of paths for the data repository task to use when the task is processed. If a path that you provide isn't valid, the task fails.</p>
/// <ul>
/// <li> <p>For export tasks, the list contains paths on the Amazon FSx file system from which the files are exported to the Amazon S3 bucket. The default path is the file system root directory. The paths you provide need to be relative to the mount point of the file system. If the mount point is <code>/mnt/fsx</code> and <code>/mnt/fsx/path1</code> is a directory or file on the file system you want to export, then the path to provide is <code>path1</code>.</p> </li>
/// <li> <p>For import tasks, the list contains paths in the Amazon S3 bucket from which POSIX metadata changes are imported to the Amazon FSx file system. The path can be an S3 bucket or prefix in the format <code>s3://myBucket/myPrefix</code> (where <code>myPrefix</code> is optional).</p> </li>
/// </ul>
pub fn paths(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.paths(input.into());
self
}
/// <p>A list of paths for the data repository task to use when the task is processed. If a path that you provide isn't valid, the task fails.</p>
/// <ul>
/// <li> <p>For export tasks, the list contains paths on the Amazon FSx file system from which the files are exported to the Amazon S3 bucket. The default path is the file system root directory. The paths you provide need to be relative to the mount point of the file system. If the mount point is <code>/mnt/fsx</code> and <code>/mnt/fsx/path1</code> is a directory or file on the file system you want to export, then the path to provide is <code>path1</code>.</p> </li>
/// <li> <p>For import tasks, the list contains paths in the Amazon S3 bucket from which POSIX metadata changes are imported to the Amazon FSx file system. The path can be an S3 bucket or prefix in the format <code>s3://myBucket/myPrefix</code> (where <code>myPrefix</code> is optional).</p> </li>
/// </ul>
pub fn set_paths(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.inner = self.inner.set_paths(input);
self
}
/// <p>A list of paths for the data repository task to use when the task is processed. If a path that you provide isn't valid, the task fails.</p>
/// <ul>
/// <li> <p>For export tasks, the list contains paths on the Amazon FSx file system from which the files are exported to the Amazon S3 bucket. The default path is the file system root directory. The paths you provide need to be relative to the mount point of the file system. If the mount point is <code>/mnt/fsx</code> and <code>/mnt/fsx/path1</code> is a directory or file on the file system you want to export, then the path to provide is <code>path1</code>.</p> </li>
/// <li> <p>For import tasks, the list contains paths in the Amazon S3 bucket from which POSIX metadata changes are imported to the Amazon FSx file system. The path can be an S3 bucket or prefix in the format <code>s3://myBucket/myPrefix</code> (where <code>myPrefix</code> is optional).</p> </li>
/// </ul>
pub fn get_paths(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
self.inner.get_paths()
}
/// <p>The globally unique ID of the file system, assigned by Amazon FSx.</p>
pub fn file_system_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.file_system_id(input.into());
self
}
/// <p>The globally unique ID of the file system, assigned by Amazon FSx.</p>
pub fn set_file_system_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.inner = self.inner.set_file_system_id(input);
self
}
/// <p>The globally unique ID of the file system, assigned by Amazon FSx.</p>
pub fn get_file_system_id(&self) -> &::std::option::Option<::std::string::String> {
self.inner.get_file_system_id()
}
/// <p>Defines whether or not Amazon FSx provides a CompletionReport once the task has completed. A CompletionReport provides a detailed report on the files that Amazon FSx processed that meet the criteria specified by the <code>Scope</code> parameter. For more information, see <a href="https://docs.aws.amazon.com/fsx/latest/LustreGuide/task-completion-report.html">Working with Task Completion Reports</a>.</p>
pub fn report(mut self, input: crate::types::CompletionReport) -> Self {
self.inner = self.inner.report(input);
self
}
/// <p>Defines whether or not Amazon FSx provides a CompletionReport once the task has completed. A CompletionReport provides a detailed report on the files that Amazon FSx processed that meet the criteria specified by the <code>Scope</code> parameter. For more information, see <a href="https://docs.aws.amazon.com/fsx/latest/LustreGuide/task-completion-report.html">Working with Task Completion Reports</a>.</p>
pub fn set_report(mut self, input: ::std::option::Option<crate::types::CompletionReport>) -> Self {
self.inner = self.inner.set_report(input);
self
}
/// <p>Defines whether or not Amazon FSx provides a CompletionReport once the task has completed. A CompletionReport provides a detailed report on the files that Amazon FSx processed that meet the criteria specified by the <code>Scope</code> parameter. For more information, see <a href="https://docs.aws.amazon.com/fsx/latest/LustreGuide/task-completion-report.html">Working with Task Completion Reports</a>.</p>
pub fn get_report(&self) -> &::std::option::Option<crate::types::CompletionReport> {
self.inner.get_report()
}
/// <p>(Optional) An idempotency token for resource creation, in a string of up to 63 ASCII characters. This token is automatically filled on your behalf when you use the Command Line Interface (CLI) or an Amazon Web Services SDK.</p>
pub fn client_request_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.client_request_token(input.into());
self
}
/// <p>(Optional) An idempotency token for resource creation, in a string of up to 63 ASCII characters. This token is automatically filled on your behalf when you use the Command Line Interface (CLI) or an Amazon Web Services SDK.</p>
pub fn set_client_request_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.inner = self.inner.set_client_request_token(input);
self
}
/// <p>(Optional) An idempotency token for resource creation, in a string of up to 63 ASCII characters. This token is automatically filled on your behalf when you use the Command Line Interface (CLI) or an Amazon Web Services SDK.</p>
pub fn get_client_request_token(&self) -> &::std::option::Option<::std::string::String> {
self.inner.get_client_request_token()
}
/// Appends an item to `Tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <p>A list of <code>Tag</code> values, with a maximum of 50 elements.</p>
pub fn tags(mut self, input: crate::types::Tag) -> Self {
self.inner = self.inner.tags(input);
self
}
/// <p>A list of <code>Tag</code> values, with a maximum of 50 elements.</p>
pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
self.inner = self.inner.set_tags(input);
self
}
/// <p>A list of <code>Tag</code> values, with a maximum of 50 elements.</p>
pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
self.inner.get_tags()
}
/// <p>Specifies the amount of data to release, in GiB, by an Amazon File Cache <code>AUTO_RELEASE_DATA</code> task that automatically releases files from the cache.</p>
pub fn capacity_to_release(mut self, input: i64) -> Self {
self.inner = self.inner.capacity_to_release(input);
self
}
/// <p>Specifies the amount of data to release, in GiB, by an Amazon File Cache <code>AUTO_RELEASE_DATA</code> task that automatically releases files from the cache.</p>
pub fn set_capacity_to_release(mut self, input: ::std::option::Option<i64>) -> Self {
self.inner = self.inner.set_capacity_to_release(input);
self
}
/// <p>Specifies the amount of data to release, in GiB, by an Amazon File Cache <code>AUTO_RELEASE_DATA</code> task that automatically releases files from the cache.</p>
pub fn get_capacity_to_release(&self) -> &::std::option::Option<i64> {
self.inner.get_capacity_to_release()
}
}