diff --git a/generator/.DevConfigs/4f49cfc6-d4a8-477c-a685-6b96d52d73ab.json b/generator/.DevConfigs/4f49cfc6-d4a8-477c-a685-6b96d52d73ab.json new file mode 100644 index 000000000000..8c1ce888d9c6 --- /dev/null +++ b/generator/.DevConfigs/4f49cfc6-d4a8-477c-a685-6b96d52d73ab.json @@ -0,0 +1,13 @@ +{ + "services": [ + { + "serviceName": "S3", + "type": "patch", + "changeLogMessages": [ + "Split GetACL into GetBucketAcl and GetObjectAcl", + "Split PutACL into PutObjectACL and PutBucketACL.", + "Obsolete PutACL and GetACL. These operations are being split into separate operations, because context parameters that could be used for endpoint resolution were not being copied over due to the two operations being merged into one. These context parameters were not being used currently so there is no effect as of now." + ] + } + ] +} diff --git a/generator/ServiceClientGeneratorLib/Generators/Endpoints/EndpointResolver.cs b/generator/ServiceClientGeneratorLib/Generators/Endpoints/EndpointResolver.cs index e085e8f42b61..672b3491a282 100644 --- a/generator/ServiceClientGeneratorLib/Generators/Endpoints/EndpointResolver.cs +++ b/generator/ServiceClientGeneratorLib/Generators/Endpoints/EndpointResolver.cs @@ -19,7 +19,7 @@ namespace ServiceClientGenerator.Generators.Endpoints /// Class to produce the template output /// - #line 1 "C:\codebase\v3\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Endpoints\EndpointResolver.tt" + #line 1 "C:\Dev\Repos\aws-sdk-net-staging\generator\ServiceClientGeneratorLib\Generators\Endpoints\EndpointResolver.tt" [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "17.0.0.0")] public partial class EndpointResolver : BaseGenerator { @@ -30,7 +30,7 @@ public partial class EndpointResolver : BaseGenerator public override string TransformText() { - #line 7 "C:\codebase\v3\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Endpoints\EndpointResolver.tt" + #line 7 "C:\Dev\Repos\aws-sdk-net-staging\generator\ServiceClientGeneratorLib\Generators\Endpoints\EndpointResolver.tt" AddLicenseHeader(); @@ -39,7 +39,7 @@ public override string TransformText() #line hidden this.Write("\r\nusing System;\r\nusing Amazon."); - #line 12 "C:\codebase\v3\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Endpoints\EndpointResolver.tt" + #line 12 "C:\Dev\Repos\aws-sdk-net-staging\generator\ServiceClientGeneratorLib\Generators\Endpoints\EndpointResolver.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Config.ServiceNameRoot)); #line default @@ -47,21 +47,21 @@ public override string TransformText() this.Write(".Model;\r\nusing Amazon.Runtime;\r\nusing Amazon.Runtime.Internal;\r\nusing Amazon.Runt" + "ime.Endpoints;\r\nusing Amazon.Util;\r\nusing "); - #line 17 "C:\codebase\v3\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Endpoints\EndpointResolver.tt" + #line 17 "C:\Dev\Repos\aws-sdk-net-staging\generator\ServiceClientGeneratorLib\Generators\Endpoints\EndpointResolver.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Config.Namespace)); #line default #line hidden this.Write(".Endpoints;\r\n\r\n#pragma warning disable 1591\r\n\r\nnamespace "); - #line 21 "C:\codebase\v3\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Endpoints\EndpointResolver.tt" + #line 21 "C:\Dev\Repos\aws-sdk-net-staging\generator\ServiceClientGeneratorLib\Generators\Endpoints\EndpointResolver.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Config.Namespace)); #line default #line hidden this.Write(".Internal\r\n{\r\n /// \r\n /// Amazon "); - #line 24 "C:\codebase\v3\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Endpoints\EndpointResolver.tt" + #line 24 "C:\Dev\Repos\aws-sdk-net-staging\generator\ServiceClientGeneratorLib\Generators\Endpoints\EndpointResolver.tt" this.Write(this.ToStringHelper.ToStringWithCulture(this.Config.ClassName)); #line default @@ -69,14 +69,14 @@ public override string TransformText() this.Write(" endpoint resolver.\r\n /// Custom PipelineHandler responsible for resolving end" + "point and setting authentication parameters for "); - #line 25 "C:\codebase\v3\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Endpoints\EndpointResolver.tt" + #line 25 "C:\Dev\Repos\aws-sdk-net-staging\generator\ServiceClientGeneratorLib\Generators\Endpoints\EndpointResolver.tt" this.Write(this.ToStringHelper.ToStringWithCulture(this.Config.ClassName)); #line default #line hidden this.Write(" service requests.\r\n /// Collects values for "); - #line 26 "C:\codebase\v3\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Endpoints\EndpointResolver.tt" + #line 26 "C:\Dev\Repos\aws-sdk-net-staging\generator\ServiceClientGeneratorLib\Generators\Endpoints\EndpointResolver.tt" this.Write(this.ToStringHelper.ToStringWithCulture(this.Config.ClassName)); #line default @@ -84,7 +84,7 @@ public override string TransformText() this.Write("EndpointParameters and then tries to resolve endpoint by calling \r\n /// Resolv" + "eEndpoint method on GlobalEndpoints.Provider if present, otherwise uses "); - #line 27 "C:\codebase\v3\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Endpoints\EndpointResolver.tt" + #line 27 "C:\Dev\Repos\aws-sdk-net-staging\generator\ServiceClientGeneratorLib\Generators\Endpoints\EndpointResolver.tt" this.Write(this.ToStringHelper.ToStringWithCulture(this.Config.ClassName)); #line default @@ -92,7 +92,7 @@ public override string TransformText() this.Write("EndpointProvider.\r\n /// Responsible for setting authentication and http header" + "s provided by resolved endpoint.\r\n /// \r\n public class Amazon"); - #line 30 "C:\codebase\v3\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Endpoints\EndpointResolver.tt" + #line 30 "C:\Dev\Repos\aws-sdk-net-staging\generator\ServiceClientGeneratorLib\Generators\Endpoints\EndpointResolver.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Config.ClassName)); #line default @@ -101,7 +101,7 @@ public override string TransformText() "erviceSpecificHandler(IExecutionContext executionContext, EndpointParameters par" + "ameters)\r\n {\r\n"); - #line 34 "C:\codebase\v3\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Endpoints\EndpointResolver.tt" + #line 34 "C:\Dev\Repos\aws-sdk-net-staging\generator\ServiceClientGeneratorLib\Generators\Endpoints\EndpointResolver.tt" if (Config.ServiceId == "S3") { #line default @@ -129,21 +129,21 @@ public override string TransformText() } "); - #line 56 "C:\codebase\v3\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Endpoints\EndpointResolver.tt" + #line 56 "C:\Dev\Repos\aws-sdk-net-staging\generator\ServiceClientGeneratorLib\Generators\Endpoints\EndpointResolver.tt" } #line default #line hidden this.Write("\r\n"); - #line 58 "C:\codebase\v3\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Endpoints\EndpointResolver.tt" + #line 58 "C:\Dev\Repos\aws-sdk-net-staging\generator\ServiceClientGeneratorLib\Generators\Endpoints\EndpointResolver.tt" if (!this.dontInjectHostPrefixForServices.Contains(Config.ServiceId)) { #line default #line hidden this.Write(" InjectHostPrefix(executionContext.RequestContext);\r\n"); - #line 60 "C:\codebase\v3\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Endpoints\EndpointResolver.tt" + #line 60 "C:\Dev\Repos\aws-sdk-net-staging\generator\ServiceClientGeneratorLib\Generators\Endpoints\EndpointResolver.tt" } #line default @@ -151,35 +151,35 @@ public override string TransformText() this.Write(" }\r\n\r\n protected override EndpointParameters MapEndpointsParameters" + "(IRequestContext requestContext)\r\n {\r\n var config = (Amazon"); - #line 65 "C:\codebase\v3\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Endpoints\EndpointResolver.tt" + #line 65 "C:\Dev\Repos\aws-sdk-net-staging\generator\ServiceClientGeneratorLib\Generators\Endpoints\EndpointResolver.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Config.ClassName)); #line default #line hidden this.Write("Config)requestContext.ClientConfig;\r\n var result = new "); - #line 66 "C:\codebase\v3\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Endpoints\EndpointResolver.tt" + #line 66 "C:\Dev\Repos\aws-sdk-net-staging\generator\ServiceClientGeneratorLib\Generators\Endpoints\EndpointResolver.tt" this.Write(this.ToStringHelper.ToStringWithCulture(Config.ClassName)); #line default #line hidden this.Write("EndpointParameters();\r\n"); - #line 67 "C:\codebase\v3\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Endpoints\EndpointResolver.tt" + #line 67 "C:\Dev\Repos\aws-sdk-net-staging\generator\ServiceClientGeneratorLib\Generators\Endpoints\EndpointResolver.tt" this.Write(this.ToStringHelper.ToStringWithCulture(this.AssignBuiltins())); #line default #line hidden this.Write("\r\n"); - #line 68 "C:\codebase\v3\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Endpoints\EndpointResolver.tt" + #line 68 "C:\Dev\Repos\aws-sdk-net-staging\generator\ServiceClientGeneratorLib\Generators\Endpoints\EndpointResolver.tt" this.Write(this.ToStringHelper.ToStringWithCulture(this.AssignClientContext())); #line default #line hidden this.Write("\r\n"); - #line 69 "C:\codebase\v3\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Endpoints\EndpointResolver.tt" + #line 69 "C:\Dev\Repos\aws-sdk-net-staging\generator\ServiceClientGeneratorLib\Generators\Endpoints\EndpointResolver.tt" if (Config.EndpointsRuleSet.parameters.ContainsKey("Region")) { #line default @@ -214,13 +214,21 @@ public override string TransformText() "); - #line 98 "C:\codebase\v3\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Endpoints\EndpointResolver.tt" + #line 98 "C:\Dev\Repos\aws-sdk-net-staging\generator\ServiceClientGeneratorLib\Generators\Endpoints\EndpointResolver.tt" } #line default #line hidden - #line 99 "C:\codebase\v3\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Endpoints\EndpointResolver.tt" + #line 99 "C:\Dev\Repos\aws-sdk-net-staging\generator\ServiceClientGeneratorLib\Generators\Endpoints\EndpointResolver.tt" + + // GetACL and PutACL are deprecated in V4 and may be removed in the future + + + #line default + #line hidden + + #line 102 "C:\Dev\Repos\aws-sdk-net-staging\generator\ServiceClientGeneratorLib\Generators\Endpoints\EndpointResolver.tt" if (Config.ClassName == "S3") { #line default @@ -232,16 +240,28 @@ public override string TransformText() result.Bucket = request.BucketName; return result; } + if (requestContext.RequestName == ""GetACLRequest"") { + result.UseS3ExpressControlEndpoint = true; + var request = (GetACLRequest)requestContext.OriginalRequest; + result.Bucket = request.BucketName; + return result; + } + if (requestContext.RequestName == ""PutACLRequest"") { + result.UseS3ExpressControlEndpoint = true; + var request = (PutACLRequest)requestContext.OriginalRequest; + result.Bucket = request.BucketName; + return result; + } "); - #line 107 "C:\codebase\v3\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Endpoints\EndpointResolver.tt" + #line 122 "C:\Dev\Repos\aws-sdk-net-staging\generator\ServiceClientGeneratorLib\Generators\Endpoints\EndpointResolver.tt" } #line default #line hidden this.Write("\r\n // Assign staticContextParams and contextParam per operation\r\n"); - #line 110 "C:\codebase\v3\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Endpoints\EndpointResolver.tt" + #line 125 "C:\Dev\Repos\aws-sdk-net-staging\generator\ServiceClientGeneratorLib\Generators\Endpoints\EndpointResolver.tt" this.Write(this.ToStringHelper.ToStringWithCulture(this.AssignOperationContext())); #line default diff --git a/generator/ServiceClientGeneratorLib/Generators/Endpoints/EndpointResolver.tt b/generator/ServiceClientGeneratorLib/Generators/Endpoints/EndpointResolver.tt index 538a14c7501d..1f6f210dd4f7 100644 --- a/generator/ServiceClientGeneratorLib/Generators/Endpoints/EndpointResolver.tt +++ b/generator/ServiceClientGeneratorLib/Generators/Endpoints/EndpointResolver.tt @@ -96,6 +96,9 @@ namespace <#=Config.Namespace#>.Internal } <#}#> +<# + // GetACL and PutACL are deprecated in V4 and may be removed in the future +#> <#if (Config.ClassName == "S3") {#> // Special handling of GetPreSignedUrlRequest if (requestContext.Request.RequestName == "GetPreSignedUrlRequest") @@ -104,6 +107,18 @@ namespace <#=Config.Namespace#>.Internal result.Bucket = request.BucketName; return result; } + if (requestContext.RequestName == "GetACLRequest") { + result.UseS3ExpressControlEndpoint = true; + var request = (GetACLRequest)requestContext.OriginalRequest; + result.Bucket = request.BucketName; + return result; + } + if (requestContext.RequestName == "PutACLRequest") { + result.UseS3ExpressControlEndpoint = true; + var request = (PutACLRequest)requestContext.OriginalRequest; + result.Bucket = request.BucketName; + return result; + } <#}#> // Assign staticContextParams and contextParam per operation diff --git a/generator/ServiceModels/s3/s3.customizations.json b/generator/ServiceModels/s3/s3.customizations.json index 0a92cbe71a45..4ffbded193f2 100644 --- a/generator/ServiceModels/s3/s3.customizations.json +++ b/generator/ServiceModels/s3/s3.customizations.json @@ -228,15 +228,9 @@ "DeleteBucketLifecycle": { "name": "DeleteLifecycleConfiguration" }, - "GetBucketAcl": { - "name": "GetACL" - }, "GetBucketCors": { "name": "GetCORSConfiguration" }, - "GetObjectAcl": { - "exclude": true - }, "HeadBucket": { "internal": true }, @@ -246,15 +240,9 @@ "ListObjectVersions": { "name": "ListVersions" }, - "PutBucketAcl": { - "name": "PutACL" - }, "PutBucketCors": { "name": "PutCORSConfiguration" }, - "PutObjectAcl": { - "exclude": true - }, "UploadPartCopy": { "name": "CopyPart" }, diff --git a/sdk/src/Services/S3/Custom/AmazonS3Client.Extensions.cs b/sdk/src/Services/S3/Custom/AmazonS3Client.Extensions.cs index b45c38b86227..8e01a3653e29 100644 --- a/sdk/src/Services/S3/Custom/AmazonS3Client.Extensions.cs +++ b/sdk/src/Services/S3/Custom/AmazonS3Client.Extensions.cs @@ -40,6 +40,7 @@ using Amazon.Runtime.Endpoints; using System.Diagnostics.CodeAnalysis; using System.ComponentModel.Design; +using System.Threading; namespace Amazon.S3 { @@ -336,7 +337,7 @@ private SignatureVersion DetermineSignatureVersionToUse(GetPreSignedUrlRequest r } //Since this method will always be called in the context of a directory (S3Express) bucket, we must force SiV4 if the expiration date is under 7 days. - private static void ConvertToS3Express(ImmutableCredentials immutableCredentials, ExecutionContext context, ref SignatureVersion signatureVersion, AmazonS3Config config) + private static void ConvertToS3Express(ImmutableCredentials immutableCredentials, Amazon.Runtime.Internal.ExecutionContext context, ref SignatureVersion signatureVersion, AmazonS3Config config) { var irequest = context.RequestContext.Request; var request = irequest.OriginalRequest as GetPreSignedUrlRequest; @@ -579,6 +580,783 @@ string ICoreAmazonS3.GeneratePreSignedURL(string bucketName, string objectKey, D return this.GetPreSignedURL(request); } + #endregion + #region GetACL + /// + /// + /// + /// This operation is not supported by directory buckets. + /// + /// + /// + /// This implementation of the GET action uses the acl subresource to return + /// the access control list (ACL) of a bucket. To use GET to return the ACL of + /// the bucket, you must have the READ_ACP access to the bucket. If READ_ACP + /// permission is granted to the anonymous user, you can return the ACL of the bucket + /// without using an authorization header. + /// + /// + /// + /// When you use this API operation with an access point, provide the alias of the access + /// point in place of the bucket name. + /// + /// + /// + /// When you use this API operation with an Object Lambda access point, provide the alias + /// of the Object Lambda access point in place of the bucket name. If the Object Lambda + /// access point alias in a request is not valid, the error code InvalidAccessPointAliasError + /// is returned. For more information about InvalidAccessPointAliasError, see List + /// of Error Codes. + /// + /// + /// + /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, requests + /// to read ACLs are still supported and return the bucket-owner-full-control ACL + /// with the owner being the account that created the bucket. For more information, see + /// + /// Controlling object ownership and disabling ACLs in the Amazon S3 User Guide. + /// + /// + /// + /// The following operations are related to GetBucketAcl: + /// + /// + /// + /// Specifies the S3 bucket whose ACL is being requested. When you use this API operation with an access point, provide the alias of the access point in place of the bucket name. When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. For more information about InvalidAccessPointAliasError, see List of Error Codes. + /// + /// The response from the GetACL service method, as returned by S3. + /// REST API Reference for GetACL Operation + [Obsolete("GetACL combines both GetBucketAcl and GetObjectAcl and is deprecated. Please use the separated GetObjectAcl and GetBucketAcl operations.")] + public virtual GetACLResponse GetACL(string bucketName) + { + var request = new GetACLRequest(); + request.BucketName = bucketName; + return GetACL(request); + } + + /// + /// + /// + /// This operation is not supported by directory buckets. + /// + /// + /// + /// This implementation of the GET action uses the acl subresource to return + /// the access control list (ACL) of a bucket. To use GET to return the ACL of + /// the bucket, you must have the READ_ACP access to the bucket. If READ_ACP + /// permission is granted to the anonymous user, you can return the ACL of the bucket + /// without using an authorization header. + /// + /// + /// + /// When you use this API operation with an access point, provide the alias of the access + /// point in place of the bucket name. + /// + /// + /// + /// When you use this API operation with an Object Lambda access point, provide the alias + /// of the Object Lambda access point in place of the bucket name. If the Object Lambda + /// access point alias in a request is not valid, the error code InvalidAccessPointAliasError + /// is returned. For more information about InvalidAccessPointAliasError, see List + /// of Error Codes. + /// + /// + /// + /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, requests + /// to read ACLs are still supported and return the bucket-owner-full-control ACL + /// with the owner being the account that created the bucket. For more information, see + /// + /// Controlling object ownership and disabling ACLs in the Amazon S3 User Guide. + /// + /// + /// + /// The following operations are related to GetBucketAcl: + /// + /// + /// + /// Container for the necessary parameters to execute the GetACL service method. + /// + /// The response from the GetACL service method, as returned by S3. + /// REST API Reference for GetACL Operation + [Obsolete("GetACL combines both GetBucketAcl and GetObjectAcl and is deprecated. Please use the separated GetObjectAcl and GetBucketAcl operations.")] + public virtual GetACLResponse GetACL(GetACLRequest request) + { + var options = new InvokeOptions(); + options.RequestMarshaller = GetACLRequestMarshaller.Instance; + options.ResponseUnmarshaller = GetACLResponseUnmarshaller.Instance; + + return Invoke(request, options); + } + + + /// + /// + /// + /// This operation is not supported by directory buckets. + /// + /// + /// + /// This implementation of the GET action uses the acl subresource to return + /// the access control list (ACL) of a bucket. To use GET to return the ACL of + /// the bucket, you must have the READ_ACP access to the bucket. If READ_ACP + /// permission is granted to the anonymous user, you can return the ACL of the bucket + /// without using an authorization header. + /// + /// + /// + /// When you use this API operation with an access point, provide the alias of the access + /// point in place of the bucket name. + /// + /// + /// + /// When you use this API operation with an Object Lambda access point, provide the alias + /// of the Object Lambda access point in place of the bucket name. If the Object Lambda + /// access point alias in a request is not valid, the error code InvalidAccessPointAliasError + /// is returned. For more information about InvalidAccessPointAliasError, see List + /// of Error Codes. + /// + /// + /// + /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, requests + /// to read ACLs are still supported and return the bucket-owner-full-control ACL + /// with the owner being the account that created the bucket. For more information, see + /// + /// Controlling object ownership and disabling ACLs in the Amazon S3 User Guide. + /// + /// + /// + /// The following operations are related to GetBucketAcl: + /// + /// + /// + /// Specifies the S3 bucket whose ACL is being requested. When you use this API operation with an access point, provide the alias of the access point in place of the bucket name. When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. For more information about InvalidAccessPointAliasError, see List of Error Codes. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// + /// The response from the GetACL service method, as returned by S3. + /// REST API Reference for GetACL Operation + [Obsolete("GetACL combines both GetBucketAcl and GetObjectAcl and is deprecated. Please use the separated GetObjectAcl and GetBucketAcl operations.")] + public virtual Task GetACLAsync(string bucketName, CancellationToken cancellationToken = default(CancellationToken)) + { + var request = new GetACLRequest(); + request.BucketName = bucketName; + return GetACLAsync(request, cancellationToken); + } + + + /// + /// + /// + /// This operation is not supported by directory buckets. + /// + /// + /// + /// This implementation of the GET action uses the acl subresource to return + /// the access control list (ACL) of a bucket. To use GET to return the ACL of + /// the bucket, you must have the READ_ACP access to the bucket. If READ_ACP + /// permission is granted to the anonymous user, you can return the ACL of the bucket + /// without using an authorization header. + /// + /// + /// + /// When you use this API operation with an access point, provide the alias of the access + /// point in place of the bucket name. + /// + /// + /// + /// When you use this API operation with an Object Lambda access point, provide the alias + /// of the Object Lambda access point in place of the bucket name. If the Object Lambda + /// access point alias in a request is not valid, the error code InvalidAccessPointAliasError + /// is returned. For more information about InvalidAccessPointAliasError, see List + /// of Error Codes. + /// + /// + /// + /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, requests + /// to read ACLs are still supported and return the bucket-owner-full-control ACL + /// with the owner being the account that created the bucket. For more information, see + /// + /// Controlling object ownership and disabling ACLs in the Amazon S3 User Guide. + /// + /// + /// + /// The following operations are related to GetBucketAcl: + /// + /// + /// + /// Container for the necessary parameters to execute the GetACL service method. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// + /// The response from the GetACL service method, as returned by S3. + /// REST API Reference for GetACL Operation + [Obsolete("GetACL combines both GetBucketAcl and GetObjectAcl and is deprecated. Please use the separated GetObjectAcl and GetBucketAcl operations.")] + public virtual Task GetACLAsync(GetACLRequest request, CancellationToken cancellationToken = default(CancellationToken)) + { + var options = new InvokeOptions(); + options.RequestMarshaller = GetACLRequestMarshaller.Instance; + options.ResponseUnmarshaller = GetACLResponseUnmarshaller.Instance; + + return InvokeAsync(request, options, cancellationToken); + } + + #endregion + #region PutACL + + + /// + /// + /// + /// This operation is not supported by directory buckets. + /// + /// + /// + /// Sets the permissions on an existing bucket using access control lists (ACL). For more + /// information, see Using + /// ACLs. To set the ACL of a bucket, you must have the WRITE_ACP permission. + /// + /// + /// + /// You can use one of the following two ways to set a bucket's permissions: + /// + ///
  • + /// + /// Specify the ACL in the request body + /// + ///
  • + /// + /// Specify permissions using request headers + /// + ///
+ /// + /// You cannot specify access permission using both the body and the request headers. + /// + /// + /// + /// Depending on your application needs, you may choose to set the ACL on a bucket using + /// either the request body or the headers. For example, if you have an existing application + /// that updates a bucket ACL using the request body, then you can continue to use that + /// approach. + /// + /// + /// + /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, ACLs + /// are disabled and no longer affect permissions. You must use policies to grant access + /// to your bucket and the objects in it. Requests to set ACLs or update ACLs fail and + /// return the AccessControlListNotSupported error code. Requests to read ACLs + /// are still supported. For more information, see Controlling + /// object ownership in the Amazon S3 User Guide. + /// + ///
Permissions
+ /// + /// You can set access permissions by using one of the following methods: + /// + ///
  • + /// + /// Specify a canned ACL with the x-amz-acl request header. Amazon S3 supports + /// a set of predefined ACLs, known as canned ACLs. Each canned ACL has a predefined + /// set of grantees and permissions. Specify the canned ACL name as the value of x-amz-acl. + /// If you use this header, you cannot use other access control-specific headers in your + /// request. For more information, see Canned + /// ACL. + /// + ///
  • + /// + /// Specify access permissions explicitly with the x-amz-grant-read, x-amz-grant-read-acp, + /// x-amz-grant-write-acp, and x-amz-grant-full-control headers. When using + /// these headers, you specify explicit access permissions and grantees (Amazon Web Services + /// accounts or Amazon S3 groups) who will receive the permission. If you use these ACL-specific + /// headers, you cannot use the x-amz-acl header to set a canned ACL. These parameters + /// map to the set of permissions that Amazon S3 supports in an ACL. For more information, + /// see Access + /// Control List (ACL) Overview. + /// + /// + /// + /// You specify each grantee as a type=value pair, where the type is one of the following: + /// + ///
    • + /// + /// id – if the value specified is the canonical user ID of an Amazon Web Services + /// account + /// + ///
    • + /// + /// uri – if you are granting permissions to a predefined group + /// + ///
    • + /// + /// emailAddress – if the value specified is the email address of an Amazon Web + /// Services account + /// + /// + /// + /// Using email addresses to specify a grantee is only supported in the following Amazon + /// Web Services Regions: + /// + ///
      • + /// + /// US East (N. Virginia) + /// + ///
      • + /// + /// US West (N. California) + /// + ///
      • + /// + /// US West (Oregon) + /// + ///
      • + /// + /// Asia Pacific (Singapore) + /// + ///
      • + /// + /// Asia Pacific (Sydney) + /// + ///
      • + /// + /// Asia Pacific (Tokyo) + /// + ///
      • + /// + /// Europe (Ireland) + /// + ///
      • + /// + /// South America (São Paulo) + /// + ///
      + /// + /// For a list of all the Amazon S3 supported Regions and endpoints, see Regions + /// and Endpoints in the Amazon Web Services General Reference. + /// + ///
    + /// + /// For example, the following x-amz-grant-write header grants create, overwrite, + /// and delete objects permission to LogDelivery group predefined by Amazon S3 and two + /// Amazon Web Services accounts identified by their email addresses. + /// + /// + /// + /// x-amz-grant-write: uri="http://acs.amazonaws.com/groups/s3/LogDelivery", id="111122223333", + /// id="555566667777" + /// + ///
+ /// + /// You can use either a canned ACL or specify access permissions explicitly. You cannot + /// do both. + /// + ///
Grantee Values
+ /// + /// You can specify the person (grantee) to whom you're assigning access rights (using + /// request elements) in the following ways: + /// + ///
  • + /// + /// By the person's ID: + /// + /// + /// + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"><ID><>ID<></ID><DisplayName><>GranteesEmail<></DisplayName> + /// </Grantee> + /// + /// + /// + /// DisplayName is optional and ignored in the request + /// + ///
  • + /// + /// By URI: + /// + /// + /// + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Group"><URI><>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<></URI></Grantee> + /// + /// + ///
  • + /// + /// By Email address: + /// + /// + /// + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="AmazonCustomerByEmail"><EmailAddress><>Grantees@email.com<></EmailAddress>&</Grantee> + /// + /// + /// + /// + /// The grantee is resolved to the CanonicalUser and, in a response to a GET Object acl + /// request, appears as the CanonicalUser. + /// + /// + /// + /// Using email addresses to specify a grantee is only supported in the following Amazon + /// Web Services Regions: + /// + ///
    • + /// + /// US East (N. Virginia) + /// + ///
    • + /// + /// US West (N. California) + /// + ///
    • + /// + /// US West (Oregon) + /// + ///
    • + /// + /// Asia Pacific (Singapore) + /// + ///
    • + /// + /// Asia Pacific (Sydney) + /// + ///
    • + /// + /// Asia Pacific (Tokyo) + /// + ///
    • + /// + /// Europe (Ireland) + /// + ///
    • + /// + /// South America (São Paulo) + /// + ///
    + /// + /// For a list of all the Amazon S3 supported Regions and endpoints, see Regions + /// and Endpoints in the Amazon Web Services General Reference. + /// + ///
+ /// + /// The following operations are related to PutBucketAcl: + /// + /// + ///
+ /// Container for the necessary parameters to execute the PutACL service method. + /// + /// The response from the PutACL service method, as returned by S3. + /// REST API Reference for PutACL Operation + [Obsolete("PutACL combines both PutBucketAcl and PutObjectAcl and is deprecated. Please use the separated PutObjectAcl and PutBucketAcl operations.")] + public virtual PutACLResponse PutACL(PutACLRequest request) + { + var options = new InvokeOptions(); + options.RequestMarshaller = PutACLRequestMarshaller.Instance; + options.ResponseUnmarshaller = PutACLResponseUnmarshaller.Instance; + + return Invoke(request, options); + } + + + /// + /// + /// + /// This operation is not supported by directory buckets. + /// + /// + /// + /// Sets the permissions on an existing bucket using access control lists (ACL). For more + /// information, see Using + /// ACLs. To set the ACL of a bucket, you must have the WRITE_ACP permission. + /// + /// + /// + /// You can use one of the following two ways to set a bucket's permissions: + /// + ///
  • + /// + /// Specify the ACL in the request body + /// + ///
  • + /// + /// Specify permissions using request headers + /// + ///
+ /// + /// You cannot specify access permission using both the body and the request headers. + /// + /// + /// + /// Depending on your application needs, you may choose to set the ACL on a bucket using + /// either the request body or the headers. For example, if you have an existing application + /// that updates a bucket ACL using the request body, then you can continue to use that + /// approach. + /// + /// + /// + /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, ACLs + /// are disabled and no longer affect permissions. You must use policies to grant access + /// to your bucket and the objects in it. Requests to set ACLs or update ACLs fail and + /// return the AccessControlListNotSupported error code. Requests to read ACLs + /// are still supported. For more information, see Controlling + /// object ownership in the Amazon S3 User Guide. + /// + ///
Permissions
+ /// + /// You can set access permissions by using one of the following methods: + /// + ///
  • + /// + /// Specify a canned ACL with the x-amz-acl request header. Amazon S3 supports + /// a set of predefined ACLs, known as canned ACLs. Each canned ACL has a predefined + /// set of grantees and permissions. Specify the canned ACL name as the value of x-amz-acl. + /// If you use this header, you cannot use other access control-specific headers in your + /// request. For more information, see Canned + /// ACL. + /// + ///
  • + /// + /// Specify access permissions explicitly with the x-amz-grant-read, x-amz-grant-read-acp, + /// x-amz-grant-write-acp, and x-amz-grant-full-control headers. When using + /// these headers, you specify explicit access permissions and grantees (Amazon Web Services + /// accounts or Amazon S3 groups) who will receive the permission. If you use these ACL-specific + /// headers, you cannot use the x-amz-acl header to set a canned ACL. These parameters + /// map to the set of permissions that Amazon S3 supports in an ACL. For more information, + /// see Access + /// Control List (ACL) Overview. + /// + /// + /// + /// You specify each grantee as a type=value pair, where the type is one of the following: + /// + ///
    • + /// + /// id – if the value specified is the canonical user ID of an Amazon Web Services + /// account + /// + ///
    • + /// + /// uri – if you are granting permissions to a predefined group + /// + ///
    • + /// + /// emailAddress – if the value specified is the email address of an Amazon Web + /// Services account + /// + /// + /// + /// Using email addresses to specify a grantee is only supported in the following Amazon + /// Web Services Regions: + /// + ///
      • + /// + /// US East (N. Virginia) + /// + ///
      • + /// + /// US West (N. California) + /// + ///
      • + /// + /// US West (Oregon) + /// + ///
      • + /// + /// Asia Pacific (Singapore) + /// + ///
      • + /// + /// Asia Pacific (Sydney) + /// + ///
      • + /// + /// Asia Pacific (Tokyo) + /// + ///
      • + /// + /// Europe (Ireland) + /// + ///
      • + /// + /// South America (São Paulo) + /// + ///
      + /// + /// For a list of all the Amazon S3 supported Regions and endpoints, see Regions + /// and Endpoints in the Amazon Web Services General Reference. + /// + ///
    + /// + /// For example, the following x-amz-grant-write header grants create, overwrite, + /// and delete objects permission to LogDelivery group predefined by Amazon S3 and two + /// Amazon Web Services accounts identified by their email addresses. + /// + /// + /// + /// x-amz-grant-write: uri="http://acs.amazonaws.com/groups/s3/LogDelivery", id="111122223333", + /// id="555566667777" + /// + ///
+ /// + /// You can use either a canned ACL or specify access permissions explicitly. You cannot + /// do both. + /// + ///
Grantee Values
+ /// + /// You can specify the person (grantee) to whom you're assigning access rights (using + /// request elements) in the following ways: + /// + ///
  • + /// + /// By the person's ID: + /// + /// + /// + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"><ID><>ID<></ID><DisplayName><>GranteesEmail<></DisplayName> + /// </Grantee> + /// + /// + /// + /// DisplayName is optional and ignored in the request + /// + ///
  • + /// + /// By URI: + /// + /// + /// + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Group"><URI><>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<></URI></Grantee> + /// + /// + ///
  • + /// + /// By Email address: + /// + /// + /// + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="AmazonCustomerByEmail"><EmailAddress><>Grantees@email.com<></EmailAddress>&</Grantee> + /// + /// + /// + /// + /// The grantee is resolved to the CanonicalUser and, in a response to a GET Object acl + /// request, appears as the CanonicalUser. + /// + /// + /// + /// Using email addresses to specify a grantee is only supported in the following Amazon + /// Web Services Regions: + /// + ///
    • + /// + /// US East (N. Virginia) + /// + ///
    • + /// + /// US West (N. California) + /// + ///
    • + /// + /// US West (Oregon) + /// + ///
    • + /// + /// Asia Pacific (Singapore) + /// + ///
    • + /// + /// Asia Pacific (Sydney) + /// + ///
    • + /// + /// Asia Pacific (Tokyo) + /// + ///
    • + /// + /// Europe (Ireland) + /// + ///
    • + /// + /// South America (São Paulo) + /// + ///
    + /// + /// For a list of all the Amazon S3 supported Regions and endpoints, see Regions + /// and Endpoints in the Amazon Web Services General Reference. + /// + ///
+ /// + /// The following operations are related to PutBucketAcl: + /// + /// + ///
+ /// Container for the necessary parameters to execute the PutACL service method. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// + /// The response from the PutACL service method, as returned by S3. + /// REST API Reference for PutACL Operation + [Obsolete("PutACL combines both PutBucketAcl and PutObjectAcl and is deprecated. Please use the separated PutObjectAcl and PutBucketAcl operations.")] + public virtual Task PutACLAsync(PutACLRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) + { + var options = new InvokeOptions(); + options.RequestMarshaller = PutACLRequestMarshaller.Instance; + options.ResponseUnmarshaller = PutACLResponseUnmarshaller.Instance; + + return InvokeAsync(request, options, cancellationToken); + } + #endregion } + } diff --git a/sdk/src/Services/S3/Custom/Model/GetBucketACLRequest.cs b/sdk/src/Services/S3/Custom/Model/GetBucketACLRequest.cs new file mode 100644 index 000000000000..24c288d06f21 --- /dev/null +++ b/sdk/src/Services/S3/Custom/Model/GetBucketACLRequest.cs @@ -0,0 +1,137 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +/* + * Do not modify this file. This file is generated from the s3-2006-03-01.normal.json service model. + */ +using System; +using System.Collections.Generic; +using System.Xml.Serialization; +using System.Text; +using System.IO; +using System.Net; + +using Amazon.Runtime; +using Amazon.Runtime.Internal; + +#pragma warning disable CS0612,CS0618,CS1570 +namespace Amazon.S3.Model +{ + /// + /// Container for the parameters to the GetBucketAcl operation. + /// + /// + /// This operation is not supported by directory buckets. + /// + /// + /// + /// This implementation of the GET action uses the acl subresource to return + /// the access control list (ACL) of a bucket. To use GET to return the ACL of + /// the bucket, you must have the READ_ACP access to the bucket. If READ_ACP + /// permission is granted to the anonymous user, you can return the ACL of the bucket + /// without using an authorization header. + /// + /// + /// + /// When you use this API operation with an access point, provide the alias of the access + /// point in place of the bucket name. + /// + /// + /// + /// When you use this API operation with an Object Lambda access point, provide the alias + /// of the Object Lambda access point in place of the bucket name. If the Object Lambda + /// access point alias in a request is not valid, the error code InvalidAccessPointAliasError + /// is returned. For more information about InvalidAccessPointAliasError, see List + /// of Error Codes. + /// + /// + /// + /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, requests + /// to read ACLs are still supported and return the bucket-owner-full-control ACL + /// with the owner being the account that created the bucket. For more information, see + /// + /// Controlling object ownership and disabling ACLs in the Amazon S3 User Guide. + /// + /// + /// + /// The following operations are related to GetBucketAcl: + /// + /// + /// + public partial class GetBucketAclRequest : AmazonWebServiceRequest + { + private string _bucketName; + private string _expectedBucketOwner; + + /// + /// Gets and sets the property BucketName. + /// + /// Specifies the S3 bucket whose ACL is being requested. + /// + /// + /// + /// When you use this API operation with an access point, provide the alias of the access + /// point in place of the bucket name. + /// + /// + /// + /// When you use this API operation with an Object Lambda access point, provide the alias + /// of the Object Lambda access point in place of the bucket name. If the Object Lambda + /// access point alias in a request is not valid, the error code InvalidAccessPointAliasError + /// is returned. For more information about InvalidAccessPointAliasError, see List + /// of Error Codes. + /// + /// + public string BucketName + { + get { return this._bucketName; } + set { this._bucketName = value; } + } + + // Check to see if BucketName property is set + internal bool IsSetBucketName() + { + return this._bucketName != null; + } + + /// + /// Gets and sets the property ExpectedBucketOwner. + /// + /// The account ID of the expected bucket owner. If the account ID that you provide does + /// not match the actual owner of the bucket, the request fails with the HTTP status code + /// 403 Forbidden (access denied). + /// + /// + public string ExpectedBucketOwner + { + get { return this._expectedBucketOwner; } + set { this._expectedBucketOwner = value; } + } + + // Check to see if ExpectedBucketOwner property is set + internal bool IsSetExpectedBucketOwner() + { + return !string.IsNullOrEmpty(this._expectedBucketOwner); + } + + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Model/GetBucketACLResponse.cs b/sdk/src/Services/S3/Custom/Model/GetBucketACLResponse.cs new file mode 100644 index 000000000000..cc39cc0f4160 --- /dev/null +++ b/sdk/src/Services/S3/Custom/Model/GetBucketACLResponse.cs @@ -0,0 +1,77 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +/* + * Do not modify this file. This file is generated from the s3-2006-03-01.normal.json service model. + */ +using System; +using System.Collections.Generic; +using System.Xml.Serialization; +using System.Text; +using System.IO; +using System.Net; + +using Amazon.Runtime; +using Amazon.Runtime.Internal; + +#pragma warning disable CS0612,CS0618,CS1570 +namespace Amazon.S3.Model +{ + /// + /// This is the response object from the GetBucketAcl operation. + /// + public partial class GetBucketAclResponse : AmazonWebServiceResponse + { + private List _grants = AWSConfigs.InitializeCollections ? new List() : null; + private Owner _owner; + + /// + /// Gets and sets the property Grants. + /// + /// A list of grants. + /// + /// + public List Grants + { + get { return this._grants; } + set { this._grants = value; } + } + + // Check to see if Grants property is set + internal bool IsSetGrants() + { + return this._grants != null && (this._grants.Count > 0 || !AWSConfigs.InitializeCollections); + } + + /// + /// Gets and sets the property Owner. + /// + /// Container for the bucket owner's display name and ID. + /// + /// + public Owner Owner + { + get { return this._owner; } + set { this._owner = value; } + } + + // Check to see if Owner property is set + internal bool IsSetOwner() + { + return this._owner != null; + } + + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Model/GetObjectACLRequest.cs b/sdk/src/Services/S3/Custom/Model/GetObjectACLRequest.cs new file mode 100644 index 000000000000..61072716ac8d --- /dev/null +++ b/sdk/src/Services/S3/Custom/Model/GetObjectACLRequest.cs @@ -0,0 +1,202 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + + +using System; +using System.Collections.Generic; +using System.Xml.Serialization; +using System.Text; +using System.IO; +using System.Net; + +using Amazon.Runtime; +using Amazon.Runtime.Internal; + +#pragma warning disable CS0612,CS0618,CS1570 +namespace Amazon.S3.Model +{ + /// + /// Container for the parameters to the GetObjectAcl operation. + /// + /// + /// This operation is not supported by directory buckets. + /// + /// + /// + /// Returns the access control list (ACL) of an object. To use this operation, you must + /// have s3:GetObjectAcl permissions or READ_ACP access to the object. For + /// more information, see Mapping + /// of ACL permissions and access policy permissions in the Amazon S3 User Guide + /// + /// + /// + /// + /// This functionality is not supported for Amazon S3 on Outposts. + /// + /// + /// + /// By default, GET returns ACL information about the current version of an object. To + /// return ACL information about a different version, use the versionId subresource. + /// + /// + /// + /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, requests + /// to read ACLs are still supported and return the bucket-owner-full-control ACL + /// with the owner being the account that created the bucket. For more information, see + /// + /// Controlling object ownership and disabling ACLs in the Amazon S3 User Guide. + /// + /// + /// + /// The following operations are related to GetObjectAcl: + /// + /// + /// + public partial class GetObjectAclRequest : AmazonWebServiceRequest + { + private string _bucketName; + private string _expectedBucketOwner; + private string _key; + private RequestPayer _requestPayer; + private string _versionId; + + /// + /// Gets and sets the property BucketName. + /// + /// The bucket name that contains the object for which to get the ACL information. + /// + /// + /// + /// Access points - When you use this action with an access point, you must provide + /// the alias of the access point in place of the bucket name or specify the access point + /// ARN. When using the access point ARN, 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. + /// + /// + public string BucketName + { + get { return this._bucketName; } + set { this._bucketName = value; } + } + + // Check to see if BucketName property is set + internal bool IsSetBucketName() + { + return this._bucketName != null; + } + + /// + /// Gets and sets the property ExpectedBucketOwner. + /// + /// The account ID of the expected bucket owner. If the account ID that you provide does + /// not match the actual owner of the bucket, the request fails with the HTTP status code + /// 403 Forbidden (access denied). + /// + /// + public string ExpectedBucketOwner + { + get { return this._expectedBucketOwner; } + set { this._expectedBucketOwner = value; } + } + + // Check to see if ExpectedBucketOwner property is set + internal bool IsSetExpectedBucketOwner() + { + return !string.IsNullOrEmpty(this._expectedBucketOwner); + } + + /// + /// Gets and sets the property Key. + /// + /// The key of the object for which to get the ACL information. + /// + /// + [AWSProperty(Required = true, Min = 1)] + public string Key + { + get { return this._key; } + set { this._key = value; } + } + + // Check to see if Key property is set + internal bool IsSetKey() + { + return this._key != null; + } + + /// + /// Gets and sets the property RequestPayer. + /// + public RequestPayer RequestPayer + { + get { return this._requestPayer; } + set { this._requestPayer = value; } + } + + // Check to see if RequestPayer property is set + internal bool IsSetRequestPayer() + { + return !string.IsNullOrEmpty(this._requestPayer); + } + + /// + /// Gets and sets the property VersionId. + /// + /// Version ID used to reference a specific version of the object. + /// + /// + /// + /// This functionality is not supported for directory buckets. + /// + /// + /// + public string VersionId + { + get { return this._versionId; } + set { this._versionId = value; } + } + + // Check to see if VersionId property is set + internal bool IsSetVersionId() + { + return this._versionId != null; + } + + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Model/GetObjectACLResponse.cs b/sdk/src/Services/S3/Custom/Model/GetObjectACLResponse.cs new file mode 100644 index 000000000000..716bb7b7eb60 --- /dev/null +++ b/sdk/src/Services/S3/Custom/Model/GetObjectACLResponse.cs @@ -0,0 +1,90 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +using System; +using System.Collections.Generic; +using System.Xml.Serialization; +using System.Text; +using System.IO; +using System.Net; + +using Amazon.Runtime; +using Amazon.Runtime.Internal; + +#pragma warning disable CS0612,CS0618,CS1570 +namespace Amazon.S3.Model +{ + /// + /// This is the response object from the GetObjectAcl operation. + /// + public partial class GetObjectAclResponse : AmazonWebServiceResponse + { + private List _grants = AWSConfigs.InitializeCollections ? new List() : null; + private Owner _owner; + private RequestCharged _requestCharged; + + /// + /// Gets and sets the property Grants. + /// + /// A list of grants. + /// + /// + public List Grants + { + get { return this._grants; } + set { this._grants = value; } + } + + // Check to see if Grants property is set + internal bool IsSetGrants() + { + return this._grants != null && (this._grants.Count > 0 || !AWSConfigs.InitializeCollections); + } + + /// + /// Gets and sets the property Owner. + /// + /// Container for the bucket owner's display name and ID. + /// + /// + public Owner Owner + { + get { return this._owner; } + set { this._owner = value; } + } + + // Check to see if Owner property is set + internal bool IsSetOwner() + { + return this._owner != null; + } + + /// + /// Gets and sets the property RequestCharged. + /// + public RequestCharged RequestCharged + { + get { return this._requestCharged; } + set { this._requestCharged = value; } + } + + // Check to see if RequestCharged property is set + internal bool IsSetRequestCharged() + { + return !string.IsNullOrEmpty(this._requestCharged); + } + + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/GetACLRequestMarshaller.cs b/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/GetACLRequestMarshaller.cs index 61c78d582611..f32cf22caa10 100644 --- a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/GetACLRequestMarshaller.cs +++ b/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/GetACLRequestMarshaller.cs @@ -43,7 +43,7 @@ public IRequest Marshall(GetACLRequest getObjectAclRequest) if (string.IsNullOrEmpty(getObjectAclRequest.BucketName)) throw new System.ArgumentException("BucketName is a required property and must be set before making this call.", "GetACLRequest.BucketName"); - //Not checking if Key is null or empty because GetAcl allows to query for both a Bucket or an Object. TODO: deprecate GetACL and create two separate operations + //Not checking if Key is null or empty because GetAcl allows to query for both a Bucket or an Object. request.AddPathResource("{Key+}", S3Transforms.ToStringValue(getObjectAclRequest.Key)); request.ResourcePath = "/{Key+}"; diff --git a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/GetACLResponseUnmarshaller.cs b/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/GetACLResponseUnmarshaller.cs index 4629ff058c1c..7043f66cf438 100644 --- a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/GetACLResponseUnmarshaller.cs +++ b/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/GetACLResponseUnmarshaller.cs @@ -80,7 +80,6 @@ private static void UnmarshallResult(XmlUnmarshallerContext context,GetACLRespon { response.AccessControlList.Grants = new List(); } - response.AccessControlList.Grants.Add(GrantUnmarshaller.Instance.Unmarshall(context)); continue; } diff --git a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/GetBucketACLRequestMarshaller.cs b/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/GetBucketACLRequestMarshaller.cs new file mode 100644 index 000000000000..7f452a636f3a --- /dev/null +++ b/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/GetBucketACLRequestMarshaller.cs @@ -0,0 +1,88 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Text; +using System.Xml.Serialization; + +using Amazon.S3.Model; +using Amazon.Runtime; +using Amazon.Runtime.Internal; +using Amazon.Runtime.Internal.Transform; +using Amazon.Runtime.Internal.Util; +using System.Xml; + +#pragma warning disable CS0612,CS0618 +namespace Amazon.S3.Model.Internal.MarshallTransformations +{ + /// + /// GetBucketAcl Request Marshaller + /// + public class GetBucketAclRequestMarshaller : IMarshaller, IMarshaller + { + /// + /// Marshaller the request object to the HTTP request. + /// + /// + /// + public IRequest Marshall(AmazonWebServiceRequest input) + { + return this.Marshall((GetBucketAclRequest)input); + } + + /// + /// Marshaller the request object to the HTTP request. + /// + /// + /// + public IRequest Marshall(GetBucketAclRequest publicRequest) + { + var request = new DefaultRequest(publicRequest, "Amazon.S3"); + request.HttpMethod = "GET"; + request.AddSubResource("acl"); + + if (publicRequest.IsSetExpectedBucketOwner()) + { + request.Headers["x-amz-expected-bucket-owner"] = publicRequest.ExpectedBucketOwner; + } + if (!publicRequest.IsSetBucketName()) + throw new AmazonS3Exception("Request object does not have required field BucketName set"); + + + return request; + } + private static GetBucketAclRequestMarshaller _instance = new GetBucketAclRequestMarshaller(); + + internal static GetBucketAclRequestMarshaller GetInstance() + { + return _instance; + } + + /// + /// Gets the singleton. + /// + public static GetBucketAclRequestMarshaller Instance + { + get + { + return _instance; + } + } + + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/GetBucketACLResponseUnmarshaller.cs b/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/GetBucketACLResponseUnmarshaller.cs new file mode 100644 index 000000000000..99f15f9aa20c --- /dev/null +++ b/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/GetBucketACLResponseUnmarshaller.cs @@ -0,0 +1,128 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +/* + * Do not modify this file. This file is generated from the s3-2006-03-01.normal.json service model. + */ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Net; +using System.Text; +using System.Xml.Serialization; + +using Amazon.S3.Model; +using Amazon.Runtime; +using Amazon.Runtime.Internal; +using Amazon.Runtime.Internal.Transform; +using Amazon.Runtime.Internal.Util; + +#pragma warning disable CS0612,CS0618 +namespace Amazon.S3.Model.Internal.MarshallTransformations +{ + /// + /// Response Unmarshaller for GetBucketAcl operation + /// + public class GetBucketAclResponseUnmarshaller : S3ReponseUnmarshaller + { + + /// + /// Unmarshaller the response from the service to the response class. + /// + /// + /// + public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) + { + GetBucketAclResponse response = new GetBucketAclResponse(); + while (context.Read()) + { + if (context.IsStartElement) + { + UnmarshallResult(context, response); + continue; + } + } + + return response; + } + + /// + /// Unmarshaller the response from the service to the response class. + /// + /// + /// + /// + + private static void UnmarshallResult(XmlUnmarshallerContext context, GetBucketAclResponse response) + { + int originalDepth = context.CurrentDepth; + int targetDepth = originalDepth + 1; + if (context.IsStartOfDocument) + targetDepth += 1; + if (context.IsEmptyResponse) + { + return; + } + while (context.Read()) + { + if (context.IsStartElement || context.IsAttribute) + { + if (context.TestExpression("AccessControlList/Grant", targetDepth)) + { + if (response.Grants == null) + { + response.Grants = new List(); + } + var unmarshaller = GrantUnmarshaller.Instance; + response.Grants.Add(unmarshaller.Unmarshall(context)); + continue; + } + if (context.TestExpression("Owner", targetDepth)) + { + var unmarshaller = OwnerUnmarshaller.Instance; + response.Owner = unmarshaller.Unmarshall(context); + continue; + } + } + else if (context.IsEndElement && context.CurrentDepth < originalDepth) + { + return; + } + } + + return; + } + + private static GetBucketAclResponseUnmarshaller _instance = new GetBucketAclResponseUnmarshaller(); + + + /// + /// Gets the singleton. + /// + public static GetBucketAclResponseUnmarshaller Instance + { + get + { + if (_instance == null) + { + _instance = new GetBucketAclResponseUnmarshaller(); + } + return _instance; + } + } + + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/GetObjectACLRequestMarshaller.cs b/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/GetObjectACLRequestMarshaller.cs new file mode 100644 index 000000000000..2d363e36ee65 --- /dev/null +++ b/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/GetObjectACLRequestMarshaller.cs @@ -0,0 +1,101 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Text; +using System.Xml.Serialization; + +using Amazon.S3.Model; +using Amazon.Runtime; +using Amazon.Runtime.Internal; +using Amazon.Runtime.Internal.Transform; +using Amazon.Runtime.Internal.Util; +using System.Xml; + +#pragma warning disable CS0612,CS0618 +namespace Amazon.S3.Model.Internal.MarshallTransformations +{ + /// + /// GetObjectAcl Request Marshaller + /// + public class GetObjectAclRequestMarshaller : IMarshaller, IMarshaller + { + /// + /// Marshaller the request object to the HTTP request. + /// + /// + /// + public IRequest Marshall(AmazonWebServiceRequest input) + { + return this.Marshall((GetObjectAclRequest)input); + } + + /// + /// Marshaller the request object to the HTTP request. + /// + /// + /// + public IRequest Marshall(GetObjectAclRequest publicRequest) + { + var request = new DefaultRequest(publicRequest, "Amazon.S3"); + request.HttpMethod = "GET"; + request.AddSubResource("acl"); + + if (publicRequest.IsSetExpectedBucketOwner()) + { + request.Headers["x-amz-expected-bucket-owner"] = publicRequest.ExpectedBucketOwner; + } + + if (publicRequest.IsSetRequestPayer()) + { + request.Headers["x-amz-request-payer"] = publicRequest.RequestPayer; + } + if (!publicRequest.IsSetBucketName()) + throw new AmazonS3Exception("Request object does not have required field BucketName set"); + if (!publicRequest.IsSetKey()) + throw new AmazonS3Exception("Request object does not have required field Key set"); + request.AddPathResource("{Key+}", StringUtils.FromString(publicRequest.Key.TrimStart('/'))); + + if (publicRequest.IsSetVersionId()) + request.Parameters.Add("versionId", StringUtils.FromString(publicRequest.VersionId)); + request.ResourcePath = "/{Key+}"; + + + request.UseQueryString = true; + return request; + } + private static GetObjectAclRequestMarshaller _instance = new GetObjectAclRequestMarshaller(); + + internal static GetObjectAclRequestMarshaller GetInstance() + { + return _instance; + } + + /// + /// Gets the singleton. + /// + public static GetObjectAclRequestMarshaller Instance + { + get + { + return _instance; + } + } + + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/GetObjectACLResponseUnmarshaller.cs b/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/GetObjectACLResponseUnmarshaller.cs new file mode 100644 index 000000000000..5842d275b0ad --- /dev/null +++ b/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/GetObjectACLResponseUnmarshaller.cs @@ -0,0 +1,124 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +/* + * Do not modify this file. This file is generated from the s3-2006-03-01.normal.json service model. + */ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Net; +using System.Text; +using System.Xml.Serialization; + +using Amazon.S3.Model; +using Amazon.Runtime; +using Amazon.Runtime.Internal; +using Amazon.Runtime.Internal.Transform; +using Amazon.Runtime.Internal.Util; + +#pragma warning disable CS0612,CS0618 +namespace Amazon.S3.Model.Internal.MarshallTransformations +{ + /// + /// Response Unmarshaller for GetObjectAcl operation + /// + public class GetObjectAclResponseUnmarshaller : S3ReponseUnmarshaller + { + /// + /// Unmarshaller the response from the service to the response class. + /// + /// + /// + public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) + { + GetObjectAclResponse response = new GetObjectAclResponse(); + while (context.Read()) + { + if (context.IsStartElement) + { + UnmarshallResult(context, response); + continue; + } + } + + if (context.ResponseData.IsHeaderPresent("x-amz-request-charged")) + response.RequestCharged = context.ResponseData.GetHeaderValue("x-amz-request-charged"); + + return response; + } + + private static void UnmarshallResult(XmlUnmarshallerContext context, GetObjectAclResponse response) + { + int originalDepth = context.CurrentDepth; + int targetDepth = originalDepth + 1; + if (context.IsStartOfDocument) + targetDepth += 1; + if (context.IsEmptyResponse) + { + return; + } + while (context.Read()) + { + if (context.IsStartElement || context.IsAttribute) + { + if (context.TestExpression("AccessControlList/Grant", targetDepth)) + { + if (response.Grants == null) + { + response.Grants = new List(); + } + var unmarshaller = GrantUnmarshaller.Instance; + response.Grants.Add(unmarshaller.Unmarshall(context)); + continue; + } + if (context.TestExpression("Owner", targetDepth)) + { + var unmarshaller = OwnerUnmarshaller.Instance; + response.Owner = unmarshaller.Unmarshall(context); + continue; + } + } + else if (context.IsEndElement && context.CurrentDepth < originalDepth) + { + return; + } + } + + return; + } + + + private static GetObjectAclResponseUnmarshaller _instance = new GetObjectAclResponseUnmarshaller(); + + internal static GetObjectAclResponseUnmarshaller GetInstance() + { + return _instance; + } + + /// + /// Gets the singleton. + /// + public static GetObjectAclResponseUnmarshaller Instance + { + get + { + return _instance; + } + } + + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/PutACLRequestMarshaller.cs b/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/PutACLRequestMarshaller.cs index 2d296fe7492b..b1aa7c1c6fec 100644 --- a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/PutACLRequestMarshaller.cs +++ b/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/PutACLRequestMarshaller.cs @@ -55,7 +55,7 @@ public IRequest Marshall(PutACLRequest putObjectAclRequest) if (string.IsNullOrEmpty(putObjectAclRequest.BucketName)) throw new System.ArgumentException("BucketName is a required property and must be set before making this call.", "PutACLRequest.BucketName"); - //Not checking if Key is null or empty because PutAcl allows to put an ACL for both a Bucket or an Object. TODO: deprecate PutAcl and create two separate operations + //Not checking if Key is null or empty because PutAcl allows to put an ACL for both a Bucket or an Object. // if we are putting the acl onto the bucket, the keyname component will collapse to empty string request.ResourcePath = "/{Key+}"; diff --git a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/PutBucketACLRequestMarshaller.cs b/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/PutBucketACLRequestMarshaller.cs new file mode 100644 index 000000000000..48be49363100 --- /dev/null +++ b/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/PutBucketACLRequestMarshaller.cs @@ -0,0 +1,202 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +/* + * Do not modify this file. This file is generated from the s3-2006-03-01.normal.json service model. + */ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Text; +using System.Xml.Serialization; + +using Amazon.S3.Model; +using Amazon.Runtime; +using Amazon.Runtime.Internal; +using Amazon.Runtime.Internal.Transform; +using Amazon.Runtime.Internal.Util; +using System.Xml; +using Amazon.Util; +using Amazon.S3.Util; + +#pragma warning disable CS0612,CS0618 +namespace Amazon.S3.Model.Internal.MarshallTransformations +{ + /// + /// PutBucketAcl Request Marshaller + /// + public class PutBucketAclRequestMarshaller : IMarshaller, IMarshaller + { + /// + /// Marshaller the request object to the HTTP request. + /// + /// + /// + public IRequest Marshall(AmazonWebServiceRequest input) + { + return this.Marshall((PutBucketAclRequest)input); + } + + /// + /// Marshaller the request object to the HTTP request. + /// + /// + /// + public IRequest Marshall(PutBucketAclRequest publicRequest) + { + var request = new DefaultRequest(publicRequest, "Amazon.S3"); + request.HttpMethod = "PUT"; + request.AddSubResource("acl"); + + if (publicRequest.IsSetACL()) + { + request.Headers["x-amz-acl"] = publicRequest.ACL; + } + + if (publicRequest.IsSetChecksumAlgorithm()) + { + request.Headers["x-amz-sdk-checksum-algorithm"] = publicRequest.ChecksumAlgorithm; + } + + if (publicRequest.IsSetContentMD5()) + { + request.Headers["Content-MD5"] = publicRequest.ContentMD5; + } + + if (publicRequest.IsSetExpectedBucketOwner()) + { + request.Headers["x-amz-expected-bucket-owner"] = publicRequest.ExpectedBucketOwner; + } + + if (publicRequest.IsSetGrantFullControl()) + { + request.Headers["x-amz-grant-full-control"] = publicRequest.GrantFullControl; + } + + if (publicRequest.IsSetGrantRead()) + { + request.Headers["x-amz-grant-read"] = publicRequest.GrantRead; + } + + if (publicRequest.IsSetGrantReadACP()) + { + request.Headers["x-amz-grant-read-acp"] = publicRequest.GrantReadACP; + } + + if (publicRequest.IsSetGrantWrite()) + { + request.Headers["x-amz-grant-write"] = publicRequest.GrantWrite; + } + + if (publicRequest.IsSetGrantWriteACP()) + { + request.Headers["x-amz-grant-write-acp"] = publicRequest.GrantWriteACP; + } + if (!publicRequest.IsSetBucketName()) + throw new AmazonS3Exception("Request object does not have required field BucketName set"); + + var stringWriter = new XMLEncodedStringWriter(CultureInfo.InvariantCulture); + using (var xmlWriter = XmlWriter.Create(stringWriter, new XmlWriterSettings() { Encoding = System.Text.Encoding.UTF8, OmitXmlDeclaration = true, NewLineHandling = NewLineHandling.Entitize })) + { + if (publicRequest.IsSetAccessControlPolicy()) + { + xmlWriter.WriteStartElement("AccessControlPolicy", S3Constants.S3RequestXmlNamespace); + var publicRequestAccessControlPolicyGrants = publicRequest.AccessControlPolicy.Grants; + if (publicRequestAccessControlPolicyGrants != null && (publicRequestAccessControlPolicyGrants.Count > 0 || !AWSConfigs.InitializeCollections)) + { + xmlWriter.WriteStartElement("AccessControlList"); + foreach (var publicRequestAccessControlPolicyGrantsValue in publicRequestAccessControlPolicyGrants) + { + xmlWriter.WriteStartElement("Grant"); + if (publicRequestAccessControlPolicyGrantsValue != null) + { + if (publicRequestAccessControlPolicyGrantsValue.Grantee != null) + { + xmlWriter.WriteStartElement( "Grantee"); + if (publicRequestAccessControlPolicyGrantsValue.Grantee.IsSetType()) + xmlWriter.WriteAttributeString("xsi", "type", "http://www.w3.org/2001/XMLSchema-instance", S3Transforms.ToXmlStringValue(publicRequestAccessControlPolicyGrantsValue.Grantee.Type)); + if (publicRequestAccessControlPolicyGrantsValue.Grantee.IsSetDisplayName()) + xmlWriter.WriteElementString("DisplayName",S3Transforms.ToXmlStringValue(publicRequestAccessControlPolicyGrantsValue.Grantee.DisplayName)); + + if (publicRequestAccessControlPolicyGrantsValue.Grantee.IsSetEmailAddress()) + xmlWriter.WriteElementString("EmailAddress", S3Transforms.ToXmlStringValue(publicRequestAccessControlPolicyGrantsValue.Grantee.EmailAddress)); + + if (publicRequestAccessControlPolicyGrantsValue.Grantee.IsSetCanonicalUser()) + xmlWriter.WriteElementString("ID", S3Transforms.ToXmlStringValue(publicRequestAccessControlPolicyGrantsValue.Grantee.CanonicalUser)); + + if (publicRequestAccessControlPolicyGrantsValue.Grantee.IsSetURI()) + xmlWriter.WriteElementString("URI", S3Transforms.ToXmlStringValue(publicRequestAccessControlPolicyGrantsValue.Grantee.URI)); + xmlWriter.WriteEndElement(); + } + if (publicRequestAccessControlPolicyGrantsValue.IsSetPermission()) + xmlWriter.WriteElementString("Permission", S3Transforms.ToXmlStringValue(publicRequestAccessControlPolicyGrantsValue.Permission)); + + xmlWriter.WriteEndElement(); + } + } + xmlWriter.WriteEndElement(); + } + if (publicRequest.AccessControlPolicy.Owner != null) + { + xmlWriter.WriteStartElement("Owner"); + if (publicRequest.AccessControlPolicy.Owner.IsSetDisplayName()) + xmlWriter.WriteElementString("DisplayName", S3Transforms.ToXmlStringValue(publicRequest.AccessControlPolicy.Owner.DisplayName)); + + if (publicRequest.AccessControlPolicy.Owner.IsSetId()) + xmlWriter.WriteElementString("ID", S3Transforms.ToXmlStringValue(publicRequest.AccessControlPolicy.Owner.Id)); + + xmlWriter.WriteEndElement(); + } + + xmlWriter.WriteEndElement(); + } + } + try + { + string content = stringWriter.ToString(); + request.Content = Encoding.UTF8.GetBytes(content); + request.Headers[HeaderKeys.ContentTypeHeader] = "application/xml"; + if (publicRequest.IsSetContentMD5()) + request.Headers[Amazon.Util.HeaderKeys.ContentMD5Header] = publicRequest.ContentMD5; + ChecksumUtils.SetChecksumData(request, publicRequest.ChecksumAlgorithm); + } + catch (EncoderFallbackException e) + { + throw new AmazonServiceException("Unable to marshall request to XML", e); + } + + return request; + } + private static PutBucketAclRequestMarshaller _instance = new PutBucketAclRequestMarshaller(); + + internal static PutBucketAclRequestMarshaller GetInstance() + { + return _instance; + } + + /// + /// Gets the singleton. + /// + public static PutBucketAclRequestMarshaller Instance + { + get + { + return _instance; + } + } + + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/PutBucketACLResponseUnmarshaller.cs b/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/PutBucketACLResponseUnmarshaller.cs new file mode 100644 index 000000000000..fc4bd18f4e0a --- /dev/null +++ b/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/PutBucketACLResponseUnmarshaller.cs @@ -0,0 +1,72 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +/* + * Do not modify this file. This file is generated from the s3-2006-03-01.normal.json service model. + */ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Net; +using System.Text; +using System.Xml.Serialization; + +using Amazon.S3.Model; +using Amazon.Runtime; +using Amazon.Runtime.Internal; +using Amazon.Runtime.Internal.Transform; +using Amazon.Runtime.Internal.Util; + +#pragma warning disable CS0612,CS0618 +namespace Amazon.S3.Model.Internal.MarshallTransformations +{ + /// + /// Response Unmarshaller for PutBucketAcl operation + /// + public class PutBucketAclResponseUnmarshaller : S3ReponseUnmarshaller + { + /// + /// Unmarshaller the response from the service to the response class. + /// + /// + /// + public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) + { + PutBucketAclResponse response = new PutBucketAclResponse(); + + return response; + } + + private static PutBucketAclResponseUnmarshaller _instance = new PutBucketAclResponseUnmarshaller(); + + internal static PutBucketAclResponseUnmarshaller GetInstance() + { + return _instance; + } + + /// + /// Gets the singleton. + /// + public static PutBucketAclResponseUnmarshaller Instance + { + get + { + return _instance; + } + } + + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/PutObjectACLRequestMarshaller.cs b/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/PutObjectACLRequestMarshaller.cs new file mode 100644 index 000000000000..aa9200dafd43 --- /dev/null +++ b/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/PutObjectACLRequestMarshaller.cs @@ -0,0 +1,212 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +/* + * Do not modify this file. This file is generated from the s3-2006-03-01.normal.json service model. + */ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Text; +using System.Xml.Serialization; + +using Amazon.S3.Model; +using Amazon.Runtime; +using Amazon.Runtime.Internal; +using Amazon.Runtime.Internal.Transform; +using Amazon.Runtime.Internal.Util; +using System.Xml; +using Amazon.S3.Util; + +#pragma warning disable CS0612,CS0618 +namespace Amazon.S3.Model.Internal.MarshallTransformations +{ + /// + /// PutObjectAcl Request Marshaller + /// + public class PutObjectAclRequestMarshaller : IMarshaller, IMarshaller + { + /// + /// Marshaller the request object to the HTTP request. + /// + /// + /// + public IRequest Marshall(AmazonWebServiceRequest input) + { + return this.Marshall((PutObjectAclRequest)input); + } + + /// + /// Marshaller the request object to the HTTP request. + /// + /// + /// + public IRequest Marshall(PutObjectAclRequest publicRequest) + { + var request = new DefaultRequest(publicRequest, "Amazon.S3"); + request.HttpMethod = "PUT"; + request.AddSubResource("acl"); + + if (publicRequest.IsSetACL()) + { + request.Headers["x-amz-acl"] = publicRequest.ACL; + } + + if (publicRequest.IsSetChecksumAlgorithm()) + { + request.Headers["x-amz-sdk-checksum-algorithm"] = publicRequest.ChecksumAlgorithm; + } + + if (publicRequest.IsSetContentMD5()) + { + request.Headers["Content-MD5"] = publicRequest.ContentMD5; + } + + if (publicRequest.IsSetExpectedBucketOwner()) + { + request.Headers["x-amz-expected-bucket-owner"] = publicRequest.ExpectedBucketOwner; + } + + if (publicRequest.IsSetGrantFullControl()) + { + request.Headers["x-amz-grant-full-control"] = publicRequest.GrantFullControl; + } + + if (publicRequest.IsSetGrantRead()) + { + request.Headers["x-amz-grant-read"] = publicRequest.GrantRead; + } + + if (publicRequest.IsSetGrantReadACP()) + { + request.Headers["x-amz-grant-read-acp"] = publicRequest.GrantReadACP; + } + + if (publicRequest.IsSetGrantWrite()) + { + request.Headers["x-amz-grant-write"] = publicRequest.GrantWrite; + } + + if (publicRequest.IsSetGrantWriteACP()) + { + request.Headers["x-amz-grant-write-acp"] = publicRequest.GrantWriteACP; + } + + if (publicRequest.IsSetRequestPayer()) + { + request.Headers["x-amz-request-payer"] = publicRequest.RequestPayer; + } + if (!publicRequest.IsSetBucketName()) + throw new AmazonS3Exception("Request object does not have required field BucketName set"); + if (!publicRequest.IsSetKey()) + throw new AmazonS3Exception("Request object does not have required field Key set"); + request.AddPathResource("{Key+}", StringUtils.FromString(publicRequest.Key)); + + if (publicRequest.IsSetVersionId()) + request.Parameters.Add("versionId", StringUtils.FromString(publicRequest.VersionId)); + request.ResourcePath = "/{Key+}"; + + var stringWriter = new XMLEncodedStringWriter(CultureInfo.InvariantCulture); + using (var xmlWriter = XmlWriter.Create(stringWriter, new XmlWriterSettings() { Encoding = System.Text.Encoding.UTF8, OmitXmlDeclaration = true, NewLineHandling = NewLineHandling.Entitize })) + { + if (publicRequest.IsSetAccessControlPolicy()) + { + xmlWriter.WriteStartElement("AccessControlPolicy", S3Constants.S3RequestXmlNamespace); + var publicRequestAccessControlPolicyGrants = publicRequest.AccessControlPolicy.Grants; + if (publicRequestAccessControlPolicyGrants != null && (publicRequestAccessControlPolicyGrants.Count > 0 || !AWSConfigs.InitializeCollections)) + { + xmlWriter.WriteStartElement("AccessControlList"); + foreach (var publicRequestAccessControlPolicyGrantsValue in publicRequestAccessControlPolicyGrants) + { + if (publicRequestAccessControlPolicyGrantsValue != null) + { + xmlWriter.WriteStartElement("Grant"); + if (publicRequestAccessControlPolicyGrantsValue.Grantee != null) + { + xmlWriter.WriteStartElement("Grantee"); + if (publicRequestAccessControlPolicyGrantsValue.Grantee.IsSetType()) + xmlWriter.WriteAttributeString("xsi", "type", "http://www.w3.org/2001/XMLSchema-instance", S3Transforms.ToXmlStringValue(publicRequestAccessControlPolicyGrantsValue.Grantee.Type)); + if (publicRequestAccessControlPolicyGrantsValue.Grantee.IsSetDisplayName()) + xmlWriter.WriteElementString("DisplayName", S3Transforms.ToXmlStringValue(publicRequestAccessControlPolicyGrantsValue.Grantee.DisplayName)); + if (publicRequestAccessControlPolicyGrantsValue.Grantee.IsSetEmailAddress()) + xmlWriter.WriteElementString("EmailAddress", S3Transforms.ToXmlStringValue(publicRequestAccessControlPolicyGrantsValue.Grantee.EmailAddress)); + if (publicRequestAccessControlPolicyGrantsValue.Grantee.IsSetCanonicalUser()) + xmlWriter.WriteElementString("ID", S3Transforms.ToXmlStringValue(publicRequestAccessControlPolicyGrantsValue.Grantee.CanonicalUser)); + if (publicRequestAccessControlPolicyGrantsValue.Grantee.IsSetURI()) + xmlWriter.WriteElementString("URI", S3Transforms.ToXmlStringValue(publicRequestAccessControlPolicyGrantsValue.Grantee.URI)); + xmlWriter.WriteEndElement(); + } + if (publicRequestAccessControlPolicyGrantsValue.IsSetPermission()) + xmlWriter.WriteElementString("Permission", S3Transforms.ToXmlStringValue(publicRequestAccessControlPolicyGrantsValue.Permission)); + + xmlWriter.WriteEndElement(); + } + } + xmlWriter.WriteEndElement(); + } + if (publicRequest.AccessControlPolicy.Owner != null) + { + xmlWriter.WriteStartElement("Owner"); + if (publicRequest.AccessControlPolicy.Owner.IsSetDisplayName()) + xmlWriter.WriteElementString("DisplayName", StringUtils.FromString(publicRequest.AccessControlPolicy.Owner.DisplayName)); + + if (publicRequest.AccessControlPolicy.Owner.IsSetId()) + xmlWriter.WriteElementString("ID", StringUtils.FromString(publicRequest.AccessControlPolicy.Owner.Id)); + + xmlWriter.WriteEndElement(); + } + + xmlWriter.WriteEndElement(); + } + } + try + { + string content = stringWriter.ToString(); + request.Content = System.Text.Encoding.UTF8.GetBytes(content); + request.Headers["Content-Type"] = "application/xml"; + if (publicRequest.IsSetContentMD5()) + request.Headers[Amazon.Util.HeaderKeys.ContentMD5Header] = publicRequest.ContentMD5; + ChecksumUtils.SetChecksumData(request, publicRequest.ChecksumAlgorithm, fallbackToMD5: true); + request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2006-03-01"; + } + catch (EncoderFallbackException e) + { + throw new AmazonServiceException("Unable to marshall request to XML", e); + } + + request.UseQueryString = true; + return request; + } + private static PutObjectAclRequestMarshaller _instance = new PutObjectAclRequestMarshaller(); + + internal static PutObjectAclRequestMarshaller GetInstance() + { + return _instance; + } + + /// + /// Gets the singleton. + /// + public static PutObjectAclRequestMarshaller Instance + { + get + { + return _instance; + } + } + + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/PutObjectACLResponseUnmarshaller.cs b/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/PutObjectACLResponseUnmarshaller.cs new file mode 100644 index 000000000000..ea2e8270e712 --- /dev/null +++ b/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/PutObjectACLResponseUnmarshaller.cs @@ -0,0 +1,72 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +/* + * Do not modify this file. This file is generated from the s3-2006-03-01.normal.json service model. + */ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Net; +using System.Text; +using System.Xml.Serialization; + +using Amazon.S3.Model; +using Amazon.Runtime; +using Amazon.Runtime.Internal; +using Amazon.Runtime.Internal.Transform; +using Amazon.Runtime.Internal.Util; + +#pragma warning disable CS0612,CS0618 +namespace Amazon.S3.Model.Internal.MarshallTransformations +{ + /// + /// Response Unmarshaller for PutObjectAcl operation + /// + public class PutObjectAclResponseUnmarshaller : S3ReponseUnmarshaller + { + /// + /// Unmarshaller the response from the service to the response class. + /// + /// + /// + public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) + { + PutObjectAclResponse response = new PutObjectAclResponse(); + if (context.ResponseData.IsHeaderPresent("x-amz-request-charged")) + response.RequestCharged = context.ResponseData.GetHeaderValue("x-amz-request-charged"); + + return response; + } + + + + private static PutObjectAclResponseUnmarshaller _instance = new PutObjectAclResponseUnmarshaller(); + + + /// + /// Gets the singleton. + /// + public static PutObjectAclResponseUnmarshaller Instance + { + get + { + return _instance; + } + } + + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Model/PutBucketACLRequest.cs b/sdk/src/Services/S3/Custom/Model/PutBucketACLRequest.cs new file mode 100644 index 000000000000..910fe7fa3b8e --- /dev/null +++ b/sdk/src/Services/S3/Custom/Model/PutBucketACLRequest.cs @@ -0,0 +1,516 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + + +using System; +using System.Collections.Generic; +using System.Xml.Serialization; +using System.Text; +using System.IO; +using System.Net; + +using Amazon.Runtime; +using Amazon.Runtime.Internal; + +#pragma warning disable CS0612,CS0618,CS1570 +namespace Amazon.S3.Model +{ + /// + /// Container for the parameters to the PutBucketAcl operation. + /// + /// + /// This operation is not supported by directory buckets. + /// + /// + /// + /// Sets the permissions on an existing bucket using access control lists (ACL). For more + /// information, see Using + /// ACLs. To set the ACL of a bucket, you must have the WRITE_ACP permission. + /// + /// + /// + /// You can use one of the following two ways to set a bucket's permissions: + /// + ///
  • + /// + /// Specify the ACL in the request body + /// + ///
  • + /// + /// Specify permissions using request headers + /// + ///
+ /// + /// You cannot specify access permission using both the body and the request headers. + /// + /// + /// + /// Depending on your application needs, you may choose to set the ACL on a bucket using + /// either the request body or the headers. For example, if you have an existing application + /// that updates a bucket ACL using the request body, then you can continue to use that + /// approach. + /// + /// + /// + /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, ACLs + /// are disabled and no longer affect permissions. You must use policies to grant access + /// to your bucket and the objects in it. Requests to set ACLs or update ACLs fail and + /// return the AccessControlListNotSupported error code. Requests to read ACLs + /// are still supported. For more information, see Controlling + /// object ownership in the Amazon S3 User Guide. + /// + ///
Permissions
+ /// + /// You can set access permissions by using one of the following methods: + /// + ///
  • + /// + /// Specify a canned ACL with the x-amz-acl request header. Amazon S3 supports + /// a set of predefined ACLs, known as canned ACLs. Each canned ACL has a predefined + /// set of grantees and permissions. Specify the canned ACL name as the value of x-amz-acl. + /// If you use this header, you cannot use other access control-specific headers in your + /// request. For more information, see Canned + /// ACL. + /// + ///
  • + /// + /// Specify access permissions explicitly with the x-amz-grant-read, x-amz-grant-read-acp, + /// x-amz-grant-write-acp, and x-amz-grant-full-control headers. When using + /// these headers, you specify explicit access permissions and grantees (Amazon Web Services + /// accounts or Amazon S3 groups) who will receive the permission. If you use these ACL-specific + /// headers, you cannot use the x-amz-acl header to set a canned ACL. These parameters + /// map to the set of permissions that Amazon S3 supports in an ACL. For more information, + /// see Access + /// Control List (ACL) Overview. + /// + /// + /// + /// You specify each grantee as a type=value pair, where the type is one of the following: + /// + ///
    • + /// + /// id – if the value specified is the canonical user ID of an Amazon Web Services + /// account + /// + ///
    • + /// + /// uri – if you are granting permissions to a predefined group + /// + ///
    • + /// + /// emailAddress – if the value specified is the email address of an Amazon Web + /// Services account + /// + /// + /// + /// Using email addresses to specify a grantee is only supported in the following Amazon + /// Web Services Regions: + /// + ///
      • + /// + /// US East (N. Virginia) + /// + ///
      • + /// + /// US West (N. California) + /// + ///
      • + /// + /// US West (Oregon) + /// + ///
      • + /// + /// Asia Pacific (Singapore) + /// + ///
      • + /// + /// Asia Pacific (Sydney) + /// + ///
      • + /// + /// Asia Pacific (Tokyo) + /// + ///
      • + /// + /// Europe (Ireland) + /// + ///
      • + /// + /// South America (São Paulo) + /// + ///
      + /// + /// For a list of all the Amazon S3 supported Regions and endpoints, see Regions + /// and Endpoints in the Amazon Web Services General Reference. + /// + ///
    + /// + /// For example, the following x-amz-grant-write header grants create, overwrite, + /// and delete objects permission to LogDelivery group predefined by Amazon S3 and two + /// Amazon Web Services accounts identified by their email addresses. + /// + /// + /// + /// x-amz-grant-write: uri="http://acs.amazonaws.com/groups/s3/LogDelivery", id="111122223333", + /// id="555566667777" + /// + ///
+ /// + /// You can use either a canned ACL or specify access permissions explicitly. You cannot + /// do both. + /// + ///
Grantee Values
+ /// + /// You can specify the person (grantee) to whom you're assigning access rights (using + /// request elements) in the following ways: + /// + ///
  • + /// + /// By the person's ID: + /// + /// + /// + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"><ID><>ID<></ID><DisplayName><>GranteesEmail<></DisplayName> + /// </Grantee> + /// + /// + /// + /// DisplayName is optional and ignored in the request + /// + ///
  • + /// + /// By URI: + /// + /// + /// + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Group"><URI><>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<></URI></Grantee> + /// + /// + ///
  • + /// + /// By Email address: + /// + /// + /// + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="AmazonCustomerByEmail"><EmailAddress><>Grantees@email.com<></EmailAddress>&</Grantee> + /// + /// + /// + /// + /// The grantee is resolved to the CanonicalUser and, in a response to a GET Object acl + /// request, appears as the CanonicalUser. + /// + /// + /// + /// Using email addresses to specify a grantee is only supported in the following Amazon + /// Web Services Regions: + /// + ///
    • + /// + /// US East (N. Virginia) + /// + ///
    • + /// + /// US West (N. California) + /// + ///
    • + /// + /// US West (Oregon) + /// + ///
    • + /// + /// Asia Pacific (Singapore) + /// + ///
    • + /// + /// Asia Pacific (Sydney) + /// + ///
    • + /// + /// Asia Pacific (Tokyo) + /// + ///
    • + /// + /// Europe (Ireland) + /// + ///
    • + /// + /// South America (São Paulo) + /// + ///
    + /// + /// For a list of all the Amazon S3 supported Regions and endpoints, see Regions + /// and Endpoints in the Amazon Web Services General Reference. + /// + ///
+ /// + /// The following operations are related to PutBucketAcl: + /// + /// + ///
+ public partial class PutBucketAclRequest : AmazonWebServiceRequest + { + private S3AccessControlList _accessControlPolicy; + private S3CannedACL _acl; + private string _bucketName; + private ChecksumAlgorithm _checksumAlgorithm; + private string _contentMD5; + private string _expectedBucketOwner; + private string _grantFullControl; + private string _grantRead; + private string _grantReadACP; + private string _grantWrite; + private string _grantWriteACP; + + /// + /// Gets and sets the property AccessControlPolicy. + /// + /// Contains the elements that set the ACL permissions for an object per grantee. + /// + /// + public S3AccessControlList AccessControlPolicy + { + get { return this._accessControlPolicy; } + set { this._accessControlPolicy = value; } + } + + // Check to see if AccessControlPolicy property is set + internal bool IsSetAccessControlPolicy() + { + return this._accessControlPolicy != null; + } + + /// + /// Gets and sets the property ACL. + /// + /// The canned ACL to apply to the bucket. + /// + /// + public S3CannedACL ACL + { + get { return this._acl; } + set { this._acl = value; } + } + + // Check to see if ACL property is set + internal bool IsSetACL() + { + return !string.IsNullOrEmpty(this._acl); + } + + /// + /// Gets and sets the property BucketName. + /// + /// The bucket to which to apply the ACL. + /// + /// + public string BucketName + { + get { return this._bucketName; } + set { this._bucketName = value; } + } + + // Check to see if BucketName property is set + internal bool IsSetBucketName() + { + return this._bucketName != null; + } + + /// + /// Gets and sets the property ChecksumAlgorithm. + /// + /// Indicates the algorithm used to create the checksum for the object when you use the + /// SDK. This header will not provide any additional functionality if you don't use the + /// SDK. When you send 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. + /// + /// + public ChecksumAlgorithm ChecksumAlgorithm + { + get { return this._checksumAlgorithm; } + set { this._checksumAlgorithm = value; } + } + + // Check to see if ChecksumAlgorithm property is set + internal bool IsSetChecksumAlgorithm() + { + return !string.IsNullOrEmpty(this._checksumAlgorithm); + } + + /// + /// Gets and sets the property ContentMD5. + /// + /// 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. + /// + /// + public string ContentMD5 + { + get { return this._contentMD5; } + set { this._contentMD5 = value; } + } + + // Check to see if ContentMD5 property is set + internal bool IsSetContentMD5() + { + return !string.IsNullOrEmpty(this._contentMD5); + } + + /// + /// Gets and sets the property ExpectedBucketOwner. + /// + /// The account ID of the expected bucket owner. If the account ID that you provide does + /// not match the actual owner of the bucket, the request fails with the HTTP status code + /// 403 Forbidden (access denied). + /// + /// + public string ExpectedBucketOwner + { + get { return this._expectedBucketOwner; } + set { this._expectedBucketOwner = value; } + } + + // Check to see if ExpectedBucketOwner property is set + internal bool IsSetExpectedBucketOwner() + { + return !string.IsNullOrEmpty(this._expectedBucketOwner); + } + + /// + /// Gets and sets the property GrantFullControl. + /// + /// Allows grantee the read, write, read ACP, and write ACP permissions on the bucket. + /// + /// + public string GrantFullControl + { + get { return this._grantFullControl; } + set { this._grantFullControl = value; } + } + + // Check to see if GrantFullControl property is set + internal bool IsSetGrantFullControl() + { + return !string.IsNullOrEmpty(this._grantFullControl); + } + + /// + /// Gets and sets the property GrantRead. + /// + /// Allows grantee to list the objects in the bucket. + /// + /// + public string GrantRead + { + get { return this._grantRead; } + set { this._grantRead = value; } + } + + // Check to see if GrantRead property is set + internal bool IsSetGrantRead() + { + return !string.IsNullOrEmpty(this._grantRead); + } + + /// + /// Gets and sets the property GrantReadACP. + /// + /// Allows grantee to read the bucket ACL. + /// + /// + public string GrantReadACP + { + get { return this._grantReadACP; } + set { this._grantReadACP = value; } + } + + // Check to see if GrantReadACP property is set + internal bool IsSetGrantReadACP() + { + return !string.IsNullOrEmpty(this._grantReadACP); + } + + /// + /// Gets and sets the property GrantWrite. + /// + /// 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. + /// + /// + public string GrantWrite + { + get { return this._grantWrite; } + set { this._grantWrite = value; } + } + + // Check to see if GrantWrite property is set + internal bool IsSetGrantWrite() + { + return !string.IsNullOrEmpty(this._grantWrite); + } + + /// + /// Gets and sets the property GrantWriteACP. + /// + /// Allows grantee to write the ACL for the applicable bucket. + /// + /// + public string GrantWriteACP + { + get { return this._grantWriteACP; } + set { this._grantWriteACP = value; } + } + + // Check to see if GrantWriteACP property is set + internal bool IsSetGrantWriteACP() + { + return !string.IsNullOrEmpty(this._grantWriteACP); + } + + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Model/PutBucketACLResponse.cs b/sdk/src/Services/S3/Custom/Model/PutBucketACLResponse.cs new file mode 100644 index 000000000000..16d6b9a5c910 --- /dev/null +++ b/sdk/src/Services/S3/Custom/Model/PutBucketACLResponse.cs @@ -0,0 +1,36 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +using System; +using System.Collections.Generic; +using System.Xml.Serialization; +using System.Text; +using System.IO; +using System.Net; + +using Amazon.Runtime; +using Amazon.Runtime.Internal; + +#pragma warning disable CS0612,CS0618,CS1570 +namespace Amazon.S3.Model +{ + /// + /// This is the response object from the PutBucketAcl operation. + /// + public partial class PutBucketAclResponse : AmazonWebServiceResponse + { + + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Model/PutObjectACLRequest.cs b/sdk/src/Services/S3/Custom/Model/PutObjectACLRequest.cs new file mode 100644 index 000000000000..260262e74405 --- /dev/null +++ b/sdk/src/Services/S3/Custom/Model/PutObjectACLRequest.cs @@ -0,0 +1,603 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +using System; +using System.Collections.Generic; +using System.Xml.Serialization; +using System.Text; +using System.IO; +using System.Net; + +using Amazon.Runtime; +using Amazon.Runtime.Internal; + +#pragma warning disable CS0612,CS0618,CS1570 +namespace Amazon.S3.Model +{ + /// + /// Container for the parameters to the PutObjectAcl operation. + /// + /// + /// This operation is not supported by directory buckets. + /// + /// + /// + /// Uses the acl subresource to set the access control list (ACL) permissions for + /// a new or existing object in an S3 bucket. You must have the WRITE_ACP permission + /// to set the ACL of an object. For more information, see What + /// permissions can I grant? in the Amazon S3 User Guide. + /// + /// + /// + /// This functionality is not supported for Amazon S3 on Outposts. + /// + /// + /// + /// Depending on your application needs, you can choose to set the ACL on an object using + /// either the request body or the headers. For example, if you have an existing application + /// that updates a bucket ACL using the request body, you can continue to use that approach. + /// For more information, see Access + /// Control List (ACL) Overview in the Amazon S3 User Guide. + /// + /// + /// + /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, ACLs + /// are disabled and no longer affect permissions. You must use policies to grant access + /// to your bucket and the objects in it. Requests to set ACLs or update ACLs fail and + /// return the AccessControlListNotSupported error code. Requests to read ACLs + /// are still supported. For more information, see Controlling + /// object ownership in the Amazon S3 User Guide. + /// + ///
Permissions
+ /// + /// You can set access permissions using one of the following methods: + /// + ///
  • + /// + /// Specify a canned ACL with the x-amz-acl request header. Amazon S3 supports + /// a set of predefined ACLs, known as canned ACLs. Each canned ACL has a predefined set + /// of grantees and permissions. Specify the canned ACL name as the value of x-amz-acl. + /// If you use this header, you cannot use other access control-specific headers in your + /// request. For more information, see Canned + /// ACL. + /// + ///
  • + /// + /// Specify access permissions explicitly with the x-amz-grant-read, x-amz-grant-read-acp, + /// x-amz-grant-write-acp, and x-amz-grant-full-control headers. When using + /// these headers, you specify explicit access permissions and grantees (Amazon Web Services + /// accounts or Amazon S3 groups) who will receive the permission. If you use these ACL-specific + /// headers, you cannot use x-amz-acl header to set a canned ACL. These parameters + /// map to the set of permissions that Amazon S3 supports in an ACL. For more information, + /// see Access + /// Control List (ACL) Overview. + /// + /// + /// + /// You specify each grantee as a type=value pair, where the type is one of the following: + /// + ///
    • + /// + /// id – if the value specified is the canonical user ID of an Amazon Web Services + /// account + /// + ///
    • + /// + /// uri – if you are granting permissions to a predefined group + /// + ///
    • + /// + /// emailAddress – if the value specified is the email address of an Amazon Web + /// Services account + /// + /// + /// + /// Using email addresses to specify a grantee is only supported in the following Amazon + /// Web Services Regions: + /// + ///
      • + /// + /// US East (N. Virginia) + /// + ///
      • + /// + /// US West (N. California) + /// + ///
      • + /// + /// US West (Oregon) + /// + ///
      • + /// + /// Asia Pacific (Singapore) + /// + ///
      • + /// + /// Asia Pacific (Sydney) + /// + ///
      • + /// + /// Asia Pacific (Tokyo) + /// + ///
      • + /// + /// Europe (Ireland) + /// + ///
      • + /// + /// South America (São Paulo) + /// + ///
      + /// + /// For a list of all the Amazon S3 supported Regions and endpoints, see Regions + /// and Endpoints in the Amazon Web Services General Reference. + /// + ///
    + /// + /// For example, the following x-amz-grant-read header grants list objects permission + /// to the two Amazon Web Services accounts identified by their email addresses. + /// + /// + /// + /// x-amz-grant-read: emailAddress="xyz@amazon.com", emailAddress="abc@amazon.com" + /// + /// + ///
+ /// + /// You can use either a canned ACL or specify access permissions explicitly. You cannot + /// do both. + /// + ///
Grantee Values
+ /// + /// You can specify the person (grantee) to whom you're assigning access rights (using + /// request elements) in the following ways: + /// + ///
  • + /// + /// By the person's ID: + /// + /// + /// + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"><ID><>ID<></ID><DisplayName><>GranteesEmail<></DisplayName> + /// </Grantee> + /// + /// + /// + /// DisplayName is optional and ignored in the request. + /// + ///
  • + /// + /// By URI: + /// + /// + /// + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Group"><URI><>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<></URI></Grantee> + /// + /// + ///
  • + /// + /// By Email address: + /// + /// + /// + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="AmazonCustomerByEmail"><EmailAddress><>Grantees@email.com<></EmailAddress>lt;/Grantee> + /// + /// + /// + /// + /// The grantee is resolved to the CanonicalUser and, in a response to a GET Object acl + /// request, appears as the CanonicalUser. + /// + /// + /// + /// Using email addresses to specify a grantee is only supported in the following Amazon + /// Web Services Regions: + /// + ///
    • + /// + /// US East (N. Virginia) + /// + ///
    • + /// + /// US West (N. California) + /// + ///
    • + /// + /// US West (Oregon) + /// + ///
    • + /// + /// Asia Pacific (Singapore) + /// + ///
    • + /// + /// Asia Pacific (Sydney) + /// + ///
    • + /// + /// Asia Pacific (Tokyo) + /// + ///
    • + /// + /// Europe (Ireland) + /// + ///
    • + /// + /// South America (São Paulo) + /// + ///
    + /// + /// For a list of all the Amazon S3 supported Regions and endpoints, see Regions + /// and Endpoints in the Amazon Web Services General Reference. + /// + ///
Versioning
+ /// + /// The ACL of an object is set at the object version level. By default, PUT sets the + /// ACL of the current version of an object. To set the ACL of a different version, use + /// the versionId subresource. + /// + ///
+ /// + /// The following operations are related to PutObjectAcl: + /// + /// + ///
+ public partial class PutObjectAclRequest : AmazonWebServiceRequest + { + private S3AccessControlList _accessControlPolicy; + private S3CannedACL _acl; + private string _bucketName; + private ChecksumAlgorithm _checksumAlgorithm; + private string _contentMD5; + private string _expectedBucketOwner; + private string _grantFullControl; + private string _grantRead; + private string _grantReadACP; + private string _grantWrite; + private string _grantWriteACP; + private string _key; + private RequestPayer _requestPayer; + private string _versionId; + + /// + /// Gets and sets the property AccessControlPolicy. + /// + /// Contains the elements that set the ACL permissions for an object per grantee. + /// + /// + public S3AccessControlList AccessControlPolicy + { + get { return this._accessControlPolicy; } + set { this._accessControlPolicy = value; } + } + + // Check to see if AccessControlPolicy property is set + internal bool IsSetAccessControlPolicy() + { + return this._accessControlPolicy != null; + } + + /// + /// Gets and sets the property ACL. + /// + /// The canned ACL to apply to the object. For more information, see Canned + /// ACL. + /// + /// + public S3CannedACL ACL + { + get { return this._acl; } + set { this._acl = value; } + } + + // Check to see if ACL property is set + internal bool IsSetACL() + { + return this._acl != null; + } + + /// + /// Gets and sets the property BucketName. + /// + /// The bucket name that contains the object to which you want to attach the ACL. + /// + /// + /// + /// Access points - When you use this action with an access point, you must provide + /// the alias of the access point in place of the bucket name or specify the access point + /// ARN. When using the access point ARN, 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. + /// + /// + /// + /// S3 on Outposts - When you use 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 you use this action with S3 on Outposts through the Amazon Web Services SDKs, + /// you provide the Outposts access point ARN in place of the bucket name. For more information + /// about S3 on Outposts ARNs, see What + /// is S3 on Outposts? in the Amazon S3 User Guide. + /// + /// + public string BucketName + { + get { return this._bucketName; } + set { this._bucketName = value; } + } + + // Check to see if BucketName property is set + internal bool IsSetBucketName() + { + return this._bucketName != null; + } + + /// + /// Gets and sets the property ChecksumAlgorithm. + /// + /// Indicates the algorithm used to create the checksum for the object when you use the + /// SDK. This header will not provide any additional functionality if you don't use the + /// SDK. When you send 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. + /// + /// + public ChecksumAlgorithm ChecksumAlgorithm + { + get { return this._checksumAlgorithm; } + set { this._checksumAlgorithm = value; } + } + + // Check to see if ChecksumAlgorithm property is set + internal bool IsSetChecksumAlgorithm() + { + return !string.IsNullOrEmpty(this._checksumAlgorithm); + } + + /// + /// Gets and sets the property ContentMD5. + /// + /// 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. + /// + /// + public string ContentMD5 + { + get { return this._contentMD5; } + set { this._contentMD5 = value; } + } + + // Check to see if ContentMD5 property is set + internal bool IsSetContentMD5() + { + return !string.IsNullOrEmpty(this._contentMD5); + } + + /// + /// Gets and sets the property ExpectedBucketOwner. + /// + /// The account ID of the expected bucket owner. If the account ID that you provide does + /// not match the actual owner of the bucket, the request fails with the HTTP status code + /// 403 Forbidden (access denied). + /// + /// + public string ExpectedBucketOwner + { + get { return this._expectedBucketOwner; } + set { this._expectedBucketOwner = value; } + } + + // Check to see if ExpectedBucketOwner property is set + internal bool IsSetExpectedBucketOwner() + { + return !string.IsNullOrEmpty(this._expectedBucketOwner); + } + + /// + /// Gets and sets the property GrantFullControl. + /// + /// Allows grantee the read, write, read ACP, and write ACP permissions on the bucket. + /// + /// + /// + /// This functionality is not supported for Amazon S3 on Outposts. + /// + /// + public string GrantFullControl + { + get { return this._grantFullControl; } + set { this._grantFullControl = value; } + } + + // Check to see if GrantFullControl property is set + internal bool IsSetGrantFullControl() + { + return !string.IsNullOrEmpty(this._grantFullControl); + } + + /// + /// Gets and sets the property GrantRead. + /// + /// Allows grantee to list the objects in the bucket. + /// + /// + /// + /// This functionality is not supported for Amazon S3 on Outposts. + /// + /// + public string GrantRead + { + get { return this._grantRead; } + set { this._grantRead = value; } + } + + // Check to see if GrantRead property is set + internal bool IsSetGrantRead() + { + return !string.IsNullOrEmpty(this._grantRead); + } + + /// + /// Gets and sets the property GrantReadACP. + /// + /// Allows grantee to read the bucket ACL. + /// + /// + /// + /// This functionality is not supported for Amazon S3 on Outposts. + /// + /// + public string GrantReadACP + { + get { return this._grantReadACP; } + set { this._grantReadACP = value; } + } + + // Check to see if GrantReadACP property is set + internal bool IsSetGrantReadACP() + { + return !string.IsNullOrEmpty(this._grantReadACP); + } + + /// + /// Gets and sets the property GrantWrite. + /// + /// 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. + /// + /// + public string GrantWrite + { + get { return this._grantWrite; } + set { this._grantWrite = value; } + } + + // Check to see if GrantWrite property is set + internal bool IsSetGrantWrite() + { + return !string.IsNullOrEmpty(this._grantWrite); + } + + /// + /// Gets and sets the property GrantWriteACP. + /// + /// Allows grantee to write the ACL for the applicable bucket. + /// + /// + /// + /// This functionality is not supported for Amazon S3 on Outposts. + /// + /// + public string GrantWriteACP + { + get { return this._grantWriteACP; } + set { this._grantWriteACP = value; } + } + + // Check to see if GrantWriteACP property is set + internal bool IsSetGrantWriteACP() + { + return !string.IsNullOrEmpty(this._grantWriteACP); + } + + /// + /// Gets and sets the property Key. + /// + /// Key for which the PUT action was initiated. + /// + /// + [AWSProperty(Required = true, Min = 1)] + public string Key + { + get { return this._key; } + set { this._key = value; } + } + + // Check to see if Key property is set + internal bool IsSetKey() + { + return this._key != null; + } + + /// + /// Gets and sets the property RequestPayer. + /// + public RequestPayer RequestPayer + { + get { return this._requestPayer; } + set { this._requestPayer = value; } + } + + // Check to see if RequestPayer property is set + internal bool IsSetRequestPayer() + { + return !string.IsNullOrEmpty(this._requestPayer); + } + + /// + /// Gets and sets the property VersionId. + /// + /// Version ID used to reference a specific version of the object. + /// + /// + /// + /// This functionality is not supported for directory buckets. + /// + /// + /// + public string VersionId + { + get { return this._versionId; } + set { this._versionId = value; } + } + + // Check to see if VersionId property is set + internal bool IsSetVersionId() + { + return this._versionId != null; + } + + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Model/PutObjectACLResponse.cs b/sdk/src/Services/S3/Custom/Model/PutObjectACLResponse.cs new file mode 100644 index 000000000000..e4577fa1fdc3 --- /dev/null +++ b/sdk/src/Services/S3/Custom/Model/PutObjectACLResponse.cs @@ -0,0 +1,52 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +using System; +using System.Collections.Generic; +using System.Xml.Serialization; +using System.Text; +using System.IO; +using System.Net; + +using Amazon.Runtime; +using Amazon.Runtime.Internal; + +#pragma warning disable CS0612,CS0618,CS1570 +namespace Amazon.S3.Model +{ + /// + /// This is the response object from the PutObjectAcl operation. + /// + public partial class PutObjectAclResponse : AmazonWebServiceResponse + { + private RequestCharged _requestCharged; + + /// + /// Gets and sets the property RequestCharged. + /// + public RequestCharged RequestCharged + { + get { return this._requestCharged; } + set { this._requestCharged = value; } + } + + // Check to see if RequestCharged property is set + internal bool IsSetRequestCharged() + { + return !string.IsNullOrEmpty(this._requestCharged); + } + + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Util/AmazonS3Util.cs b/sdk/src/Services/S3/Custom/Util/AmazonS3Util.cs index 63bc14045eb9..7e3a5254408a 100644 --- a/sdk/src/Services/S3/Custom/Util/AmazonS3Util.cs +++ b/sdk/src/Services/S3/Custom/Util/AmazonS3Util.cs @@ -650,7 +650,7 @@ public static async System.Threading.Tasks.Task DoesS3BucketExistV2Async(I { try { - await s3Client.GetACLAsync(bucketName).ConfigureAwait(false); + await s3Client.GetBucketAclAsync(new GetBucketAclRequest() { BucketName = bucketName}).ConfigureAwait(false); } catch (AmazonS3Exception e) { diff --git a/sdk/src/Services/S3/Custom/Util/_bcl/AmazonS3Util.Operations.cs b/sdk/src/Services/S3/Custom/Util/_bcl/AmazonS3Util.Operations.cs index 313ff3a84d2d..19056ac16ba7 100644 --- a/sdk/src/Services/S3/Custom/Util/_bcl/AmazonS3Util.Operations.cs +++ b/sdk/src/Services/S3/Custom/Util/_bcl/AmazonS3Util.Operations.cs @@ -50,7 +50,7 @@ public static bool DoesS3BucketExistV2(IAmazonS3 s3Client, string bucketName) { try { - s3Client.GetACL(bucketName); + var response = s3Client.GetBucketAcl(new GetBucketAclRequest() { BucketName = bucketName}); } catch (AmazonS3Exception e) { @@ -166,7 +166,7 @@ public static void SetObjectStorageClass(IAmazonS3 s3Client, string bucketName, public static void SetObjectStorageClass(IAmazonS3 s3Client, string bucketName, string key, string version, S3StorageClass sClass) { CopyObjectRequest copyRequest; - PutACLRequest putACLRequest; + PutObjectAclRequest putACLRequest; SetupForObjectModification(s3Client, bucketName, key, version, out copyRequest, out putACLRequest); @@ -176,7 +176,7 @@ public static void SetObjectStorageClass(IAmazonS3 s3Client, string bucketName, if (!string.IsNullOrEmpty(copyResponse.SourceVersionId)) putACLRequest.VersionId = copyResponse.SourceVersionId; - s3Client.PutACL(putACLRequest); + s3Client.PutObjectAcl(putACLRequest); } ///// @@ -228,17 +228,17 @@ public static void SetServerSideEncryption(IAmazonS3 s3Client, string bucketName public static void SetServerSideEncryption(IAmazonS3 s3Client, string bucketName, string key, string version, ServerSideEncryptionMethod method) { CopyObjectRequest copyRequest; - PutACLRequest putACLRequest; + PutObjectAclRequest putObjectAclRequest; - SetupForObjectModification(s3Client, bucketName, key, version, out copyRequest, out putACLRequest); + SetupForObjectModification(s3Client, bucketName, key, version, out copyRequest, out putObjectAclRequest); copyRequest.ServerSideEncryptionMethod = method; CopyObjectResponse copyResponse = s3Client.CopyObject(copyRequest); if (!string.IsNullOrEmpty(copyResponse.SourceVersionId)) - putACLRequest.VersionId = copyResponse.SourceVersionId; + putObjectAclRequest.VersionId = copyResponse.SourceVersionId; - s3Client.PutACL(putACLRequest); + s3Client.PutObjectAcl(putObjectAclRequest); } ///// @@ -262,17 +262,17 @@ public static void SetServerSideEncryption(IAmazonS3 s3Client, string bucketName public static void SetWebsiteRedirectLocation(IAmazonS3 s3Client, string bucketName, string key, string websiteRedirectLocation) { CopyObjectRequest copyRequest; - PutACLRequest putACLRequest; + PutObjectAclRequest putObjectAclRequest; - SetupForObjectModification(s3Client, bucketName, key, null, out copyRequest, out putACLRequest); + SetupForObjectModification(s3Client, bucketName, key, null, out copyRequest, out putObjectAclRequest); copyRequest.WebsiteRedirectLocation = websiteRedirectLocation; CopyObjectResponse copyResponse = s3Client.CopyObject(copyRequest); if (!string.IsNullOrEmpty(copyResponse.SourceVersionId)) - putACLRequest.VersionId = copyResponse.SourceVersionId; + putObjectAclRequest.VersionId = copyResponse.SourceVersionId; - s3Client.PutACL(putACLRequest); + s3Client.PutObjectAcl(putObjectAclRequest); } /// @@ -284,25 +284,25 @@ public static void SetWebsiteRedirectLocation(IAmazonS3 s3Client, string bucketN /// /// /// - /// + /// static void SetupForObjectModification(IAmazonS3 s3Client, string bucketName, string key, string version, - out CopyObjectRequest copyRequest, out PutACLRequest putACLRequest) + out CopyObjectRequest copyRequest, out PutObjectAclRequest putObjectAclRequest) { // Get the existing ACL of the object - GetACLRequest getACLRequest = new GetACLRequest(); - getACLRequest.BucketName = bucketName; - getACLRequest.Key = key; + GetObjectAclRequest getObjectAclRequest = new GetObjectAclRequest(); + getObjectAclRequest.BucketName = bucketName; + getObjectAclRequest.Key = key; if (version != null) - getACLRequest.VersionId = version; - GetACLResponse getACLResponse = s3Client.GetACL(getACLRequest); + getObjectAclRequest.VersionId = version; + GetObjectAclResponse getObjectAclResponse = s3Client.GetObjectAcl(getObjectAclRequest); // Set the object's original ACL back onto it because a COPY // operation resets the ACL on the destination object. - putACLRequest = new PutACLRequest(); - putACLRequest.BucketName = bucketName; - putACLRequest.Key = key; - putACLRequest.AccessControlList = getACLResponse.AccessControlList; + putObjectAclRequest = new PutObjectAclRequest(); + putObjectAclRequest.BucketName = bucketName; + putObjectAclRequest.Key = key; + putObjectAclRequest.AccessControlPolicy.Grants = getObjectAclResponse.Grants; ListObjectsResponse listObjectResponse = s3Client.ListObjects(new ListObjectsRequest diff --git a/sdk/src/Services/S3/Custom/_async/AmazonS3Client.Extensions.cs b/sdk/src/Services/S3/Custom/_async/AmazonS3Client.Extensions.cs index 3b20b449551f..33dcbd120d5e 100644 --- a/sdk/src/Services/S3/Custom/_async/AmazonS3Client.Extensions.cs +++ b/sdk/src/Services/S3/Custom/_async/AmazonS3Client.Extensions.cs @@ -134,13 +134,13 @@ Task ICoreAmazonS3.DownloadToFilePathAsync(string bucketName, string objectKey, Task ICoreAmazonS3.MakeObjectPublicAsync(string bucket, string objectKey, bool enable) { - var request = new PutACLRequest + var request = new PutObjectAclRequest { BucketName = bucket, Key = objectKey, - CannedACL = enable ? S3CannedACL.PublicRead : S3CannedACL.Private + ACL = enable ? S3CannedACL.PublicRead : S3CannedACL.Private }; - return this.PutACLAsync(request); + return this.PutObjectAclAsync(request); } Task ICoreAmazonS3.EnsureBucketExistsAsync(string bucketName) diff --git a/sdk/src/Services/S3/Custom/_bcl/AmazonS3Client.Extensions.cs b/sdk/src/Services/S3/Custom/_bcl/AmazonS3Client.Extensions.cs index 7de77f41b4e2..d1b159e40fd2 100644 --- a/sdk/src/Services/S3/Custom/_bcl/AmazonS3Client.Extensions.cs +++ b/sdk/src/Services/S3/Custom/_bcl/AmazonS3Client.Extensions.cs @@ -130,13 +130,13 @@ Stream ICoreAmazonS3.GetObjectStream(string bucketName, string objectKey, IDicti void ICoreAmazonS3.MakeObjectPublic(string bucket, string objectKey, bool enable) { - var request = new PutACLRequest + var request = new PutObjectAclRequest { BucketName = bucket, Key = objectKey, - CannedACL = enable ? S3CannedACL.PublicRead : S3CannedACL.Private + ACL = enable ? S3CannedACL.PublicRead : S3CannedACL.Private }; - this.PutACL(request); + this.PutObjectAcl(request); } void ICoreAmazonS3.EnsureBucketExists(string bucketName) diff --git a/sdk/src/Services/S3/Custom/_bcl/IAmazonS3.cs b/sdk/src/Services/S3/Custom/_bcl/IAmazonS3.cs new file mode 100644 index 000000000000..a6525582482a --- /dev/null +++ b/sdk/src/Services/S3/Custom/_bcl/IAmazonS3.cs @@ -0,0 +1,746 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Threading.Tasks; +using System.Threading; + +using Amazon.S3.Model; +namespace Amazon.S3 +{ +#pragma warning disable CS1591 + public partial interface IAmazonS3 + { + #region GetACL + + /// + /// + /// + /// This operation is not supported by directory buckets. + /// + /// + /// + /// This implementation of the GET action uses the acl subresource to return + /// the access control list (ACL) of a bucket. To use GET to return the ACL of + /// the bucket, you must have the READ_ACP access to the bucket. If READ_ACP + /// permission is granted to the anonymous user, you can return the ACL of the bucket + /// without using an authorization header. + /// + /// + /// + /// When you use this API operation with an access point, provide the alias of the access + /// point in place of the bucket name. + /// + /// + /// + /// When you use this API operation with an Object Lambda access point, provide the alias + /// of the Object Lambda access point in place of the bucket name. If the Object Lambda + /// access point alias in a request is not valid, the error code InvalidAccessPointAliasError + /// is returned. For more information about InvalidAccessPointAliasError, see List + /// of Error Codes. + /// + /// + /// + /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, requests + /// to read ACLs are still supported and return the bucket-owner-full-control ACL + /// with the owner being the account that created the bucket. For more information, see + /// + /// Controlling object ownership and disabling ACLs in the Amazon S3 User Guide. + /// + /// + /// + /// The following operations are related to GetBucketAcl: + /// + /// + /// + /// Specifies the S3 bucket whose ACL is being requested. When you use this API operation with an access point, provide the alias of the access point in place of the bucket name. When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. For more information about InvalidAccessPointAliasError, see List of Error Codes. + /// + /// The response from the GetACL service method, as returned by S3. + /// REST API Reference for GetACL Operation + [Obsolete("GetACL combines both GetBucketAcl and GetObjectAcl and is deprecated. Please use the separated GetObjectAcl and GetBucketAcl operations.")] + GetACLResponse GetACL(string bucketName); + + /// + /// + /// + /// This operation is not supported by directory buckets. + /// + /// + /// + /// This implementation of the GET action uses the acl subresource to return + /// the access control list (ACL) of a bucket. To use GET to return the ACL of + /// the bucket, you must have the READ_ACP access to the bucket. If READ_ACP + /// permission is granted to the anonymous user, you can return the ACL of the bucket + /// without using an authorization header. + /// + /// + /// + /// When you use this API operation with an access point, provide the alias of the access + /// point in place of the bucket name. + /// + /// + /// + /// When you use this API operation with an Object Lambda access point, provide the alias + /// of the Object Lambda access point in place of the bucket name. If the Object Lambda + /// access point alias in a request is not valid, the error code InvalidAccessPointAliasError + /// is returned. For more information about InvalidAccessPointAliasError, see List + /// of Error Codes. + /// + /// + /// + /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, requests + /// to read ACLs are still supported and return the bucket-owner-full-control ACL + /// with the owner being the account that created the bucket. For more information, see + /// + /// Controlling object ownership and disabling ACLs in the Amazon S3 User Guide. + /// + /// + /// + /// The following operations are related to GetBucketAcl: + /// + /// + /// + /// Container for the necessary parameters to execute the GetACL service method. + /// + /// The response from the GetACL service method, as returned by S3. + /// REST API Reference for GetACL Operation + [Obsolete("GetACL combines both GetBucketAcl and GetObjectAcl and is deprecated. Please use the separated GetObjectAcl and GetBucketAcl operations.")] + GetACLResponse GetACL(GetACLRequest request); + /// + /// + /// + /// This operation is not supported by directory buckets. + /// + /// + /// + /// This implementation of the GET action uses the acl subresource to return + /// the access control list (ACL) of a bucket. To use GET to return the ACL of + /// the bucket, you must have the READ_ACP access to the bucket. If READ_ACP + /// permission is granted to the anonymous user, you can return the ACL of the bucket + /// without using an authorization header. + /// + /// + /// + /// When you use this API operation with an access point, provide the alias of the access + /// point in place of the bucket name. + /// + /// + /// + /// When you use this API operation with an Object Lambda access point, provide the alias + /// of the Object Lambda access point in place of the bucket name. If the Object Lambda + /// access point alias in a request is not valid, the error code InvalidAccessPointAliasError + /// is returned. For more information about InvalidAccessPointAliasError, see List + /// of Error Codes. + /// + /// + /// + /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, requests + /// to read ACLs are still supported and return the bucket-owner-full-control ACL + /// with the owner being the account that created the bucket. For more information, see + /// + /// Controlling object ownership and disabling ACLs in the Amazon S3 User Guide. + /// + /// + /// + /// The following operations are related to GetBucketAcl: + /// + /// + /// + /// Specifies the S3 bucket whose ACL is being requested. When you use this API operation with an access point, provide the alias of the access point in place of the bucket name. When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. For more information about InvalidAccessPointAliasError, see List of Error Codes. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// + /// The response from the GetACL service method, as returned by S3. + /// REST API Reference for GetACL Operation + [Obsolete("GetACL combines both GetBucketAcl and GetObjectAcl and is deprecated. Please use the separated GetObjectAcl and GetBucketAcl operations.")] + Task GetACLAsync(string bucketName, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); + + + /// + /// + /// + /// This operation is not supported by directory buckets. + /// + /// + /// + /// This implementation of the GET action uses the acl subresource to return + /// the access control list (ACL) of a bucket. To use GET to return the ACL of + /// the bucket, you must have the READ_ACP access to the bucket. If READ_ACP + /// permission is granted to the anonymous user, you can return the ACL of the bucket + /// without using an authorization header. + /// + /// + /// + /// When you use this API operation with an access point, provide the alias of the access + /// point in place of the bucket name. + /// + /// + /// + /// When you use this API operation with an Object Lambda access point, provide the alias + /// of the Object Lambda access point in place of the bucket name. If the Object Lambda + /// access point alias in a request is not valid, the error code InvalidAccessPointAliasError + /// is returned. For more information about InvalidAccessPointAliasError, see List + /// of Error Codes. + /// + /// + /// + /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, requests + /// to read ACLs are still supported and return the bucket-owner-full-control ACL + /// with the owner being the account that created the bucket. For more information, see + /// + /// Controlling object ownership and disabling ACLs in the Amazon S3 User Guide. + /// + /// + /// + /// The following operations are related to GetBucketAcl: + /// + /// + /// + /// Container for the necessary parameters to execute the GetACL service method. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// + /// The response from the GetACL service method, as returned by S3. + /// REST API Reference for GetACL Operation + [Obsolete("GetACL combines both GetBucketAcl and GetObjectAcl and is deprecated. Please use the separated GetObjectAcl and GetBucketAcl operations.")] + Task GetACLAsync(GetACLRequest request, CancellationToken cancellationToken = default(CancellationToken)); + #endregion + #region PutACL + + /// + /// + /// + /// This operation is not supported by directory buckets. + /// + /// + /// + /// Sets the permissions on an existing bucket using access control lists (ACL). For more + /// information, see Using + /// ACLs. To set the ACL of a bucket, you must have the WRITE_ACP permission. + /// + /// + /// + /// You can use one of the following two ways to set a bucket's permissions: + /// + ///
  • + /// + /// Specify the ACL in the request body + /// + ///
  • + /// + /// Specify permissions using request headers + /// + ///
+ /// + /// You cannot specify access permission using both the body and the request headers. + /// + /// + /// + /// Depending on your application needs, you may choose to set the ACL on a bucket using + /// either the request body or the headers. For example, if you have an existing application + /// that updates a bucket ACL using the request body, then you can continue to use that + /// approach. + /// + /// + /// + /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, ACLs + /// are disabled and no longer affect permissions. You must use policies to grant access + /// to your bucket and the objects in it. Requests to set ACLs or update ACLs fail and + /// return the AccessControlListNotSupported error code. Requests to read ACLs + /// are still supported. For more information, see Controlling + /// object ownership in the Amazon S3 User Guide. + /// + ///
Permissions
+ /// + /// You can set access permissions by using one of the following methods: + /// + ///
  • + /// + /// Specify a canned ACL with the x-amz-acl request header. Amazon S3 supports + /// a set of predefined ACLs, known as canned ACLs. Each canned ACL has a predefined + /// set of grantees and permissions. Specify the canned ACL name as the value of x-amz-acl. + /// If you use this header, you cannot use other access control-specific headers in your + /// request. For more information, see Canned + /// ACL. + /// + ///
  • + /// + /// Specify access permissions explicitly with the x-amz-grant-read, x-amz-grant-read-acp, + /// x-amz-grant-write-acp, and x-amz-grant-full-control headers. When using + /// these headers, you specify explicit access permissions and grantees (Amazon Web Services + /// accounts or Amazon S3 groups) who will receive the permission. If you use these ACL-specific + /// headers, you cannot use the x-amz-acl header to set a canned ACL. These parameters + /// map to the set of permissions that Amazon S3 supports in an ACL. For more information, + /// see Access + /// Control List (ACL) Overview. + /// + /// + /// + /// You specify each grantee as a type=value pair, where the type is one of the following: + /// + ///
    • + /// + /// id – if the value specified is the canonical user ID of an Amazon Web Services + /// account + /// + ///
    • + /// + /// uri – if you are granting permissions to a predefined group + /// + ///
    • + /// + /// emailAddress – if the value specified is the email address of an Amazon Web + /// Services account + /// + /// + /// + /// Using email addresses to specify a grantee is only supported in the following Amazon + /// Web Services Regions: + /// + ///
      • + /// + /// US East (N. Virginia) + /// + ///
      • + /// + /// US West (N. California) + /// + ///
      • + /// + /// US West (Oregon) + /// + ///
      • + /// + /// Asia Pacific (Singapore) + /// + ///
      • + /// + /// Asia Pacific (Sydney) + /// + ///
      • + /// + /// Asia Pacific (Tokyo) + /// + ///
      • + /// + /// Europe (Ireland) + /// + ///
      • + /// + /// South America (São Paulo) + /// + ///
      + /// + /// For a list of all the Amazon S3 supported Regions and endpoints, see Regions + /// and Endpoints in the Amazon Web Services General Reference. + /// + ///
    + /// + /// For example, the following x-amz-grant-write header grants create, overwrite, + /// and delete objects permission to LogDelivery group predefined by Amazon S3 and two + /// Amazon Web Services accounts identified by their email addresses. + /// + /// + /// + /// x-amz-grant-write: uri="http://acs.amazonaws.com/groups/s3/LogDelivery", id="111122223333", + /// id="555566667777" + /// + ///
+ /// + /// You can use either a canned ACL or specify access permissions explicitly. You cannot + /// do both. + /// + ///
Grantee Values
+ /// + /// You can specify the person (grantee) to whom you're assigning access rights (using + /// request elements) in the following ways: + /// + ///
  • + /// + /// By the person's ID: + /// + /// + /// + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"><ID><>ID<></ID><DisplayName><>GranteesEmail<></DisplayName> + /// </Grantee> + /// + /// + /// + /// DisplayName is optional and ignored in the request + /// + ///
  • + /// + /// By URI: + /// + /// + /// + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Group"><URI><>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<></URI></Grantee> + /// + /// + ///
  • + /// + /// By Email address: + /// + /// + /// + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="AmazonCustomerByEmail"><EmailAddress><>Grantees@email.com<></EmailAddress>&</Grantee> + /// + /// + /// + /// + /// The grantee is resolved to the CanonicalUser and, in a response to a GET Object acl + /// request, appears as the CanonicalUser. + /// + /// + /// + /// Using email addresses to specify a grantee is only supported in the following Amazon + /// Web Services Regions: + /// + ///
    • + /// + /// US East (N. Virginia) + /// + ///
    • + /// + /// US West (N. California) + /// + ///
    • + /// + /// US West (Oregon) + /// + ///
    • + /// + /// Asia Pacific (Singapore) + /// + ///
    • + /// + /// Asia Pacific (Sydney) + /// + ///
    • + /// + /// Asia Pacific (Tokyo) + /// + ///
    • + /// + /// Europe (Ireland) + /// + ///
    • + /// + /// South America (São Paulo) + /// + ///
    + /// + /// For a list of all the Amazon S3 supported Regions and endpoints, see Regions + /// and Endpoints in the Amazon Web Services General Reference. + /// + ///
+ /// + /// The following operations are related to PutBucketAcl: + /// + /// + ///
+ /// Container for the necessary parameters to execute the PutACL service method. + /// + /// The response from the PutACL service method, as returned by S3. + /// REST API Reference for PutACL Operation + PutACLResponse PutACL(PutACLRequest request); + + /// + /// + /// + /// This operation is not supported by directory buckets. + /// + /// + /// + /// Sets the permissions on an existing bucket using access control lists (ACL). For more + /// information, see Using + /// ACLs. To set the ACL of a bucket, you must have the WRITE_ACP permission. + /// + /// + /// + /// You can use one of the following two ways to set a bucket's permissions: + /// + ///
  • + /// + /// Specify the ACL in the request body + /// + ///
  • + /// + /// Specify permissions using request headers + /// + ///
+ /// + /// You cannot specify access permission using both the body and the request headers. + /// + /// + /// + /// Depending on your application needs, you may choose to set the ACL on a bucket using + /// either the request body or the headers. For example, if you have an existing application + /// that updates a bucket ACL using the request body, then you can continue to use that + /// approach. + /// + /// + /// + /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, ACLs + /// are disabled and no longer affect permissions. You must use policies to grant access + /// to your bucket and the objects in it. Requests to set ACLs or update ACLs fail and + /// return the AccessControlListNotSupported error code. Requests to read ACLs + /// are still supported. For more information, see Controlling + /// object ownership in the Amazon S3 User Guide. + /// + ///
Permissions
+ /// + /// You can set access permissions by using one of the following methods: + /// + ///
  • + /// + /// Specify a canned ACL with the x-amz-acl request header. Amazon S3 supports + /// a set of predefined ACLs, known as canned ACLs. Each canned ACL has a predefined + /// set of grantees and permissions. Specify the canned ACL name as the value of x-amz-acl. + /// If you use this header, you cannot use other access control-specific headers in your + /// request. For more information, see Canned + /// ACL. + /// + ///
  • + /// + /// Specify access permissions explicitly with the x-amz-grant-read, x-amz-grant-read-acp, + /// x-amz-grant-write-acp, and x-amz-grant-full-control headers. When using + /// these headers, you specify explicit access permissions and grantees (Amazon Web Services + /// accounts or Amazon S3 groups) who will receive the permission. If you use these ACL-specific + /// headers, you cannot use the x-amz-acl header to set a canned ACL. These parameters + /// map to the set of permissions that Amazon S3 supports in an ACL. For more information, + /// see Access + /// Control List (ACL) Overview. + /// + /// + /// + /// You specify each grantee as a type=value pair, where the type is one of the following: + /// + ///
    • + /// + /// id – if the value specified is the canonical user ID of an Amazon Web Services + /// account + /// + ///
    • + /// + /// uri – if you are granting permissions to a predefined group + /// + ///
    • + /// + /// emailAddress – if the value specified is the email address of an Amazon Web + /// Services account + /// + /// + /// + /// Using email addresses to specify a grantee is only supported in the following Amazon + /// Web Services Regions: + /// + ///
      • + /// + /// US East (N. Virginia) + /// + ///
      • + /// + /// US West (N. California) + /// + ///
      • + /// + /// US West (Oregon) + /// + ///
      • + /// + /// Asia Pacific (Singapore) + /// + ///
      • + /// + /// Asia Pacific (Sydney) + /// + ///
      • + /// + /// Asia Pacific (Tokyo) + /// + ///
      • + /// + /// Europe (Ireland) + /// + ///
      • + /// + /// South America (São Paulo) + /// + ///
      + /// + /// For a list of all the Amazon S3 supported Regions and endpoints, see Regions + /// and Endpoints in the Amazon Web Services General Reference. + /// + ///
    + /// + /// For example, the following x-amz-grant-write header grants create, overwrite, + /// and delete objects permission to LogDelivery group predefined by Amazon S3 and two + /// Amazon Web Services accounts identified by their email addresses. + /// + /// + /// + /// x-amz-grant-write: uri="http://acs.amazonaws.com/groups/s3/LogDelivery", id="111122223333", + /// id="555566667777" + /// + ///
+ /// + /// You can use either a canned ACL or specify access permissions explicitly. You cannot + /// do both. + /// + ///
Grantee Values
+ /// + /// You can specify the person (grantee) to whom you're assigning access rights (using + /// request elements) in the following ways: + /// + ///
  • + /// + /// By the person's ID: + /// + /// + /// + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"><ID><>ID<></ID><DisplayName><>GranteesEmail<></DisplayName> + /// </Grantee> + /// + /// + /// + /// DisplayName is optional and ignored in the request + /// + ///
  • + /// + /// By URI: + /// + /// + /// + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Group"><URI><>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<></URI></Grantee> + /// + /// + ///
  • + /// + /// By Email address: + /// + /// + /// + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="AmazonCustomerByEmail"><EmailAddress><>Grantees@email.com<></EmailAddress>&</Grantee> + /// + /// + /// + /// + /// The grantee is resolved to the CanonicalUser and, in a response to a GET Object acl + /// request, appears as the CanonicalUser. + /// + /// + /// + /// Using email addresses to specify a grantee is only supported in the following Amazon + /// Web Services Regions: + /// + ///
    • + /// + /// US East (N. Virginia) + /// + ///
    • + /// + /// US West (N. California) + /// + ///
    • + /// + /// US West (Oregon) + /// + ///
    • + /// + /// Asia Pacific (Singapore) + /// + ///
    • + /// + /// Asia Pacific (Sydney) + /// + ///
    • + /// + /// Asia Pacific (Tokyo) + /// + ///
    • + /// + /// Europe (Ireland) + /// + ///
    • + /// + /// South America (São Paulo) + /// + ///
    + /// + /// For a list of all the Amazon S3 supported Regions and endpoints, see Regions + /// and Endpoints in the Amazon Web Services General Reference. + /// + ///
+ /// + /// The following operations are related to PutBucketAcl: + /// + /// + ///
+ /// Container for the necessary parameters to execute the PutACL service method. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// + /// The response from the PutACL service method, as returned by S3. + /// REST API Reference for PutACL Operation + [Obsolete("PutACL combines both PutBucketAcl and PutObjectAcl and is deprecated. Please use the separated PutObjectAcl and PutBucketAcl operations.")] + Task PutACLAsync(PutACLRequest request, CancellationToken cancellationToken = default(CancellationToken)); + #endregion + } +} diff --git a/sdk/src/Services/S3/Custom/_netstandard/IAmazonS3.cs b/sdk/src/Services/S3/Custom/_netstandard/IAmazonS3.cs new file mode 100644 index 000000000000..383d0d90019b --- /dev/null +++ b/sdk/src/Services/S3/Custom/_netstandard/IAmazonS3.cs @@ -0,0 +1,333 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Threading.Tasks; +using System.Threading; + +using Amazon.S3.Model; +namespace Amazon.S3 +{ +#pragma warning disable CS1591 + public partial interface IAmazonS3 + { + #region GetACL + [Obsolete("GetACL combines both GetBucketAcl and GetObjectAcl and is deprecated. Please use the separated GetObjectAcl and GetBucketAcl operations.")] + Task GetACLAsync(string bucketName, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); + + + /// + /// + /// + /// This operation is not supported by directory buckets. + /// + /// + /// + /// This implementation of the GET action uses the acl subresource to return + /// the access control list (ACL) of a bucket. To use GET to return the ACL of + /// the bucket, you must have the READ_ACP access to the bucket. If READ_ACP + /// permission is granted to the anonymous user, you can return the ACL of the bucket + /// without using an authorization header. + /// + /// + /// + /// When you use this API operation with an access point, provide the alias of the access + /// point in place of the bucket name. + /// + /// + /// + /// When you use this API operation with an Object Lambda access point, provide the alias + /// of the Object Lambda access point in place of the bucket name. If the Object Lambda + /// access point alias in a request is not valid, the error code InvalidAccessPointAliasError + /// is returned. For more information about InvalidAccessPointAliasError, see List + /// of Error Codes. + /// + /// + /// + /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, requests + /// to read ACLs are still supported and return the bucket-owner-full-control ACL + /// with the owner being the account that created the bucket. For more information, see + /// + /// Controlling object ownership and disabling ACLs in the Amazon S3 User Guide. + /// + /// + /// + /// The following operations are related to GetBucketAcl: + /// + /// + /// + /// Container for the necessary parameters to execute the GetACL service method. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// + /// The response from the GetACL service method, as returned by S3. + /// REST API Reference for GetACL Operation + [Obsolete("GetACL combines both GetBucketAcl and GetObjectAcl and is deprecated. Please use the separated GetObjectAcl and GetBucketAcl operations.")] + Task GetACLAsync(GetACLRequest request, CancellationToken cancellationToken = default(CancellationToken)); + #endregion + #region PutACL + /// + /// + /// + /// This operation is not supported by directory buckets. + /// + /// + /// + /// Sets the permissions on an existing bucket using access control lists (ACL). For more + /// information, see Using + /// ACLs. To set the ACL of a bucket, you must have the WRITE_ACP permission. + /// + /// + /// + /// You can use one of the following two ways to set a bucket's permissions: + /// + ///
  • + /// + /// Specify the ACL in the request body + /// + ///
  • + /// + /// Specify permissions using request headers + /// + ///
+ /// + /// You cannot specify access permission using both the body and the request headers. + /// + /// + /// + /// Depending on your application needs, you may choose to set the ACL on a bucket using + /// either the request body or the headers. For example, if you have an existing application + /// that updates a bucket ACL using the request body, then you can continue to use that + /// approach. + /// + /// + /// + /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, ACLs + /// are disabled and no longer affect permissions. You must use policies to grant access + /// to your bucket and the objects in it. Requests to set ACLs or update ACLs fail and + /// return the AccessControlListNotSupported error code. Requests to read ACLs + /// are still supported. For more information, see Controlling + /// object ownership in the Amazon S3 User Guide. + /// + ///
Permissions
+ /// + /// You can set access permissions by using one of the following methods: + /// + ///
  • + /// + /// Specify a canned ACL with the x-amz-acl request header. Amazon S3 supports + /// a set of predefined ACLs, known as canned ACLs. Each canned ACL has a predefined + /// set of grantees and permissions. Specify the canned ACL name as the value of x-amz-acl. + /// If you use this header, you cannot use other access control-specific headers in your + /// request. For more information, see Canned + /// ACL. + /// + ///
  • + /// + /// Specify access permissions explicitly with the x-amz-grant-read, x-amz-grant-read-acp, + /// x-amz-grant-write-acp, and x-amz-grant-full-control headers. When using + /// these headers, you specify explicit access permissions and grantees (Amazon Web Services + /// accounts or Amazon S3 groups) who will receive the permission. If you use these ACL-specific + /// headers, you cannot use the x-amz-acl header to set a canned ACL. These parameters + /// map to the set of permissions that Amazon S3 supports in an ACL. For more information, + /// see Access + /// Control List (ACL) Overview. + /// + /// + /// + /// You specify each grantee as a type=value pair, where the type is one of the following: + /// + ///
    • + /// + /// id – if the value specified is the canonical user ID of an Amazon Web Services + /// account + /// + ///
    • + /// + /// uri – if you are granting permissions to a predefined group + /// + ///
    • + /// + /// emailAddress – if the value specified is the email address of an Amazon Web + /// Services account + /// + /// + /// + /// Using email addresses to specify a grantee is only supported in the following Amazon + /// Web Services Regions: + /// + ///
      • + /// + /// US East (N. Virginia) + /// + ///
      • + /// + /// US West (N. California) + /// + ///
      • + /// + /// US West (Oregon) + /// + ///
      • + /// + /// Asia Pacific (Singapore) + /// + ///
      • + /// + /// Asia Pacific (Sydney) + /// + ///
      • + /// + /// Asia Pacific (Tokyo) + /// + ///
      • + /// + /// Europe (Ireland) + /// + ///
      • + /// + /// South America (São Paulo) + /// + ///
      + /// + /// For a list of all the Amazon S3 supported Regions and endpoints, see Regions + /// and Endpoints in the Amazon Web Services General Reference. + /// + ///
    + /// + /// For example, the following x-amz-grant-write header grants create, overwrite, + /// and delete objects permission to LogDelivery group predefined by Amazon S3 and two + /// Amazon Web Services accounts identified by their email addresses. + /// + /// + /// + /// x-amz-grant-write: uri="http://acs.amazonaws.com/groups/s3/LogDelivery", id="111122223333", + /// id="555566667777" + /// + ///
+ /// + /// You can use either a canned ACL or specify access permissions explicitly. You cannot + /// do both. + /// + ///
Grantee Values
+ /// + /// You can specify the person (grantee) to whom you're assigning access rights (using + /// request elements) in the following ways: + /// + ///
  • + /// + /// By the person's ID: + /// + /// + /// + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"><ID><>ID<></ID><DisplayName><>GranteesEmail<></DisplayName> + /// </Grantee> + /// + /// + /// + /// DisplayName is optional and ignored in the request + /// + ///
  • + /// + /// By URI: + /// + /// + /// + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Group"><URI><>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<></URI></Grantee> + /// + /// + ///
  • + /// + /// By Email address: + /// + /// + /// + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="AmazonCustomerByEmail"><EmailAddress><>Grantees@email.com<></EmailAddress>&</Grantee> + /// + /// + /// + /// + /// The grantee is resolved to the CanonicalUser and, in a response to a GET Object acl + /// request, appears as the CanonicalUser. + /// + /// + /// + /// Using email addresses to specify a grantee is only supported in the following Amazon + /// Web Services Regions: + /// + ///
    • + /// + /// US East (N. Virginia) + /// + ///
    • + /// + /// US West (N. California) + /// + ///
    • + /// + /// US West (Oregon) + /// + ///
    • + /// + /// Asia Pacific (Singapore) + /// + ///
    • + /// + /// Asia Pacific (Sydney) + /// + ///
    • + /// + /// Asia Pacific (Tokyo) + /// + ///
    • + /// + /// Europe (Ireland) + /// + ///
    • + /// + /// South America (São Paulo) + /// + ///
    + /// + /// For a list of all the Amazon S3 supported Regions and endpoints, see Regions + /// and Endpoints in the Amazon Web Services General Reference. + /// + ///
+ /// + /// The following operations are related to PutBucketAcl: + /// + /// + ///
+ /// Container for the necessary parameters to execute the PutACL service method. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// + /// The response from the PutACL service method, as returned by S3. + /// REST API Reference for PutACL Operation + [Obsolete("PutACL combines both PutBucketAcl and PutObjectAcl and is deprecated. Please use the separated PutObjectAcl and PutBucketAcl operations.")] + Task PutACLAsync(PutACLRequest request, CancellationToken cancellationToken = default(CancellationToken)); + #endregion + } +} diff --git a/sdk/src/Services/S3/Generated/Internal/AmazonS3EndpointResolver.cs b/sdk/src/Services/S3/Generated/Internal/AmazonS3EndpointResolver.cs index 27649f0e0fe4..c9a81098f0e3 100644 --- a/sdk/src/Services/S3/Generated/Internal/AmazonS3EndpointResolver.cs +++ b/sdk/src/Services/S3/Generated/Internal/AmazonS3EndpointResolver.cs @@ -115,6 +115,18 @@ protected override EndpointParameters MapEndpointsParameters(IRequestContext req result.Bucket = request.BucketName; return result; } + if (requestContext.RequestName == "GetACLRequest") { + result.UseS3ExpressControlEndpoint = true; + var request = (GetACLRequest)requestContext.OriginalRequest; + result.Bucket = request.BucketName; + return result; + } + if (requestContext.RequestName == "PutACLRequest") { + result.UseS3ExpressControlEndpoint = true; + var request = (PutACLRequest)requestContext.OriginalRequest; + result.Bucket = request.BucketName; + return result; + } // Assign staticContextParams and contextParam per operation if (requestContext.RequestName == "AbortMultipartUploadRequest") { @@ -247,15 +259,15 @@ protected override EndpointParameters MapEndpointsParameters(IRequestContext req result.Bucket = request.BucketName; return result; } - if (requestContext.RequestName == "GetACLRequest") { + if (requestContext.RequestName == "GetBucketAccelerateConfigurationRequest") { result.UseS3ExpressControlEndpoint = true; - var request = (GetACLRequest)requestContext.OriginalRequest; + var request = (GetBucketAccelerateConfigurationRequest)requestContext.OriginalRequest; result.Bucket = request.BucketName; return result; } - if (requestContext.RequestName == "GetBucketAccelerateConfigurationRequest") { + if (requestContext.RequestName == "GetBucketAclRequest") { result.UseS3ExpressControlEndpoint = true; - var request = (GetBucketAccelerateConfigurationRequest)requestContext.OriginalRequest; + var request = (GetBucketAclRequest)requestContext.OriginalRequest; result.Bucket = request.BucketName; return result; } @@ -373,6 +385,12 @@ protected override EndpointParameters MapEndpointsParameters(IRequestContext req result.Key = request.Key; return result; } + if (requestContext.RequestName == "GetObjectAclRequest") { + var request = (GetObjectAclRequest)requestContext.OriginalRequest; + result.Bucket = request.BucketName; + result.Key = request.Key; + return result; + } if (requestContext.RequestName == "GetObjectAttributesRequest") { var request = (GetObjectAttributesRequest)requestContext.OriginalRequest; result.Bucket = request.BucketName; @@ -483,12 +501,6 @@ protected override EndpointParameters MapEndpointsParameters(IRequestContext req result.Prefix = request.Prefix; return result; } - if (requestContext.RequestName == "PutACLRequest") { - result.UseS3ExpressControlEndpoint = true; - var request = (PutACLRequest)requestContext.OriginalRequest; - result.Bucket = request.BucketName; - return result; - } if (requestContext.RequestName == "PutBucketRequest") { result.DisableAccessPoints = true; result.UseS3ExpressControlEndpoint = true; @@ -502,6 +514,12 @@ protected override EndpointParameters MapEndpointsParameters(IRequestContext req result.Bucket = request.BucketName; return result; } + if (requestContext.RequestName == "PutBucketAclRequest") { + result.UseS3ExpressControlEndpoint = true; + var request = (PutBucketAclRequest)requestContext.OriginalRequest; + result.Bucket = request.BucketName; + return result; + } if (requestContext.RequestName == "PutBucketAnalyticsConfigurationRequest") { result.UseS3ExpressControlEndpoint = true; var request = (PutBucketAnalyticsConfigurationRequest)requestContext.OriginalRequest; @@ -604,6 +622,12 @@ protected override EndpointParameters MapEndpointsParameters(IRequestContext req result.Key = request.Key; return result; } + if (requestContext.RequestName == "PutObjectAclRequest") { + var request = (PutObjectAclRequest)requestContext.OriginalRequest; + result.Bucket = request.BucketName; + result.Key = request.Key; + return result; + } if (requestContext.RequestName == "PutObjectLegalHoldRequest") { var request = (PutObjectLegalHoldRequest)requestContext.OriginalRequest; result.Bucket = request.BucketName; diff --git a/sdk/src/Services/S3/Generated/Internal/AmazonS3Metadata.cs b/sdk/src/Services/S3/Generated/Internal/AmazonS3Metadata.cs index 430c6e7003f1..8e1058d6d4fb 100644 --- a/sdk/src/Services/S3/Generated/Internal/AmazonS3Metadata.cs +++ b/sdk/src/Services/S3/Generated/Internal/AmazonS3Metadata.cs @@ -46,19 +46,17 @@ public System.Collections.Generic.IDictionary OperationNameMappi { get { - return new System.Collections.Generic.Dictionary(15) + return new System.Collections.Generic.Dictionary(13) { {"PutBucket", "CreateBucket"}, {"InitiateMultipartUpload", "CreateMultipartUpload"}, {"DeleteCORSConfiguration", "DeleteBucketCors"}, {"DeleteLifecycleConfiguration", "DeleteBucketLifecycle"}, - {"GetACL", "GetBucketAcl"}, {"GetCORSConfiguration", "GetBucketCors"}, {"GetLifecycleConfiguration", "GetBucketLifecycleConfiguration"}, {"GetBucketNotification", "GetBucketNotificationConfiguration"}, {"GetObjectMetadata", "HeadObject"}, {"ListVersions", "ListObjectVersions"}, - {"PutACL", "PutBucketAcl"}, {"PutCORSConfiguration", "PutBucketCors"}, {"PutLifecycleConfiguration", "PutBucketLifecycleConfiguration"}, {"PutBucketNotification", "PutBucketNotificationConfiguration"}, diff --git a/sdk/src/Services/S3/Generated/_bcl/AmazonS3Client.cs b/sdk/src/Services/S3/Generated/_bcl/AmazonS3Client.cs index d95e125ebff2..f5ed4efe78b2 100644 --- a/sdk/src/Services/S3/Generated/_bcl/AmazonS3Client.cs +++ b/sdk/src/Services/S3/Generated/_bcl/AmazonS3Client.cs @@ -7356,252 +7356,6 @@ public virtual DeletePublicAccessBlockResponse DeletePublicAccessBlock(DeletePub #endregion - #region GetACL - - - /// - /// - /// - /// This operation is not supported by directory buckets. - /// - /// - /// - /// This implementation of the GET action uses the acl subresource to return - /// the access control list (ACL) of a bucket. To use GET to return the ACL of - /// the bucket, you must have the READ_ACP access to the bucket. If READ_ACP - /// permission is granted to the anonymous user, you can return the ACL of the bucket - /// without using an authorization header. - /// - /// - /// - /// When you use this API operation with an access point, provide the alias of the access - /// point in place of the bucket name. - /// - /// - /// - /// When you use this API operation with an Object Lambda access point, provide the alias - /// of the Object Lambda access point in place of the bucket name. If the Object Lambda - /// access point alias in a request is not valid, the error code InvalidAccessPointAliasError - /// is returned. For more information about InvalidAccessPointAliasError, see List - /// of Error Codes. - /// - /// - /// - /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, requests - /// to read ACLs are still supported and return the bucket-owner-full-control ACL - /// with the owner being the account that created the bucket. For more information, see - /// - /// Controlling object ownership and disabling ACLs in the Amazon S3 User Guide. - /// - /// - /// - /// The following operations are related to GetBucketAcl: - /// - /// - /// - /// Specifies the S3 bucket whose ACL is being requested. When you use this API operation with an access point, provide the alias of the access point in place of the bucket name. When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. For more information about InvalidAccessPointAliasError, see List of Error Codes. - /// - /// The response from the GetACL service method, as returned by S3. - /// REST API Reference for GetACL Operation - public virtual GetACLResponse GetACL(string bucketName) - { - var request = new GetACLRequest(); - request.BucketName = bucketName; - return GetACL(request); - } - - - /// - /// - /// - /// This operation is not supported by directory buckets. - /// - /// - /// - /// This implementation of the GET action uses the acl subresource to return - /// the access control list (ACL) of a bucket. To use GET to return the ACL of - /// the bucket, you must have the READ_ACP access to the bucket. If READ_ACP - /// permission is granted to the anonymous user, you can return the ACL of the bucket - /// without using an authorization header. - /// - /// - /// - /// When you use this API operation with an access point, provide the alias of the access - /// point in place of the bucket name. - /// - /// - /// - /// When you use this API operation with an Object Lambda access point, provide the alias - /// of the Object Lambda access point in place of the bucket name. If the Object Lambda - /// access point alias in a request is not valid, the error code InvalidAccessPointAliasError - /// is returned. For more information about InvalidAccessPointAliasError, see List - /// of Error Codes. - /// - /// - /// - /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, requests - /// to read ACLs are still supported and return the bucket-owner-full-control ACL - /// with the owner being the account that created the bucket. For more information, see - /// - /// Controlling object ownership and disabling ACLs in the Amazon S3 User Guide. - /// - /// - /// - /// The following operations are related to GetBucketAcl: - /// - /// - /// - /// Container for the necessary parameters to execute the GetACL service method. - /// - /// The response from the GetACL service method, as returned by S3. - /// REST API Reference for GetACL Operation - public virtual GetACLResponse GetACL(GetACLRequest request) - { - var options = new InvokeOptions(); - options.RequestMarshaller = GetACLRequestMarshaller.Instance; - options.ResponseUnmarshaller = GetACLResponseUnmarshaller.Instance; - - return Invoke(request, options); - } - - - /// - /// - /// - /// This operation is not supported by directory buckets. - /// - /// - /// - /// This implementation of the GET action uses the acl subresource to return - /// the access control list (ACL) of a bucket. To use GET to return the ACL of - /// the bucket, you must have the READ_ACP access to the bucket. If READ_ACP - /// permission is granted to the anonymous user, you can return the ACL of the bucket - /// without using an authorization header. - /// - /// - /// - /// When you use this API operation with an access point, provide the alias of the access - /// point in place of the bucket name. - /// - /// - /// - /// When you use this API operation with an Object Lambda access point, provide the alias - /// of the Object Lambda access point in place of the bucket name. If the Object Lambda - /// access point alias in a request is not valid, the error code InvalidAccessPointAliasError - /// is returned. For more information about InvalidAccessPointAliasError, see List - /// of Error Codes. - /// - /// - /// - /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, requests - /// to read ACLs are still supported and return the bucket-owner-full-control ACL - /// with the owner being the account that created the bucket. For more information, see - /// - /// Controlling object ownership and disabling ACLs in the Amazon S3 User Guide. - /// - /// - /// - /// The following operations are related to GetBucketAcl: - /// - /// - /// - /// Specifies the S3 bucket whose ACL is being requested. When you use this API operation with an access point, provide the alias of the access point in place of the bucket name. When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. For more information about InvalidAccessPointAliasError, see List of Error Codes. - /// - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// - /// - /// The response from the GetACL service method, as returned by S3. - /// REST API Reference for GetACL Operation - public virtual Task GetACLAsync(string bucketName, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) - { - var request = new GetACLRequest(); - request.BucketName = bucketName; - return GetACLAsync(request, cancellationToken); - } - - - /// - /// - /// - /// This operation is not supported by directory buckets. - /// - /// - /// - /// This implementation of the GET action uses the acl subresource to return - /// the access control list (ACL) of a bucket. To use GET to return the ACL of - /// the bucket, you must have the READ_ACP access to the bucket. If READ_ACP - /// permission is granted to the anonymous user, you can return the ACL of the bucket - /// without using an authorization header. - /// - /// - /// - /// When you use this API operation with an access point, provide the alias of the access - /// point in place of the bucket name. - /// - /// - /// - /// When you use this API operation with an Object Lambda access point, provide the alias - /// of the Object Lambda access point in place of the bucket name. If the Object Lambda - /// access point alias in a request is not valid, the error code InvalidAccessPointAliasError - /// is returned. For more information about InvalidAccessPointAliasError, see List - /// of Error Codes. - /// - /// - /// - /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, requests - /// to read ACLs are still supported and return the bucket-owner-full-control ACL - /// with the owner being the account that created the bucket. For more information, see - /// - /// Controlling object ownership and disabling ACLs in the Amazon S3 User Guide. - /// - /// - /// - /// The following operations are related to GetBucketAcl: - /// - /// - /// - /// Container for the necessary parameters to execute the GetACL service method. - /// - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// - /// - /// The response from the GetACL service method, as returned by S3. - /// REST API Reference for GetACL Operation - public virtual Task GetACLAsync(GetACLRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) - { - var options = new InvokeOptions(); - options.RequestMarshaller = GetACLRequestMarshaller.Instance; - options.ResponseUnmarshaller = GetACLResponseUnmarshaller.Instance; - - return InvokeAsync(request, options, cancellationToken); - } - - #endregion - #region GetBucketAccelerateConfiguration @@ -7856,7 +7610,7 @@ public virtual GetBucketAccelerateConfigurationResponse GetBucketAccelerateConfi #endregion - #region GetBucketAnalyticsConfiguration + #region GetBucketAcl /// @@ -7866,31 +7620,158 @@ public virtual GetBucketAccelerateConfigurationResponse GetBucketAccelerateConfi /// /// /// - /// This implementation of the GET action returns an analytics configuration (identified - /// by the analytics configuration ID) from the bucket. + /// This implementation of the GET action uses the acl subresource to return + /// the access control list (ACL) of a bucket. To use GET to return the ACL of + /// the bucket, you must have the READ_ACP access to the bucket. If READ_ACP + /// permission is granted to the anonymous user, you can return the ACL of the bucket + /// without using an authorization header. /// /// /// - /// To use this operation, you must have permissions to perform the s3:GetAnalyticsConfiguration - /// action. The bucket owner has this permission by default. The bucket owner can grant - /// this permission to others. For more information about permissions, see - /// Permissions Related to Bucket Subresource Operations and Managing - /// Access Permissions to Your Amazon S3 Resources in the Amazon S3 User Guide. - /// + /// When you use this API operation with an access point, provide the alias of the access + /// point in place of the bucket name. /// /// /// - /// For information about Amazon S3 analytics feature, see Amazon - /// S3 Analytics – Storage Class Analysis in the Amazon S3 User Guide. + /// When you use this API operation with an Object Lambda access point, provide the alias + /// of the Object Lambda access point in place of the bucket name. If the Object Lambda + /// access point alias in a request is not valid, the error code InvalidAccessPointAliasError + /// is returned. For more information about InvalidAccessPointAliasError, see List + /// of Error Codes. /// - /// + /// /// - /// The following operations are related to GetBucketAnalyticsConfiguration: + /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, requests + /// to read ACLs are still supported and return the bucket-owner-full-control ACL + /// with the owner being the account that created the bucket. For more information, see + /// + /// Controlling object ownership and disabling ACLs in the Amazon S3 User Guide. /// - /// + /// Container for the necessary parameters to execute the GetBucketAcl service method. + /// + /// The response from the GetBucketAcl service method, as returned by S3. + /// REST API Reference for GetBucketAcl Operation + public virtual GetBucketAclResponse GetBucketAcl(GetBucketAclRequest request) + { + var options = new InvokeOptions(); + options.RequestMarshaller = GetBucketAclRequestMarshaller.Instance; + options.ResponseUnmarshaller = GetBucketAclResponseUnmarshaller.Instance; + + return Invoke(request, options); + } + + + /// + /// + /// + /// This operation is not supported by directory buckets. + /// + /// + /// + /// This implementation of the GET action uses the acl subresource to return + /// the access control list (ACL) of a bucket. To use GET to return the ACL of + /// the bucket, you must have the READ_ACP access to the bucket. If READ_ACP + /// permission is granted to the anonymous user, you can return the ACL of the bucket + /// without using an authorization header. + /// + /// + /// + /// When you use this API operation with an access point, provide the alias of the access + /// point in place of the bucket name. + /// + /// + /// + /// When you use this API operation with an Object Lambda access point, provide the alias + /// of the Object Lambda access point in place of the bucket name. If the Object Lambda + /// access point alias in a request is not valid, the error code InvalidAccessPointAliasError + /// is returned. For more information about InvalidAccessPointAliasError, see List + /// of Error Codes. + /// + /// + /// + /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, requests + /// to read ACLs are still supported and return the bucket-owner-full-control ACL + /// with the owner being the account that created the bucket. For more information, see + /// + /// Controlling object ownership and disabling ACLs in the Amazon S3 User Guide. + /// + /// + /// + /// The following operations are related to GetBucketAcl: + /// + /// + /// + /// Container for the necessary parameters to execute the GetBucketAcl service method. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// + /// The response from the GetBucketAcl service method, as returned by S3. + /// REST API Reference for GetBucketAcl Operation + public virtual Task GetBucketAclAsync(GetBucketAclRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) + { + var options = new InvokeOptions(); + options.RequestMarshaller = GetBucketAclRequestMarshaller.Instance; + options.ResponseUnmarshaller = GetBucketAclResponseUnmarshaller.Instance; + + return InvokeAsync(request, options, cancellationToken); + } + + #endregion + + #region GetBucketAnalyticsConfiguration + + + /// + /// + /// + /// This operation is not supported by directory buckets. + /// + /// + /// + /// This implementation of the GET action returns an analytics configuration (identified + /// by the analytics configuration ID) from the bucket. + /// + /// + /// + /// To use this operation, you must have permissions to perform the s3:GetAnalyticsConfiguration + /// action. The bucket owner has this permission by default. The bucket owner can grant + /// this permission to others. For more information about permissions, see + /// Permissions Related to Bucket Subresource Operations and Managing + /// Access Permissions to Your Amazon S3 Resources in the Amazon S3 User Guide. + /// + /// + /// + /// + /// For information about Amazon S3 analytics feature, see Amazon + /// S3 Analytics – Storage Class Analysis in the Amazon S3 User Guide. + /// + /// + /// + /// The following operations are related to GetBucketAnalyticsConfiguration: + /// + ///
  • + /// + /// DeleteBucketAnalyticsConfiguration + /// /// ///
  • /// @@ -12298,6 +12179,153 @@ public virtual GetObjectResponse GetObject(GetObjectRequest request) #endregion + #region GetObjectAcl + + + /// + /// + /// + /// This operation is not supported by directory buckets. + /// + /// + /// + /// Returns the access control list (ACL) of an object. To use this operation, you must + /// have s3:GetObjectAcl permissions or READ_ACP access to the object. For + /// more information, see Mapping + /// of ACL permissions and access policy permissions in the Amazon S3 User Guide + /// + /// + /// + /// + /// This functionality is not supported for Amazon S3 on Outposts. + /// + /// + /// + /// By default, GET returns ACL information about the current version of an object. To + /// return ACL information about a different version, use the versionId subresource. + /// + /// + /// + /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, requests + /// to read ACLs are still supported and return the bucket-owner-full-control ACL + /// with the owner being the account that created the bucket. For more information, see + /// + /// Controlling object ownership and disabling ACLs in the Amazon S3 User Guide. + /// + /// + /// + /// The following operations are related to GetObjectAcl: + /// + /// + /// + /// Container for the necessary parameters to execute the GetObjectAcl service method. + /// + /// The response from the GetObjectAcl service method, as returned by S3. + /// REST API Reference for GetObjectAcl Operation + public virtual GetObjectAclResponse GetObjectAcl(GetObjectAclRequest request) + { + var options = new InvokeOptions(); + options.RequestMarshaller = GetObjectAclRequestMarshaller.Instance; + options.ResponseUnmarshaller = GetObjectAclResponseUnmarshaller.Instance; + + return Invoke(request, options); + } + + + /// + /// + /// + /// This operation is not supported by directory buckets. + /// + /// + /// + /// Returns the access control list (ACL) of an object. To use this operation, you must + /// have s3:GetObjectAcl permissions or READ_ACP access to the object. For + /// more information, see Mapping + /// of ACL permissions and access policy permissions in the Amazon S3 User Guide + /// + /// + /// + /// + /// This functionality is not supported for Amazon S3 on Outposts. + /// + /// + /// + /// By default, GET returns ACL information about the current version of an object. To + /// return ACL information about a different version, use the versionId subresource. + /// + /// + /// + /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, requests + /// to read ACLs are still supported and return the bucket-owner-full-control ACL + /// with the owner being the account that created the bucket. For more information, see + /// + /// Controlling object ownership and disabling ACLs in the Amazon S3 User Guide. + /// + /// + /// + /// The following operations are related to GetObjectAcl: + /// + /// + /// + /// Container for the necessary parameters to execute the GetObjectAcl service method. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// + /// The response from the GetObjectAcl service method, as returned by S3. + /// REST API Reference for GetObjectAcl Operation + public virtual Task GetObjectAclAsync(GetObjectAclRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) + { + var options = new InvokeOptions(); + options.RequestMarshaller = GetObjectAclRequestMarshaller.Instance; + options.ResponseUnmarshaller = GetObjectAclResponseUnmarshaller.Instance; + + return InvokeAsync(request, options, cancellationToken); + } + + #endregion + #region GetObjectAttributes @@ -18622,503 +18650,446 @@ public virtual ListVersionsResponse ListVersions(ListVersionsRequest request) #endregion - #region PutACL + #region PutBucket /// /// /// - /// This operation is not supported by directory buckets. + /// This action creates an Amazon S3 bucket. To create an Amazon S3 on Outposts bucket, + /// see + /// CreateBucket . /// /// /// - /// Sets the permissions on an existing bucket using access control lists (ACL). For more - /// information, see Using - /// ACLs. To set the ACL of a bucket, you must have the WRITE_ACP permission. + /// Creates a new S3 bucket. To create a bucket, you must set up Amazon S3 and have a + /// valid Amazon Web Services Access Key ID to authenticate requests. Anonymous requests + /// are never allowed to create buckets. By creating the bucket, you become the bucket + /// owner. /// /// /// - /// You can use one of the following two ways to set a bucket's permissions: + /// There are two types of buckets: general purpose buckets and directory buckets. For + /// more information about these bucket types, see Creating, + /// configuring, and working with Amazon S3 buckets in the Amazon S3 User Guide. /// - ///
    • + ///
      • /// - /// Specify the ACL in the request body + /// General purpose buckets - If you send your CreateBucket request to + /// the s3.amazonaws.com global endpoint, the request goes to the us-east-1 + /// Region. So the signature calculations in Signature Version 4 must use us-east-1 + /// as the Region, even if the location constraint in the request specifies another Region + /// where the bucket is to be created. If you create a bucket in a Region other than US + /// East (N. Virginia), your application must be able to handle 307 redirect. For more + /// information, see Virtual + /// hosting of buckets in the Amazon S3 User Guide. /// ///
      • /// - /// Specify permissions using request headers - /// - ///
      - /// - /// You cannot specify access permission using both the body and the request headers. - /// - /// - /// - /// Depending on your application needs, you may choose to set the ACL on a bucket using - /// either the request body or the headers. For example, if you have an existing application - /// that updates a bucket ACL using the request body, then you can continue to use that - /// approach. - /// - /// - /// - /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, ACLs - /// are disabled and no longer affect permissions. You must use policies to grant access - /// to your bucket and the objects in it. Requests to set ACLs or update ACLs fail and - /// return the AccessControlListNotSupported error code. Requests to read ACLs - /// are still supported. For more information, see Controlling - /// object ownership in the Amazon S3 User Guide. - /// - ///
      Permissions
      - /// - /// You can set access permissions by using one of the following methods: - /// - ///
      • - /// - /// Specify a canned ACL with the x-amz-acl request header. Amazon S3 supports - /// a set of predefined ACLs, known as canned ACLs. Each canned ACL has a predefined - /// set of grantees and permissions. Specify the canned ACL name as the value of x-amz-acl. - /// If you use this header, you cannot use other access control-specific headers in your - /// request. For more information, see Canned - /// ACL. - /// - ///
      • - /// - /// Specify access permissions explicitly with the x-amz-grant-read, x-amz-grant-read-acp, - /// x-amz-grant-write-acp, and x-amz-grant-full-control headers. When using - /// these headers, you specify explicit access permissions and grantees (Amazon Web Services - /// accounts or Amazon S3 groups) who will receive the permission. If you use these ACL-specific - /// headers, you cannot use the x-amz-acl header to set a canned ACL. These parameters - /// map to the set of permissions that Amazon S3 supports in an ACL. For more information, - /// see Access - /// Control List (ACL) Overview. - /// - /// - /// - /// You specify each grantee as a type=value pair, where the type is one of the following: - /// - ///
        • - /// - /// id – if the value specified is the canonical user ID of an Amazon Web Services - /// account - /// - ///
        • - /// - /// uri – if you are granting permissions to a predefined group - /// - ///
        • - /// - /// emailAddress – if the value specified is the email address of an Amazon Web - /// Services account - /// - /// - /// - /// Using email addresses to specify a grantee is only supported in the following Amazon - /// Web Services Regions: - /// - ///
          • - /// - /// US East (N. Virginia) - /// - ///
          • - /// - /// US West (N. California) - /// - ///
          • - /// - /// US West (Oregon) - /// - ///
          • - /// - /// Asia Pacific (Singapore) - /// - ///
          • - /// - /// Asia Pacific (Sydney) - /// - ///
          • - /// - /// Asia Pacific (Tokyo) - /// - ///
          • - /// - /// Europe (Ireland) - /// - ///
          • - /// - /// South America (São Paulo) - /// - ///
          - /// - /// For a list of all the Amazon S3 supported Regions and endpoints, see Regions - /// and Endpoints in the Amazon Web Services General Reference. - /// - ///
        - /// - /// For example, the following x-amz-grant-write header grants create, overwrite, - /// and delete objects permission to LogDelivery group predefined by Amazon S3 and two - /// Amazon Web Services accounts identified by their email addresses. - /// - /// - /// - /// x-amz-grant-write: uri="http://acs.amazonaws.com/groups/s3/LogDelivery", id="111122223333", - /// id="555566667777" - /// - ///
      - /// - /// You can use either a canned ACL or specify access permissions explicitly. You cannot - /// do both. - /// - ///
      Grantee Values
      - /// - /// You can specify the person (grantee) to whom you're assigning access rights (using - /// request elements) in the following ways: - /// - ///
      • - /// - /// By the person's ID: - /// - /// - /// - /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"><ID><>ID<></ID><DisplayName><>GranteesEmail<></DisplayName> - /// </Grantee> - /// - /// - /// - /// DisplayName is optional and ignored in the request - /// - ///
      • - /// - /// By URI: - /// - /// - /// - /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Group"><URI><>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<></URI></Grantee> - /// - /// - ///
      • - /// - /// By Email address: - /// - /// - /// - /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="AmazonCustomerByEmail"><EmailAddress><>Grantees@email.com<></EmailAddress>&</Grantee> - /// - /// - /// - /// - /// The grantee is resolved to the CanonicalUser and, in a response to a GET Object acl - /// request, appears as the CanonicalUser. - /// - /// - /// - /// Using email addresses to specify a grantee is only supported in the following Amazon - /// Web Services Regions: - /// - ///
        • - /// - /// US East (N. Virginia) - /// - ///
        • - /// - /// US West (N. California) - /// - ///
        • - /// - /// US West (Oregon) - /// - ///
        • - /// - /// Asia Pacific (Singapore) - /// - ///
        • - /// - /// Asia Pacific (Sydney) - /// - ///
        • - /// - /// Asia Pacific (Tokyo) - /// - ///
        • - /// - /// Europe (Ireland) - /// - ///
        • - /// - /// South America (São Paulo) - /// - ///
        - /// - /// For a list of all the Amazon S3 supported Regions and endpoints, see Regions - /// and Endpoints in the Amazon Web Services General Reference. + /// Directory buckets - For directory buckets, you must make requests for this + /// API operation to the Regional endpoint. These endpoints support path-style requests + /// in the format https://s3express-control.region_code.amazonaws.com/bucket-name + /// . Virtual-hosted-style requests aren't supported. For more information, see Regional + /// and Zonal endpoints in the Amazon S3 User Guide. /// - ///
      + ///
    Permissions
    • /// - /// The following operations are related to PutBucketAcl: + /// General purpose bucket permissions - In addition to the s3:CreateBucket + /// permission, the following permissions are required in a policy when your CreateBucket + /// request includes specific headers: /// ///
      • /// - /// CreateBucket - /// + /// Access control lists (ACLs) - In your CreateBucket request, if you + /// specify an access control list (ACL) and set it to public-read, public-read-write, + /// authenticated-read, or if you explicitly specify any other custom ACLs, both + /// s3:CreateBucket and s3:PutBucketAcl permissions are required. In your + /// CreateBucket request, if you set the ACL to private, or if you don't + /// specify any ACLs, only the s3:CreateBucket permission is required. /// ///
      • /// - /// DeleteBucket - /// + /// Object Lock - In your CreateBucket request, if you set x-amz-bucket-object-lock-enabled + /// to true, the s3:PutBucketObjectLockConfiguration and s3:PutBucketVersioning + /// permissions are required. /// ///
      • /// - /// GetObjectAcl - /// - /// - ///
      - ///
    - /// Container for the necessary parameters to execute the PutACL service method. - /// - /// The response from the PutACL service method, as returned by S3. - /// REST API Reference for PutACL Operation - public virtual PutACLResponse PutACL(PutACLRequest request) - { - var options = new InvokeOptions(); - options.RequestMarshaller = PutACLRequestMarshaller.Instance; - options.ResponseUnmarshaller = PutACLResponseUnmarshaller.Instance; - - return Invoke(request, options); - } - - - /// - /// - /// - /// This operation is not supported by directory buckets. + /// S3 Object Ownership - If your CreateBucket request includes the x-amz-object-ownership + /// header, then the s3:PutBucketOwnershipControls permission is required. /// - /// + /// /// - /// Sets the permissions on an existing bucket using access control lists (ACL). For more - /// information, see Using - /// ACLs. To set the ACL of a bucket, you must have the WRITE_ACP permission. + /// To set an ACL on a bucket as part of a CreateBucket request, you must explicitly + /// set S3 Object Ownership for the bucket to a different value than the default, BucketOwnerEnforced. + /// Additionally, if your desired bucket ACL grants public access, you must first create + /// the bucket (without the bucket ACL) and then explicitly disable Block Public Access + /// on the bucket before using PutBucketAcl to set the ACL. If you try to create + /// a bucket with a public ACL, the request will fail. /// /// /// - /// You can use one of the following two ways to set a bucket's permissions: - /// - /// + ///
  • /// - /// You cannot specify access permission using both the body and the request headers. + /// S3 Block Public Access - If your specific use case requires granting public + /// access to your S3 resources, you can disable Block Public Access. Specifically, you + /// can create a new bucket with Block Public Access enabled, then separately call the + /// + /// DeletePublicAccessBlock API. To use this operation, you must have the + /// s3:PutBucketPublicAccessBlock permission. For more information about S3 Block + /// Public Access, see Blocking + /// public access to your Amazon S3 storage in the Amazon S3 User Guide. /// - /// + ///
  • /// - /// Depending on your application needs, you may choose to set the ACL on a bucket using - /// either the request body or the headers. For example, if you have an existing application - /// that updates a bucket ACL using the request body, then you can continue to use that - /// approach. + /// Directory bucket permissions - You must have the s3express:CreateBucket + /// permission in an IAM identity-based policy instead of a bucket policy. Cross-account + /// access to this API operation isn't supported. This operation can only be performed + /// by the Amazon Web Services account that owns the resource. For more information about + /// directory bucket policies and permissions, see Amazon + /// Web Services Identity and Access Management (IAM) for S3 Express One Zone in the + /// Amazon S3 User Guide. /// /// /// - /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, ACLs - /// are disabled and no longer affect permissions. You must use policies to grant access - /// to your bucket and the objects in it. Requests to set ACLs or update ACLs fail and - /// return the AccessControlListNotSupported error code. Requests to read ACLs - /// are still supported. For more information, see Controlling - /// object ownership in the Amazon S3 User Guide. - /// - ///
    Permissions
    - /// - /// You can set access permissions by using one of the following methods: - /// - ///
    • - /// - /// Specify a canned ACL with the x-amz-acl request header. Amazon S3 supports - /// a set of predefined ACLs, known as canned ACLs. Each canned ACL has a predefined - /// set of grantees and permissions. Specify the canned ACL name as the value of x-amz-acl. - /// If you use this header, you cannot use other access control-specific headers in your - /// request. For more information, see Canned - /// ACL. + /// The permissions for ACLs, Object Lock, S3 Object Ownership, and S3 Block Public Access + /// are not supported for directory buckets. For directory buckets, all Block Public Access + /// settings are enabled at the bucket level and S3 Object Ownership is set to Bucket + /// owner enforced (ACLs disabled). These settings can't be modified. /// - ///
    • + /// /// - /// Specify access permissions explicitly with the x-amz-grant-read, x-amz-grant-read-acp, - /// x-amz-grant-write-acp, and x-amz-grant-full-control headers. When using - /// these headers, you specify explicit access permissions and grantees (Amazon Web Services - /// accounts or Amazon S3 groups) who will receive the permission. If you use these ACL-specific - /// headers, you cannot use the x-amz-acl header to set a canned ACL. These parameters - /// map to the set of permissions that Amazon S3 supports in an ACL. For more information, - /// see Access - /// Control List (ACL) Overview. + /// For more information about permissions for creating and working with directory buckets, + /// see Directory + /// buckets in the Amazon S3 User Guide. For more information about supported + /// S3 features for directory buckets, see Features + /// of S3 Express One Zone in the Amazon S3 User Guide. /// - /// + ///
    HTTP Host header syntax
    /// - /// You specify each grantee as a type=value pair, where the type is one of the following: + /// Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com. /// - ///
    • + ///
    /// - /// id – if the value specified is the canonical user ID of an Amazon Web Services - /// account + /// The following operations are related to CreateBucket: /// - ///
  • + ///
    • /// - /// uri – if you are granting permissions to a predefined group + /// PutObject + /// /// ///
    • /// - /// emailAddress – if the value specified is the email address of an Amazon Web - /// Services account + /// DeleteBucket + /// /// - /// + ///
    + ///
  • + /// The name of the bucket to create. General purpose buckets - For information about bucket naming restrictions, see Bucket naming rules in the Amazon S3 User Guide. Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region_code.amazonaws.com/bucket-name . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must also follow the format bucket_base_name--az_id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide + /// + /// The response from the PutBucket service method, as returned by S3. + /// REST API Reference for PutBucket Operation + public virtual PutBucketResponse PutBucket(string bucketName) + { + var request = new PutBucketRequest(); + request.BucketName = bucketName; + return PutBucket(request); + } + + + /// + /// /// - /// Using email addresses to specify a grantee is only supported in the following Amazon - /// Web Services Regions: + /// This action creates an Amazon S3 bucket. To create an Amazon S3 on Outposts bucket, + /// see + /// CreateBucket . /// - ///
    • + /// /// - /// US East (N. Virginia) + /// Creates a new S3 bucket. To create a bucket, you must set up Amazon S3 and have a + /// valid Amazon Web Services Access Key ID to authenticate requests. Anonymous requests + /// are never allowed to create buckets. By creating the bucket, you become the bucket + /// owner. /// - ///
    • + /// /// - /// US West (N. California) + /// There are two types of buckets: general purpose buckets and directory buckets. For + /// more information about these bucket types, see Creating, + /// configuring, and working with Amazon S3 buckets in the Amazon S3 User Guide. /// - ///
    • + ///
      • /// - /// US West (Oregon) + /// General purpose buckets - If you send your CreateBucket request to + /// the s3.amazonaws.com global endpoint, the request goes to the us-east-1 + /// Region. So the signature calculations in Signature Version 4 must use us-east-1 + /// as the Region, even if the location constraint in the request specifies another Region + /// where the bucket is to be created. If you create a bucket in a Region other than US + /// East (N. Virginia), your application must be able to handle 307 redirect. For more + /// information, see Virtual + /// hosting of buckets in the Amazon S3 User Guide. /// ///
      • /// - /// Asia Pacific (Singapore) + /// Directory buckets - For directory buckets, you must make requests for this + /// API operation to the Regional endpoint. These endpoints support path-style requests + /// in the format https://s3express-control.region_code.amazonaws.com/bucket-name + /// . Virtual-hosted-style requests aren't supported. For more information, see Regional + /// and Zonal endpoints in the Amazon S3 User Guide. /// - ///
      • + ///
      Permissions
      • /// - /// Asia Pacific (Sydney) + /// General purpose bucket permissions - In addition to the s3:CreateBucket + /// permission, the following permissions are required in a policy when your CreateBucket + /// request includes specific headers: /// - ///
      • + ///
        • /// - /// Asia Pacific (Tokyo) + /// Access control lists (ACLs) - In your CreateBucket request, if you + /// specify an access control list (ACL) and set it to public-read, public-read-write, + /// authenticated-read, or if you explicitly specify any other custom ACLs, both + /// s3:CreateBucket and s3:PutBucketAcl permissions are required. In your + /// CreateBucket request, if you set the ACL to private, or if you don't + /// specify any ACLs, only the s3:CreateBucket permission is required. /// ///
        • /// - /// Europe (Ireland) + /// Object Lock - In your CreateBucket request, if you set x-amz-bucket-object-lock-enabled + /// to true, the s3:PutBucketObjectLockConfiguration and s3:PutBucketVersioning + /// permissions are required. /// ///
        • /// - /// South America (São Paulo) - /// - ///
        - /// - /// For a list of all the Amazon S3 supported Regions and endpoints, see Regions - /// and Endpoints in the Amazon Web Services General Reference. + /// S3 Object Ownership - If your CreateBucket request includes the x-amz-object-ownership + /// header, then the s3:PutBucketOwnershipControls permission is required. /// - ///
      + /// /// - /// For example, the following x-amz-grant-write header grants create, overwrite, - /// and delete objects permission to LogDelivery group predefined by Amazon S3 and two - /// Amazon Web Services accounts identified by their email addresses. + /// To set an ACL on a bucket as part of a CreateBucket request, you must explicitly + /// set S3 Object Ownership for the bucket to a different value than the default, BucketOwnerEnforced. + /// Additionally, if your desired bucket ACL grants public access, you must first create + /// the bucket (without the bucket ACL) and then explicitly disable Block Public Access + /// on the bucket before using PutBucketAcl to set the ACL. If you try to create + /// a bucket with a public ACL, the request will fail. /// /// /// - /// x-amz-grant-write: uri="http://acs.amazonaws.com/groups/s3/LogDelivery", id="111122223333", - /// id="555566667777" + /// For the majority of modern use cases in S3, we recommend that you keep all Block + /// Public Access settings enabled and keep ACLs disabled. If you would like to share + /// data with users outside of your account, you can use bucket policies as needed. For + /// more information, see Controlling + /// ownership of objects and disabling ACLs for your bucket and Blocking + /// public access to your Amazon S3 storage in the Amazon S3 User Guide. /// - ///
    + ///
  • /// - /// You can use either a canned ACL or specify access permissions explicitly. You cannot - /// do both. + /// S3 Block Public Access - If your specific use case requires granting public + /// access to your S3 resources, you can disable Block Public Access. Specifically, you + /// can create a new bucket with Block Public Access enabled, then separately call the + /// + /// DeletePublicAccessBlock API. To use this operation, you must have the + /// s3:PutBucketPublicAccessBlock permission. For more information about S3 Block + /// Public Access, see Blocking + /// public access to your Amazon S3 storage in the Amazon S3 User Guide. /// - ///
    Grantee Values
    + ///
  • /// - /// You can specify the person (grantee) to whom you're assigning access rights (using - /// request elements) in the following ways: + /// Directory bucket permissions - You must have the s3express:CreateBucket + /// permission in an IAM identity-based policy instead of a bucket policy. Cross-account + /// access to this API operation isn't supported. This operation can only be performed + /// by the Amazon Web Services account that owns the resource. For more information about + /// directory bucket policies and permissions, see Amazon + /// Web Services Identity and Access Management (IAM) for S3 Express One Zone in the + /// Amazon S3 User Guide. /// - ///
    • + /// /// - /// By the person's ID: + /// The permissions for ACLs, Object Lock, S3 Object Ownership, and S3 Block Public Access + /// are not supported for directory buckets. For directory buckets, all Block Public Access + /// settings are enabled at the bucket level and S3 Object Ownership is set to Bucket + /// owner enforced (ACLs disabled). These settings can't be modified. /// /// /// - /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"><ID><>ID<></ID><DisplayName><>GranteesEmail<></DisplayName> - /// </Grantee> + /// For more information about permissions for creating and working with directory buckets, + /// see Directory + /// buckets in the Amazon S3 User Guide. For more information about supported + /// S3 features for directory buckets, see Features + /// of S3 Express One Zone in the Amazon S3 User Guide. /// - /// + ///
    HTTP Host header syntax
    /// - /// DisplayName is optional and ignored in the request + /// Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com. /// - ///
  • + /// /// - /// By URI: + /// The following operations are related to CreateBucket: /// - /// + ///
    • /// - /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Group"><URI><>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<></URI></Grantee> + /// PutObject /// /// ///
    • /// - /// By Email address: + /// DeleteBucket + /// /// - /// - /// - /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="AmazonCustomerByEmail"><EmailAddress><>Grantees@email.com<></EmailAddress>&</Grantee> + ///
    + ///
  • + /// Container for the necessary parameters to execute the PutBucket service method. /// + /// The response from the PutBucket service method, as returned by S3. + /// REST API Reference for PutBucket Operation + public virtual PutBucketResponse PutBucket(PutBucketRequest request) + { + var options = new InvokeOptions(); + options.RequestMarshaller = PutBucketRequestMarshaller.Instance; + options.ResponseUnmarshaller = PutBucketResponseUnmarshaller.Instance; + + return Invoke(request, options); + } + + + /// + /// + /// + /// This action creates an Amazon S3 bucket. To create an Amazon S3 on Outposts bucket, + /// see + /// CreateBucket . + /// + /// + /// + /// Creates a new S3 bucket. To create a bucket, you must set up Amazon S3 and have a + /// valid Amazon Web Services Access Key ID to authenticate requests. Anonymous requests + /// are never allowed to create buckets. By creating the bucket, you become the bucket + /// owner. /// /// /// - /// The grantee is resolved to the CanonicalUser and, in a response to a GET Object acl - /// request, appears as the CanonicalUser. + /// There are two types of buckets: general purpose buckets and directory buckets. For + /// more information about these bucket types, see Creating, + /// configuring, and working with Amazon S3 buckets in the Amazon S3 User Guide. /// - /// + ///
    • /// - /// Using email addresses to specify a grantee is only supported in the following Amazon - /// Web Services Regions: + /// General purpose buckets - If you send your CreateBucket request to + /// the s3.amazonaws.com global endpoint, the request goes to the us-east-1 + /// Region. So the signature calculations in Signature Version 4 must use us-east-1 + /// as the Region, even if the location constraint in the request specifies another Region + /// where the bucket is to be created. If you create a bucket in a Region other than US + /// East (N. Virginia), your application must be able to handle 307 redirect. For more + /// information, see Virtual + /// hosting of buckets in the Amazon S3 User Guide. + /// + ///
    • + /// + /// Directory buckets - For directory buckets, you must make requests for this + /// API operation to the Regional endpoint. These endpoints support path-style requests + /// in the format https://s3express-control.region_code.amazonaws.com/bucket-name + /// . Virtual-hosted-style requests aren't supported. For more information, see Regional + /// and Zonal endpoints in the Amazon S3 User Guide. + /// + ///
    Permissions
    • + /// + /// General purpose bucket permissions - In addition to the s3:CreateBucket + /// permission, the following permissions are required in a policy when your CreateBucket + /// request includes specific headers: /// ///
      • /// - /// US East (N. Virginia) + /// Access control lists (ACLs) - In your CreateBucket request, if you + /// specify an access control list (ACL) and set it to public-read, public-read-write, + /// authenticated-read, or if you explicitly specify any other custom ACLs, both + /// s3:CreateBucket and s3:PutBucketAcl permissions are required. In your + /// CreateBucket request, if you set the ACL to private, or if you don't + /// specify any ACLs, only the s3:CreateBucket permission is required. /// ///
      • /// - /// US West (N. California) + /// Object Lock - In your CreateBucket request, if you set x-amz-bucket-object-lock-enabled + /// to true, the s3:PutBucketObjectLockConfiguration and s3:PutBucketVersioning + /// permissions are required. /// ///
      • /// - /// US West (Oregon) + /// S3 Object Ownership - If your CreateBucket request includes the x-amz-object-ownership + /// header, then the s3:PutBucketOwnershipControls permission is required. /// - ///
      • + /// + /// + /// To set an ACL on a bucket as part of a CreateBucket request, you must explicitly + /// set S3 Object Ownership for the bucket to a different value than the default, BucketOwnerEnforced. + /// Additionally, if your desired bucket ACL grants public access, you must first create + /// the bucket (without the bucket ACL) and then explicitly disable Block Public Access + /// on the bucket before using PutBucketAcl to set the ACL. If you try to create + /// a bucket with a public ACL, the request will fail. + /// + /// /// - /// Asia Pacific (Singapore) + /// For the majority of modern use cases in S3, we recommend that you keep all Block + /// Public Access settings enabled and keep ACLs disabled. If you would like to share + /// data with users outside of your account, you can use bucket policies as needed. For + /// more information, see Controlling + /// ownership of objects and disabling ACLs for your bucket and Blocking + /// public access to your Amazon S3 storage in the Amazon S3 User Guide. /// - ///
      • + ///
      • /// - /// Asia Pacific (Sydney) + /// S3 Block Public Access - If your specific use case requires granting public + /// access to your S3 resources, you can disable Block Public Access. Specifically, you + /// can create a new bucket with Block Public Access enabled, then separately call the + /// + /// DeletePublicAccessBlock API. To use this operation, you must have the + /// s3:PutBucketPublicAccessBlock permission. For more information about S3 Block + /// Public Access, see Blocking + /// public access to your Amazon S3 storage in the Amazon S3 User Guide. /// - ///
      • + ///
    • /// - /// Asia Pacific (Tokyo) + /// Directory bucket permissions - You must have the s3express:CreateBucket + /// permission in an IAM identity-based policy instead of a bucket policy. Cross-account + /// access to this API operation isn't supported. This operation can only be performed + /// by the Amazon Web Services account that owns the resource. For more information about + /// directory bucket policies and permissions, see Amazon + /// Web Services Identity and Access Management (IAM) for S3 Express One Zone in the + /// Amazon S3 User Guide. /// - ///
    • + /// /// - /// Europe (Ireland) + /// The permissions for ACLs, Object Lock, S3 Object Ownership, and S3 Block Public Access + /// are not supported for directory buckets. For directory buckets, all Block Public Access + /// settings are enabled at the bucket level and S3 Object Ownership is set to Bucket + /// owner enforced (ACLs disabled). These settings can't be modified. /// - ///
    • + /// /// - /// South America (São Paulo) + /// For more information about permissions for creating and working with directory buckets, + /// see Directory + /// buckets in the Amazon S3 User Guide. For more information about supported + /// S3 features for directory buckets, see Features + /// of S3 Express One Zone in the Amazon S3 User Guide. /// - ///
    + ///
    HTTP Host header syntax
    /// - /// For a list of all the Amazon S3 supported Regions and endpoints, see Regions - /// and Endpoints in the Amazon Web Services General Reference. + /// Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com. /// - ///
    + /// /// - /// The following operations are related to PutBucketAcl: + /// The following operations are related to CreateBucket: /// /// ///
    - /// Container for the necessary parameters to execute the PutACL service method. + /// The name of the bucket to create. General purpose buckets - For information about bucket naming restrictions, see Bucket naming rules in the Amazon S3 User Guide. Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region_code.amazonaws.com/bucket-name . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must also follow the format bucket_base_name--az_id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// - /// The response from the PutACL service method, as returned by S3. - /// REST API Reference for PutACL Operation - public virtual Task PutACLAsync(PutACLRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) + /// The response from the PutBucket service method, as returned by S3. + /// REST API Reference for PutBucket Operation + public virtual Task PutBucketAsync(string bucketName, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { - var options = new InvokeOptions(); - options.RequestMarshaller = PutACLRequestMarshaller.Instance; - options.ResponseUnmarshaller = PutACLResponseUnmarshaller.Instance; - - return InvokeAsync(request, options, cancellationToken); + var request = new PutBucketRequest(); + request.BucketName = bucketName; + return PutBucketAsync(request, cancellationToken); } - #endregion - - #region PutBucket - /// /// @@ -19238,359 +19198,487 @@ public virtual PutACLResponse PutACL(PutACLRequest request) /// ownership of objects and disabling ACLs for your bucket and Blocking /// public access to your Amazon S3 storage in the Amazon S3 User Guide. /// - ///
  • + ///
  • + /// + /// S3 Block Public Access - If your specific use case requires granting public + /// access to your S3 resources, you can disable Block Public Access. Specifically, you + /// can create a new bucket with Block Public Access enabled, then separately call the + /// + /// DeletePublicAccessBlock API. To use this operation, you must have the + /// s3:PutBucketPublicAccessBlock permission. For more information about S3 Block + /// Public Access, see Blocking + /// public access to your Amazon S3 storage in the Amazon S3 User Guide. + /// + ///
  • + /// + /// Directory bucket permissions - You must have the s3express:CreateBucket + /// permission in an IAM identity-based policy instead of a bucket policy. Cross-account + /// access to this API operation isn't supported. This operation can only be performed + /// by the Amazon Web Services account that owns the resource. For more information about + /// directory bucket policies and permissions, see Amazon + /// Web Services Identity and Access Management (IAM) for S3 Express One Zone in the + /// Amazon S3 User Guide. + /// + /// + /// + /// The permissions for ACLs, Object Lock, S3 Object Ownership, and S3 Block Public Access + /// are not supported for directory buckets. For directory buckets, all Block Public Access + /// settings are enabled at the bucket level and S3 Object Ownership is set to Bucket + /// owner enforced (ACLs disabled). These settings can't be modified. + /// + /// + /// + /// For more information about permissions for creating and working with directory buckets, + /// see Directory + /// buckets in the Amazon S3 User Guide. For more information about supported + /// S3 features for directory buckets, see Features + /// of S3 Express One Zone in the Amazon S3 User Guide. + /// + ///
  • HTTP Host header syntax
    + /// + /// Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com. + /// + ///
    + /// + /// The following operations are related to CreateBucket: + /// + /// + ///
    + /// Container for the necessary parameters to execute the PutBucket service method. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// + /// The response from the PutBucket service method, as returned by S3. + /// REST API Reference for PutBucket Operation + public virtual Task PutBucketAsync(PutBucketRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) + { + var options = new InvokeOptions(); + options.RequestMarshaller = PutBucketRequestMarshaller.Instance; + options.ResponseUnmarshaller = PutBucketResponseUnmarshaller.Instance; + + return InvokeAsync(request, options, cancellationToken); + } + + #endregion + + #region PutBucketAccelerateConfiguration + + + /// + /// + /// + /// This operation is not supported by directory buckets. + /// + /// + /// + /// Sets the accelerate configuration of an existing bucket. Amazon S3 Transfer Acceleration + /// is a bucket-level feature that enables you to perform faster data transfers to Amazon + /// S3. + /// + /// + /// + /// To use this operation, you must have permission to perform the s3:PutAccelerateConfiguration + /// action. The bucket owner has this permission by default. The bucket owner can grant + /// this permission to others. For more information about permissions, see Permissions + /// Related to Bucket Subresource Operations and Managing + /// Access Permissions to Your Amazon S3 Resources. + /// + /// + /// + /// The Transfer Acceleration state of a bucket can be set to one of the following two + /// values: + /// + ///
    • + /// + /// Enabled – Enables accelerated data transfers to the bucket. + /// + ///
    • + /// + /// Suspended – Disables accelerated data transfers to the bucket. + /// + ///
    + /// + /// The GetBucketAccelerateConfiguration + /// action returns the transfer acceleration state of a bucket. + /// + /// + /// + /// After setting the Transfer Acceleration state of a bucket to Enabled, it might take + /// up to thirty minutes before the data transfer rates to the bucket increase. + /// + /// + /// + /// The name of the bucket used for Transfer Acceleration must be DNS-compliant and must + /// not contain periods ("."). + /// + /// + /// + /// For more information about transfer acceleration, see Transfer + /// Acceleration. + /// + /// + /// + /// The following operations are related to PutBucketAccelerateConfiguration: + /// + /// + ///
    + /// Container for the necessary parameters to execute the PutBucketAccelerateConfiguration service method. + /// + /// The response from the PutBucketAccelerateConfiguration service method, as returned by S3. + /// REST API Reference for PutBucketAccelerateConfiguration Operation + public virtual PutBucketAccelerateConfigurationResponse PutBucketAccelerateConfiguration(PutBucketAccelerateConfigurationRequest request) + { + var options = new InvokeOptions(); + options.RequestMarshaller = PutBucketAccelerateConfigurationRequestMarshaller.Instance; + options.ResponseUnmarshaller = PutBucketAccelerateConfigurationResponseUnmarshaller.Instance; + + return Invoke(request, options); + } + + + /// + /// + /// + /// This operation is not supported by directory buckets. + /// + /// + /// + /// Sets the accelerate configuration of an existing bucket. Amazon S3 Transfer Acceleration + /// is a bucket-level feature that enables you to perform faster data transfers to Amazon + /// S3. + /// + /// + /// + /// To use this operation, you must have permission to perform the s3:PutAccelerateConfiguration + /// action. The bucket owner has this permission by default. The bucket owner can grant + /// this permission to others. For more information about permissions, see Permissions + /// Related to Bucket Subresource Operations and Managing + /// Access Permissions to Your Amazon S3 Resources. + /// + /// + /// + /// The Transfer Acceleration state of a bucket can be set to one of the following two + /// values: + /// + ///
    • /// - /// S3 Block Public Access - If your specific use case requires granting public - /// access to your S3 resources, you can disable Block Public Access. Specifically, you - /// can create a new bucket with Block Public Access enabled, then separately call the - /// - /// DeletePublicAccessBlock API. To use this operation, you must have the - /// s3:PutBucketPublicAccessBlock permission. For more information about S3 Block - /// Public Access, see Blocking - /// public access to your Amazon S3 storage in the Amazon S3 User Guide. + /// Enabled – Enables accelerated data transfers to the bucket. /// - ///
  • + ///
  • /// - /// Directory bucket permissions - You must have the s3express:CreateBucket - /// permission in an IAM identity-based policy instead of a bucket policy. Cross-account - /// access to this API operation isn't supported. This operation can only be performed - /// by the Amazon Web Services account that owns the resource. For more information about - /// directory bucket policies and permissions, see Amazon - /// Web Services Identity and Access Management (IAM) for S3 Express One Zone in the - /// Amazon S3 User Guide. + /// Suspended – Disables accelerated data transfers to the bucket. /// - /// + ///
  • /// - /// The permissions for ACLs, Object Lock, S3 Object Ownership, and S3 Block Public Access - /// are not supported for directory buckets. For directory buckets, all Block Public Access - /// settings are enabled at the bucket level and S3 Object Ownership is set to Bucket - /// owner enforced (ACLs disabled). These settings can't be modified. + /// The GetBucketAccelerateConfiguration + /// action returns the transfer acceleration state of a bucket. /// /// /// - /// For more information about permissions for creating and working with directory buckets, - /// see Directory - /// buckets in the Amazon S3 User Guide. For more information about supported - /// S3 features for directory buckets, see Features - /// of S3 Express One Zone in the Amazon S3 User Guide. + /// After setting the Transfer Acceleration state of a bucket to Enabled, it might take + /// up to thirty minutes before the data transfer rates to the bucket increase. /// - ///
    HTTP Host header syntax
    + /// /// - /// Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com. + /// The name of the bucket used for Transfer Acceleration must be DNS-compliant and must + /// not contain periods ("."). /// - ///
    + /// /// - /// The following operations are related to CreateBucket: + /// For more information about transfer acceleration, see Transfer + /// Acceleration. + /// + /// + /// + /// The following operations are related to PutBucketAccelerateConfiguration: /// /// ///
    - /// The name of the bucket to create. General purpose buckets - For information about bucket naming restrictions, see Bucket naming rules in the Amazon S3 User Guide. Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region_code.amazonaws.com/bucket-name . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must also follow the format bucket_base_name--az_id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide + /// Container for the necessary parameters to execute the PutBucketAccelerateConfiguration service method. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// /// - /// The response from the PutBucket service method, as returned by S3. - /// REST API Reference for PutBucket Operation - public virtual PutBucketResponse PutBucket(string bucketName) + /// The response from the PutBucketAccelerateConfiguration service method, as returned by S3. + /// REST API Reference for PutBucketAccelerateConfiguration Operation + public virtual Task PutBucketAccelerateConfigurationAsync(PutBucketAccelerateConfigurationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { - var request = new PutBucketRequest(); - request.BucketName = bucketName; - return PutBucket(request); + var options = new InvokeOptions(); + options.RequestMarshaller = PutBucketAccelerateConfigurationRequestMarshaller.Instance; + options.ResponseUnmarshaller = PutBucketAccelerateConfigurationResponseUnmarshaller.Instance; + + return InvokeAsync(request, options, cancellationToken); } + #endregion + + #region PutBucketAcl + /// /// /// - /// This action creates an Amazon S3 bucket. To create an Amazon S3 on Outposts bucket, - /// see - /// CreateBucket . + /// This operation is not supported by directory buckets. /// /// /// - /// Creates a new S3 bucket. To create a bucket, you must set up Amazon S3 and have a - /// valid Amazon Web Services Access Key ID to authenticate requests. Anonymous requests - /// are never allowed to create buckets. By creating the bucket, you become the bucket - /// owner. + /// Sets the permissions on an existing bucket using access control lists (ACL). For more + /// information, see Using + /// ACLs. To set the ACL of a bucket, you must have the WRITE_ACP permission. /// /// /// - /// There are two types of buckets: general purpose buckets and directory buckets. For - /// more information about these bucket types, see Creating, - /// configuring, and working with Amazon S3 buckets in the Amazon S3 User Guide. + /// You can use one of the following two ways to set a bucket's permissions: /// - ///
    • + ///
      • /// - /// General purpose buckets - If you send your CreateBucket request to - /// the s3.amazonaws.com global endpoint, the request goes to the us-east-1 - /// Region. So the signature calculations in Signature Version 4 must use us-east-1 - /// as the Region, even if the location constraint in the request specifies another Region - /// where the bucket is to be created. If you create a bucket in a Region other than US - /// East (N. Virginia), your application must be able to handle 307 redirect. For more - /// information, see Virtual - /// hosting of buckets in the Amazon S3 User Guide. + /// Specify the ACL in the request body /// ///
      • /// - /// Directory buckets - For directory buckets, you must make requests for this - /// API operation to the Regional endpoint. These endpoints support path-style requests - /// in the format https://s3express-control.region_code.amazonaws.com/bucket-name - /// . Virtual-hosted-style requests aren't supported. For more information, see Regional - /// and Zonal endpoints in the Amazon S3 User Guide. + /// Specify permissions using request headers /// - ///
      Permissions
      • + ///
      /// - /// General purpose bucket permissions - In addition to the s3:CreateBucket - /// permission, the following permissions are required in a policy when your CreateBucket - /// request includes specific headers: + /// You cannot specify access permission using both the body and the request headers. + /// + /// + /// + /// Depending on your application needs, you may choose to set the ACL on a bucket using + /// either the request body or the headers. For example, if you have an existing application + /// that updates a bucket ACL using the request body, then you can continue to use that + /// approach. + /// + /// + /// + /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, ACLs + /// are disabled and no longer affect permissions. You must use policies to grant access + /// to your bucket and the objects in it. Requests to set ACLs or update ACLs fail and + /// return the AccessControlListNotSupported error code. Requests to read ACLs + /// are still supported. For more information, see Controlling + /// object ownership in the Amazon S3 User Guide. + /// + ///
      Permissions
      + /// + /// You can set access permissions by using one of the following methods: /// ///
      • /// - /// Access control lists (ACLs) - In your CreateBucket request, if you - /// specify an access control list (ACL) and set it to public-read, public-read-write, - /// authenticated-read, or if you explicitly specify any other custom ACLs, both - /// s3:CreateBucket and s3:PutBucketAcl permissions are required. In your - /// CreateBucket request, if you set the ACL to private, or if you don't - /// specify any ACLs, only the s3:CreateBucket permission is required. + /// Specify a canned ACL with the x-amz-acl request header. Amazon S3 supports + /// a set of predefined ACLs, known as canned ACLs. Each canned ACL has a predefined + /// set of grantees and permissions. Specify the canned ACL name as the value of x-amz-acl. + /// If you use this header, you cannot use other access control-specific headers in your + /// request. For more information, see Canned + /// ACL. /// ///
      • /// - /// Object Lock - In your CreateBucket request, if you set x-amz-bucket-object-lock-enabled - /// to true, the s3:PutBucketObjectLockConfiguration and s3:PutBucketVersioning - /// permissions are required. + /// Specify access permissions explicitly with the x-amz-grant-read, x-amz-grant-read-acp, + /// x-amz-grant-write-acp, and x-amz-grant-full-control headers. When using + /// these headers, you specify explicit access permissions and grantees (Amazon Web Services + /// accounts or Amazon S3 groups) who will receive the permission. If you use these ACL-specific + /// headers, you cannot use the x-amz-acl header to set a canned ACL. These parameters + /// map to the set of permissions that Amazon S3 supports in an ACL. For more information, + /// see Access + /// Control List (ACL) Overview. + /// + /// + /// + /// You specify each grantee as a type=value pair, where the type is one of the following: + /// + ///
        • + /// + /// id – if the value specified is the canonical user ID of an Amazon Web Services + /// account /// ///
        • /// - /// S3 Object Ownership - If your CreateBucket request includes the x-amz-object-ownership - /// header, then the s3:PutBucketOwnershipControls permission is required. + /// uri – if you are granting permissions to a predefined group /// - /// + ///
        • /// - /// To set an ACL on a bucket as part of a CreateBucket request, you must explicitly - /// set S3 Object Ownership for the bucket to a different value than the default, BucketOwnerEnforced. - /// Additionally, if your desired bucket ACL grants public access, you must first create - /// the bucket (without the bucket ACL) and then explicitly disable Block Public Access - /// on the bucket before using PutBucketAcl to set the ACL. If you try to create - /// a bucket with a public ACL, the request will fail. + /// emailAddress – if the value specified is the email address of an Amazon Web + /// Services account /// - /// + /// /// - /// For the majority of modern use cases in S3, we recommend that you keep all Block - /// Public Access settings enabled and keep ACLs disabled. If you would like to share - /// data with users outside of your account, you can use bucket policies as needed. For - /// more information, see Controlling - /// ownership of objects and disabling ACLs for your bucket and Blocking - /// public access to your Amazon S3 storage in the Amazon S3 User Guide. + /// Using email addresses to specify a grantee is only supported in the following Amazon + /// Web Services Regions: /// - ///
        • + ///
          • /// - /// S3 Block Public Access - If your specific use case requires granting public - /// access to your S3 resources, you can disable Block Public Access. Specifically, you - /// can create a new bucket with Block Public Access enabled, then separately call the - /// - /// DeletePublicAccessBlock API. To use this operation, you must have the - /// s3:PutBucketPublicAccessBlock permission. For more information about S3 Block - /// Public Access, see Blocking - /// public access to your Amazon S3 storage in the Amazon S3 User Guide. + /// US East (N. Virginia) /// - ///
        • + ///
        • /// - /// Directory bucket permissions - You must have the s3express:CreateBucket - /// permission in an IAM identity-based policy instead of a bucket policy. Cross-account - /// access to this API operation isn't supported. This operation can only be performed - /// by the Amazon Web Services account that owns the resource. For more information about - /// directory bucket policies and permissions, see Amazon - /// Web Services Identity and Access Management (IAM) for S3 Express One Zone in the - /// Amazon S3 User Guide. + /// US West (N. California) /// - /// + ///
        • /// - /// The permissions for ACLs, Object Lock, S3 Object Ownership, and S3 Block Public Access - /// are not supported for directory buckets. For directory buckets, all Block Public Access - /// settings are enabled at the bucket level and S3 Object Ownership is set to Bucket - /// owner enforced (ACLs disabled). These settings can't be modified. + /// US West (Oregon) + /// + ///
        • + /// + /// Asia Pacific (Singapore) + /// + ///
        • + /// + /// Asia Pacific (Sydney) + /// + ///
        • + /// + /// Asia Pacific (Tokyo) + /// + ///
        • + /// + /// Europe (Ireland) + /// + ///
        • + /// + /// South America (São Paulo) + /// + ///
        + /// + /// For a list of all the Amazon S3 supported Regions and endpoints, see Regions + /// and Endpoints in the Amazon Web Services General Reference. + /// + ///
      + /// + /// For example, the following x-amz-grant-write header grants create, overwrite, + /// and delete objects permission to LogDelivery group predefined by Amazon S3 and two + /// Amazon Web Services accounts identified by their email addresses. /// /// /// - /// For more information about permissions for creating and working with directory buckets, - /// see Directory - /// buckets in the Amazon S3 User Guide. For more information about supported - /// S3 features for directory buckets, see Features - /// of S3 Express One Zone in the Amazon S3 User Guide. + /// x-amz-grant-write: uri="http://acs.amazonaws.com/groups/s3/LogDelivery", id="111122223333", + /// id="555566667777" /// - ///
    HTTP Host header syntax
    + /// /// - /// Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com. + /// You can use either a canned ACL or specify access permissions explicitly. You cannot + /// do both. /// - ///
    + ///
    Grantee Values
    /// - /// The following operations are related to CreateBucket: + /// You can specify the person (grantee) to whom you're assigning access rights (using + /// request elements) in the following ways: /// ///
    • /// - /// PutObject - /// + /// By the person's ID: /// - ///
    • + /// /// - /// DeleteBucket - /// + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"><ID><>ID<></ID><DisplayName><>GranteesEmail<></DisplayName> + /// </Grantee> /// - ///
    - ///
    - /// Container for the necessary parameters to execute the PutBucket service method. - /// - /// The response from the PutBucket service method, as returned by S3. - /// REST API Reference for PutBucket Operation - public virtual PutBucketResponse PutBucket(PutBucketRequest request) - { - var options = new InvokeOptions(); - options.RequestMarshaller = PutBucketRequestMarshaller.Instance; - options.ResponseUnmarshaller = PutBucketResponseUnmarshaller.Instance; - - return Invoke(request, options); - } - - - /// - /// + /// /// - /// This action creates an Amazon S3 bucket. To create an Amazon S3 on Outposts bucket, - /// see - /// CreateBucket . + /// DisplayName is optional and ignored in the request /// - /// + ///
  • /// - /// Creates a new S3 bucket. To create a bucket, you must set up Amazon S3 and have a - /// valid Amazon Web Services Access Key ID to authenticate requests. Anonymous requests - /// are never allowed to create buckets. By creating the bucket, you become the bucket - /// owner. + /// By URI: /// /// /// - /// There are two types of buckets: general purpose buckets and directory buckets. For - /// more information about these bucket types, see Creating, - /// configuring, and working with Amazon S3 buckets in the Amazon S3 User Guide. + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Group"><URI><>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<></URI></Grantee> + /// /// - ///
    • + ///
    • /// - /// General purpose buckets - If you send your CreateBucket request to - /// the s3.amazonaws.com global endpoint, the request goes to the us-east-1 - /// Region. So the signature calculations in Signature Version 4 must use us-east-1 - /// as the Region, even if the location constraint in the request specifies another Region - /// where the bucket is to be created. If you create a bucket in a Region other than US - /// East (N. Virginia), your application must be able to handle 307 redirect. For more - /// information, see Virtual - /// hosting of buckets in the Amazon S3 User Guide. + /// By Email address: /// - ///
    • + /// /// - /// Directory buckets - For directory buckets, you must make requests for this - /// API operation to the Regional endpoint. These endpoints support path-style requests - /// in the format https://s3express-control.region_code.amazonaws.com/bucket-name - /// . Virtual-hosted-style requests aren't supported. For more information, see Regional - /// and Zonal endpoints in the Amazon S3 User Guide. + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="AmazonCustomerByEmail"><EmailAddress><>Grantees@email.com<></EmailAddress>&</Grantee> + /// /// - ///
    Permissions
    • + /// /// - /// General purpose bucket permissions - In addition to the s3:CreateBucket - /// permission, the following permissions are required in a policy when your CreateBucket - /// request includes specific headers: + /// The grantee is resolved to the CanonicalUser and, in a response to a GET Object acl + /// request, appears as the CanonicalUser. /// - ///
      • + /// /// - /// Access control lists (ACLs) - In your CreateBucket request, if you - /// specify an access control list (ACL) and set it to public-read, public-read-write, - /// authenticated-read, or if you explicitly specify any other custom ACLs, both - /// s3:CreateBucket and s3:PutBucketAcl permissions are required. In your - /// CreateBucket request, if you set the ACL to private, or if you don't - /// specify any ACLs, only the s3:CreateBucket permission is required. + /// Using email addresses to specify a grantee is only supported in the following Amazon + /// Web Services Regions: /// - ///
      • + ///
        • /// - /// Object Lock - In your CreateBucket request, if you set x-amz-bucket-object-lock-enabled - /// to true, the s3:PutBucketObjectLockConfiguration and s3:PutBucketVersioning - /// permissions are required. + /// US East (N. Virginia) /// ///
        • /// - /// S3 Object Ownership - If your CreateBucket request includes the x-amz-object-ownership - /// header, then the s3:PutBucketOwnershipControls permission is required. + /// US West (N. California) /// - /// + ///
        • /// - /// To set an ACL on a bucket as part of a CreateBucket request, you must explicitly - /// set S3 Object Ownership for the bucket to a different value than the default, BucketOwnerEnforced. - /// Additionally, if your desired bucket ACL grants public access, you must first create - /// the bucket (without the bucket ACL) and then explicitly disable Block Public Access - /// on the bucket before using PutBucketAcl to set the ACL. If you try to create - /// a bucket with a public ACL, the request will fail. + /// US West (Oregon) /// - /// + ///
        • /// - /// For the majority of modern use cases in S3, we recommend that you keep all Block - /// Public Access settings enabled and keep ACLs disabled. If you would like to share - /// data with users outside of your account, you can use bucket policies as needed. For - /// more information, see Controlling - /// ownership of objects and disabling ACLs for your bucket and Blocking - /// public access to your Amazon S3 storage in the Amazon S3 User Guide. + /// Asia Pacific (Singapore) /// - ///
        • + ///
        • /// - /// S3 Block Public Access - If your specific use case requires granting public - /// access to your S3 resources, you can disable Block Public Access. Specifically, you - /// can create a new bucket with Block Public Access enabled, then separately call the - /// - /// DeletePublicAccessBlock API. To use this operation, you must have the - /// s3:PutBucketPublicAccessBlock permission. For more information about S3 Block - /// Public Access, see Blocking - /// public access to your Amazon S3 storage in the Amazon S3 User Guide. + /// Asia Pacific (Sydney) /// - ///
      • + ///
      • /// - /// Directory bucket permissions - You must have the s3express:CreateBucket - /// permission in an IAM identity-based policy instead of a bucket policy. Cross-account - /// access to this API operation isn't supported. This operation can only be performed - /// by the Amazon Web Services account that owns the resource. For more information about - /// directory bucket policies and permissions, see Amazon - /// Web Services Identity and Access Management (IAM) for S3 Express One Zone in the - /// Amazon S3 User Guide. + /// Asia Pacific (Tokyo) /// - /// + ///
      • /// - /// The permissions for ACLs, Object Lock, S3 Object Ownership, and S3 Block Public Access - /// are not supported for directory buckets. For directory buckets, all Block Public Access - /// settings are enabled at the bucket level and S3 Object Ownership is set to Bucket - /// owner enforced (ACLs disabled). These settings can't be modified. + /// Europe (Ireland) /// - /// + ///
      • /// - /// For more information about permissions for creating and working with directory buckets, - /// see Directory - /// buckets in the Amazon S3 User Guide. For more information about supported - /// S3 features for directory buckets, see Features - /// of S3 Express One Zone in the Amazon S3 User Guide. + /// South America (São Paulo) /// - ///
    HTTP Host header syntax
    + ///
  • /// - /// Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com. + /// For a list of all the Amazon S3 supported Regions and endpoints, see Regions + /// and Endpoints in the Amazon Web Services General Reference. /// - /// + /// /// - /// The following operations are related to CreateBucket: + /// The following operations are related to PutBucketAcl: /// /// ///
    - /// The name of the bucket to create. General purpose buckets - For information about bucket naming restrictions, see Bucket naming rules in the Amazon S3 User Guide. Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region_code.amazonaws.com/bucket-name . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must also follow the format bucket_base_name--az_id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide - /// - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// + /// Container for the necessary parameters to execute the PutBucketAcl service method. /// - /// The response from the PutBucket service method, as returned by S3. - /// REST API Reference for PutBucket Operation - public virtual Task PutBucketAsync(string bucketName, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) + /// The response from the PutBucketAcl service method, as returned by S3. + /// REST API Reference for PutBucketAcl Operation + public virtual PutBucketAclResponse PutBucketAcl(PutBucketAclRequest request) { - var request = new PutBucketRequest(); - request.BucketName = bucketName; - return PutBucketAsync(request, cancellationToken); + var options = new InvokeOptions(); + options.RequestMarshaller = PutBucketAclRequestMarshaller.Instance; + options.ResponseUnmarshaller = PutBucketAclResponseUnmarshaller.Instance; + + return Invoke(request, options); } /// /// /// - /// This action creates an Amazon S3 bucket. To create an Amazon S3 on Outposts bucket, - /// see - /// CreateBucket . + /// This operation is not supported by directory buckets. /// /// /// - /// Creates a new S3 bucket. To create a bucket, you must set up Amazon S3 and have a - /// valid Amazon Web Services Access Key ID to authenticate requests. Anonymous requests - /// are never allowed to create buckets. By creating the bucket, you become the bucket - /// owner. + /// Sets the permissions on an existing bucket using access control lists (ACL). For more + /// information, see Using + /// ACLs. To set the ACL of a bucket, you must have the WRITE_ACP permission. /// /// /// - /// There are two types of buckets: general purpose buckets and directory buckets. For - /// more information about these bucket types, see Creating, - /// configuring, and working with Amazon S3 buckets in the Amazon S3 User Guide. + /// You can use one of the following two ways to set a bucket's permissions: /// - ///
    • + ///
      • /// - /// General purpose buckets - If you send your CreateBucket request to - /// the s3.amazonaws.com global endpoint, the request goes to the us-east-1 - /// Region. So the signature calculations in Signature Version 4 must use us-east-1 - /// as the Region, even if the location constraint in the request specifies another Region - /// where the bucket is to be created. If you create a bucket in a Region other than US - /// East (N. Virginia), your application must be able to handle 307 redirect. For more - /// information, see Virtual - /// hosting of buckets in the Amazon S3 User Guide. + /// Specify the ACL in the request body /// ///
      • /// - /// Directory buckets - For directory buckets, you must make requests for this - /// API operation to the Regional endpoint. These endpoints support path-style requests - /// in the format https://s3express-control.region_code.amazonaws.com/bucket-name - /// . Virtual-hosted-style requests aren't supported. For more information, see Regional - /// and Zonal endpoints in the Amazon S3 User Guide. + /// Specify permissions using request headers + /// + ///
      + /// + /// You cannot specify access permission using both the body and the request headers. + /// + /// + /// + /// Depending on your application needs, you may choose to set the ACL on a bucket using + /// either the request body or the headers. For example, if you have an existing application + /// that updates a bucket ACL using the request body, then you can continue to use that + /// approach. + /// + /// + /// + /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, ACLs + /// are disabled and no longer affect permissions. You must use policies to grant access + /// to your bucket and the objects in it. Requests to set ACLs or update ACLs fail and + /// return the AccessControlListNotSupported error code. Requests to read ACLs + /// are still supported. For more information, see Controlling + /// object ownership in the Amazon S3 User Guide. + /// + ///
      Permissions
      + /// + /// You can set access permissions by using one of the following methods: + /// + ///
      • + /// + /// Specify a canned ACL with the x-amz-acl request header. Amazon S3 supports + /// a set of predefined ACLs, known as canned ACLs. Each canned ACL has a predefined + /// set of grantees and permissions. Specify the canned ACL name as the value of x-amz-acl. + /// If you use this header, you cannot use other access control-specific headers in your + /// request. For more information, see Canned + /// ACL. + /// + ///
      • + /// + /// Specify access permissions explicitly with the x-amz-grant-read, x-amz-grant-read-acp, + /// x-amz-grant-write-acp, and x-amz-grant-full-control headers. When using + /// these headers, you specify explicit access permissions and grantees (Amazon Web Services + /// accounts or Amazon S3 groups) who will receive the permission. If you use these ACL-specific + /// headers, you cannot use the x-amz-acl header to set a canned ACL. These parameters + /// map to the set of permissions that Amazon S3 supports in an ACL. For more information, + /// see Access + /// Control List (ACL) Overview. /// - ///
      Permissions
      • + /// /// - /// General purpose bucket permissions - In addition to the s3:CreateBucket - /// permission, the following permissions are required in a policy when your CreateBucket - /// request includes specific headers: + /// You specify each grantee as a type=value pair, where the type is one of the following: /// ///
        • /// - /// Access control lists (ACLs) - In your CreateBucket request, if you - /// specify an access control list (ACL) and set it to public-read, public-read-write, - /// authenticated-read, or if you explicitly specify any other custom ACLs, both - /// s3:CreateBucket and s3:PutBucketAcl permissions are required. In your - /// CreateBucket request, if you set the ACL to private, or if you don't - /// specify any ACLs, only the s3:CreateBucket permission is required. + /// id – if the value specified is the canonical user ID of an Amazon Web Services + /// account /// ///
        • /// - /// Object Lock - In your CreateBucket request, if you set x-amz-bucket-object-lock-enabled - /// to true, the s3:PutBucketObjectLockConfiguration and s3:PutBucketVersioning - /// permissions are required. + /// uri – if you are granting permissions to a predefined group /// ///
        • /// - /// S3 Object Ownership - If your CreateBucket request includes the x-amz-object-ownership - /// header, then the s3:PutBucketOwnershipControls permission is required. - /// - /// - /// - /// To set an ACL on a bucket as part of a CreateBucket request, you must explicitly - /// set S3 Object Ownership for the bucket to a different value than the default, BucketOwnerEnforced. - /// Additionally, if your desired bucket ACL grants public access, you must first create - /// the bucket (without the bucket ACL) and then explicitly disable Block Public Access - /// on the bucket before using PutBucketAcl to set the ACL. If you try to create - /// a bucket with a public ACL, the request will fail. + /// emailAddress – if the value specified is the email address of an Amazon Web + /// Services account /// - /// + /// /// - /// For the majority of modern use cases in S3, we recommend that you keep all Block - /// Public Access settings enabled and keep ACLs disabled. If you would like to share - /// data with users outside of your account, you can use bucket policies as needed. For - /// more information, see Controlling - /// ownership of objects and disabling ACLs for your bucket and Blocking - /// public access to your Amazon S3 storage in the Amazon S3 User Guide. + /// Using email addresses to specify a grantee is only supported in the following Amazon + /// Web Services Regions: /// - ///
        • + ///
          • /// - /// S3 Block Public Access - If your specific use case requires granting public - /// access to your S3 resources, you can disable Block Public Access. Specifically, you - /// can create a new bucket with Block Public Access enabled, then separately call the - /// - /// DeletePublicAccessBlock API. To use this operation, you must have the - /// s3:PutBucketPublicAccessBlock permission. For more information about S3 Block - /// Public Access, see Blocking - /// public access to your Amazon S3 storage in the Amazon S3 User Guide. + /// US East (N. Virginia) /// - ///
        • + ///
        • /// - /// Directory bucket permissions - You must have the s3express:CreateBucket - /// permission in an IAM identity-based policy instead of a bucket policy. Cross-account - /// access to this API operation isn't supported. This operation can only be performed - /// by the Amazon Web Services account that owns the resource. For more information about - /// directory bucket policies and permissions, see Amazon - /// Web Services Identity and Access Management (IAM) for S3 Express One Zone in the - /// Amazon S3 User Guide. + /// US West (N. California) /// - /// + ///
        • /// - /// The permissions for ACLs, Object Lock, S3 Object Ownership, and S3 Block Public Access - /// are not supported for directory buckets. For directory buckets, all Block Public Access - /// settings are enabled at the bucket level and S3 Object Ownership is set to Bucket - /// owner enforced (ACLs disabled). These settings can't be modified. + /// US West (Oregon) /// - /// + ///
        • /// - /// For more information about permissions for creating and working with directory buckets, - /// see Directory - /// buckets in the Amazon S3 User Guide. For more information about supported - /// S3 features for directory buckets, see Features - /// of S3 Express One Zone in the Amazon S3 User Guide. + /// Asia Pacific (Singapore) /// - ///
      HTTP Host header syntax
      + ///
    • /// - /// Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com. + /// Asia Pacific (Sydney) /// - /// + ///
    • /// - /// The following operations are related to CreateBucket: + /// Asia Pacific (Tokyo) /// - ///
      • + ///
      • /// - /// PutObject - /// + /// Europe (Ireland) /// ///
      • /// - /// DeleteBucket - /// + /// South America (São Paulo) /// - ///
      - ///
    - /// Container for the necessary parameters to execute the PutBucket service method. - /// - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// - /// - /// The response from the PutBucket service method, as returned by S3. - /// REST API Reference for PutBucket Operation - public virtual Task PutBucketAsync(PutBucketRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) - { - var options = new InvokeOptions(); - options.RequestMarshaller = PutBucketRequestMarshaller.Instance; - options.ResponseUnmarshaller = PutBucketResponseUnmarshaller.Instance; - - return InvokeAsync(request, options, cancellationToken); - } - - #endregion - - #region PutBucketAccelerateConfiguration - - - /// - /// + /// /// - /// This operation is not supported by directory buckets. + /// For a list of all the Amazon S3 supported Regions and endpoints, see Regions + /// and Endpoints in the Amazon Web Services General Reference. /// - /// + /// /// - /// Sets the accelerate configuration of an existing bucket. Amazon S3 Transfer Acceleration - /// is a bucket-level feature that enables you to perform faster data transfers to Amazon - /// S3. + /// For example, the following x-amz-grant-write header grants create, overwrite, + /// and delete objects permission to LogDelivery group predefined by Amazon S3 and two + /// Amazon Web Services accounts identified by their email addresses. /// /// /// - /// To use this operation, you must have permission to perform the s3:PutAccelerateConfiguration - /// action. The bucket owner has this permission by default. The bucket owner can grant - /// this permission to others. For more information about permissions, see Permissions - /// Related to Bucket Subresource Operations and Managing - /// Access Permissions to Your Amazon S3 Resources. + /// x-amz-grant-write: uri="http://acs.amazonaws.com/groups/s3/LogDelivery", id="111122223333", + /// id="555566667777" /// - /// + /// /// - /// The Transfer Acceleration state of a bucket can be set to one of the following two - /// values: + /// You can use either a canned ACL or specify access permissions explicitly. You cannot + /// do both. /// - ///
    • + ///
      Grantee Values
      /// - /// Enabled – Enables accelerated data transfers to the bucket. + /// You can specify the person (grantee) to whom you're assigning access rights (using + /// request elements) in the following ways: /// - ///
    • + ///
      • /// - /// Suspended – Disables accelerated data transfers to the bucket. + /// By the person's ID: /// - ///
      + /// /// - /// The GetBucketAccelerateConfiguration - /// action returns the transfer acceleration state of a bucket. + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"><ID><>ID<></ID><DisplayName><>GranteesEmail<></DisplayName> + /// </Grantee> /// /// /// - /// After setting the Transfer Acceleration state of a bucket to Enabled, it might take - /// up to thirty minutes before the data transfer rates to the bucket increase. + /// DisplayName is optional and ignored in the request /// - /// + ///
    • /// - /// The name of the bucket used for Transfer Acceleration must be DNS-compliant and must - /// not contain periods ("."). + /// By URI: /// /// /// - /// For more information about transfer acceleration, see Transfer - /// Acceleration. + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Group"><URI><>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<></URI></Grantee> + /// /// - /// + ///
    • /// - /// The following operations are related to PutBucketAccelerateConfiguration: + /// By Email address: /// - ///
      • + /// /// - /// GetBucketAccelerateConfiguration + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="AmazonCustomerByEmail"><EmailAddress><>Grantees@email.com<></EmailAddress>&</Grantee> /// /// - ///
      • + /// /// - /// CreateBucket - /// + /// The grantee is resolved to the CanonicalUser and, in a response to a GET Object acl + /// request, appears as the CanonicalUser. /// - ///
      - ///
    - /// Container for the necessary parameters to execute the PutBucketAccelerateConfiguration service method. - /// - /// The response from the PutBucketAccelerateConfiguration service method, as returned by S3. - /// REST API Reference for PutBucketAccelerateConfiguration Operation - public virtual PutBucketAccelerateConfigurationResponse PutBucketAccelerateConfiguration(PutBucketAccelerateConfigurationRequest request) - { - var options = new InvokeOptions(); - options.RequestMarshaller = PutBucketAccelerateConfigurationRequestMarshaller.Instance; - options.ResponseUnmarshaller = PutBucketAccelerateConfigurationResponseUnmarshaller.Instance; - - return Invoke(request, options); - } - - - /// - /// + /// /// - /// This operation is not supported by directory buckets. + /// Using email addresses to specify a grantee is only supported in the following Amazon + /// Web Services Regions: /// - /// + ///
    • /// - /// Sets the accelerate configuration of an existing bucket. Amazon S3 Transfer Acceleration - /// is a bucket-level feature that enables you to perform faster data transfers to Amazon - /// S3. + /// US East (N. Virginia) /// - /// + ///
    • /// - /// To use this operation, you must have permission to perform the s3:PutAccelerateConfiguration - /// action. The bucket owner has this permission by default. The bucket owner can grant - /// this permission to others. For more information about permissions, see Permissions - /// Related to Bucket Subresource Operations and Managing - /// Access Permissions to Your Amazon S3 Resources. + /// US West (N. California) /// - /// + ///
    • /// - /// The Transfer Acceleration state of a bucket can be set to one of the following two - /// values: + /// US West (Oregon) /// - ///
      • + ///
      • /// - /// Enabled – Enables accelerated data transfers to the bucket. + /// Asia Pacific (Singapore) /// ///
      • /// - /// Suspended – Disables accelerated data transfers to the bucket. + /// Asia Pacific (Sydney) /// - ///
      + ///
    • /// - /// The GetBucketAccelerateConfiguration - /// action returns the transfer acceleration state of a bucket. + /// Asia Pacific (Tokyo) /// - /// + ///
    • /// - /// After setting the Transfer Acceleration state of a bucket to Enabled, it might take - /// up to thirty minutes before the data transfer rates to the bucket increase. + /// Europe (Ireland) /// - /// + ///
    • /// - /// The name of the bucket used for Transfer Acceleration must be DNS-compliant and must - /// not contain periods ("."). + /// South America (São Paulo) /// - /// + ///
    /// - /// For more information about transfer acceleration, see Transfer - /// Acceleration. + /// For a list of all the Amazon S3 supported Regions and endpoints, see Regions + /// and Endpoints in the Amazon Web Services General Reference. /// - /// + ///
    /// - /// The following operations are related to PutBucketAccelerateConfiguration: + /// The following operations are related to PutBucketAcl: /// /// ///
    - /// Container for the necessary parameters to execute the PutBucketAccelerateConfiguration service method. + /// Container for the necessary parameters to execute the PutBucketAcl service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// - /// The response from the PutBucketAccelerateConfiguration service method, as returned by S3. - /// REST API Reference for PutBucketAccelerateConfiguration Operation - public virtual Task PutBucketAccelerateConfigurationAsync(PutBucketAccelerateConfigurationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) + /// The response from the PutBucketAcl service method, as returned by S3. + /// REST API Reference for PutBucketAcl Operation + public virtual Task PutBucketAclAsync(PutBucketAclRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); - options.RequestMarshaller = PutBucketAccelerateConfigurationRequestMarshaller.Instance; - options.ResponseUnmarshaller = PutBucketAccelerateConfigurationResponseUnmarshaller.Instance; + options.RequestMarshaller = PutBucketAclRequestMarshaller.Instance; + options.ResponseUnmarshaller = PutBucketAclResponseUnmarshaller.Instance; - return InvokeAsync(request, options, cancellationToken); + return InvokeAsync(request, options, cancellationToken); } #endregion @@ -23409,72 +23437,309 @@ public virtual PutBucketWebsiteResponse PutBucketWebsite(PutBucketWebsiteRequest /// /// RoutingRules /// - ///
  • + ///
  • + /// + /// RoutingRule + /// + ///
  • + /// + /// Condition + /// + ///
  • + /// + /// HttpErrorCodeReturnedEquals + /// + ///
  • + /// + /// KeyPrefixEquals + /// + ///
  • + /// + /// Redirect + /// + ///
  • + /// + /// Protocol + /// + ///
  • + /// + /// HostName + /// + ///
  • + /// + /// ReplaceKeyPrefixWith + /// + ///
  • + /// + /// ReplaceKeyWith + /// + ///
  • + /// + /// HttpRedirectCode + /// + ///
  • + /// + /// Amazon S3 has a limitation of 50 routing rules per website configuration. If you require + /// more than 50 routing rules, you can use object redirect. For more information, see + /// Configuring + /// an Object Redirect in the Amazon S3 User Guide. + /// + /// + /// + /// The maximum request length is limited to 128 KB. + /// + ///
    + /// The bucket name. + /// Container for the request. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// + /// The response from the PutBucketWebsite service method, as returned by S3. + /// REST API Reference for PutBucketWebsite Operation + public virtual Task PutBucketWebsiteAsync(string bucketName, WebsiteConfiguration websiteConfiguration, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) + { + var request = new PutBucketWebsiteRequest(); + request.BucketName = bucketName; + request.WebsiteConfiguration = websiteConfiguration; + return PutBucketWebsiteAsync(request, cancellationToken); + } + + + /// + /// + /// + /// This operation is not supported by directory buckets. + /// + /// + /// + /// Sets the configuration of the website that is specified in the website subresource. + /// To configure a bucket as a website, you can add this subresource on the bucket with + /// website configuration information such as the file name of the index document and + /// any redirect rules. For more information, see Hosting + /// Websites on Amazon S3. + /// + /// + /// + /// This PUT action requires the S3:PutBucketWebsite permission. By default, only + /// the bucket owner can configure the website attached to a bucket; however, bucket owners + /// can allow other users to set the website configuration by writing a bucket policy + /// that grants them the S3:PutBucketWebsite permission. + /// + /// + /// + /// To redirect all website requests sent to the bucket's website endpoint, you add a + /// website configuration with the following elements. Because all requests are sent to + /// another website, you don't need to provide index document name for the bucket. + /// + ///
    • + /// + /// WebsiteConfiguration + /// + ///
    • + /// + /// RedirectAllRequestsTo + /// + ///
    • + /// + /// HostName + /// + ///
    • + /// + /// Protocol + /// + ///
    + /// + /// If you want granular control over redirects, you can use the following elements to + /// add routing rules that describe conditions for redirecting requests and information + /// about the redirect destination. In this case, the website configuration must provide + /// an index document for the bucket, because some requests might not be redirected. + /// + ///
    • + /// + /// WebsiteConfiguration + /// + ///
    • + /// + /// IndexDocument + /// + ///
    • + /// + /// Suffix + /// + ///
    • + /// + /// ErrorDocument + /// + ///
    • + /// + /// Key + /// + ///
    • + /// + /// RoutingRules + /// + ///
    • + /// + /// RoutingRule + /// + ///
    • + /// + /// Condition + /// + ///
    • + /// + /// HttpErrorCodeReturnedEquals + /// + ///
    • + /// + /// KeyPrefixEquals + /// + ///
    • + /// + /// Redirect + /// + ///
    • + /// + /// Protocol + /// + ///
    • + /// + /// HostName + /// + ///
    • + /// + /// ReplaceKeyPrefixWith + /// + ///
    • + /// + /// ReplaceKeyWith + /// + ///
    • + /// + /// HttpRedirectCode + /// + ///
    + /// + /// Amazon S3 has a limitation of 50 routing rules per website configuration. If you require + /// more than 50 routing rules, you can use object redirect. For more information, see + /// Configuring + /// an Object Redirect in the Amazon S3 User Guide. + /// + /// + /// + /// The maximum request length is limited to 128 KB. + /// + ///
    + /// Container for the necessary parameters to execute the PutBucketWebsite service method. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// + /// The response from the PutBucketWebsite service method, as returned by S3. + /// REST API Reference for PutBucketWebsite Operation + public virtual Task PutBucketWebsiteAsync(PutBucketWebsiteRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) + { + var options = new InvokeOptions(); + options.RequestMarshaller = PutBucketWebsiteRequestMarshaller.Instance; + options.ResponseUnmarshaller = PutBucketWebsiteResponseUnmarshaller.Instance; + + return InvokeAsync(request, options, cancellationToken); + } + + #endregion + + #region PutCORSConfiguration + + + /// + /// + /// + /// This operation is not supported by directory buckets. + /// + /// + /// + /// Sets the cors configuration for your bucket. If the configuration exists, Amazon + /// S3 replaces it. + /// + /// + /// + /// To use this operation, you must be allowed to perform the s3:PutBucketCORS + /// action. By default, the bucket owner has this permission and can grant it to others. + /// + /// + /// + /// You set this configuration on a bucket so that the bucket can service cross-origin + /// requests. For example, you might want to enable a request whose origin is http://www.example.com + /// to access your Amazon S3 bucket at my.example.bucket.com by using the browser's + /// XMLHttpRequest capability. + /// + /// /// - /// RoutingRule + /// To enable cross-origin resource sharing (CORS) on a bucket, you add the cors + /// subresource to the bucket. The cors subresource is an XML document in which + /// you configure rules that identify origins and the HTTP methods that can be executed + /// on your bucket. The document is limited to 64 KB in size. /// - ///
  • + /// /// - /// Condition + /// When Amazon S3 receives a cross-origin request (or a pre-flight OPTIONS request) against + /// a bucket, it evaluates the cors configuration on the bucket and uses the first + /// CORSRule rule that matches the incoming browser request to enable a cross-origin + /// request. For a rule to match, the following conditions must be met: /// - ///
  • + ///
    • /// - /// HttpErrorCodeReturnedEquals + /// The request's Origin header must match AllowedOrigin elements. /// ///
    • /// - /// KeyPrefixEquals + /// The request method (for example, GET, PUT, HEAD, and so on) or the Access-Control-Request-Method + /// header in case of a pre-flight OPTIONS request must be one of the AllowedMethod + /// elements. /// ///
    • /// - /// Redirect + /// Every header specified in the Access-Control-Request-Headers request header + /// of a pre-flight request must match an AllowedHeader element. /// - ///
    • + ///
    /// - /// Protocol + /// For more information about CORS, go to Enabling + /// Cross-Origin Resource Sharing in the Amazon S3 User Guide. /// - ///
  • + /// /// - /// HostName + /// The following operations are related to PutBucketCors: /// - ///
  • + ///
    • /// - /// ReplaceKeyPrefixWith + /// GetBucketCors + /// /// ///
    • /// - /// ReplaceKeyWith + /// DeleteBucketCors + /// /// ///
    • /// - /// HttpRedirectCode - /// - ///
    - /// - /// Amazon S3 has a limitation of 50 routing rules per website configuration. If you require - /// more than 50 routing rules, you can use object redirect. For more information, see - /// Configuring - /// an Object Redirect in the Amazon S3 User Guide. - /// - /// - /// - /// The maximum request length is limited to 128 KB. + /// RESTOPTIONSobject + /// /// + ///
  • ///
    - /// The bucket name. - /// Container for the request. - /// - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// + /// Specifies the bucket impacted by the corsconfiguration. + /// Describes the cross-origin access configuration for objects in an Amazon S3 bucket. For more information, see Enabling Cross-Origin Resource Sharing in the Amazon S3 User Guide. /// - /// The response from the PutBucketWebsite service method, as returned by S3. - /// REST API Reference for PutBucketWebsite Operation - public virtual Task PutBucketWebsiteAsync(string bucketName, WebsiteConfiguration websiteConfiguration, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) + /// The response from the PutCORSConfiguration service method, as returned by S3. + /// REST API Reference for PutCORSConfiguration Operation + public virtual PutCORSConfigurationResponse PutCORSConfiguration(string bucketName, CORSConfiguration configuration) { - var request = new PutBucketWebsiteRequest(); + var request = new PutCORSConfigurationRequest(); request.BucketName = bucketName; - request.WebsiteConfiguration = websiteConfiguration; - return PutBucketWebsiteAsync(request, cancellationToken); + request.Configuration = configuration; + return PutCORSConfiguration(request); } @@ -23485,144 +23750,183 @@ public virtual PutBucketWebsiteResponse PutBucketWebsite(PutBucketWebsiteRequest /// /// /// - /// Sets the configuration of the website that is specified in the website subresource. - /// To configure a bucket as a website, you can add this subresource on the bucket with - /// website configuration information such as the file name of the index document and - /// any redirect rules. For more information, see Hosting - /// Websites on Amazon S3. + /// Sets the cors configuration for your bucket. If the configuration exists, Amazon + /// S3 replaces it. /// /// /// - /// This PUT action requires the S3:PutBucketWebsite permission. By default, only - /// the bucket owner can configure the website attached to a bucket; however, bucket owners - /// can allow other users to set the website configuration by writing a bucket policy - /// that grants them the S3:PutBucketWebsite permission. + /// To use this operation, you must be allowed to perform the s3:PutBucketCORS + /// action. By default, the bucket owner has this permission and can grant it to others. /// /// /// - /// To redirect all website requests sent to the bucket's website endpoint, you add a - /// website configuration with the following elements. Because all requests are sent to - /// another website, you don't need to provide index document name for the bucket. + /// You set this configuration on a bucket so that the bucket can service cross-origin + /// requests. For example, you might want to enable a request whose origin is http://www.example.com + /// to access your Amazon S3 bucket at my.example.bucket.com by using the browser's + /// XMLHttpRequest capability. /// - ///
    • + /// /// - /// WebsiteConfiguration + /// To enable cross-origin resource sharing (CORS) on a bucket, you add the cors + /// subresource to the bucket. The cors subresource is an XML document in which + /// you configure rules that identify origins and the HTTP methods that can be executed + /// on your bucket. The document is limited to 64 KB in size. /// - ///
    • + /// /// - /// RedirectAllRequestsTo + /// When Amazon S3 receives a cross-origin request (or a pre-flight OPTIONS request) against + /// a bucket, it evaluates the cors configuration on the bucket and uses the first + /// CORSRule rule that matches the incoming browser request to enable a cross-origin + /// request. For a rule to match, the following conditions must be met: + /// + ///
      • + /// + /// The request's Origin header must match AllowedOrigin elements. /// ///
      • /// - /// HostName + /// The request method (for example, GET, PUT, HEAD, and so on) or the Access-Control-Request-Method + /// header in case of a pre-flight OPTIONS request must be one of the AllowedMethod + /// elements. /// ///
      • /// - /// Protocol + /// Every header specified in the Access-Control-Request-Headers request header + /// of a pre-flight request must match an AllowedHeader element. /// ///
      /// - /// If you want granular control over redirects, you can use the following elements to - /// add routing rules that describe conditions for redirecting requests and information - /// about the redirect destination. In this case, the website configuration must provide - /// an index document for the bucket, because some requests might not be redirected. + /// For more information about CORS, go to Enabling + /// Cross-Origin Resource Sharing in the Amazon S3 User Guide. /// - ///
      • + /// /// - /// WebsiteConfiguration + /// The following operations are related to PutBucketCors: /// - ///
      • + /// + ///
    + /// Container for the necessary parameters to execute the PutCORSConfiguration service method. + /// + /// The response from the PutCORSConfiguration service method, as returned by S3. + /// REST API Reference for PutCORSConfiguration Operation + public virtual PutCORSConfigurationResponse PutCORSConfiguration(PutCORSConfigurationRequest request) + { + var options = new InvokeOptions(); + options.RequestMarshaller = PutCORSConfigurationRequestMarshaller.Instance; + options.ResponseUnmarshaller = PutCORSConfigurationResponseUnmarshaller.Instance; + + return Invoke(request, options); + } + + + /// + /// /// - /// Key + /// This operation is not supported by directory buckets. /// - ///
  • + /// /// - /// RoutingRules + /// Sets the cors configuration for your bucket. If the configuration exists, Amazon + /// S3 replaces it. /// - ///
  • + /// /// - /// RoutingRule + /// To use this operation, you must be allowed to perform the s3:PutBucketCORS + /// action. By default, the bucket owner has this permission and can grant it to others. /// - ///
  • + /// /// - /// Condition + /// You set this configuration on a bucket so that the bucket can service cross-origin + /// requests. For example, you might want to enable a request whose origin is http://www.example.com + /// to access your Amazon S3 bucket at my.example.bucket.com by using the browser's + /// XMLHttpRequest capability. /// - ///
  • + /// /// - /// HttpErrorCodeReturnedEquals + /// To enable cross-origin resource sharing (CORS) on a bucket, you add the cors + /// subresource to the bucket. The cors subresource is an XML document in which + /// you configure rules that identify origins and the HTTP methods that can be executed + /// on your bucket. The document is limited to 64 KB in size. /// - ///
  • + /// /// - /// KeyPrefixEquals + /// When Amazon S3 receives a cross-origin request (or a pre-flight OPTIONS request) against + /// a bucket, it evaluates the cors configuration on the bucket and uses the first + /// CORSRule rule that matches the incoming browser request to enable a cross-origin + /// request. For a rule to match, the following conditions must be met: /// - ///
  • + ///
    • /// - /// Redirect + /// The request's Origin header must match AllowedOrigin elements. /// ///
    • /// - /// Protocol + /// The request method (for example, GET, PUT, HEAD, and so on) or the Access-Control-Request-Method + /// header in case of a pre-flight OPTIONS request must be one of the AllowedMethod + /// elements. /// ///
    • /// - /// HostName + /// Every header specified in the Access-Control-Request-Headers request header + /// of a pre-flight request must match an AllowedHeader element. /// - ///
    • + ///
    /// - /// ReplaceKeyPrefixWith + /// For more information about CORS, go to Enabling + /// Cross-Origin Resource Sharing in the Amazon S3 User Guide. /// - ///
  • + /// /// - /// ReplaceKeyWith + /// The following operations are related to PutBucketCors: /// - ///
  • + /// + ///
  • /// - /// Amazon S3 has a limitation of 50 routing rules per website configuration. If you require - /// more than 50 routing rules, you can use object redirect. For more information, see - /// Configuring - /// an Object Redirect in the Amazon S3 User Guide. + /// DeleteBucketCors + /// /// - /// + ///
  • /// - /// The maximum request length is limited to 128 KB. + /// RESTOPTIONSobject + /// /// + ///
  • ///
    - /// Container for the necessary parameters to execute the PutBucketWebsite service method. + /// Specifies the bucket impacted by the corsconfiguration. + /// Describes the cross-origin access configuration for objects in an Amazon S3 bucket. For more information, see Enabling Cross-Origin Resource Sharing in the Amazon S3 User Guide. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// - /// The response from the PutBucketWebsite service method, as returned by S3. - /// REST API Reference for PutBucketWebsite Operation - public virtual Task PutBucketWebsiteAsync(PutBucketWebsiteRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) + /// The response from the PutCORSConfiguration service method, as returned by S3. + /// REST API Reference for PutCORSConfiguration Operation + public virtual Task PutCORSConfigurationAsync(string bucketName, CORSConfiguration configuration, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { - var options = new InvokeOptions(); - options.RequestMarshaller = PutBucketWebsiteRequestMarshaller.Instance; - options.ResponseUnmarshaller = PutBucketWebsiteResponseUnmarshaller.Instance; - - return InvokeAsync(request, options, cancellationToken); + var request = new PutCORSConfigurationRequest(); + request.BucketName = bucketName; + request.Configuration = configuration; + return PutCORSConfigurationAsync(request, cancellationToken); } - #endregion - - #region PutCORSConfiguration - /// /// @@ -23701,19 +24005,26 @@ public virtual PutBucketWebsiteResponse PutBucketWebsite(PutBucketWebsiteRequest /// /// /// - /// Specifies the bucket impacted by the corsconfiguration. - /// Describes the cross-origin access configuration for objects in an Amazon S3 bucket. For more information, see Enabling Cross-Origin Resource Sharing in the Amazon S3 User Guide. + /// Container for the necessary parameters to execute the PutCORSConfiguration service method. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// /// /// The response from the PutCORSConfiguration service method, as returned by S3. /// REST API Reference for PutCORSConfiguration Operation - public virtual PutCORSConfigurationResponse PutCORSConfiguration(string bucketName, CORSConfiguration configuration) + public virtual Task PutCORSConfigurationAsync(PutCORSConfigurationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { - var request = new PutCORSConfigurationRequest(); - request.BucketName = bucketName; - request.Configuration = configuration; - return PutCORSConfiguration(request); + var options = new InvokeOptions(); + options.RequestMarshaller = PutCORSConfigurationRequestMarshaller.Instance; + options.ResponseUnmarshaller = PutCORSConfigurationResponseUnmarshaller.Instance; + + return InvokeAsync(request, options, cancellationToken); } + #endregion + + #region PutLifecycleConfiguration + /// /// @@ -23722,87 +24033,114 @@ public virtual PutCORSConfigurationResponse PutCORSConfiguration(string bucketNa /// /// /// - /// Sets the cors configuration for your bucket. If the configuration exists, Amazon - /// S3 replaces it. + /// Creates a new lifecycle configuration for the bucket or replaces an existing lifecycle + /// configuration. Keep in mind that this will overwrite an existing lifecycle configuration, + /// so if you want to retain any configuration details, they must be included in the new + /// lifecycle configuration. For information about lifecycle configuration, see Managing + /// your storage lifecycle. /// - /// + /// /// - /// To use this operation, you must be allowed to perform the s3:PutBucketCORS - /// action. By default, the bucket owner has this permission and can grant it to others. + /// Bucket lifecycle configuration now supports specifying a lifecycle rule using an object + /// key name prefix, one or more object tags, object size, or any combination of these. + /// Accordingly, this section describes the latest API. The previous version of the API + /// supported filtering based only on an object key name prefix, which is supported for + /// backward compatibility. For the related API description, see PutBucketLifecycle. /// - /// + ///
    Rules
    /// - /// You set this configuration on a bucket so that the bucket can service cross-origin - /// requests. For example, you might want to enable a request whose origin is http://www.example.com - /// to access your Amazon S3 bucket at my.example.bucket.com by using the browser's - /// XMLHttpRequest capability. + /// You specify the lifecycle configuration in your request body. The lifecycle configuration + /// is specified as XML consisting of one or more rules. An Amazon S3 Lifecycle configuration + /// can have up to 1,000 rules. This limit is not adjustable. Each rule consists of the + /// following: /// - /// + ///
    • /// - /// To enable cross-origin resource sharing (CORS) on a bucket, you add the cors - /// subresource to the bucket. The cors subresource is an XML document in which - /// you configure rules that identify origins and the HTTP methods that can be executed - /// on your bucket. The document is limited to 64 KB in size. + /// A filter identifying a subset of objects to which the rule applies. The filter can + /// be based on a key name prefix, object tags, object size, or any combination of these. + /// + ///
    • + /// + /// A status indicating whether the rule is in effect. + /// + ///
    • + /// + /// One or more lifecycle transition and expiration actions that you want Amazon S3 to + /// perform on the objects identified by the filter. If the state of your bucket is versioning-enabled + /// or versioning-suspended, you can have many versions of the same object (one current + /// version and zero or more noncurrent versions). Amazon S3 provides predefined actions + /// that you can specify for current and noncurrent object versions. + /// + ///
    + /// + /// For more information, see Object + /// Lifecycle Management and Lifecycle + /// Configuration Elements. + /// + ///
    Permissions
    + /// + /// By default, all Amazon S3 resources are private, including buckets, objects, and related + /// subresources (for example, lifecycle configuration and website configuration). Only + /// the resource owner (that is, the Amazon Web Services account that created it) can + /// access the resource. The resource owner can optionally grant access permissions to + /// others by writing an access policy. For this operation, a user must get the s3:PutLifecycleConfiguration + /// permission. /// /// /// - /// When Amazon S3 receives a cross-origin request (or a pre-flight OPTIONS request) against - /// a bucket, it evaluates the cors configuration on the bucket and uses the first - /// CORSRule rule that matches the incoming browser request to enable a cross-origin - /// request. For a rule to match, the following conditions must be met: + /// You can also explicitly deny permissions. An explicit deny also supersedes any other + /// permissions. If you want to block users or accounts from removing or deleting objects + /// from your bucket, you must deny them permissions for the following actions: /// ///
    • /// - /// The request's Origin header must match AllowedOrigin elements. + /// s3:DeleteObject /// ///
    • /// - /// The request method (for example, GET, PUT, HEAD, and so on) or the Access-Control-Request-Method - /// header in case of a pre-flight OPTIONS request must be one of the AllowedMethod - /// elements. + /// s3:DeleteObjectVersion /// ///
    • /// - /// Every header specified in the Access-Control-Request-Headers request header - /// of a pre-flight request must match an AllowedHeader element. + /// s3:PutLifecycleConfiguration /// ///
    /// - /// For more information about CORS, go to Enabling - /// Cross-Origin Resource Sharing in the Amazon S3 User Guide. + /// For more information about permissions, see Managing + /// Access Permissions to Your Amazon S3 Resources. /// - /// + ///
    /// - /// The following operations are related to PutBucketCors: + /// The following operations are related to PutBucketLifecycleConfiguration: /// /// ///
    - /// Container for the necessary parameters to execute the PutCORSConfiguration service method. + /// The name of the bucket for which to set the configuration. + /// A property of PutLifecycleConfigurationRequest used to execute the PutLifecycleConfiguration service method. /// - /// The response from the PutCORSConfiguration service method, as returned by S3. - /// REST API Reference for PutCORSConfiguration Operation - public virtual PutCORSConfigurationResponse PutCORSConfiguration(PutCORSConfigurationRequest request) + /// The response from the PutLifecycleConfiguration service method, as returned by S3. + /// REST API Reference for PutLifecycleConfiguration Operation + public virtual PutLifecycleConfigurationResponse PutLifecycleConfiguration(string bucketName, LifecycleConfiguration configuration) { - var options = new InvokeOptions(); - options.RequestMarshaller = PutCORSConfigurationRequestMarshaller.Instance; - options.ResponseUnmarshaller = PutCORSConfigurationResponseUnmarshaller.Instance; - - return Invoke(request, options); + var request = new PutLifecycleConfigurationRequest(); + request.BucketName = bucketName; + request.Configuration = configuration; + return PutLifecycleConfiguration(request); } @@ -23813,190 +24151,237 @@ public virtual PutCORSConfigurationResponse PutCORSConfiguration(PutCORSConfigur /// /// /// - /// Sets the cors configuration for your bucket. If the configuration exists, Amazon - /// S3 replaces it. + /// Creates a new lifecycle configuration for the bucket or replaces an existing lifecycle + /// configuration. Keep in mind that this will overwrite an existing lifecycle configuration, + /// so if you want to retain any configuration details, they must be included in the new + /// lifecycle configuration. For information about lifecycle configuration, see Managing + /// your storage lifecycle. /// - /// + /// /// - /// To use this operation, you must be allowed to perform the s3:PutBucketCORS - /// action. By default, the bucket owner has this permission and can grant it to others. + /// Bucket lifecycle configuration now supports specifying a lifecycle rule using an object + /// key name prefix, one or more object tags, object size, or any combination of these. + /// Accordingly, this section describes the latest API. The previous version of the API + /// supported filtering based only on an object key name prefix, which is supported for + /// backward compatibility. For the related API description, see PutBucketLifecycle. /// - /// + ///
    Rules
    /// - /// You set this configuration on a bucket so that the bucket can service cross-origin - /// requests. For example, you might want to enable a request whose origin is http://www.example.com - /// to access your Amazon S3 bucket at my.example.bucket.com by using the browser's - /// XMLHttpRequest capability. + /// You specify the lifecycle configuration in your request body. The lifecycle configuration + /// is specified as XML consisting of one or more rules. An Amazon S3 Lifecycle configuration + /// can have up to 1,000 rules. This limit is not adjustable. Each rule consists of the + /// following: /// - /// + ///
    • /// - /// To enable cross-origin resource sharing (CORS) on a bucket, you add the cors - /// subresource to the bucket. The cors subresource is an XML document in which - /// you configure rules that identify origins and the HTTP methods that can be executed - /// on your bucket. The document is limited to 64 KB in size. + /// A filter identifying a subset of objects to which the rule applies. The filter can + /// be based on a key name prefix, object tags, object size, or any combination of these. + /// + ///
    • + /// + /// A status indicating whether the rule is in effect. + /// + ///
    • + /// + /// One or more lifecycle transition and expiration actions that you want Amazon S3 to + /// perform on the objects identified by the filter. If the state of your bucket is versioning-enabled + /// or versioning-suspended, you can have many versions of the same object (one current + /// version and zero or more noncurrent versions). Amazon S3 provides predefined actions + /// that you can specify for current and noncurrent object versions. + /// + ///
    + /// + /// For more information, see Object + /// Lifecycle Management and Lifecycle + /// Configuration Elements. + /// + ///
    Permissions
    + /// + /// By default, all Amazon S3 resources are private, including buckets, objects, and related + /// subresources (for example, lifecycle configuration and website configuration). Only + /// the resource owner (that is, the Amazon Web Services account that created it) can + /// access the resource. The resource owner can optionally grant access permissions to + /// others by writing an access policy. For this operation, a user must get the s3:PutLifecycleConfiguration + /// permission. /// /// /// - /// When Amazon S3 receives a cross-origin request (or a pre-flight OPTIONS request) against - /// a bucket, it evaluates the cors configuration on the bucket and uses the first - /// CORSRule rule that matches the incoming browser request to enable a cross-origin - /// request. For a rule to match, the following conditions must be met: + /// You can also explicitly deny permissions. An explicit deny also supersedes any other + /// permissions. If you want to block users or accounts from removing or deleting objects + /// from your bucket, you must deny them permissions for the following actions: /// ///
    • /// - /// The request's Origin header must match AllowedOrigin elements. + /// s3:DeleteObject /// ///
    • /// - /// The request method (for example, GET, PUT, HEAD, and so on) or the Access-Control-Request-Method - /// header in case of a pre-flight OPTIONS request must be one of the AllowedMethod - /// elements. + /// s3:DeleteObjectVersion /// ///
    • /// - /// Every header specified in the Access-Control-Request-Headers request header - /// of a pre-flight request must match an AllowedHeader element. + /// s3:PutLifecycleConfiguration /// ///
    /// - /// For more information about CORS, go to Enabling - /// Cross-Origin Resource Sharing in the Amazon S3 User Guide. + /// For more information about permissions, see Managing + /// Access Permissions to Your Amazon S3 Resources. /// - /// + ///
    /// - /// The following operations are related to PutBucketCors: + /// The following operations are related to PutBucketLifecycleConfiguration: /// /// ///
    - /// Specifies the bucket impacted by the corsconfiguration. - /// Describes the cross-origin access configuration for objects in an Amazon S3 bucket. For more information, see Enabling Cross-Origin Resource Sharing in the Amazon S3 User Guide. - /// - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// + /// Container for the necessary parameters to execute the PutLifecycleConfiguration service method. /// - /// The response from the PutCORSConfiguration service method, as returned by S3. - /// REST API Reference for PutCORSConfiguration Operation - public virtual Task PutCORSConfigurationAsync(string bucketName, CORSConfiguration configuration, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) + /// The response from the PutLifecycleConfiguration service method, as returned by S3. + /// REST API Reference for PutLifecycleConfiguration Operation + public virtual PutLifecycleConfigurationResponse PutLifecycleConfiguration(PutLifecycleConfigurationRequest request) { - var request = new PutCORSConfigurationRequest(); - request.BucketName = bucketName; - request.Configuration = configuration; - return PutCORSConfigurationAsync(request, cancellationToken); + var options = new InvokeOptions(); + options.RequestMarshaller = PutLifecycleConfigurationRequestMarshaller.Instance; + options.ResponseUnmarshaller = PutLifecycleConfigurationResponseUnmarshaller.Instance; + + return Invoke(request, options); } /// /// /// - /// This operation is not supported by directory buckets. + /// This operation is not supported by directory buckets. + /// + /// + /// + /// Creates a new lifecycle configuration for the bucket or replaces an existing lifecycle + /// configuration. Keep in mind that this will overwrite an existing lifecycle configuration, + /// so if you want to retain any configuration details, they must be included in the new + /// lifecycle configuration. For information about lifecycle configuration, see Managing + /// your storage lifecycle. + /// + /// + /// + /// Bucket lifecycle configuration now supports specifying a lifecycle rule using an object + /// key name prefix, one or more object tags, object size, or any combination of these. + /// Accordingly, this section describes the latest API. The previous version of the API + /// supported filtering based only on an object key name prefix, which is supported for + /// backward compatibility. For the related API description, see PutBucketLifecycle. /// - /// + ///
    Rules
    /// - /// Sets the cors configuration for your bucket. If the configuration exists, Amazon - /// S3 replaces it. + /// You specify the lifecycle configuration in your request body. The lifecycle configuration + /// is specified as XML consisting of one or more rules. An Amazon S3 Lifecycle configuration + /// can have up to 1,000 rules. This limit is not adjustable. Each rule consists of the + /// following: /// - /// + ///
    • /// - /// To use this operation, you must be allowed to perform the s3:PutBucketCORS - /// action. By default, the bucket owner has this permission and can grant it to others. + /// A filter identifying a subset of objects to which the rule applies. The filter can + /// be based on a key name prefix, object tags, object size, or any combination of these. /// - /// + ///
    • /// - /// You set this configuration on a bucket so that the bucket can service cross-origin - /// requests. For example, you might want to enable a request whose origin is http://www.example.com - /// to access your Amazon S3 bucket at my.example.bucket.com by using the browser's - /// XMLHttpRequest capability. + /// A status indicating whether the rule is in effect. /// - /// + ///
    • /// - /// To enable cross-origin resource sharing (CORS) on a bucket, you add the cors - /// subresource to the bucket. The cors subresource is an XML document in which - /// you configure rules that identify origins and the HTTP methods that can be executed - /// on your bucket. The document is limited to 64 KB in size. + /// One or more lifecycle transition and expiration actions that you want Amazon S3 to + /// perform on the objects identified by the filter. If the state of your bucket is versioning-enabled + /// or versioning-suspended, you can have many versions of the same object (one current + /// version and zero or more noncurrent versions). Amazon S3 provides predefined actions + /// that you can specify for current and noncurrent object versions. + /// + ///
    + /// + /// For more information, see Object + /// Lifecycle Management and Lifecycle + /// Configuration Elements. + /// + ///
    Permissions
    + /// + /// By default, all Amazon S3 resources are private, including buckets, objects, and related + /// subresources (for example, lifecycle configuration and website configuration). Only + /// the resource owner (that is, the Amazon Web Services account that created it) can + /// access the resource. The resource owner can optionally grant access permissions to + /// others by writing an access policy. For this operation, a user must get the s3:PutLifecycleConfiguration + /// permission. /// /// /// - /// When Amazon S3 receives a cross-origin request (or a pre-flight OPTIONS request) against - /// a bucket, it evaluates the cors configuration on the bucket and uses the first - /// CORSRule rule that matches the incoming browser request to enable a cross-origin - /// request. For a rule to match, the following conditions must be met: + /// You can also explicitly deny permissions. An explicit deny also supersedes any other + /// permissions. If you want to block users or accounts from removing or deleting objects + /// from your bucket, you must deny them permissions for the following actions: /// ///
    • /// - /// The request's Origin header must match AllowedOrigin elements. + /// s3:DeleteObject /// ///
    • /// - /// The request method (for example, GET, PUT, HEAD, and so on) or the Access-Control-Request-Method - /// header in case of a pre-flight OPTIONS request must be one of the AllowedMethod - /// elements. + /// s3:DeleteObjectVersion /// ///
    • /// - /// Every header specified in the Access-Control-Request-Headers request header - /// of a pre-flight request must match an AllowedHeader element. + /// s3:PutLifecycleConfiguration /// ///
    /// - /// For more information about CORS, go to Enabling - /// Cross-Origin Resource Sharing in the Amazon S3 User Guide. + /// For more information about permissions, see Managing + /// Access Permissions to Your Amazon S3 Resources. /// - /// + ///
    /// - /// The following operations are related to PutBucketCors: + /// The following operations are related to PutBucketLifecycleConfiguration: /// /// ///
    - /// Container for the necessary parameters to execute the PutCORSConfiguration service method. + /// The name of the bucket for which to set the configuration. + /// A property of PutLifecycleConfigurationRequest used to execute the PutLifecycleConfiguration service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// - /// The response from the PutCORSConfiguration service method, as returned by S3. - /// REST API Reference for PutCORSConfiguration Operation - public virtual Task PutCORSConfigurationAsync(PutCORSConfigurationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) + /// The response from the PutLifecycleConfiguration service method, as returned by S3. + /// REST API Reference for PutLifecycleConfiguration Operation + public virtual Task PutLifecycleConfigurationAsync(string bucketName, LifecycleConfiguration configuration, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { - var options = new InvokeOptions(); - options.RequestMarshaller = PutCORSConfigurationRequestMarshaller.Instance; - options.ResponseUnmarshaller = PutCORSConfigurationResponseUnmarshaller.Instance; - - return InvokeAsync(request, options, cancellationToken); + var request = new PutLifecycleConfigurationRequest(); + request.BucketName = bucketName; + request.Configuration = configuration; + return PutLifecycleConfigurationAsync(request, cancellationToken); } - #endregion - - #region PutLifecycleConfiguration - /// /// @@ -24068,171 +24453,345 @@ public virtual PutCORSConfigurationResponse PutCORSConfiguration(PutCORSConfigur /// /// s3:DeleteObject /// - ///
  • + ///
  • + /// + /// s3:DeleteObjectVersion + /// + ///
  • + /// + /// s3:PutLifecycleConfiguration + /// + ///
  • + /// + /// For more information about permissions, see Managing + /// Access Permissions to Your Amazon S3 Resources. + /// + /// + /// + /// The following operations are related to PutBucketLifecycleConfiguration: + /// + /// + ///
    + /// Container for the necessary parameters to execute the PutLifecycleConfiguration service method. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// + /// The response from the PutLifecycleConfiguration service method, as returned by S3. + /// REST API Reference for PutLifecycleConfiguration Operation + public virtual Task PutLifecycleConfigurationAsync(PutLifecycleConfigurationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) + { + var options = new InvokeOptions(); + options.RequestMarshaller = PutLifecycleConfigurationRequestMarshaller.Instance; + options.ResponseUnmarshaller = PutLifecycleConfigurationResponseUnmarshaller.Instance; + + return InvokeAsync(request, options, cancellationToken); + } + + #endregion + + #region PutObject + + + /// + /// Adds an object to a bucket. + /// + ///
    • + /// + /// Amazon S3 never adds partial objects; if you receive a success response, Amazon S3 + /// added the entire object to the bucket. You cannot use PutObject to only update + /// a single piece of metadata for an existing object. You must put the entire object + /// with updated metadata if you want to update some values. + /// + ///
    • + /// + /// If your bucket uses the bucket owner enforced setting for Object Ownership, ACLs are + /// disabled and no longer affect permissions. All objects written to the bucket by any + /// account will be owned by the bucket owner. + /// + ///
    • + /// + /// Directory buckets - For directory buckets, you must make requests for this + /// API operation to the Zonal endpoint. These endpoints support virtual-hosted-style + /// requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name + /// . Path-style requests are not supported. For more information, see Regional + /// and Zonal endpoints in the Amazon S3 User Guide. + /// + ///
    + /// + /// Amazon S3 is a distributed system. If it receives multiple write requests for the + /// same object simultaneously, it overwrites all but the last object written. However, + /// Amazon S3 provides features that can modify this behavior: + /// + ///
    • + /// + /// S3 Object Lock - To prevent objects from being deleted or overwritten, you + /// can use Amazon + /// S3 Object Lock in the Amazon S3 User Guide. + /// + /// + /// + /// This functionality is not supported for directory buckets. + /// + ///
    • + /// + /// S3 Versioning - When you enable versioning for a bucket, if Amazon S3 receives + /// multiple write requests for the same object simultaneously, it stores all versions + /// of the objects. For each write request that is made to the same object, Amazon S3 + /// automatically generates a unique version ID of that object being stored in Amazon + /// S3. You can retrieve, replace, or delete any version of the object. For more information + /// about versioning, see Adding + /// Objects to Versioning-Enabled Buckets in the Amazon S3 User Guide. For + /// information about returning the versioning state of a bucket, see GetBucketVersioning. + /// + /// + /// + /// + /// This functionality is not supported for directory buckets. + /// + ///
    Permissions
    • + /// + /// General purpose bucket permissions - The following permissions are required + /// in your policies when your PutObject request includes specific headers. + /// + ///
      • + /// + /// s3:PutObject - To successfully complete the PutObject request, + /// you must always have the s3:PutObject permission on a bucket to add an object + /// to it. + /// + ///
      • + /// + /// s3:PutObjectAcl - To successfully change the objects ACL of your + /// PutObject request, you must have the s3:PutObjectAcl. + /// + ///
      • + /// + /// s3:PutObjectTagging - To successfully set the tag-set with your PutObject + /// request, you must have the s3:PutObjectTagging. + /// + ///
    • + /// + /// Directory bucket permissions - To grant access to this API operation on a + /// directory bucket, we recommend that you use the + /// CreateSession API operation for session-based authorization. Specifically, + /// you grant the s3express:CreateSession permission to the directory bucket in + /// a bucket policy or an IAM identity-based policy. Then, you make the CreateSession + /// API call on the bucket to obtain a session token. With the session token in your request + /// header, you can make API requests to this operation. After the session token expires, + /// you make another CreateSession API call to generate a new session token for + /// use. Amazon Web Services CLI or SDKs create session and refresh the session token + /// automatically to avoid service interruptions when a session expires. For more information + /// about authorization, see + /// CreateSession . + /// + ///
    Data integrity with Content-MD5
    • /// - /// s3:DeleteObjectVersion + /// General purpose bucket - To ensure that data is not corrupted traversing the + /// network, use the Content-MD5 header. When you use this header, Amazon S3 checks + /// the object against the provided MD5 value and, if they do not match, Amazon S3 returns + /// an error. Alternatively, when the object's ETag is its MD5 digest, you can calculate + /// the MD5 while putting the object to Amazon S3 and compare the returned ETag to the + /// calculated MD5 value. /// ///
    • /// - /// s3:PutLifecycleConfiguration + /// Directory bucket - This functionality is not supported for directory buckets. /// - ///
    + ///
    HTTP Host header syntax
    /// - /// For more information about permissions, see Managing - /// Access Permissions to Your Amazon S3 Resources. + /// Directory buckets - The HTTP Host header syntax is Bucket_name.s3express-az_id.region.amazonaws.com. /// ///
    /// - /// The following operations are related to PutBucketLifecycleConfiguration: + /// For more information about related Amazon S3 APIs, see the following: /// /// ///
    - /// The name of the bucket for which to set the configuration. - /// A property of PutLifecycleConfigurationRequest used to execute the PutLifecycleConfiguration service method. + /// Container for the necessary parameters to execute the PutObject service method. /// - /// The response from the PutLifecycleConfiguration service method, as returned by S3. - /// REST API Reference for PutLifecycleConfiguration Operation - public virtual PutLifecycleConfigurationResponse PutLifecycleConfiguration(string bucketName, LifecycleConfiguration configuration) + /// The response from the PutObject service method, as returned by S3. + /// REST API Reference for PutObject Operation + public virtual PutObjectResponse PutObject(PutObjectRequest request) { - var request = new PutLifecycleConfigurationRequest(); - request.BucketName = bucketName; - request.Configuration = configuration; - return PutLifecycleConfiguration(request); + var options = new InvokeOptions(); + options.RequestMarshaller = PutObjectRequestMarshaller.Instance; + options.ResponseUnmarshaller = PutObjectResponseUnmarshaller.Instance; + + return Invoke(request, options); } /// - /// + /// Adds an object to a bucket. + /// + ///
    • /// - /// This operation is not supported by directory buckets. + /// Amazon S3 never adds partial objects; if you receive a success response, Amazon S3 + /// added the entire object to the bucket. You cannot use PutObject to only update + /// a single piece of metadata for an existing object. You must put the entire object + /// with updated metadata if you want to update some values. /// - /// + ///
    • /// - /// Creates a new lifecycle configuration for the bucket or replaces an existing lifecycle - /// configuration. Keep in mind that this will overwrite an existing lifecycle configuration, - /// so if you want to retain any configuration details, they must be included in the new - /// lifecycle configuration. For information about lifecycle configuration, see Managing - /// your storage lifecycle. + /// If your bucket uses the bucket owner enforced setting for Object Ownership, ACLs are + /// disabled and no longer affect permissions. All objects written to the bucket by any + /// account will be owned by the bucket owner. /// - /// + ///
    • /// - /// Bucket lifecycle configuration now supports specifying a lifecycle rule using an object - /// key name prefix, one or more object tags, object size, or any combination of these. - /// Accordingly, this section describes the latest API. The previous version of the API - /// supported filtering based only on an object key name prefix, which is supported for - /// backward compatibility. For the related API description, see PutBucketLifecycle. + /// Directory buckets - For directory buckets, you must make requests for this + /// API operation to the Zonal endpoint. These endpoints support virtual-hosted-style + /// requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name + /// . Path-style requests are not supported. For more information, see Regional + /// and Zonal endpoints in the Amazon S3 User Guide. /// - ///
      Rules
      + ///
    /// - /// You specify the lifecycle configuration in your request body. The lifecycle configuration - /// is specified as XML consisting of one or more rules. An Amazon S3 Lifecycle configuration - /// can have up to 1,000 rules. This limit is not adjustable. Each rule consists of the - /// following: + /// Amazon S3 is a distributed system. If it receives multiple write requests for the + /// same object simultaneously, it overwrites all but the last object written. However, + /// Amazon S3 provides features that can modify this behavior: /// ///
    • /// - /// A filter identifying a subset of objects to which the rule applies. The filter can - /// be based on a key name prefix, object tags, object size, or any combination of these. + /// S3 Object Lock - To prevent objects from being deleted or overwritten, you + /// can use Amazon + /// S3 Object Lock in the Amazon S3 User Guide. /// - ///
    • + /// /// - /// A status indicating whether the rule is in effect. + /// This functionality is not supported for directory buckets. /// - ///
    • + ///
    • /// - /// One or more lifecycle transition and expiration actions that you want Amazon S3 to - /// perform on the objects identified by the filter. If the state of your bucket is versioning-enabled - /// or versioning-suspended, you can have many versions of the same object (one current - /// version and zero or more noncurrent versions). Amazon S3 provides predefined actions - /// that you can specify for current and noncurrent object versions. + /// S3 Versioning - When you enable versioning for a bucket, if Amazon S3 receives + /// multiple write requests for the same object simultaneously, it stores all versions + /// of the objects. For each write request that is made to the same object, Amazon S3 + /// automatically generates a unique version ID of that object being stored in Amazon + /// S3. You can retrieve, replace, or delete any version of the object. For more information + /// about versioning, see Adding + /// Objects to Versioning-Enabled Buckets in the Amazon S3 User Guide. For + /// information about returning the versioning state of a bucket, see GetBucketVersioning. + /// /// - ///
    + /// /// - /// For more information, see Object - /// Lifecycle Management and Lifecycle - /// Configuration Elements. + /// This functionality is not supported for directory buckets. /// - ///
    Permissions
    + ///
    Permissions
    • /// - /// By default, all Amazon S3 resources are private, including buckets, objects, and related - /// subresources (for example, lifecycle configuration and website configuration). Only - /// the resource owner (that is, the Amazon Web Services account that created it) can - /// access the resource. The resource owner can optionally grant access permissions to - /// others by writing an access policy. For this operation, a user must get the s3:PutLifecycleConfiguration - /// permission. + /// General purpose bucket permissions - The following permissions are required + /// in your policies when your PutObject request includes specific headers. /// - /// + ///
      • /// - /// You can also explicitly deny permissions. An explicit deny also supersedes any other - /// permissions. If you want to block users or accounts from removing or deleting objects - /// from your bucket, you must deny them permissions for the following actions: + /// s3:PutObject - To successfully complete the PutObject request, + /// you must always have the s3:PutObject permission on a bucket to add an object + /// to it. /// - ///
        • + ///
        • /// - /// s3:DeleteObject + /// s3:PutObjectAcl - To successfully change the objects ACL of your + /// PutObject request, you must have the s3:PutObjectAcl. /// ///
        • /// - /// s3:DeleteObjectVersion + /// s3:PutObjectTagging - To successfully set the tag-set with your PutObject + /// request, you must have the s3:PutObjectTagging. + /// + ///
      • + /// + /// Directory bucket permissions - To grant access to this API operation on a + /// directory bucket, we recommend that you use the + /// CreateSession API operation for session-based authorization. Specifically, + /// you grant the s3express:CreateSession permission to the directory bucket in + /// a bucket policy or an IAM identity-based policy. Then, you make the CreateSession + /// API call on the bucket to obtain a session token. With the session token in your request + /// header, you can make API requests to this operation. After the session token expires, + /// you make another CreateSession API call to generate a new session token for + /// use. Amazon Web Services CLI or SDKs create session and refresh the session token + /// automatically to avoid service interruptions when a session expires. For more information + /// about authorization, see + /// CreateSession . + /// + ///
    Data integrity with Content-MD5
    • + /// + /// General purpose bucket - To ensure that data is not corrupted traversing the + /// network, use the Content-MD5 header. When you use this header, Amazon S3 checks + /// the object against the provided MD5 value and, if they do not match, Amazon S3 returns + /// an error. Alternatively, when the object's ETag is its MD5 digest, you can calculate + /// the MD5 while putting the object to Amazon S3 and compare the returned ETag to the + /// calculated MD5 value. /// ///
    • /// - /// s3:PutLifecycleConfiguration + /// Directory bucket - This functionality is not supported for directory buckets. /// - ///
    + ///
    HTTP Host header syntax
    /// - /// For more information about permissions, see Managing - /// Access Permissions to Your Amazon S3 Resources. + /// Directory buckets - The HTTP Host header syntax is Bucket_name.s3express-az_id.region.amazonaws.com. /// ///
    /// - /// The following operations are related to PutBucketLifecycleConfiguration: + /// For more information about related Amazon S3 APIs, see the following: /// /// ///
    - /// Container for the necessary parameters to execute the PutLifecycleConfiguration service method. + /// Container for the necessary parameters to execute the PutObject service method. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// /// - /// The response from the PutLifecycleConfiguration service method, as returned by S3. - /// REST API Reference for PutLifecycleConfiguration Operation - public virtual PutLifecycleConfigurationResponse PutLifecycleConfiguration(PutLifecycleConfigurationRequest request) + /// The response from the PutObject service method, as returned by S3. + /// REST API Reference for PutObject Operation + public virtual Task PutObjectAsync(PutObjectRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); - options.RequestMarshaller = PutLifecycleConfigurationRequestMarshaller.Instance; - options.ResponseUnmarshaller = PutLifecycleConfigurationResponseUnmarshaller.Instance; - - return Invoke(request, options); + options.RequestMarshaller = PutObjectRequestMarshaller.Instance; + options.ResponseUnmarshaller = PutObjectResponseUnmarshaller.Instance; + + return InvokeAsync(request, options, cancellationToken); } + #endregion + + #region PutObjectAcl + /// /// @@ -24241,496 +24800,474 @@ public virtual PutLifecycleConfigurationResponse PutLifecycleConfiguration(PutLi /// /// /// - /// Creates a new lifecycle configuration for the bucket or replaces an existing lifecycle - /// configuration. Keep in mind that this will overwrite an existing lifecycle configuration, - /// so if you want to retain any configuration details, they must be included in the new - /// lifecycle configuration. For information about lifecycle configuration, see Managing - /// your storage lifecycle. + /// Uses the acl subresource to set the access control list (ACL) permissions for + /// a new or existing object in an S3 bucket. You must have the WRITE_ACP permission + /// to set the ACL of an object. For more information, see What + /// permissions can I grant? in the Amazon S3 User Guide. + /// + /// + /// + /// This functionality is not supported for Amazon S3 on Outposts. + /// + /// + /// + /// Depending on your application needs, you can choose to set the ACL on an object using + /// either the request body or the headers. For example, if you have an existing application + /// that updates a bucket ACL using the request body, you can continue to use that approach. + /// For more information, see Access + /// Control List (ACL) Overview in the Amazon S3 User Guide. + /// + /// + /// + /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, ACLs + /// are disabled and no longer affect permissions. You must use policies to grant access + /// to your bucket and the objects in it. Requests to set ACLs or update ACLs fail and + /// return the AccessControlListNotSupported error code. Requests to read ACLs + /// are still supported. For more information, see Controlling + /// object ownership in the Amazon S3 User Guide. + /// + ///
    Permissions
    + /// + /// You can set access permissions using one of the following methods: + /// + ///
    • + /// + /// Specify a canned ACL with the x-amz-acl request header. Amazon S3 supports + /// a set of predefined ACLs, known as canned ACLs. Each canned ACL has a predefined set + /// of grantees and permissions. Specify the canned ACL name as the value of x-amz-acl. + /// If you use this header, you cannot use other access control-specific headers in your + /// request. For more information, see Canned + /// ACL. + /// + ///
    • + /// + /// Specify access permissions explicitly with the x-amz-grant-read, x-amz-grant-read-acp, + /// x-amz-grant-write-acp, and x-amz-grant-full-control headers. When using + /// these headers, you specify explicit access permissions and grantees (Amazon Web Services + /// accounts or Amazon S3 groups) who will receive the permission. If you use these ACL-specific + /// headers, you cannot use x-amz-acl header to set a canned ACL. These parameters + /// map to the set of permissions that Amazon S3 supports in an ACL. For more information, + /// see Access + /// Control List (ACL) Overview. + /// + /// + /// + /// You specify each grantee as a type=value pair, where the type is one of the following: + /// + ///
      • + /// + /// id – if the value specified is the canonical user ID of an Amazon Web Services + /// account /// - /// + ///
      • /// - /// Bucket lifecycle configuration now supports specifying a lifecycle rule using an object - /// key name prefix, one or more object tags, object size, or any combination of these. - /// Accordingly, this section describes the latest API. The previous version of the API - /// supported filtering based only on an object key name prefix, which is supported for - /// backward compatibility. For the related API description, see PutBucketLifecycle. + /// uri – if you are granting permissions to a predefined group /// - ///
        Rules
        + ///
      • /// - /// You specify the lifecycle configuration in your request body. The lifecycle configuration - /// is specified as XML consisting of one or more rules. An Amazon S3 Lifecycle configuration - /// can have up to 1,000 rules. This limit is not adjustable. Each rule consists of the - /// following: + /// emailAddress – if the value specified is the email address of an Amazon Web + /// Services account + /// + /// + /// + /// Using email addresses to specify a grantee is only supported in the following Amazon + /// Web Services Regions: /// ///
        • /// - /// A filter identifying a subset of objects to which the rule applies. The filter can - /// be based on a key name prefix, object tags, object size, or any combination of these. + /// US East (N. Virginia) /// ///
        • /// - /// A status indicating whether the rule is in effect. + /// US West (N. California) /// ///
        • /// - /// One or more lifecycle transition and expiration actions that you want Amazon S3 to - /// perform on the objects identified by the filter. If the state of your bucket is versioning-enabled - /// or versioning-suspended, you can have many versions of the same object (one current - /// version and zero or more noncurrent versions). Amazon S3 provides predefined actions - /// that you can specify for current and noncurrent object versions. + /// US West (Oregon) /// - ///
        + ///
      • /// - /// For more information, see Object - /// Lifecycle Management and Lifecycle - /// Configuration Elements. + /// Asia Pacific (Singapore) /// - ///
    Permissions
    + ///
  • /// - /// By default, all Amazon S3 resources are private, including buckets, objects, and related - /// subresources (for example, lifecycle configuration and website configuration). Only - /// the resource owner (that is, the Amazon Web Services account that created it) can - /// access the resource. The resource owner can optionally grant access permissions to - /// others by writing an access policy. For this operation, a user must get the s3:PutLifecycleConfiguration - /// permission. + /// Asia Pacific (Sydney) /// - /// + ///
  • /// - /// You can also explicitly deny permissions. An explicit deny also supersedes any other - /// permissions. If you want to block users or accounts from removing or deleting objects - /// from your bucket, you must deny them permissions for the following actions: + /// Asia Pacific (Tokyo) /// - ///
    • + ///
    • /// - /// s3:DeleteObject + /// Europe (Ireland) /// ///
    • /// - /// s3:DeleteObjectVersion + /// South America (São Paulo) /// - ///
    • + ///
    /// - /// s3:PutLifecycleConfiguration + /// For a list of all the Amazon S3 supported Regions and endpoints, see Regions + /// and Endpoints in the Amazon Web Services General Reference. + /// + ///
  • + /// + /// For example, the following x-amz-grant-read header grants list objects permission + /// to the two Amazon Web Services accounts identified by their email addresses. + /// + /// + /// + /// x-amz-grant-read: emailAddress="xyz@amazon.com", emailAddress="abc@amazon.com" + /// /// /// /// - /// For more information about permissions, see Managing - /// Access Permissions to Your Amazon S3 Resources. + /// You can use either a canned ACL or specify access permissions explicitly. You cannot + /// do both. /// - ///
    + ///
    Grantee Values
    /// - /// The following operations are related to PutBucketLifecycleConfiguration: + /// You can specify the person (grantee) to whom you're assigning access rights (using + /// request elements) in the following ways: /// /// - ///
    - /// The name of the bucket for which to set the configuration. - /// A property of PutLifecycleConfigurationRequest used to execute the PutLifecycleConfiguration service method. - /// - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// + /// + /// + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Group"><URI><>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<></URI></Grantee> /// - /// The response from the PutLifecycleConfiguration service method, as returned by S3. - /// REST API Reference for PutLifecycleConfiguration Operation - public virtual Task PutLifecycleConfigurationAsync(string bucketName, LifecycleConfiguration configuration, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) - { - var request = new PutLifecycleConfigurationRequest(); - request.BucketName = bucketName; - request.Configuration = configuration; - return PutLifecycleConfigurationAsync(request, cancellationToken); - } - - - /// - /// + /// + ///
  • /// - /// This operation is not supported by directory buckets. + /// By Email address: /// - /// + /// /// - /// Creates a new lifecycle configuration for the bucket or replaces an existing lifecycle - /// configuration. Keep in mind that this will overwrite an existing lifecycle configuration, - /// so if you want to retain any configuration details, they must be included in the new - /// lifecycle configuration. For information about lifecycle configuration, see Managing - /// your storage lifecycle. + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="AmazonCustomerByEmail"><EmailAddress><>Grantees@email.com<></EmailAddress>lt;/Grantee> + /// /// - /// + /// /// - /// Bucket lifecycle configuration now supports specifying a lifecycle rule using an object - /// key name prefix, one or more object tags, object size, or any combination of these. - /// Accordingly, this section describes the latest API. The previous version of the API - /// supported filtering based only on an object key name prefix, which is supported for - /// backward compatibility. For the related API description, see PutBucketLifecycle. + /// The grantee is resolved to the CanonicalUser and, in a response to a GET Object acl + /// request, appears as the CanonicalUser. /// - ///
    Rules
    + /// /// - /// You specify the lifecycle configuration in your request body. The lifecycle configuration - /// is specified as XML consisting of one or more rules. An Amazon S3 Lifecycle configuration - /// can have up to 1,000 rules. This limit is not adjustable. Each rule consists of the - /// following: + /// Using email addresses to specify a grantee is only supported in the following Amazon + /// Web Services Regions: /// ///
    • /// - /// A filter identifying a subset of objects to which the rule applies. The filter can - /// be based on a key name prefix, object tags, object size, or any combination of these. + /// US East (N. Virginia) /// ///
    • /// - /// A status indicating whether the rule is in effect. + /// US West (N. California) /// ///
    • /// - /// One or more lifecycle transition and expiration actions that you want Amazon S3 to - /// perform on the objects identified by the filter. If the state of your bucket is versioning-enabled - /// or versioning-suspended, you can have many versions of the same object (one current - /// version and zero or more noncurrent versions). Amazon S3 provides predefined actions - /// that you can specify for current and noncurrent object versions. - /// - ///
    - /// - /// For more information, see Object - /// Lifecycle Management and Lifecycle - /// Configuration Elements. + /// US West (Oregon) /// - ///
    Permissions
    + ///
  • /// - /// By default, all Amazon S3 resources are private, including buckets, objects, and related - /// subresources (for example, lifecycle configuration and website configuration). Only - /// the resource owner (that is, the Amazon Web Services account that created it) can - /// access the resource. The resource owner can optionally grant access permissions to - /// others by writing an access policy. For this operation, a user must get the s3:PutLifecycleConfiguration - /// permission. + /// Asia Pacific (Singapore) /// - /// + ///
  • /// - /// You can also explicitly deny permissions. An explicit deny also supersedes any other - /// permissions. If you want to block users or accounts from removing or deleting objects - /// from your bucket, you must deny them permissions for the following actions: + /// Asia Pacific (Sydney) /// - ///
    • + ///
    • /// - /// s3:DeleteObject + /// Asia Pacific (Tokyo) /// ///
    • /// - /// s3:DeleteObjectVersion + /// Europe (Ireland) /// ///
    • /// - /// s3:PutLifecycleConfiguration + /// South America (São Paulo) /// ///
    /// - /// For more information about permissions, see Managing - /// Access Permissions to Your Amazon S3 Resources. + /// For a list of all the Amazon S3 supported Regions and endpoints, see Regions + /// and Endpoints in the Amazon Web Services General Reference. /// - /// + ///
  • Versioning
    /// - /// The following operations are related to PutBucketLifecycleConfiguration: + /// The ACL of an object is set at the object version level. By default, PUT sets the + /// ACL of the current version of an object. To set the ACL of a different version, use + /// the versionId subresource. /// - ///
    • + ///
    /// - /// Examples - /// of Lifecycle Configuration + /// The following operations are related to PutObjectAcl: /// - ///
  • + /// ///
  • - /// Container for the necessary parameters to execute the PutLifecycleConfiguration service method. - /// - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// + /// Container for the necessary parameters to execute the PutObjectAcl service method. /// - /// The response from the PutLifecycleConfiguration service method, as returned by S3. - /// REST API Reference for PutLifecycleConfiguration Operation - public virtual Task PutLifecycleConfigurationAsync(PutLifecycleConfigurationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) + /// The response from the PutObjectAcl service method, as returned by S3. + /// REST API Reference for PutObjectAcl Operation + public virtual PutObjectAclResponse PutObjectAcl(PutObjectAclRequest request) { var options = new InvokeOptions(); - options.RequestMarshaller = PutLifecycleConfigurationRequestMarshaller.Instance; - options.ResponseUnmarshaller = PutLifecycleConfigurationResponseUnmarshaller.Instance; - - return InvokeAsync(request, options, cancellationToken); - } + options.RequestMarshaller = PutObjectAclRequestMarshaller.Instance; + options.ResponseUnmarshaller = PutObjectAclResponseUnmarshaller.Instance; - #endregion - - #region PutObject + return Invoke(request, options); + } /// - /// Adds an object to a bucket. - /// - ///
    • + /// + /// + /// This operation is not supported by directory buckets. + /// + /// + /// + /// Uses the acl subresource to set the access control list (ACL) permissions for + /// a new or existing object in an S3 bucket. You must have the WRITE_ACP permission + /// to set the ACL of an object. For more information, see What + /// permissions can I grant? in the Amazon S3 User Guide. + /// + /// + /// + /// This functionality is not supported for Amazon S3 on Outposts. + /// + /// + /// + /// Depending on your application needs, you can choose to set the ACL on an object using + /// either the request body or the headers. For example, if you have an existing application + /// that updates a bucket ACL using the request body, you can continue to use that approach. + /// For more information, see Access + /// Control List (ACL) Overview in the Amazon S3 User Guide. + /// + /// + /// + /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, ACLs + /// are disabled and no longer affect permissions. You must use policies to grant access + /// to your bucket and the objects in it. Requests to set ACLs or update ACLs fail and + /// return the AccessControlListNotSupported error code. Requests to read ACLs + /// are still supported. For more information, see Controlling + /// object ownership in the Amazon S3 User Guide. + /// + ///
      Permissions
      + /// + /// You can set access permissions using one of the following methods: + /// + ///
      • + /// + /// Specify a canned ACL with the x-amz-acl request header. Amazon S3 supports + /// a set of predefined ACLs, known as canned ACLs. Each canned ACL has a predefined set + /// of grantees and permissions. Specify the canned ACL name as the value of x-amz-acl. + /// If you use this header, you cannot use other access control-specific headers in your + /// request. For more information, see Canned + /// ACL. + /// + ///
      • /// - /// Amazon S3 never adds partial objects; if you receive a success response, Amazon S3 - /// added the entire object to the bucket. You cannot use PutObject to only update - /// a single piece of metadata for an existing object. You must put the entire object - /// with updated metadata if you want to update some values. + /// Specify access permissions explicitly with the x-amz-grant-read, x-amz-grant-read-acp, + /// x-amz-grant-write-acp, and x-amz-grant-full-control headers. When using + /// these headers, you specify explicit access permissions and grantees (Amazon Web Services + /// accounts or Amazon S3 groups) who will receive the permission. If you use these ACL-specific + /// headers, you cannot use x-amz-acl header to set a canned ACL. These parameters + /// map to the set of permissions that Amazon S3 supports in an ACL. For more information, + /// see Access + /// Control List (ACL) Overview. + /// + /// + /// + /// You specify each grantee as a type=value pair, where the type is one of the following: + /// + ///
        • + /// + /// id – if the value specified is the canonical user ID of an Amazon Web Services + /// account /// ///
        • /// - /// If your bucket uses the bucket owner enforced setting for Object Ownership, ACLs are - /// disabled and no longer affect permissions. All objects written to the bucket by any - /// account will be owned by the bucket owner. + /// uri – if you are granting permissions to a predefined group /// ///
        • /// - /// Directory buckets - For directory buckets, you must make requests for this - /// API operation to the Zonal endpoint. These endpoints support virtual-hosted-style - /// requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name - /// . Path-style requests are not supported. For more information, see Regional - /// and Zonal endpoints in the Amazon S3 User Guide. + /// emailAddress – if the value specified is the email address of an Amazon Web + /// Services account /// - ///
        + /// /// - /// Amazon S3 is a distributed system. If it receives multiple write requests for the - /// same object simultaneously, it overwrites all but the last object written. However, - /// Amazon S3 provides features that can modify this behavior: + /// Using email addresses to specify a grantee is only supported in the following Amazon + /// Web Services Regions: /// ///
        • /// - /// S3 Object Lock - To prevent objects from being deleted or overwritten, you - /// can use Amazon - /// S3 Object Lock in the Amazon S3 User Guide. + /// US East (N. Virginia) /// - /// + ///
        • /// - /// This functionality is not supported for directory buckets. + /// US West (N. California) /// - ///
        • + ///
        • /// - /// S3 Versioning - When you enable versioning for a bucket, if Amazon S3 receives - /// multiple write requests for the same object simultaneously, it stores all versions - /// of the objects. For each write request that is made to the same object, Amazon S3 - /// automatically generates a unique version ID of that object being stored in Amazon - /// S3. You can retrieve, replace, or delete any version of the object. For more information - /// about versioning, see Adding - /// Objects to Versioning-Enabled Buckets in the Amazon S3 User Guide. For - /// information about returning the versioning state of a bucket, see GetBucketVersioning. - /// + /// US West (Oregon) /// - /// + ///
        • /// - /// This functionality is not supported for directory buckets. + /// Asia Pacific (Singapore) /// - ///
        Permissions
        • + ///
        • /// - /// General purpose bucket permissions - The following permissions are required - /// in your policies when your PutObject request includes specific headers. + /// Asia Pacific (Sydney) /// - ///
          • + ///
          • /// - /// s3:PutObject - To successfully complete the PutObject request, - /// you must always have the s3:PutObject permission on a bucket to add an object - /// to it. + /// Asia Pacific (Tokyo) /// ///
          • /// - /// s3:PutObjectAcl - To successfully change the objects ACL of your - /// PutObject request, you must have the s3:PutObjectAcl. + /// Europe (Ireland) /// ///
          • /// - /// s3:PutObjectTagging - To successfully set the tag-set with your PutObject - /// request, you must have the s3:PutObjectTagging. + /// South America (São Paulo) /// - ///
        • + ///
        /// - /// Directory bucket permissions - To grant access to this API operation on a - /// directory bucket, we recommend that you use the - /// CreateSession API operation for session-based authorization. Specifically, - /// you grant the s3express:CreateSession permission to the directory bucket in - /// a bucket policy or an IAM identity-based policy. Then, you make the CreateSession - /// API call on the bucket to obtain a session token. With the session token in your request - /// header, you can make API requests to this operation. After the session token expires, - /// you make another CreateSession API call to generate a new session token for - /// use. Amazon Web Services CLI or SDKs create session and refresh the session token - /// automatically to avoid service interruptions when a session expires. For more information - /// about authorization, see - /// CreateSession . + /// For a list of all the Amazon S3 supported Regions and endpoints, see Regions + /// and Endpoints in the Amazon Web Services General Reference. /// - ///
      Data integrity with Content-MD5
      • + ///
      /// - /// General purpose bucket - To ensure that data is not corrupted traversing the - /// network, use the Content-MD5 header. When you use this header, Amazon S3 checks - /// the object against the provided MD5 value and, if they do not match, Amazon S3 returns - /// an error. Alternatively, when the object's ETag is its MD5 digest, you can calculate - /// the MD5 while putting the object to Amazon S3 and compare the returned ETag to the - /// calculated MD5 value. + /// For example, the following x-amz-grant-read header grants list objects permission + /// to the two Amazon Web Services accounts identified by their email addresses. /// - ///
    • + /// /// - /// Directory bucket - This functionality is not supported for directory buckets. + /// x-amz-grant-read: emailAddress="xyz@amazon.com", emailAddress="abc@amazon.com" + /// /// - ///
    HTTP Host header syntax
    + /// /// - /// Directory buckets - The HTTP Host header syntax is Bucket_name.s3express-az_id.region.amazonaws.com. + /// You can use either a canned ACL or specify access permissions explicitly. You cannot + /// do both. /// - ///
    + ///
    Grantee Values
    /// - /// For more information about related Amazon S3 APIs, see the following: + /// You can specify the person (grantee) to whom you're assigning access rights (using + /// request elements) in the following ways: /// ///
    • /// - /// CopyObject - /// + /// By the person's ID: /// - ///
    • + /// /// - /// DeleteObject - /// + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"><ID><>ID<></ID><DisplayName><>GranteesEmail<></DisplayName> + /// </Grantee> /// - ///
    - ///
    - /// Container for the necessary parameters to execute the PutObject service method. - /// - /// The response from the PutObject service method, as returned by S3. - /// REST API Reference for PutObject Operation - public virtual PutObjectResponse PutObject(PutObjectRequest request) - { - var options = new InvokeOptions(); - options.RequestMarshaller = PutObjectRequestMarshaller.Instance; - options.ResponseUnmarshaller = PutObjectResponseUnmarshaller.Instance; - - return Invoke(request, options); - } - - - /// - /// Adds an object to a bucket. - /// - ///
    • + /// /// - /// Amazon S3 never adds partial objects; if you receive a success response, Amazon S3 - /// added the entire object to the bucket. You cannot use PutObject to only update - /// a single piece of metadata for an existing object. You must put the entire object - /// with updated metadata if you want to update some values. + /// DisplayName is optional and ignored in the request. /// ///
    • /// - /// If your bucket uses the bucket owner enforced setting for Object Ownership, ACLs are - /// disabled and no longer affect permissions. All objects written to the bucket by any - /// account will be owned by the bucket owner. + /// By URI: + /// + /// + /// + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Group"><URI><>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<></URI></Grantee> + /// /// ///
    • /// - /// Directory buckets - For directory buckets, you must make requests for this - /// API operation to the Zonal endpoint. These endpoints support virtual-hosted-style - /// requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name - /// . Path-style requests are not supported. For more information, see Regional - /// and Zonal endpoints in the Amazon S3 User Guide. + /// By Email address: /// - ///
    + /// /// - /// Amazon S3 is a distributed system. If it receives multiple write requests for the - /// same object simultaneously, it overwrites all but the last object written. However, - /// Amazon S3 provides features that can modify this behavior: + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="AmazonCustomerByEmail"><EmailAddress><>Grantees@email.com<></EmailAddress>lt;/Grantee> + /// /// - ///
    • + /// /// - /// S3 Object Lock - To prevent objects from being deleted or overwritten, you - /// can use Amazon - /// S3 Object Lock in the Amazon S3 User Guide. + /// The grantee is resolved to the CanonicalUser and, in a response to a GET Object acl + /// request, appears as the CanonicalUser. /// /// /// - /// This functionality is not supported for directory buckets. + /// Using email addresses to specify a grantee is only supported in the following Amazon + /// Web Services Regions: /// - ///
    • + ///
      • /// - /// S3 Versioning - When you enable versioning for a bucket, if Amazon S3 receives - /// multiple write requests for the same object simultaneously, it stores all versions - /// of the objects. For each write request that is made to the same object, Amazon S3 - /// automatically generates a unique version ID of that object being stored in Amazon - /// S3. You can retrieve, replace, or delete any version of the object. For more information - /// about versioning, see Adding - /// Objects to Versioning-Enabled Buckets in the Amazon S3 User Guide. For - /// information about returning the versioning state of a bucket, see GetBucketVersioning. - /// + /// US East (N. Virginia) /// - /// + ///
      • /// - /// This functionality is not supported for directory buckets. + /// US West (N. California) /// - ///
      Permissions
      • + ///
      • /// - /// General purpose bucket permissions - The following permissions are required - /// in your policies when your PutObject request includes specific headers. + /// US West (Oregon) /// - ///
        • + ///
        • /// - /// s3:PutObject - To successfully complete the PutObject request, - /// you must always have the s3:PutObject permission on a bucket to add an object - /// to it. + /// Asia Pacific (Singapore) /// ///
        • /// - /// s3:PutObjectAcl - To successfully change the objects ACL of your - /// PutObject request, you must have the s3:PutObjectAcl. + /// Asia Pacific (Sydney) /// ///
        • /// - /// s3:PutObjectTagging - To successfully set the tag-set with your PutObject - /// request, you must have the s3:PutObjectTagging. + /// Asia Pacific (Tokyo) /// - ///
      • + ///
      • /// - /// Directory bucket permissions - To grant access to this API operation on a - /// directory bucket, we recommend that you use the - /// CreateSession API operation for session-based authorization. Specifically, - /// you grant the s3express:CreateSession permission to the directory bucket in - /// a bucket policy or an IAM identity-based policy. Then, you make the CreateSession - /// API call on the bucket to obtain a session token. With the session token in your request - /// header, you can make API requests to this operation. After the session token expires, - /// you make another CreateSession API call to generate a new session token for - /// use. Amazon Web Services CLI or SDKs create session and refresh the session token - /// automatically to avoid service interruptions when a session expires. For more information - /// about authorization, see - /// CreateSession . + /// Europe (Ireland) /// - ///
      Data integrity with Content-MD5
      • + ///
      • /// - /// General purpose bucket - To ensure that data is not corrupted traversing the - /// network, use the Content-MD5 header. When you use this header, Amazon S3 checks - /// the object against the provided MD5 value and, if they do not match, Amazon S3 returns - /// an error. Alternatively, when the object's ETag is its MD5 digest, you can calculate - /// the MD5 while putting the object to Amazon S3 and compare the returned ETag to the - /// calculated MD5 value. + /// South America (São Paulo) /// - ///
      • + ///
      /// - /// Directory bucket - This functionality is not supported for directory buckets. + /// For a list of all the Amazon S3 supported Regions and endpoints, see Regions + /// and Endpoints in the Amazon Web Services General Reference. /// - ///
    HTTP Host header syntax
    + ///
    Versioning
    /// - /// Directory buckets - The HTTP Host header syntax is Bucket_name.s3express-az_id.region.amazonaws.com. + /// The ACL of an object is set at the object version level. By default, PUT sets the + /// ACL of the current version of an object. To set the ACL of a different version, use + /// the versionId subresource. /// ///
    /// - /// For more information about related Amazon S3 APIs, see the following: + /// The following operations are related to PutObjectAcl: /// ///
    • /// @@ -24739,25 +25276,25 @@ public virtual PutObjectResponse PutObject(PutObjectRequest request) /// ///
    • /// - /// DeleteObject + /// GetObject /// /// ///
    ///
    - /// Container for the necessary parameters to execute the PutObject service method. + /// Container for the necessary parameters to execute the PutObjectAcl service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// - /// The response from the PutObject service method, as returned by S3. - /// REST API Reference for PutObject Operation - public virtual Task PutObjectAsync(PutObjectRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) + /// The response from the PutObjectAcl service method, as returned by S3. + /// REST API Reference for PutObjectAcl Operation + public virtual Task PutObjectAclAsync(PutObjectAclRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); - options.RequestMarshaller = PutObjectRequestMarshaller.Instance; - options.ResponseUnmarshaller = PutObjectResponseUnmarshaller.Instance; + options.RequestMarshaller = PutObjectAclRequestMarshaller.Instance; + options.ResponseUnmarshaller = PutObjectAclResponseUnmarshaller.Instance; - return InvokeAsync(request, options, cancellationToken); + return InvokeAsync(request, options, cancellationToken); } #endregion diff --git a/sdk/src/Services/S3/Generated/_bcl/IAmazonS3.cs b/sdk/src/Services/S3/Generated/_bcl/IAmazonS3.cs index 128092b42c17..9d252be85d72 100644 --- a/sdk/src/Services/S3/Generated/_bcl/IAmazonS3.cs +++ b/sdk/src/Services/S3/Generated/_bcl/IAmazonS3.cs @@ -6626,227 +6626,6 @@ public partial interface IAmazonS3 : IAmazonService, IDisposable #endregion - #region GetACL - - - /// - /// - /// - /// This operation is not supported by directory buckets. - /// - /// - /// - /// This implementation of the GET action uses the acl subresource to return - /// the access control list (ACL) of a bucket. To use GET to return the ACL of - /// the bucket, you must have the READ_ACP access to the bucket. If READ_ACP - /// permission is granted to the anonymous user, you can return the ACL of the bucket - /// without using an authorization header. - /// - /// - /// - /// When you use this API operation with an access point, provide the alias of the access - /// point in place of the bucket name. - /// - /// - /// - /// When you use this API operation with an Object Lambda access point, provide the alias - /// of the Object Lambda access point in place of the bucket name. If the Object Lambda - /// access point alias in a request is not valid, the error code InvalidAccessPointAliasError - /// is returned. For more information about InvalidAccessPointAliasError, see List - /// of Error Codes. - /// - /// - /// - /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, requests - /// to read ACLs are still supported and return the bucket-owner-full-control ACL - /// with the owner being the account that created the bucket. For more information, see - /// - /// Controlling object ownership and disabling ACLs in the Amazon S3 User Guide. - /// - /// - /// - /// The following operations are related to GetBucketAcl: - /// - /// - /// - /// Specifies the S3 bucket whose ACL is being requested. When you use this API operation with an access point, provide the alias of the access point in place of the bucket name. When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. For more information about InvalidAccessPointAliasError, see List of Error Codes. - /// - /// The response from the GetACL service method, as returned by S3. - /// REST API Reference for GetACL Operation - GetACLResponse GetACL(string bucketName); - - /// - /// - /// - /// This operation is not supported by directory buckets. - /// - /// - /// - /// This implementation of the GET action uses the acl subresource to return - /// the access control list (ACL) of a bucket. To use GET to return the ACL of - /// the bucket, you must have the READ_ACP access to the bucket. If READ_ACP - /// permission is granted to the anonymous user, you can return the ACL of the bucket - /// without using an authorization header. - /// - /// - /// - /// When you use this API operation with an access point, provide the alias of the access - /// point in place of the bucket name. - /// - /// - /// - /// When you use this API operation with an Object Lambda access point, provide the alias - /// of the Object Lambda access point in place of the bucket name. If the Object Lambda - /// access point alias in a request is not valid, the error code InvalidAccessPointAliasError - /// is returned. For more information about InvalidAccessPointAliasError, see List - /// of Error Codes. - /// - /// - /// - /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, requests - /// to read ACLs are still supported and return the bucket-owner-full-control ACL - /// with the owner being the account that created the bucket. For more information, see - /// - /// Controlling object ownership and disabling ACLs in the Amazon S3 User Guide. - /// - /// - /// - /// The following operations are related to GetBucketAcl: - /// - /// - /// - /// Container for the necessary parameters to execute the GetACL service method. - /// - /// The response from the GetACL service method, as returned by S3. - /// REST API Reference for GetACL Operation - GetACLResponse GetACL(GetACLRequest request); - - - /// - /// - /// - /// This operation is not supported by directory buckets. - /// - /// - /// - /// This implementation of the GET action uses the acl subresource to return - /// the access control list (ACL) of a bucket. To use GET to return the ACL of - /// the bucket, you must have the READ_ACP access to the bucket. If READ_ACP - /// permission is granted to the anonymous user, you can return the ACL of the bucket - /// without using an authorization header. - /// - /// - /// - /// When you use this API operation with an access point, provide the alias of the access - /// point in place of the bucket name. - /// - /// - /// - /// When you use this API operation with an Object Lambda access point, provide the alias - /// of the Object Lambda access point in place of the bucket name. If the Object Lambda - /// access point alias in a request is not valid, the error code InvalidAccessPointAliasError - /// is returned. For more information about InvalidAccessPointAliasError, see List - /// of Error Codes. - /// - /// - /// - /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, requests - /// to read ACLs are still supported and return the bucket-owner-full-control ACL - /// with the owner being the account that created the bucket. For more information, see - /// - /// Controlling object ownership and disabling ACLs in the Amazon S3 User Guide. - /// - /// - /// - /// The following operations are related to GetBucketAcl: - /// - /// - /// - /// Specifies the S3 bucket whose ACL is being requested. When you use this API operation with an access point, provide the alias of the access point in place of the bucket name. When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. For more information about InvalidAccessPointAliasError, see List of Error Codes. - /// - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// - /// - /// The response from the GetACL service method, as returned by S3. - /// REST API Reference for GetACL Operation - Task GetACLAsync(string bucketName, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); - - - /// - /// - /// - /// This operation is not supported by directory buckets. - /// - /// - /// - /// This implementation of the GET action uses the acl subresource to return - /// the access control list (ACL) of a bucket. To use GET to return the ACL of - /// the bucket, you must have the READ_ACP access to the bucket. If READ_ACP - /// permission is granted to the anonymous user, you can return the ACL of the bucket - /// without using an authorization header. - /// - /// - /// - /// When you use this API operation with an access point, provide the alias of the access - /// point in place of the bucket name. - /// - /// - /// - /// When you use this API operation with an Object Lambda access point, provide the alias - /// of the Object Lambda access point in place of the bucket name. If the Object Lambda - /// access point alias in a request is not valid, the error code InvalidAccessPointAliasError - /// is returned. For more information about InvalidAccessPointAliasError, see List - /// of Error Codes. - /// - /// - /// - /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, requests - /// to read ACLs are still supported and return the bucket-owner-full-control ACL - /// with the owner being the account that created the bucket. For more information, see - /// - /// Controlling object ownership and disabling ACLs in the Amazon S3 User Guide. - /// - /// - /// - /// The following operations are related to GetBucketAcl: - /// - /// - /// - /// Container for the necessary parameters to execute the GetACL service method. - /// - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// - /// - /// The response from the GetACL service method, as returned by S3. - /// REST API Reference for GetACL Operation - Task GetACLAsync(GetACLRequest request, CancellationToken cancellationToken = default(CancellationToken)); - - #endregion - #region GetBucketAccelerateConfiguration @@ -7076,7 +6855,7 @@ public partial interface IAmazonS3 : IAmazonService, IDisposable #endregion - #region GetBucketAnalyticsConfiguration + #region GetBucketAcl /// @@ -7086,49 +6865,50 @@ public partial interface IAmazonS3 : IAmazonService, IDisposable /// /// /// - /// This implementation of the GET action returns an analytics configuration (identified - /// by the analytics configuration ID) from the bucket. - /// - /// - /// - /// To use this operation, you must have permissions to perform the s3:GetAnalyticsConfiguration - /// action. The bucket owner has this permission by default. The bucket owner can grant - /// this permission to others. For more information about permissions, see - /// Permissions Related to Bucket Subresource Operations and Managing - /// Access Permissions to Your Amazon S3 Resources in the Amazon S3 User Guide. - /// + /// This implementation of the GET action uses the acl subresource to return + /// the access control list (ACL) of a bucket. To use GET to return the ACL of + /// the bucket, you must have the READ_ACP access to the bucket. If READ_ACP + /// permission is granted to the anonymous user, you can return the ACL of the bucket + /// without using an authorization header. /// /// /// - /// For information about Amazon S3 analytics feature, see Amazon - /// S3 Analytics – Storage Class Analysis in the Amazon S3 User Guide. + /// When you use this API operation with an access point, provide the alias of the access + /// point in place of the bucket name. /// /// /// - /// The following operations are related to GetBucketAnalyticsConfiguration: + /// When you use this API operation with an Object Lambda access point, provide the alias + /// of the Object Lambda access point in place of the bucket name. If the Object Lambda + /// access point alias in a request is not valid, the error code InvalidAccessPointAliasError + /// is returned. For more information about InvalidAccessPointAliasError, see List + /// of Error Codes. /// - /// - /// Container for the necessary parameters to execute the GetBucketAnalyticsConfiguration service method. + /// Container for the necessary parameters to execute the GetBucketAcl service method. /// - /// The response from the GetBucketAnalyticsConfiguration service method, as returned by S3. - /// REST API Reference for GetBucketAnalyticsConfiguration Operation - GetBucketAnalyticsConfigurationResponse GetBucketAnalyticsConfiguration(GetBucketAnalyticsConfigurationRequest request); + /// The response from the GetBucketAcl service method, as returned by S3. + /// REST API Reference for GetBucketAcl Operation + GetBucketAclResponse GetBucketAcl(GetBucketAclRequest request); @@ -7139,8 +6919,121 @@ public partial interface IAmazonS3 : IAmazonService, IDisposable ///
    /// /// - /// This implementation of the GET action returns an analytics configuration (identified - /// by the analytics configuration ID) from the bucket. + /// This implementation of the GET action uses the acl subresource to return + /// the access control list (ACL) of a bucket. To use GET to return the ACL of + /// the bucket, you must have the READ_ACP access to the bucket. If READ_ACP + /// permission is granted to the anonymous user, you can return the ACL of the bucket + /// without using an authorization header. + /// + /// + /// + /// When you use this API operation with an access point, provide the alias of the access + /// point in place of the bucket name. + /// + /// + /// + /// When you use this API operation with an Object Lambda access point, provide the alias + /// of the Object Lambda access point in place of the bucket name. If the Object Lambda + /// access point alias in a request is not valid, the error code InvalidAccessPointAliasError + /// is returned. For more information about InvalidAccessPointAliasError, see List + /// of Error Codes. + /// + /// + /// + /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, requests + /// to read ACLs are still supported and return the bucket-owner-full-control ACL + /// with the owner being the account that created the bucket. For more information, see + /// + /// Controlling object ownership and disabling ACLs in the Amazon S3 User Guide. + /// + /// + /// + /// The following operations are related to GetBucketAcl: + /// + /// + /// + /// Container for the necessary parameters to execute the GetBucketAcl service method. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// + /// The response from the GetBucketAcl service method, as returned by S3. + /// REST API Reference for GetBucketAcl Operation + Task GetBucketAclAsync(GetBucketAclRequest request, CancellationToken cancellationToken = default(CancellationToken)); + + #endregion + + #region GetBucketAnalyticsConfiguration + + + /// + /// + /// + /// This operation is not supported by directory buckets. + /// + /// + /// + /// This implementation of the GET action returns an analytics configuration (identified + /// by the analytics configuration ID) from the bucket. + /// + /// + /// + /// To use this operation, you must have permissions to perform the s3:GetAnalyticsConfiguration + /// action. The bucket owner has this permission by default. The bucket owner can grant + /// this permission to others. For more information about permissions, see + /// Permissions Related to Bucket Subresource Operations and Managing + /// Access Permissions to Your Amazon S3 Resources in the Amazon S3 User Guide. + /// + /// + /// + /// + /// For information about Amazon S3 analytics feature, see Amazon + /// S3 Analytics – Storage Class Analysis in the Amazon S3 User Guide. + /// + /// + /// + /// The following operations are related to GetBucketAnalyticsConfiguration: + /// + /// + /// + /// Container for the necessary parameters to execute the GetBucketAnalyticsConfiguration service method. + /// + /// The response from the GetBucketAnalyticsConfiguration service method, as returned by S3. + /// REST API Reference for GetBucketAnalyticsConfiguration Operation + GetBucketAnalyticsConfigurationResponse GetBucketAnalyticsConfiguration(GetBucketAnalyticsConfigurationRequest request); + + + + /// + /// + /// + /// This operation is not supported by directory buckets. + /// + /// + /// + /// This implementation of the GET action returns an analytics configuration (identified + /// by the analytics configuration ID) from the bucket. /// /// /// @@ -11133,6 +11026,140 @@ public partial interface IAmazonS3 : IAmazonService, IDisposable #endregion + #region GetObjectAcl + + + /// + /// + /// + /// This operation is not supported by directory buckets. + /// + /// + /// + /// Returns the access control list (ACL) of an object. To use this operation, you must + /// have s3:GetObjectAcl permissions or READ_ACP access to the object. For + /// more information, see Mapping + /// of ACL permissions and access policy permissions in the Amazon S3 User Guide + /// + /// + /// + /// + /// This functionality is not supported for Amazon S3 on Outposts. + /// + /// + /// + /// By default, GET returns ACL information about the current version of an object. To + /// return ACL information about a different version, use the versionId subresource. + /// + /// + /// + /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, requests + /// to read ACLs are still supported and return the bucket-owner-full-control ACL + /// with the owner being the account that created the bucket. For more information, see + /// + /// Controlling object ownership and disabling ACLs in the Amazon S3 User Guide. + /// + /// + /// + /// The following operations are related to GetObjectAcl: + /// + /// + /// + /// Container for the necessary parameters to execute the GetObjectAcl service method. + /// + /// The response from the GetObjectAcl service method, as returned by S3. + /// REST API Reference for GetObjectAcl Operation + GetObjectAclResponse GetObjectAcl(GetObjectAclRequest request); + + + + /// + /// + /// + /// This operation is not supported by directory buckets. + /// + /// + /// + /// Returns the access control list (ACL) of an object. To use this operation, you must + /// have s3:GetObjectAcl permissions or READ_ACP access to the object. For + /// more information, see Mapping + /// of ACL permissions and access policy permissions in the Amazon S3 User Guide + /// + /// + /// + /// + /// This functionality is not supported for Amazon S3 on Outposts. + /// + /// + /// + /// By default, GET returns ACL information about the current version of an object. To + /// return ACL information about a different version, use the versionId subresource. + /// + /// + /// + /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, requests + /// to read ACLs are still supported and return the bucket-owner-full-control ACL + /// with the owner being the account that created the bucket. For more information, see + /// + /// Controlling object ownership and disabling ACLs in the Amazon S3 User Guide. + /// + /// + /// + /// The following operations are related to GetObjectAcl: + /// + /// + /// + /// Container for the necessary parameters to execute the GetObjectAcl service method. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// + /// The response from the GetObjectAcl service method, as returned by S3. + /// REST API Reference for GetObjectAcl Operation + Task GetObjectAclAsync(GetObjectAclRequest request, CancellationToken cancellationToken = default(CancellationToken)); + + #endregion + #region GetObjectAttributes @@ -16873,31 +16900,786 @@ public partial interface IAmazonS3 : IAmazonService, IDisposable #endregion - #region PutACL + #region PutBucket /// /// /// - /// This operation is not supported by directory buckets. + /// This action creates an Amazon S3 bucket. To create an Amazon S3 on Outposts bucket, + /// see + /// CreateBucket . /// /// /// - /// Sets the permissions on an existing bucket using access control lists (ACL). For more - /// information, see Using - /// ACLs. To set the ACL of a bucket, you must have the WRITE_ACP permission. + /// Creates a new S3 bucket. To create a bucket, you must set up Amazon S3 and have a + /// valid Amazon Web Services Access Key ID to authenticate requests. Anonymous requests + /// are never allowed to create buckets. By creating the bucket, you become the bucket + /// owner. /// /// /// - /// You can use one of the following two ways to set a bucket's permissions: + /// There are two types of buckets: general purpose buckets and directory buckets. For + /// more information about these bucket types, see Creating, + /// configuring, and working with Amazon S3 buckets in the Amazon S3 User Guide. /// - ///
    • + ///
      • /// - /// Specify the ACL in the request body + /// General purpose buckets - If you send your CreateBucket request to + /// the s3.amazonaws.com global endpoint, the request goes to the us-east-1 + /// Region. So the signature calculations in Signature Version 4 must use us-east-1 + /// as the Region, even if the location constraint in the request specifies another Region + /// where the bucket is to be created. If you create a bucket in a Region other than US + /// East (N. Virginia), your application must be able to handle 307 redirect. For more + /// information, see Virtual + /// hosting of buckets in the Amazon S3 User Guide. /// ///
      • /// - /// Specify permissions using request headers + /// Directory buckets - For directory buckets, you must make requests for this + /// API operation to the Regional endpoint. These endpoints support path-style requests + /// in the format https://s3express-control.region_code.amazonaws.com/bucket-name + /// . Virtual-hosted-style requests aren't supported. For more information, see Regional + /// and Zonal endpoints in the Amazon S3 User Guide. + /// + ///
      Permissions
      • + /// + /// General purpose bucket permissions - In addition to the s3:CreateBucket + /// permission, the following permissions are required in a policy when your CreateBucket + /// request includes specific headers: + /// + ///
        • + /// + /// Access control lists (ACLs) - In your CreateBucket request, if you + /// specify an access control list (ACL) and set it to public-read, public-read-write, + /// authenticated-read, or if you explicitly specify any other custom ACLs, both + /// s3:CreateBucket and s3:PutBucketAcl permissions are required. In your + /// CreateBucket request, if you set the ACL to private, or if you don't + /// specify any ACLs, only the s3:CreateBucket permission is required. + /// + ///
        • + /// + /// Object Lock - In your CreateBucket request, if you set x-amz-bucket-object-lock-enabled + /// to true, the s3:PutBucketObjectLockConfiguration and s3:PutBucketVersioning + /// permissions are required. + /// + ///
        • + /// + /// S3 Object Ownership - If your CreateBucket request includes the x-amz-object-ownership + /// header, then the s3:PutBucketOwnershipControls permission is required. + /// + /// + /// + /// To set an ACL on a bucket as part of a CreateBucket request, you must explicitly + /// set S3 Object Ownership for the bucket to a different value than the default, BucketOwnerEnforced. + /// Additionally, if your desired bucket ACL grants public access, you must first create + /// the bucket (without the bucket ACL) and then explicitly disable Block Public Access + /// on the bucket before using PutBucketAcl to set the ACL. If you try to create + /// a bucket with a public ACL, the request will fail. + /// + /// + /// + /// For the majority of modern use cases in S3, we recommend that you keep all Block + /// Public Access settings enabled and keep ACLs disabled. If you would like to share + /// data with users outside of your account, you can use bucket policies as needed. For + /// more information, see Controlling + /// ownership of objects and disabling ACLs for your bucket and Blocking + /// public access to your Amazon S3 storage in the Amazon S3 User Guide. + /// + ///
        • + /// + /// S3 Block Public Access - If your specific use case requires granting public + /// access to your S3 resources, you can disable Block Public Access. Specifically, you + /// can create a new bucket with Block Public Access enabled, then separately call the + /// + /// DeletePublicAccessBlock API. To use this operation, you must have the + /// s3:PutBucketPublicAccessBlock permission. For more information about S3 Block + /// Public Access, see Blocking + /// public access to your Amazon S3 storage in the Amazon S3 User Guide. + /// + ///
      • + /// + /// Directory bucket permissions - You must have the s3express:CreateBucket + /// permission in an IAM identity-based policy instead of a bucket policy. Cross-account + /// access to this API operation isn't supported. This operation can only be performed + /// by the Amazon Web Services account that owns the resource. For more information about + /// directory bucket policies and permissions, see Amazon + /// Web Services Identity and Access Management (IAM) for S3 Express One Zone in the + /// Amazon S3 User Guide. + /// + /// + /// + /// The permissions for ACLs, Object Lock, S3 Object Ownership, and S3 Block Public Access + /// are not supported for directory buckets. For directory buckets, all Block Public Access + /// settings are enabled at the bucket level and S3 Object Ownership is set to Bucket + /// owner enforced (ACLs disabled). These settings can't be modified. + /// + /// + /// + /// For more information about permissions for creating and working with directory buckets, + /// see Directory + /// buckets in the Amazon S3 User Guide. For more information about supported + /// S3 features for directory buckets, see Features + /// of S3 Express One Zone in the Amazon S3 User Guide. + /// + ///
      HTTP Host header syntax
      + /// + /// Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com. + /// + ///
      + /// + /// The following operations are related to CreateBucket: + /// + /// + ///
    + /// The name of the bucket to create. General purpose buckets - For information about bucket naming restrictions, see Bucket naming rules in the Amazon S3 User Guide. Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region_code.amazonaws.com/bucket-name . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must also follow the format bucket_base_name--az_id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide + /// + /// The response from the PutBucket service method, as returned by S3. + /// REST API Reference for PutBucket Operation + PutBucketResponse PutBucket(string bucketName); + + /// + /// + /// + /// This action creates an Amazon S3 bucket. To create an Amazon S3 on Outposts bucket, + /// see + /// CreateBucket . + /// + /// + /// + /// Creates a new S3 bucket. To create a bucket, you must set up Amazon S3 and have a + /// valid Amazon Web Services Access Key ID to authenticate requests. Anonymous requests + /// are never allowed to create buckets. By creating the bucket, you become the bucket + /// owner. + /// + /// + /// + /// There are two types of buckets: general purpose buckets and directory buckets. For + /// more information about these bucket types, see Creating, + /// configuring, and working with Amazon S3 buckets in the Amazon S3 User Guide. + /// + ///
    • + /// + /// General purpose buckets - If you send your CreateBucket request to + /// the s3.amazonaws.com global endpoint, the request goes to the us-east-1 + /// Region. So the signature calculations in Signature Version 4 must use us-east-1 + /// as the Region, even if the location constraint in the request specifies another Region + /// where the bucket is to be created. If you create a bucket in a Region other than US + /// East (N. Virginia), your application must be able to handle 307 redirect. For more + /// information, see Virtual + /// hosting of buckets in the Amazon S3 User Guide. + /// + ///
    • + /// + /// Directory buckets - For directory buckets, you must make requests for this + /// API operation to the Regional endpoint. These endpoints support path-style requests + /// in the format https://s3express-control.region_code.amazonaws.com/bucket-name + /// . Virtual-hosted-style requests aren't supported. For more information, see Regional + /// and Zonal endpoints in the Amazon S3 User Guide. + /// + ///
    Permissions
    • + /// + /// General purpose bucket permissions - In addition to the s3:CreateBucket + /// permission, the following permissions are required in a policy when your CreateBucket + /// request includes specific headers: + /// + ///
      • + /// + /// Access control lists (ACLs) - In your CreateBucket request, if you + /// specify an access control list (ACL) and set it to public-read, public-read-write, + /// authenticated-read, or if you explicitly specify any other custom ACLs, both + /// s3:CreateBucket and s3:PutBucketAcl permissions are required. In your + /// CreateBucket request, if you set the ACL to private, or if you don't + /// specify any ACLs, only the s3:CreateBucket permission is required. + /// + ///
      • + /// + /// Object Lock - In your CreateBucket request, if you set x-amz-bucket-object-lock-enabled + /// to true, the s3:PutBucketObjectLockConfiguration and s3:PutBucketVersioning + /// permissions are required. + /// + ///
      • + /// + /// S3 Object Ownership - If your CreateBucket request includes the x-amz-object-ownership + /// header, then the s3:PutBucketOwnershipControls permission is required. + /// + /// + /// + /// To set an ACL on a bucket as part of a CreateBucket request, you must explicitly + /// set S3 Object Ownership for the bucket to a different value than the default, BucketOwnerEnforced. + /// Additionally, if your desired bucket ACL grants public access, you must first create + /// the bucket (without the bucket ACL) and then explicitly disable Block Public Access + /// on the bucket before using PutBucketAcl to set the ACL. If you try to create + /// a bucket with a public ACL, the request will fail. + /// + /// + /// + /// For the majority of modern use cases in S3, we recommend that you keep all Block + /// Public Access settings enabled and keep ACLs disabled. If you would like to share + /// data with users outside of your account, you can use bucket policies as needed. For + /// more information, see Controlling + /// ownership of objects and disabling ACLs for your bucket and Blocking + /// public access to your Amazon S3 storage in the Amazon S3 User Guide. + /// + ///
      • + /// + /// S3 Block Public Access - If your specific use case requires granting public + /// access to your S3 resources, you can disable Block Public Access. Specifically, you + /// can create a new bucket with Block Public Access enabled, then separately call the + /// + /// DeletePublicAccessBlock API. To use this operation, you must have the + /// s3:PutBucketPublicAccessBlock permission. For more information about S3 Block + /// Public Access, see Blocking + /// public access to your Amazon S3 storage in the Amazon S3 User Guide. + /// + ///
    • + /// + /// Directory bucket permissions - You must have the s3express:CreateBucket + /// permission in an IAM identity-based policy instead of a bucket policy. Cross-account + /// access to this API operation isn't supported. This operation can only be performed + /// by the Amazon Web Services account that owns the resource. For more information about + /// directory bucket policies and permissions, see Amazon + /// Web Services Identity and Access Management (IAM) for S3 Express One Zone in the + /// Amazon S3 User Guide. + /// + /// + /// + /// The permissions for ACLs, Object Lock, S3 Object Ownership, and S3 Block Public Access + /// are not supported for directory buckets. For directory buckets, all Block Public Access + /// settings are enabled at the bucket level and S3 Object Ownership is set to Bucket + /// owner enforced (ACLs disabled). These settings can't be modified. + /// + /// + /// + /// For more information about permissions for creating and working with directory buckets, + /// see Directory + /// buckets in the Amazon S3 User Guide. For more information about supported + /// S3 features for directory buckets, see Features + /// of S3 Express One Zone in the Amazon S3 User Guide. + /// + ///
    HTTP Host header syntax
    + /// + /// Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com. + /// + ///
    + /// + /// The following operations are related to CreateBucket: + /// + /// + ///
    + /// Container for the necessary parameters to execute the PutBucket service method. + /// + /// The response from the PutBucket service method, as returned by S3. + /// REST API Reference for PutBucket Operation + PutBucketResponse PutBucket(PutBucketRequest request); + + + /// + /// + /// + /// This action creates an Amazon S3 bucket. To create an Amazon S3 on Outposts bucket, + /// see + /// CreateBucket . + /// + /// + /// + /// Creates a new S3 bucket. To create a bucket, you must set up Amazon S3 and have a + /// valid Amazon Web Services Access Key ID to authenticate requests. Anonymous requests + /// are never allowed to create buckets. By creating the bucket, you become the bucket + /// owner. + /// + /// + /// + /// There are two types of buckets: general purpose buckets and directory buckets. For + /// more information about these bucket types, see Creating, + /// configuring, and working with Amazon S3 buckets in the Amazon S3 User Guide. + /// + ///
    • + /// + /// General purpose buckets - If you send your CreateBucket request to + /// the s3.amazonaws.com global endpoint, the request goes to the us-east-1 + /// Region. So the signature calculations in Signature Version 4 must use us-east-1 + /// as the Region, even if the location constraint in the request specifies another Region + /// where the bucket is to be created. If you create a bucket in a Region other than US + /// East (N. Virginia), your application must be able to handle 307 redirect. For more + /// information, see Virtual + /// hosting of buckets in the Amazon S3 User Guide. + /// + ///
    • + /// + /// Directory buckets - For directory buckets, you must make requests for this + /// API operation to the Regional endpoint. These endpoints support path-style requests + /// in the format https://s3express-control.region_code.amazonaws.com/bucket-name + /// . Virtual-hosted-style requests aren't supported. For more information, see Regional + /// and Zonal endpoints in the Amazon S3 User Guide. + /// + ///
    Permissions
    • + /// + /// General purpose bucket permissions - In addition to the s3:CreateBucket + /// permission, the following permissions are required in a policy when your CreateBucket + /// request includes specific headers: + /// + ///
      • + /// + /// Access control lists (ACLs) - In your CreateBucket request, if you + /// specify an access control list (ACL) and set it to public-read, public-read-write, + /// authenticated-read, or if you explicitly specify any other custom ACLs, both + /// s3:CreateBucket and s3:PutBucketAcl permissions are required. In your + /// CreateBucket request, if you set the ACL to private, or if you don't + /// specify any ACLs, only the s3:CreateBucket permission is required. + /// + ///
      • + /// + /// Object Lock - In your CreateBucket request, if you set x-amz-bucket-object-lock-enabled + /// to true, the s3:PutBucketObjectLockConfiguration and s3:PutBucketVersioning + /// permissions are required. + /// + ///
      • + /// + /// S3 Object Ownership - If your CreateBucket request includes the x-amz-object-ownership + /// header, then the s3:PutBucketOwnershipControls permission is required. + /// + /// + /// + /// To set an ACL on a bucket as part of a CreateBucket request, you must explicitly + /// set S3 Object Ownership for the bucket to a different value than the default, BucketOwnerEnforced. + /// Additionally, if your desired bucket ACL grants public access, you must first create + /// the bucket (without the bucket ACL) and then explicitly disable Block Public Access + /// on the bucket before using PutBucketAcl to set the ACL. If you try to create + /// a bucket with a public ACL, the request will fail. + /// + /// + /// + /// For the majority of modern use cases in S3, we recommend that you keep all Block + /// Public Access settings enabled and keep ACLs disabled. If you would like to share + /// data with users outside of your account, you can use bucket policies as needed. For + /// more information, see Controlling + /// ownership of objects and disabling ACLs for your bucket and Blocking + /// public access to your Amazon S3 storage in the Amazon S3 User Guide. + /// + ///
      • + /// + /// S3 Block Public Access - If your specific use case requires granting public + /// access to your S3 resources, you can disable Block Public Access. Specifically, you + /// can create a new bucket with Block Public Access enabled, then separately call the + /// + /// DeletePublicAccessBlock API. To use this operation, you must have the + /// s3:PutBucketPublicAccessBlock permission. For more information about S3 Block + /// Public Access, see Blocking + /// public access to your Amazon S3 storage in the Amazon S3 User Guide. + /// + ///
    • + /// + /// Directory bucket permissions - You must have the s3express:CreateBucket + /// permission in an IAM identity-based policy instead of a bucket policy. Cross-account + /// access to this API operation isn't supported. This operation can only be performed + /// by the Amazon Web Services account that owns the resource. For more information about + /// directory bucket policies and permissions, see Amazon + /// Web Services Identity and Access Management (IAM) for S3 Express One Zone in the + /// Amazon S3 User Guide. + /// + /// + /// + /// The permissions for ACLs, Object Lock, S3 Object Ownership, and S3 Block Public Access + /// are not supported for directory buckets. For directory buckets, all Block Public Access + /// settings are enabled at the bucket level and S3 Object Ownership is set to Bucket + /// owner enforced (ACLs disabled). These settings can't be modified. + /// + /// + /// + /// For more information about permissions for creating and working with directory buckets, + /// see Directory + /// buckets in the Amazon S3 User Guide. For more information about supported + /// S3 features for directory buckets, see Features + /// of S3 Express One Zone in the Amazon S3 User Guide. + /// + ///
    HTTP Host header syntax
    + /// + /// Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com. + /// + ///
    + /// + /// The following operations are related to CreateBucket: + /// + /// + ///
    + /// The name of the bucket to create. General purpose buckets - For information about bucket naming restrictions, see Bucket naming rules in the Amazon S3 User Guide. Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region_code.amazonaws.com/bucket-name . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must also follow the format bucket_base_name--az_id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// + /// The response from the PutBucket service method, as returned by S3. + /// REST API Reference for PutBucket Operation + Task PutBucketAsync(string bucketName, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); + + + /// + /// + /// + /// This action creates an Amazon S3 bucket. To create an Amazon S3 on Outposts bucket, + /// see + /// CreateBucket . + /// + /// + /// + /// Creates a new S3 bucket. To create a bucket, you must set up Amazon S3 and have a + /// valid Amazon Web Services Access Key ID to authenticate requests. Anonymous requests + /// are never allowed to create buckets. By creating the bucket, you become the bucket + /// owner. + /// + /// + /// + /// There are two types of buckets: general purpose buckets and directory buckets. For + /// more information about these bucket types, see Creating, + /// configuring, and working with Amazon S3 buckets in the Amazon S3 User Guide. + /// + ///
    • + /// + /// General purpose buckets - If you send your CreateBucket request to + /// the s3.amazonaws.com global endpoint, the request goes to the us-east-1 + /// Region. So the signature calculations in Signature Version 4 must use us-east-1 + /// as the Region, even if the location constraint in the request specifies another Region + /// where the bucket is to be created. If you create a bucket in a Region other than US + /// East (N. Virginia), your application must be able to handle 307 redirect. For more + /// information, see Virtual + /// hosting of buckets in the Amazon S3 User Guide. + /// + ///
    • + /// + /// Directory buckets - For directory buckets, you must make requests for this + /// API operation to the Regional endpoint. These endpoints support path-style requests + /// in the format https://s3express-control.region_code.amazonaws.com/bucket-name + /// . Virtual-hosted-style requests aren't supported. For more information, see Regional + /// and Zonal endpoints in the Amazon S3 User Guide. + /// + ///
    Permissions
    • + /// + /// General purpose bucket permissions - In addition to the s3:CreateBucket + /// permission, the following permissions are required in a policy when your CreateBucket + /// request includes specific headers: + /// + ///
      • + /// + /// Access control lists (ACLs) - In your CreateBucket request, if you + /// specify an access control list (ACL) and set it to public-read, public-read-write, + /// authenticated-read, or if you explicitly specify any other custom ACLs, both + /// s3:CreateBucket and s3:PutBucketAcl permissions are required. In your + /// CreateBucket request, if you set the ACL to private, or if you don't + /// specify any ACLs, only the s3:CreateBucket permission is required. + /// + ///
      • + /// + /// Object Lock - In your CreateBucket request, if you set x-amz-bucket-object-lock-enabled + /// to true, the s3:PutBucketObjectLockConfiguration and s3:PutBucketVersioning + /// permissions are required. + /// + ///
      • + /// + /// S3 Object Ownership - If your CreateBucket request includes the x-amz-object-ownership + /// header, then the s3:PutBucketOwnershipControls permission is required. + /// + /// + /// + /// To set an ACL on a bucket as part of a CreateBucket request, you must explicitly + /// set S3 Object Ownership for the bucket to a different value than the default, BucketOwnerEnforced. + /// Additionally, if your desired bucket ACL grants public access, you must first create + /// the bucket (without the bucket ACL) and then explicitly disable Block Public Access + /// on the bucket before using PutBucketAcl to set the ACL. If you try to create + /// a bucket with a public ACL, the request will fail. + /// + /// + /// + /// For the majority of modern use cases in S3, we recommend that you keep all Block + /// Public Access settings enabled and keep ACLs disabled. If you would like to share + /// data with users outside of your account, you can use bucket policies as needed. For + /// more information, see Controlling + /// ownership of objects and disabling ACLs for your bucket and Blocking + /// public access to your Amazon S3 storage in the Amazon S3 User Guide. + /// + ///
      • + /// + /// S3 Block Public Access - If your specific use case requires granting public + /// access to your S3 resources, you can disable Block Public Access. Specifically, you + /// can create a new bucket with Block Public Access enabled, then separately call the + /// + /// DeletePublicAccessBlock API. To use this operation, you must have the + /// s3:PutBucketPublicAccessBlock permission. For more information about S3 Block + /// Public Access, see Blocking + /// public access to your Amazon S3 storage in the Amazon S3 User Guide. + /// + ///
    • + /// + /// Directory bucket permissions - You must have the s3express:CreateBucket + /// permission in an IAM identity-based policy instead of a bucket policy. Cross-account + /// access to this API operation isn't supported. This operation can only be performed + /// by the Amazon Web Services account that owns the resource. For more information about + /// directory bucket policies and permissions, see Amazon + /// Web Services Identity and Access Management (IAM) for S3 Express One Zone in the + /// Amazon S3 User Guide. + /// + /// + /// + /// The permissions for ACLs, Object Lock, S3 Object Ownership, and S3 Block Public Access + /// are not supported for directory buckets. For directory buckets, all Block Public Access + /// settings are enabled at the bucket level and S3 Object Ownership is set to Bucket + /// owner enforced (ACLs disabled). These settings can't be modified. + /// + /// + /// + /// For more information about permissions for creating and working with directory buckets, + /// see Directory + /// buckets in the Amazon S3 User Guide. For more information about supported + /// S3 features for directory buckets, see Features + /// of S3 Express One Zone in the Amazon S3 User Guide. + /// + ///
    HTTP Host header syntax
    + /// + /// Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com. + /// + ///
    + /// + /// The following operations are related to CreateBucket: + /// + /// + ///
    + /// Container for the necessary parameters to execute the PutBucket service method. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// + /// The response from the PutBucket service method, as returned by S3. + /// REST API Reference for PutBucket Operation + Task PutBucketAsync(PutBucketRequest request, CancellationToken cancellationToken = default(CancellationToken)); + + #endregion + + #region PutBucketAccelerateConfiguration + + + /// + /// + /// + /// This operation is not supported by directory buckets. + /// + /// + /// + /// Sets the accelerate configuration of an existing bucket. Amazon S3 Transfer Acceleration + /// is a bucket-level feature that enables you to perform faster data transfers to Amazon + /// S3. + /// + /// + /// + /// To use this operation, you must have permission to perform the s3:PutAccelerateConfiguration + /// action. The bucket owner has this permission by default. The bucket owner can grant + /// this permission to others. For more information about permissions, see Permissions + /// Related to Bucket Subresource Operations and Managing + /// Access Permissions to Your Amazon S3 Resources. + /// + /// + /// + /// The Transfer Acceleration state of a bucket can be set to one of the following two + /// values: + /// + ///
    • + /// + /// Enabled – Enables accelerated data transfers to the bucket. + /// + ///
    • + /// + /// Suspended – Disables accelerated data transfers to the bucket. + /// + ///
    + /// + /// The GetBucketAccelerateConfiguration + /// action returns the transfer acceleration state of a bucket. + /// + /// + /// + /// After setting the Transfer Acceleration state of a bucket to Enabled, it might take + /// up to thirty minutes before the data transfer rates to the bucket increase. + /// + /// + /// + /// The name of the bucket used for Transfer Acceleration must be DNS-compliant and must + /// not contain periods ("."). + /// + /// + /// + /// For more information about transfer acceleration, see Transfer + /// Acceleration. + /// + /// + /// + /// The following operations are related to PutBucketAccelerateConfiguration: + /// + /// + ///
    + /// Container for the necessary parameters to execute the PutBucketAccelerateConfiguration service method. + /// + /// The response from the PutBucketAccelerateConfiguration service method, as returned by S3. + /// REST API Reference for PutBucketAccelerateConfiguration Operation + PutBucketAccelerateConfigurationResponse PutBucketAccelerateConfiguration(PutBucketAccelerateConfigurationRequest request); + + + + /// + /// + /// + /// This operation is not supported by directory buckets. + /// + /// + /// + /// Sets the accelerate configuration of an existing bucket. Amazon S3 Transfer Acceleration + /// is a bucket-level feature that enables you to perform faster data transfers to Amazon + /// S3. + /// + /// + /// + /// To use this operation, you must have permission to perform the s3:PutAccelerateConfiguration + /// action. The bucket owner has this permission by default. The bucket owner can grant + /// this permission to others. For more information about permissions, see Permissions + /// Related to Bucket Subresource Operations and Managing + /// Access Permissions to Your Amazon S3 Resources. + /// + /// + /// + /// The Transfer Acceleration state of a bucket can be set to one of the following two + /// values: + /// + ///
    • + /// + /// Enabled – Enables accelerated data transfers to the bucket. + /// + ///
    • + /// + /// Suspended – Disables accelerated data transfers to the bucket. + /// + ///
    + /// + /// The GetBucketAccelerateConfiguration + /// action returns the transfer acceleration state of a bucket. + /// + /// + /// + /// After setting the Transfer Acceleration state of a bucket to Enabled, it might take + /// up to thirty minutes before the data transfer rates to the bucket increase. + /// + /// + /// + /// The name of the bucket used for Transfer Acceleration must be DNS-compliant and must + /// not contain periods ("."). + /// + /// + /// + /// For more information about transfer acceleration, see Transfer + /// Acceleration. + /// + /// + /// + /// The following operations are related to PutBucketAccelerateConfiguration: + /// + /// + ///
    + /// Container for the necessary parameters to execute the PutBucketAccelerateConfiguration service method. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// + /// The response from the PutBucketAccelerateConfiguration service method, as returned by S3. + /// REST API Reference for PutBucketAccelerateConfiguration Operation + Task PutBucketAccelerateConfigurationAsync(PutBucketAccelerateConfigurationRequest request, CancellationToken cancellationToken = default(CancellationToken)); + + #endregion + + #region PutBucketAcl + + + /// + /// + /// + /// This operation is not supported by directory buckets. + /// + /// + /// + /// Sets the permissions on an existing bucket using access control lists (ACL). For more + /// information, see Using + /// ACLs. To set the ACL of a bucket, you must have the WRITE_ACP permission. + /// + /// + /// + /// You can use one of the following two ways to set a bucket's permissions: + /// + ///
    • + /// + /// Specify the ACL in the request body + /// + ///
    • + /// + /// Specify permissions using request headers /// ///
    /// @@ -17123,11 +17905,11 @@ public partial interface IAmazonS3 : IAmazonService, IDisposable /// /// ///
    - /// Container for the necessary parameters to execute the PutACL service method. + /// Container for the necessary parameters to execute the PutBucketAcl service method. /// - /// The response from the PutACL service method, as returned by S3. - /// REST API Reference for PutACL Operation - PutACLResponse PutACL(PutACLRequest request); + /// The response from the PutBucketAcl service method, as returned by S3. + /// REST API Reference for PutBucketAcl Operation + PutBucketAclResponse PutBucketAcl(PutBucketAclRequest request); @@ -17267,408 +18049,103 @@ public partial interface IAmazonS3 : IAmazonService, IDisposable /// /// /// x-amz-grant-write: uri="http://acs.amazonaws.com/groups/s3/LogDelivery", id="111122223333", - /// id="555566667777" - /// - /// - /// - /// You can use either a canned ACL or specify access permissions explicitly. You cannot - /// do both. - /// - ///
    Grantee Values
    - /// - /// You can specify the person (grantee) to whom you're assigning access rights (using - /// request elements) in the following ways: - /// - ///
    • - /// - /// By the person's ID: - /// - /// - /// - /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"><ID><>ID<></ID><DisplayName><>GranteesEmail<></DisplayName> - /// </Grantee> - /// - /// - /// - /// DisplayName is optional and ignored in the request - /// - ///
    • - /// - /// By URI: - /// - /// - /// - /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Group"><URI><>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<></URI></Grantee> - /// - /// - ///
    • - /// - /// By Email address: - /// - /// - /// - /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="AmazonCustomerByEmail"><EmailAddress><>Grantees@email.com<></EmailAddress>&</Grantee> - /// - /// - /// - /// - /// The grantee is resolved to the CanonicalUser and, in a response to a GET Object acl - /// request, appears as the CanonicalUser. - /// - /// - /// - /// Using email addresses to specify a grantee is only supported in the following Amazon - /// Web Services Regions: - /// - ///
      • - /// - /// US East (N. Virginia) - /// - ///
      • - /// - /// US West (N. California) - /// - ///
      • - /// - /// US West (Oregon) - /// - ///
      • - /// - /// Asia Pacific (Singapore) - /// - ///
      • - /// - /// Asia Pacific (Sydney) - /// - ///
      • - /// - /// Asia Pacific (Tokyo) - /// - ///
      • - /// - /// Europe (Ireland) - /// - ///
      • - /// - /// South America (São Paulo) - /// - ///
      - /// - /// For a list of all the Amazon S3 supported Regions and endpoints, see Regions - /// and Endpoints in the Amazon Web Services General Reference. - /// - ///
    - /// - /// The following operations are related to PutBucketAcl: - /// - /// - ///
    - /// Container for the necessary parameters to execute the PutACL service method. - /// - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// - /// - /// The response from the PutACL service method, as returned by S3. - /// REST API Reference for PutACL Operation - Task PutACLAsync(PutACLRequest request, CancellationToken cancellationToken = default(CancellationToken)); - - #endregion - - #region PutBucket - - - /// - /// - /// - /// This action creates an Amazon S3 bucket. To create an Amazon S3 on Outposts bucket, - /// see - /// CreateBucket . - /// - /// - /// - /// Creates a new S3 bucket. To create a bucket, you must set up Amazon S3 and have a - /// valid Amazon Web Services Access Key ID to authenticate requests. Anonymous requests - /// are never allowed to create buckets. By creating the bucket, you become the bucket - /// owner. - /// - /// - /// - /// There are two types of buckets: general purpose buckets and directory buckets. For - /// more information about these bucket types, see Creating, - /// configuring, and working with Amazon S3 buckets in the Amazon S3 User Guide. - /// - ///
    • - /// - /// General purpose buckets - If you send your CreateBucket request to - /// the s3.amazonaws.com global endpoint, the request goes to the us-east-1 - /// Region. So the signature calculations in Signature Version 4 must use us-east-1 - /// as the Region, even if the location constraint in the request specifies another Region - /// where the bucket is to be created. If you create a bucket in a Region other than US - /// East (N. Virginia), your application must be able to handle 307 redirect. For more - /// information, see Virtual - /// hosting of buckets in the Amazon S3 User Guide. - /// - ///
    • - /// - /// Directory buckets - For directory buckets, you must make requests for this - /// API operation to the Regional endpoint. These endpoints support path-style requests - /// in the format https://s3express-control.region_code.amazonaws.com/bucket-name - /// . Virtual-hosted-style requests aren't supported. For more information, see Regional - /// and Zonal endpoints in the Amazon S3 User Guide. - /// - ///
    Permissions
    • - /// - /// General purpose bucket permissions - In addition to the s3:CreateBucket - /// permission, the following permissions are required in a policy when your CreateBucket - /// request includes specific headers: - /// - ///
      • - /// - /// Access control lists (ACLs) - In your CreateBucket request, if you - /// specify an access control list (ACL) and set it to public-read, public-read-write, - /// authenticated-read, or if you explicitly specify any other custom ACLs, both - /// s3:CreateBucket and s3:PutBucketAcl permissions are required. In your - /// CreateBucket request, if you set the ACL to private, or if you don't - /// specify any ACLs, only the s3:CreateBucket permission is required. - /// - ///
      • - /// - /// Object Lock - In your CreateBucket request, if you set x-amz-bucket-object-lock-enabled - /// to true, the s3:PutBucketObjectLockConfiguration and s3:PutBucketVersioning - /// permissions are required. - /// - ///
      • - /// - /// S3 Object Ownership - If your CreateBucket request includes the x-amz-object-ownership - /// header, then the s3:PutBucketOwnershipControls permission is required. - /// - /// - /// - /// To set an ACL on a bucket as part of a CreateBucket request, you must explicitly - /// set S3 Object Ownership for the bucket to a different value than the default, BucketOwnerEnforced. - /// Additionally, if your desired bucket ACL grants public access, you must first create - /// the bucket (without the bucket ACL) and then explicitly disable Block Public Access - /// on the bucket before using PutBucketAcl to set the ACL. If you try to create - /// a bucket with a public ACL, the request will fail. - /// - /// - /// - /// For the majority of modern use cases in S3, we recommend that you keep all Block - /// Public Access settings enabled and keep ACLs disabled. If you would like to share - /// data with users outside of your account, you can use bucket policies as needed. For - /// more information, see Controlling - /// ownership of objects and disabling ACLs for your bucket and Blocking - /// public access to your Amazon S3 storage in the Amazon S3 User Guide. - /// - ///
      • - /// - /// S3 Block Public Access - If your specific use case requires granting public - /// access to your S3 resources, you can disable Block Public Access. Specifically, you - /// can create a new bucket with Block Public Access enabled, then separately call the - /// - /// DeletePublicAccessBlock API. To use this operation, you must have the - /// s3:PutBucketPublicAccessBlock permission. For more information about S3 Block - /// Public Access, see Blocking - /// public access to your Amazon S3 storage in the Amazon S3 User Guide. - /// - ///
    • - /// - /// Directory bucket permissions - You must have the s3express:CreateBucket - /// permission in an IAM identity-based policy instead of a bucket policy. Cross-account - /// access to this API operation isn't supported. This operation can only be performed - /// by the Amazon Web Services account that owns the resource. For more information about - /// directory bucket policies and permissions, see Amazon - /// Web Services Identity and Access Management (IAM) for S3 Express One Zone in the - /// Amazon S3 User Guide. - /// - /// - /// - /// The permissions for ACLs, Object Lock, S3 Object Ownership, and S3 Block Public Access - /// are not supported for directory buckets. For directory buckets, all Block Public Access - /// settings are enabled at the bucket level and S3 Object Ownership is set to Bucket - /// owner enforced (ACLs disabled). These settings can't be modified. - /// - /// - /// - /// For more information about permissions for creating and working with directory buckets, - /// see Directory - /// buckets in the Amazon S3 User Guide. For more information about supported - /// S3 features for directory buckets, see Features - /// of S3 Express One Zone in the Amazon S3 User Guide. + /// id="555566667777" /// - ///
    HTTP Host header syntax
    + /// /// - /// Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com. + /// You can use either a canned ACL or specify access permissions explicitly. You cannot + /// do both. /// - ///
    + ///
    Grantee Values
    /// - /// The following operations are related to CreateBucket: + /// You can specify the person (grantee) to whom you're assigning access rights (using + /// request elements) in the following ways: /// ///
    • /// - /// PutObject - /// + /// By the person's ID: /// - ///
    • + /// /// - /// DeleteBucket - /// + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"><ID><>ID<></ID><DisplayName><>GranteesEmail<></DisplayName> + /// </Grantee> /// - ///
    - ///
    - /// The name of the bucket to create. General purpose buckets - For information about bucket naming restrictions, see Bucket naming rules in the Amazon S3 User Guide. Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region_code.amazonaws.com/bucket-name . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must also follow the format bucket_base_name--az_id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide - /// - /// The response from the PutBucket service method, as returned by S3. - /// REST API Reference for PutBucket Operation - PutBucketResponse PutBucket(string bucketName); - - /// - /// + /// /// - /// This action creates an Amazon S3 bucket. To create an Amazon S3 on Outposts bucket, - /// see - /// CreateBucket . + /// DisplayName is optional and ignored in the request /// - /// + ///
  • /// - /// Creates a new S3 bucket. To create a bucket, you must set up Amazon S3 and have a - /// valid Amazon Web Services Access Key ID to authenticate requests. Anonymous requests - /// are never allowed to create buckets. By creating the bucket, you become the bucket - /// owner. + /// By URI: /// /// /// - /// There are two types of buckets: general purpose buckets and directory buckets. For - /// more information about these bucket types, see Creating, - /// configuring, and working with Amazon S3 buckets in the Amazon S3 User Guide. + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Group"><URI><>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<></URI></Grantee> + /// /// - ///
    • + ///
    • /// - /// General purpose buckets - If you send your CreateBucket request to - /// the s3.amazonaws.com global endpoint, the request goes to the us-east-1 - /// Region. So the signature calculations in Signature Version 4 must use us-east-1 - /// as the Region, even if the location constraint in the request specifies another Region - /// where the bucket is to be created. If you create a bucket in a Region other than US - /// East (N. Virginia), your application must be able to handle 307 redirect. For more - /// information, see Virtual - /// hosting of buckets in the Amazon S3 User Guide. + /// By Email address: /// - ///
    • + /// /// - /// Directory buckets - For directory buckets, you must make requests for this - /// API operation to the Regional endpoint. These endpoints support path-style requests - /// in the format https://s3express-control.region_code.amazonaws.com/bucket-name - /// . Virtual-hosted-style requests aren't supported. For more information, see Regional - /// and Zonal endpoints in the Amazon S3 User Guide. + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="AmazonCustomerByEmail"><EmailAddress><>Grantees@email.com<></EmailAddress>&</Grantee> + /// /// - ///
    Permissions
    • + /// /// - /// General purpose bucket permissions - In addition to the s3:CreateBucket - /// permission, the following permissions are required in a policy when your CreateBucket - /// request includes specific headers: + /// The grantee is resolved to the CanonicalUser and, in a response to a GET Object acl + /// request, appears as the CanonicalUser. /// - ///
      • + /// /// - /// Access control lists (ACLs) - In your CreateBucket request, if you - /// specify an access control list (ACL) and set it to public-read, public-read-write, - /// authenticated-read, or if you explicitly specify any other custom ACLs, both - /// s3:CreateBucket and s3:PutBucketAcl permissions are required. In your - /// CreateBucket request, if you set the ACL to private, or if you don't - /// specify any ACLs, only the s3:CreateBucket permission is required. + /// Using email addresses to specify a grantee is only supported in the following Amazon + /// Web Services Regions: /// - ///
      • + ///
        • /// - /// Object Lock - In your CreateBucket request, if you set x-amz-bucket-object-lock-enabled - /// to true, the s3:PutBucketObjectLockConfiguration and s3:PutBucketVersioning - /// permissions are required. + /// US East (N. Virginia) /// ///
        • /// - /// S3 Object Ownership - If your CreateBucket request includes the x-amz-object-ownership - /// header, then the s3:PutBucketOwnershipControls permission is required. + /// US West (N. California) /// - /// + ///
        • /// - /// To set an ACL on a bucket as part of a CreateBucket request, you must explicitly - /// set S3 Object Ownership for the bucket to a different value than the default, BucketOwnerEnforced. - /// Additionally, if your desired bucket ACL grants public access, you must first create - /// the bucket (without the bucket ACL) and then explicitly disable Block Public Access - /// on the bucket before using PutBucketAcl to set the ACL. If you try to create - /// a bucket with a public ACL, the request will fail. + /// US West (Oregon) /// - /// + ///
        • /// - /// For the majority of modern use cases in S3, we recommend that you keep all Block - /// Public Access settings enabled and keep ACLs disabled. If you would like to share - /// data with users outside of your account, you can use bucket policies as needed. For - /// more information, see Controlling - /// ownership of objects and disabling ACLs for your bucket and Blocking - /// public access to your Amazon S3 storage in the Amazon S3 User Guide. + /// Asia Pacific (Singapore) /// - ///
        • + ///
        • /// - /// S3 Block Public Access - If your specific use case requires granting public - /// access to your S3 resources, you can disable Block Public Access. Specifically, you - /// can create a new bucket with Block Public Access enabled, then separately call the - /// - /// DeletePublicAccessBlock API. To use this operation, you must have the - /// s3:PutBucketPublicAccessBlock permission. For more information about S3 Block - /// Public Access, see Blocking - /// public access to your Amazon S3 storage in the Amazon S3 User Guide. + /// Asia Pacific (Sydney) /// - ///
      • + ///
      • /// - /// Directory bucket permissions - You must have the s3express:CreateBucket - /// permission in an IAM identity-based policy instead of a bucket policy. Cross-account - /// access to this API operation isn't supported. This operation can only be performed - /// by the Amazon Web Services account that owns the resource. For more information about - /// directory bucket policies and permissions, see Amazon - /// Web Services Identity and Access Management (IAM) for S3 Express One Zone in the - /// Amazon S3 User Guide. + /// Asia Pacific (Tokyo) /// - /// + ///
      • /// - /// The permissions for ACLs, Object Lock, S3 Object Ownership, and S3 Block Public Access - /// are not supported for directory buckets. For directory buckets, all Block Public Access - /// settings are enabled at the bucket level and S3 Object Ownership is set to Bucket - /// owner enforced (ACLs disabled). These settings can't be modified. + /// Europe (Ireland) /// - /// + ///
      • /// - /// For more information about permissions for creating and working with directory buckets, - /// see Directory - /// buckets in the Amazon S3 User Guide. For more information about supported - /// S3 features for directory buckets, see Features - /// of S3 Express One Zone in the Amazon S3 User Guide. + /// South America (São Paulo) /// - ///
    HTTP Host header syntax
    + ///
  • /// - /// Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com. + /// For a list of all the Amazon S3 supported Regions and endpoints, see Regions + /// and Endpoints in the Amazon Web Services General Reference. /// - /// + /// /// - /// The following operations are related to CreateBucket: + /// The following operations are related to PutBucketAcl: /// /// ///
    - /// Container for the necessary parameters to execute the PutBucket service method. + /// Container for the necessary parameters to execute the PutBucketAcl service method. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// /// - /// The response from the PutBucket service method, as returned by S3. - /// REST API Reference for PutBucket Operation - PutBucketResponse PutBucket(PutBucketRequest request); + /// The response from the PutBucketAcl service method, as returned by S3. + /// REST API Reference for PutBucketAcl Operation + Task PutBucketAclAsync(PutBucketAclRequest request, CancellationToken cancellationToken = default(CancellationToken)); + + #endregion + + #region PutBucketAnalyticsConfiguration /// /// /// - /// This action creates an Amazon S3 bucket. To create an Amazon S3 on Outposts bucket, - /// see - /// CreateBucket . + /// This operation is not supported by directory buckets. /// /// /// - /// Creates a new S3 bucket. To create a bucket, you must set up Amazon S3 and have a - /// valid Amazon Web Services Access Key ID to authenticate requests. Anonymous requests - /// are never allowed to create buckets. By creating the bucket, you become the bucket - /// owner. + /// Sets an analytics configuration for the bucket (specified by the analytics configuration + /// ID). You can have up to 1,000 analytics configurations per bucket. /// /// /// - /// There are two types of buckets: general purpose buckets and directory buckets. For - /// more information about these bucket types, see Creating, - /// configuring, and working with Amazon S3 buckets in the Amazon S3 User Guide. - /// - ///
    • - /// - /// General purpose buckets - If you send your CreateBucket request to - /// the s3.amazonaws.com global endpoint, the request goes to the us-east-1 - /// Region. So the signature calculations in Signature Version 4 must use us-east-1 - /// as the Region, even if the location constraint in the request specifies another Region - /// where the bucket is to be created. If you create a bucket in a Region other than US - /// East (N. Virginia), your application must be able to handle 307 redirect. For more - /// information, see Virtual - /// hosting of buckets in the Amazon S3 User Guide. + /// You can choose to have storage class analysis export analysis reports sent to a comma-separated + /// values (CSV) flat file. See the DataExport request element. Reports are updated + /// daily and are based on the object filters that you configure. When selecting data + /// export, you specify a destination bucket and an optional destination prefix where + /// the file is written. You can export the data to a destination bucket in a different + /// account. However, the destination bucket must be in the same Region as the bucket + /// that you are making the PUT analytics configuration to. For more information, see + /// Amazon + /// S3 Analytics – Storage Class Analysis. /// - ///
    • + /// /// - /// Directory buckets - For directory buckets, you must make requests for this - /// API operation to the Regional endpoint. These endpoints support path-style requests - /// in the format https://s3express-control.region_code.amazonaws.com/bucket-name - /// . Virtual-hosted-style requests aren't supported. For more information, see Regional - /// and Zonal endpoints in the Amazon S3 User Guide. + /// You must create a bucket policy on the destination bucket where the exported file + /// is written to grant permissions to Amazon S3 to write objects to the bucket. For an + /// example policy, see Granting + /// Permissions for Amazon S3 Inventory and Storage Class Analysis. /// - ///
    Permissions
    • + /// /// - /// General purpose bucket permissions - In addition to the s3:CreateBucket - /// permission, the following permissions are required in a policy when your CreateBucket - /// request includes specific headers: + /// To use this operation, you must have permissions to perform the s3:PutAnalyticsConfiguration + /// action. The bucket owner has this permission by default. The bucket owner can grant + /// this permission to others. For more information about permissions, see Permissions + /// Related to Bucket Subresource Operations and Managing + /// Access Permissions to Your Amazon S3 Resources. /// - ///
      • + /// /// - /// Access control lists (ACLs) - In your CreateBucket request, if you - /// specify an access control list (ACL) and set it to public-read, public-read-write, - /// authenticated-read, or if you explicitly specify any other custom ACLs, both - /// s3:CreateBucket and s3:PutBucketAcl permissions are required. In your - /// CreateBucket request, if you set the ACL to private, or if you don't - /// specify any ACLs, only the s3:CreateBucket permission is required. + /// PutBucketAnalyticsConfiguration has the following special errors: /// - ///
      • + ///
          • /// - /// Object Lock - In your CreateBucket request, if you set x-amz-bucket-object-lock-enabled - /// to true, the s3:PutBucketObjectLockConfiguration and s3:PutBucketVersioning - /// permissions are required. + /// HTTP Error: HTTP 400 Bad Request /// ///
          • /// - /// S3 Object Ownership - If your CreateBucket request includes the x-amz-object-ownership - /// header, then the s3:PutBucketOwnershipControls permission is required. - /// - /// - /// - /// To set an ACL on a bucket as part of a CreateBucket request, you must explicitly - /// set S3 Object Ownership for the bucket to a different value than the default, BucketOwnerEnforced. - /// Additionally, if your desired bucket ACL grants public access, you must first create - /// the bucket (without the bucket ACL) and then explicitly disable Block Public Access - /// on the bucket before using PutBucketAcl to set the ACL. If you try to create - /// a bucket with a public ACL, the request will fail. + /// Code: InvalidArgument /// - /// + ///
          • /// - /// For the majority of modern use cases in S3, we recommend that you keep all Block - /// Public Access settings enabled and keep ACLs disabled. If you would like to share - /// data with users outside of your account, you can use bucket policies as needed. For - /// more information, see Controlling - /// ownership of objects and disabling ACLs for your bucket and Blocking - /// public access to your Amazon S3 storage in the Amazon S3 User Guide. + /// Cause: Invalid argument. /// - ///
          • + ///
          • /// - /// S3 Block Public Access - If your specific use case requires granting public - /// access to your S3 resources, you can disable Block Public Access. Specifically, you - /// can create a new bucket with Block Public Access enabled, then separately call the - /// - /// DeletePublicAccessBlock API. To use this operation, you must have the - /// s3:PutBucketPublicAccessBlock permission. For more information about S3 Block - /// Public Access, see Blocking - /// public access to your Amazon S3 storage in the Amazon S3 User Guide. + /// HTTP Error: HTTP 400 Bad Request /// - ///
        • + ///
        • /// - /// Directory bucket permissions - You must have the s3express:CreateBucket - /// permission in an IAM identity-based policy instead of a bucket policy. Cross-account - /// access to this API operation isn't supported. This operation can only be performed - /// by the Amazon Web Services account that owns the resource. For more information about - /// directory bucket policies and permissions, see Amazon - /// Web Services Identity and Access Management (IAM) for S3 Express One Zone in the - /// Amazon S3 User Guide. + /// Code: TooManyConfigurations /// - /// + ///
        • /// - /// The permissions for ACLs, Object Lock, S3 Object Ownership, and S3 Block Public Access - /// are not supported for directory buckets. For directory buckets, all Block Public Access - /// settings are enabled at the bucket level and S3 Object Ownership is set to Bucket - /// owner enforced (ACLs disabled). These settings can't be modified. + /// Cause: You are attempting to create a new configuration but have already reached + /// the 1,000-configuration limit. /// - /// + ///
        • /// - /// For more information about permissions for creating and working with directory buckets, - /// see Directory - /// buckets in the Amazon S3 User Guide. For more information about supported - /// S3 features for directory buckets, see Features - /// of S3 Express One Zone in the Amazon S3 User Guide. + /// HTTP Error: HTTP 403 Forbidden /// - ///
    HTTP Host header syntax
    + ///
  • /// - /// Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com. + /// Code: AccessDenied /// - ///
  • + ///
  • /// - /// The following operations are related to CreateBucket: + /// Cause: You are not the owner of the specified bucket, or you do not have the s3:PutAnalyticsConfiguration + /// bucket permission to set the configuration on the bucket. + /// + ///
  • + /// + /// The following operations are related to PutBucketAnalyticsConfiguration: /// /// ///
    - /// The name of the bucket to create. General purpose buckets - For information about bucket naming restrictions, see Bucket naming rules in the Amazon S3 User Guide. Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region_code.amazonaws.com/bucket-name . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must also follow the format bucket_base_name--az_id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide - /// - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// + /// Container for the necessary parameters to execute the PutBucketAnalyticsConfiguration service method. /// - /// The response from the PutBucket service method, as returned by S3. - /// REST API Reference for PutBucket Operation - Task PutBucketAsync(string bucketName, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); + /// The response from the PutBucketAnalyticsConfiguration service method, as returned by S3. + /// REST API Reference for PutBucketAnalyticsConfiguration Operation + PutBucketAnalyticsConfigurationResponse PutBucketAnalyticsConfiguration(PutBucketAnalyticsConfigurationRequest request); + /// /// /// - /// This action creates an Amazon S3 bucket. To create an Amazon S3 on Outposts bucket, - /// see - /// CreateBucket . + /// This operation is not supported by directory buckets. /// /// /// - /// Creates a new S3 bucket. To create a bucket, you must set up Amazon S3 and have a - /// valid Amazon Web Services Access Key ID to authenticate requests. Anonymous requests - /// are never allowed to create buckets. By creating the bucket, you become the bucket - /// owner. + /// Sets an analytics configuration for the bucket (specified by the analytics configuration + /// ID). You can have up to 1,000 analytics configurations per bucket. /// /// /// - /// There are two types of buckets: general purpose buckets and directory buckets. For - /// more information about these bucket types, see Creating, - /// configuring, and working with Amazon S3 buckets in the Amazon S3 User Guide. + /// You can choose to have storage class analysis export analysis reports sent to a comma-separated + /// values (CSV) flat file. See the DataExport request element. Reports are updated + /// daily and are based on the object filters that you configure. When selecting data + /// export, you specify a destination bucket and an optional destination prefix where + /// the file is written. You can export the data to a destination bucket in a different + /// account. However, the destination bucket must be in the same Region as the bucket + /// that you are making the PUT analytics configuration to. For more information, see + /// Amazon + /// S3 Analytics – Storage Class Analysis. /// - ///
    • + /// /// - /// General purpose buckets - If you send your CreateBucket request to - /// the s3.amazonaws.com global endpoint, the request goes to the us-east-1 - /// Region. So the signature calculations in Signature Version 4 must use us-east-1 - /// as the Region, even if the location constraint in the request specifies another Region - /// where the bucket is to be created. If you create a bucket in a Region other than US - /// East (N. Virginia), your application must be able to handle 307 redirect. For more - /// information, see Virtual - /// hosting of buckets in the Amazon S3 User Guide. + /// You must create a bucket policy on the destination bucket where the exported file + /// is written to grant permissions to Amazon S3 to write objects to the bucket. For an + /// example policy, see Granting + /// Permissions for Amazon S3 Inventory and Storage Class Analysis. /// - ///
    • + /// /// - /// Directory buckets - For directory buckets, you must make requests for this - /// API operation to the Regional endpoint. These endpoints support path-style requests - /// in the format https://s3express-control.region_code.amazonaws.com/bucket-name - /// . Virtual-hosted-style requests aren't supported. For more information, see Regional - /// and Zonal endpoints in the Amazon S3 User Guide. + /// To use this operation, you must have permissions to perform the s3:PutAnalyticsConfiguration + /// action. The bucket owner has this permission by default. The bucket owner can grant + /// this permission to others. For more information about permissions, see Permissions + /// Related to Bucket Subresource Operations and Managing + /// Access Permissions to Your Amazon S3 Resources. /// - ///
    Permissions
    • + /// /// - /// General purpose bucket permissions - In addition to the s3:CreateBucket - /// permission, the following permissions are required in a policy when your CreateBucket - /// request includes specific headers: + /// PutBucketAnalyticsConfiguration has the following special errors: /// - ///
      • + ///
          • /// - /// Access control lists (ACLs) - In your CreateBucket request, if you - /// specify an access control list (ACL) and set it to public-read, public-read-write, - /// authenticated-read, or if you explicitly specify any other custom ACLs, both - /// s3:CreateBucket and s3:PutBucketAcl permissions are required. In your - /// CreateBucket request, if you set the ACL to private, or if you don't - /// specify any ACLs, only the s3:CreateBucket permission is required. + /// HTTP Error: HTTP 400 Bad Request /// ///
          • /// - /// Object Lock - In your CreateBucket request, if you set x-amz-bucket-object-lock-enabled - /// to true, the s3:PutBucketObjectLockConfiguration and s3:PutBucketVersioning - /// permissions are required. + /// Code: InvalidArgument /// ///
          • /// - /// S3 Object Ownership - If your CreateBucket request includes the x-amz-object-ownership - /// header, then the s3:PutBucketOwnershipControls permission is required. + /// Cause: Invalid argument. /// - /// + ///
          • /// - /// To set an ACL on a bucket as part of a CreateBucket request, you must explicitly - /// set S3 Object Ownership for the bucket to a different value than the default, BucketOwnerEnforced. - /// Additionally, if your desired bucket ACL grants public access, you must first create - /// the bucket (without the bucket ACL) and then explicitly disable Block Public Access - /// on the bucket before using PutBucketAcl to set the ACL. If you try to create - /// a bucket with a public ACL, the request will fail. + /// HTTP Error: HTTP 400 Bad Request /// - /// + ///
          • /// - /// For the majority of modern use cases in S3, we recommend that you keep all Block - /// Public Access settings enabled and keep ACLs disabled. If you would like to share - /// data with users outside of your account, you can use bucket policies as needed. For - /// more information, see Controlling - /// ownership of objects and disabling ACLs for your bucket and Blocking - /// public access to your Amazon S3 storage in the Amazon S3 User Guide. + /// Code: TooManyConfigurations /// - ///
          • + ///
          • /// - /// S3 Block Public Access - If your specific use case requires granting public - /// access to your S3 resources, you can disable Block Public Access. Specifically, you - /// can create a new bucket with Block Public Access enabled, then separately call the - /// - /// DeletePublicAccessBlock API. To use this operation, you must have the - /// s3:PutBucketPublicAccessBlock permission. For more information about S3 Block - /// Public Access, see Blocking - /// public access to your Amazon S3 storage in the Amazon S3 User Guide. + /// Cause: You are attempting to create a new configuration but have already reached + /// the 1,000-configuration limit. /// - ///
        • + ///
        • /// - /// Directory bucket permissions - You must have the s3express:CreateBucket - /// permission in an IAM identity-based policy instead of a bucket policy. Cross-account - /// access to this API operation isn't supported. This operation can only be performed - /// by the Amazon Web Services account that owns the resource. For more information about - /// directory bucket policies and permissions, see Amazon - /// Web Services Identity and Access Management (IAM) for S3 Express One Zone in the - /// Amazon S3 User Guide. + /// HTTP Error: HTTP 403 Forbidden /// - /// + ///
        • /// - /// The permissions for ACLs, Object Lock, S3 Object Ownership, and S3 Block Public Access - /// are not supported for directory buckets. For directory buckets, all Block Public Access - /// settings are enabled at the bucket level and S3 Object Ownership is set to Bucket - /// owner enforced (ACLs disabled). These settings can't be modified. + /// Code: AccessDenied /// - /// + ///
        • /// - /// For more information about permissions for creating and working with directory buckets, - /// see Directory - /// buckets in the Amazon S3 User Guide. For more information about supported - /// S3 features for directory buckets, see Features - /// of S3 Express One Zone in the Amazon S3 User Guide. + /// Cause: You are not the owner of the specified bucket, or you do not have the s3:PutAnalyticsConfiguration + /// bucket permission to set the configuration on the bucket. /// - ///
    HTTP Host header syntax
    + /// /// - /// Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com. + /// The following operations are related to PutBucketAnalyticsConfiguration: /// - ///
    + ///
    - /// Container for the necessary parameters to execute the PutBucket service method. + /// Container for the necessary parameters to execute the PutBucketAnalyticsConfiguration service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// - /// The response from the PutBucket service method, as returned by S3. - /// REST API Reference for PutBucket Operation - Task PutBucketAsync(PutBucketRequest request, CancellationToken cancellationToken = default(CancellationToken)); + /// The response from the PutBucketAnalyticsConfiguration service method, as returned by S3. + /// REST API Reference for PutBucketAnalyticsConfiguration Operation + Task PutBucketAnalyticsConfigurationAsync(PutBucketAnalyticsConfigurationRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion - #region PutBucketAccelerateConfiguration + #region PutBucketEncryption /// @@ -17996,73 +18403,125 @@ public partial interface IAmazonS3 : IAmazonService, IDisposable /// /// /// - /// Sets the accelerate configuration of an existing bucket. Amazon S3 Transfer Acceleration - /// is a bucket-level feature that enables you to perform faster data transfers to Amazon - /// S3. + /// This action uses the encryption subresource to configure default encryption + /// and Amazon S3 Bucket Keys for an existing bucket. /// /// /// - /// To use this operation, you must have permission to perform the s3:PutAccelerateConfiguration + /// By default, all buckets have a default encryption configuration that uses server-side + /// encryption with Amazon S3 managed keys (SSE-S3). You can optionally configure default + /// encryption for a bucket by using server-side encryption with Key Management Service + /// (KMS) keys (SSE-KMS) or dual-layer server-side encryption with Amazon Web Services + /// KMS keys (DSSE-KMS). If you specify default encryption by using SSE-KMS, you can also + /// configure Amazon + /// S3 Bucket Keys. If you use PutBucketEncryption to set your default + /// bucket encryption to SSE-KMS, you should verify that your KMS key ID is correct. + /// Amazon S3 does not validate the KMS key ID provided in PutBucketEncryption requests. + /// + /// + /// + /// This action requires Amazon Web Services Signature Version 4. For more information, + /// see + /// Authenticating Requests (Amazon Web Services Signature Version 4). + /// + /// + /// + /// To use this operation, you must have permission to perform the s3:PutEncryptionConfiguration /// action. The bucket owner has this permission by default. The bucket owner can grant /// this permission to others. For more information about permissions, see Permissions /// Related to Bucket Subresource Operations and Managing - /// Access Permissions to Your Amazon S3 Resources. + /// Access Permissions to Your Amazon S3 Resources in the Amazon S3 User Guide. + /// /// /// /// - /// The Transfer Acceleration state of a bucket can be set to one of the following two - /// values: + /// The following operations are related to PutBucketEncryption: /// ///
    • /// - /// Enabled – Enables accelerated data transfers to the bucket. + /// GetBucketEncryption + /// /// ///
    • /// - /// Suspended – Disables accelerated data transfers to the bucket. + /// DeleteBucketEncryption + /// /// - ///
    + /// + ///
    + /// Container for the necessary parameters to execute the PutBucketEncryption service method. + /// + /// The response from the PutBucketEncryption service method, as returned by S3. + /// REST API Reference for PutBucketEncryption Operation + PutBucketEncryptionResponse PutBucketEncryption(PutBucketEncryptionRequest request); + + + + /// + /// /// - /// The GetBucketAccelerateConfiguration - /// action returns the transfer acceleration state of a bucket. + /// This operation is not supported by directory buckets. /// - /// + /// /// - /// After setting the Transfer Acceleration state of a bucket to Enabled, it might take - /// up to thirty minutes before the data transfer rates to the bucket increase. + /// This action uses the encryption subresource to configure default encryption + /// and Amazon S3 Bucket Keys for an existing bucket. /// /// /// - /// The name of the bucket used for Transfer Acceleration must be DNS-compliant and must - /// not contain periods ("."). + /// By default, all buckets have a default encryption configuration that uses server-side + /// encryption with Amazon S3 managed keys (SSE-S3). You can optionally configure default + /// encryption for a bucket by using server-side encryption with Key Management Service + /// (KMS) keys (SSE-KMS) or dual-layer server-side encryption with Amazon Web Services + /// KMS keys (DSSE-KMS). If you specify default encryption by using SSE-KMS, you can also + /// configure Amazon + /// S3 Bucket Keys. If you use PutBucketEncryption to set your default + /// bucket encryption to SSE-KMS, you should verify that your KMS key ID is correct. + /// Amazon S3 does not validate the KMS key ID provided in PutBucketEncryption requests. /// - /// + /// /// - /// For more information about transfer acceleration, see Transfer - /// Acceleration. + /// This action requires Amazon Web Services Signature Version 4. For more information, + /// see + /// Authenticating Requests (Amazon Web Services Signature Version 4). + /// + /// + /// + /// To use this operation, you must have permission to perform the s3:PutEncryptionConfiguration + /// action. The bucket owner has this permission by default. The bucket owner can grant + /// this permission to others. For more information about permissions, see Permissions + /// Related to Bucket Subresource Operations and Managing + /// Access Permissions to Your Amazon S3 Resources in the Amazon S3 User Guide. + /// /// /// /// - /// The following operations are related to PutBucketAccelerateConfiguration: + /// The following operations are related to PutBucketEncryption: /// /// /// - /// Container for the necessary parameters to execute the PutBucketAccelerateConfiguration service method. + /// Container for the necessary parameters to execute the PutBucketEncryption service method. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// /// - /// The response from the PutBucketAccelerateConfiguration service method, as returned by S3. - /// REST API Reference for PutBucketAccelerateConfiguration Operation - PutBucketAccelerateConfigurationResponse PutBucketAccelerateConfiguration(PutBucketAccelerateConfigurationRequest request); + /// The response from the PutBucketEncryption service method, as returned by S3. + /// REST API Reference for PutBucketEncryption Operation + Task PutBucketEncryptionAsync(PutBucketEncryptionRequest request, CancellationToken cancellationToken = default(CancellationToken)); + #endregion + + #region PutBucketIntelligentTieringConfiguration /// @@ -18072,79 +18531,91 @@ public partial interface IAmazonS3 : IAmazonService, IDisposable /// /// /// - /// Sets the accelerate configuration of an existing bucket. Amazon S3 Transfer Acceleration - /// is a bucket-level feature that enables you to perform faster data transfers to Amazon - /// S3. + /// Puts a S3 Intelligent-Tiering configuration to the specified bucket. You can have + /// up to 1,000 S3 Intelligent-Tiering configurations per bucket. /// /// /// - /// To use this operation, you must have permission to perform the s3:PutAccelerateConfiguration - /// action. The bucket owner has this permission by default. The bucket owner can grant - /// this permission to others. For more information about permissions, see Permissions - /// Related to Bucket Subresource Operations and Managing - /// Access Permissions to Your Amazon S3 Resources. + /// The S3 Intelligent-Tiering storage class is designed to optimize storage costs by + /// automatically moving data to the most cost-effective storage access tier, without + /// performance impact or operational overhead. S3 Intelligent-Tiering delivers automatic + /// cost savings in three low latency and high throughput access tiers. To get the lowest + /// storage cost on data that can be accessed in minutes to hours, you can choose to activate + /// additional archiving capabilities. /// /// /// - /// The Transfer Acceleration state of a bucket can be set to one of the following two - /// values: + /// The S3 Intelligent-Tiering storage class is the ideal storage class for data with + /// unknown, changing, or unpredictable access patterns, independent of object size or + /// retention period. If the size of an object is less than 128 KB, it is not monitored + /// and not eligible for auto-tiering. Smaller objects can be stored, but they are always + /// charged at the Frequent Access tier rates in the S3 Intelligent-Tiering storage class. + /// + /// + /// + /// For more information, see Storage + /// class for automatically optimizing frequently and infrequently accessed objects. + /// + /// + /// + /// Operations related to PutBucketIntelligentTieringConfiguration include: /// /// + ///
  • /// - /// The GetBucketAccelerateConfiguration - /// action returns the transfer acceleration state of a bucket. + /// ListBucketIntelligentTieringConfigurations + /// /// - /// + ///
  • /// - /// After setting the Transfer Acceleration state of a bucket to Enabled, it might take - /// up to thirty minutes before the data transfer rates to the bucket increase. + /// You only need S3 Intelligent-Tiering enabled on a bucket if you want to automatically + /// move objects stored in the S3 Intelligent-Tiering storage class to the Archive Access + /// or Deep Archive Access tier. /// - /// + /// /// - /// The name of the bucket used for Transfer Acceleration must be DNS-compliant and must - /// not contain periods ("."). + /// PutBucketIntelligentTieringConfiguration has the following special errors: /// - /// + ///
    HTTP 400 Bad Request Error
    /// - /// For more information about transfer acceleration, see Transfer - /// Acceleration. + /// Code: InvalidArgument /// /// /// - /// The following operations are related to PutBucketAccelerateConfiguration: + /// Cause: Invalid Argument /// - ///
    • + ///
    HTTP 400 Bad Request Error
    /// - /// GetBucketAccelerateConfiguration - /// + /// Code: TooManyConfigurations /// - ///
  • + /// /// - /// CreateBucket - /// + /// Cause: You are attempting to create a new configuration but have already reached + /// the 1,000-configuration limit. /// - ///
  • + ///
    HTTP 403 Forbidden Error
    + /// + /// Cause: You are not the owner of the specified bucket, or you do not have the + /// s3:PutIntelligentTieringConfiguration bucket permission to set the configuration + /// on the bucket. + /// + ///
    ///
    - /// Container for the necessary parameters to execute the PutBucketAccelerateConfiguration service method. - /// - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// + /// Container for the necessary parameters to execute the PutBucketIntelligentTieringConfiguration service method. /// - /// The response from the PutBucketAccelerateConfiguration service method, as returned by S3. - /// REST API Reference for PutBucketAccelerateConfiguration Operation - Task PutBucketAccelerateConfigurationAsync(PutBucketAccelerateConfigurationRequest request, CancellationToken cancellationToken = default(CancellationToken)); + /// The response from the PutBucketIntelligentTieringConfiguration service method, as returned by S3. + /// REST API Reference for PutBucketIntelligentTieringConfiguration Operation + PutBucketIntelligentTieringConfigurationResponse PutBucketIntelligentTieringConfiguration(PutBucketIntelligentTieringConfigurationRequest request); - #endregion - - #region PutBucketAnalyticsConfiguration /// @@ -18154,105 +18625,97 @@ public partial interface IAmazonS3 : IAmazonService, IDisposable /// /// /// - /// Sets an analytics configuration for the bucket (specified by the analytics configuration - /// ID). You can have up to 1,000 analytics configurations per bucket. + /// Puts a S3 Intelligent-Tiering configuration to the specified bucket. You can have + /// up to 1,000 S3 Intelligent-Tiering configurations per bucket. /// /// /// - /// You can choose to have storage class analysis export analysis reports sent to a comma-separated - /// values (CSV) flat file. See the DataExport request element. Reports are updated - /// daily and are based on the object filters that you configure. When selecting data - /// export, you specify a destination bucket and an optional destination prefix where - /// the file is written. You can export the data to a destination bucket in a different - /// account. However, the destination bucket must be in the same Region as the bucket - /// that you are making the PUT analytics configuration to. For more information, see - /// Amazon - /// S3 Analytics – Storage Class Analysis. - /// - /// - /// - /// You must create a bucket policy on the destination bucket where the exported file - /// is written to grant permissions to Amazon S3 to write objects to the bucket. For an - /// example policy, see Granting - /// Permissions for Amazon S3 Inventory and Storage Class Analysis. - /// - /// - /// - /// To use this operation, you must have permissions to perform the s3:PutAnalyticsConfiguration - /// action. The bucket owner has this permission by default. The bucket owner can grant - /// this permission to others. For more information about permissions, see Permissions - /// Related to Bucket Subresource Operations and Managing - /// Access Permissions to Your Amazon S3 Resources. + /// The S3 Intelligent-Tiering storage class is designed to optimize storage costs by + /// automatically moving data to the most cost-effective storage access tier, without + /// performance impact or operational overhead. S3 Intelligent-Tiering delivers automatic + /// cost savings in three low latency and high throughput access tiers. To get the lowest + /// storage cost on data that can be accessed in minutes to hours, you can choose to activate + /// additional archiving capabilities. /// /// /// - /// PutBucketAnalyticsConfiguration has the following special errors: - /// - ///
      • - /// - /// HTTP Error: HTTP 400 Bad Request + /// The S3 Intelligent-Tiering storage class is the ideal storage class for data with + /// unknown, changing, or unpredictable access patterns, independent of object size or + /// retention period. If the size of an object is less than 128 KB, it is not monitored + /// and not eligible for auto-tiering. Smaller objects can be stored, but they are always + /// charged at the Frequent Access tier rates in the S3 Intelligent-Tiering storage class. /// - ///
      • + /// /// - /// Code: InvalidArgument + /// For more information, see Storage + /// class for automatically optimizing frequently and infrequently accessed objects. /// - ///
      • + /// /// - /// Cause: Invalid argument. + /// Operations related to PutBucketIntelligentTieringConfiguration include: /// - ///
      • + ///
        • + ///
        /// - /// HTTP Error: HTTP 403 Forbidden + /// You only need S3 Intelligent-Tiering enabled on a bucket if you want to automatically + /// move objects stored in the S3 Intelligent-Tiering storage class to the Archive Access + /// or Deep Archive Access tier. /// - ///
      • + /// /// - /// Code: AccessDenied + /// PutBucketIntelligentTieringConfiguration has the following special errors: /// - ///
      • + ///
        HTTP 400 Bad Request Error
        /// - /// Cause: You are not the owner of the specified bucket, or you do not have the s3:PutAnalyticsConfiguration - /// bucket permission to set the configuration on the bucket. + /// Code: InvalidArgument /// - ///
    + /// /// - /// The following operations are related to PutBucketAnalyticsConfiguration: + /// Cause: Invalid Argument /// - ///
    • + ///
      HTTP 400 Bad Request Error
      /// - /// GetBucketAnalyticsConfiguration - /// + /// Code: TooManyConfigurations /// - ///
    • + /// /// - /// DeleteBucketAnalyticsConfiguration - /// + /// Cause: You are attempting to create a new configuration but have already reached + /// the 1,000-configuration limit. /// - ///
    • + ///
      HTTP 403 Forbidden Error
      /// - /// ListBucketAnalyticsConfigurations - /// + /// Cause: You are not the owner of the specified bucket, or you do not have the + /// s3:PutIntelligentTieringConfiguration bucket permission to set the configuration + /// on the bucket. /// - ///
    + /// ///
    - /// Container for the necessary parameters to execute the PutBucketAnalyticsConfiguration service method. + /// Container for the necessary parameters to execute the PutBucketIntelligentTieringConfiguration service method. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// /// - /// The response from the PutBucketAnalyticsConfiguration service method, as returned by S3. - /// REST API Reference for PutBucketAnalyticsConfiguration Operation - PutBucketAnalyticsConfigurationResponse PutBucketAnalyticsConfiguration(PutBucketAnalyticsConfigurationRequest request); + /// The response from the PutBucketIntelligentTieringConfiguration service method, as returned by S3. + /// REST API Reference for PutBucketIntelligentTieringConfiguration Operation + Task PutBucketIntelligentTieringConfigurationAsync(PutBucketIntelligentTieringConfigurationRequest request, CancellationToken cancellationToken = default(CancellationToken)); + #endregion + + #region PutBucketInventoryConfiguration /// @@ -18262,111 +18725,113 @@ public partial interface IAmazonS3 : IAmazonService, IDisposable /// /// /// - /// Sets an analytics configuration for the bucket (specified by the analytics configuration - /// ID). You can have up to 1,000 analytics configurations per bucket. + /// This implementation of the PUT action adds an inventory configuration (identified + /// by the inventory ID) to the bucket. You can have up to 1,000 inventory configurations + /// per bucket. /// /// /// - /// You can choose to have storage class analysis export analysis reports sent to a comma-separated - /// values (CSV) flat file. See the DataExport request element. Reports are updated - /// daily and are based on the object filters that you configure. When selecting data - /// export, you specify a destination bucket and an optional destination prefix where - /// the file is written. You can export the data to a destination bucket in a different - /// account. However, the destination bucket must be in the same Region as the bucket - /// that you are making the PUT analytics configuration to. For more information, see - /// Amazon - /// S3 Analytics – Storage Class Analysis. - /// - /// - /// - /// You must create a bucket policy on the destination bucket where the exported file - /// is written to grant permissions to Amazon S3 to write objects to the bucket. For an - /// example policy, see Granting - /// Permissions for Amazon S3 Inventory and Storage Class Analysis. + /// Amazon S3 inventory generates inventories of the objects in the bucket on a daily + /// or weekly basis, and the results are published to a flat file. The bucket that is + /// inventoried is called the source bucket, and the bucket where the inventory + /// flat file is stored is called the destination bucket. The destination + /// bucket must be in the same Amazon Web Services Region as the source bucket. + /// /// - /// + /// /// - /// To use this operation, you must have permissions to perform the s3:PutAnalyticsConfiguration - /// action. The bucket owner has this permission by default. The bucket owner can grant - /// this permission to others. For more information about permissions, see Permissions - /// Related to Bucket Subresource Operations and Managing - /// Access Permissions to Your Amazon S3 Resources. + /// When you configure an inventory for a source bucket, you specify the destination + /// bucket where you want the inventory to be stored, and whether to generate the inventory + /// daily or weekly. You can also configure what object metadata to include and whether + /// to inventory all object versions or only current versions. For more information, see + /// Amazon + /// S3 Inventory in the Amazon S3 User Guide. /// - /// + /// /// - /// PutBucketAnalyticsConfiguration has the following special errors: + /// You must create a bucket policy on the destination bucket to grant permissions + /// to Amazon S3 to write objects to the bucket in the defined location. For an example + /// policy, see + /// Granting Permissions for Amazon S3 Inventory and Storage Class Analysis. /// - ///
      • + ///
        Permissions
        /// - /// HTTP Error: HTTP 400 Bad Request + /// To use this operation, you must have permission to perform the s3:PutInventoryConfiguration + /// action. The bucket owner has this permission by default and can grant this permission + /// to others. /// - ///
      • + /// /// - /// Code: InvalidArgument + /// The s3:PutInventoryConfiguration permission allows a user to create an S3 + /// Inventory report that includes all object metadata fields available and to specify + /// the destination bucket to store the inventory. A user with read access to objects + /// in the destination bucket can also access all object metadata fields that are available + /// in the inventory report. /// - ///
      • + /// /// - /// Cause: Invalid argument. + /// To restrict access to an inventory report, see Restricting + /// access to an Amazon S3 Inventory report in the Amazon S3 User Guide. For + /// more information about the metadata fields available in S3 Inventory, see Amazon + /// S3 Inventory lists in the Amazon S3 User Guide. For more information about + /// permissions, see Permissions + /// related to bucket subresource operations and Identity + /// and access management in Amazon S3 in the Amazon S3 User Guide. /// - ///
      • + /// /// - /// HTTP Error: HTTP 400 Bad Request + /// PutBucketInventoryConfiguration has the following special errors: /// - ///
      • + ///
        HTTP 400 Bad Request Error
        /// - /// Code: TooManyConfigurations + /// Code: InvalidArgument /// - ///
      • + /// /// - /// Cause: You are attempting to create a new configuration but have already reached - /// the 1,000-configuration limit. + /// Cause: Invalid Argument /// - ///
      • + ///
        HTTP 400 Bad Request Error
        /// - /// HTTP Error: HTTP 403 Forbidden + /// Code: TooManyConfigurations /// - ///
      • + /// /// - /// Code: AccessDenied + /// Cause: You are attempting to create a new configuration but have already reached + /// the 1,000-configuration limit. /// - ///
      • + ///
        HTTP 403 Forbidden Error
        /// - /// Cause: You are not the owner of the specified bucket, or you do not have the s3:PutAnalyticsConfiguration - /// bucket permission to set the configuration on the bucket. + /// Cause: You are not the owner of the specified bucket, or you do not have the + /// s3:PutInventoryConfiguration bucket permission to set the configuration on + /// the bucket. /// - ///
    + /// /// - /// The following operations are related to PutBucketAnalyticsConfiguration: + /// The following operations are related to PutBucketInventoryConfiguration: /// /// ///
    - /// Container for the necessary parameters to execute the PutBucketAnalyticsConfiguration service method. - /// - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// + /// Container for the necessary parameters to execute the PutBucketInventoryConfiguration service method. /// - /// The response from the PutBucketAnalyticsConfiguration service method, as returned by S3. - /// REST API Reference for PutBucketAnalyticsConfiguration Operation - Task PutBucketAnalyticsConfigurationAsync(PutBucketAnalyticsConfigurationRequest request, CancellationToken cancellationToken = default(CancellationToken)); + /// The response from the PutBucketInventoryConfiguration service method, as returned by S3. + /// REST API Reference for PutBucketInventoryConfiguration Operation + PutBucketInventoryConfigurationResponse PutBucketInventoryConfiguration(PutBucketInventoryConfigurationRequest request); - #endregion - - #region PutBucketEncryption /// @@ -18376,58 +18841,119 @@ public partial interface IAmazonS3 : IAmazonService, IDisposable /// /// /// - /// This action uses the encryption subresource to configure default encryption - /// and Amazon S3 Bucket Keys for an existing bucket. + /// This implementation of the PUT action adds an inventory configuration (identified + /// by the inventory ID) to the bucket. You can have up to 1,000 inventory configurations + /// per bucket. /// /// /// - /// By default, all buckets have a default encryption configuration that uses server-side - /// encryption with Amazon S3 managed keys (SSE-S3). You can optionally configure default - /// encryption for a bucket by using server-side encryption with Key Management Service - /// (KMS) keys (SSE-KMS) or dual-layer server-side encryption with Amazon Web Services - /// KMS keys (DSSE-KMS). If you specify default encryption by using SSE-KMS, you can also - /// configure Amazon - /// S3 Bucket Keys. If you use PutBucketEncryption to set your default - /// bucket encryption to SSE-KMS, you should verify that your KMS key ID is correct. - /// Amazon S3 does not validate the KMS key ID provided in PutBucketEncryption requests. + /// Amazon S3 inventory generates inventories of the objects in the bucket on a daily + /// or weekly basis, and the results are published to a flat file. The bucket that is + /// inventoried is called the source bucket, and the bucket where the inventory + /// flat file is stored is called the destination bucket. The destination + /// bucket must be in the same Amazon Web Services Region as the source bucket. + /// + /// + /// + /// + /// When you configure an inventory for a source bucket, you specify the destination + /// bucket where you want the inventory to be stored, and whether to generate the inventory + /// daily or weekly. You can also configure what object metadata to include and whether + /// to inventory all object versions or only current versions. For more information, see + /// Amazon + /// S3 Inventory in the Amazon S3 User Guide. /// /// /// - /// This action requires Amazon Web Services Signature Version 4. For more information, - /// see - /// Authenticating Requests (Amazon Web Services Signature Version 4). + /// You must create a bucket policy on the destination bucket to grant permissions + /// to Amazon S3 to write objects to the bucket in the defined location. For an example + /// policy, see + /// Granting Permissions for Amazon S3 Inventory and Storage Class Analysis. /// - /// + ///
    Permissions
    /// - /// To use this operation, you must have permission to perform the s3:PutEncryptionConfiguration - /// action. The bucket owner has this permission by default. The bucket owner can grant - /// this permission to others. For more information about permissions, see Permissions - /// Related to Bucket Subresource Operations and Managing - /// Access Permissions to Your Amazon S3 Resources in the Amazon S3 User Guide. - /// + /// To use this operation, you must have permission to perform the s3:PutInventoryConfiguration + /// action. The bucket owner has this permission by default and can grant this permission + /// to others. + /// + /// + /// + /// The s3:PutInventoryConfiguration permission allows a user to create an S3 + /// Inventory report that includes all object metadata fields available and to specify + /// the destination bucket to store the inventory. A user with read access to objects + /// in the destination bucket can also access all object metadata fields that are available + /// in the inventory report. + /// + /// + /// + /// To restrict access to an inventory report, see Restricting + /// access to an Amazon S3 Inventory report in the Amazon S3 User Guide. For + /// more information about the metadata fields available in S3 Inventory, see Amazon + /// S3 Inventory lists in the Amazon S3 User Guide. For more information about + /// permissions, see Permissions + /// related to bucket subresource operations and Identity + /// and access management in Amazon S3 in the Amazon S3 User Guide. + /// + ///
    + /// + /// PutBucketInventoryConfiguration has the following special errors: + /// + ///
    HTTP 400 Bad Request Error
    + /// + /// Code: InvalidArgument + /// + /// + /// + /// Cause: Invalid Argument + /// + ///
    HTTP 400 Bad Request Error
    + /// + /// Code: TooManyConfigurations /// /// /// - /// The following operations are related to PutBucketEncryption: + /// Cause: You are attempting to create a new configuration but have already reached + /// the 1,000-configuration limit. + /// + ///
    HTTP 403 Forbidden Error
    + /// + /// Cause: You are not the owner of the specified bucket, or you do not have the + /// s3:PutInventoryConfiguration bucket permission to set the configuration on + /// the bucket. + /// + ///
    + /// + /// The following operations are related to PutBucketInventoryConfiguration: /// /// ///
    - /// Container for the necessary parameters to execute the PutBucketEncryption service method. + /// Container for the necessary parameters to execute the PutBucketInventoryConfiguration service method. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// /// - /// The response from the PutBucketEncryption service method, as returned by S3. - /// REST API Reference for PutBucketEncryption Operation - PutBucketEncryptionResponse PutBucketEncryption(PutBucketEncryptionRequest request); + /// The response from the PutBucketInventoryConfiguration service method, as returned by S3. + /// REST API Reference for PutBucketInventoryConfiguration Operation + Task PutBucketInventoryConfigurationAsync(PutBucketInventoryConfigurationRequest request, CancellationToken cancellationToken = default(CancellationToken)); + #endregion + + #region PutBucketLogging /// @@ -18437,258 +18963,245 @@ public partial interface IAmazonS3 : IAmazonService, IDisposable /// /// /// - /// This action uses the encryption subresource to configure default encryption - /// and Amazon S3 Bucket Keys for an existing bucket. + /// Set the logging parameters for a bucket and to specify permissions for who can view + /// and modify the logging parameters. All logs are saved to buckets in the same Amazon + /// Web Services Region as the source bucket. To set the logging status of a bucket, you + /// must be the bucket owner. /// /// /// - /// By default, all buckets have a default encryption configuration that uses server-side - /// encryption with Amazon S3 managed keys (SSE-S3). You can optionally configure default - /// encryption for a bucket by using server-side encryption with Key Management Service - /// (KMS) keys (SSE-KMS) or dual-layer server-side encryption with Amazon Web Services - /// KMS keys (DSSE-KMS). If you specify default encryption by using SSE-KMS, you can also - /// configure Amazon - /// S3 Bucket Keys. If you use PutBucketEncryption to set your default - /// bucket encryption to SSE-KMS, you should verify that your KMS key ID is correct. - /// Amazon S3 does not validate the KMS key ID provided in PutBucketEncryption requests. + /// The bucket owner is automatically granted FULL_CONTROL to all logs. You use the Grantee + /// request element to grant access to other people. The Permissions request element + /// specifies the kind of access the grantee has to the logs. /// /// /// - /// This action requires Amazon Web Services Signature Version 4. For more information, - /// see - /// Authenticating Requests (Amazon Web Services Signature Version 4). + /// If the target bucket for log delivery uses the bucket owner enforced setting for S3 + /// Object Ownership, you can't use the Grantee request element to grant access + /// to others. Permissions can only be granted using policies. For more information, see + /// Permissions + /// for server access log delivery in the Amazon S3 User Guide. /// - /// + ///
    Grantee Values
    /// - /// To use this operation, you must have permission to perform the s3:PutEncryptionConfiguration - /// action. The bucket owner has this permission by default. The bucket owner can grant - /// this permission to others. For more information about permissions, see Permissions - /// Related to Bucket Subresource Operations and Managing - /// Access Permissions to Your Amazon S3 Resources in the Amazon S3 User Guide. - /// + /// You can specify the person (grantee) to whom you're assigning access rights (by using + /// request elements) in the following ways: + /// + ///
    • + /// + /// By the person's ID: /// /// /// - /// The following operations are related to PutBucketEncryption: + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"><ID><>ID<></ID><DisplayName><>GranteesEmail<></DisplayName> + /// </Grantee> /// - /// - ///
    - /// Container for the necessary parameters to execute the PutBucketEncryption service method. - /// - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// + /// + /// + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="AmazonCustomerByEmail"><EmailAddress><>Grantees@email.com<></EmailAddress></Grantee> /// - /// The response from the PutBucketEncryption service method, as returned by S3. - /// REST API Reference for PutBucketEncryption Operation - Task PutBucketEncryptionAsync(PutBucketEncryptionRequest request, CancellationToken cancellationToken = default(CancellationToken)); - - #endregion - - #region PutBucketIntelligentTieringConfiguration - - - /// - /// + /// + /// /// - /// This operation is not supported by directory buckets. + /// The grantee is resolved to the CanonicalUser and, in a response to a GETObjectAcl + /// request, appears as the CanonicalUser. /// - /// + ///
  • /// - /// Puts a S3 Intelligent-Tiering configuration to the specified bucket. You can have - /// up to 1,000 S3 Intelligent-Tiering configurations per bucket. + /// By URI: /// /// /// - /// The S3 Intelligent-Tiering storage class is designed to optimize storage costs by - /// automatically moving data to the most cost-effective storage access tier, without - /// performance impact or operational overhead. S3 Intelligent-Tiering delivers automatic - /// cost savings in three low latency and high throughput access tiers. To get the lowest - /// storage cost on data that can be accessed in minutes to hours, you can choose to activate - /// additional archiving capabilities. + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Group"><URI><>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<></URI></Grantee> + /// + /// + ///
  • + /// + /// To enable logging, you use LoggingEnabled and its children request elements. + /// To disable logging, you use an empty BucketLoggingStatus request element: /// /// /// - /// The S3 Intelligent-Tiering storage class is the ideal storage class for data with - /// unknown, changing, or unpredictable access patterns, independent of object size or - /// retention period. If the size of an object is less than 128 KB, it is not monitored - /// and not eligible for auto-tiering. Smaller objects can be stored, but they are always - /// charged at the Frequent Access tier rates in the S3 Intelligent-Tiering storage class. + /// <BucketLoggingStatus xmlns="http://doc.s3.amazonaws.com/2006-03-01" /> + /// /// /// /// - /// For more information, see Storage - /// class for automatically optimizing frequently and infrequently accessed objects. + /// For more information about server access logging, see Server + /// Access Logging in the Amazon S3 User Guide. /// /// /// - /// Operations related to PutBucketIntelligentTieringConfiguration include: + /// For more information about creating a bucket, see CreateBucket. + /// For more information about returning the logging status of a bucket, see GetBucketLogging. + /// + /// + /// + /// The following operations are related to PutBucketLogging: /// /// + ///
  • /// - /// You only need S3 Intelligent-Tiering enabled on a bucket if you want to automatically - /// move objects stored in the S3 Intelligent-Tiering storage class to the Archive Access - /// or Deep Archive Access tier. + /// GetBucketLogging + /// /// - /// + ///
  • + ///
    + /// Container for the necessary parameters to execute the PutBucketLogging service method. + /// + /// The response from the PutBucketLogging service method, as returned by S3. + /// REST API Reference for PutBucketLogging Operation + PutBucketLoggingResponse PutBucketLogging(PutBucketLoggingRequest request); + + + + /// + /// /// - /// PutBucketIntelligentTieringConfiguration has the following special errors: + /// This operation is not supported by directory buckets. /// - ///
    HTTP 400 Bad Request Error
    + /// /// - /// Code: InvalidArgument + /// Set the logging parameters for a bucket and to specify permissions for who can view + /// and modify the logging parameters. All logs are saved to buckets in the same Amazon + /// Web Services Region as the source bucket. To set the logging status of a bucket, you + /// must be the bucket owner. /// /// /// - /// Cause: Invalid Argument + /// The bucket owner is automatically granted FULL_CONTROL to all logs. You use the Grantee + /// request element to grant access to other people. The Permissions request element + /// specifies the kind of access the grantee has to the logs. /// - ///
    HTTP 400 Bad Request Error
    + /// /// - /// Code: TooManyConfigurations + /// If the target bucket for log delivery uses the bucket owner enforced setting for S3 + /// Object Ownership, you can't use the Grantee request element to grant access + /// to others. Permissions can only be granted using policies. For more information, see + /// Permissions + /// for server access log delivery in the Amazon S3 User Guide. + /// + ///
    Grantee Values
    + /// + /// You can specify the person (grantee) to whom you're assigning access rights (by using + /// request elements) in the following ways: + /// + ///
    • + /// + /// By the person's ID: /// /// /// - /// Cause: You are attempting to create a new configuration but have already reached - /// the 1,000-configuration limit. + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"><ID><>ID<></ID><DisplayName><>GranteesEmail<></DisplayName> + /// </Grantee> /// - ///
    HTTP 403 Forbidden Error
    + /// /// - /// Cause: You are not the owner of the specified bucket, or you do not have the - /// s3:PutIntelligentTieringConfiguration bucket permission to set the configuration - /// on the bucket. + /// DisplayName is optional and ignored in the request. /// - ///
    - ///
    - /// Container for the necessary parameters to execute the PutBucketIntelligentTieringConfiguration service method. + ///
  • + /// + /// By Email address: + /// + /// + /// + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="AmazonCustomerByEmail"><EmailAddress><>Grantees@email.com<></EmailAddress></Grantee> /// - /// The response from the PutBucketIntelligentTieringConfiguration service method, as returned by S3. - /// REST API Reference for PutBucketIntelligentTieringConfiguration Operation - PutBucketIntelligentTieringConfigurationResponse PutBucketIntelligentTieringConfiguration(PutBucketIntelligentTieringConfigurationRequest request); - - - - /// - /// + /// + /// /// - /// This operation is not supported by directory buckets. + /// The grantee is resolved to the CanonicalUser and, in a response to a GETObjectAcl + /// request, appears as the CanonicalUser. /// - /// + ///
  • /// - /// Puts a S3 Intelligent-Tiering configuration to the specified bucket. You can have - /// up to 1,000 S3 Intelligent-Tiering configurations per bucket. + /// By URI: /// /// /// - /// The S3 Intelligent-Tiering storage class is designed to optimize storage costs by - /// automatically moving data to the most cost-effective storage access tier, without - /// performance impact or operational overhead. S3 Intelligent-Tiering delivers automatic - /// cost savings in three low latency and high throughput access tiers. To get the lowest - /// storage cost on data that can be accessed in minutes to hours, you can choose to activate - /// additional archiving capabilities. + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Group"><URI><>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<></URI></Grantee> + /// + /// + ///
  • + /// + /// To enable logging, you use LoggingEnabled and its children request elements. + /// To disable logging, you use an empty BucketLoggingStatus request element: /// /// /// - /// The S3 Intelligent-Tiering storage class is the ideal storage class for data with - /// unknown, changing, or unpredictable access patterns, independent of object size or - /// retention period. If the size of an object is less than 128 KB, it is not monitored - /// and not eligible for auto-tiering. Smaller objects can be stored, but they are always - /// charged at the Frequent Access tier rates in the S3 Intelligent-Tiering storage class. + /// <BucketLoggingStatus xmlns="http://doc.s3.amazonaws.com/2006-03-01" /> + /// + /// + /// + /// + /// For more information about server access logging, see Server + /// Access Logging in the Amazon S3 User Guide. /// /// /// - /// For more information, see Storage - /// class for automatically optimizing frequently and infrequently accessed objects. + /// For more information about creating a bucket, see CreateBucket. + /// For more information about returning the logging status of a bucket, see GetBucketLogging. /// /// /// - /// Operations related to PutBucketIntelligentTieringConfiguration include: + /// The following operations are related to PutBucketLogging: /// /// - /// - /// You only need S3 Intelligent-Tiering enabled on a bucket if you want to automatically - /// move objects stored in the S3 Intelligent-Tiering storage class to the Archive Access - /// or Deep Archive Access tier. - /// - /// - /// - /// PutBucketIntelligentTieringConfiguration has the following special errors: - /// - ///
    HTTP 400 Bad Request Error
    - /// - /// Code: InvalidArgument - /// - /// - /// - /// Cause: Invalid Argument - /// - ///
    HTTP 400 Bad Request Error
    - /// - /// Code: TooManyConfigurations - /// - /// - /// - /// Cause: You are attempting to create a new configuration but have already reached - /// the 1,000-configuration limit. - /// - ///
    HTTP 403 Forbidden Error
    + ///
  • /// - /// Cause: You are not the owner of the specified bucket, or you do not have the - /// s3:PutIntelligentTieringConfiguration bucket permission to set the configuration - /// on the bucket. + /// GetBucketLogging + /// /// - ///
  • + /// /// - /// Container for the necessary parameters to execute the PutBucketIntelligentTieringConfiguration service method. + /// Container for the necessary parameters to execute the PutBucketLogging service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// - /// The response from the PutBucketIntelligentTieringConfiguration service method, as returned by S3. - /// REST API Reference for PutBucketIntelligentTieringConfiguration Operation - Task PutBucketIntelligentTieringConfigurationAsync(PutBucketIntelligentTieringConfigurationRequest request, CancellationToken cancellationToken = default(CancellationToken)); + /// The response from the PutBucketLogging service method, as returned by S3. + /// REST API Reference for PutBucketLogging Operation + Task PutBucketLoggingAsync(PutBucketLoggingRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion - #region PutBucketInventoryConfiguration + #region PutBucketMetricsConfiguration /// @@ -18698,112 +19211,68 @@ public partial interface IAmazonS3 : IAmazonService, IDisposable /// /// /// - /// This implementation of the PUT action adds an inventory configuration (identified - /// by the inventory ID) to the bucket. You can have up to 1,000 inventory configurations - /// per bucket. - /// - /// - /// - /// Amazon S3 inventory generates inventories of the objects in the bucket on a daily - /// or weekly basis, and the results are published to a flat file. The bucket that is - /// inventoried is called the source bucket, and the bucket where the inventory - /// flat file is stored is called the destination bucket. The destination - /// bucket must be in the same Amazon Web Services Region as the source bucket. - /// - /// - /// - /// - /// When you configure an inventory for a source bucket, you specify the destination - /// bucket where you want the inventory to be stored, and whether to generate the inventory - /// daily or weekly. You can also configure what object metadata to include and whether - /// to inventory all object versions or only current versions. For more information, see - /// Amazon - /// S3 Inventory in the Amazon S3 User Guide. - /// - /// - /// - /// You must create a bucket policy on the destination bucket to grant permissions - /// to Amazon S3 to write objects to the bucket in the defined location. For an example - /// policy, see - /// Granting Permissions for Amazon S3 Inventory and Storage Class Analysis. - /// - ///
    Permissions
    - /// - /// To use this operation, you must have permission to perform the s3:PutInventoryConfiguration - /// action. The bucket owner has this permission by default and can grant this permission - /// to others. + /// Sets a metrics configuration (specified by the metrics configuration ID) for the bucket. + /// You can have up to 1,000 metrics configurations per bucket. If you're updating an + /// existing metrics configuration, note that this is a full replacement of the existing + /// metrics configuration. If you don't include the elements you want to keep, they are + /// erased. /// /// /// - /// The s3:PutInventoryConfiguration permission allows a user to create an S3 - /// Inventory report that includes all object metadata fields available and to specify - /// the destination bucket to store the inventory. A user with read access to objects - /// in the destination bucket can also access all object metadata fields that are available - /// in the inventory report. + /// To use this operation, you must have permissions to perform the s3:PutMetricsConfiguration + /// action. The bucket owner has this permission by default. The bucket owner can grant + /// this permission to others. For more information about permissions, see Permissions + /// Related to Bucket Subresource Operations and Managing + /// Access Permissions to Your Amazon S3 Resources. /// /// /// - /// To restrict access to an inventory report, see Restricting - /// access to an Amazon S3 Inventory report in the Amazon S3 User Guide. For - /// more information about the metadata fields available in S3 Inventory, see Amazon - /// S3 Inventory lists in the Amazon S3 User Guide. For more information about - /// permissions, see Permissions - /// related to bucket subresource operations and Identity - /// and access management in Amazon S3 in the Amazon S3 User Guide. - /// - ///
    - /// - /// PutBucketInventoryConfiguration has the following special errors: - /// - ///
    HTTP 400 Bad Request Error
    - /// - /// Code: InvalidArgument + /// For information about CloudWatch request metrics for Amazon S3, see Monitoring + /// Metrics with Amazon CloudWatch. /// /// /// - /// Cause: Invalid Argument + /// The following operations are related to PutBucketMetricsConfiguration: /// - ///
    HTTP 400 Bad Request Error
    + ///
    HTTP 403 Forbidden Error
    + ///
  • /// - /// Cause: You are not the owner of the specified bucket, or you do not have the - /// s3:PutInventoryConfiguration bucket permission to set the configuration on - /// the bucket. + /// ListBucketMetricsConfigurations + /// /// - ///
  • + /// /// - /// The following operations are related to PutBucketInventoryConfiguration: + /// PutBucketMetricsConfiguration has the following special error: /// /// ///
    - /// Container for the necessary parameters to execute the PutBucketInventoryConfiguration service method. + /// Container for the necessary parameters to execute the PutBucketMetricsConfiguration service method. /// - /// The response from the PutBucketInventoryConfiguration service method, as returned by S3. - /// REST API Reference for PutBucketInventoryConfiguration Operation - PutBucketInventoryConfigurationResponse PutBucketInventoryConfiguration(PutBucketInventoryConfigurationRequest request); + /// The response from the PutBucketMetricsConfiguration service method, as returned by S3. + /// REST API Reference for PutBucketMetricsConfiguration Operation + PutBucketMetricsConfigurationResponse PutBucketMetricsConfiguration(PutBucketMetricsConfigurationRequest request); @@ -18814,119 +19283,75 @@ public partial interface IAmazonS3 : IAmazonService, IDisposable ///
    /// /// - /// This implementation of the PUT action adds an inventory configuration (identified - /// by the inventory ID) to the bucket. You can have up to 1,000 inventory configurations - /// per bucket. - /// - /// - /// - /// Amazon S3 inventory generates inventories of the objects in the bucket on a daily - /// or weekly basis, and the results are published to a flat file. The bucket that is - /// inventoried is called the source bucket, and the bucket where the inventory - /// flat file is stored is called the destination bucket. The destination - /// bucket must be in the same Amazon Web Services Region as the source bucket. - /// - /// - /// - /// - /// When you configure an inventory for a source bucket, you specify the destination - /// bucket where you want the inventory to be stored, and whether to generate the inventory - /// daily or weekly. You can also configure what object metadata to include and whether - /// to inventory all object versions or only current versions. For more information, see - /// Amazon - /// S3 Inventory in the Amazon S3 User Guide. - /// - /// - /// - /// You must create a bucket policy on the destination bucket to grant permissions - /// to Amazon S3 to write objects to the bucket in the defined location. For an example - /// policy, see - /// Granting Permissions for Amazon S3 Inventory and Storage Class Analysis. - /// - ///
    Permissions
    - /// - /// To use this operation, you must have permission to perform the s3:PutInventoryConfiguration - /// action. The bucket owner has this permission by default and can grant this permission - /// to others. + /// Sets a metrics configuration (specified by the metrics configuration ID) for the bucket. + /// You can have up to 1,000 metrics configurations per bucket. If you're updating an + /// existing metrics configuration, note that this is a full replacement of the existing + /// metrics configuration. If you don't include the elements you want to keep, they are + /// erased. /// /// /// - /// The s3:PutInventoryConfiguration permission allows a user to create an S3 - /// Inventory report that includes all object metadata fields available and to specify - /// the destination bucket to store the inventory. A user with read access to objects - /// in the destination bucket can also access all object metadata fields that are available - /// in the inventory report. + /// To use this operation, you must have permissions to perform the s3:PutMetricsConfiguration + /// action. The bucket owner has this permission by default. The bucket owner can grant + /// this permission to others. For more information about permissions, see Permissions + /// Related to Bucket Subresource Operations and Managing + /// Access Permissions to Your Amazon S3 Resources. /// /// /// - /// To restrict access to an inventory report, see Restricting - /// access to an Amazon S3 Inventory report in the Amazon S3 User Guide. For - /// more information about the metadata fields available in S3 Inventory, see Amazon - /// S3 Inventory lists in the Amazon S3 User Guide. For more information about - /// permissions, see Permissions - /// related to bucket subresource operations and Identity - /// and access management in Amazon S3 in the Amazon S3 User Guide. - /// - ///
    - /// - /// PutBucketInventoryConfiguration has the following special errors: - /// - ///
    HTTP 400 Bad Request Error
    - /// - /// Code: InvalidArgument + /// For information about CloudWatch request metrics for Amazon S3, see Monitoring + /// Metrics with Amazon CloudWatch. /// /// /// - /// Cause: Invalid Argument + /// The following operations are related to PutBucketMetricsConfiguration: /// - ///
    HTTP 400 Bad Request Error
    + ///
    HTTP 403 Forbidden Error
    + ///
  • /// - /// Cause: You are not the owner of the specified bucket, or you do not have the - /// s3:PutInventoryConfiguration bucket permission to set the configuration on - /// the bucket. + /// ListBucketMetricsConfigurations + /// /// - ///
  • + /// /// - /// The following operations are related to PutBucketInventoryConfiguration: + /// PutBucketMetricsConfiguration has the following special error: /// /// /// - /// Container for the necessary parameters to execute the PutBucketInventoryConfiguration service method. + /// Container for the necessary parameters to execute the PutBucketMetricsConfiguration service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// - /// The response from the PutBucketInventoryConfiguration service method, as returned by S3. - /// REST API Reference for PutBucketInventoryConfiguration Operation - Task PutBucketInventoryConfigurationAsync(PutBucketInventoryConfigurationRequest request, CancellationToken cancellationToken = default(CancellationToken)); + /// The response from the PutBucketMetricsConfiguration service method, as returned by S3. + /// REST API Reference for PutBucketMetricsConfiguration Operation + Task PutBucketMetricsConfigurationAsync(PutBucketMetricsConfigurationRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion - #region PutBucketLogging + #region PutBucketNotification /// @@ -18936,117 +19361,92 @@ public partial interface IAmazonS3 : IAmazonService, IDisposable /// /// /// - /// Set the logging parameters for a bucket and to specify permissions for who can view - /// and modify the logging parameters. All logs are saved to buckets in the same Amazon - /// Web Services Region as the source bucket. To set the logging status of a bucket, you - /// must be the bucket owner. - /// - /// - /// - /// The bucket owner is automatically granted FULL_CONTROL to all logs. You use the Grantee - /// request element to grant access to other people. The Permissions request element - /// specifies the kind of access the grantee has to the logs. - /// - /// - /// - /// If the target bucket for log delivery uses the bucket owner enforced setting for S3 - /// Object Ownership, you can't use the Grantee request element to grant access - /// to others. Permissions can only be granted using policies. For more information, see - /// Permissions - /// for server access log delivery in the Amazon S3 User Guide. - /// - ///
    Grantee Values
    - /// - /// You can specify the person (grantee) to whom you're assigning access rights (by using - /// request elements) in the following ways: - /// - ///
    • - /// - /// By the person's ID: + /// Enables notifications of specified events for a bucket. For more information about + /// event notifications, see Configuring + /// Event Notifications. /// /// /// - /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"><ID><>ID<></ID><DisplayName><>GranteesEmail<></DisplayName> - /// </Grantee> + /// Using this API, you can replace an existing notification configuration. The configuration + /// is an XML file that defines the event types that you want Amazon S3 to publish and + /// the destination where you want Amazon S3 to publish an event notification when it + /// detects an event of the specified type. /// /// /// - /// DisplayName is optional and ignored in the request. - /// - ///
    • - /// - /// By Email address: + /// By default, your bucket has no event notifications configured. That is, the notification + /// configuration will be an empty NotificationConfiguration. /// /// /// - /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="AmazonCustomerByEmail"><EmailAddress><>Grantees@email.com<></EmailAddress></Grantee> - /// + /// <NotificationConfiguration> /// /// /// - /// The grantee is resolved to the CanonicalUser and, in a response to a GETObjectAcl - /// request, appears as the CanonicalUser. - /// - ///
    • - /// - /// By URI: + /// </NotificationConfiguration> /// /// /// - /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Group"><URI><>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<></URI></Grantee> - /// - /// - ///
    - /// - /// To enable logging, you use LoggingEnabled and its children request elements. - /// To disable logging, you use an empty BucketLoggingStatus request element: + /// This action replaces the existing notification configuration with the configuration + /// you include in the request body. /// /// /// - /// <BucketLoggingStatus xmlns="http://doc.s3.amazonaws.com/2006-03-01" /> - /// + /// After Amazon S3 receives this request, it first verifies that any Amazon Simple Notification + /// Service (Amazon SNS) or Amazon Simple Queue Service (Amazon SQS) destination exists, + /// and that the bucket owner has permission to publish to it by sending a test notification. + /// In the case of Lambda destinations, Amazon S3 verifies that the Lambda function permissions + /// grant Amazon S3 permission to invoke the function from the Amazon S3 bucket. For more + /// information, see Configuring + /// Notifications for Amazon S3 Events. /// /// /// - /// For more information about server access logging, see Server - /// Access Logging in the Amazon S3 User Guide. + /// You can disable notifications by adding the empty NotificationConfiguration element. /// /// /// - /// For more information about creating a bucket, see CreateBucket. - /// For more information about returning the logging status of a bucket, see GetBucketLogging. + /// For more information about the number of event notification configurations that you + /// can create per bucket, see Amazon + /// S3 service quotas in Amazon Web Services General Reference. /// /// /// - /// The following operations are related to PutBucketLogging: + /// By default, only the bucket owner can configure notifications on a bucket. However, + /// bucket owners can use a bucket policy to grant permission to other users to set this + /// configuration with the required s3:PutBucketNotification permission. /// - ///
    • + /// /// - /// PutObject - /// + /// The PUT notification is an atomic operation. For example, suppose your notification + /// configuration includes SNS topic, SQS queue, and Lambda function configurations. When + /// you send a PUT request with this configuration, Amazon S3 sends test messages to your + /// SNS topic. If the message fails, the entire PUT action will fail, and Amazon S3 will + /// not add the configuration to your bucket. /// - ///
    • + /// /// - /// DeleteBucket - /// + /// If the configuration in the request body includes only one TopicConfiguration + /// specifying only the s3:ReducedRedundancyLostObject event type, the response + /// will also include the x-amz-sns-test-message-id header containing the message + /// ID of the test notification sent to the topic. /// - ///
    • + /// /// - /// CreateBucket - /// + /// The following action is related to PutBucketNotificationConfiguration: /// - ///
    • + /// ///
    - /// Container for the necessary parameters to execute the PutBucketLogging service method. + /// Container for the necessary parameters to execute the PutBucketNotification service method. /// - /// The response from the PutBucketLogging service method, as returned by S3. - /// REST API Reference for PutBucketLogging Operation - PutBucketLoggingResponse PutBucketLogging(PutBucketLoggingRequest request); + /// The response from the PutBucketNotification service method, as returned by S3. + /// REST API Reference for PutBucketNotification Operation + PutBucketNotificationResponse PutBucketNotification(PutBucketNotificationRequest request); @@ -19057,124 +19457,99 @@ public partial interface IAmazonS3 : IAmazonService, IDisposable /// /// /// - /// Set the logging parameters for a bucket and to specify permissions for who can view - /// and modify the logging parameters. All logs are saved to buckets in the same Amazon - /// Web Services Region as the source bucket. To set the logging status of a bucket, you - /// must be the bucket owner. - /// - /// - /// - /// The bucket owner is automatically granted FULL_CONTROL to all logs. You use the Grantee - /// request element to grant access to other people. The Permissions request element - /// specifies the kind of access the grantee has to the logs. - /// - /// - /// - /// If the target bucket for log delivery uses the bucket owner enforced setting for S3 - /// Object Ownership, you can't use the Grantee request element to grant access - /// to others. Permissions can only be granted using policies. For more information, see - /// Permissions - /// for server access log delivery in the Amazon S3 User Guide. - /// - ///
    Grantee Values
    - /// - /// You can specify the person (grantee) to whom you're assigning access rights (by using - /// request elements) in the following ways: - /// - ///
    • - /// - /// By the person's ID: + /// Enables notifications of specified events for a bucket. For more information about + /// event notifications, see Configuring + /// Event Notifications. /// /// /// - /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"><ID><>ID<></ID><DisplayName><>GranteesEmail<></DisplayName> - /// </Grantee> + /// Using this API, you can replace an existing notification configuration. The configuration + /// is an XML file that defines the event types that you want Amazon S3 to publish and + /// the destination where you want Amazon S3 to publish an event notification when it + /// detects an event of the specified type. /// /// /// - /// DisplayName is optional and ignored in the request. - /// - ///
    • - /// - /// By Email address: + /// By default, your bucket has no event notifications configured. That is, the notification + /// configuration will be an empty NotificationConfiguration. /// /// /// - /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="AmazonCustomerByEmail"><EmailAddress><>Grantees@email.com<></EmailAddress></Grantee> - /// + /// <NotificationConfiguration> /// /// /// - /// The grantee is resolved to the CanonicalUser and, in a response to a GETObjectAcl - /// request, appears as the CanonicalUser. - /// - ///
    • - /// - /// By URI: + /// </NotificationConfiguration> /// /// /// - /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Group"><URI><>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<></URI></Grantee> - /// - /// - ///
    - /// - /// To enable logging, you use LoggingEnabled and its children request elements. - /// To disable logging, you use an empty BucketLoggingStatus request element: + /// This action replaces the existing notification configuration with the configuration + /// you include in the request body. /// /// /// - /// <BucketLoggingStatus xmlns="http://doc.s3.amazonaws.com/2006-03-01" /> - /// + /// After Amazon S3 receives this request, it first verifies that any Amazon Simple Notification + /// Service (Amazon SNS) or Amazon Simple Queue Service (Amazon SQS) destination exists, + /// and that the bucket owner has permission to publish to it by sending a test notification. + /// In the case of Lambda destinations, Amazon S3 verifies that the Lambda function permissions + /// grant Amazon S3 permission to invoke the function from the Amazon S3 bucket. For more + /// information, see Configuring + /// Notifications for Amazon S3 Events. /// /// /// - /// For more information about server access logging, see Server - /// Access Logging in the Amazon S3 User Guide. + /// You can disable notifications by adding the empty NotificationConfiguration element. /// /// /// - /// For more information about creating a bucket, see CreateBucket. - /// For more information about returning the logging status of a bucket, see GetBucketLogging. + /// For more information about the number of event notification configurations that you + /// can create per bucket, see Amazon + /// S3 service quotas in Amazon Web Services General Reference. /// /// /// - /// The following operations are related to PutBucketLogging: + /// By default, only the bucket owner can configure notifications on a bucket. However, + /// bucket owners can use a bucket policy to grant permission to other users to set this + /// configuration with the required s3:PutBucketNotification permission. /// - ///
    • + /// /// - /// PutObject - /// + /// The PUT notification is an atomic operation. For example, suppose your notification + /// configuration includes SNS topic, SQS queue, and Lambda function configurations. When + /// you send a PUT request with this configuration, Amazon S3 sends test messages to your + /// SNS topic. If the message fails, the entire PUT action will fail, and Amazon S3 will + /// not add the configuration to your bucket. /// - ///
    • + /// /// - /// DeleteBucket - /// + /// If the configuration in the request body includes only one TopicConfiguration + /// specifying only the s3:ReducedRedundancyLostObject event type, the response + /// will also include the x-amz-sns-test-message-id header containing the message + /// ID of the test notification sent to the topic. /// - ///
    • + /// /// - /// CreateBucket - /// + /// The following action is related to PutBucketNotificationConfiguration: /// - ///
    • + /// /// - /// Container for the necessary parameters to execute the PutBucketLogging service method. + /// Container for the necessary parameters to execute the PutBucketNotification service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// - /// The response from the PutBucketLogging service method, as returned by S3. - /// REST API Reference for PutBucketLogging Operation - Task PutBucketLoggingAsync(PutBucketLoggingRequest request, CancellationToken cancellationToken = default(CancellationToken)); + /// The response from the PutBucketNotification service method, as returned by S3. + /// REST API Reference for PutBucketNotification Operation + Task PutBucketNotificationAsync(PutBucketNotificationRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion - #region PutBucketMetricsConfiguration + #region PutBucketOwnershipControls /// @@ -19184,430 +19559,446 @@ public partial interface IAmazonS3 : IAmazonService, IDisposable /// /// /// - /// Sets a metrics configuration (specified by the metrics configuration ID) for the bucket. - /// You can have up to 1,000 metrics configurations per bucket. If you're updating an - /// existing metrics configuration, note that this is a full replacement of the existing - /// metrics configuration. If you don't include the elements you want to keep, they are - /// erased. - /// - /// - /// - /// To use this operation, you must have permissions to perform the s3:PutMetricsConfiguration - /// action. The bucket owner has this permission by default. The bucket owner can grant - /// this permission to others. For more information about permissions, see Permissions - /// Related to Bucket Subresource Operations and Managing - /// Access Permissions to Your Amazon S3 Resources. + /// Creates or modifies OwnershipControls for an Amazon S3 bucket. To use this + /// operation, you must have the s3:PutBucketOwnershipControls permission. For + /// more information about Amazon S3 permissions, see Specifying + /// permissions in a policy. /// /// /// - /// For information about CloudWatch request metrics for Amazon S3, see Monitoring - /// Metrics with Amazon CloudWatch. + /// For information about Amazon S3 Object Ownership, see Using + /// object ownership. /// /// /// - /// The following operations are related to PutBucketMetricsConfiguration: + /// The following operations are related to PutBucketOwnershipControls: /// /// + /// + /// Container for the necessary parameters to execute the PutBucketOwnershipControls service method. /// + /// The response from the PutBucketOwnershipControls service method, as returned by S3. + /// REST API Reference for PutBucketOwnershipControls Operation + PutBucketOwnershipControlsResponse PutBucketOwnershipControls(PutBucketOwnershipControlsRequest request); + + + + /// + /// + /// + /// This operation is not supported by directory buckets. /// - ///
    • + /// /// - /// ListBucketMetricsConfigurations - /// + /// Creates or modifies OwnershipControls for an Amazon S3 bucket. To use this + /// operation, you must have the s3:PutBucketOwnershipControls permission. For + /// more information about Amazon S3 permissions, see Specifying + /// permissions in a policy. /// - ///
    + /// /// - /// PutBucketMetricsConfiguration has the following special error: + /// For information about Amazon S3 Object Ownership, see Using + /// object ownership. /// - ///
    • + /// /// - /// Error code: TooManyConfigurations + /// The following operations are related to PutBucketOwnershipControls: /// ///
    + /// /// - /// Container for the necessary parameters to execute the PutBucketMetricsConfiguration service method. + /// Container for the necessary parameters to execute the PutBucketOwnershipControls service method. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// /// - /// The response from the PutBucketMetricsConfiguration service method, as returned by S3. - /// REST API Reference for PutBucketMetricsConfiguration Operation - PutBucketMetricsConfigurationResponse PutBucketMetricsConfiguration(PutBucketMetricsConfigurationRequest request); + /// The response from the PutBucketOwnershipControls service method, as returned by S3. + /// REST API Reference for PutBucketOwnershipControls Operation + Task PutBucketOwnershipControlsAsync(PutBucketOwnershipControlsRequest request, CancellationToken cancellationToken = default(CancellationToken)); + #endregion + + #region PutBucketPolicy /// - /// + /// Applies an Amazon S3 bucket policy to an Amazon S3 bucket. + /// + /// /// - /// This operation is not supported by directory buckets. + /// Directory buckets - For directory buckets, you must make requests for this + /// API operation to the Regional endpoint. These endpoints support path-style requests + /// in the format https://s3express-control.region_code.amazonaws.com/bucket-name + /// . Virtual-hosted-style requests aren't supported. For more information, see Regional + /// and Zonal endpoints in the Amazon S3 User Guide. /// - /// + ///
    Permissions
    /// - /// Sets a metrics configuration (specified by the metrics configuration ID) for the bucket. - /// You can have up to 1,000 metrics configurations per bucket. If you're updating an - /// existing metrics configuration, note that this is a full replacement of the existing - /// metrics configuration. If you don't include the elements you want to keep, they are - /// erased. + /// If you are using an identity other than the root user of the Amazon Web Services account + /// that owns the bucket, the calling identity must both have the PutBucketPolicy + /// permissions on the specified bucket and belong to the bucket owner's account in order + /// to use this operation. /// /// /// - /// To use this operation, you must have permissions to perform the s3:PutMetricsConfiguration - /// action. The bucket owner has this permission by default. The bucket owner can grant - /// this permission to others. For more information about permissions, see Permissions - /// Related to Bucket Subresource Operations and Managing - /// Access Permissions to Your Amazon S3 Resources. + /// If you don't have PutBucketPolicy permissions, Amazon S3 returns a 403 Access + /// Denied error. If you have the correct permissions, but you're not using an identity + /// that belongs to the bucket owner's account, Amazon S3 returns a 405 Method Not + /// Allowed error. /// - /// + /// /// - /// For information about CloudWatch request metrics for Amazon S3, see Monitoring - /// Metrics with Amazon CloudWatch. + /// To ensure that bucket owners don't inadvertently lock themselves out of their own + /// buckets, the root principal in a bucket owner's Amazon Web Services account can perform + /// the GetBucketPolicy, PutBucketPolicy, and DeleteBucketPolicy + /// API actions, even if their bucket policy explicitly denies the root principal's access. + /// Bucket owner root principals can only be blocked from performing these API actions + /// by VPC endpoint policies and Amazon Web Services Organizations policies. /// - /// + ///
    • /// - /// The following operations are related to PutBucketMetricsConfiguration: + /// General purpose bucket permissions - The s3:PutBucketPolicy permission + /// is required in a policy. For more information about general purpose buckets bucket + /// policies, see Using + /// Bucket Policies and User Policies in the Amazon S3 User Guide. /// - ///
      • + ///
      • /// - /// DeleteBucketMetricsConfiguration - /// + /// Directory bucket permissions - To grant access to this API operation, you + /// must have the s3express:PutBucketPolicy permission in an IAM identity-based + /// policy instead of a bucket policy. Cross-account access to this API operation isn't + /// supported. This operation can only be performed by the Amazon Web Services account + /// that owns the resource. For more information about directory bucket policies and permissions, + /// see Amazon + /// Web Services Identity and Access Management (IAM) for S3 Express One Zone in the + /// Amazon S3 User Guide. /// - ///
      • + ///
    Example bucket policies
    /// - /// GetBucketMetricsConfiguration - /// + /// General purpose buckets example bucket policies - See Bucket + /// policy examples in the Amazon S3 User Guide. /// - ///
  • + /// /// - /// ListBucketMetricsConfigurations - /// + /// Directory bucket example bucket policies - See Example + /// bucket policies for S3 Express One Zone in the Amazon S3 User Guide. /// - ///
  • + ///
    HTTP Host header syntax
    /// - /// PutBucketMetricsConfiguration has the following special error: + /// Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com. /// - ///
    • + ///
    /// - /// Error code: TooManyConfigurations + /// The following operations are related to PutBucketPolicy: /// ///
    • /// - /// Description: You are attempting to create a new configuration but have already reached - /// the 1,000-configuration limit. + /// CreateBucket + /// /// ///
    • /// - /// HTTP Status Code: HTTP 400 Bad Request + /// DeleteBucket + /// /// - ///
    + /// ///
    - /// Container for the necessary parameters to execute the PutBucketMetricsConfiguration service method. - /// - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// + /// The name of the bucket. Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region_code.amazonaws.com/bucket-name . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must also follow the format bucket_base_name--az_id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide + /// The bucket policy as a JSON document. For directory buckets, the only IAM action supported in the bucket policy is s3express:CreateSession. /// - /// The response from the PutBucketMetricsConfiguration service method, as returned by S3. - /// REST API Reference for PutBucketMetricsConfiguration Operation - Task PutBucketMetricsConfigurationAsync(PutBucketMetricsConfigurationRequest request, CancellationToken cancellationToken = default(CancellationToken)); - - #endregion - - #region PutBucketNotification - + /// The response from the PutBucketPolicy service method, as returned by S3. + /// REST API Reference for PutBucketPolicy Operation + PutBucketPolicyResponse PutBucketPolicy(string bucketName, string policy); /// - /// - /// - /// This operation is not supported by directory buckets. - /// - /// - /// - /// Enables notifications of specified events for a bucket. For more information about - /// event notifications, see Configuring - /// Event Notifications. - /// - /// - /// - /// Using this API, you can replace an existing notification configuration. The configuration - /// is an XML file that defines the event types that you want Amazon S3 to publish and - /// the destination where you want Amazon S3 to publish an event notification when it - /// detects an event of the specified type. - /// - /// + /// Applies an Amazon S3 bucket policy to an Amazon S3 bucket. + /// + /// /// - /// By default, your bucket has no event notifications configured. That is, the notification - /// configuration will be an empty NotificationConfiguration. + /// Directory buckets - For directory buckets, you must make requests for this + /// API operation to the Regional endpoint. These endpoints support path-style requests + /// in the format https://s3express-control.region_code.amazonaws.com/bucket-name + /// . Virtual-hosted-style requests aren't supported. For more information, see Regional + /// and Zonal endpoints in the Amazon S3 User Guide. /// - /// + ///
    Permissions
    /// - /// <NotificationConfiguration> + /// If you are using an identity other than the root user of the Amazon Web Services account + /// that owns the bucket, the calling identity must both have the PutBucketPolicy + /// permissions on the specified bucket and belong to the bucket owner's account in order + /// to use this operation. /// /// /// - /// </NotificationConfiguration> + /// If you don't have PutBucketPolicy permissions, Amazon S3 returns a 403 Access + /// Denied error. If you have the correct permissions, but you're not using an identity + /// that belongs to the bucket owner's account, Amazon S3 returns a 405 Method Not + /// Allowed error. /// - /// + /// /// - /// This action replaces the existing notification configuration with the configuration - /// you include in the request body. + /// To ensure that bucket owners don't inadvertently lock themselves out of their own + /// buckets, the root principal in a bucket owner's Amazon Web Services account can perform + /// the GetBucketPolicy, PutBucketPolicy, and DeleteBucketPolicy + /// API actions, even if their bucket policy explicitly denies the root principal's access. + /// Bucket owner root principals can only be blocked from performing these API actions + /// by VPC endpoint policies and Amazon Web Services Organizations policies. /// - /// + ///
    • /// - /// After Amazon S3 receives this request, it first verifies that any Amazon Simple Notification - /// Service (Amazon SNS) or Amazon Simple Queue Service (Amazon SQS) destination exists, - /// and that the bucket owner has permission to publish to it by sending a test notification. - /// In the case of Lambda destinations, Amazon S3 verifies that the Lambda function permissions - /// grant Amazon S3 permission to invoke the function from the Amazon S3 bucket. For more - /// information, see Configuring - /// Notifications for Amazon S3 Events. + /// General purpose bucket permissions - The s3:PutBucketPolicy permission + /// is required in a policy. For more information about general purpose buckets bucket + /// policies, see Using + /// Bucket Policies and User Policies in the Amazon S3 User Guide. /// - /// + ///
    • /// - /// You can disable notifications by adding the empty NotificationConfiguration element. + /// Directory bucket permissions - To grant access to this API operation, you + /// must have the s3express:PutBucketPolicy permission in an IAM identity-based + /// policy instead of a bucket policy. Cross-account access to this API operation isn't + /// supported. This operation can only be performed by the Amazon Web Services account + /// that owns the resource. For more information about directory bucket policies and permissions, + /// see Amazon + /// Web Services Identity and Access Management (IAM) for S3 Express One Zone in the + /// Amazon S3 User Guide. /// - /// + ///
    Example bucket policies
    /// - /// For more information about the number of event notification configurations that you - /// can create per bucket, see Amazon - /// S3 service quotas in Amazon Web Services General Reference. + /// General purpose buckets example bucket policies - See Bucket + /// policy examples in the Amazon S3 User Guide. /// /// /// - /// By default, only the bucket owner can configure notifications on a bucket. However, - /// bucket owners can use a bucket policy to grant permission to other users to set this - /// configuration with the required s3:PutBucketNotification permission. + /// Directory bucket example bucket policies - See Example + /// bucket policies for S3 Express One Zone in the Amazon S3 User Guide. /// - /// + ///
    HTTP Host header syntax
    /// - /// The PUT notification is an atomic operation. For example, suppose your notification - /// configuration includes SNS topic, SQS queue, and Lambda function configurations. When - /// you send a PUT request with this configuration, Amazon S3 sends test messages to your - /// SNS topic. If the message fails, the entire PUT action will fail, and Amazon S3 will - /// not add the configuration to your bucket. + /// Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com. /// - /// + ///
    /// - /// If the configuration in the request body includes only one TopicConfiguration - /// specifying only the s3:ReducedRedundancyLostObject event type, the response - /// will also include the x-amz-sns-test-message-id header containing the message - /// ID of the test notification sent to the topic. + /// The following operations are related to PutBucketPolicy: /// - /// + ///
    - /// Container for the necessary parameters to execute the PutBucketNotification service method. + /// The name of the bucket. Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region_code.amazonaws.com/bucket-name . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must also follow the format bucket_base_name--az_id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide + /// The bucket policy as a JSON document. For directory buckets, the only IAM action supported in the bucket policy is s3express:CreateSession. + /// The MD5 hash of the request body. For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically. This functionality is not supported for directory buckets. /// - /// The response from the PutBucketNotification service method, as returned by S3. - /// REST API Reference for PutBucketNotification Operation - PutBucketNotificationResponse PutBucketNotification(PutBucketNotificationRequest request); - - + /// The response from the PutBucketPolicy service method, as returned by S3. + /// REST API Reference for PutBucketPolicy Operation + PutBucketPolicyResponse PutBucketPolicy(string bucketName, string policy, string contentMD5); /// - /// - /// - /// This operation is not supported by directory buckets. - /// - /// - /// - /// Enables notifications of specified events for a bucket. For more information about - /// event notifications, see Configuring - /// Event Notifications. - /// - /// - /// - /// Using this API, you can replace an existing notification configuration. The configuration - /// is an XML file that defines the event types that you want Amazon S3 to publish and - /// the destination where you want Amazon S3 to publish an event notification when it - /// detects an event of the specified type. - /// - /// + /// Applies an Amazon S3 bucket policy to an Amazon S3 bucket. + /// + /// /// - /// By default, your bucket has no event notifications configured. That is, the notification - /// configuration will be an empty NotificationConfiguration. + /// Directory buckets - For directory buckets, you must make requests for this + /// API operation to the Regional endpoint. These endpoints support path-style requests + /// in the format https://s3express-control.region_code.amazonaws.com/bucket-name + /// . Virtual-hosted-style requests aren't supported. For more information, see Regional + /// and Zonal endpoints in the Amazon S3 User Guide. /// - /// + ///
    Permissions
    /// - /// <NotificationConfiguration> + /// If you are using an identity other than the root user of the Amazon Web Services account + /// that owns the bucket, the calling identity must both have the PutBucketPolicy + /// permissions on the specified bucket and belong to the bucket owner's account in order + /// to use this operation. /// /// /// - /// </NotificationConfiguration> + /// If you don't have PutBucketPolicy permissions, Amazon S3 returns a 403 Access + /// Denied error. If you have the correct permissions, but you're not using an identity + /// that belongs to the bucket owner's account, Amazon S3 returns a 405 Method Not + /// Allowed error. /// - /// + /// /// - /// This action replaces the existing notification configuration with the configuration - /// you include in the request body. + /// To ensure that bucket owners don't inadvertently lock themselves out of their own + /// buckets, the root principal in a bucket owner's Amazon Web Services account can perform + /// the GetBucketPolicy, PutBucketPolicy, and DeleteBucketPolicy + /// API actions, even if their bucket policy explicitly denies the root principal's access. + /// Bucket owner root principals can only be blocked from performing these API actions + /// by VPC endpoint policies and Amazon Web Services Organizations policies. /// - /// + ///
    • /// - /// After Amazon S3 receives this request, it first verifies that any Amazon Simple Notification - /// Service (Amazon SNS) or Amazon Simple Queue Service (Amazon SQS) destination exists, - /// and that the bucket owner has permission to publish to it by sending a test notification. - /// In the case of Lambda destinations, Amazon S3 verifies that the Lambda function permissions - /// grant Amazon S3 permission to invoke the function from the Amazon S3 bucket. For more - /// information, see Configuring - /// Notifications for Amazon S3 Events. + /// General purpose bucket permissions - The s3:PutBucketPolicy permission + /// is required in a policy. For more information about general purpose buckets bucket + /// policies, see Using + /// Bucket Policies and User Policies in the Amazon S3 User Guide. /// - /// + ///
    • /// - /// You can disable notifications by adding the empty NotificationConfiguration element. + /// Directory bucket permissions - To grant access to this API operation, you + /// must have the s3express:PutBucketPolicy permission in an IAM identity-based + /// policy instead of a bucket policy. Cross-account access to this API operation isn't + /// supported. This operation can only be performed by the Amazon Web Services account + /// that owns the resource. For more information about directory bucket policies and permissions, + /// see Amazon + /// Web Services Identity and Access Management (IAM) for S3 Express One Zone in the + /// Amazon S3 User Guide. /// - /// + ///
    Example bucket policies
    /// - /// For more information about the number of event notification configurations that you - /// can create per bucket, see Amazon - /// S3 service quotas in Amazon Web Services General Reference. + /// General purpose buckets example bucket policies - See Bucket + /// policy examples in the Amazon S3 User Guide. /// /// /// - /// By default, only the bucket owner can configure notifications on a bucket. However, - /// bucket owners can use a bucket policy to grant permission to other users to set this - /// configuration with the required s3:PutBucketNotification permission. + /// Directory bucket example bucket policies - See Example + /// bucket policies for S3 Express One Zone in the Amazon S3 User Guide. /// - /// + ///
    HTTP Host header syntax
    /// - /// The PUT notification is an atomic operation. For example, suppose your notification - /// configuration includes SNS topic, SQS queue, and Lambda function configurations. When - /// you send a PUT request with this configuration, Amazon S3 sends test messages to your - /// SNS topic. If the message fails, the entire PUT action will fail, and Amazon S3 will - /// not add the configuration to your bucket. + /// Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com. /// - /// + ///
    /// - /// If the configuration in the request body includes only one TopicConfiguration - /// specifying only the s3:ReducedRedundancyLostObject event type, the response - /// will also include the x-amz-sns-test-message-id header containing the message - /// ID of the test notification sent to the topic. + /// The following operations are related to PutBucketPolicy: /// - /// + ///
    - /// Container for the necessary parameters to execute the PutBucketNotification service method. - /// - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// + /// Container for the necessary parameters to execute the PutBucketPolicy service method. /// - /// The response from the PutBucketNotification service method, as returned by S3. - /// REST API Reference for PutBucketNotification Operation - Task PutBucketNotificationAsync(PutBucketNotificationRequest request, CancellationToken cancellationToken = default(CancellationToken)); - - #endregion - - #region PutBucketOwnershipControls + /// The response from the PutBucketPolicy service method, as returned by S3. + /// REST API Reference for PutBucketPolicy Operation + PutBucketPolicyResponse PutBucketPolicy(PutBucketPolicyRequest request); /// - /// + /// Applies an Amazon S3 bucket policy to an Amazon S3 bucket. + /// + /// /// - /// This operation is not supported by directory buckets. + /// Directory buckets - For directory buckets, you must make requests for this + /// API operation to the Regional endpoint. These endpoints support path-style requests + /// in the format https://s3express-control.region_code.amazonaws.com/bucket-name + /// . Virtual-hosted-style requests aren't supported. For more information, see Regional + /// and Zonal endpoints in the Amazon S3 User Guide. /// - /// + ///
    Permissions
    /// - /// Creates or modifies OwnershipControls for an Amazon S3 bucket. To use this - /// operation, you must have the s3:PutBucketOwnershipControls permission. For - /// more information about Amazon S3 permissions, see Specifying - /// permissions in a policy. + /// If you are using an identity other than the root user of the Amazon Web Services account + /// that owns the bucket, the calling identity must both have the PutBucketPolicy + /// permissions on the specified bucket and belong to the bucket owner's account in order + /// to use this operation. /// /// /// - /// For information about Amazon S3 Object Ownership, see Using - /// object ownership. + /// If you don't have PutBucketPolicy permissions, Amazon S3 returns a 403 Access + /// Denied error. If you have the correct permissions, but you're not using an identity + /// that belongs to the bucket owner's account, Amazon S3 returns a 405 Method Not + /// Allowed error. /// - /// + /// /// - /// The following operations are related to PutBucketOwnershipControls: + /// To ensure that bucket owners don't inadvertently lock themselves out of their own + /// buckets, the root principal in a bucket owner's Amazon Web Services account can perform + /// the GetBucketPolicy, PutBucketPolicy, and DeleteBucketPolicy + /// API actions, even if their bucket policy explicitly denies the root principal's access. + /// Bucket owner root principals can only be blocked from performing these API actions + /// by VPC endpoint policies and Amazon Web Services Organizations policies. /// - ///
    - /// Container for the necessary parameters to execute the PutBucketOwnershipControls service method. - /// - /// The response from the PutBucketOwnershipControls service method, as returned by S3. - /// REST API Reference for PutBucketOwnershipControls Operation - PutBucketOwnershipControlsResponse PutBucketOwnershipControls(PutBucketOwnershipControlsRequest request); - - - - /// - /// - /// - /// This operation is not supported by directory buckets. + /// Directory bucket permissions - To grant access to this API operation, you + /// must have the s3express:PutBucketPolicy permission in an IAM identity-based + /// policy instead of a bucket policy. Cross-account access to this API operation isn't + /// supported. This operation can only be performed by the Amazon Web Services account + /// that owns the resource. For more information about directory bucket policies and permissions, + /// see Amazon + /// Web Services Identity and Access Management (IAM) for S3 Express One Zone in the + /// Amazon S3 User Guide. /// - /// + ///
    Example bucket policies
    /// - /// Creates or modifies OwnershipControls for an Amazon S3 bucket. To use this - /// operation, you must have the s3:PutBucketOwnershipControls permission. For - /// more information about Amazon S3 permissions, see Specifying - /// permissions in a policy. + /// General purpose buckets example bucket policies - See Bucket + /// policy examples in the Amazon S3 User Guide. /// /// /// - /// For information about Amazon S3 Object Ownership, see Using - /// object ownership. + /// Directory bucket example bucket policies - See Example + /// bucket policies for S3 Express One Zone in the Amazon S3 User Guide. /// - /// + ///
    HTTP Host header syntax
    /// - /// The following operations are related to PutBucketOwnershipControls: + /// Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com. + /// + ///
    + /// + /// The following operations are related to PutBucketPolicy: /// /// ///
    - /// Container for the necessary parameters to execute the PutBucketOwnershipControls service method. + /// The name of the bucket. Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region_code.amazonaws.com/bucket-name . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must also follow the format bucket_base_name--az_id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide + /// The bucket policy as a JSON document. For directory buckets, the only IAM action supported in the bucket policy is s3express:CreateSession. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// - /// The response from the PutBucketOwnershipControls service method, as returned by S3. - /// REST API Reference for PutBucketOwnershipControls Operation - Task PutBucketOwnershipControlsAsync(PutBucketOwnershipControlsRequest request, CancellationToken cancellationToken = default(CancellationToken)); - - #endregion - - #region PutBucketPolicy - + /// The response from the PutBucketPolicy service method, as returned by S3. + /// REST API Reference for PutBucketPolicy Operation + Task PutBucketPolicyAsync(string bucketName, string policy, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); /// /// Applies an Amazon S3 bucket policy to an Amazon S3 bucket. @@ -19694,10 +20085,15 @@ public partial interface IAmazonS3 : IAmazonService, IDisposable /// /// The name of the bucket. Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region_code.amazonaws.com/bucket-name . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must also follow the format bucket_base_name--az_id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide /// The bucket policy as a JSON document. For directory buckets, the only IAM action supported in the bucket policy is s3express:CreateSession. + /// The MD5 hash of the request body. For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically. This functionality is not supported for directory buckets. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// /// /// The response from the PutBucketPolicy service method, as returned by S3. /// REST API Reference for PutBucketPolicy Operation - PutBucketPolicyResponse PutBucketPolicy(string bucketName, string policy); + Task PutBucketPolicyAsync(string bucketName, string policy, string contentMD5, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); + /// /// Applies an Amazon S3 bucket policy to an Amazon S3 bucket. @@ -19766,100 +20162,300 @@ public partial interface IAmazonS3 : IAmazonService, IDisposable /// /// Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com. /// - /// + /// + /// + /// The following operations are related to PutBucketPolicy: + /// + /// + /// + /// Container for the necessary parameters to execute the PutBucketPolicy service method. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// + /// The response from the PutBucketPolicy service method, as returned by S3. + /// REST API Reference for PutBucketPolicy Operation + Task PutBucketPolicyAsync(PutBucketPolicyRequest request, CancellationToken cancellationToken = default(CancellationToken)); + + #endregion + + #region PutBucketReplication + + + /// + /// + /// + /// This operation is not supported by directory buckets. + /// + /// + /// + /// Creates a replication configuration or replaces an existing one. For more information, + /// see Replication + /// in the Amazon S3 User Guide. + /// + /// + /// + /// Specify the replication configuration in the request body. In the replication configuration, + /// you provide the name of the destination bucket or buckets where you want Amazon S3 + /// to replicate objects, the IAM role that Amazon S3 can assume to replicate objects + /// on your behalf, and other relevant information. You can invoke this request for a + /// specific Amazon Web Services Region by using the + /// aws:RequestedRegion condition key. + /// + /// + /// + /// A replication configuration must include at least one rule, and can contain a maximum + /// of 1,000. Each rule identifies a subset of objects to replicate by filtering the objects + /// in the source bucket. To choose additional subsets of objects to replicate, add a + /// rule for each subset. + /// + /// + /// + /// To specify a subset of the objects in the source bucket to apply a replication rule + /// to, add the Filter element as a child of the Rule element. You can filter objects + /// based on an object key prefix, one or more object tags, or both. When you add the + /// Filter element in the configuration, you must also add the following elements: DeleteMarkerReplication, + /// Status, and Priority. + /// + /// + /// + /// If you are using an earlier version of the replication configuration, Amazon S3 handles + /// replication of delete markers differently. For more information, see Backward + /// Compatibility. + /// + /// + /// + /// For information about enabling versioning on a bucket, see Using + /// Versioning. + /// + ///
    Handling Replication of Encrypted Objects
    + /// + /// By default, Amazon S3 doesn't replicate objects that are stored at rest using server-side + /// encryption with KMS keys. To replicate Amazon Web Services KMS-encrypted objects, + /// add the following: SourceSelectionCriteria, SseKmsEncryptedObjects, + /// Status, EncryptionConfiguration, and ReplicaKmsKeyID. For information + /// about replication configuration, see Replicating + /// Objects Created with SSE Using KMS keys. + /// + /// + /// + /// For information on PutBucketReplication errors, see List + /// of replication-related error codes + /// + ///
    Permissions
    + /// + /// To create a PutBucketReplication request, you must have s3:PutReplicationConfiguration + /// permissions for the bucket. + /// + /// + /// + /// By default, a resource owner, in this case the Amazon Web Services account that created + /// the bucket, can perform this operation. The resource owner can also grant others permissions + /// to perform the operation. For more information about permissions, see Specifying + /// Permissions in a Policy and Managing + /// Access Permissions to Your Amazon S3 Resources. + /// + /// + /// + /// To perform this operation, the user or role performing the action must have the iam:PassRole + /// permission. + /// + ///
    + /// + /// The following operations are related to PutBucketReplication: + /// + /// + ///
    + /// Container for the necessary parameters to execute the PutBucketReplication service method. + /// + /// The response from the PutBucketReplication service method, as returned by S3. + /// REST API Reference for PutBucketReplication Operation + PutBucketReplicationResponse PutBucketReplication(PutBucketReplicationRequest request); + + + + /// + /// + /// + /// This operation is not supported by directory buckets. + /// + /// + /// + /// Creates a replication configuration or replaces an existing one. For more information, + /// see Replication + /// in the Amazon S3 User Guide. + /// + /// + /// + /// Specify the replication configuration in the request body. In the replication configuration, + /// you provide the name of the destination bucket or buckets where you want Amazon S3 + /// to replicate objects, the IAM role that Amazon S3 can assume to replicate objects + /// on your behalf, and other relevant information. You can invoke this request for a + /// specific Amazon Web Services Region by using the + /// aws:RequestedRegion condition key. + /// + /// + /// + /// A replication configuration must include at least one rule, and can contain a maximum + /// of 1,000. Each rule identifies a subset of objects to replicate by filtering the objects + /// in the source bucket. To choose additional subsets of objects to replicate, add a + /// rule for each subset. + /// + /// + /// + /// To specify a subset of the objects in the source bucket to apply a replication rule + /// to, add the Filter element as a child of the Rule element. You can filter objects + /// based on an object key prefix, one or more object tags, or both. When you add the + /// Filter element in the configuration, you must also add the following elements: DeleteMarkerReplication, + /// Status, and Priority. + /// + /// + /// + /// If you are using an earlier version of the replication configuration, Amazon S3 handles + /// replication of delete markers differently. For more information, see Backward + /// Compatibility. + /// + /// + /// + /// For information about enabling versioning on a bucket, see Using + /// Versioning. + /// + ///
    Handling Replication of Encrypted Objects
    + /// + /// By default, Amazon S3 doesn't replicate objects that are stored at rest using server-side + /// encryption with KMS keys. To replicate Amazon Web Services KMS-encrypted objects, + /// add the following: SourceSelectionCriteria, SseKmsEncryptedObjects, + /// Status, EncryptionConfiguration, and ReplicaKmsKeyID. For information + /// about replication configuration, see Replicating + /// Objects Created with SSE Using KMS keys. + /// + /// + /// + /// For information on PutBucketReplication errors, see List + /// of replication-related error codes + /// + ///
    Permissions
    + /// + /// To create a PutBucketReplication request, you must have s3:PutReplicationConfiguration + /// permissions for the bucket. + /// + /// + /// + /// By default, a resource owner, in this case the Amazon Web Services account that created + /// the bucket, can perform this operation. The resource owner can also grant others permissions + /// to perform the operation. For more information about permissions, see Specifying + /// Permissions in a Policy and Managing + /// Access Permissions to Your Amazon S3 Resources. + /// + /// + /// + /// To perform this operation, the user or role performing the action must have the iam:PassRole + /// permission. + /// + ///
    /// - /// The following operations are related to PutBucketPolicy: + /// The following operations are related to PutBucketReplication: /// /// ///
    - /// The name of the bucket. Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region_code.amazonaws.com/bucket-name . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must also follow the format bucket_base_name--az_id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide - /// The bucket policy as a JSON document. For directory buckets, the only IAM action supported in the bucket policy is s3express:CreateSession. - /// The MD5 hash of the request body. For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically. This functionality is not supported for directory buckets. + /// Container for the necessary parameters to execute the PutBucketReplication service method. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// /// - /// The response from the PutBucketPolicy service method, as returned by S3. - /// REST API Reference for PutBucketPolicy Operation - PutBucketPolicyResponse PutBucketPolicy(string bucketName, string policy, string contentMD5); + /// The response from the PutBucketReplication service method, as returned by S3. + /// REST API Reference for PutBucketReplication Operation + Task PutBucketReplicationAsync(PutBucketReplicationRequest request, CancellationToken cancellationToken = default(CancellationToken)); + + #endregion + + #region PutBucketRequestPayment + /// - /// Applies an Amazon S3 bucket policy to an Amazon S3 bucket. - /// - /// + /// /// - /// Directory buckets - For directory buckets, you must make requests for this - /// API operation to the Regional endpoint. These endpoints support path-style requests - /// in the format https://s3express-control.region_code.amazonaws.com/bucket-name - /// . Virtual-hosted-style requests aren't supported. For more information, see Regional - /// and Zonal endpoints in the Amazon S3 User Guide. + /// This operation is not supported by directory buckets. /// - ///
    Permissions
    + /// /// - /// If you are using an identity other than the root user of the Amazon Web Services account - /// that owns the bucket, the calling identity must both have the PutBucketPolicy - /// permissions on the specified bucket and belong to the bucket owner's account in order - /// to use this operation. + /// Sets the request payment configuration for a bucket. By default, the bucket owner + /// pays for downloads from the bucket. This configuration parameter enables the bucket + /// owner (only) to specify that the person requesting the download will be charged for + /// the download. For more information, see Requester + /// Pays Buckets. /// /// /// - /// If you don't have PutBucketPolicy permissions, Amazon S3 returns a 403 Access - /// Denied error. If you have the correct permissions, but you're not using an identity - /// that belongs to the bucket owner's account, Amazon S3 returns a 405 Method Not - /// Allowed error. - /// - /// - /// - /// To ensure that bucket owners don't inadvertently lock themselves out of their own - /// buckets, the root principal in a bucket owner's Amazon Web Services account can perform - /// the GetBucketPolicy, PutBucketPolicy, and DeleteBucketPolicy - /// API actions, even if their bucket policy explicitly denies the root principal's access. - /// Bucket owner root principals can only be blocked from performing these API actions - /// by VPC endpoint policies and Amazon Web Services Organizations policies. + /// The following operations are related to PutBucketRequestPayment: /// - ///
    • + ///
      • /// - /// General purpose bucket permissions - The s3:PutBucketPolicy permission - /// is required in a policy. For more information about general purpose buckets bucket - /// policies, see Using - /// Bucket Policies and User Policies in the Amazon S3 User Guide. + /// CreateBucket + /// /// ///
      • /// - /// Directory bucket permissions - To grant access to this API operation, you - /// must have the s3express:PutBucketPolicy permission in an IAM identity-based - /// policy instead of a bucket policy. Cross-account access to this API operation isn't - /// supported. This operation can only be performed by the Amazon Web Services account - /// that owns the resource. For more information about directory bucket policies and permissions, - /// see Amazon - /// Web Services Identity and Access Management (IAM) for S3 Express One Zone in the - /// Amazon S3 User Guide. - /// - ///
    Example bucket policies
    - /// - /// General purpose buckets example bucket policies - See Bucket - /// policy examples in the Amazon S3 User Guide. + /// GetBucketRequestPayment + /// /// - /// + /// + ///
    + /// The bucket name. + /// Container for Payer. + /// + /// The response from the PutBucketRequestPayment service method, as returned by S3. + /// REST API Reference for PutBucketRequestPayment Operation + PutBucketRequestPaymentResponse PutBucketRequestPayment(string bucketName, RequestPaymentConfiguration requestPaymentConfiguration); + + /// + /// /// - /// Directory bucket example bucket policies - See Example - /// bucket policies for S3 Express One Zone in the Amazon S3 User Guide. + /// This operation is not supported by directory buckets. /// - ///
    HTTP Host header syntax
    + /// /// - /// Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com. + /// Sets the request payment configuration for a bucket. By default, the bucket owner + /// pays for downloads from the bucket. This configuration parameter enables the bucket + /// owner (only) to specify that the person requesting the download will be charged for + /// the download. For more information, see Requester + /// Pays Buckets. /// - ///
    + /// /// - /// The following operations are related to PutBucketPolicy: + /// The following operations are related to PutBucketRequestPayment: /// /// ///
    - /// Container for the necessary parameters to execute the PutBucketPolicy service method. + /// Container for the necessary parameters to execute the PutBucketRequestPayment service method. /// - /// The response from the PutBucketPolicy service method, as returned by S3. - /// REST API Reference for PutBucketPolicy Operation - PutBucketPolicyResponse PutBucketPolicy(PutBucketPolicyRequest request); + /// The response from the PutBucketRequestPayment service method, as returned by S3. + /// REST API Reference for PutBucketRequestPayment Operation + PutBucketRequestPaymentResponse PutBucketRequestPayment(PutBucketRequestPaymentRequest request); /// - /// Applies an Amazon S3 bucket policy to an Amazon S3 bucket. - /// - /// + /// /// - /// Directory buckets - For directory buckets, you must make requests for this - /// API operation to the Regional endpoint. These endpoints support path-style requests - /// in the format https://s3express-control.region_code.amazonaws.com/bucket-name - /// . Virtual-hosted-style requests aren't supported. For more information, see Regional - /// and Zonal endpoints in the Amazon S3 User Guide. + /// This operation is not supported by directory buckets. /// - ///
    Permissions
    + /// /// - /// If you are using an identity other than the root user of the Amazon Web Services account - /// that owns the bucket, the calling identity must both have the PutBucketPolicy - /// permissions on the specified bucket and belong to the bucket owner's account in order - /// to use this operation. + /// Sets the request payment configuration for a bucket. By default, the bucket owner + /// pays for downloads from the bucket. This configuration parameter enables the bucket + /// owner (only) to specify that the person requesting the download will be charged for + /// the download. For more information, see Requester + /// Pays Buckets. /// /// /// - /// If you don't have PutBucketPolicy permissions, Amazon S3 returns a 403 Access - /// Denied error. If you have the correct permissions, but you're not using an identity - /// that belongs to the bucket owner's account, Amazon S3 returns a 405 Method Not - /// Allowed error. - /// - /// - /// - /// To ensure that bucket owners don't inadvertently lock themselves out of their own - /// buckets, the root principal in a bucket owner's Amazon Web Services account can perform - /// the GetBucketPolicy, PutBucketPolicy, and DeleteBucketPolicy - /// API actions, even if their bucket policy explicitly denies the root principal's access. - /// Bucket owner root principals can only be blocked from performing these API actions - /// by VPC endpoint policies and Amazon Web Services Organizations policies. + /// The following operations are related to PutBucketRequestPayment: /// - ///
    • + ///
      • /// - /// General purpose bucket permissions - The s3:PutBucketPolicy permission - /// is required in a policy. For more information about general purpose buckets bucket - /// policies, see Using - /// Bucket Policies and User Policies in the Amazon S3 User Guide. + /// CreateBucket + /// /// ///
      • /// - /// Directory bucket permissions - To grant access to this API operation, you - /// must have the s3express:PutBucketPolicy permission in an IAM identity-based - /// policy instead of a bucket policy. Cross-account access to this API operation isn't - /// supported. This operation can only be performed by the Amazon Web Services account - /// that owns the resource. For more information about directory bucket policies and permissions, - /// see Amazon - /// Web Services Identity and Access Management (IAM) for S3 Express One Zone in the - /// Amazon S3 User Guide. - /// - ///
    Example bucket policies
    - /// - /// General purpose buckets example bucket policies - See Bucket - /// policy examples in the Amazon S3 User Guide. + /// GetBucketRequestPayment + /// /// - /// + /// + ///
    + /// The bucket name. + /// Container for Payer. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// + /// The response from the PutBucketRequestPayment service method, as returned by S3. + /// REST API Reference for PutBucketRequestPayment Operation + Task PutBucketRequestPaymentAsync(string bucketName, RequestPaymentConfiguration requestPaymentConfiguration, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); + + + /// + /// /// - /// Directory bucket example bucket policies - See Example - /// bucket policies for S3 Express One Zone in the Amazon S3 User Guide. + /// This operation is not supported by directory buckets. /// - ///
    HTTP Host header syntax
    + /// /// - /// Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com. + /// Sets the request payment configuration for a bucket. By default, the bucket owner + /// pays for downloads from the bucket. This configuration parameter enables the bucket + /// owner (only) to specify that the person requesting the download will be charged for + /// the download. For more information, see Requester + /// Pays Buckets. /// - ///
    + /// /// - /// The following operations are related to PutBucketPolicy: + /// The following operations are related to PutBucketRequestPayment: /// /// ///
    - /// The name of the bucket. Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region_code.amazonaws.com/bucket-name . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must also follow the format bucket_base_name--az_id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide - /// The bucket policy as a JSON document. For directory buckets, the only IAM action supported in the bucket policy is s3express:CreateSession. + /// Container for the necessary parameters to execute the PutBucketRequestPayment service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// - /// The response from the PutBucketPolicy service method, as returned by S3. - /// REST API Reference for PutBucketPolicy Operation - Task PutBucketPolicyAsync(string bucketName, string policy, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); + /// The response from the PutBucketRequestPayment service method, as returned by S3. + /// REST API Reference for PutBucketRequestPayment Operation + Task PutBucketRequestPaymentAsync(PutBucketRequestPaymentRequest request, CancellationToken cancellationToken = default(CancellationToken)); + + #endregion + + #region PutBucketTagging + /// - /// Applies an Amazon S3 bucket policy to an Amazon S3 bucket. - /// - /// + /// /// - /// Directory buckets - For directory buckets, you must make requests for this - /// API operation to the Regional endpoint. These endpoints support path-style requests - /// in the format https://s3express-control.region_code.amazonaws.com/bucket-name - /// . Virtual-hosted-style requests aren't supported. For more information, see Regional - /// and Zonal endpoints in the Amazon S3 User Guide. + /// This operation is not supported by directory buckets. /// - ///
    Permissions
    + /// /// - /// If you are using an identity other than the root user of the Amazon Web Services account - /// that owns the bucket, the calling identity must both have the PutBucketPolicy - /// permissions on the specified bucket and belong to the bucket owner's account in order - /// to use this operation. + /// Sets the tags for a bucket. + /// + /// + /// + /// Use tags to organize your Amazon Web Services bill to reflect your own cost structure. + /// To do this, sign up to get your Amazon Web Services account bill with tag key values + /// included. Then, to see the cost of combined resources, organize your billing information + /// according to resources with the same tag key values. For example, you can tag several + /// resources with a specific application name, and then organize your billing information + /// to see the total cost of that application across several services. For more information, + /// see Cost + /// Allocation and Tagging and Using + /// Cost Allocation in Amazon S3 Bucket Tags. /// - /// + /// /// - /// If you don't have PutBucketPolicy permissions, Amazon S3 returns a 403 Access - /// Denied error. If you have the correct permissions, but you're not using an identity - /// that belongs to the bucket owner's account, Amazon S3 returns a 405 Method Not - /// Allowed error. + /// When this operation sets the tags for a bucket, it will overwrite any current tags + /// the bucket already has. You cannot use this operation to add tags to an existing list + /// of tags. /// - /// + /// /// - /// To ensure that bucket owners don't inadvertently lock themselves out of their own - /// buckets, the root principal in a bucket owner's Amazon Web Services account can perform - /// the GetBucketPolicy, PutBucketPolicy, and DeleteBucketPolicy - /// API actions, even if their bucket policy explicitly denies the root principal's access. - /// Bucket owner root principals can only be blocked from performing these API actions - /// by VPC endpoint policies and Amazon Web Services Organizations policies. + /// To use this operation, you must have permissions to perform the s3:PutBucketTagging + /// action. The bucket owner has this permission by default and can grant this permission + /// to others. For more information about permissions, see Permissions + /// Related to Bucket Subresource Operations and Managing + /// Access Permissions to Your Amazon S3 Resources. /// - ///
    • + /// /// - /// General purpose bucket permissions - The s3:PutBucketPolicy permission - /// is required in a policy. For more information about general purpose buckets bucket - /// policies, see Using - /// Bucket Policies and User Policies in the Amazon S3 User Guide. + /// PutBucketTagging has the following special errors. For more Amazon S3 errors + /// see, Error + /// Responses. /// - ///
    • + ///
      • /// - /// Directory bucket permissions - To grant access to this API operation, you - /// must have the s3express:PutBucketPolicy permission in an IAM identity-based - /// policy instead of a bucket policy. Cross-account access to this API operation isn't - /// supported. This operation can only be performed by the Amazon Web Services account - /// that owns the resource. For more information about directory bucket policies and permissions, - /// see Amazon - /// Web Services Identity and Access Management (IAM) for S3 Express One Zone in the - /// Amazon S3 User Guide. + /// InvalidTag - The tag provided was not a valid tag. This error can occur if + /// the tag did not pass input validation. For more information, see Using + /// Cost Allocation in Amazon S3 Bucket Tags. /// - ///
    Example bucket policies
    + ///
  • /// - /// General purpose buckets example bucket policies - See Bucket - /// policy examples in the Amazon S3 User Guide. + /// MalformedXML - The XML provided does not match the schema. /// - /// + ///
  • /// - /// Directory bucket example bucket policies - See Example - /// bucket policies for S3 Express One Zone in the Amazon S3 User Guide. + /// OperationAborted - A conflicting conditional action is currently in progress + /// against this resource. Please try again. /// - ///
  • HTTP Host header syntax
    + ///
  • /// - /// Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com. + /// InternalError - The service was unable to apply the provided tag to the bucket. /// - ///
  • + /// /// - /// The following operations are related to PutBucketPolicy: + /// The following operations are related to PutBucketTagging: /// /// ///
    - /// The name of the bucket. Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region_code.amazonaws.com/bucket-name . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must also follow the format bucket_base_name--az_id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide - /// The bucket policy as a JSON document. For directory buckets, the only IAM action supported in the bucket policy is s3express:CreateSession. - /// The MD5 hash of the request body. For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically. This functionality is not supported for directory buckets. - /// - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// + /// The bucket name. + /// A property of PutBucketTaggingRequest used to execute the PutBucketTagging service method. /// - /// The response from the PutBucketPolicy service method, as returned by S3. - /// REST API Reference for PutBucketPolicy Operation - Task PutBucketPolicyAsync(string bucketName, string policy, string contentMD5, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); - + /// The response from the PutBucketTagging service method, as returned by S3. + /// REST API Reference for PutBucketTagging Operation + PutBucketTaggingResponse PutBucketTagging(string bucketName, List tagSet); /// - /// Applies an Amazon S3 bucket policy to an Amazon S3 bucket. - /// - /// + /// /// - /// Directory buckets - For directory buckets, you must make requests for this - /// API operation to the Regional endpoint. These endpoints support path-style requests - /// in the format https://s3express-control.region_code.amazonaws.com/bucket-name - /// . Virtual-hosted-style requests aren't supported. For more information, see Regional - /// and Zonal endpoints in the Amazon S3 User Guide. + /// This operation is not supported by directory buckets. /// - ///
    Permissions
    + /// /// - /// If you are using an identity other than the root user of the Amazon Web Services account - /// that owns the bucket, the calling identity must both have the PutBucketPolicy - /// permissions on the specified bucket and belong to the bucket owner's account in order - /// to use this operation. + /// Sets the tags for a bucket. /// /// /// - /// If you don't have PutBucketPolicy permissions, Amazon S3 returns a 403 Access - /// Denied error. If you have the correct permissions, but you're not using an identity - /// that belongs to the bucket owner's account, Amazon S3 returns a 405 Method Not - /// Allowed error. + /// Use tags to organize your Amazon Web Services bill to reflect your own cost structure. + /// To do this, sign up to get your Amazon Web Services account bill with tag key values + /// included. Then, to see the cost of combined resources, organize your billing information + /// according to resources with the same tag key values. For example, you can tag several + /// resources with a specific application name, and then organize your billing information + /// to see the total cost of that application across several services. For more information, + /// see Cost + /// Allocation and Tagging and Using + /// Cost Allocation in Amazon S3 Bucket Tags. /// - /// + /// /// - /// To ensure that bucket owners don't inadvertently lock themselves out of their own - /// buckets, the root principal in a bucket owner's Amazon Web Services account can perform - /// the GetBucketPolicy, PutBucketPolicy, and DeleteBucketPolicy - /// API actions, even if their bucket policy explicitly denies the root principal's access. - /// Bucket owner root principals can only be blocked from performing these API actions - /// by VPC endpoint policies and Amazon Web Services Organizations policies. + /// When this operation sets the tags for a bucket, it will overwrite any current tags + /// the bucket already has. You cannot use this operation to add tags to an existing list + /// of tags. /// - ///
    • + /// /// - /// General purpose bucket permissions - The s3:PutBucketPolicy permission - /// is required in a policy. For more information about general purpose buckets bucket - /// policies, see Using - /// Bucket Policies and User Policies in the Amazon S3 User Guide. + /// To use this operation, you must have permissions to perform the s3:PutBucketTagging + /// action. The bucket owner has this permission by default and can grant this permission + /// to others. For more information about permissions, see Permissions + /// Related to Bucket Subresource Operations and Managing + /// Access Permissions to Your Amazon S3 Resources. /// - ///
    • + /// /// - /// Directory bucket permissions - To grant access to this API operation, you - /// must have the s3express:PutBucketPolicy permission in an IAM identity-based - /// policy instead of a bucket policy. Cross-account access to this API operation isn't - /// supported. This operation can only be performed by the Amazon Web Services account - /// that owns the resource. For more information about directory bucket policies and permissions, - /// see Amazon - /// Web Services Identity and Access Management (IAM) for S3 Express One Zone in the - /// Amazon S3 User Guide. + /// PutBucketTagging has the following special errors. For more Amazon S3 errors + /// see, Error + /// Responses. /// - ///
    Example bucket policies
    + ///
    HTTP Host header syntax
    + ///
  • /// - /// Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com. + /// OperationAborted - A conflicting conditional action is currently in progress + /// against this resource. Please try again. /// - ///
  • + ///
  • /// - /// The following operations are related to PutBucketPolicy: + /// InternalError - The service was unable to apply the provided tag to the bucket. + /// + ///
  • + /// + /// The following operations are related to PutBucketTagging: /// /// ///
    - /// Container for the necessary parameters to execute the PutBucketPolicy service method. - /// - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// + /// Container for the necessary parameters to execute the PutBucketTagging service method. /// - /// The response from the PutBucketPolicy service method, as returned by S3. - /// REST API Reference for PutBucketPolicy Operation - Task PutBucketPolicyAsync(PutBucketPolicyRequest request, CancellationToken cancellationToken = default(CancellationToken)); - - #endregion - - #region PutBucketReplication + /// The response from the PutBucketTagging service method, as returned by S3. + /// REST API Reference for PutBucketTagging Operation + PutBucketTaggingResponse PutBucketTagging(PutBucketTaggingRequest request); /// @@ -20172,100 +20732,84 @@ public partial interface IAmazonS3 : IAmazonService, IDisposable /// /// /// - /// Creates a replication configuration or replaces an existing one. For more information, - /// see Replication - /// in the Amazon S3 User Guide. - /// - /// - /// - /// Specify the replication configuration in the request body. In the replication configuration, - /// you provide the name of the destination bucket or buckets where you want Amazon S3 - /// to replicate objects, the IAM role that Amazon S3 can assume to replicate objects - /// on your behalf, and other relevant information. You can invoke this request for a - /// specific Amazon Web Services Region by using the - /// aws:RequestedRegion condition key. - /// - /// - /// - /// A replication configuration must include at least one rule, and can contain a maximum - /// of 1,000. Each rule identifies a subset of objects to replicate by filtering the objects - /// in the source bucket. To choose additional subsets of objects to replicate, add a - /// rule for each subset. + /// Sets the tags for a bucket. /// /// /// - /// To specify a subset of the objects in the source bucket to apply a replication rule - /// to, add the Filter element as a child of the Rule element. You can filter objects - /// based on an object key prefix, one or more object tags, or both. When you add the - /// Filter element in the configuration, you must also add the following elements: DeleteMarkerReplication, - /// Status, and Priority. + /// Use tags to organize your Amazon Web Services bill to reflect your own cost structure. + /// To do this, sign up to get your Amazon Web Services account bill with tag key values + /// included. Then, to see the cost of combined resources, organize your billing information + /// according to resources with the same tag key values. For example, you can tag several + /// resources with a specific application name, and then organize your billing information + /// to see the total cost of that application across several services. For more information, + /// see Cost + /// Allocation and Tagging and Using + /// Cost Allocation in Amazon S3 Bucket Tags. /// /// /// - /// If you are using an earlier version of the replication configuration, Amazon S3 handles - /// replication of delete markers differently. For more information, see Backward - /// Compatibility. + /// When this operation sets the tags for a bucket, it will overwrite any current tags + /// the bucket already has. You cannot use this operation to add tags to an existing list + /// of tags. /// /// /// - /// For information about enabling versioning on a bucket, see Using - /// Versioning. + /// To use this operation, you must have permissions to perform the s3:PutBucketTagging + /// action. The bucket owner has this permission by default and can grant this permission + /// to others. For more information about permissions, see Permissions + /// Related to Bucket Subresource Operations and Managing + /// Access Permissions to Your Amazon S3 Resources. /// - ///
    Handling Replication of Encrypted Objects
    + /// /// - /// By default, Amazon S3 doesn't replicate objects that are stored at rest using server-side - /// encryption with KMS keys. To replicate Amazon Web Services KMS-encrypted objects, - /// add the following: SourceSelectionCriteria, SseKmsEncryptedObjects, - /// Status, EncryptionConfiguration, and ReplicaKmsKeyID. For information - /// about replication configuration, see Replicating - /// Objects Created with SSE Using KMS keys. + /// PutBucketTagging has the following special errors. For more Amazon S3 errors + /// see, Error + /// Responses. /// - /// + ///
    Permissions
    + ///
  • /// - /// To create a PutBucketReplication request, you must have s3:PutReplicationConfiguration - /// permissions for the bucket. + /// MalformedXML - The XML provided does not match the schema. /// - /// + ///
  • /// - /// By default, a resource owner, in this case the Amazon Web Services account that created - /// the bucket, can perform this operation. The resource owner can also grant others permissions - /// to perform the operation. For more information about permissions, see Specifying - /// Permissions in a Policy and Managing - /// Access Permissions to Your Amazon S3 Resources. + /// OperationAborted - A conflicting conditional action is currently in progress + /// against this resource. Please try again. /// - /// + ///
  • /// - /// To perform this operation, the user or role performing the action must have the iam:PassRole - /// permission. + /// InternalError - The service was unable to apply the provided tag to the bucket. /// - ///
  • + /// /// - /// The following operations are related to PutBucketReplication: + /// The following operations are related to PutBucketTagging: /// /// ///
    - /// Container for the necessary parameters to execute the PutBucketReplication service method. + /// The bucket name. + /// A property of PutBucketTaggingRequest used to execute the PutBucketTagging service method. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// /// - /// The response from the PutBucketReplication service method, as returned by S3. - /// REST API Reference for PutBucketReplication Operation - PutBucketReplicationResponse PutBucketReplication(PutBucketReplicationRequest request); - + /// The response from the PutBucketTagging service method, as returned by S3. + /// REST API Reference for PutBucketTagging Operation + Task PutBucketTaggingAsync(string bucketName, List tagSet, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); /// @@ -20275,106 +20819,87 @@ public partial interface IAmazonS3 : IAmazonService, IDisposable /// /// /// - /// Creates a replication configuration or replaces an existing one. For more information, - /// see Replication - /// in the Amazon S3 User Guide. - /// - /// - /// - /// Specify the replication configuration in the request body. In the replication configuration, - /// you provide the name of the destination bucket or buckets where you want Amazon S3 - /// to replicate objects, the IAM role that Amazon S3 can assume to replicate objects - /// on your behalf, and other relevant information. You can invoke this request for a - /// specific Amazon Web Services Region by using the - /// aws:RequestedRegion condition key. - /// - /// - /// - /// A replication configuration must include at least one rule, and can contain a maximum - /// of 1,000. Each rule identifies a subset of objects to replicate by filtering the objects - /// in the source bucket. To choose additional subsets of objects to replicate, add a - /// rule for each subset. + /// Sets the tags for a bucket. /// /// /// - /// To specify a subset of the objects in the source bucket to apply a replication rule - /// to, add the Filter element as a child of the Rule element. You can filter objects - /// based on an object key prefix, one or more object tags, or both. When you add the - /// Filter element in the configuration, you must also add the following elements: DeleteMarkerReplication, - /// Status, and Priority. + /// Use tags to organize your Amazon Web Services bill to reflect your own cost structure. + /// To do this, sign up to get your Amazon Web Services account bill with tag key values + /// included. Then, to see the cost of combined resources, organize your billing information + /// according to resources with the same tag key values. For example, you can tag several + /// resources with a specific application name, and then organize your billing information + /// to see the total cost of that application across several services. For more information, + /// see Cost + /// Allocation and Tagging and Using + /// Cost Allocation in Amazon S3 Bucket Tags. /// /// /// - /// If you are using an earlier version of the replication configuration, Amazon S3 handles - /// replication of delete markers differently. For more information, see Backward - /// Compatibility. + /// When this operation sets the tags for a bucket, it will overwrite any current tags + /// the bucket already has. You cannot use this operation to add tags to an existing list + /// of tags. /// /// /// - /// For information about enabling versioning on a bucket, see Using - /// Versioning. + /// To use this operation, you must have permissions to perform the s3:PutBucketTagging + /// action. The bucket owner has this permission by default and can grant this permission + /// to others. For more information about permissions, see Permissions + /// Related to Bucket Subresource Operations and Managing + /// Access Permissions to Your Amazon S3 Resources. /// - ///
    Handling Replication of Encrypted Objects
    + /// /// - /// By default, Amazon S3 doesn't replicate objects that are stored at rest using server-side - /// encryption with KMS keys. To replicate Amazon Web Services KMS-encrypted objects, - /// add the following: SourceSelectionCriteria, SseKmsEncryptedObjects, - /// Status, EncryptionConfiguration, and ReplicaKmsKeyID. For information - /// about replication configuration, see Replicating - /// Objects Created with SSE Using KMS keys. + /// PutBucketTagging has the following special errors. For more Amazon S3 errors + /// see, Error + /// Responses. /// - /// + ///
    Permissions
    + ///
  • /// - /// To create a PutBucketReplication request, you must have s3:PutReplicationConfiguration - /// permissions for the bucket. + /// MalformedXML - The XML provided does not match the schema. /// - /// + ///
  • /// - /// By default, a resource owner, in this case the Amazon Web Services account that created - /// the bucket, can perform this operation. The resource owner can also grant others permissions - /// to perform the operation. For more information about permissions, see Specifying - /// Permissions in a Policy and Managing - /// Access Permissions to Your Amazon S3 Resources. + /// OperationAborted - A conflicting conditional action is currently in progress + /// against this resource. Please try again. /// - /// + ///
  • /// - /// To perform this operation, the user or role performing the action must have the iam:PassRole - /// permission. + /// InternalError - The service was unable to apply the provided tag to the bucket. /// - ///
  • + /// /// - /// The following operations are related to PutBucketReplication: + /// The following operations are related to PutBucketTagging: /// /// ///
    - /// Container for the necessary parameters to execute the PutBucketReplication service method. + /// Container for the necessary parameters to execute the PutBucketTagging service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// - /// The response from the PutBucketReplication service method, as returned by S3. - /// REST API Reference for PutBucketReplication Operation - Task PutBucketReplicationAsync(PutBucketReplicationRequest request, CancellationToken cancellationToken = default(CancellationToken)); + /// The response from the PutBucketTagging service method, as returned by S3. + /// REST API Reference for PutBucketTagging Operation + Task PutBucketTaggingAsync(PutBucketTaggingRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion - #region PutBucketRequestPayment + #region PutBucketVersioning /// @@ -20384,51 +20909,48 @@ public partial interface IAmazonS3 : IAmazonService, IDisposable /// /// /// - /// Sets the request payment configuration for a bucket. By default, the bucket owner - /// pays for downloads from the bucket. This configuration parameter enables the bucket - /// owner (only) to specify that the person requesting the download will be charged for - /// the download. For more information, see Requester - /// Pays Buckets. + /// Sets the versioning state of an existing bucket. /// /// /// - /// The following operations are related to PutBucketRequestPayment: + /// You can set the versioning state with one of the following values: /// - ///
    • + /// /// - /// CreateBucket - /// + /// Enabled—Enables versioning for the objects in the bucket. All objects added + /// to the bucket receive a unique version ID. /// - ///
    • + /// /// - /// GetBucketRequestPayment - /// + /// Suspended—Disables versioning for the objects in the bucket. All objects added + /// to the bucket receive the version ID null. /// - ///
    - ///
    - /// The bucket name. - /// Container for Payer. - /// - /// The response from the PutBucketRequestPayment service method, as returned by S3. - /// REST API Reference for PutBucketRequestPayment Operation - PutBucketRequestPaymentResponse PutBucketRequestPayment(string bucketName, RequestPaymentConfiguration requestPaymentConfiguration); - - /// - /// + /// /// - /// This operation is not supported by directory buckets. + /// If the versioning state has never been set on a bucket, it has no versioning state; + /// a GetBucketVersioning + /// request does not return a versioning state value. /// - /// + /// /// - /// Sets the request payment configuration for a bucket. By default, the bucket owner - /// pays for downloads from the bucket. This configuration parameter enables the bucket - /// owner (only) to specify that the person requesting the download will be charged for - /// the download. For more information, see Requester - /// Pays Buckets. + /// In order to enable MFA Delete, you must be the bucket owner. If you are the bucket + /// owner and want to enable MFA Delete in the bucket versioning configuration, you must + /// include the x-amz-mfa request header and the Status and the MfaDelete + /// request elements in a request to set the versioning state of the bucket. /// - /// + /// /// - /// The following operations are related to PutBucketRequestPayment: + /// If you have an object expiration lifecycle configuration 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 configuration + /// will manage the deletes of the noncurrent object versions in the version-enabled bucket. + /// (A version-enabled bucket maintains one current and zero or more noncurrent object + /// versions.) For more information, see Lifecycle + /// and Versioning. + /// + /// + /// + /// The following operations are related to PutBucketVersioning: /// ///
    • /// @@ -20437,56 +20959,22 @@ public partial interface IAmazonS3 : IAmazonService, IDisposable /// ///
    • /// - /// GetBucketRequestPayment - /// - /// - ///
    - ///
    - /// Container for the necessary parameters to execute the PutBucketRequestPayment service method. - /// - /// The response from the PutBucketRequestPayment service method, as returned by S3. - /// REST API Reference for PutBucketRequestPayment Operation - PutBucketRequestPaymentResponse PutBucketRequestPayment(PutBucketRequestPaymentRequest request); - - - /// - /// - /// - /// This operation is not supported by directory buckets. - /// - /// - /// - /// Sets the request payment configuration for a bucket. By default, the bucket owner - /// pays for downloads from the bucket. This configuration parameter enables the bucket - /// owner (only) to specify that the person requesting the download will be charged for - /// the download. For more information, see Requester - /// Pays Buckets. - /// - /// - /// - /// The following operations are related to PutBucketRequestPayment: - /// - /// /// - /// The bucket name. - /// Container for Payer. - /// - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// + /// Container for the necessary parameters to execute the PutBucketVersioning service method. /// - /// The response from the PutBucketRequestPayment service method, as returned by S3. - /// REST API Reference for PutBucketRequestPayment Operation - Task PutBucketRequestPaymentAsync(string bucketName, RequestPaymentConfiguration requestPaymentConfiguration, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); + /// The response from the PutBucketVersioning service method, as returned by S3. + /// REST API Reference for PutBucketVersioning Operation + PutBucketVersioningResponse PutBucketVersioning(PutBucketVersioningRequest request); + /// @@ -20496,15 +20984,48 @@ public partial interface IAmazonS3 : IAmazonService, IDisposable /// /// /// - /// Sets the request payment configuration for a bucket. By default, the bucket owner - /// pays for downloads from the bucket. This configuration parameter enables the bucket - /// owner (only) to specify that the person requesting the download will be charged for - /// the download. For more information, see Requester - /// Pays Buckets. + /// Sets the versioning state of an existing bucket. /// /// /// - /// The following operations are related to PutBucketRequestPayment: + /// You can set the versioning state with one of the following values: + /// + /// + /// + /// Enabled—Enables versioning for the objects in the bucket. All objects added + /// to the bucket receive a unique version ID. + /// + /// + /// + /// Suspended—Disables versioning for the objects in the bucket. All objects added + /// to the bucket receive the version ID null. + /// + /// + /// + /// If the versioning state has never been set on a bucket, it has no versioning state; + /// a GetBucketVersioning + /// request does not return a versioning state value. + /// + /// + /// + /// In order to enable MFA Delete, you must be the bucket owner. If you are the bucket + /// owner and want to enable MFA Delete in the bucket versioning configuration, you must + /// include the x-amz-mfa request header and the Status and the MfaDelete + /// request elements in a request to set the versioning state of the bucket. + /// + /// + /// + /// If you have an object expiration lifecycle configuration 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 configuration + /// will manage the deletes of the noncurrent object versions in the version-enabled bucket. + /// (A version-enabled bucket maintains one current and zero or more noncurrent object + /// versions.) For more information, see Lifecycle + /// and Versioning. + /// + /// + /// + /// The following operations are related to PutBucketVersioning: /// /// /// - /// Container for the necessary parameters to execute the PutBucketRequestPayment service method. + /// Container for the necessary parameters to execute the PutBucketVersioning service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// - /// The response from the PutBucketRequestPayment service method, as returned by S3. - /// REST API Reference for PutBucketRequestPayment Operation - Task PutBucketRequestPaymentAsync(PutBucketRequestPaymentRequest request, CancellationToken cancellationToken = default(CancellationToken)); + /// The response from the PutBucketVersioning service method, as returned by S3. + /// REST API Reference for PutBucketVersioning Operation + Task PutBucketVersioningAsync(PutBucketVersioningRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion - #region PutBucketTagging + #region PutBucketWebsite /// @@ -20539,164 +21065,130 @@ public partial interface IAmazonS3 : IAmazonService, IDisposable /// /// /// - /// Sets the tags for a bucket. + /// Sets the configuration of the website that is specified in the website subresource. + /// To configure a bucket as a website, you can add this subresource on the bucket with + /// website configuration information such as the file name of the index document and + /// any redirect rules. For more information, see Hosting + /// Websites on Amazon S3. /// /// /// - /// Use tags to organize your Amazon Web Services bill to reflect your own cost structure. - /// To do this, sign up to get your Amazon Web Services account bill with tag key values - /// included. Then, to see the cost of combined resources, organize your billing information - /// according to resources with the same tag key values. For example, you can tag several - /// resources with a specific application name, and then organize your billing information - /// to see the total cost of that application across several services. For more information, - /// see Cost - /// Allocation and Tagging and Using - /// Cost Allocation in Amazon S3 Bucket Tags. - /// - /// - /// - /// When this operation sets the tags for a bucket, it will overwrite any current tags - /// the bucket already has. You cannot use this operation to add tags to an existing list - /// of tags. - /// - /// - /// - /// To use this operation, you must have permissions to perform the s3:PutBucketTagging - /// action. The bucket owner has this permission by default and can grant this permission - /// to others. For more information about permissions, see Permissions - /// Related to Bucket Subresource Operations and Managing - /// Access Permissions to Your Amazon S3 Resources. + /// This PUT action requires the S3:PutBucketWebsite permission. By default, only + /// the bucket owner can configure the website attached to a bucket; however, bucket owners + /// can allow other users to set the website configuration by writing a bucket policy + /// that grants them the S3:PutBucketWebsite permission. /// /// /// - /// PutBucketTagging has the following special errors. For more Amazon S3 errors - /// see, Error - /// Responses. + /// To redirect all website requests sent to the bucket's website endpoint, you add a + /// website configuration with the following elements. Because all requests are sent to + /// another website, you don't need to provide index document name for the bucket. /// ///
    • /// - /// InvalidTag - The tag provided was not a valid tag. This error can occur if - /// the tag did not pass input validation. For more information, see Using - /// Cost Allocation in Amazon S3 Bucket Tags. + /// WebsiteConfiguration /// ///
    • /// - /// MalformedXML - The XML provided does not match the schema. + /// RedirectAllRequestsTo /// ///
    • /// - /// OperationAborted - A conflicting conditional action is currently in progress - /// against this resource. Please try again. + /// HostName /// ///
    • /// - /// InternalError - The service was unable to apply the provided tag to the bucket. + /// Protocol /// ///
    /// - /// The following operations are related to PutBucketTagging: + /// If you want granular control over redirects, you can use the following elements to + /// add routing rules that describe conditions for redirecting requests and information + /// about the redirect destination. In this case, the website configuration must provide + /// an index document for the bucket, because some requests might not be redirected. /// /// - ///
    - /// The bucket name. - /// A property of PutBucketTaggingRequest used to execute the PutBucketTagging service method. - /// - /// The response from the PutBucketTagging service method, as returned by S3. - /// REST API Reference for PutBucketTagging Operation - PutBucketTaggingResponse PutBucketTagging(string bucketName, List tagSet); - - /// - /// + ///
  • /// - /// This operation is not supported by directory buckets. + /// Suffix /// - /// + ///
  • /// - /// Sets the tags for a bucket. + /// ErrorDocument /// - /// + ///
  • /// - /// Use tags to organize your Amazon Web Services bill to reflect your own cost structure. - /// To do this, sign up to get your Amazon Web Services account bill with tag key values - /// included. Then, to see the cost of combined resources, organize your billing information - /// according to resources with the same tag key values. For example, you can tag several - /// resources with a specific application name, and then organize your billing information - /// to see the total cost of that application across several services. For more information, - /// see Cost - /// Allocation and Tagging and Using - /// Cost Allocation in Amazon S3 Bucket Tags. + /// Key /// - /// + ///
  • /// - /// When this operation sets the tags for a bucket, it will overwrite any current tags - /// the bucket already has. You cannot use this operation to add tags to an existing list - /// of tags. + /// RoutingRules /// - /// + ///
  • /// - /// To use this operation, you must have permissions to perform the s3:PutBucketTagging - /// action. The bucket owner has this permission by default and can grant this permission - /// to others. For more information about permissions, see Permissions - /// Related to Bucket Subresource Operations and Managing - /// Access Permissions to Your Amazon S3 Resources. + /// RoutingRule /// - /// + ///
  • /// - /// PutBucketTagging has the following special errors. For more Amazon S3 errors - /// see, Error - /// Responses. + /// Condition /// - ///
    • + ///
    • /// - /// InvalidTag - The tag provided was not a valid tag. This error can occur if - /// the tag did not pass input validation. For more information, see Using - /// Cost Allocation in Amazon S3 Bucket Tags. + /// HttpErrorCodeReturnedEquals /// ///
    • /// - /// MalformedXML - The XML provided does not match the schema. + /// KeyPrefixEquals /// ///
    • /// - /// OperationAborted - A conflicting conditional action is currently in progress - /// against this resource. Please try again. + /// Redirect /// ///
    • /// - /// InternalError - The service was unable to apply the provided tag to the bucket. + /// Protocol /// - ///
    + ///
  • /// - /// The following operations are related to PutBucketTagging: + /// HostName /// - ///
    • + ///
    • /// - /// GetBucketTagging - /// + /// ReplaceKeyPrefixWith /// ///
    • /// - /// DeleteBucketTagging - /// + /// ReplaceKeyWith + /// + ///
    • + /// + /// HttpRedirectCode + /// + ///
    + /// + /// Amazon S3 has a limitation of 50 routing rules per website configuration. If you require + /// more than 50 routing rules, you can use object redirect. For more information, see + /// Configuring + /// an Object Redirect in the Amazon S3 User Guide. + /// + /// + /// + /// The maximum request length is limited to 128 KB. /// - ///
  • ///
    - /// Container for the necessary parameters to execute the PutBucketTagging service method. + /// The bucket name. + /// Container for the request. /// - /// The response from the PutBucketTagging service method, as returned by S3. - /// REST API Reference for PutBucketTagging Operation - PutBucketTaggingResponse PutBucketTagging(PutBucketTaggingRequest request); - + /// The response from the PutBucketWebsite service method, as returned by S3. + /// REST API Reference for PutBucketWebsite Operation + PutBucketWebsiteResponse PutBucketWebsite(string bucketName, WebsiteConfiguration websiteConfiguration); /// /// @@ -20705,174 +21197,129 @@ public partial interface IAmazonS3 : IAmazonService, IDisposable /// /// /// - /// Sets the tags for a bucket. + /// Sets the configuration of the website that is specified in the website subresource. + /// To configure a bucket as a website, you can add this subresource on the bucket with + /// website configuration information such as the file name of the index document and + /// any redirect rules. For more information, see Hosting + /// Websites on Amazon S3. /// /// /// - /// Use tags to organize your Amazon Web Services bill to reflect your own cost structure. - /// To do this, sign up to get your Amazon Web Services account bill with tag key values - /// included. Then, to see the cost of combined resources, organize your billing information - /// according to resources with the same tag key values. For example, you can tag several - /// resources with a specific application name, and then organize your billing information - /// to see the total cost of that application across several services. For more information, - /// see Cost - /// Allocation and Tagging and Using - /// Cost Allocation in Amazon S3 Bucket Tags. - /// - /// - /// - /// When this operation sets the tags for a bucket, it will overwrite any current tags - /// the bucket already has. You cannot use this operation to add tags to an existing list - /// of tags. - /// - /// - /// - /// To use this operation, you must have permissions to perform the s3:PutBucketTagging - /// action. The bucket owner has this permission by default and can grant this permission - /// to others. For more information about permissions, see Permissions - /// Related to Bucket Subresource Operations and Managing - /// Access Permissions to Your Amazon S3 Resources. + /// This PUT action requires the S3:PutBucketWebsite permission. By default, only + /// the bucket owner can configure the website attached to a bucket; however, bucket owners + /// can allow other users to set the website configuration by writing a bucket policy + /// that grants them the S3:PutBucketWebsite permission. /// /// /// - /// PutBucketTagging has the following special errors. For more Amazon S3 errors - /// see, Error - /// Responses. + /// To redirect all website requests sent to the bucket's website endpoint, you add a + /// website configuration with the following elements. Because all requests are sent to + /// another website, you don't need to provide index document name for the bucket. /// ///
    • /// - /// InvalidTag - The tag provided was not a valid tag. This error can occur if - /// the tag did not pass input validation. For more information, see Using - /// Cost Allocation in Amazon S3 Bucket Tags. + /// WebsiteConfiguration /// ///
    • /// - /// MalformedXML - The XML provided does not match the schema. + /// RedirectAllRequestsTo /// ///
    • /// - /// OperationAborted - A conflicting conditional action is currently in progress - /// against this resource. Please try again. + /// HostName /// ///
    • /// - /// InternalError - The service was unable to apply the provided tag to the bucket. + /// Protocol /// ///
    /// - /// The following operations are related to PutBucketTagging: + /// If you want granular control over redirects, you can use the following elements to + /// add routing rules that describe conditions for redirecting requests and information + /// about the redirect destination. In this case, the website configuration must provide + /// an index document for the bucket, because some requests might not be redirected. /// /// - ///
    - /// The bucket name. - /// A property of PutBucketTaggingRequest used to execute the PutBucketTagging service method. - /// - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// - /// - /// The response from the PutBucketTagging service method, as returned by S3. - /// REST API Reference for PutBucketTagging Operation - Task PutBucketTaggingAsync(string bucketName, List tagSet, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); - - - /// - /// + ///
  • /// - /// This operation is not supported by directory buckets. + /// Suffix /// - /// + ///
  • /// - /// Sets the tags for a bucket. + /// ErrorDocument /// - /// + ///
  • /// - /// Use tags to organize your Amazon Web Services bill to reflect your own cost structure. - /// To do this, sign up to get your Amazon Web Services account bill with tag key values - /// included. Then, to see the cost of combined resources, organize your billing information - /// according to resources with the same tag key values. For example, you can tag several - /// resources with a specific application name, and then organize your billing information - /// to see the total cost of that application across several services. For more information, - /// see Cost - /// Allocation and Tagging and Using - /// Cost Allocation in Amazon S3 Bucket Tags. + /// Key /// - /// + ///
  • /// - /// When this operation sets the tags for a bucket, it will overwrite any current tags - /// the bucket already has. You cannot use this operation to add tags to an existing list - /// of tags. + /// RoutingRules /// - /// + ///
  • /// - /// To use this operation, you must have permissions to perform the s3:PutBucketTagging - /// action. The bucket owner has this permission by default and can grant this permission - /// to others. For more information about permissions, see Permissions - /// Related to Bucket Subresource Operations and Managing - /// Access Permissions to Your Amazon S3 Resources. + /// RoutingRule /// - /// + ///
  • /// - /// PutBucketTagging has the following special errors. For more Amazon S3 errors - /// see, Error - /// Responses. + /// Condition /// - ///
    • + ///
    • /// - /// InvalidTag - The tag provided was not a valid tag. This error can occur if - /// the tag did not pass input validation. For more information, see Using - /// Cost Allocation in Amazon S3 Bucket Tags. + /// HttpErrorCodeReturnedEquals /// ///
    • /// - /// MalformedXML - The XML provided does not match the schema. + /// KeyPrefixEquals /// ///
    • /// - /// OperationAborted - A conflicting conditional action is currently in progress - /// against this resource. Please try again. + /// Redirect /// ///
    • /// - /// InternalError - The service was unable to apply the provided tag to the bucket. + /// Protocol /// - ///
    + ///
  • /// - /// The following operations are related to PutBucketTagging: + /// HostName /// - ///
    • + ///
    • /// - /// GetBucketTagging - /// + /// ReplaceKeyPrefixWith /// ///
    • /// - /// DeleteBucketTagging - /// + /// ReplaceKeyWith + /// + ///
    • + /// + /// HttpRedirectCode + /// + ///
    + /// + /// Amazon S3 has a limitation of 50 routing rules per website configuration. If you require + /// more than 50 routing rules, you can use object redirect. For more information, see + /// Configuring + /// an Object Redirect in the Amazon S3 User Guide. + /// + /// + /// + /// The maximum request length is limited to 128 KB. /// - ///
  • ///
    - /// Container for the necessary parameters to execute the PutBucketTagging service method. - /// - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// + /// Container for the necessary parameters to execute the PutBucketWebsite service method. /// - /// The response from the PutBucketTagging service method, as returned by S3. - /// REST API Reference for PutBucketTagging Operation - Task PutBucketTaggingAsync(PutBucketTaggingRequest request, CancellationToken cancellationToken = default(CancellationToken)); - - #endregion - - #region PutBucketVersioning + /// The response from the PutBucketWebsite service method, as returned by S3. + /// REST API Reference for PutBucketWebsite Operation + PutBucketWebsiteResponse PutBucketWebsite(PutBucketWebsiteRequest request); /// @@ -20882,153 +21329,133 @@ public partial interface IAmazonS3 : IAmazonService, IDisposable /// /// /// - /// Sets the versioning state of an existing bucket. + /// Sets the configuration of the website that is specified in the website subresource. + /// To configure a bucket as a website, you can add this subresource on the bucket with + /// website configuration information such as the file name of the index document and + /// any redirect rules. For more information, see Hosting + /// Websites on Amazon S3. /// /// /// - /// You can set the versioning state with one of the following values: + /// This PUT action requires the S3:PutBucketWebsite permission. By default, only + /// the bucket owner can configure the website attached to a bucket; however, bucket owners + /// can allow other users to set the website configuration by writing a bucket policy + /// that grants them the S3:PutBucketWebsite permission. /// /// /// - /// Enabled—Enables versioning for the objects in the bucket. All objects added - /// to the bucket receive a unique version ID. + /// To redirect all website requests sent to the bucket's website endpoint, you add a + /// website configuration with the following elements. Because all requests are sent to + /// another website, you don't need to provide index document name for the bucket. /// - /// + ///
    • /// - /// Suspended—Disables versioning for the objects in the bucket. All objects added - /// to the bucket receive the version ID null. + /// WebsiteConfiguration /// - /// + ///
    • /// - /// If the versioning state has never been set on a bucket, it has no versioning state; - /// a GetBucketVersioning - /// request does not return a versioning state value. + /// RedirectAllRequestsTo /// - /// + ///
    • /// - /// In order to enable MFA Delete, you must be the bucket owner. If you are the bucket - /// owner and want to enable MFA Delete in the bucket versioning configuration, you must - /// include the x-amz-mfa request header and the Status and the MfaDelete - /// request elements in a request to set the versioning state of the bucket. + /// HostName /// - /// + ///
    • /// - /// If you have an object expiration lifecycle configuration 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 configuration - /// will manage the deletes of the noncurrent object versions in the version-enabled bucket. - /// (A version-enabled bucket maintains one current and zero or more noncurrent object - /// versions.) For more information, see Lifecycle - /// and Versioning. + /// Protocol /// - /// + ///
    /// - /// The following operations are related to PutBucketVersioning: + /// If you want granular control over redirects, you can use the following elements to + /// add routing rules that describe conditions for redirecting requests and information + /// about the redirect destination. In this case, the website configuration must provide + /// an index document for the bucket, because some requests might not be redirected. /// /// - ///
    - /// Container for the necessary parameters to execute the PutBucketVersioning service method. - /// - /// The response from the PutBucketVersioning service method, as returned by S3. - /// REST API Reference for PutBucketVersioning Operation - PutBucketVersioningResponse PutBucketVersioning(PutBucketVersioningRequest request); - - - - /// - /// + ///
  • /// - /// This operation is not supported by directory buckets. + /// ErrorDocument /// - /// + ///
  • /// - /// Sets the versioning state of an existing bucket. + /// Key /// - /// + ///
  • /// - /// You can set the versioning state with one of the following values: + /// RoutingRules /// - /// + ///
  • /// - /// Enabled—Enables versioning for the objects in the bucket. All objects added - /// to the bucket receive a unique version ID. + /// RoutingRule /// - /// + ///
  • /// - /// Suspended—Disables versioning for the objects in the bucket. All objects added - /// to the bucket receive the version ID null. + /// Condition /// - /// + ///
  • /// - /// If the versioning state has never been set on a bucket, it has no versioning state; - /// a GetBucketVersioning - /// request does not return a versioning state value. + /// HttpErrorCodeReturnedEquals /// - /// + ///
  • /// - /// In order to enable MFA Delete, you must be the bucket owner. If you are the bucket - /// owner and want to enable MFA Delete in the bucket versioning configuration, you must - /// include the x-amz-mfa request header and the Status and the MfaDelete - /// request elements in a request to set the versioning state of the bucket. + /// KeyPrefixEquals /// - /// - /// - /// If you have an object expiration lifecycle configuration 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 configuration - /// will manage the deletes of the noncurrent object versions in the version-enabled bucket. - /// (A version-enabled bucket maintains one current and zero or more noncurrent object - /// versions.) For more information, see Lifecycle - /// and Versioning. + ///
  • + /// + /// Redirect /// - /// + ///
  • /// - /// The following operations are related to PutBucketVersioning: + /// Protocol /// - ///
    • + ///
    • /// - /// CreateBucket - /// + /// HostName /// ///
    • /// - /// DeleteBucket - /// + /// ReplaceKeyPrefixWith /// ///
    • /// - /// GetBucketVersioning - /// + /// ReplaceKeyWith + /// + ///
    • + /// + /// HttpRedirectCode + /// + ///
    + /// + /// Amazon S3 has a limitation of 50 routing rules per website configuration. If you require + /// more than 50 routing rules, you can use object redirect. For more information, see + /// Configuring + /// an Object Redirect in the Amazon S3 User Guide. + /// + /// + /// + /// The maximum request length is limited to 128 KB. /// - ///
  • ///
    - /// Container for the necessary parameters to execute the PutBucketVersioning service method. + /// The bucket name. + /// Container for the request. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// - /// The response from the PutBucketVersioning service method, as returned by S3. - /// REST API Reference for PutBucketVersioning Operation - Task PutBucketVersioningAsync(PutBucketVersioningRequest request, CancellationToken cancellationToken = default(CancellationToken)); - - #endregion - - #region PutBucketWebsite + /// The response from the PutBucketWebsite service method, as returned by S3. + /// REST API Reference for PutBucketWebsite Operation + Task PutBucketWebsiteAsync(string bucketName, WebsiteConfiguration websiteConfiguration, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); /// @@ -21156,12 +21583,19 @@ public partial interface IAmazonS3 : IAmazonService, IDisposable /// The maximum request length is limited to 128 KB. /// /// - /// The bucket name. - /// Container for the request. + /// Container for the necessary parameters to execute the PutBucketWebsite service method. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// /// /// The response from the PutBucketWebsite service method, as returned by S3. /// REST API Reference for PutBucketWebsite Operation - PutBucketWebsiteResponse PutBucketWebsite(string bucketName, WebsiteConfiguration websiteConfiguration); + Task PutBucketWebsiteAsync(PutBucketWebsiteRequest request, CancellationToken cancellationToken = default(CancellationToken)); + + #endregion + + #region PutCORSConfiguration + /// /// @@ -21170,129 +21604,253 @@ public partial interface IAmazonS3 : IAmazonService, IDisposable /// /// /// - /// Sets the configuration of the website that is specified in the website subresource. - /// To configure a bucket as a website, you can add this subresource on the bucket with - /// website configuration information such as the file name of the index document and - /// any redirect rules. For more information, see Hosting - /// Websites on Amazon S3. + /// Sets the cors configuration for your bucket. If the configuration exists, Amazon + /// S3 replaces it. /// /// /// - /// This PUT action requires the S3:PutBucketWebsite permission. By default, only - /// the bucket owner can configure the website attached to a bucket; however, bucket owners - /// can allow other users to set the website configuration by writing a bucket policy - /// that grants them the S3:PutBucketWebsite permission. + /// To use this operation, you must be allowed to perform the s3:PutBucketCORS + /// action. By default, the bucket owner has this permission and can grant it to others. /// /// /// - /// To redirect all website requests sent to the bucket's website endpoint, you add a - /// website configuration with the following elements. Because all requests are sent to - /// another website, you don't need to provide index document name for the bucket. + /// You set this configuration on a bucket so that the bucket can service cross-origin + /// requests. For example, you might want to enable a request whose origin is http://www.example.com + /// to access your Amazon S3 bucket at my.example.bucket.com by using the browser's + /// XMLHttpRequest capability. /// - ///
    • + /// /// - /// WebsiteConfiguration + /// To enable cross-origin resource sharing (CORS) on a bucket, you add the cors + /// subresource to the bucket. The cors subresource is an XML document in which + /// you configure rules that identify origins and the HTTP methods that can be executed + /// on your bucket. The document is limited to 64 KB in size. /// - ///
    • + /// /// - /// RedirectAllRequestsTo + /// When Amazon S3 receives a cross-origin request (or a pre-flight OPTIONS request) against + /// a bucket, it evaluates the cors configuration on the bucket and uses the first + /// CORSRule rule that matches the incoming browser request to enable a cross-origin + /// request. For a rule to match, the following conditions must be met: + /// + ///
      • + /// + /// The request's Origin header must match AllowedOrigin elements. /// ///
      • /// - /// HostName + /// The request method (for example, GET, PUT, HEAD, and so on) or the Access-Control-Request-Method + /// header in case of a pre-flight OPTIONS request must be one of the AllowedMethod + /// elements. /// ///
      • /// - /// Protocol + /// Every header specified in the Access-Control-Request-Headers request header + /// of a pre-flight request must match an AllowedHeader element. /// ///
      /// - /// If you want granular control over redirects, you can use the following elements to - /// add routing rules that describe conditions for redirecting requests and information - /// about the redirect destination. In this case, the website configuration must provide - /// an index document for the bucket, because some requests might not be redirected. + /// For more information about CORS, go to Enabling + /// Cross-Origin Resource Sharing in the Amazon S3 User Guide. + /// + /// + /// + /// The following operations are related to PutBucketCors: /// /// + ///
    + /// Specifies the bucket impacted by the corsconfiguration. + /// Describes the cross-origin access configuration for objects in an Amazon S3 bucket. For more information, see Enabling Cross-Origin Resource Sharing in the Amazon S3 User Guide. + /// + /// The response from the PutCORSConfiguration service method, as returned by S3. + /// REST API Reference for PutCORSConfiguration Operation + PutCORSConfigurationResponse PutCORSConfiguration(string bucketName, CORSConfiguration configuration); + + /// + /// /// - /// ErrorDocument + /// This operation is not supported by directory buckets. /// - ///
  • + /// /// - /// Key + /// Sets the cors configuration for your bucket. If the configuration exists, Amazon + /// S3 replaces it. /// - ///
  • + /// /// - /// RoutingRules + /// To use this operation, you must be allowed to perform the s3:PutBucketCORS + /// action. By default, the bucket owner has this permission and can grant it to others. + /// + /// + /// + /// You set this configuration on a bucket so that the bucket can service cross-origin + /// requests. For example, you might want to enable a request whose origin is http://www.example.com + /// to access your Amazon S3 bucket at my.example.bucket.com by using the browser's + /// XMLHttpRequest capability. + /// + /// + /// + /// To enable cross-origin resource sharing (CORS) on a bucket, you add the cors + /// subresource to the bucket. The cors subresource is an XML document in which + /// you configure rules that identify origins and the HTTP methods that can be executed + /// on your bucket. The document is limited to 64 KB in size. + /// + /// + /// + /// When Amazon S3 receives a cross-origin request (or a pre-flight OPTIONS request) against + /// a bucket, it evaluates the cors configuration on the bucket and uses the first + /// CORSRule rule that matches the incoming browser request to enable a cross-origin + /// request. For a rule to match, the following conditions must be met: + /// + ///
    • + /// + /// The request's Origin header must match AllowedOrigin elements. /// ///
    • /// - /// RoutingRule + /// The request method (for example, GET, PUT, HEAD, and so on) or the Access-Control-Request-Method + /// header in case of a pre-flight OPTIONS request must be one of the AllowedMethod + /// elements. /// ///
    • /// - /// Condition + /// Every header specified in the Access-Control-Request-Headers request header + /// of a pre-flight request must match an AllowedHeader element. + /// + ///
    + /// + /// For more information about CORS, go to Enabling + /// Cross-Origin Resource Sharing in the Amazon S3 User Guide. + /// + /// + /// + /// The following operations are related to PutBucketCors: + /// + /// + ///
  • + /// Container for the necessary parameters to execute the PutCORSConfiguration service method. + /// + /// The response from the PutCORSConfiguration service method, as returned by S3. + /// REST API Reference for PutCORSConfiguration Operation + PutCORSConfigurationResponse PutCORSConfiguration(PutCORSConfigurationRequest request); + + + /// + /// + /// + /// This operation is not supported by directory buckets. + /// + /// + /// + /// Sets the cors configuration for your bucket. If the configuration exists, Amazon + /// S3 replaces it. + /// + /// + /// + /// To use this operation, you must be allowed to perform the s3:PutBucketCORS + /// action. By default, the bucket owner has this permission and can grant it to others. + /// + /// + /// + /// You set this configuration on a bucket so that the bucket can service cross-origin + /// requests. For example, you might want to enable a request whose origin is http://www.example.com + /// to access your Amazon S3 bucket at my.example.bucket.com by using the browser's + /// XMLHttpRequest capability. + /// + /// + /// + /// To enable cross-origin resource sharing (CORS) on a bucket, you add the cors + /// subresource to the bucket. The cors subresource is an XML document in which + /// you configure rules that identify origins and the HTTP methods that can be executed + /// on your bucket. The document is limited to 64 KB in size. + /// + /// + /// + /// When Amazon S3 receives a cross-origin request (or a pre-flight OPTIONS request) against + /// a bucket, it evaluates the cors configuration on the bucket and uses the first + /// CORSRule rule that matches the incoming browser request to enable a cross-origin + /// request. For a rule to match, the following conditions must be met: + /// + ///
    • + /// + /// The request's Origin header must match AllowedOrigin elements. /// ///
    • /// - /// Redirect + /// The request method (for example, GET, PUT, HEAD, and so on) or the Access-Control-Request-Method + /// header in case of a pre-flight OPTIONS request must be one of the AllowedMethod + /// elements. /// ///
    • /// - /// Protocol + /// Every header specified in the Access-Control-Request-Headers request header + /// of a pre-flight request must match an AllowedHeader element. /// - ///
    • + ///
    /// - /// HostName + /// For more information about CORS, go to Enabling + /// Cross-Origin Resource Sharing in the Amazon S3 User Guide. /// - ///
  • + /// /// - /// ReplaceKeyPrefixWith + /// The following operations are related to PutBucketCors: /// - ///
  • + ///
    • /// - /// ReplaceKeyWith + /// GetBucketCors + /// /// ///
    • /// - /// HttpRedirectCode - /// - ///
    - /// - /// Amazon S3 has a limitation of 50 routing rules per website configuration. If you require - /// more than 50 routing rules, you can use object redirect. For more information, see - /// Configuring - /// an Object Redirect in the Amazon S3 User Guide. + /// DeleteBucketCors + /// /// - /// + ///
  • /// - /// The maximum request length is limited to 128 KB. + /// RESTOPTIONSobject + /// /// + ///
  • ///
    - /// Container for the necessary parameters to execute the PutBucketWebsite service method. + /// Specifies the bucket impacted by the corsconfiguration. + /// Describes the cross-origin access configuration for objects in an Amazon S3 bucket. For more information, see Enabling Cross-Origin Resource Sharing in the Amazon S3 User Guide. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// /// - /// The response from the PutBucketWebsite service method, as returned by S3. - /// REST API Reference for PutBucketWebsite Operation - PutBucketWebsiteResponse PutBucketWebsite(PutBucketWebsiteRequest request); + /// The response from the PutCORSConfiguration service method, as returned by S3. + /// REST API Reference for PutCORSConfiguration Operation + Task PutCORSConfigurationAsync(string bucketName, CORSConfiguration configuration, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); /// @@ -21302,272 +21860,310 @@ public partial interface IAmazonS3 : IAmazonService, IDisposable /// /// /// - /// Sets the configuration of the website that is specified in the website subresource. - /// To configure a bucket as a website, you can add this subresource on the bucket with - /// website configuration information such as the file name of the index document and - /// any redirect rules. For more information, see Hosting - /// Websites on Amazon S3. + /// Sets the cors configuration for your bucket. If the configuration exists, Amazon + /// S3 replaces it. /// /// /// - /// This PUT action requires the S3:PutBucketWebsite permission. By default, only - /// the bucket owner can configure the website attached to a bucket; however, bucket owners - /// can allow other users to set the website configuration by writing a bucket policy - /// that grants them the S3:PutBucketWebsite permission. + /// To use this operation, you must be allowed to perform the s3:PutBucketCORS + /// action. By default, the bucket owner has this permission and can grant it to others. /// /// /// - /// To redirect all website requests sent to the bucket's website endpoint, you add a - /// website configuration with the following elements. Because all requests are sent to - /// another website, you don't need to provide index document name for the bucket. + /// You set this configuration on a bucket so that the bucket can service cross-origin + /// requests. For example, you might want to enable a request whose origin is http://www.example.com + /// to access your Amazon S3 bucket at my.example.bucket.com by using the browser's + /// XMLHttpRequest capability. /// - ///
    • + /// /// - /// WebsiteConfiguration + /// To enable cross-origin resource sharing (CORS) on a bucket, you add the cors + /// subresource to the bucket. The cors subresource is an XML document in which + /// you configure rules that identify origins and the HTTP methods that can be executed + /// on your bucket. The document is limited to 64 KB in size. /// - ///
    • + /// /// - /// RedirectAllRequestsTo + /// When Amazon S3 receives a cross-origin request (or a pre-flight OPTIONS request) against + /// a bucket, it evaluates the cors configuration on the bucket and uses the first + /// CORSRule rule that matches the incoming browser request to enable a cross-origin + /// request. For a rule to match, the following conditions must be met: + /// + ///
      • + /// + /// The request's Origin header must match AllowedOrigin elements. /// ///
      • /// - /// HostName + /// The request method (for example, GET, PUT, HEAD, and so on) or the Access-Control-Request-Method + /// header in case of a pre-flight OPTIONS request must be one of the AllowedMethod + /// elements. /// ///
      • /// - /// Protocol + /// Every header specified in the Access-Control-Request-Headers request header + /// of a pre-flight request must match an AllowedHeader element. /// ///
      /// - /// If you want granular control over redirects, you can use the following elements to - /// add routing rules that describe conditions for redirecting requests and information - /// about the redirect destination. In this case, the website configuration must provide - /// an index document for the bucket, because some requests might not be redirected. + /// For more information about CORS, go to Enabling + /// Cross-Origin Resource Sharing in the Amazon S3 User Guide. + /// + /// + /// + /// The following operations are related to PutBucketCors: /// /// + ///
    + /// Container for the necessary parameters to execute the PutCORSConfiguration service method. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// + /// The response from the PutCORSConfiguration service method, as returned by S3. + /// REST API Reference for PutCORSConfiguration Operation + Task PutCORSConfigurationAsync(PutCORSConfigurationRequest request, CancellationToken cancellationToken = default(CancellationToken)); + + #endregion + + #region PutLifecycleConfiguration + + + /// + /// /// - /// ErrorDocument + /// This operation is not supported by directory buckets. /// - ///
  • + /// /// - /// Key + /// Creates a new lifecycle configuration for the bucket or replaces an existing lifecycle + /// configuration. Keep in mind that this will overwrite an existing lifecycle configuration, + /// so if you want to retain any configuration details, they must be included in the new + /// lifecycle configuration. For information about lifecycle configuration, see Managing + /// your storage lifecycle. /// - ///
  • + /// /// - /// RoutingRules + /// Bucket lifecycle configuration now supports specifying a lifecycle rule using an object + /// key name prefix, one or more object tags, object size, or any combination of these. + /// Accordingly, this section describes the latest API. The previous version of the API + /// supported filtering based only on an object key name prefix, which is supported for + /// backward compatibility. For the related API description, see PutBucketLifecycle. /// - ///
  • + ///
    Rules
    /// - /// RoutingRule + /// You specify the lifecycle configuration in your request body. The lifecycle configuration + /// is specified as XML consisting of one or more rules. An Amazon S3 Lifecycle configuration + /// can have up to 1,000 rules. This limit is not adjustable. Each rule consists of the + /// following: /// - ///
  • + ///
    • /// - /// Condition + /// A filter identifying a subset of objects to which the rule applies. The filter can + /// be based on a key name prefix, object tags, object size, or any combination of these. /// ///
    • /// - /// HttpErrorCodeReturnedEquals + /// A status indicating whether the rule is in effect. /// ///
    • /// - /// KeyPrefixEquals + /// One or more lifecycle transition and expiration actions that you want Amazon S3 to + /// perform on the objects identified by the filter. If the state of your bucket is versioning-enabled + /// or versioning-suspended, you can have many versions of the same object (one current + /// version and zero or more noncurrent versions). Amazon S3 provides predefined actions + /// that you can specify for current and noncurrent object versions. /// - ///
    • + ///
    /// - /// Redirect + /// For more information, see Object + /// Lifecycle Management and Lifecycle + /// Configuration Elements. /// - ///
  • + ///
    Permissions
    /// - /// Protocol + /// By default, all Amazon S3 resources are private, including buckets, objects, and related + /// subresources (for example, lifecycle configuration and website configuration). Only + /// the resource owner (that is, the Amazon Web Services account that created it) can + /// access the resource. The resource owner can optionally grant access permissions to + /// others by writing an access policy. For this operation, a user must get the s3:PutLifecycleConfiguration + /// permission. /// - ///
  • + /// /// - /// HostName + /// You can also explicitly deny permissions. An explicit deny also supersedes any other + /// permissions. If you want to block users or accounts from removing or deleting objects + /// from your bucket, you must deny them permissions for the following actions: /// - ///
  • + ///
    • /// - /// ReplaceKeyPrefixWith + /// s3:DeleteObject /// ///
    • /// - /// ReplaceKeyWith + /// s3:DeleteObjectVersion /// ///
    • /// - /// HttpRedirectCode + /// s3:PutLifecycleConfiguration /// ///
    /// - /// Amazon S3 has a limitation of 50 routing rules per website configuration. If you require - /// more than 50 routing rules, you can use object redirect. For more information, see - /// Configuring - /// an Object Redirect in the Amazon S3 User Guide. - /// - /// - /// - /// The maximum request length is limited to 128 KB. - /// - ///
  • - /// The bucket name. - /// Container for the request. - /// - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// - /// - /// The response from the PutBucketWebsite service method, as returned by S3. - /// REST API Reference for PutBucketWebsite Operation - Task PutBucketWebsiteAsync(string bucketName, WebsiteConfiguration websiteConfiguration, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); - - - /// - /// - /// - /// This operation is not supported by directory buckets. + /// For more information about permissions, see Managing + /// Access Permissions to Your Amazon S3 Resources. /// - /// + /// /// - /// Sets the configuration of the website that is specified in the website subresource. - /// To configure a bucket as a website, you can add this subresource on the bucket with - /// website configuration information such as the file name of the index document and - /// any redirect rules. For more information, see Hosting - /// Websites on Amazon S3. + /// The following operations are related to PutBucketLifecycleConfiguration: /// - /// + ///
    • /// - /// This PUT action requires the S3:PutBucketWebsite permission. By default, only - /// the bucket owner can configure the website attached to a bucket; however, bucket owners - /// can allow other users to set the website configuration by writing a bucket policy - /// that grants them the S3:PutBucketWebsite permission. + /// Examples + /// of Lifecycle Configuration /// - /// + ///
    • /// - /// To redirect all website requests sent to the bucket's website endpoint, you add a - /// website configuration with the following elements. Because all requests are sent to - /// another website, you don't need to provide index document name for the bucket. + /// GetBucketLifecycleConfiguration + /// /// - /// + ///
    + /// The name of the bucket for which to set the configuration. + /// A property of PutLifecycleConfigurationRequest used to execute the PutLifecycleConfiguration service method. + /// + /// The response from the PutLifecycleConfiguration service method, as returned by S3. + /// REST API Reference for PutLifecycleConfiguration Operation + PutLifecycleConfigurationResponse PutLifecycleConfiguration(string bucketName, LifecycleConfiguration configuration); + + /// + /// /// - /// RedirectAllRequestsTo + /// This operation is not supported by directory buckets. /// - ///
  • + /// /// - /// HostName + /// Creates a new lifecycle configuration for the bucket or replaces an existing lifecycle + /// configuration. Keep in mind that this will overwrite an existing lifecycle configuration, + /// so if you want to retain any configuration details, they must be included in the new + /// lifecycle configuration. For information about lifecycle configuration, see Managing + /// your storage lifecycle. /// - ///
  • + /// /// - /// Protocol + /// Bucket lifecycle configuration now supports specifying a lifecycle rule using an object + /// key name prefix, one or more object tags, object size, or any combination of these. + /// Accordingly, this section describes the latest API. The previous version of the API + /// supported filtering based only on an object key name prefix, which is supported for + /// backward compatibility. For the related API description, see PutBucketLifecycle. /// - ///
  • + ///
    Rules
    /// - /// If you want granular control over redirects, you can use the following elements to - /// add routing rules that describe conditions for redirecting requests and information - /// about the redirect destination. In this case, the website configuration must provide - /// an index document for the bucket, because some requests might not be redirected. + /// You specify the lifecycle configuration in your request body. The lifecycle configuration + /// is specified as XML consisting of one or more rules. An Amazon S3 Lifecycle configuration + /// can have up to 1,000 rules. This limit is not adjustable. Each rule consists of the + /// following: /// ///
    • /// - /// WebsiteConfiguration - /// - ///
    • - /// - /// IndexDocument - /// - ///
    • - /// - /// Suffix + /// A filter identifying a subset of objects to which the rule applies. The filter can + /// be based on a key name prefix, object tags, object size, or any combination of these. /// ///
    • /// - /// ErrorDocument + /// A status indicating whether the rule is in effect. /// ///
    • /// - /// Key + /// One or more lifecycle transition and expiration actions that you want Amazon S3 to + /// perform on the objects identified by the filter. If the state of your bucket is versioning-enabled + /// or versioning-suspended, you can have many versions of the same object (one current + /// version and zero or more noncurrent versions). Amazon S3 provides predefined actions + /// that you can specify for current and noncurrent object versions. /// - ///
    • + ///
    /// - /// RoutingRules + /// For more information, see Object + /// Lifecycle Management and Lifecycle + /// Configuration Elements. /// - ///
  • + ///
  • Permissions
    /// - /// RoutingRule + /// By default, all Amazon S3 resources are private, including buckets, objects, and related + /// subresources (for example, lifecycle configuration and website configuration). Only + /// the resource owner (that is, the Amazon Web Services account that created it) can + /// access the resource. The resource owner can optionally grant access permissions to + /// others by writing an access policy. For this operation, a user must get the s3:PutLifecycleConfiguration + /// permission. /// - ///
  • + /// /// - /// Condition + /// You can also explicitly deny permissions. An explicit deny also supersedes any other + /// permissions. If you want to block users or accounts from removing or deleting objects + /// from your bucket, you must deny them permissions for the following actions: /// - ///
  • + ///
    • /// - /// HttpErrorCodeReturnedEquals + /// s3:DeleteObject /// ///
    • /// - /// KeyPrefixEquals + /// s3:DeleteObjectVersion /// ///
    • /// - /// Redirect + /// s3:PutLifecycleConfiguration /// - ///
    • + ///
    /// - /// Protocol + /// For more information about permissions, see Managing + /// Access Permissions to Your Amazon S3 Resources. /// - ///
  • + ///
  • /// - /// HostName + /// The following operations are related to PutBucketLifecycleConfiguration: /// - ///
  • + /// - /// - /// Amazon S3 has a limitation of 50 routing rules per website configuration. If you require - /// more than 50 routing rules, you can use object redirect. For more information, see - /// Configuring - /// an Object Redirect in the Amazon S3 User Guide. - /// - /// - /// - /// The maximum request length is limited to 128 KB. + /// DeleteBucketLifecycle + /// /// + ///
  • ///
    - /// Container for the necessary parameters to execute the PutBucketWebsite service method. - /// - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// + /// Container for the necessary parameters to execute the PutLifecycleConfiguration service method. /// - /// The response from the PutBucketWebsite service method, as returned by S3. - /// REST API Reference for PutBucketWebsite Operation - Task PutBucketWebsiteAsync(PutBucketWebsiteRequest request, CancellationToken cancellationToken = default(CancellationToken)); - - #endregion - - #region PutCORSConfiguration + /// The response from the PutLifecycleConfiguration service method, as returned by S3. + /// REST API Reference for PutLifecycleConfiguration Operation + PutLifecycleConfigurationResponse PutLifecycleConfiguration(PutLifecycleConfigurationRequest request); /// @@ -21577,344 +22173,502 @@ public partial interface IAmazonS3 : IAmazonService, IDisposable /// /// /// - /// Sets the cors configuration for your bucket. If the configuration exists, Amazon - /// S3 replaces it. + /// Creates a new lifecycle configuration for the bucket or replaces an existing lifecycle + /// configuration. Keep in mind that this will overwrite an existing lifecycle configuration, + /// so if you want to retain any configuration details, they must be included in the new + /// lifecycle configuration. For information about lifecycle configuration, see Managing + /// your storage lifecycle. /// - /// + /// /// - /// To use this operation, you must be allowed to perform the s3:PutBucketCORS - /// action. By default, the bucket owner has this permission and can grant it to others. + /// Bucket lifecycle configuration now supports specifying a lifecycle rule using an object + /// key name prefix, one or more object tags, object size, or any combination of these. + /// Accordingly, this section describes the latest API. The previous version of the API + /// supported filtering based only on an object key name prefix, which is supported for + /// backward compatibility. For the related API description, see PutBucketLifecycle. /// - /// + ///
    Rules
    /// - /// You set this configuration on a bucket so that the bucket can service cross-origin - /// requests. For example, you might want to enable a request whose origin is http://www.example.com - /// to access your Amazon S3 bucket at my.example.bucket.com by using the browser's - /// XMLHttpRequest capability. + /// You specify the lifecycle configuration in your request body. The lifecycle configuration + /// is specified as XML consisting of one or more rules. An Amazon S3 Lifecycle configuration + /// can have up to 1,000 rules. This limit is not adjustable. Each rule consists of the + /// following: /// - /// + ///
    • /// - /// To enable cross-origin resource sharing (CORS) on a bucket, you add the cors - /// subresource to the bucket. The cors subresource is an XML document in which - /// you configure rules that identify origins and the HTTP methods that can be executed - /// on your bucket. The document is limited to 64 KB in size. + /// A filter identifying a subset of objects to which the rule applies. The filter can + /// be based on a key name prefix, object tags, object size, or any combination of these. + /// + ///
    • + /// + /// A status indicating whether the rule is in effect. + /// + ///
    • + /// + /// One or more lifecycle transition and expiration actions that you want Amazon S3 to + /// perform on the objects identified by the filter. If the state of your bucket is versioning-enabled + /// or versioning-suspended, you can have many versions of the same object (one current + /// version and zero or more noncurrent versions). Amazon S3 provides predefined actions + /// that you can specify for current and noncurrent object versions. + /// + ///
    + /// + /// For more information, see Object + /// Lifecycle Management and Lifecycle + /// Configuration Elements. + /// + ///
    Permissions
    + /// + /// By default, all Amazon S3 resources are private, including buckets, objects, and related + /// subresources (for example, lifecycle configuration and website configuration). Only + /// the resource owner (that is, the Amazon Web Services account that created it) can + /// access the resource. The resource owner can optionally grant access permissions to + /// others by writing an access policy. For this operation, a user must get the s3:PutLifecycleConfiguration + /// permission. /// /// /// - /// When Amazon S3 receives a cross-origin request (or a pre-flight OPTIONS request) against - /// a bucket, it evaluates the cors configuration on the bucket and uses the first - /// CORSRule rule that matches the incoming browser request to enable a cross-origin - /// request. For a rule to match, the following conditions must be met: + /// You can also explicitly deny permissions. An explicit deny also supersedes any other + /// permissions. If you want to block users or accounts from removing or deleting objects + /// from your bucket, you must deny them permissions for the following actions: /// ///
    • /// - /// The request's Origin header must match AllowedOrigin elements. + /// s3:DeleteObject /// ///
    • /// - /// The request method (for example, GET, PUT, HEAD, and so on) or the Access-Control-Request-Method - /// header in case of a pre-flight OPTIONS request must be one of the AllowedMethod - /// elements. + /// s3:DeleteObjectVersion /// ///
    • /// - /// Every header specified in the Access-Control-Request-Headers request header - /// of a pre-flight request must match an AllowedHeader element. + /// s3:PutLifecycleConfiguration /// ///
    /// - /// For more information about CORS, go to Enabling - /// Cross-Origin Resource Sharing in the Amazon S3 User Guide. + /// For more information about permissions, see Managing + /// Access Permissions to Your Amazon S3 Resources. /// - /// + ///
    /// - /// The following operations are related to PutBucketCors: + /// The following operations are related to PutBucketLifecycleConfiguration: /// /// ///
    - /// Specifies the bucket impacted by the corsconfiguration. - /// Describes the cross-origin access configuration for objects in an Amazon S3 bucket. For more information, see Enabling Cross-Origin Resource Sharing in the Amazon S3 User Guide. + /// The name of the bucket for which to set the configuration. + /// A property of PutLifecycleConfigurationRequest used to execute the PutLifecycleConfiguration service method. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// /// - /// The response from the PutCORSConfiguration service method, as returned by S3. - /// REST API Reference for PutCORSConfiguration Operation - PutCORSConfigurationResponse PutCORSConfiguration(string bucketName, CORSConfiguration configuration); + /// The response from the PutLifecycleConfiguration service method, as returned by S3. + /// REST API Reference for PutLifecycleConfiguration Operation + Task PutLifecycleConfigurationAsync(string bucketName, LifecycleConfiguration configuration, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); + /// /// /// - /// This operation is not supported by directory buckets. + /// This operation is not supported by directory buckets. + /// + /// + /// + /// Creates a new lifecycle configuration for the bucket or replaces an existing lifecycle + /// configuration. Keep in mind that this will overwrite an existing lifecycle configuration, + /// so if you want to retain any configuration details, they must be included in the new + /// lifecycle configuration. For information about lifecycle configuration, see Managing + /// your storage lifecycle. + /// + /// + /// + /// Bucket lifecycle configuration now supports specifying a lifecycle rule using an object + /// key name prefix, one or more object tags, object size, or any combination of these. + /// Accordingly, this section describes the latest API. The previous version of the API + /// supported filtering based only on an object key name prefix, which is supported for + /// backward compatibility. For the related API description, see PutBucketLifecycle. + /// + ///
    Rules
    + /// + /// You specify the lifecycle configuration in your request body. The lifecycle configuration + /// is specified as XML consisting of one or more rules. An Amazon S3 Lifecycle configuration + /// can have up to 1,000 rules. This limit is not adjustable. Each rule consists of the + /// following: + /// + ///
    • + /// + /// A filter identifying a subset of objects to which the rule applies. The filter can + /// be based on a key name prefix, object tags, object size, or any combination of these. /// - /// + ///
    • /// - /// Sets the cors configuration for your bucket. If the configuration exists, Amazon - /// S3 replaces it. + /// A status indicating whether the rule is in effect. /// - /// + ///
    • /// - /// To use this operation, you must be allowed to perform the s3:PutBucketCORS - /// action. By default, the bucket owner has this permission and can grant it to others. + /// One or more lifecycle transition and expiration actions that you want Amazon S3 to + /// perform on the objects identified by the filter. If the state of your bucket is versioning-enabled + /// or versioning-suspended, you can have many versions of the same object (one current + /// version and zero or more noncurrent versions). Amazon S3 provides predefined actions + /// that you can specify for current and noncurrent object versions. /// - /// + ///
    /// - /// You set this configuration on a bucket so that the bucket can service cross-origin - /// requests. For example, you might want to enable a request whose origin is http://www.example.com - /// to access your Amazon S3 bucket at my.example.bucket.com by using the browser's - /// XMLHttpRequest capability. + /// For more information, see Object + /// Lifecycle Management and Lifecycle + /// Configuration Elements. /// - /// + ///
    Permissions
    /// - /// To enable cross-origin resource sharing (CORS) on a bucket, you add the cors - /// subresource to the bucket. The cors subresource is an XML document in which - /// you configure rules that identify origins and the HTTP methods that can be executed - /// on your bucket. The document is limited to 64 KB in size. + /// By default, all Amazon S3 resources are private, including buckets, objects, and related + /// subresources (for example, lifecycle configuration and website configuration). Only + /// the resource owner (that is, the Amazon Web Services account that created it) can + /// access the resource. The resource owner can optionally grant access permissions to + /// others by writing an access policy. For this operation, a user must get the s3:PutLifecycleConfiguration + /// permission. /// /// /// - /// When Amazon S3 receives a cross-origin request (or a pre-flight OPTIONS request) against - /// a bucket, it evaluates the cors configuration on the bucket and uses the first - /// CORSRule rule that matches the incoming browser request to enable a cross-origin - /// request. For a rule to match, the following conditions must be met: + /// You can also explicitly deny permissions. An explicit deny also supersedes any other + /// permissions. If you want to block users or accounts from removing or deleting objects + /// from your bucket, you must deny them permissions for the following actions: /// ///
    • /// - /// The request's Origin header must match AllowedOrigin elements. + /// s3:DeleteObject /// ///
    • /// - /// The request method (for example, GET, PUT, HEAD, and so on) or the Access-Control-Request-Method - /// header in case of a pre-flight OPTIONS request must be one of the AllowedMethod - /// elements. + /// s3:DeleteObjectVersion /// ///
    • /// - /// Every header specified in the Access-Control-Request-Headers request header - /// of a pre-flight request must match an AllowedHeader element. + /// s3:PutLifecycleConfiguration /// ///
    /// - /// For more information about CORS, go to Enabling - /// Cross-Origin Resource Sharing in the Amazon S3 User Guide. + /// For more information about permissions, see Managing + /// Access Permissions to Your Amazon S3 Resources. /// - /// + ///
    /// - /// The following operations are related to PutBucketCors: + /// The following operations are related to PutBucketLifecycleConfiguration: /// /// ///
    - /// Container for the necessary parameters to execute the PutCORSConfiguration service method. + /// Container for the necessary parameters to execute the PutLifecycleConfiguration service method. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// /// - /// The response from the PutCORSConfiguration service method, as returned by S3. - /// REST API Reference for PutCORSConfiguration Operation - PutCORSConfigurationResponse PutCORSConfiguration(PutCORSConfigurationRequest request); + /// The response from the PutLifecycleConfiguration service method, as returned by S3. + /// REST API Reference for PutLifecycleConfiguration Operation + Task PutLifecycleConfigurationAsync(PutLifecycleConfigurationRequest request, CancellationToken cancellationToken = default(CancellationToken)); + + #endregion + + #region PutObject /// - /// + /// Adds an object to a bucket. + /// + ///
    • /// - /// This operation is not supported by directory buckets. + /// Amazon S3 never adds partial objects; if you receive a success response, Amazon S3 + /// added the entire object to the bucket. You cannot use PutObject to only update + /// a single piece of metadata for an existing object. You must put the entire object + /// with updated metadata if you want to update some values. /// - /// + ///
    • /// - /// Sets the cors configuration for your bucket. If the configuration exists, Amazon - /// S3 replaces it. + /// If your bucket uses the bucket owner enforced setting for Object Ownership, ACLs are + /// disabled and no longer affect permissions. All objects written to the bucket by any + /// account will be owned by the bucket owner. /// - /// + ///
    • /// - /// To use this operation, you must be allowed to perform the s3:PutBucketCORS - /// action. By default, the bucket owner has this permission and can grant it to others. + /// Directory buckets - For directory buckets, you must make requests for this + /// API operation to the Zonal endpoint. These endpoints support virtual-hosted-style + /// requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name + /// . Path-style requests are not supported. For more information, see Regional + /// and Zonal endpoints in the Amazon S3 User Guide. /// - /// + ///
    /// - /// You set this configuration on a bucket so that the bucket can service cross-origin - /// requests. For example, you might want to enable a request whose origin is http://www.example.com - /// to access your Amazon S3 bucket at my.example.bucket.com by using the browser's - /// XMLHttpRequest capability. + /// Amazon S3 is a distributed system. If it receives multiple write requests for the + /// same object simultaneously, it overwrites all but the last object written. However, + /// Amazon S3 provides features that can modify this behavior: /// - /// + ///
    • /// - /// To enable cross-origin resource sharing (CORS) on a bucket, you add the cors - /// subresource to the bucket. The cors subresource is an XML document in which - /// you configure rules that identify origins and the HTTP methods that can be executed - /// on your bucket. The document is limited to 64 KB in size. + /// S3 Object Lock - To prevent objects from being deleted or overwritten, you + /// can use Amazon + /// S3 Object Lock in the Amazon S3 User Guide. /// - /// + /// /// - /// When Amazon S3 receives a cross-origin request (or a pre-flight OPTIONS request) against - /// a bucket, it evaluates the cors configuration on the bucket and uses the first - /// CORSRule rule that matches the incoming browser request to enable a cross-origin - /// request. For a rule to match, the following conditions must be met: + /// This functionality is not supported for directory buckets. + /// + ///
    • + /// + /// S3 Versioning - When you enable versioning for a bucket, if Amazon S3 receives + /// multiple write requests for the same object simultaneously, it stores all versions + /// of the objects. For each write request that is made to the same object, Amazon S3 + /// automatically generates a unique version ID of that object being stored in Amazon + /// S3. You can retrieve, replace, or delete any version of the object. For more information + /// about versioning, see Adding + /// Objects to Versioning-Enabled Buckets in the Amazon S3 User Guide. For + /// information about returning the versioning state of a bucket, see GetBucketVersioning. + /// + /// + /// + /// + /// This functionality is not supported for directory buckets. + /// + ///
    Permissions
    • + /// + /// General purpose bucket permissions - The following permissions are required + /// in your policies when your PutObject request includes specific headers. /// ///
      • /// - /// The request's Origin header must match AllowedOrigin elements. + /// s3:PutObject - To successfully complete the PutObject request, + /// you must always have the s3:PutObject permission on a bucket to add an object + /// to it. /// ///
      • /// - /// The request method (for example, GET, PUT, HEAD, and so on) or the Access-Control-Request-Method - /// header in case of a pre-flight OPTIONS request must be one of the AllowedMethod - /// elements. + /// s3:PutObjectAcl - To successfully change the objects ACL of your + /// PutObject request, you must have the s3:PutObjectAcl. /// ///
      • /// - /// Every header specified in the Access-Control-Request-Headers request header - /// of a pre-flight request must match an AllowedHeader element. + /// s3:PutObjectTagging - To successfully set the tag-set with your PutObject + /// request, you must have the s3:PutObjectTagging. /// - ///
      + ///
  • /// - /// For more information about CORS, go to Enabling - /// Cross-Origin Resource Sharing in the Amazon S3 User Guide. + /// Directory bucket permissions - To grant access to this API operation on a + /// directory bucket, we recommend that you use the + /// CreateSession API operation for session-based authorization. Specifically, + /// you grant the s3express:CreateSession permission to the directory bucket in + /// a bucket policy or an IAM identity-based policy. Then, you make the CreateSession + /// API call on the bucket to obtain a session token. With the session token in your request + /// header, you can make API requests to this operation. After the session token expires, + /// you make another CreateSession API call to generate a new session token for + /// use. Amazon Web Services CLI or SDKs create session and refresh the session token + /// automatically to avoid service interruptions when a session expires. For more information + /// about authorization, see + /// CreateSession . /// - /// + ///
  • Data integrity with Content-MD5
    • /// - /// The following operations are related to PutBucketCors: + /// General purpose bucket - To ensure that data is not corrupted traversing the + /// network, use the Content-MD5 header. When you use this header, Amazon S3 checks + /// the object against the provided MD5 value and, if they do not match, Amazon S3 returns + /// an error. Alternatively, when the object's ETag is its MD5 digest, you can calculate + /// the MD5 while putting the object to Amazon S3 and compare the returned ETag to the + /// calculated MD5 value. /// - ///
      • + ///
      • /// - /// GetBucketCors - /// + /// Directory bucket - This functionality is not supported for directory buckets. /// - ///
      • + ///
    HTTP Host header syntax
    /// - /// DeleteBucketCors + /// Directory buckets - The HTTP Host header syntax is Bucket_name.s3express-az_id.region.amazonaws.com. + /// + ///
    + /// + /// For more information about related Amazon S3 APIs, see the following: + /// + /// ///
    - /// Specifies the bucket impacted by the corsconfiguration. - /// Describes the cross-origin access configuration for objects in an Amazon S3 bucket. For more information, see Enabling Cross-Origin Resource Sharing in the Amazon S3 User Guide. - /// - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// + /// Container for the necessary parameters to execute the PutObject service method. /// - /// The response from the PutCORSConfiguration service method, as returned by S3. - /// REST API Reference for PutCORSConfiguration Operation - Task PutCORSConfigurationAsync(string bucketName, CORSConfiguration configuration, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); + /// The response from the PutObject service method, as returned by S3. + /// REST API Reference for PutObject Operation + PutObjectResponse PutObject(PutObjectRequest request); + /// - /// + /// Adds an object to a bucket. + /// + ///
    • /// - /// This operation is not supported by directory buckets. + /// Amazon S3 never adds partial objects; if you receive a success response, Amazon S3 + /// added the entire object to the bucket. You cannot use PutObject to only update + /// a single piece of metadata for an existing object. You must put the entire object + /// with updated metadata if you want to update some values. + /// + ///
    • + /// + /// If your bucket uses the bucket owner enforced setting for Object Ownership, ACLs are + /// disabled and no longer affect permissions. All objects written to the bucket by any + /// account will be owned by the bucket owner. + /// + ///
    • + /// + /// Directory buckets - For directory buckets, you must make requests for this + /// API operation to the Zonal endpoint. These endpoints support virtual-hosted-style + /// requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name + /// . Path-style requests are not supported. For more information, see Regional + /// and Zonal endpoints in the Amazon S3 User Guide. + /// + ///
    + /// + /// Amazon S3 is a distributed system. If it receives multiple write requests for the + /// same object simultaneously, it overwrites all but the last object written. However, + /// Amazon S3 provides features that can modify this behavior: /// - ///
    + ///
    • /// - /// Sets the cors configuration for your bucket. If the configuration exists, Amazon - /// S3 replaces it. + /// S3 Object Lock - To prevent objects from being deleted or overwritten, you + /// can use Amazon + /// S3 Object Lock in the Amazon S3 User Guide. /// - /// + /// /// - /// To use this operation, you must be allowed to perform the s3:PutBucketCORS - /// action. By default, the bucket owner has this permission and can grant it to others. + /// This functionality is not supported for directory buckets. /// - /// + ///
    • /// - /// You set this configuration on a bucket so that the bucket can service cross-origin - /// requests. For example, you might want to enable a request whose origin is http://www.example.com - /// to access your Amazon S3 bucket at my.example.bucket.com by using the browser's - /// XMLHttpRequest capability. + /// S3 Versioning - When you enable versioning for a bucket, if Amazon S3 receives + /// multiple write requests for the same object simultaneously, it stores all versions + /// of the objects. For each write request that is made to the same object, Amazon S3 + /// automatically generates a unique version ID of that object being stored in Amazon + /// S3. You can retrieve, replace, or delete any version of the object. For more information + /// about versioning, see Adding + /// Objects to Versioning-Enabled Buckets in the Amazon S3 User Guide. For + /// information about returning the versioning state of a bucket, see GetBucketVersioning. + /// /// - /// + /// /// - /// To enable cross-origin resource sharing (CORS) on a bucket, you add the cors - /// subresource to the bucket. The cors subresource is an XML document in which - /// you configure rules that identify origins and the HTTP methods that can be executed - /// on your bucket. The document is limited to 64 KB in size. + /// This functionality is not supported for directory buckets. /// - /// + ///
    Permissions
    • /// - /// When Amazon S3 receives a cross-origin request (or a pre-flight OPTIONS request) against - /// a bucket, it evaluates the cors configuration on the bucket and uses the first - /// CORSRule rule that matches the incoming browser request to enable a cross-origin - /// request. For a rule to match, the following conditions must be met: + /// General purpose bucket permissions - The following permissions are required + /// in your policies when your PutObject request includes specific headers. /// ///
      • /// - /// The request's Origin header must match AllowedOrigin elements. + /// s3:PutObject - To successfully complete the PutObject request, + /// you must always have the s3:PutObject permission on a bucket to add an object + /// to it. /// ///
      • /// - /// The request method (for example, GET, PUT, HEAD, and so on) or the Access-Control-Request-Method - /// header in case of a pre-flight OPTIONS request must be one of the AllowedMethod - /// elements. + /// s3:PutObjectAcl - To successfully change the objects ACL of your + /// PutObject request, you must have the s3:PutObjectAcl. /// ///
      • /// - /// Every header specified in the Access-Control-Request-Headers request header - /// of a pre-flight request must match an AllowedHeader element. + /// s3:PutObjectTagging - To successfully set the tag-set with your PutObject + /// request, you must have the s3:PutObjectTagging. /// - ///
      + ///
  • /// - /// For more information about CORS, go to Enabling - /// Cross-Origin Resource Sharing in the Amazon S3 User Guide. + /// Directory bucket permissions - To grant access to this API operation on a + /// directory bucket, we recommend that you use the + /// CreateSession API operation for session-based authorization. Specifically, + /// you grant the s3express:CreateSession permission to the directory bucket in + /// a bucket policy or an IAM identity-based policy. Then, you make the CreateSession + /// API call on the bucket to obtain a session token. With the session token in your request + /// header, you can make API requests to this operation. After the session token expires, + /// you make another CreateSession API call to generate a new session token for + /// use. Amazon Web Services CLI or SDKs create session and refresh the session token + /// automatically to avoid service interruptions when a session expires. For more information + /// about authorization, see + /// CreateSession . /// - /// + ///
  • Data integrity with Content-MD5
    • /// - /// The following operations are related to PutBucketCors: + /// General purpose bucket - To ensure that data is not corrupted traversing the + /// network, use the Content-MD5 header. When you use this header, Amazon S3 checks + /// the object against the provided MD5 value and, if they do not match, Amazon S3 returns + /// an error. Alternatively, when the object's ETag is its MD5 digest, you can calculate + /// the MD5 while putting the object to Amazon S3 and compare the returned ETag to the + /// calculated MD5 value. /// - ///
      • + ///
      • /// - /// GetBucketCors - /// + /// Directory bucket - This functionality is not supported for directory buckets. /// - ///
      • + ///
    HTTP Host header syntax
    /// - /// DeleteBucketCors + /// Directory buckets - The HTTP Host header syntax is Bucket_name.s3express-az_id.region.amazonaws.com. + /// + ///
    + /// + /// For more information about related Amazon S3 APIs, see the following: + /// + /// ///
    - /// Container for the necessary parameters to execute the PutCORSConfiguration service method. + /// Container for the necessary parameters to execute the PutObject service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// - /// The response from the PutCORSConfiguration service method, as returned by S3. - /// REST API Reference for PutCORSConfiguration Operation - Task PutCORSConfigurationAsync(PutCORSConfigurationRequest request, CancellationToken cancellationToken = default(CancellationToken)); + /// The response from the PutObject service method, as returned by S3. + /// REST API Reference for PutObject Operation + Task PutObjectAsync(PutObjectRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion - #region PutLifecycleConfiguration + #region PutObjectAcl /// @@ -21924,334 +22678,242 @@ public partial interface IAmazonS3 : IAmazonService, IDisposable /// /// /// - /// Creates a new lifecycle configuration for the bucket or replaces an existing lifecycle - /// configuration. Keep in mind that this will overwrite an existing lifecycle configuration, - /// so if you want to retain any configuration details, they must be included in the new - /// lifecycle configuration. For information about lifecycle configuration, see Managing - /// your storage lifecycle. - /// - /// - /// - /// Bucket lifecycle configuration now supports specifying a lifecycle rule using an object - /// key name prefix, one or more object tags, object size, or any combination of these. - /// Accordingly, this section describes the latest API. The previous version of the API - /// supported filtering based only on an object key name prefix, which is supported for - /// backward compatibility. For the related API description, see PutBucketLifecycle. + /// Uses the acl subresource to set the access control list (ACL) permissions for + /// a new or existing object in an S3 bucket. You must have the WRITE_ACP permission + /// to set the ACL of an object. For more information, see What + /// permissions can I grant? in the Amazon S3 User Guide. /// - ///
    Rules
    + /// /// - /// You specify the lifecycle configuration in your request body. The lifecycle configuration - /// is specified as XML consisting of one or more rules. An Amazon S3 Lifecycle configuration - /// can have up to 1,000 rules. This limit is not adjustable. Each rule consists of the - /// following: + /// This functionality is not supported for Amazon S3 on Outposts. /// - ///
    • + /// /// - /// A filter identifying a subset of objects to which the rule applies. The filter can - /// be based on a key name prefix, object tags, object size, or any combination of these. + /// Depending on your application needs, you can choose to set the ACL on an object using + /// either the request body or the headers. For example, if you have an existing application + /// that updates a bucket ACL using the request body, you can continue to use that approach. + /// For more information, see Access + /// Control List (ACL) Overview in the Amazon S3 User Guide. /// - ///
    • + /// /// - /// A status indicating whether the rule is in effect. + /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, ACLs + /// are disabled and no longer affect permissions. You must use policies to grant access + /// to your bucket and the objects in it. Requests to set ACLs or update ACLs fail and + /// return the AccessControlListNotSupported error code. Requests to read ACLs + /// are still supported. For more information, see Controlling + /// object ownership in the Amazon S3 User Guide. /// - ///
    • + ///
      Permissions
      /// - /// One or more lifecycle transition and expiration actions that you want Amazon S3 to - /// perform on the objects identified by the filter. If the state of your bucket is versioning-enabled - /// or versioning-suspended, you can have many versions of the same object (one current - /// version and zero or more noncurrent versions). Amazon S3 provides predefined actions - /// that you can specify for current and noncurrent object versions. + /// You can set access permissions using one of the following methods: /// - ///
    + ///
    • /// - /// For more information, see Object - /// Lifecycle Management and Lifecycle - /// Configuration Elements. + /// Specify a canned ACL with the x-amz-acl request header. Amazon S3 supports + /// a set of predefined ACLs, known as canned ACLs. Each canned ACL has a predefined set + /// of grantees and permissions. Specify the canned ACL name as the value of x-amz-acl. + /// If you use this header, you cannot use other access control-specific headers in your + /// request. For more information, see Canned + /// ACL. /// - ///
    Permissions
    + ///
  • /// - /// By default, all Amazon S3 resources are private, including buckets, objects, and related - /// subresources (for example, lifecycle configuration and website configuration). Only - /// the resource owner (that is, the Amazon Web Services account that created it) can - /// access the resource. The resource owner can optionally grant access permissions to - /// others by writing an access policy. For this operation, a user must get the s3:PutLifecycleConfiguration - /// permission. + /// Specify access permissions explicitly with the x-amz-grant-read, x-amz-grant-read-acp, + /// x-amz-grant-write-acp, and x-amz-grant-full-control headers. When using + /// these headers, you specify explicit access permissions and grantees (Amazon Web Services + /// accounts or Amazon S3 groups) who will receive the permission. If you use these ACL-specific + /// headers, you cannot use x-amz-acl header to set a canned ACL. These parameters + /// map to the set of permissions that Amazon S3 supports in an ACL. For more information, + /// see Access + /// Control List (ACL) Overview. /// /// /// - /// You can also explicitly deny permissions. An explicit deny also supersedes any other - /// permissions. If you want to block users or accounts from removing or deleting objects - /// from your bucket, you must deny them permissions for the following actions: + /// You specify each grantee as a type=value pair, where the type is one of the following: /// ///
    • /// - /// s3:DeleteObject + /// id – if the value specified is the canonical user ID of an Amazon Web Services + /// account /// ///
    • /// - /// s3:DeleteObjectVersion + /// uri – if you are granting permissions to a predefined group /// ///
    • /// - /// s3:PutLifecycleConfiguration - /// - ///
    - /// - /// For more information about permissions, see Managing - /// Access Permissions to Your Amazon S3 Resources. + /// emailAddress – if the value specified is the email address of an Amazon Web + /// Services account /// - ///
  • + /// /// - /// The following operations are related to PutBucketLifecycleConfiguration: + /// Using email addresses to specify a grantee is only supported in the following Amazon + /// Web Services Regions: /// /// - ///
    - /// The name of the bucket for which to set the configuration. - /// A property of PutLifecycleConfigurationRequest used to execute the PutLifecycleConfiguration service method. - /// - /// The response from the PutLifecycleConfiguration service method, as returned by S3. - /// REST API Reference for PutLifecycleConfiguration Operation - PutLifecycleConfigurationResponse PutLifecycleConfiguration(string bucketName, LifecycleConfiguration configuration); - - /// - /// - /// - /// This operation is not supported by directory buckets. - /// - /// - /// - /// Creates a new lifecycle configuration for the bucket or replaces an existing lifecycle - /// configuration. Keep in mind that this will overwrite an existing lifecycle configuration, - /// so if you want to retain any configuration details, they must be included in the new - /// lifecycle configuration. For information about lifecycle configuration, see Managing - /// your storage lifecycle. - /// - /// - /// - /// Bucket lifecycle configuration now supports specifying a lifecycle rule using an object - /// key name prefix, one or more object tags, object size, or any combination of these. - /// Accordingly, this section describes the latest API. The previous version of the API - /// supported filtering based only on an object key name prefix, which is supported for - /// backward compatibility. For the related API description, see PutBucketLifecycle. + /// US West (Oregon) /// - ///
    Rules
    + ///
  • /// - /// You specify the lifecycle configuration in your request body. The lifecycle configuration - /// is specified as XML consisting of one or more rules. An Amazon S3 Lifecycle configuration - /// can have up to 1,000 rules. This limit is not adjustable. Each rule consists of the - /// following: + /// Asia Pacific (Singapore) /// - ///
    • + ///
    • /// - /// A filter identifying a subset of objects to which the rule applies. The filter can - /// be based on a key name prefix, object tags, object size, or any combination of these. + /// Asia Pacific (Sydney) /// ///
    • /// - /// A status indicating whether the rule is in effect. + /// Asia Pacific (Tokyo) /// ///
    • /// - /// One or more lifecycle transition and expiration actions that you want Amazon S3 to - /// perform on the objects identified by the filter. If the state of your bucket is versioning-enabled - /// or versioning-suspended, you can have many versions of the same object (one current - /// version and zero or more noncurrent versions). Amazon S3 provides predefined actions - /// that you can specify for current and noncurrent object versions. + /// Europe (Ireland) + /// + ///
    • + /// + /// South America (São Paulo) /// ///
    /// - /// For more information, see Object - /// Lifecycle Management and Lifecycle - /// Configuration Elements. + /// For a list of all the Amazon S3 supported Regions and endpoints, see Regions + /// and Endpoints in the Amazon Web Services General Reference. /// - ///
  • Permissions
    + /// /// - /// By default, all Amazon S3 resources are private, including buckets, objects, and related - /// subresources (for example, lifecycle configuration and website configuration). Only - /// the resource owner (that is, the Amazon Web Services account that created it) can - /// access the resource. The resource owner can optionally grant access permissions to - /// others by writing an access policy. For this operation, a user must get the s3:PutLifecycleConfiguration - /// permission. + /// For example, the following x-amz-grant-read header grants list objects permission + /// to the two Amazon Web Services accounts identified by their email addresses. /// /// /// - /// You can also explicitly deny permissions. An explicit deny also supersedes any other - /// permissions. If you want to block users or accounts from removing or deleting objects - /// from your bucket, you must deny them permissions for the following actions: + /// x-amz-grant-read: emailAddress="xyz@amazon.com", emailAddress="abc@amazon.com" + /// /// - ///
    • + ///
    /// - /// s3:DeleteObject + /// You can use either a canned ACL or specify access permissions explicitly. You cannot + /// do both. /// - ///
  • + ///
  • Grantee Values
    /// - /// s3:DeleteObjectVersion + /// You can specify the person (grantee) to whom you're assigning access rights (using + /// request elements) in the following ways: /// - ///
  • + ///
    • /// - /// s3:PutLifecycleConfiguration + /// By the person's ID: /// - ///
    + /// /// - /// For more information about permissions, see Managing - /// Access Permissions to Your Amazon S3 Resources. + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"><ID><>ID<></ID><DisplayName><>GranteesEmail<></DisplayName> + /// </Grantee> /// - ///
  • + /// /// - /// The following operations are related to PutBucketLifecycleConfiguration: + /// DisplayName is optional and ignored in the request. /// - /// - ///
    - /// Container for the necessary parameters to execute the PutLifecycleConfiguration service method. - /// - /// The response from the PutLifecycleConfiguration service method, as returned by S3. - /// REST API Reference for PutLifecycleConfiguration Operation - PutLifecycleConfigurationResponse PutLifecycleConfiguration(PutLifecycleConfigurationRequest request); - - - /// - /// + /// /// - /// This operation is not supported by directory buckets. + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="AmazonCustomerByEmail"><EmailAddress><>Grantees@email.com<></EmailAddress>lt;/Grantee> + /// /// - /// + /// /// - /// Creates a new lifecycle configuration for the bucket or replaces an existing lifecycle - /// configuration. Keep in mind that this will overwrite an existing lifecycle configuration, - /// so if you want to retain any configuration details, they must be included in the new - /// lifecycle configuration. For information about lifecycle configuration, see Managing - /// your storage lifecycle. + /// The grantee is resolved to the CanonicalUser and, in a response to a GET Object acl + /// request, appears as the CanonicalUser. /// /// /// - /// Bucket lifecycle configuration now supports specifying a lifecycle rule using an object - /// key name prefix, one or more object tags, object size, or any combination of these. - /// Accordingly, this section describes the latest API. The previous version of the API - /// supported filtering based only on an object key name prefix, which is supported for - /// backward compatibility. For the related API description, see PutBucketLifecycle. - /// - ///
    Rules
    - /// - /// You specify the lifecycle configuration in your request body. The lifecycle configuration - /// is specified as XML consisting of one or more rules. An Amazon S3 Lifecycle configuration - /// can have up to 1,000 rules. This limit is not adjustable. Each rule consists of the - /// following: + /// Using email addresses to specify a grantee is only supported in the following Amazon + /// Web Services Regions: /// ///
    • /// - /// A filter identifying a subset of objects to which the rule applies. The filter can - /// be based on a key name prefix, object tags, object size, or any combination of these. + /// US East (N. Virginia) /// ///
    • /// - /// A status indicating whether the rule is in effect. + /// US West (N. California) /// ///
    • /// - /// One or more lifecycle transition and expiration actions that you want Amazon S3 to - /// perform on the objects identified by the filter. If the state of your bucket is versioning-enabled - /// or versioning-suspended, you can have many versions of the same object (one current - /// version and zero or more noncurrent versions). Amazon S3 provides predefined actions - /// that you can specify for current and noncurrent object versions. - /// - ///
    - /// - /// For more information, see Object - /// Lifecycle Management and Lifecycle - /// Configuration Elements. + /// US West (Oregon) /// - ///
    Permissions
    + ///
  • /// - /// By default, all Amazon S3 resources are private, including buckets, objects, and related - /// subresources (for example, lifecycle configuration and website configuration). Only - /// the resource owner (that is, the Amazon Web Services account that created it) can - /// access the resource. The resource owner can optionally grant access permissions to - /// others by writing an access policy. For this operation, a user must get the s3:PutLifecycleConfiguration - /// permission. + /// Asia Pacific (Singapore) /// - /// + ///
  • /// - /// You can also explicitly deny permissions. An explicit deny also supersedes any other - /// permissions. If you want to block users or accounts from removing or deleting objects - /// from your bucket, you must deny them permissions for the following actions: + /// Asia Pacific (Sydney) /// - ///
    • + ///
    • /// - /// s3:DeleteObject + /// Asia Pacific (Tokyo) /// ///
    • /// - /// s3:DeleteObjectVersion + /// Europe (Ireland) /// ///
    • /// - /// s3:PutLifecycleConfiguration + /// South America (São Paulo) /// ///
    /// - /// For more information about permissions, see Managing - /// Access Permissions to Your Amazon S3 Resources. + /// For a list of all the Amazon S3 supported Regions and endpoints, see Regions + /// and Endpoints in the Amazon Web Services General Reference. /// - ///
  • + ///
    Versioning
    /// - /// The following operations are related to PutBucketLifecycleConfiguration: + /// The ACL of an object is set at the object version level. By default, PUT sets the + /// ACL of the current version of an object. To set the ACL of a different version, use + /// the versionId subresource. /// - ///
    • + ///
    /// - /// Examples - /// of Lifecycle Configuration + /// The following operations are related to PutObjectAcl: /// - ///
  • + /// ///
  • - /// The name of the bucket for which to set the configuration. - /// A property of PutLifecycleConfigurationRequest used to execute the PutLifecycleConfiguration service method. - /// - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// + /// Container for the necessary parameters to execute the PutObjectAcl service method. /// - /// The response from the PutLifecycleConfiguration service method, as returned by S3. - /// REST API Reference for PutLifecycleConfiguration Operation - Task PutLifecycleConfigurationAsync(string bucketName, LifecycleConfiguration configuration, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); + /// The response from the PutObjectAcl service method, as returned by S3. + /// REST API Reference for PutObjectAcl Operation + PutObjectAclResponse PutObjectAcl(PutObjectAclRequest request); + /// @@ -22261,362 +22923,223 @@ public partial interface IAmazonS3 : IAmazonService, IDisposable /// /// /// - /// Creates a new lifecycle configuration for the bucket or replaces an existing lifecycle - /// configuration. Keep in mind that this will overwrite an existing lifecycle configuration, - /// so if you want to retain any configuration details, they must be included in the new - /// lifecycle configuration. For information about lifecycle configuration, see Managing - /// your storage lifecycle. - /// - /// - /// - /// Bucket lifecycle configuration now supports specifying a lifecycle rule using an object - /// key name prefix, one or more object tags, object size, or any combination of these. - /// Accordingly, this section describes the latest API. The previous version of the API - /// supported filtering based only on an object key name prefix, which is supported for - /// backward compatibility. For the related API description, see PutBucketLifecycle. - /// - ///
    Rules
    - /// - /// You specify the lifecycle configuration in your request body. The lifecycle configuration - /// is specified as XML consisting of one or more rules. An Amazon S3 Lifecycle configuration - /// can have up to 1,000 rules. This limit is not adjustable. Each rule consists of the - /// following: - /// - ///
    • - /// - /// A filter identifying a subset of objects to which the rule applies. The filter can - /// be based on a key name prefix, object tags, object size, or any combination of these. - /// - ///
    • - /// - /// A status indicating whether the rule is in effect. - /// - ///
    • - /// - /// One or more lifecycle transition and expiration actions that you want Amazon S3 to - /// perform on the objects identified by the filter. If the state of your bucket is versioning-enabled - /// or versioning-suspended, you can have many versions of the same object (one current - /// version and zero or more noncurrent versions). Amazon S3 provides predefined actions - /// that you can specify for current and noncurrent object versions. - /// - ///
    - /// - /// For more information, see Object - /// Lifecycle Management and Lifecycle - /// Configuration Elements. - /// - ///
    Permissions
    - /// - /// By default, all Amazon S3 resources are private, including buckets, objects, and related - /// subresources (for example, lifecycle configuration and website configuration). Only - /// the resource owner (that is, the Amazon Web Services account that created it) can - /// access the resource. The resource owner can optionally grant access permissions to - /// others by writing an access policy. For this operation, a user must get the s3:PutLifecycleConfiguration - /// permission. + /// Uses the acl subresource to set the access control list (ACL) permissions for + /// a new or existing object in an S3 bucket. You must have the WRITE_ACP permission + /// to set the ACL of an object. For more information, see What + /// permissions can I grant? in the Amazon S3 User Guide. /// /// /// - /// You can also explicitly deny permissions. An explicit deny also supersedes any other - /// permissions. If you want to block users or accounts from removing or deleting objects - /// from your bucket, you must deny them permissions for the following actions: - /// - ///
    • - /// - /// s3:DeleteObject - /// - ///
    • - /// - /// s3:DeleteObjectVersion + /// This functionality is not supported for Amazon S3 on Outposts. /// - ///
    • + /// /// - /// s3:PutLifecycleConfiguration + /// Depending on your application needs, you can choose to set the ACL on an object using + /// either the request body or the headers. For example, if you have an existing application + /// that updates a bucket ACL using the request body, you can continue to use that approach. + /// For more information, see Access + /// Control List (ACL) Overview in the Amazon S3 User Guide. /// - ///
    + /// /// - /// For more information about permissions, see Managing - /// Access Permissions to Your Amazon S3 Resources. + /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, ACLs + /// are disabled and no longer affect permissions. You must use policies to grant access + /// to your bucket and the objects in it. Requests to set ACLs or update ACLs fail and + /// return the AccessControlListNotSupported error code. Requests to read ACLs + /// are still supported. For more information, see Controlling + /// object ownership in the Amazon S3 User Guide. /// - ///
    + ///
    Permissions
    /// - /// The following operations are related to PutBucketLifecycleConfiguration: + /// You can set access permissions using one of the following methods: /// ///
    • /// - /// Examples - /// of Lifecycle Configuration + /// Specify a canned ACL with the x-amz-acl request header. Amazon S3 supports + /// a set of predefined ACLs, known as canned ACLs. Each canned ACL has a predefined set + /// of grantees and permissions. Specify the canned ACL name as the value of x-amz-acl. + /// If you use this header, you cannot use other access control-specific headers in your + /// request. For more information, see Canned + /// ACL. /// ///
    • /// - /// GetBucketLifecycleConfiguration - /// + /// Specify access permissions explicitly with the x-amz-grant-read, x-amz-grant-read-acp, + /// x-amz-grant-write-acp, and x-amz-grant-full-control headers. When using + /// these headers, you specify explicit access permissions and grantees (Amazon Web Services + /// accounts or Amazon S3 groups) who will receive the permission. If you use these ACL-specific + /// headers, you cannot use x-amz-acl header to set a canned ACL. These parameters + /// map to the set of permissions that Amazon S3 supports in an ACL. For more information, + /// see Access + /// Control List (ACL) Overview. /// - ///
    • + /// /// - /// DeleteBucketLifecycle - /// + /// You specify each grantee as a type=value pair, where the type is one of the following: /// - ///
    - ///
    - /// Container for the necessary parameters to execute the PutLifecycleConfiguration service method. - /// - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// - /// - /// The response from the PutLifecycleConfiguration service method, as returned by S3. - /// REST API Reference for PutLifecycleConfiguration Operation - Task PutLifecycleConfigurationAsync(PutLifecycleConfigurationRequest request, CancellationToken cancellationToken = default(CancellationToken)); - - #endregion - - #region PutObject - - - /// - /// Adds an object to a bucket. - /// - ///
    • + ///
      • /// - /// Amazon S3 never adds partial objects; if you receive a success response, Amazon S3 - /// added the entire object to the bucket. You cannot use PutObject to only update - /// a single piece of metadata for an existing object. You must put the entire object - /// with updated metadata if you want to update some values. + /// id – if the value specified is the canonical user ID of an Amazon Web Services + /// account /// ///
      • /// - /// If your bucket uses the bucket owner enforced setting for Object Ownership, ACLs are - /// disabled and no longer affect permissions. All objects written to the bucket by any - /// account will be owned by the bucket owner. + /// uri – if you are granting permissions to a predefined group /// ///
      • /// - /// Directory buckets - For directory buckets, you must make requests for this - /// API operation to the Zonal endpoint. These endpoints support virtual-hosted-style - /// requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name - /// . Path-style requests are not supported. For more information, see Regional - /// and Zonal endpoints in the Amazon S3 User Guide. + /// emailAddress – if the value specified is the email address of an Amazon Web + /// Services account /// - ///
      + /// /// - /// Amazon S3 is a distributed system. If it receives multiple write requests for the - /// same object simultaneously, it overwrites all but the last object written. However, - /// Amazon S3 provides features that can modify this behavior: + /// Using email addresses to specify a grantee is only supported in the following Amazon + /// Web Services Regions: /// ///
      • /// - /// S3 Object Lock - To prevent objects from being deleted or overwritten, you - /// can use Amazon - /// S3 Object Lock in the Amazon S3 User Guide. + /// US East (N. Virginia) /// - /// + ///
      • /// - /// This functionality is not supported for directory buckets. + /// US West (N. California) /// - ///
      • + ///
      • /// - /// S3 Versioning - When you enable versioning for a bucket, if Amazon S3 receives - /// multiple write requests for the same object simultaneously, it stores all versions - /// of the objects. For each write request that is made to the same object, Amazon S3 - /// automatically generates a unique version ID of that object being stored in Amazon - /// S3. You can retrieve, replace, or delete any version of the object. For more information - /// about versioning, see Adding - /// Objects to Versioning-Enabled Buckets in the Amazon S3 User Guide. For - /// information about returning the versioning state of a bucket, see GetBucketVersioning. - /// + /// US West (Oregon) /// - /// + ///
      • /// - /// This functionality is not supported for directory buckets. + /// Asia Pacific (Singapore) /// - ///
      Permissions
      • + ///
      • /// - /// General purpose bucket permissions - The following permissions are required - /// in your policies when your PutObject request includes specific headers. + /// Asia Pacific (Sydney) /// - ///
        • + ///
        • /// - /// s3:PutObject - To successfully complete the PutObject request, - /// you must always have the s3:PutObject permission on a bucket to add an object - /// to it. + /// Asia Pacific (Tokyo) /// ///
        • /// - /// s3:PutObjectAcl - To successfully change the objects ACL of your - /// PutObject request, you must have the s3:PutObjectAcl. + /// Europe (Ireland) /// ///
        • /// - /// s3:PutObjectTagging - To successfully set the tag-set with your PutObject - /// request, you must have the s3:PutObjectTagging. + /// South America (São Paulo) /// - ///
      • + ///
      /// - /// Directory bucket permissions - To grant access to this API operation on a - /// directory bucket, we recommend that you use the - /// CreateSession API operation for session-based authorization. Specifically, - /// you grant the s3express:CreateSession permission to the directory bucket in - /// a bucket policy or an IAM identity-based policy. Then, you make the CreateSession - /// API call on the bucket to obtain a session token. With the session token in your request - /// header, you can make API requests to this operation. After the session token expires, - /// you make another CreateSession API call to generate a new session token for - /// use. Amazon Web Services CLI or SDKs create session and refresh the session token - /// automatically to avoid service interruptions when a session expires. For more information - /// about authorization, see - /// CreateSession . + /// For a list of all the Amazon S3 supported Regions and endpoints, see Regions + /// and Endpoints in the Amazon Web Services General Reference. /// - ///
    Data integrity with Content-MD5
    • + ///
    /// - /// General purpose bucket - To ensure that data is not corrupted traversing the - /// network, use the Content-MD5 header. When you use this header, Amazon S3 checks - /// the object against the provided MD5 value and, if they do not match, Amazon S3 returns - /// an error. Alternatively, when the object's ETag is its MD5 digest, you can calculate - /// the MD5 while putting the object to Amazon S3 and compare the returned ETag to the - /// calculated MD5 value. + /// For example, the following x-amz-grant-read header grants list objects permission + /// to the two Amazon Web Services accounts identified by their email addresses. /// - ///
  • + /// /// - /// Directory bucket - This functionality is not supported for directory buckets. + /// x-amz-grant-read: emailAddress="xyz@amazon.com", emailAddress="abc@amazon.com" + /// /// - ///
  • HTTP Host header syntax
    + /// /// - /// Directory buckets - The HTTP Host header syntax is Bucket_name.s3express-az_id.region.amazonaws.com. + /// You can use either a canned ACL or specify access permissions explicitly. You cannot + /// do both. /// - ///
    + ///
    Grantee Values
    /// - /// For more information about related Amazon S3 APIs, see the following: + /// You can specify the person (grantee) to whom you're assigning access rights (using + /// request elements) in the following ways: /// ///
    • /// - /// CopyObject - /// + /// By the person's ID: /// - ///
    • + /// /// - /// DeleteObject - /// + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"><ID><>ID<></ID><DisplayName><>GranteesEmail<></DisplayName> + /// </Grantee> /// - ///
    - ///
    - /// Container for the necessary parameters to execute the PutObject service method. - /// - /// The response from the PutObject service method, as returned by S3. - /// REST API Reference for PutObject Operation - PutObjectResponse PutObject(PutObjectRequest request); - - - - /// - /// Adds an object to a bucket. - /// - ///
    • + /// /// - /// Amazon S3 never adds partial objects; if you receive a success response, Amazon S3 - /// added the entire object to the bucket. You cannot use PutObject to only update - /// a single piece of metadata for an existing object. You must put the entire object - /// with updated metadata if you want to update some values. + /// DisplayName is optional and ignored in the request. /// ///
    • /// - /// If your bucket uses the bucket owner enforced setting for Object Ownership, ACLs are - /// disabled and no longer affect permissions. All objects written to the bucket by any - /// account will be owned by the bucket owner. + /// By URI: + /// + /// + /// + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Group"><URI><>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<></URI></Grantee> + /// /// ///
    • /// - /// Directory buckets - For directory buckets, you must make requests for this - /// API operation to the Zonal endpoint. These endpoints support virtual-hosted-style - /// requests in the format https://bucket_name.s3express-az_id.region.amazonaws.com/key-name - /// . Path-style requests are not supported. For more information, see Regional - /// and Zonal endpoints in the Amazon S3 User Guide. + /// By Email address: /// - ///
    + /// /// - /// Amazon S3 is a distributed system. If it receives multiple write requests for the - /// same object simultaneously, it overwrites all but the last object written. However, - /// Amazon S3 provides features that can modify this behavior: + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="AmazonCustomerByEmail"><EmailAddress><>Grantees@email.com<></EmailAddress>lt;/Grantee> + /// /// - ///
    • + /// /// - /// S3 Object Lock - To prevent objects from being deleted or overwritten, you - /// can use Amazon - /// S3 Object Lock in the Amazon S3 User Guide. + /// The grantee is resolved to the CanonicalUser and, in a response to a GET Object acl + /// request, appears as the CanonicalUser. /// /// /// - /// This functionality is not supported for directory buckets. + /// Using email addresses to specify a grantee is only supported in the following Amazon + /// Web Services Regions: /// - ///
    • + ///
      • /// - /// S3 Versioning - When you enable versioning for a bucket, if Amazon S3 receives - /// multiple write requests for the same object simultaneously, it stores all versions - /// of the objects. For each write request that is made to the same object, Amazon S3 - /// automatically generates a unique version ID of that object being stored in Amazon - /// S3. You can retrieve, replace, or delete any version of the object. For more information - /// about versioning, see Adding - /// Objects to Versioning-Enabled Buckets in the Amazon S3 User Guide. For - /// information about returning the versioning state of a bucket, see GetBucketVersioning. - /// + /// US East (N. Virginia) /// - /// + ///
      • /// - /// This functionality is not supported for directory buckets. + /// US West (N. California) /// - ///
      Permissions
      • + ///
      • /// - /// General purpose bucket permissions - The following permissions are required - /// in your policies when your PutObject request includes specific headers. + /// US West (Oregon) /// - ///
        • + ///
        • /// - /// s3:PutObject - To successfully complete the PutObject request, - /// you must always have the s3:PutObject permission on a bucket to add an object - /// to it. + /// Asia Pacific (Singapore) /// ///
        • /// - /// s3:PutObjectAcl - To successfully change the objects ACL of your - /// PutObject request, you must have the s3:PutObjectAcl. + /// Asia Pacific (Sydney) /// ///
        • /// - /// s3:PutObjectTagging - To successfully set the tag-set with your PutObject - /// request, you must have the s3:PutObjectTagging. + /// Asia Pacific (Tokyo) /// - ///
      • + ///
      • /// - /// Directory bucket permissions - To grant access to this API operation on a - /// directory bucket, we recommend that you use the - /// CreateSession API operation for session-based authorization. Specifically, - /// you grant the s3express:CreateSession permission to the directory bucket in - /// a bucket policy or an IAM identity-based policy. Then, you make the CreateSession - /// API call on the bucket to obtain a session token. With the session token in your request - /// header, you can make API requests to this operation. After the session token expires, - /// you make another CreateSession API call to generate a new session token for - /// use. Amazon Web Services CLI or SDKs create session and refresh the session token - /// automatically to avoid service interruptions when a session expires. For more information - /// about authorization, see - /// CreateSession . + /// Europe (Ireland) /// - ///
      Data integrity with Content-MD5
      • + ///
      • /// - /// General purpose bucket - To ensure that data is not corrupted traversing the - /// network, use the Content-MD5 header. When you use this header, Amazon S3 checks - /// the object against the provided MD5 value and, if they do not match, Amazon S3 returns - /// an error. Alternatively, when the object's ETag is its MD5 digest, you can calculate - /// the MD5 while putting the object to Amazon S3 and compare the returned ETag to the - /// calculated MD5 value. + /// South America (São Paulo) /// - ///
      • + ///
      /// - /// Directory bucket - This functionality is not supported for directory buckets. + /// For a list of all the Amazon S3 supported Regions and endpoints, see Regions + /// and Endpoints in the Amazon Web Services General Reference. /// - ///
    HTTP Host header syntax
    + ///
    Versioning
    /// - /// Directory buckets - The HTTP Host header syntax is Bucket_name.s3express-az_id.region.amazonaws.com. + /// The ACL of an object is set at the object version level. By default, PUT sets the + /// ACL of the current version of an object. To set the ACL of a different version, use + /// the versionId subresource. /// ///
    /// - /// For more information about related Amazon S3 APIs, see the following: + /// The following operations are related to PutObjectAcl: /// ///
    • /// @@ -22625,19 +23148,19 @@ public partial interface IAmazonS3 : IAmazonService, IDisposable /// ///
    • /// - /// DeleteObject + /// GetObject /// /// ///
    ///
    - /// Container for the necessary parameters to execute the PutObject service method. + /// Container for the necessary parameters to execute the PutObjectAcl service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// - /// The response from the PutObject service method, as returned by S3. - /// REST API Reference for PutObject Operation - Task PutObjectAsync(PutObjectRequest request, CancellationToken cancellationToken = default(CancellationToken)); + /// The response from the PutObjectAcl service method, as returned by S3. + /// REST API Reference for PutObjectAcl Operation + Task PutObjectAclAsync(PutObjectAclRequest request, CancellationToken cancellationToken = default(CancellationToken)); #endregion diff --git a/sdk/src/Services/S3/Generated/_netstandard/AmazonS3Client.cs b/sdk/src/Services/S3/Generated/_netstandard/AmazonS3Client.cs index 5e48f474e5f0..a148c98d9a11 100644 --- a/sdk/src/Services/S3/Generated/_netstandard/AmazonS3Client.cs +++ b/sdk/src/Services/S3/Generated/_netstandard/AmazonS3Client.cs @@ -4141,144 +4141,6 @@ internal virtual DeletePublicAccessBlockResponse DeletePublicAccessBlock(DeleteP #endregion - #region GetACL - - internal virtual GetACLResponse GetACL(GetACLRequest request) - { - var options = new InvokeOptions(); - options.RequestMarshaller = GetACLRequestMarshaller.Instance; - options.ResponseUnmarshaller = GetACLResponseUnmarshaller.Instance; - - return Invoke(request, options); - } - - - /// - /// - /// - /// This operation is not supported by directory buckets. - /// - /// - /// - /// This implementation of the GET action uses the acl subresource to return - /// the access control list (ACL) of a bucket. To use GET to return the ACL of - /// the bucket, you must have the READ_ACP access to the bucket. If READ_ACP - /// permission is granted to the anonymous user, you can return the ACL of the bucket - /// without using an authorization header. - /// - /// - /// - /// When you use this API operation with an access point, provide the alias of the access - /// point in place of the bucket name. - /// - /// - /// - /// When you use this API operation with an Object Lambda access point, provide the alias - /// of the Object Lambda access point in place of the bucket name. If the Object Lambda - /// access point alias in a request is not valid, the error code InvalidAccessPointAliasError - /// is returned. For more information about InvalidAccessPointAliasError, see List - /// of Error Codes. - /// - /// - /// - /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, requests - /// to read ACLs are still supported and return the bucket-owner-full-control ACL - /// with the owner being the account that created the bucket. For more information, see - /// - /// Controlling object ownership and disabling ACLs in the Amazon S3 User Guide. - /// - /// - /// - /// The following operations are related to GetBucketAcl: - /// - /// - /// - /// Specifies the S3 bucket whose ACL is being requested. When you use this API operation with an access point, provide the alias of the access point in place of the bucket name. When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. For more information about InvalidAccessPointAliasError, see List of Error Codes. - /// - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// - /// - /// The response from the GetACL service method, as returned by S3. - /// REST API Reference for GetACL Operation - public virtual Task GetACLAsync(string bucketName, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) - { - var request = new GetACLRequest(); - request.BucketName = bucketName; - return GetACLAsync(request, cancellationToken); - } - - - - /// - /// - /// - /// This operation is not supported by directory buckets. - /// - /// - /// - /// This implementation of the GET action uses the acl subresource to return - /// the access control list (ACL) of a bucket. To use GET to return the ACL of - /// the bucket, you must have the READ_ACP access to the bucket. If READ_ACP - /// permission is granted to the anonymous user, you can return the ACL of the bucket - /// without using an authorization header. - /// - /// - /// - /// When you use this API operation with an access point, provide the alias of the access - /// point in place of the bucket name. - /// - /// - /// - /// When you use this API operation with an Object Lambda access point, provide the alias - /// of the Object Lambda access point in place of the bucket name. If the Object Lambda - /// access point alias in a request is not valid, the error code InvalidAccessPointAliasError - /// is returned. For more information about InvalidAccessPointAliasError, see List - /// of Error Codes. - /// - /// - /// - /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, requests - /// to read ACLs are still supported and return the bucket-owner-full-control ACL - /// with the owner being the account that created the bucket. For more information, see - /// - /// Controlling object ownership and disabling ACLs in the Amazon S3 User Guide. - /// - /// - /// - /// The following operations are related to GetBucketAcl: - /// - /// - /// - /// Container for the necessary parameters to execute the GetACL service method. - /// - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// - /// - /// The response from the GetACL service method, as returned by S3. - /// REST API Reference for GetACL Operation - public virtual Task GetACLAsync(GetACLRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) - { - var options = new InvokeOptions(); - options.RequestMarshaller = GetACLRequestMarshaller.Instance; - options.ResponseUnmarshaller = GetACLResponseUnmarshaller.Instance; - - return InvokeAsync(request, options, cancellationToken); - } - - #endregion - #region GetBucketAccelerateConfiguration internal virtual GetBucketAccelerateConfigurationResponse GetBucketAccelerateConfiguration(GetBucketAccelerateConfigurationRequest request) @@ -4421,6 +4283,83 @@ internal virtual GetBucketAccelerateConfigurationResponse GetBucketAccelerateCon #endregion + #region GetBucketAcl + + internal virtual GetBucketAclResponse GetBucketAcl(GetBucketAclRequest request) + { + var options = new InvokeOptions(); + options.RequestMarshaller = GetBucketAclRequestMarshaller.Instance; + options.ResponseUnmarshaller = GetBucketAclResponseUnmarshaller.Instance; + + return Invoke(request, options); + } + + + + /// + /// + /// + /// This operation is not supported by directory buckets. + /// + /// + /// + /// This implementation of the GET action uses the acl subresource to return + /// the access control list (ACL) of a bucket. To use GET to return the ACL of + /// the bucket, you must have the READ_ACP access to the bucket. If READ_ACP + /// permission is granted to the anonymous user, you can return the ACL of the bucket + /// without using an authorization header. + /// + /// + /// + /// When you use this API operation with an access point, provide the alias of the access + /// point in place of the bucket name. + /// + /// + /// + /// When you use this API operation with an Object Lambda access point, provide the alias + /// of the Object Lambda access point in place of the bucket name. If the Object Lambda + /// access point alias in a request is not valid, the error code InvalidAccessPointAliasError + /// is returned. For more information about InvalidAccessPointAliasError, see List + /// of Error Codes. + /// + /// + /// + /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, requests + /// to read ACLs are still supported and return the bucket-owner-full-control ACL + /// with the owner being the account that created the bucket. For more information, see + /// + /// Controlling object ownership and disabling ACLs in the Amazon S3 User Guide. + /// + /// + /// + /// The following operations are related to GetBucketAcl: + /// + /// + /// + /// Container for the necessary parameters to execute the GetBucketAcl service method. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// + /// The response from the GetBucketAcl service method, as returned by S3. + /// REST API Reference for GetBucketAcl Operation + public virtual Task GetBucketAclAsync(GetBucketAclRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) + { + var options = new InvokeOptions(); + options.RequestMarshaller = GetBucketAclRequestMarshaller.Instance; + options.ResponseUnmarshaller = GetBucketAclResponseUnmarshaller.Instance; + + return InvokeAsync(request, options, cancellationToken); + } + + #endregion + #region GetBucketAnalyticsConfiguration internal virtual GetBucketAnalyticsConfigurationResponse GetBucketAnalyticsConfiguration(GetBucketAnalyticsConfigurationRequest request) @@ -6915,6 +6854,93 @@ internal virtual GetObjectResponse GetObject(GetObjectRequest request) #endregion + #region GetObjectAcl + + internal virtual GetObjectAclResponse GetObjectAcl(GetObjectAclRequest request) + { + var options = new InvokeOptions(); + options.RequestMarshaller = GetObjectAclRequestMarshaller.Instance; + options.ResponseUnmarshaller = GetObjectAclResponseUnmarshaller.Instance; + + return Invoke(request, options); + } + + + + /// + /// + /// + /// This operation is not supported by directory buckets. + /// + /// + /// + /// Returns the access control list (ACL) of an object. To use this operation, you must + /// have s3:GetObjectAcl permissions or READ_ACP access to the object. For + /// more information, see Mapping + /// of ACL permissions and access policy permissions in the Amazon S3 User Guide + /// + /// + /// + /// + /// This functionality is not supported for Amazon S3 on Outposts. + /// + /// + /// + /// By default, GET returns ACL information about the current version of an object. To + /// return ACL information about a different version, use the versionId subresource. + /// + /// + /// + /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, requests + /// to read ACLs are still supported and return the bucket-owner-full-control ACL + /// with the owner being the account that created the bucket. For more information, see + /// + /// Controlling object ownership and disabling ACLs in the Amazon S3 User Guide. + /// + /// + /// + /// The following operations are related to GetObjectAcl: + /// + /// + /// + /// Container for the necessary parameters to execute the GetObjectAcl service method. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// + /// The response from the GetObjectAcl service method, as returned by S3. + /// REST API Reference for GetObjectAcl Operation + public virtual Task GetObjectAclAsync(GetObjectAclRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) + { + var options = new InvokeOptions(); + options.RequestMarshaller = GetObjectAclRequestMarshaller.Instance; + options.ResponseUnmarshaller = GetObjectAclResponseUnmarshaller.Instance; + + return InvokeAsync(request, options, cancellationToken); + } + + #endregion + #region GetObjectAttributes internal virtual GetObjectAttributesResponse GetObjectAttributes(GetObjectAttributesRequest request) @@ -10383,252 +10409,149 @@ internal virtual ListVersionsResponse ListVersions(ListVersionsRequest request) #endregion - #region PutACL + #region PutBucket - internal virtual PutACLResponse PutACL(PutACLRequest request) + internal virtual PutBucketResponse PutBucket(PutBucketRequest request) { var options = new InvokeOptions(); - options.RequestMarshaller = PutACLRequestMarshaller.Instance; - options.ResponseUnmarshaller = PutACLResponseUnmarshaller.Instance; - - return Invoke(request, options); - } + options.RequestMarshaller = PutBucketRequestMarshaller.Instance; + options.ResponseUnmarshaller = PutBucketResponseUnmarshaller.Instance; + return Invoke(request, options); + } /// /// /// - /// This operation is not supported by directory buckets. - /// - /// - /// - /// Sets the permissions on an existing bucket using access control lists (ACL). For more - /// information, see Using - /// ACLs. To set the ACL of a bucket, you must have the WRITE_ACP permission. - /// - /// - /// - /// You can use one of the following two ways to set a bucket's permissions: - /// - ///
    • - /// - /// Specify the ACL in the request body - /// - ///
    • - /// - /// Specify permissions using request headers - /// - ///
    - /// - /// You cannot specify access permission using both the body and the request headers. + /// This action creates an Amazon S3 bucket. To create an Amazon S3 on Outposts bucket, + /// see + /// CreateBucket . /// /// /// - /// Depending on your application needs, you may choose to set the ACL on a bucket using - /// either the request body or the headers. For example, if you have an existing application - /// that updates a bucket ACL using the request body, then you can continue to use that - /// approach. - /// - /// - /// - /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, ACLs - /// are disabled and no longer affect permissions. You must use policies to grant access - /// to your bucket and the objects in it. Requests to set ACLs or update ACLs fail and - /// return the AccessControlListNotSupported error code. Requests to read ACLs - /// are still supported. For more information, see Controlling - /// object ownership in the Amazon S3 User Guide. - /// - ///
    Permissions
    - /// - /// You can set access permissions by using one of the following methods: - /// - ///
    • - /// - /// Specify a canned ACL with the x-amz-acl request header. Amazon S3 supports - /// a set of predefined ACLs, known as canned ACLs. Each canned ACL has a predefined - /// set of grantees and permissions. Specify the canned ACL name as the value of x-amz-acl. - /// If you use this header, you cannot use other access control-specific headers in your - /// request. For more information, see Canned - /// ACL. - /// - ///
    • - /// - /// Specify access permissions explicitly with the x-amz-grant-read, x-amz-grant-read-acp, - /// x-amz-grant-write-acp, and x-amz-grant-full-control headers. When using - /// these headers, you specify explicit access permissions and grantees (Amazon Web Services - /// accounts or Amazon S3 groups) who will receive the permission. If you use these ACL-specific - /// headers, you cannot use the x-amz-acl header to set a canned ACL. These parameters - /// map to the set of permissions that Amazon S3 supports in an ACL. For more information, - /// see Access - /// Control List (ACL) Overview. + /// Creates a new S3 bucket. To create a bucket, you must set up Amazon S3 and have a + /// valid Amazon Web Services Access Key ID to authenticate requests. Anonymous requests + /// are never allowed to create buckets. By creating the bucket, you become the bucket + /// owner. /// /// /// - /// You specify each grantee as a type=value pair, where the type is one of the following: - /// - ///
      • - /// - /// id – if the value specified is the canonical user ID of an Amazon Web Services - /// account + /// There are two types of buckets: general purpose buckets and directory buckets. For + /// more information about these bucket types, see Creating, + /// configuring, and working with Amazon S3 buckets in the Amazon S3 User Guide. /// - ///
      • + ///
        • /// - /// uri – if you are granting permissions to a predefined group + /// General purpose buckets - If you send your CreateBucket request to + /// the s3.amazonaws.com global endpoint, the request goes to the us-east-1 + /// Region. So the signature calculations in Signature Version 4 must use us-east-1 + /// as the Region, even if the location constraint in the request specifies another Region + /// where the bucket is to be created. If you create a bucket in a Region other than US + /// East (N. Virginia), your application must be able to handle 307 redirect. For more + /// information, see Virtual + /// hosting of buckets in the Amazon S3 User Guide. /// ///
        • /// - /// emailAddress – if the value specified is the email address of an Amazon Web - /// Services account + /// Directory buckets - For directory buckets, you must make requests for this + /// API operation to the Regional endpoint. These endpoints support path-style requests + /// in the format https://s3express-control.region_code.amazonaws.com/bucket-name + /// . Virtual-hosted-style requests aren't supported. For more information, see Regional + /// and Zonal endpoints in the Amazon S3 User Guide. /// - /// + ///
        Permissions
        • /// - /// Using email addresses to specify a grantee is only supported in the following Amazon - /// Web Services Regions: + /// General purpose bucket permissions - In addition to the s3:CreateBucket + /// permission, the following permissions are required in a policy when your CreateBucket + /// request includes specific headers: /// ///
          • /// - /// US East (N. Virginia) - /// - ///
          • - /// - /// US West (N. California) - /// - ///
          • - /// - /// US West (Oregon) - /// - ///
          • - /// - /// Asia Pacific (Singapore) - /// - ///
          • - /// - /// Asia Pacific (Sydney) - /// - ///
          • - /// - /// Asia Pacific (Tokyo) + /// Access control lists (ACLs) - In your CreateBucket request, if you + /// specify an access control list (ACL) and set it to public-read, public-read-write, + /// authenticated-read, or if you explicitly specify any other custom ACLs, both + /// s3:CreateBucket and s3:PutBucketAcl permissions are required. In your + /// CreateBucket request, if you set the ACL to private, or if you don't + /// specify any ACLs, only the s3:CreateBucket permission is required. /// ///
          • /// - /// Europe (Ireland) + /// Object Lock - In your CreateBucket request, if you set x-amz-bucket-object-lock-enabled + /// to true, the s3:PutBucketObjectLockConfiguration and s3:PutBucketVersioning + /// permissions are required. /// ///
          • /// - /// South America (São Paulo) - /// - ///
          - /// - /// For a list of all the Amazon S3 supported Regions and endpoints, see Regions - /// and Endpoints in the Amazon Web Services General Reference. - /// - ///
        - /// - /// For example, the following x-amz-grant-write header grants create, overwrite, - /// and delete objects permission to LogDelivery group predefined by Amazon S3 and two - /// Amazon Web Services accounts identified by their email addresses. - /// - /// - /// - /// x-amz-grant-write: uri="http://acs.amazonaws.com/groups/s3/LogDelivery", id="111122223333", - /// id="555566667777" - /// - ///
      - /// - /// You can use either a canned ACL or specify access permissions explicitly. You cannot - /// do both. - /// - ///
    Grantee Values
    - /// - /// You can specify the person (grantee) to whom you're assigning access rights (using - /// request elements) in the following ways: - /// - ///
    • - /// - /// By the person's ID: + /// S3 Object Ownership - If your CreateBucket request includes the x-amz-object-ownership + /// header, then the s3:PutBucketOwnershipControls permission is required. /// - /// + /// /// - /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"><ID><>ID<></ID><DisplayName><>GranteesEmail<></DisplayName> - /// </Grantee> + /// To set an ACL on a bucket as part of a CreateBucket request, you must explicitly + /// set S3 Object Ownership for the bucket to a different value than the default, BucketOwnerEnforced. + /// Additionally, if your desired bucket ACL grants public access, you must first create + /// the bucket (without the bucket ACL) and then explicitly disable Block Public Access + /// on the bucket before using PutBucketAcl to set the ACL. If you try to create + /// a bucket with a public ACL, the request will fail. /// /// /// - /// DisplayName is optional and ignored in the request - /// - ///
    • - /// - /// By URI: + /// For the majority of modern use cases in S3, we recommend that you keep all Block + /// Public Access settings enabled and keep ACLs disabled. If you would like to share + /// data with users outside of your account, you can use bucket policies as needed. For + /// more information, see Controlling + /// ownership of objects and disabling ACLs for your bucket and Blocking + /// public access to your Amazon S3 storage in the Amazon S3 User Guide. /// - /// + ///
    • /// - /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Group"><URI><>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<></URI></Grantee> - /// + /// S3 Block Public Access - If your specific use case requires granting public + /// access to your S3 resources, you can disable Block Public Access. Specifically, you + /// can create a new bucket with Block Public Access enabled, then separately call the + /// + /// DeletePublicAccessBlock API. To use this operation, you must have the + /// s3:PutBucketPublicAccessBlock permission. For more information about S3 Block + /// Public Access, see Blocking + /// public access to your Amazon S3 storage in the Amazon S3 User Guide. /// - ///
    • + ///
  • /// - /// By Email address: + /// Directory bucket permissions - You must have the s3express:CreateBucket + /// permission in an IAM identity-based policy instead of a bucket policy. Cross-account + /// access to this API operation isn't supported. This operation can only be performed + /// by the Amazon Web Services account that owns the resource. For more information about + /// directory bucket policies and permissions, see Amazon + /// Web Services Identity and Access Management (IAM) for S3 Express One Zone in the + /// Amazon S3 User Guide. /// - /// + /// /// - /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="AmazonCustomerByEmail"><EmailAddress><>Grantees@email.com<></EmailAddress>&</Grantee> - /// + /// The permissions for ACLs, Object Lock, S3 Object Ownership, and S3 Block Public Access + /// are not supported for directory buckets. For directory buckets, all Block Public Access + /// settings are enabled at the bucket level and S3 Object Ownership is set to Bucket + /// owner enforced (ACLs disabled). These settings can't be modified. /// /// /// - /// The grantee is resolved to the CanonicalUser and, in a response to a GET Object acl - /// request, appears as the CanonicalUser. - /// - /// - /// - /// Using email addresses to specify a grantee is only supported in the following Amazon - /// Web Services Regions: - /// - ///
    • - /// - /// US East (N. Virginia) - /// - ///
    • - /// - /// US West (N. California) - /// - ///
    • - /// - /// US West (Oregon) - /// - ///
    • - /// - /// Asia Pacific (Singapore) - /// - ///
    • - /// - /// Asia Pacific (Sydney) - /// - ///
    • - /// - /// Asia Pacific (Tokyo) - /// - ///
    • - /// - /// Europe (Ireland) - /// - ///
    • - /// - /// South America (São Paulo) + /// For more information about permissions for creating and working with directory buckets, + /// see Directory + /// buckets in the Amazon S3 User Guide. For more information about supported + /// S3 features for directory buckets, see Features + /// of S3 Express One Zone in the Amazon S3 User Guide. /// - ///
    + ///
  • HTTP Host header syntax
    /// - /// For a list of all the Amazon S3 supported Regions and endpoints, see Regions - /// and Endpoints in the Amazon Web Services General Reference. + /// Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com. /// - ///
    + /// /// - /// The following operations are related to PutBucketAcl: + /// The following operations are related to CreateBucket: /// /// ///
    - /// Container for the necessary parameters to execute the PutACL service method. + /// The name of the bucket to create. General purpose buckets - For information about bucket naming restrictions, see Bucket naming rules in the Amazon S3 User Guide. Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region_code.amazonaws.com/bucket-name . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must also follow the format bucket_base_name--az_id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// - /// The response from the PutACL service method, as returned by S3. - /// REST API Reference for PutACL Operation - public virtual Task PutACLAsync(PutACLRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) + /// The response from the PutBucket service method, as returned by S3. + /// REST API Reference for PutBucket Operation + public virtual Task PutBucketAsync(string bucketName, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { - var options = new InvokeOptions(); - options.RequestMarshaller = PutACLRequestMarshaller.Instance; - options.ResponseUnmarshaller = PutACLResponseUnmarshaller.Instance; - - return InvokeAsync(request, options, cancellationToken); + var request = new PutBucketRequest(); + request.BucketName = bucketName; + return PutBucketAsync(request, cancellationToken); } - #endregion - - #region PutBucket - - internal virtual PutBucketResponse PutBucket(PutBucketRequest request) - { - var options = new InvokeOptions(); - options.RequestMarshaller = PutBucketRequestMarshaller.Instance; - options.ResponseUnmarshaller = PutBucketResponseUnmarshaller.Instance; - - return Invoke(request, options); - } /// @@ -10801,287 +10705,409 @@ internal virtual PutBucketResponse PutBucket(PutBucketRequest request) /// /// The following operations are related to CreateBucket: /// - /// + /// Container for the necessary parameters to execute the PutBucket service method. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// + /// The response from the PutBucket service method, as returned by S3. + /// REST API Reference for PutBucket Operation + public virtual Task PutBucketAsync(PutBucketRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) + { + var options = new InvokeOptions(); + options.RequestMarshaller = PutBucketRequestMarshaller.Instance; + options.ResponseUnmarshaller = PutBucketResponseUnmarshaller.Instance; + + return InvokeAsync(request, options, cancellationToken); + } + + #endregion + + #region PutBucketAccelerateConfiguration + + internal virtual PutBucketAccelerateConfigurationResponse PutBucketAccelerateConfiguration(PutBucketAccelerateConfigurationRequest request) + { + var options = new InvokeOptions(); + options.RequestMarshaller = PutBucketAccelerateConfigurationRequestMarshaller.Instance; + options.ResponseUnmarshaller = PutBucketAccelerateConfigurationResponseUnmarshaller.Instance; + + return Invoke(request, options); + } + + + + /// + /// + /// + /// This operation is not supported by directory buckets. + /// + /// + /// + /// Sets the accelerate configuration of an existing bucket. Amazon S3 Transfer Acceleration + /// is a bucket-level feature that enables you to perform faster data transfers to Amazon + /// S3. + /// + /// + /// + /// To use this operation, you must have permission to perform the s3:PutAccelerateConfiguration + /// action. The bucket owner has this permission by default. The bucket owner can grant + /// this permission to others. For more information about permissions, see Permissions + /// Related to Bucket Subresource Operations and Managing + /// Access Permissions to Your Amazon S3 Resources. + /// + /// + /// + /// The Transfer Acceleration state of a bucket can be set to one of the following two + /// values: + /// + ///
    • + /// + /// Enabled – Enables accelerated data transfers to the bucket. + /// + ///
    • + /// + /// Suspended – Disables accelerated data transfers to the bucket. + /// + ///
    + /// + /// The GetBucketAccelerateConfiguration + /// action returns the transfer acceleration state of a bucket. + /// + /// + /// + /// After setting the Transfer Acceleration state of a bucket to Enabled, it might take + /// up to thirty minutes before the data transfer rates to the bucket increase. + /// + /// + /// + /// The name of the bucket used for Transfer Acceleration must be DNS-compliant and must + /// not contain periods ("."). + /// + /// + /// + /// For more information about transfer acceleration, see Transfer + /// Acceleration. + /// + /// + /// + /// The following operations are related to PutBucketAccelerateConfiguration: + /// + /// + ///
    + /// Container for the necessary parameters to execute the PutBucketAccelerateConfiguration service method. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// + /// The response from the PutBucketAccelerateConfiguration service method, as returned by S3. + /// REST API Reference for PutBucketAccelerateConfiguration Operation + public virtual Task PutBucketAccelerateConfigurationAsync(PutBucketAccelerateConfigurationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) + { + var options = new InvokeOptions(); + options.RequestMarshaller = PutBucketAccelerateConfigurationRequestMarshaller.Instance; + options.ResponseUnmarshaller = PutBucketAccelerateConfigurationResponseUnmarshaller.Instance; + + return InvokeAsync(request, options, cancellationToken); + } + + #endregion + + #region PutBucketAcl + + internal virtual PutBucketAclResponse PutBucketAcl(PutBucketAclRequest request) + { + var options = new InvokeOptions(); + options.RequestMarshaller = PutBucketAclRequestMarshaller.Instance; + options.ResponseUnmarshaller = PutBucketAclResponseUnmarshaller.Instance; + + return Invoke(request, options); + } + + + + /// + /// + /// + /// This operation is not supported by directory buckets. + /// + /// + /// + /// Sets the permissions on an existing bucket using access control lists (ACL). For more + /// information, see Using + /// ACLs. To set the ACL of a bucket, you must have the WRITE_ACP permission. + /// + /// + /// + /// You can use one of the following two ways to set a bucket's permissions: + /// + ///
    • + /// + /// Specify the ACL in the request body + /// + ///
    • + /// + /// Specify permissions using request headers + /// + ///
    + /// + /// You cannot specify access permission using both the body and the request headers. + /// + /// + /// + /// Depending on your application needs, you may choose to set the ACL on a bucket using + /// either the request body or the headers. For example, if you have an existing application + /// that updates a bucket ACL using the request body, then you can continue to use that + /// approach. + /// + /// + /// + /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, ACLs + /// are disabled and no longer affect permissions. You must use policies to grant access + /// to your bucket and the objects in it. Requests to set ACLs or update ACLs fail and + /// return the AccessControlListNotSupported error code. Requests to read ACLs + /// are still supported. For more information, see Controlling + /// object ownership in the Amazon S3 User Guide. + /// + ///
    Permissions
    + /// + /// You can set access permissions by using one of the following methods: + /// + ///
    • + /// + /// Specify a canned ACL with the x-amz-acl request header. Amazon S3 supports + /// a set of predefined ACLs, known as canned ACLs. Each canned ACL has a predefined + /// set of grantees and permissions. Specify the canned ACL name as the value of x-amz-acl. + /// If you use this header, you cannot use other access control-specific headers in your + /// request. For more information, see Canned + /// ACL. + /// + ///
    • + /// + /// Specify access permissions explicitly with the x-amz-grant-read, x-amz-grant-read-acp, + /// x-amz-grant-write-acp, and x-amz-grant-full-control headers. When using + /// these headers, you specify explicit access permissions and grantees (Amazon Web Services + /// accounts or Amazon S3 groups) who will receive the permission. If you use these ACL-specific + /// headers, you cannot use the x-amz-acl header to set a canned ACL. These parameters + /// map to the set of permissions that Amazon S3 supports in an ACL. For more information, + /// see Access + /// Control List (ACL) Overview. + /// + /// + /// + /// You specify each grantee as a type=value pair, where the type is one of the following: + /// + ///
      • + /// + /// id – if the value specified is the canonical user ID of an Amazon Web Services + /// account + /// + ///
      • /// - /// PutObject - /// + /// uri – if you are granting permissions to a predefined group /// ///
      • /// - /// DeleteBucket - /// + /// emailAddress – if the value specified is the email address of an Amazon Web + /// Services account /// - ///
      - ///
    - /// The name of the bucket to create. General purpose buckets - For information about bucket naming restrictions, see Bucket naming rules in the Amazon S3 User Guide. Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region_code.amazonaws.com/bucket-name . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must also follow the format bucket_base_name--az_id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide - /// - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// - /// - /// The response from the PutBucket service method, as returned by S3. - /// REST API Reference for PutBucket Operation - public virtual Task PutBucketAsync(string bucketName, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) - { - var request = new PutBucketRequest(); - request.BucketName = bucketName; - return PutBucketAsync(request, cancellationToken); - } - - - - /// - /// + /// /// - /// This action creates an Amazon S3 bucket. To create an Amazon S3 on Outposts bucket, - /// see - /// CreateBucket . + /// Using email addresses to specify a grantee is only supported in the following Amazon + /// Web Services Regions: /// - /// + ///
    • /// - /// Creates a new S3 bucket. To create a bucket, you must set up Amazon S3 and have a - /// valid Amazon Web Services Access Key ID to authenticate requests. Anonymous requests - /// are never allowed to create buckets. By creating the bucket, you become the bucket - /// owner. + /// US East (N. Virginia) /// - /// + ///
    • /// - /// There are two types of buckets: general purpose buckets and directory buckets. For - /// more information about these bucket types, see Creating, - /// configuring, and working with Amazon S3 buckets in the Amazon S3 User Guide. + /// US West (N. California) /// - ///
      • + ///
      • /// - /// General purpose buckets - If you send your CreateBucket request to - /// the s3.amazonaws.com global endpoint, the request goes to the us-east-1 - /// Region. So the signature calculations in Signature Version 4 must use us-east-1 - /// as the Region, even if the location constraint in the request specifies another Region - /// where the bucket is to be created. If you create a bucket in a Region other than US - /// East (N. Virginia), your application must be able to handle 307 redirect. For more - /// information, see Virtual - /// hosting of buckets in the Amazon S3 User Guide. + /// US West (Oregon) /// ///
      • /// - /// Directory buckets - For directory buckets, you must make requests for this - /// API operation to the Regional endpoint. These endpoints support path-style requests - /// in the format https://s3express-control.region_code.amazonaws.com/bucket-name - /// . Virtual-hosted-style requests aren't supported. For more information, see Regional - /// and Zonal endpoints in the Amazon S3 User Guide. + /// Asia Pacific (Singapore) /// - ///
      Permissions
      • + ///
      • /// - /// General purpose bucket permissions - In addition to the s3:CreateBucket - /// permission, the following permissions are required in a policy when your CreateBucket - /// request includes specific headers: + /// Asia Pacific (Sydney) /// - ///
        • + ///
        • /// - /// Access control lists (ACLs) - In your CreateBucket request, if you - /// specify an access control list (ACL) and set it to public-read, public-read-write, - /// authenticated-read, or if you explicitly specify any other custom ACLs, both - /// s3:CreateBucket and s3:PutBucketAcl permissions are required. In your - /// CreateBucket request, if you set the ACL to private, or if you don't - /// specify any ACLs, only the s3:CreateBucket permission is required. + /// Asia Pacific (Tokyo) /// ///
        • /// - /// Object Lock - In your CreateBucket request, if you set x-amz-bucket-object-lock-enabled - /// to true, the s3:PutBucketObjectLockConfiguration and s3:PutBucketVersioning - /// permissions are required. + /// Europe (Ireland) /// ///
        • /// - /// S3 Object Ownership - If your CreateBucket request includes the x-amz-object-ownership - /// header, then the s3:PutBucketOwnershipControls permission is required. + /// South America (São Paulo) /// - /// + ///
        /// - /// To set an ACL on a bucket as part of a CreateBucket request, you must explicitly - /// set S3 Object Ownership for the bucket to a different value than the default, BucketOwnerEnforced. - /// Additionally, if your desired bucket ACL grants public access, you must first create - /// the bucket (without the bucket ACL) and then explicitly disable Block Public Access - /// on the bucket before using PutBucketAcl to set the ACL. If you try to create - /// a bucket with a public ACL, the request will fail. + /// For a list of all the Amazon S3 supported Regions and endpoints, see Regions + /// and Endpoints in the Amazon Web Services General Reference. + /// + ///
      + /// + /// For example, the following x-amz-grant-write header grants create, overwrite, + /// and delete objects permission to LogDelivery group predefined by Amazon S3 and two + /// Amazon Web Services accounts identified by their email addresses. /// /// /// - /// For the majority of modern use cases in S3, we recommend that you keep all Block - /// Public Access settings enabled and keep ACLs disabled. If you would like to share - /// data with users outside of your account, you can use bucket policies as needed. For - /// more information, see Controlling - /// ownership of objects and disabling ACLs for your bucket and Blocking - /// public access to your Amazon S3 storage in the Amazon S3 User Guide. + /// x-amz-grant-write: uri="http://acs.amazonaws.com/groups/s3/LogDelivery", id="111122223333", + /// id="555566667777" /// - ///
    • + ///
    /// - /// S3 Block Public Access - If your specific use case requires granting public - /// access to your S3 resources, you can disable Block Public Access. Specifically, you - /// can create a new bucket with Block Public Access enabled, then separately call the - /// - /// DeletePublicAccessBlock API. To use this operation, you must have the - /// s3:PutBucketPublicAccessBlock permission. For more information about S3 Block - /// Public Access, see Blocking - /// public access to your Amazon S3 storage in the Amazon S3 User Guide. + /// You can use either a canned ACL or specify access permissions explicitly. You cannot + /// do both. /// - ///
  • + ///
    Grantee Values
    /// - /// Directory bucket permissions - You must have the s3express:CreateBucket - /// permission in an IAM identity-based policy instead of a bucket policy. Cross-account - /// access to this API operation isn't supported. This operation can only be performed - /// by the Amazon Web Services account that owns the resource. For more information about - /// directory bucket policies and permissions, see Amazon - /// Web Services Identity and Access Management (IAM) for S3 Express One Zone in the - /// Amazon S3 User Guide. + /// You can specify the person (grantee) to whom you're assigning access rights (using + /// request elements) in the following ways: /// - /// + ///
    • /// - /// The permissions for ACLs, Object Lock, S3 Object Ownership, and S3 Block Public Access - /// are not supported for directory buckets. For directory buckets, all Block Public Access - /// settings are enabled at the bucket level and S3 Object Ownership is set to Bucket - /// owner enforced (ACLs disabled). These settings can't be modified. + /// By the person's ID: /// /// /// - /// For more information about permissions for creating and working with directory buckets, - /// see Directory - /// buckets in the Amazon S3 User Guide. For more information about supported - /// S3 features for directory buckets, see Features - /// of S3 Express One Zone in the Amazon S3 User Guide. + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"><ID><>ID<></ID><DisplayName><>GranteesEmail<></DisplayName> + /// </Grantee> /// - ///
    HTTP Host header syntax
    + /// /// - /// Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com. + /// DisplayName is optional and ignored in the request /// - ///
    + ///
  • /// - /// The following operations are related to CreateBucket: + /// By URI: /// - ///
    • + /// /// - /// PutObject + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Group"><URI><>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<></URI></Grantee> /// /// ///
    • /// - /// DeleteBucket - /// + /// By Email address: /// - ///
    - ///
  • - /// Container for the necessary parameters to execute the PutBucket service method. - /// - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// + /// + /// + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="AmazonCustomerByEmail"><EmailAddress><>Grantees@email.com<></EmailAddress>&</Grantee> /// - /// The response from the PutBucket service method, as returned by S3. - /// REST API Reference for PutBucket Operation - public virtual Task PutBucketAsync(PutBucketRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) - { - var options = new InvokeOptions(); - options.RequestMarshaller = PutBucketRequestMarshaller.Instance; - options.ResponseUnmarshaller = PutBucketResponseUnmarshaller.Instance; - - return InvokeAsync(request, options, cancellationToken); - } - - #endregion - - #region PutBucketAccelerateConfiguration - - internal virtual PutBucketAccelerateConfigurationResponse PutBucketAccelerateConfiguration(PutBucketAccelerateConfigurationRequest request) - { - var options = new InvokeOptions(); - options.RequestMarshaller = PutBucketAccelerateConfigurationRequestMarshaller.Instance; - options.ResponseUnmarshaller = PutBucketAccelerateConfigurationResponseUnmarshaller.Instance; - - return Invoke(request, options); - } - - - - /// - /// + /// + /// /// - /// This operation is not supported by directory buckets. + /// The grantee is resolved to the CanonicalUser and, in a response to a GET Object acl + /// request, appears as the CanonicalUser. /// - /// + /// /// - /// Sets the accelerate configuration of an existing bucket. Amazon S3 Transfer Acceleration - /// is a bucket-level feature that enables you to perform faster data transfers to Amazon - /// S3. + /// Using email addresses to specify a grantee is only supported in the following Amazon + /// Web Services Regions: /// - /// + ///
    • /// - /// To use this operation, you must have permission to perform the s3:PutAccelerateConfiguration - /// action. The bucket owner has this permission by default. The bucket owner can grant - /// this permission to others. For more information about permissions, see Permissions - /// Related to Bucket Subresource Operations and Managing - /// Access Permissions to Your Amazon S3 Resources. + /// US East (N. Virginia) /// - /// + ///
    • /// - /// The Transfer Acceleration state of a bucket can be set to one of the following two - /// values: + /// US West (N. California) /// - ///
      • + ///
      • /// - /// Enabled – Enables accelerated data transfers to the bucket. + /// US West (Oregon) /// ///
      • /// - /// Suspended – Disables accelerated data transfers to the bucket. + /// Asia Pacific (Singapore) /// - ///
      + ///
    • /// - /// The GetBucketAccelerateConfiguration - /// action returns the transfer acceleration state of a bucket. + /// Asia Pacific (Sydney) /// - /// + ///
    • /// - /// After setting the Transfer Acceleration state of a bucket to Enabled, it might take - /// up to thirty minutes before the data transfer rates to the bucket increase. + /// Asia Pacific (Tokyo) /// - /// + ///
    • /// - /// The name of the bucket used for Transfer Acceleration must be DNS-compliant and must - /// not contain periods ("."). + /// Europe (Ireland) + /// + ///
    • + /// + /// South America (São Paulo) + /// + ///
    + /// + /// For a list of all the Amazon S3 supported Regions and endpoints, see Regions + /// and Endpoints in the Amazon Web Services General Reference. /// - /// + ///
    /// - /// For more information about transfer acceleration, see Transfer - /// Acceleration. + /// The following operations are related to PutBucketAcl: /// - /// + ///
    - /// Container for the necessary parameters to execute the PutBucketAccelerateConfiguration service method. + /// Container for the necessary parameters to execute the PutBucketAcl service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// - /// The response from the PutBucketAccelerateConfiguration service method, as returned by S3. - /// REST API Reference for PutBucketAccelerateConfiguration Operation - public virtual Task PutBucketAccelerateConfigurationAsync(PutBucketAccelerateConfigurationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) + /// The response from the PutBucketAcl service method, as returned by S3. + /// REST API Reference for PutBucketAcl Operation + public virtual Task PutBucketAclAsync(PutBucketAclRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); - options.RequestMarshaller = PutBucketAccelerateConfigurationRequestMarshaller.Instance; - options.ResponseUnmarshaller = PutBucketAccelerateConfigurationResponseUnmarshaller.Instance; + options.RequestMarshaller = PutBucketAclRequestMarshaller.Instance; + options.ResponseUnmarshaller = PutBucketAclResponseUnmarshaller.Instance; - return InvokeAsync(request, options, cancellationToken); + return InvokeAsync(request, options, cancellationToken); } #endregion @@ -13735,6 +13761,274 @@ internal virtual PutObjectResponse PutObject(PutObjectRequest request) #endregion + #region PutObjectAcl + + internal virtual PutObjectAclResponse PutObjectAcl(PutObjectAclRequest request) + { + var options = new InvokeOptions(); + options.RequestMarshaller = PutObjectAclRequestMarshaller.Instance; + options.ResponseUnmarshaller = PutObjectAclResponseUnmarshaller.Instance; + + return Invoke(request, options); + } + + + + /// + /// + /// + /// This operation is not supported by directory buckets. + /// + /// + /// + /// Uses the acl subresource to set the access control list (ACL) permissions for + /// a new or existing object in an S3 bucket. You must have the WRITE_ACP permission + /// to set the ACL of an object. For more information, see What + /// permissions can I grant? in the Amazon S3 User Guide. + /// + /// + /// + /// This functionality is not supported for Amazon S3 on Outposts. + /// + /// + /// + /// Depending on your application needs, you can choose to set the ACL on an object using + /// either the request body or the headers. For example, if you have an existing application + /// that updates a bucket ACL using the request body, you can continue to use that approach. + /// For more information, see Access + /// Control List (ACL) Overview in the Amazon S3 User Guide. + /// + /// + /// + /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, ACLs + /// are disabled and no longer affect permissions. You must use policies to grant access + /// to your bucket and the objects in it. Requests to set ACLs or update ACLs fail and + /// return the AccessControlListNotSupported error code. Requests to read ACLs + /// are still supported. For more information, see Controlling + /// object ownership in the Amazon S3 User Guide. + /// + ///
    Permissions
    + /// + /// You can set access permissions using one of the following methods: + /// + ///
    • + /// + /// Specify a canned ACL with the x-amz-acl request header. Amazon S3 supports + /// a set of predefined ACLs, known as canned ACLs. Each canned ACL has a predefined set + /// of grantees and permissions. Specify the canned ACL name as the value of x-amz-acl. + /// If you use this header, you cannot use other access control-specific headers in your + /// request. For more information, see Canned + /// ACL. + /// + ///
    • + /// + /// Specify access permissions explicitly with the x-amz-grant-read, x-amz-grant-read-acp, + /// x-amz-grant-write-acp, and x-amz-grant-full-control headers. When using + /// these headers, you specify explicit access permissions and grantees (Amazon Web Services + /// accounts or Amazon S3 groups) who will receive the permission. If you use these ACL-specific + /// headers, you cannot use x-amz-acl header to set a canned ACL. These parameters + /// map to the set of permissions that Amazon S3 supports in an ACL. For more information, + /// see Access + /// Control List (ACL) Overview. + /// + /// + /// + /// You specify each grantee as a type=value pair, where the type is one of the following: + /// + ///
      • + /// + /// id – if the value specified is the canonical user ID of an Amazon Web Services + /// account + /// + ///
      • + /// + /// uri – if you are granting permissions to a predefined group + /// + ///
      • + /// + /// emailAddress – if the value specified is the email address of an Amazon Web + /// Services account + /// + /// + /// + /// Using email addresses to specify a grantee is only supported in the following Amazon + /// Web Services Regions: + /// + ///
        • + /// + /// US East (N. Virginia) + /// + ///
        • + /// + /// US West (N. California) + /// + ///
        • + /// + /// US West (Oregon) + /// + ///
        • + /// + /// Asia Pacific (Singapore) + /// + ///
        • + /// + /// Asia Pacific (Sydney) + /// + ///
        • + /// + /// Asia Pacific (Tokyo) + /// + ///
        • + /// + /// Europe (Ireland) + /// + ///
        • + /// + /// South America (São Paulo) + /// + ///
        + /// + /// For a list of all the Amazon S3 supported Regions and endpoints, see Regions + /// and Endpoints in the Amazon Web Services General Reference. + /// + ///
      + /// + /// For example, the following x-amz-grant-read header grants list objects permission + /// to the two Amazon Web Services accounts identified by their email addresses. + /// + /// + /// + /// x-amz-grant-read: emailAddress="xyz@amazon.com", emailAddress="abc@amazon.com" + /// + /// + ///
    + /// + /// You can use either a canned ACL or specify access permissions explicitly. You cannot + /// do both. + /// + ///
    Grantee Values
    + /// + /// You can specify the person (grantee) to whom you're assigning access rights (using + /// request elements) in the following ways: + /// + ///
    • + /// + /// By the person's ID: + /// + /// + /// + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"><ID><>ID<></ID><DisplayName><>GranteesEmail<></DisplayName> + /// </Grantee> + /// + /// + /// + /// DisplayName is optional and ignored in the request. + /// + ///
    • + /// + /// By URI: + /// + /// + /// + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Group"><URI><>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<></URI></Grantee> + /// + /// + ///
    • + /// + /// By Email address: + /// + /// + /// + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="AmazonCustomerByEmail"><EmailAddress><>Grantees@email.com<></EmailAddress>lt;/Grantee> + /// + /// + /// + /// + /// The grantee is resolved to the CanonicalUser and, in a response to a GET Object acl + /// request, appears as the CanonicalUser. + /// + /// + /// + /// Using email addresses to specify a grantee is only supported in the following Amazon + /// Web Services Regions: + /// + ///
      • + /// + /// US East (N. Virginia) + /// + ///
      • + /// + /// US West (N. California) + /// + ///
      • + /// + /// US West (Oregon) + /// + ///
      • + /// + /// Asia Pacific (Singapore) + /// + ///
      • + /// + /// Asia Pacific (Sydney) + /// + ///
      • + /// + /// Asia Pacific (Tokyo) + /// + ///
      • + /// + /// Europe (Ireland) + /// + ///
      • + /// + /// South America (São Paulo) + /// + ///
      + /// + /// For a list of all the Amazon S3 supported Regions and endpoints, see Regions + /// and Endpoints in the Amazon Web Services General Reference. + /// + ///
    Versioning
    + /// + /// The ACL of an object is set at the object version level. By default, PUT sets the + /// ACL of the current version of an object. To set the ACL of a different version, use + /// the versionId subresource. + /// + ///
    + /// + /// The following operations are related to PutObjectAcl: + /// + /// + ///
    + /// Container for the necessary parameters to execute the PutObjectAcl service method. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// + /// The response from the PutObjectAcl service method, as returned by S3. + /// REST API Reference for PutObjectAcl Operation + public virtual Task PutObjectAclAsync(PutObjectAclRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) + { + var options = new InvokeOptions(); + options.RequestMarshaller = PutObjectAclRequestMarshaller.Instance; + options.ResponseUnmarshaller = PutObjectAclResponseUnmarshaller.Instance; + + return InvokeAsync(request, options, cancellationToken); + } + + #endregion + #region PutObjectLegalHold internal virtual PutObjectLegalHoldResponse PutObjectLegalHold(PutObjectLegalHoldRequest request) diff --git a/sdk/src/Services/S3/Generated/_netstandard/IAmazonS3.cs b/sdk/src/Services/S3/Generated/_netstandard/IAmazonS3.cs index f94750254492..4c0848a40253 100644 --- a/sdk/src/Services/S3/Generated/_netstandard/IAmazonS3.cs +++ b/sdk/src/Services/S3/Generated/_netstandard/IAmazonS3.cs @@ -3442,7 +3442,7 @@ public partial interface IAmazonS3 : IAmazonService, IDisposable #endregion - #region GetACL + #region GetBucketAccelerateConfiguration /// @@ -3452,113 +3452,55 @@ public partial interface IAmazonS3 : IAmazonService, IDisposable /// /// /// - /// This implementation of the GET action uses the acl subresource to return - /// the access control list (ACL) of a bucket. To use GET to return the ACL of - /// the bucket, you must have the READ_ACP access to the bucket. If READ_ACP - /// permission is granted to the anonymous user, you can return the ACL of the bucket - /// without using an authorization header. + /// This implementation of the GET action uses the accelerate subresource to return + /// the Transfer Acceleration state of a bucket, which is either Enabled or Suspended. + /// Amazon S3 Transfer Acceleration is a bucket-level feature that enables you to perform + /// faster data transfers to and from Amazon S3. /// /// /// - /// When you use this API operation with an access point, provide the alias of the access - /// point in place of the bucket name. + /// To use this operation, you must have permission to perform the s3:GetAccelerateConfiguration + /// action. The bucket owner has this permission by default. The bucket owner can grant + /// this permission to others. For more information about permissions, see Permissions + /// Related to Bucket Subresource Operations and Managing + /// Access Permissions to your Amazon S3 Resources in the Amazon S3 User Guide. /// /// /// - /// When you use this API operation with an Object Lambda access point, provide the alias - /// of the Object Lambda access point in place of the bucket name. If the Object Lambda - /// access point alias in a request is not valid, the error code InvalidAccessPointAliasError - /// is returned. For more information about InvalidAccessPointAliasError, see List - /// of Error Codes. - /// - /// - /// - /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, requests - /// to read ACLs are still supported and return the bucket-owner-full-control ACL - /// with the owner being the account that created the bucket. For more information, see - /// - /// Controlling object ownership and disabling ACLs in the Amazon S3 User Guide. - /// - /// - /// - /// The following operations are related to GetBucketAcl: - /// - /// - /// - /// Specifies the S3 bucket whose ACL is being requested. When you use this API operation with an access point, provide the alias of the access point in place of the bucket name. When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. For more information about InvalidAccessPointAliasError, see List of Error Codes. - /// - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// - /// - /// The response from the GetACL service method, as returned by S3. - /// REST API Reference for GetACL Operation - Task GetACLAsync(string bucketName, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); - - - /// - /// - /// - /// This operation is not supported by directory buckets. - /// - /// - /// - /// This implementation of the GET action uses the acl subresource to return - /// the access control list (ACL) of a bucket. To use GET to return the ACL of - /// the bucket, you must have the READ_ACP access to the bucket. If READ_ACP - /// permission is granted to the anonymous user, you can return the ACL of the bucket - /// without using an authorization header. + /// You set the Transfer Acceleration state of an existing bucket to Enabled or + /// Suspended by using the PutBucketAccelerateConfiguration + /// operation. /// /// /// - /// When you use this API operation with an access point, provide the alias of the access - /// point in place of the bucket name. + /// A GET accelerate request does not return a state value for a bucket that has + /// no transfer acceleration state. A bucket has no Transfer Acceleration state if a state + /// has never been set on the bucket. /// /// /// - /// When you use this API operation with an Object Lambda access point, provide the alias - /// of the Object Lambda access point in place of the bucket name. If the Object Lambda - /// access point alias in a request is not valid, the error code InvalidAccessPointAliasError - /// is returned. For more information about InvalidAccessPointAliasError, see List - /// of Error Codes. - /// - /// - /// - /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, requests - /// to read ACLs are still supported and return the bucket-owner-full-control ACL - /// with the owner being the account that created the bucket. For more information, see - /// - /// Controlling object ownership and disabling ACLs in the Amazon S3 User Guide. + /// For more information about transfer acceleration, see Transfer + /// Acceleration in the Amazon S3 User Guide. /// - /// + /// /// - /// The following operations are related to GetBucketAcl: + /// The following operations are related to GetBucketAccelerateConfiguration: /// /// /// - /// Container for the necessary parameters to execute the GetACL service method. + /// The name of the bucket for which the accelerate configuration is retrieved. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// - /// The response from the GetACL service method, as returned by S3. - /// REST API Reference for GetACL Operation - Task GetACLAsync(GetACLRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); - - #endregion - - #region GetBucketAccelerateConfiguration + /// The response from the GetBucketAccelerateConfiguration service method, as returned by S3. + /// REST API Reference for GetBucketAccelerateConfiguration Operation + Task GetBucketAccelerateConfigurationAsync(string bucketName, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); /// @@ -3609,14 +3551,19 @@ public partial interface IAmazonS3 : IAmazonService, IDisposable /// /// /// - /// The name of the bucket for which the accelerate configuration is retrieved. + /// Container for the necessary parameters to execute the GetBucketAccelerateConfiguration service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the GetBucketAccelerateConfiguration service method, as returned by S3. /// REST API Reference for GetBucketAccelerateConfiguration Operation - Task GetBucketAccelerateConfigurationAsync(string bucketName, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); + Task GetBucketAccelerateConfigurationAsync(GetBucketAccelerateConfigurationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); + + #endregion + + #region GetBucketAcl + /// @@ -3626,55 +3573,53 @@ public partial interface IAmazonS3 : IAmazonService, IDisposable /// /// /// - /// This implementation of the GET action uses the accelerate subresource to return - /// the Transfer Acceleration state of a bucket, which is either Enabled or Suspended. - /// Amazon S3 Transfer Acceleration is a bucket-level feature that enables you to perform - /// faster data transfers to and from Amazon S3. - /// - /// - /// - /// To use this operation, you must have permission to perform the s3:GetAccelerateConfiguration - /// action. The bucket owner has this permission by default. The bucket owner can grant - /// this permission to others. For more information about permissions, see Permissions - /// Related to Bucket Subresource Operations and Managing - /// Access Permissions to your Amazon S3 Resources in the Amazon S3 User Guide. + /// This implementation of the GET action uses the acl subresource to return + /// the access control list (ACL) of a bucket. To use GET to return the ACL of + /// the bucket, you must have the READ_ACP access to the bucket. If READ_ACP + /// permission is granted to the anonymous user, you can return the ACL of the bucket + /// without using an authorization header. /// /// /// - /// You set the Transfer Acceleration state of an existing bucket to Enabled or - /// Suspended by using the PutBucketAccelerateConfiguration - /// operation. + /// When you use this API operation with an access point, provide the alias of the access + /// point in place of the bucket name. /// /// /// - /// A GET accelerate request does not return a state value for a bucket that has - /// no transfer acceleration state. A bucket has no Transfer Acceleration state if a state - /// has never been set on the bucket. + /// When you use this API operation with an Object Lambda access point, provide the alias + /// of the Object Lambda access point in place of the bucket name. If the Object Lambda + /// access point alias in a request is not valid, the error code InvalidAccessPointAliasError + /// is returned. For more information about InvalidAccessPointAliasError, see List + /// of Error Codes. /// - /// + /// /// - /// For more information about transfer acceleration, see Transfer - /// Acceleration in the Amazon S3 User Guide. + /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, requests + /// to read ACLs are still supported and return the bucket-owner-full-control ACL + /// with the owner being the account that created the bucket. For more information, see + /// + /// Controlling object ownership and disabling ACLs in the Amazon S3 User Guide. /// - /// + /// /// - /// The following operations are related to GetBucketAccelerateConfiguration: + /// The following operations are related to GetBucketAcl: /// /// /// - /// Container for the necessary parameters to execute the GetBucketAccelerateConfiguration service method. + /// Container for the necessary parameters to execute the GetBucketAcl service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// - /// The response from the GetBucketAccelerateConfiguration service method, as returned by S3. - /// REST API Reference for GetBucketAccelerateConfiguration Operation - Task GetBucketAccelerateConfigurationAsync(GetBucketAccelerateConfigurationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); + /// The response from the GetBucketAcl service method, as returned by S3. + /// REST API Reference for GetBucketAcl Operation + Task GetBucketAclAsync(GetBucketAclRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); #endregion @@ -5799,6 +5744,77 @@ public partial interface IAmazonS3 : IAmazonService, IDisposable #endregion + #region GetObjectAcl + + + + /// + /// + /// + /// This operation is not supported by directory buckets. + /// + /// + /// + /// Returns the access control list (ACL) of an object. To use this operation, you must + /// have s3:GetObjectAcl permissions or READ_ACP access to the object. For + /// more information, see Mapping + /// of ACL permissions and access policy permissions in the Amazon S3 User Guide + /// + /// + /// + /// + /// This functionality is not supported for Amazon S3 on Outposts. + /// + /// + /// + /// By default, GET returns ACL information about the current version of an object. To + /// return ACL information about a different version, use the versionId subresource. + /// + /// + /// + /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, requests + /// to read ACLs are still supported and return the bucket-owner-full-control ACL + /// with the owner being the account that created the bucket. For more information, see + /// + /// Controlling object ownership and disabling ACLs in the Amazon S3 User Guide. + /// + /// + /// + /// The following operations are related to GetObjectAcl: + /// + /// + /// + /// Container for the necessary parameters to execute the GetObjectAcl service method. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// + /// The response from the GetObjectAcl service method, as returned by S3. + /// REST API Reference for GetObjectAcl Operation + Task GetObjectAclAsync(GetObjectAclRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); + + #endregion + #region GetObjectAttributes @@ -8767,243 +8783,140 @@ public partial interface IAmazonS3 : IAmazonService, IDisposable #endregion - #region PutACL - + #region PutBucket /// /// /// - /// This operation is not supported by directory buckets. + /// This action creates an Amazon S3 bucket. To create an Amazon S3 on Outposts bucket, + /// see + /// CreateBucket . /// /// /// - /// Sets the permissions on an existing bucket using access control lists (ACL). For more - /// information, see Using - /// ACLs. To set the ACL of a bucket, you must have the WRITE_ACP permission. + /// Creates a new S3 bucket. To create a bucket, you must set up Amazon S3 and have a + /// valid Amazon Web Services Access Key ID to authenticate requests. Anonymous requests + /// are never allowed to create buckets. By creating the bucket, you become the bucket + /// owner. /// /// /// - /// You can use one of the following two ways to set a bucket's permissions: + /// There are two types of buckets: general purpose buckets and directory buckets. For + /// more information about these bucket types, see Creating, + /// configuring, and working with Amazon S3 buckets in the Amazon S3 User Guide. /// - ///
    • + ///
      • /// - /// Specify the ACL in the request body + /// General purpose buckets - If you send your CreateBucket request to + /// the s3.amazonaws.com global endpoint, the request goes to the us-east-1 + /// Region. So the signature calculations in Signature Version 4 must use us-east-1 + /// as the Region, even if the location constraint in the request specifies another Region + /// where the bucket is to be created. If you create a bucket in a Region other than US + /// East (N. Virginia), your application must be able to handle 307 redirect. For more + /// information, see Virtual + /// hosting of buckets in the Amazon S3 User Guide. /// ///
      • /// - /// Specify permissions using request headers + /// Directory buckets - For directory buckets, you must make requests for this + /// API operation to the Regional endpoint. These endpoints support path-style requests + /// in the format https://s3express-control.region_code.amazonaws.com/bucket-name + /// . Virtual-hosted-style requests aren't supported. For more information, see Regional + /// and Zonal endpoints in the Amazon S3 User Guide. /// - ///
      + ///
    Permissions
    • /// - /// You cannot specify access permission using both the body and the request headers. - /// - /// - /// - /// Depending on your application needs, you may choose to set the ACL on a bucket using - /// either the request body or the headers. For example, if you have an existing application - /// that updates a bucket ACL using the request body, then you can continue to use that - /// approach. - /// - /// - /// - /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, ACLs - /// are disabled and no longer affect permissions. You must use policies to grant access - /// to your bucket and the objects in it. Requests to set ACLs or update ACLs fail and - /// return the AccessControlListNotSupported error code. Requests to read ACLs - /// are still supported. For more information, see Controlling - /// object ownership in the Amazon S3 User Guide. - /// - ///
      Permissions
      - /// - /// You can set access permissions by using one of the following methods: - /// - ///
      • - /// - /// Specify a canned ACL with the x-amz-acl request header. Amazon S3 supports - /// a set of predefined ACLs, known as canned ACLs. Each canned ACL has a predefined - /// set of grantees and permissions. Specify the canned ACL name as the value of x-amz-acl. - /// If you use this header, you cannot use other access control-specific headers in your - /// request. For more information, see Canned - /// ACL. - /// - ///
      • - /// - /// Specify access permissions explicitly with the x-amz-grant-read, x-amz-grant-read-acp, - /// x-amz-grant-write-acp, and x-amz-grant-full-control headers. When using - /// these headers, you specify explicit access permissions and grantees (Amazon Web Services - /// accounts or Amazon S3 groups) who will receive the permission. If you use these ACL-specific - /// headers, you cannot use the x-amz-acl header to set a canned ACL. These parameters - /// map to the set of permissions that Amazon S3 supports in an ACL. For more information, - /// see Access - /// Control List (ACL) Overview. - /// - /// - /// - /// You specify each grantee as a type=value pair, where the type is one of the following: - /// - ///
        • - /// - /// id – if the value specified is the canonical user ID of an Amazon Web Services - /// account - /// - ///
        • - /// - /// uri – if you are granting permissions to a predefined group - /// - ///
        • - /// - /// emailAddress – if the value specified is the email address of an Amazon Web - /// Services account - /// - /// - /// - /// Using email addresses to specify a grantee is only supported in the following Amazon - /// Web Services Regions: + /// General purpose bucket permissions - In addition to the s3:CreateBucket + /// permission, the following permissions are required in a policy when your CreateBucket + /// request includes specific headers: /// ///
          • /// - /// US East (N. Virginia) - /// - ///
          • - /// - /// US West (N. California) - /// - ///
          • - /// - /// US West (Oregon) - /// - ///
          • - /// - /// Asia Pacific (Singapore) - /// - ///
          • - /// - /// Asia Pacific (Sydney) - /// - ///
          • - /// - /// Asia Pacific (Tokyo) + /// Access control lists (ACLs) - In your CreateBucket request, if you + /// specify an access control list (ACL) and set it to public-read, public-read-write, + /// authenticated-read, or if you explicitly specify any other custom ACLs, both + /// s3:CreateBucket and s3:PutBucketAcl permissions are required. In your + /// CreateBucket request, if you set the ACL to private, or if you don't + /// specify any ACLs, only the s3:CreateBucket permission is required. /// ///
          • /// - /// Europe (Ireland) + /// Object Lock - In your CreateBucket request, if you set x-amz-bucket-object-lock-enabled + /// to true, the s3:PutBucketObjectLockConfiguration and s3:PutBucketVersioning + /// permissions are required. /// ///
          • /// - /// South America (São Paulo) - /// - ///
          - /// - /// For a list of all the Amazon S3 supported Regions and endpoints, see Regions - /// and Endpoints in the Amazon Web Services General Reference. - /// - ///
        - /// - /// For example, the following x-amz-grant-write header grants create, overwrite, - /// and delete objects permission to LogDelivery group predefined by Amazon S3 and two - /// Amazon Web Services accounts identified by their email addresses. - /// - /// - /// - /// x-amz-grant-write: uri="http://acs.amazonaws.com/groups/s3/LogDelivery", id="111122223333", - /// id="555566667777" - /// - ///
      - /// - /// You can use either a canned ACL or specify access permissions explicitly. You cannot - /// do both. - /// - ///
      Grantee Values
      - /// - /// You can specify the person (grantee) to whom you're assigning access rights (using - /// request elements) in the following ways: - /// - ///
      • - /// - /// By the person's ID: + /// S3 Object Ownership - If your CreateBucket request includes the x-amz-object-ownership + /// header, then the s3:PutBucketOwnershipControls permission is required. /// - /// + /// /// - /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"><ID><>ID<></ID><DisplayName><>GranteesEmail<></DisplayName> - /// </Grantee> + /// To set an ACL on a bucket as part of a CreateBucket request, you must explicitly + /// set S3 Object Ownership for the bucket to a different value than the default, BucketOwnerEnforced. + /// Additionally, if your desired bucket ACL grants public access, you must first create + /// the bucket (without the bucket ACL) and then explicitly disable Block Public Access + /// on the bucket before using PutBucketAcl to set the ACL. If you try to create + /// a bucket with a public ACL, the request will fail. /// /// /// - /// DisplayName is optional and ignored in the request - /// - ///
      • - /// - /// By URI: + /// For the majority of modern use cases in S3, we recommend that you keep all Block + /// Public Access settings enabled and keep ACLs disabled. If you would like to share + /// data with users outside of your account, you can use bucket policies as needed. For + /// more information, see Controlling + /// ownership of objects and disabling ACLs for your bucket and Blocking + /// public access to your Amazon S3 storage in the Amazon S3 User Guide. /// - /// + ///
      • /// - /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Group"><URI><>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<></URI></Grantee> - /// + /// S3 Block Public Access - If your specific use case requires granting public + /// access to your S3 resources, you can disable Block Public Access. Specifically, you + /// can create a new bucket with Block Public Access enabled, then separately call the + /// + /// DeletePublicAccessBlock API. To use this operation, you must have the + /// s3:PutBucketPublicAccessBlock permission. For more information about S3 Block + /// Public Access, see Blocking + /// public access to your Amazon S3 storage in the Amazon S3 User Guide. /// - ///
      • + ///
    • /// - /// By Email address: + /// Directory bucket permissions - You must have the s3express:CreateBucket + /// permission in an IAM identity-based policy instead of a bucket policy. Cross-account + /// access to this API operation isn't supported. This operation can only be performed + /// by the Amazon Web Services account that owns the resource. For more information about + /// directory bucket policies and permissions, see Amazon + /// Web Services Identity and Access Management (IAM) for S3 Express One Zone in the + /// Amazon S3 User Guide. /// - /// + /// /// - /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="AmazonCustomerByEmail"><EmailAddress><>Grantees@email.com<></EmailAddress>&</Grantee> - /// + /// The permissions for ACLs, Object Lock, S3 Object Ownership, and S3 Block Public Access + /// are not supported for directory buckets. For directory buckets, all Block Public Access + /// settings are enabled at the bucket level and S3 Object Ownership is set to Bucket + /// owner enforced (ACLs disabled). These settings can't be modified. /// /// /// - /// The grantee is resolved to the CanonicalUser and, in a response to a GET Object acl - /// request, appears as the CanonicalUser. - /// - /// - /// - /// Using email addresses to specify a grantee is only supported in the following Amazon - /// Web Services Regions: - /// - ///
      • - /// - /// US East (N. Virginia) - /// - ///
      • - /// - /// US West (N. California) - /// - ///
      • - /// - /// US West (Oregon) - /// - ///
      • - /// - /// Asia Pacific (Singapore) - /// - ///
      • - /// - /// Asia Pacific (Sydney) - /// - ///
      • - /// - /// Asia Pacific (Tokyo) - /// - ///
      • - /// - /// Europe (Ireland) - /// - ///
      • - /// - /// South America (São Paulo) + /// For more information about permissions for creating and working with directory buckets, + /// see Directory + /// buckets in the Amazon S3 User Guide. For more information about supported + /// S3 features for directory buckets, see Features + /// of S3 Express One Zone in the Amazon S3 User Guide. /// - ///
      + ///
    HTTP Host header syntax
    /// - /// For a list of all the Amazon S3 supported Regions and endpoints, see Regions - /// and Endpoints in the Amazon Web Services General Reference. + /// Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com. /// - ///
    + /// /// - /// The following operations are related to PutBucketAcl: + /// The following operations are related to CreateBucket: /// /// ///
    - /// Container for the necessary parameters to execute the PutACL service method. + /// The name of the bucket to create. General purpose buckets - For information about bucket naming restrictions, see Bucket naming rules in the Amazon S3 User Guide. Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region_code.amazonaws.com/bucket-name . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must also follow the format bucket_base_name--az_id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// - /// The response from the PutACL service method, as returned by S3. - /// REST API Reference for PutACL Operation - Task PutACLAsync(PutACLRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); - - #endregion - - #region PutBucket + /// The response from the PutBucket service method, as returned by S3. + /// REST API Reference for PutBucket Operation + Task PutBucketAsync(string bucketName, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); /// @@ -9172,168 +9076,101 @@ public partial interface IAmazonS3 : IAmazonService, IDisposable /// /// /// - /// The name of the bucket to create. General purpose buckets - For information about bucket naming restrictions, see Bucket naming rules in the Amazon S3 User Guide. Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region_code.amazonaws.com/bucket-name . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must also follow the format bucket_base_name--az_id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide + /// Container for the necessary parameters to execute the PutBucket service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the PutBucket service method, as returned by S3. /// REST API Reference for PutBucket Operation - Task PutBucketAsync(string bucketName, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); + Task PutBucketAsync(PutBucketRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); + + #endregion + + #region PutBucketAccelerateConfiguration + /// /// /// - /// This action creates an Amazon S3 bucket. To create an Amazon S3 on Outposts bucket, - /// see - /// CreateBucket . + /// This operation is not supported by directory buckets. /// /// /// - /// Creates a new S3 bucket. To create a bucket, you must set up Amazon S3 and have a - /// valid Amazon Web Services Access Key ID to authenticate requests. Anonymous requests - /// are never allowed to create buckets. By creating the bucket, you become the bucket - /// owner. + /// Sets the accelerate configuration of an existing bucket. Amazon S3 Transfer Acceleration + /// is a bucket-level feature that enables you to perform faster data transfers to Amazon + /// S3. /// /// /// - /// There are two types of buckets: general purpose buckets and directory buckets. For - /// more information about these bucket types, see Creating, - /// configuring, and working with Amazon S3 buckets in the Amazon S3 User Guide. - /// - ///
    • - /// - /// General purpose buckets - If you send your CreateBucket request to - /// the s3.amazonaws.com global endpoint, the request goes to the us-east-1 - /// Region. So the signature calculations in Signature Version 4 must use us-east-1 - /// as the Region, even if the location constraint in the request specifies another Region - /// where the bucket is to be created. If you create a bucket in a Region other than US - /// East (N. Virginia), your application must be able to handle 307 redirect. For more - /// information, see Virtual - /// hosting of buckets in the Amazon S3 User Guide. - /// - ///
    • - /// - /// Directory buckets - For directory buckets, you must make requests for this - /// API operation to the Regional endpoint. These endpoints support path-style requests - /// in the format https://s3express-control.region_code.amazonaws.com/bucket-name - /// . Virtual-hosted-style requests aren't supported. For more information, see Regional - /// and Zonal endpoints in the Amazon S3 User Guide. + /// To use this operation, you must have permission to perform the s3:PutAccelerateConfiguration + /// action. The bucket owner has this permission by default. The bucket owner can grant + /// this permission to others. For more information about permissions, see Permissions + /// Related to Bucket Subresource Operations and Managing + /// Access Permissions to Your Amazon S3 Resources. /// - ///
    Permissions
    • + /// /// - /// General purpose bucket permissions - In addition to the s3:CreateBucket - /// permission, the following permissions are required in a policy when your CreateBucket - /// request includes specific headers: + /// The Transfer Acceleration state of a bucket can be set to one of the following two + /// values: /// ///
      • /// - /// Access control lists (ACLs) - In your CreateBucket request, if you - /// specify an access control list (ACL) and set it to public-read, public-read-write, - /// authenticated-read, or if you explicitly specify any other custom ACLs, both - /// s3:CreateBucket and s3:PutBucketAcl permissions are required. In your - /// CreateBucket request, if you set the ACL to private, or if you don't - /// specify any ACLs, only the s3:CreateBucket permission is required. - /// - ///
      • - /// - /// Object Lock - In your CreateBucket request, if you set x-amz-bucket-object-lock-enabled - /// to true, the s3:PutBucketObjectLockConfiguration and s3:PutBucketVersioning - /// permissions are required. + /// Enabled – Enables accelerated data transfers to the bucket. /// ///
      • /// - /// S3 Object Ownership - If your CreateBucket request includes the x-amz-object-ownership - /// header, then the s3:PutBucketOwnershipControls permission is required. + /// Suspended – Disables accelerated data transfers to the bucket. /// - /// + ///
      /// - /// To set an ACL on a bucket as part of a CreateBucket request, you must explicitly - /// set S3 Object Ownership for the bucket to a different value than the default, BucketOwnerEnforced. - /// Additionally, if your desired bucket ACL grants public access, you must first create - /// the bucket (without the bucket ACL) and then explicitly disable Block Public Access - /// on the bucket before using PutBucketAcl to set the ACL. If you try to create - /// a bucket with a public ACL, the request will fail. + /// The GetBucketAccelerateConfiguration + /// action returns the transfer acceleration state of a bucket. /// /// /// - /// For the majority of modern use cases in S3, we recommend that you keep all Block - /// Public Access settings enabled and keep ACLs disabled. If you would like to share - /// data with users outside of your account, you can use bucket policies as needed. For - /// more information, see Controlling - /// ownership of objects and disabling ACLs for your bucket and Blocking - /// public access to your Amazon S3 storage in the Amazon S3 User Guide. - /// - ///
    • - /// - /// S3 Block Public Access - If your specific use case requires granting public - /// access to your S3 resources, you can disable Block Public Access. Specifically, you - /// can create a new bucket with Block Public Access enabled, then separately call the - /// - /// DeletePublicAccessBlock API. To use this operation, you must have the - /// s3:PutBucketPublicAccessBlock permission. For more information about S3 Block - /// Public Access, see Blocking - /// public access to your Amazon S3 storage in the Amazon S3 User Guide. - /// - ///
  • - /// - /// Directory bucket permissions - You must have the s3express:CreateBucket - /// permission in an IAM identity-based policy instead of a bucket policy. Cross-account - /// access to this API operation isn't supported. This operation can only be performed - /// by the Amazon Web Services account that owns the resource. For more information about - /// directory bucket policies and permissions, see Amazon - /// Web Services Identity and Access Management (IAM) for S3 Express One Zone in the - /// Amazon S3 User Guide. - /// - /// - /// - /// The permissions for ACLs, Object Lock, S3 Object Ownership, and S3 Block Public Access - /// are not supported for directory buckets. For directory buckets, all Block Public Access - /// settings are enabled at the bucket level and S3 Object Ownership is set to Bucket - /// owner enforced (ACLs disabled). These settings can't be modified. + /// After setting the Transfer Acceleration state of a bucket to Enabled, it might take + /// up to thirty minutes before the data transfer rates to the bucket increase. /// /// /// - /// For more information about permissions for creating and working with directory buckets, - /// see Directory - /// buckets in the Amazon S3 User Guide. For more information about supported - /// S3 features for directory buckets, see Features - /// of S3 Express One Zone in the Amazon S3 User Guide. + /// The name of the bucket used for Transfer Acceleration must be DNS-compliant and must + /// not contain periods ("."). /// - ///
  • HTTP Host header syntax
    + /// /// - /// Directory buckets - The HTTP Host header syntax is s3express-control.region.amazonaws.com. + /// For more information about transfer acceleration, see Transfer + /// Acceleration. /// - ///
    + /// /// - /// The following operations are related to CreateBucket: + /// The following operations are related to PutBucketAccelerateConfiguration: /// /// ///
    - /// Container for the necessary parameters to execute the PutBucket service method. + /// Container for the necessary parameters to execute the PutBucketAccelerateConfiguration service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// - /// The response from the PutBucket service method, as returned by S3. - /// REST API Reference for PutBucket Operation - Task PutBucketAsync(PutBucketRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); + /// The response from the PutBucketAccelerateConfiguration service method, as returned by S3. + /// REST API Reference for PutBucketAccelerateConfiguration Operation + Task PutBucketAccelerateConfigurationAsync(PutBucketAccelerateConfigurationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); #endregion - #region PutBucketAccelerateConfiguration + #region PutBucketAcl @@ -9344,75 +9181,254 @@ public partial interface IAmazonS3 : IAmazonService, IDisposable ///
    /// /// - /// Sets the accelerate configuration of an existing bucket. Amazon S3 Transfer Acceleration - /// is a bucket-level feature that enables you to perform faster data transfers to Amazon - /// S3. + /// Sets the permissions on an existing bucket using access control lists (ACL). For more + /// information, see Using + /// ACLs. To set the ACL of a bucket, you must have the WRITE_ACP permission. /// /// /// - /// To use this operation, you must have permission to perform the s3:PutAccelerateConfiguration - /// action. The bucket owner has this permission by default. The bucket owner can grant - /// this permission to others. For more information about permissions, see Permissions - /// Related to Bucket Subresource Operations and Managing - /// Access Permissions to Your Amazon S3 Resources. + /// You can use one of the following two ways to set a bucket's permissions: + /// + ///
    • + /// + /// Specify the ACL in the request body + /// + ///
    • + /// + /// Specify permissions using request headers + /// + ///
    + /// + /// You cannot specify access permission using both the body and the request headers. + /// + /// + /// + /// Depending on your application needs, you may choose to set the ACL on a bucket using + /// either the request body or the headers. For example, if you have an existing application + /// that updates a bucket ACL using the request body, then you can continue to use that + /// approach. + /// + /// + /// + /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, ACLs + /// are disabled and no longer affect permissions. You must use policies to grant access + /// to your bucket and the objects in it. Requests to set ACLs or update ACLs fail and + /// return the AccessControlListNotSupported error code. Requests to read ACLs + /// are still supported. For more information, see Controlling + /// object ownership in the Amazon S3 User Guide. + /// + ///
    Permissions
    + /// + /// You can set access permissions by using one of the following methods: + /// + ///
    • + /// + /// Specify a canned ACL with the x-amz-acl request header. Amazon S3 supports + /// a set of predefined ACLs, known as canned ACLs. Each canned ACL has a predefined + /// set of grantees and permissions. Specify the canned ACL name as the value of x-amz-acl. + /// If you use this header, you cannot use other access control-specific headers in your + /// request. For more information, see Canned + /// ACL. + /// + ///
    • + /// + /// Specify access permissions explicitly with the x-amz-grant-read, x-amz-grant-read-acp, + /// x-amz-grant-write-acp, and x-amz-grant-full-control headers. When using + /// these headers, you specify explicit access permissions and grantees (Amazon Web Services + /// accounts or Amazon S3 groups) who will receive the permission. If you use these ACL-specific + /// headers, you cannot use the x-amz-acl header to set a canned ACL. These parameters + /// map to the set of permissions that Amazon S3 supports in an ACL. For more information, + /// see Access + /// Control List (ACL) Overview. /// /// /// - /// The Transfer Acceleration state of a bucket can be set to one of the following two - /// values: + /// You specify each grantee as a type=value pair, where the type is one of the following: /// ///
      • /// - /// Enabled – Enables accelerated data transfers to the bucket. + /// id – if the value specified is the canonical user ID of an Amazon Web Services + /// account /// ///
      • /// - /// Suspended – Disables accelerated data transfers to the bucket. + /// uri – if you are granting permissions to a predefined group + /// + ///
      • + /// + /// emailAddress – if the value specified is the email address of an Amazon Web + /// Services account + /// + /// + /// + /// Using email addresses to specify a grantee is only supported in the following Amazon + /// Web Services Regions: + /// + ///
        • + /// + /// US East (N. Virginia) + /// + ///
        • + /// + /// US West (N. California) + /// + ///
        • + /// + /// US West (Oregon) + /// + ///
        • + /// + /// Asia Pacific (Singapore) + /// + ///
        • + /// + /// Asia Pacific (Sydney) + /// + ///
        • + /// + /// Asia Pacific (Tokyo) + /// + ///
        • + /// + /// Europe (Ireland) + /// + ///
        • + /// + /// South America (São Paulo) /// ///
        /// - /// The GetBucketAccelerateConfiguration - /// action returns the transfer acceleration state of a bucket. + /// For a list of all the Amazon S3 supported Regions and endpoints, see Regions + /// and Endpoints in the Amazon Web Services General Reference. + /// + ///
      + /// + /// For example, the following x-amz-grant-write header grants create, overwrite, + /// and delete objects permission to LogDelivery group predefined by Amazon S3 and two + /// Amazon Web Services accounts identified by their email addresses. /// /// /// - /// After setting the Transfer Acceleration state of a bucket to Enabled, it might take - /// up to thirty minutes before the data transfer rates to the bucket increase. + /// x-amz-grant-write: uri="http://acs.amazonaws.com/groups/s3/LogDelivery", id="111122223333", + /// id="555566667777" + /// + ///
    + /// + /// You can use either a canned ACL or specify access permissions explicitly. You cannot + /// do both. + /// + ///
    Grantee Values
    + /// + /// You can specify the person (grantee) to whom you're assigning access rights (using + /// request elements) in the following ways: + /// + ///
    • + /// + /// By the person's ID: + /// + /// + /// + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"><ID><>ID<></ID><DisplayName><>GranteesEmail<></DisplayName> + /// </Grantee> + /// + /// + /// + /// DisplayName is optional and ignored in the request + /// + ///
    • + /// + /// By URI: + /// + /// + /// + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Group"><URI><>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<></URI></Grantee> + /// + /// + ///
    • + /// + /// By Email address: + /// + /// + /// + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="AmazonCustomerByEmail"><EmailAddress><>Grantees@email.com<></EmailAddress>&</Grantee> + /// + /// + /// + /// + /// The grantee is resolved to the CanonicalUser and, in a response to a GET Object acl + /// request, appears as the CanonicalUser. + /// + /// + /// + /// Using email addresses to specify a grantee is only supported in the following Amazon + /// Web Services Regions: + /// + ///
      • + /// + /// US East (N. Virginia) + /// + ///
      • + /// + /// US West (N. California) + /// + ///
      • + /// + /// US West (Oregon) + /// + ///
      • + /// + /// Asia Pacific (Singapore) + /// + ///
      • + /// + /// Asia Pacific (Sydney) + /// + ///
      • + /// + /// Asia Pacific (Tokyo) + /// + ///
      • + /// + /// Europe (Ireland) /// - /// + ///
      • /// - /// The name of the bucket used for Transfer Acceleration must be DNS-compliant and must - /// not contain periods ("."). + /// South America (São Paulo) /// - /// + ///
      /// - /// For more information about transfer acceleration, see Transfer - /// Acceleration. + /// For a list of all the Amazon S3 supported Regions and endpoints, see Regions + /// and Endpoints in the Amazon Web Services General Reference. /// - /// + ///
    /// - /// The following operations are related to PutBucketAccelerateConfiguration: + /// The following operations are related to PutBucketAcl: /// /// /// - /// Container for the necessary parameters to execute the PutBucketAccelerateConfiguration service method. + /// Container for the necessary parameters to execute the PutBucketAcl service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// - /// The response from the PutBucketAccelerateConfiguration service method, as returned by S3. - /// REST API Reference for PutBucketAccelerateConfiguration Operation - Task PutBucketAccelerateConfigurationAsync(PutBucketAccelerateConfigurationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); + /// The response from the PutBucketAcl service method, as returned by S3. + /// REST API Reference for PutBucketAcl Operation + Task PutBucketAclAsync(PutBucketAclRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); #endregion @@ -11743,6 +11759,258 @@ public partial interface IAmazonS3 : IAmazonService, IDisposable #endregion + #region PutObjectAcl + + + + /// + /// + /// + /// This operation is not supported by directory buckets. + /// + /// + /// + /// Uses the acl subresource to set the access control list (ACL) permissions for + /// a new or existing object in an S3 bucket. You must have the WRITE_ACP permission + /// to set the ACL of an object. For more information, see What + /// permissions can I grant? in the Amazon S3 User Guide. + /// + /// + /// + /// This functionality is not supported for Amazon S3 on Outposts. + /// + /// + /// + /// Depending on your application needs, you can choose to set the ACL on an object using + /// either the request body or the headers. For example, if you have an existing application + /// that updates a bucket ACL using the request body, you can continue to use that approach. + /// For more information, see Access + /// Control List (ACL) Overview in the Amazon S3 User Guide. + /// + /// + /// + /// If your bucket uses the bucket owner enforced setting for S3 Object Ownership, ACLs + /// are disabled and no longer affect permissions. You must use policies to grant access + /// to your bucket and the objects in it. Requests to set ACLs or update ACLs fail and + /// return the AccessControlListNotSupported error code. Requests to read ACLs + /// are still supported. For more information, see Controlling + /// object ownership in the Amazon S3 User Guide. + /// + ///
    Permissions
    + /// + /// You can set access permissions using one of the following methods: + /// + ///
    • + /// + /// Specify a canned ACL with the x-amz-acl request header. Amazon S3 supports + /// a set of predefined ACLs, known as canned ACLs. Each canned ACL has a predefined set + /// of grantees and permissions. Specify the canned ACL name as the value of x-amz-acl. + /// If you use this header, you cannot use other access control-specific headers in your + /// request. For more information, see Canned + /// ACL. + /// + ///
    • + /// + /// Specify access permissions explicitly with the x-amz-grant-read, x-amz-grant-read-acp, + /// x-amz-grant-write-acp, and x-amz-grant-full-control headers. When using + /// these headers, you specify explicit access permissions and grantees (Amazon Web Services + /// accounts or Amazon S3 groups) who will receive the permission. If you use these ACL-specific + /// headers, you cannot use x-amz-acl header to set a canned ACL. These parameters + /// map to the set of permissions that Amazon S3 supports in an ACL. For more information, + /// see Access + /// Control List (ACL) Overview. + /// + /// + /// + /// You specify each grantee as a type=value pair, where the type is one of the following: + /// + ///
      • + /// + /// id – if the value specified is the canonical user ID of an Amazon Web Services + /// account + /// + ///
      • + /// + /// uri – if you are granting permissions to a predefined group + /// + ///
      • + /// + /// emailAddress – if the value specified is the email address of an Amazon Web + /// Services account + /// + /// + /// + /// Using email addresses to specify a grantee is only supported in the following Amazon + /// Web Services Regions: + /// + ///
        • + /// + /// US East (N. Virginia) + /// + ///
        • + /// + /// US West (N. California) + /// + ///
        • + /// + /// US West (Oregon) + /// + ///
        • + /// + /// Asia Pacific (Singapore) + /// + ///
        • + /// + /// Asia Pacific (Sydney) + /// + ///
        • + /// + /// Asia Pacific (Tokyo) + /// + ///
        • + /// + /// Europe (Ireland) + /// + ///
        • + /// + /// South America (São Paulo) + /// + ///
        + /// + /// For a list of all the Amazon S3 supported Regions and endpoints, see Regions + /// and Endpoints in the Amazon Web Services General Reference. + /// + ///
      + /// + /// For example, the following x-amz-grant-read header grants list objects permission + /// to the two Amazon Web Services accounts identified by their email addresses. + /// + /// + /// + /// x-amz-grant-read: emailAddress="xyz@amazon.com", emailAddress="abc@amazon.com" + /// + /// + ///
    + /// + /// You can use either a canned ACL or specify access permissions explicitly. You cannot + /// do both. + /// + ///
    Grantee Values
    + /// + /// You can specify the person (grantee) to whom you're assigning access rights (using + /// request elements) in the following ways: + /// + ///
    • + /// + /// By the person's ID: + /// + /// + /// + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"><ID><>ID<></ID><DisplayName><>GranteesEmail<></DisplayName> + /// </Grantee> + /// + /// + /// + /// DisplayName is optional and ignored in the request. + /// + ///
    • + /// + /// By URI: + /// + /// + /// + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Group"><URI><>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<></URI></Grantee> + /// + /// + ///
    • + /// + /// By Email address: + /// + /// + /// + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="AmazonCustomerByEmail"><EmailAddress><>Grantees@email.com<></EmailAddress>lt;/Grantee> + /// + /// + /// + /// + /// The grantee is resolved to the CanonicalUser and, in a response to a GET Object acl + /// request, appears as the CanonicalUser. + /// + /// + /// + /// Using email addresses to specify a grantee is only supported in the following Amazon + /// Web Services Regions: + /// + ///
      • + /// + /// US East (N. Virginia) + /// + ///
      • + /// + /// US West (N. California) + /// + ///
      • + /// + /// US West (Oregon) + /// + ///
      • + /// + /// Asia Pacific (Singapore) + /// + ///
      • + /// + /// Asia Pacific (Sydney) + /// + ///
      • + /// + /// Asia Pacific (Tokyo) + /// + ///
      • + /// + /// Europe (Ireland) + /// + ///
      • + /// + /// South America (São Paulo) + /// + ///
      + /// + /// For a list of all the Amazon S3 supported Regions and endpoints, see Regions + /// and Endpoints in the Amazon Web Services General Reference. + /// + ///
    Versioning
    + /// + /// The ACL of an object is set at the object version level. By default, PUT sets the + /// ACL of the current version of an object. To set the ACL of a different version, use + /// the versionId subresource. + /// + ///
    + /// + /// The following operations are related to PutObjectAcl: + /// + /// + ///
    + /// Container for the necessary parameters to execute the PutObjectAcl service method. + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// + /// The response from the PutObjectAcl service method, as returned by S3. + /// REST API Reference for PutObjectAcl Operation + Task PutObjectAclAsync(PutObjectAclRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)); + + #endregion + #region PutObjectLegalHold diff --git a/sdk/test/Services/S3/IntegrationTests/PutObjectTests.cs b/sdk/test/Services/S3/IntegrationTests/PutObjectTests.cs index bc2244822587..83526e559c47 100644 --- a/sdk/test/Services/S3/IntegrationTests/PutObjectTests.cs +++ b/sdk/test/Services/S3/IntegrationTests/PutObjectTests.cs @@ -940,6 +940,95 @@ public void PutObject_StreamChecksumEnabled() } } + [TestMethod] + [TestCategory("S3")] + public void PutBucketPutObjectACLTest() + { + var aclBucketName = S3TestUtils.CreateBucketWithWait(Client, true); + try + { + Client.PutBucket(new PutBucketRequest + { + BucketName = aclBucketName, + }); + var getBucketAclResponse = Client.GetBucketAcl(new GetBucketAclRequest + { + BucketName = aclBucketName, + }); + S3TestUtils.WaitForBucket(Client, aclBucketName); + var response = Client.PutBucketAcl(new PutBucketAclRequest + { + BucketName = aclBucketName, + AccessControlPolicy = new S3AccessControlList + { + Grants = new List() + { + new S3Grant() + { + Grantee = new S3Grantee() + { + URI = "http://acs.amazonaws.com/groups/s3/LogDelivery", + }, + Permission = S3Permission.READ + }, + }, + Owner = getBucketAclResponse.Owner, + }, + }); + var getBucketAclResponse2 = Client.GetBucketAcl(new GetBucketAclRequest + { + BucketName = aclBucketName, + }); + getBucketAclResponse2.Grants.ForEach(grant => + { + Assert.IsTrue(grant.Grantee.URI == "http://acs.amazonaws.com/groups/s3/LogDelivery"); + Assert.IsTrue(grant.Permission == S3Permission.READ); + }); + + Client.PutObject(new PutObjectRequest + { + Key = "putobjectwithacl", + ContentBody = "randomstuff", + BucketName = aclBucketName, + }); + Client.PutObjectAcl(new PutObjectAclRequest + { + BucketName = aclBucketName, + Key = "putobjectwithacl", + AccessControlPolicy = new S3AccessControlList + { + Grants = new List() + { + new S3Grant() + { + Grantee = new S3Grantee() + { + URI = "http://acs.amazonaws.com/groups/global/AuthenticatedUsers", + }, + Permission = S3Permission.READ + }, + }, + Owner = getBucketAclResponse.Owner, + }, + }); + var getObjectAclResponse = Client.GetObjectAcl(new GetObjectAclRequest + { + Key = "putobjectwithacl", + BucketName = aclBucketName, + }); + + getObjectAclResponse.Grants.ForEach(grant => + { + Assert.IsTrue(grant.Grantee.URI == "http://acs.amazonaws.com/groups/global/AuthenticatedUsers"); + Assert.IsTrue(grant.Permission == S3Permission.READ); + }); + } + finally + { + AmazonS3Util.DeleteS3BucketWithObjects(Client, aclBucketName); + } + + } [TestMethod] [TestCategory("S3")] public void PutObjectWithACL() @@ -985,9 +1074,11 @@ public void PutObjectWithACL() { new S3Grant { - Grantee = new S3Grantee { URI = "http://acs.amazonaws.com/groups/global/AuthenticatedUsers" }, - Permission = S3Permission.READ - } + Grantee = new S3Grantee { URI = "http://acs.amazonaws.com/groups/global/AuthenticatedUsers"}, + Permission = S3Permission.READ, + + }, + }, Owner = acl.Owner },