pub struct Builder { /* private fields */ }
Expand description

A builder for CreateBucketInput.

Implementations§

The canned ACL to apply to the bucket.

Examples found in repository?
src/client.rs (line 3052)
3051
3052
3053
3054
        pub fn acl(mut self, input: crate::model::BucketCannedAcl) -> Self {
            self.inner = self.inner.acl(input);
            self
        }

The canned ACL to apply to the bucket.

Examples found in repository?
src/client.rs (line 3060)
3056
3057
3058
3059
3060
3061
3062
        pub fn set_acl(
            mut self,
            input: std::option::Option<crate::model::BucketCannedAcl>,
        ) -> Self {
            self.inner = self.inner.set_acl(input);
            self
        }

The name of the bucket to create.

Examples found in repository?
src/client.rs (line 3065)
3064
3065
3066
3067
        pub fn bucket(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.bucket(input.into());
            self
        }

The name of the bucket to create.

Examples found in repository?
src/client.rs (line 3070)
3069
3070
3071
3072
        pub fn set_bucket(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_bucket(input);
            self
        }

The configuration information for the bucket.

Examples found in repository?
src/client.rs (line 3078)
3074
3075
3076
3077
3078
3079
3080
        pub fn create_bucket_configuration(
            mut self,
            input: crate::model::CreateBucketConfiguration,
        ) -> Self {
            self.inner = self.inner.create_bucket_configuration(input);
            self
        }

The configuration information for the bucket.

Examples found in repository?
src/client.rs (line 3086)
3082
3083
3084
3085
3086
3087
3088
        pub fn set_create_bucket_configuration(
            mut self,
            input: std::option::Option<crate::model::CreateBucketConfiguration>,
        ) -> Self {
            self.inner = self.inner.set_create_bucket_configuration(input);
            self
        }

Allows grantee the read, write, read ACP, and write ACP permissions on the bucket.

Examples found in repository?
src/client.rs (line 3091)
3090
3091
3092
3093
        pub fn grant_full_control(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.grant_full_control(input.into());
            self
        }

Allows grantee the read, write, read ACP, and write ACP permissions on the bucket.

Examples found in repository?
src/client.rs (line 3099)
3095
3096
3097
3098
3099
3100
3101
        pub fn set_grant_full_control(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_grant_full_control(input);
            self
        }

Allows grantee to list the objects in the bucket.

Examples found in repository?
src/client.rs (line 3104)
3103
3104
3105
3106
        pub fn grant_read(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.grant_read(input.into());
            self
        }

Allows grantee to list the objects in the bucket.

Examples found in repository?
src/client.rs (line 3109)
3108
3109
3110
3111
        pub fn set_grant_read(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_grant_read(input);
            self
        }

Allows grantee to read the bucket ACL.

Examples found in repository?
src/client.rs (line 3114)
3113
3114
3115
3116
        pub fn grant_read_acp(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.grant_read_acp(input.into());
            self
        }

Allows grantee to read the bucket ACL.

Examples found in repository?
src/client.rs (line 3122)
3118
3119
3120
3121
3122
3123
3124
        pub fn set_grant_read_acp(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_grant_read_acp(input);
            self
        }

Allows grantee to create new objects in the bucket.

For the bucket and object owners of existing objects, also allows deletions and overwrites of those objects.

Examples found in repository?
src/client.rs (line 3128)
3127
3128
3129
3130
        pub fn grant_write(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.grant_write(input.into());
            self
        }

Allows grantee to create new objects in the bucket.

For the bucket and object owners of existing objects, also allows deletions and overwrites of those objects.

Examples found in repository?
src/client.rs (line 3134)
3133
3134
3135
3136
        pub fn set_grant_write(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_grant_write(input);
            self
        }

Allows grantee to write the ACL for the applicable bucket.

Examples found in repository?
src/client.rs (line 3139)
3138
3139
3140
3141
        pub fn grant_write_acp(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.grant_write_acp(input.into());
            self
        }

Allows grantee to write the ACL for the applicable bucket.

Examples found in repository?
src/client.rs (line 3147)
3143
3144
3145
3146
3147
3148
3149
        pub fn set_grant_write_acp(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_grant_write_acp(input);
            self
        }

Specifies whether you want S3 Object Lock to be enabled for the new bucket.

Examples found in repository?
src/client.rs (line 3152)
3151
3152
3153
3154
        pub fn object_lock_enabled_for_bucket(mut self, input: bool) -> Self {
            self.inner = self.inner.object_lock_enabled_for_bucket(input);
            self
        }

Specifies whether you want S3 Object Lock to be enabled for the new bucket.

Examples found in repository?
src/client.rs (line 3160)
3156
3157
3158
3159
3160
3161
3162
        pub fn set_object_lock_enabled_for_bucket(
            mut self,
            input: std::option::Option<bool>,
        ) -> Self {
            self.inner = self.inner.set_object_lock_enabled_for_bucket(input);
            self
        }

The container element for object ownership for a bucket's ownership controls.

BucketOwnerPreferred - Objects uploaded to the bucket change ownership to the bucket owner if the objects are uploaded with the bucket-owner-full-control canned ACL.

ObjectWriter - The uploading account will own the object if the object is uploaded with the bucket-owner-full-control canned ACL.

BucketOwnerEnforced - Access control lists (ACLs) are disabled and no longer affect permissions. The bucket owner automatically owns and has full control over every object in the bucket. The bucket only accepts PUT requests that don't specify an ACL or bucket owner full control ACLs, such as the bucket-owner-full-control canned ACL or an equivalent form of this ACL expressed in the XML format.

Examples found in repository?
src/client.rs (line 3168)
3167
3168
3169
3170
        pub fn object_ownership(mut self, input: crate::model::ObjectOwnership) -> Self {
            self.inner = self.inner.object_ownership(input);
            self
        }

The container element for object ownership for a bucket's ownership controls.

BucketOwnerPreferred - Objects uploaded to the bucket change ownership to the bucket owner if the objects are uploaded with the bucket-owner-full-control canned ACL.

ObjectWriter - The uploading account will own the object if the object is uploaded with the bucket-owner-full-control canned ACL.

BucketOwnerEnforced - Access control lists (ACLs) are disabled and no longer affect permissions. The bucket owner automatically owns and has full control over every object in the bucket. The bucket only accepts PUT requests that don't specify an ACL or bucket owner full control ACLs, such as the bucket-owner-full-control canned ACL or an equivalent form of this ACL expressed in the XML format.

Examples found in repository?
src/client.rs (line 3179)
3175
3176
3177
3178
3179
3180
3181
        pub fn set_object_ownership(
            mut self,
            input: std::option::Option<crate::model::ObjectOwnership>,
        ) -> Self {
            self.inner = self.inner.set_object_ownership(input);
            self
        }

Consumes the builder and constructs a CreateBucketInput.

Examples found in repository?
src/client.rs (line 3019)
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::CreateBucket,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::CreateBucketError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// 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::output::CreateBucketOutput,
            aws_smithy_http::result::SdkError<crate::error::CreateBucketError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more