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

A builder for PutObjectAclInput.

Implementations§

The canned ACL to apply to the object. For more information, see Canned ACL.

Examples found in repository?
src/client.rs (line 14131)
14130
14131
14132
14133
        pub fn acl(mut self, input: crate::model::ObjectCannedAcl) -> Self {
            self.inner = self.inner.acl(input);
            self
        }

The canned ACL to apply to the object. For more information, see Canned ACL.

Examples found in repository?
src/client.rs (line 14139)
14135
14136
14137
14138
14139
14140
14141
        pub fn set_acl(
            mut self,
            input: std::option::Option<crate::model::ObjectCannedAcl>,
        ) -> Self {
            self.inner = self.inner.set_acl(input);
            self
        }

Contains the elements that set the ACL permissions for an object per grantee.

Examples found in repository?
src/client.rs (line 14144)
14143
14144
14145
14146
        pub fn access_control_policy(mut self, input: crate::model::AccessControlPolicy) -> Self {
            self.inner = self.inner.access_control_policy(input);
            self
        }

Contains the elements that set the ACL permissions for an object per grantee.

Examples found in repository?
src/client.rs (line 14152)
14148
14149
14150
14151
14152
14153
14154
        pub fn set_access_control_policy(
            mut self,
            input: std::option::Option<crate::model::AccessControlPolicy>,
        ) -> Self {
            self.inner = self.inner.set_access_control_policy(input);
            self
        }

The bucket name that contains the object to which you want to attach the ACL.

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

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

The bucket name that contains the object to which you want to attach the ACL.

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

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

The base64-encoded 128-bit MD5 digest of the data. This header must be used as a message integrity check to verify that the request body was not corrupted in transit. For more information, go to RFC 1864.>

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

Examples found in repository?
src/client.rs (line 14170)
14169
14170
14171
14172
        pub fn content_md5(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.content_md5(input.into());
            self
        }

The base64-encoded 128-bit MD5 digest of the data. This header must be used as a message integrity check to verify that the request body was not corrupted in transit. For more information, go to RFC 1864.>

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

Examples found in repository?
src/client.rs (line 14176)
14175
14176
14177
14178
        pub fn set_content_md5(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_content_md5(input);
            self
        }

Indicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more information, see Checking object integrity in the Amazon S3 User Guide.

If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm parameter.

Examples found in repository?
src/client.rs (line 14182)
14181
14182
14183
14184
        pub fn checksum_algorithm(mut self, input: crate::model::ChecksumAlgorithm) -> Self {
            self.inner = self.inner.checksum_algorithm(input);
            self
        }

Indicates the algorithm used to create the checksum for the object when using the SDK. This header will not provide any additional functionality if not using the SDK. When sending this header, there must be a corresponding x-amz-checksum or x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more information, see Checking object integrity in the Amazon S3 User Guide.

If you provide an individual checksum, Amazon S3 ignores any provided ChecksumAlgorithm parameter.

Examples found in repository?
src/client.rs (line 14191)
14187
14188
14189
14190
14191
14192
14193
        pub fn set_checksum_algorithm(
            mut self,
            input: std::option::Option<crate::model::ChecksumAlgorithm>,
        ) -> Self {
            self.inner = self.inner.set_checksum_algorithm(input);
            self
        }

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

This action is not supported by Amazon S3 on Outposts.

Examples found in repository?
src/client.rs (line 14197)
14196
14197
14198
14199
        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.

This action is not supported by Amazon S3 on Outposts.

Examples found in repository?
src/client.rs (line 14206)
14202
14203
14204
14205
14206
14207
14208
        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.

This action is not supported by Amazon S3 on Outposts.

Examples found in repository?
src/client.rs (line 14212)
14211
14212
14213
14214
        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.

This action is not supported by Amazon S3 on Outposts.

Examples found in repository?
src/client.rs (line 14218)
14217
14218
14219
14220
        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.

This action is not supported by Amazon S3 on Outposts.

Examples found in repository?
src/client.rs (line 14224)
14223
14224
14225
14226
        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.

This action is not supported by Amazon S3 on Outposts.

Examples found in repository?
src/client.rs (line 14233)
14229
14230
14231
14232
14233
14234
14235
        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 14239)
14238
14239
14240
14241
        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 14245)
14244
14245
14246
14247
        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.

This action is not supported by Amazon S3 on Outposts.

Examples found in repository?
src/client.rs (line 14251)
14250
14251
14252
14253
        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.

This action is not supported by Amazon S3 on Outposts.

Examples found in repository?
src/client.rs (line 14260)
14256
14257
14258
14259
14260
14261
14262
        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
        }

Key for which the PUT action was initiated.

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts in the Amazon S3 User Guide.

Examples found in repository?
src/client.rs (line 14267)
14266
14267
14268
14269
        pub fn key(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.key(input.into());
            self
        }

Key for which the PUT action was initiated.

When using this action with an access point, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

When using this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When using this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts in the Amazon S3 User Guide.

Examples found in repository?
src/client.rs (line 14274)
14273
14274
14275
14276
        pub fn set_key(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_key(input);
            self
        }

Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. For information about downloading objects from Requester Pays buckets, see Downloading Objects in Requester Pays Buckets in the Amazon S3 User Guide.

Examples found in repository?
src/client.rs (line 14279)
14278
14279
14280
14281
        pub fn request_payer(mut self, input: crate::model::RequestPayer) -> Self {
            self.inner = self.inner.request_payer(input);
            self
        }

Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. For information about downloading objects from Requester Pays buckets, see Downloading Objects in Requester Pays Buckets in the Amazon S3 User Guide.

Examples found in repository?
src/client.rs (line 14287)
14283
14284
14285
14286
14287
14288
14289
        pub fn set_request_payer(
            mut self,
            input: std::option::Option<crate::model::RequestPayer>,
        ) -> Self {
            self.inner = self.inner.set_request_payer(input);
            self
        }

VersionId used to reference a specific version of the object.

Examples found in repository?
src/client.rs (line 14292)
14291
14292
14293
14294
        pub fn version_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.version_id(input.into());
            self
        }

VersionId used to reference a specific version of the object.

Examples found in repository?
src/client.rs (line 14297)
14296
14297
14298
14299
        pub fn set_version_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_version_id(input);
            self
        }

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

Examples found in repository?
src/client.rs (line 14302)
14301
14302
14303
14304
        pub fn expected_bucket_owner(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.expected_bucket_owner(input.into());
            self
        }

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

Examples found in repository?
src/client.rs (line 14310)
14306
14307
14308
14309
14310
14311
14312
        pub fn set_expected_bucket_owner(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_expected_bucket_owner(input);
            self
        }

Consumes the builder and constructs a PutObjectAclInput.

Examples found in repository?
src/client.rs (line 14098)
14086
14087
14088
14089
14090
14091
14092
14093
14094
14095
14096
14097
14098
14099
14100
14101
14102
14103
14104
14105
14106
14107
14108
14109
14110
14111
14112
14113
14114
14115
14116
14117
14118
14119
14120
14121
14122
14123
14124
14125
14126
14127
14128
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::PutObjectAcl,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::PutObjectAclError>,
        > {
            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::PutObjectAclOutput,
            aws_smithy_http::result::SdkError<crate::error::PutObjectAclError>,
        > {
            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