aws_sdk_efs/client/put_lifecycle_configuration.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3 /// Constructs a fluent builder for the [`PutLifecycleConfiguration`](crate::operation::put_lifecycle_configuration::builders::PutLifecycleConfigurationFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`file_system_id(impl Into<String>)`](crate::operation::put_lifecycle_configuration::builders::PutLifecycleConfigurationFluentBuilder::file_system_id) / [`set_file_system_id(Option<String>)`](crate::operation::put_lifecycle_configuration::builders::PutLifecycleConfigurationFluentBuilder::set_file_system_id):<br>required: **true**<br><p>The ID of the file system for which you are creating the <code>LifecycleConfiguration</code> object (String).</p><br>
7 /// - [`lifecycle_policies(LifecyclePolicy)`](crate::operation::put_lifecycle_configuration::builders::PutLifecycleConfigurationFluentBuilder::lifecycle_policies) / [`set_lifecycle_policies(Option<Vec::<LifecyclePolicy>>)`](crate::operation::put_lifecycle_configuration::builders::PutLifecycleConfigurationFluentBuilder::set_lifecycle_policies):<br>required: **true**<br><p>An array of <code>LifecyclePolicy</code> objects that define the file system's <code>LifecycleConfiguration</code> object. A <code>LifecycleConfiguration</code> object informs lifecycle management of the following:</p> <ul> <li> <p><b> <code>TransitionToIA</code> </b> – When to move files in the file system from primary storage (Standard storage class) into the Infrequent Access (IA) storage.</p></li> <li> <p><b> <code>TransitionToArchive</code> </b> – When to move files in the file system from their current storage class (either IA or Standard storage) into the Archive storage.</p> <p>File systems cannot transition into Archive storage before transitioning into IA storage. Therefore, TransitionToArchive must either not be set or must be later than TransitionToIA.</p><note> <p>The Archive storage class is available only for file systems that use the Elastic throughput mode and the General Purpose performance mode.</p> </note></li> <li> <p><b> <code>TransitionToPrimaryStorageClass</code> </b> – Whether to move files in the file system back to primary storage (Standard storage class) after they are accessed in IA or Archive storage.</p></li> </ul><note> <p>When using the <code>put-lifecycle-configuration</code> CLI command or the <code>PutLifecycleConfiguration</code> API action, Amazon EFS requires that each <code>LifecyclePolicy</code> object have only a single transition. This means that in a request body, <code>LifecyclePolicies</code> must be structured as an array of <code>LifecyclePolicy</code> objects, one object for each storage transition. See the example requests in the following section for more information.</p> </note><br>
8 /// - On success, responds with [`PutLifecycleConfigurationOutput`](crate::operation::put_lifecycle_configuration::PutLifecycleConfigurationOutput) with field(s):
9 /// - [`lifecycle_policies(Option<Vec::<LifecyclePolicy>>)`](crate::operation::put_lifecycle_configuration::PutLifecycleConfigurationOutput::lifecycle_policies): <p>An array of lifecycle management policies. EFS supports a maximum of one policy per file system.</p>
10 /// - On failure, responds with [`SdkError<PutLifecycleConfigurationError>`](crate::operation::put_lifecycle_configuration::PutLifecycleConfigurationError)
11 pub fn put_lifecycle_configuration(&self) -> crate::operation::put_lifecycle_configuration::builders::PutLifecycleConfigurationFluentBuilder {
12 crate::operation::put_lifecycle_configuration::builders::PutLifecycleConfigurationFluentBuilder::new(self.handle.clone())
13 }
14}