pub struct PutBucketVersioning { /* private fields */ }
Expand description
Fluent builder constructing a request to PutBucketVersioning
.
This operation sets the versioning state only for S3 on Outposts buckets. To set the versioning state for an S3 bucket, see PutBucketVersioning in the Amazon S3 API Reference.
Sets the versioning state for an S3 on Outposts bucket. With versioning, you can save multiple distinct copies of your data and recover from unintended user actions and application failures.
You can set the versioning state to one of the following:
-
Enabled - Enables versioning for the objects in the bucket. All objects added to the bucket receive a unique version ID.
-
Suspended - Suspends versioning for the objects in the bucket. All objects added to the bucket receive the version ID
null
.
If you've never set versioning on your bucket, it has no versioning state. In that case, a GetBucketVersioning request does not return a versioning state value.
When you enable S3 Versioning, for each object in your bucket, you have a current version and zero or more noncurrent versions. You can configure your bucket S3 Lifecycle rules to expire noncurrent versions after a specified time period. For more information, see Creating and managing a lifecycle configuration for your S3 on Outposts bucket in the Amazon S3 User Guide.
If you have an object expiration lifecycle policy in your non-versioned bucket and you want to maintain the same permanent delete behavior when you enable versioning, you must add a noncurrent expiration policy. The noncurrent expiration lifecycle policy will manage the deletes of the noncurrent object versions in the version-enabled bucket. For more information, see Versioning in the Amazon S3 User Guide.
All Amazon S3 on Outposts REST API requests for this action require an additional parameter of x-amz-outpost-id
to be passed with the request. In addition, you must use an S3 on Outposts endpoint hostname prefix instead of s3-control
. For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id
derived by using the access point ARN, see the Examples section.
The following operations are related to PutBucketVersioning
for S3 on Outposts.
Implementations§
source§impl PutBucketVersioning
impl PutBucketVersioning
sourcepub async fn customize(
self
) -> Result<CustomizableOperation<PutBucketVersioning, AwsResponseRetryClassifier>, SdkError<PutBucketVersioningError>>
pub async fn customize(
self
) -> Result<CustomizableOperation<PutBucketVersioning, AwsResponseRetryClassifier>, SdkError<PutBucketVersioningError>>
Consume this builder, creating a customizable operation that can be modified before being sent. The operation’s inner http::Request can be modified as well.
sourcepub async fn send(
self
) -> Result<PutBucketVersioningOutput, SdkError<PutBucketVersioningError>>
pub async fn send(
self
) -> Result<PutBucketVersioningOutput, SdkError<PutBucketVersioningError>>
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, which can be set when configuring the client.
sourcepub fn account_id(self, input: impl Into<String>) -> Self
pub fn account_id(self, input: impl Into<String>) -> Self
The Amazon Web Services account ID of the S3 on Outposts bucket.
sourcepub fn set_account_id(self, input: Option<String>) -> Self
pub fn set_account_id(self, input: Option<String>) -> Self
The Amazon Web Services account ID of the S3 on Outposts bucket.
sourcepub fn bucket(self, input: impl Into<String>) -> Self
pub fn bucket(self, input: impl Into<String>) -> Self
The S3 on Outposts bucket to set the versioning state for.
sourcepub fn set_bucket(self, input: Option<String>) -> Self
pub fn set_bucket(self, input: Option<String>) -> Self
The S3 on Outposts bucket to set the versioning state for.
sourcepub fn mfa(self, input: impl Into<String>) -> Self
pub fn mfa(self, input: impl Into<String>) -> Self
The concatenation of the authentication device's serial number, a space, and the value that is displayed on your authentication device.
sourcepub fn set_mfa(self, input: Option<String>) -> Self
pub fn set_mfa(self, input: Option<String>) -> Self
The concatenation of the authentication device's serial number, a space, and the value that is displayed on your authentication device.
sourcepub fn versioning_configuration(self, input: VersioningConfiguration) -> Self
pub fn versioning_configuration(self, input: VersioningConfiguration) -> Self
The root-level tag for the VersioningConfiguration
parameters.
sourcepub fn set_versioning_configuration(
self,
input: Option<VersioningConfiguration>
) -> Self
pub fn set_versioning_configuration(
self,
input: Option<VersioningConfiguration>
) -> Self
The root-level tag for the VersioningConfiguration
parameters.
Trait Implementations§
source§impl Clone for PutBucketVersioning
impl Clone for PutBucketVersioning
source§fn clone(&self) -> PutBucketVersioning
fn clone(&self) -> PutBucketVersioning
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more