Skip to content

Commit 6f84d90

Browse files
author
awstools
committed
feat(client-s3-control): Added TagResource, UntagResource, and ListTagsForResource support for directory bucket
1 parent d439613 commit 6f84d90

File tree

9 files changed

+1124
-281
lines changed

9 files changed

+1124
-281
lines changed

clients/client-s3-control/src/commands/ListTagsForResourceCommand.ts

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,42 @@ export interface ListTagsForResourceCommandInput extends ListTagsForResourceRequ
2929
export interface ListTagsForResourceCommandOutput extends ListTagsForResourceResult, __MetadataBearer {}
3030

3131
/**
32-
* <p>This operation allows you to list all the Amazon Web Services resource tags for a specified resource. Each tag is a label consisting of a user-defined key and value. Tags can help you manage, identify, organize, search for, and filter resources. </p>
32+
* <p>This operation allows you to list all of the tags for a specified resource. Each tag is a label consisting of a key and value. Tags can help you organize, track costs for, and control access to resources. </p>
33+
* <note>
34+
* <p>This operation is only supported for the following Amazon S3 resources:</p>
35+
* <ul>
36+
* <li>
37+
* <p>
38+
* <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-tagging.html">Directory buckets</a>
39+
* </p>
40+
* </li>
41+
* <li>
42+
* <p>
43+
* <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage-lens-groups.html">Storage Lens groups</a>
44+
* </p>
45+
* </li>
46+
* <li>
47+
* <p>
48+
* <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-grants-tagging.html">S3 Access Grants instances, registered locations, and grants</a>.</p>
49+
* </li>
50+
* </ul>
51+
* </note>
3352
* <dl>
3453
* <dt>Permissions</dt>
3554
* <dd>
36-
* <p>You must have the <code>s3:ListTagsForResource</code> permission to use this operation. </p>
55+
* <p>For Storage Lens groups and S3 Access Grants, you must have the <code>s3:ListTagsForResource</code> permission to use this operation. </p>
56+
* <p>For more information about the required Storage Lens Groups permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage_lens_iam_permissions.html#storage_lens_groups_permissions">Setting account permissions to use S3 Storage Lens groups</a>.</p>
57+
* </dd>
58+
* <dt>Directory bucket permissions</dt>
59+
* <dd>
60+
* <p>For directory buckets, you must have the <code>s3express:ListTagsForResource</code> permission to use this operation. For more information about directory buckets policies and permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-permissions.html">Identity and Access Management (IAM) for S3 Express One Zone</a> in the <i>Amazon S3 User Guide</i>.</p>
61+
* </dd>
62+
* <dt>HTTP Host header syntax</dt>
63+
* <dd>
64+
* <p>
65+
* <b>Directory buckets </b> - The HTTP Host header syntax is <code>s3express-control.<i>region</i>.amazonaws.com</code>.</p>
3766
* </dd>
3867
* </dl>
39-
* <note>
40-
* <p>This operation is only supported for <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage-lens-groups.html">S3 Storage Lens groups</a> and for <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-grants-tagging.html">S3 Access Grants</a>. The tagged resource can be an S3 Storage Lens group or S3 Access Grants instance, registered location, or grant. </p>
41-
* </note>
42-
* <p>For more information about the required Storage Lens
43-
* Groups permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage_lens_iam_permissions.html#storage_lens_groups_permissions">Setting account permissions to use S3 Storage Lens groups</a>.</p>
4468
* <p>For information about S3 Tagging errors, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#S3TaggingErrorCodeList">List of Amazon S3 Tagging error codes</a>.</p>
4569
* @example
4670
* Use a bare-bones client and the command you need to make an API call.
@@ -88,6 +112,7 @@ export class ListTagsForResourceCommand extends $Command
88112
.ep({
89113
...commonParams,
90114
RequiresAccountId: { type: "staticContextParams", value: true },
115+
ResourceArn: { type: "contextParams", name: "ResourceArn" },
91116
AccountId: { type: "contextParams", name: "AccountId" },
92117
})
93118
.m(function (this: any, Command: any, cs: any, config: S3ControlClientResolvedConfig, o: any) {

clients/client-s3-control/src/commands/TagResourceCommand.ts

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,42 @@ export interface TagResourceCommandInput extends TagResourceRequest {}
2929
export interface TagResourceCommandOutput extends TagResourceResult, __MetadataBearer {}
3030

3131
/**
32-
* <p> Creates a new Amazon Web Services resource tag or updates an existing resource tag. Each tag is a label consisting of a user-defined key and value. Tags can help you manage, identify, organize, search for, and filter resources. You can add up to 50 Amazon Web Services resource tags for each S3 resource. </p>
32+
* <p> Creates a new user-defined tag or updates an existing tag. Each tag is a label consisting of a key and value that is applied to your resource. Tags can help you organize, track costs for, and control access to your resources. You can add up to 50 Amazon Web Services resource tags for each S3 resource. </p>
3333
* <note>
34-
* <p>This operation is only supported for <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage-lens-groups.html">S3 Storage Lens groups</a> and for <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-grants-tagging.html">S3 Access Grants</a>. The tagged resource can be an S3 Storage Lens group or S3 Access Grants instance, registered location, or grant. </p>
34+
* <p>This operation is only supported for the following Amazon S3 resource:</p>
35+
* <ul>
36+
* <li>
37+
* <p>
38+
* <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-tagging.html">Directory buckets</a>
39+
* </p>
40+
* </li>
41+
* <li>
42+
* <p>
43+
* <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage-lens-groups.html">S3 Storage Lens groups</a>
44+
* </p>
45+
* </li>
46+
* <li>
47+
* <p>
48+
* <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-grants-tagging.html">S3 Access Grants instances, registered locations, or grants</a>.</p>
49+
* </li>
50+
* </ul>
3551
* </note>
3652
* <dl>
3753
* <dt>Permissions</dt>
3854
* <dd>
39-
* <p>You must have the <code>s3:TagResource</code> permission to use this operation. </p>
55+
* <p>For Storage Lens groups and S3 Access Grants, you must have the <code>s3:TagResource</code> permission to use this operation. </p>
56+
* <p>For more information about the required Storage Lens Groups permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage_lens_iam_permissions.html#storage_lens_groups_permissions">Setting account permissions to use S3 Storage Lens groups</a>.</p>
57+
* </dd>
58+
* <dt>Directory bucket permissions</dt>
59+
* <dd>
60+
* <p>For directory buckets, you must have the <code>s3express:TagResource</code> permission to use this operation. For more information about directory buckets policies and permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-permissions.html">Identity and Access Management (IAM) for S3 Express One Zone</a> in the <i>Amazon S3 User Guide</i>.</p>
61+
* </dd>
62+
* <dt>HTTP Host header syntax</dt>
63+
* <dd>
64+
* <p>
65+
* <b>Directory buckets </b> - The HTTP Host header syntax is <code>s3express-control.<i>region</i>.amazonaws.com</code>.</p>
4066
* </dd>
4167
* </dl>
42-
* <p>For more information about the required Storage Lens
43-
* Groups permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage_lens_iam_permissions.html#storage_lens_groups_permissions">Setting account permissions to use S3 Storage Lens groups</a>.</p>
4468
* <p>For information about S3 Tagging errors, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#S3TaggingErrorCodeList">List of Amazon S3 Tagging error codes</a>.</p>
4569
* @example
4670
* Use a bare-bones client and the command you need to make an API call.
@@ -87,6 +111,7 @@ export class TagResourceCommand extends $Command
87111
.ep({
88112
...commonParams,
89113
RequiresAccountId: { type: "staticContextParams", value: true },
114+
ResourceArn: { type: "contextParams", name: "ResourceArn" },
90115
AccountId: { type: "contextParams", name: "AccountId" },
91116
})
92117
.m(function (this: any, Command: any, cs: any, config: S3ControlClientResolvedConfig, o: any) {

clients/client-s3-control/src/commands/UntagResourceCommand.ts

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,42 @@ export interface UntagResourceCommandInput extends UntagResourceRequest {}
2929
export interface UntagResourceCommandOutput extends UntagResourceResult, __MetadataBearer {}
3030

3131
/**
32-
* <p> This operation removes the specified Amazon Web Services resource tags from an S3 resource. Each tag is a label consisting of a user-defined key and value. Tags can help you manage, identify, organize, search for, and filter resources. </p>
32+
* <p>This operation removes the specified user-defined tags from an S3 resource. You can pass one or more tag keys. </p>
3333
* <note>
34-
* <p>This operation is only supported for <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage-lens-groups.html">S3 Storage Lens groups</a> and for <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-grants-tagging.html">S3 Access Grants</a>. The tagged resource can be an S3 Storage Lens group or S3 Access Grants instance, registered location, or grant. </p>
34+
* <p>This operation is only supported for the following Amazon S3 resources:</p>
35+
* <ul>
36+
* <li>
37+
* <p>
38+
* <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-tagging.html">Directory buckets</a>
39+
* </p>
40+
* </li>
41+
* <li>
42+
* <p>
43+
* <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage-lens-groups.html">Storage Lens groups</a>
44+
* </p>
45+
* </li>
46+
* <li>
47+
* <p>
48+
* <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-grants-tagging.html">S3 Access Grants instances, registered locations, and grants</a>.</p>
49+
* </li>
50+
* </ul>
3551
* </note>
3652
* <dl>
3753
* <dt>Permissions</dt>
3854
* <dd>
39-
* <p>You must have the <code>s3:UntagResource</code> permission to use this operation. </p>
55+
* <p>For Storage Lens groups and S3 Access Grants, you must have the <code>s3:UntagResource</code> permission to use this operation. </p>
56+
* <p>For more information about the required Storage Lens Groups permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage_lens_iam_permissions.html#storage_lens_groups_permissions">Setting account permissions to use S3 Storage Lens groups</a>.</p>
57+
* </dd>
58+
* <dt>Directory bucket permissions</dt>
59+
* <dd>
60+
* <p>For directory buckets, you must have the <code>s3express:UntagResource</code> permission to use this operation. For more information about directory buckets policies and permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-permissions.html">Identity and Access Management (IAM) for S3 Express One Zone</a> in the <i>Amazon S3 User Guide</i>.</p>
61+
* </dd>
62+
* <dt>HTTP Host header syntax</dt>
63+
* <dd>
64+
* <p>
65+
* <b>Directory buckets </b> - The HTTP Host header syntax is <code>s3express-control.<i>region</i>.amazonaws.com</code>.</p>
4066
* </dd>
4167
* </dl>
42-
* <p>For more information about the required Storage
43-
* Lens Groups permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage_lens_iam_permissions.html#storage_lens_groups_permissions">Setting account permissions to use S3 Storage Lens groups</a>.</p>
4468
* <p>For information about S3 Tagging errors, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#S3TaggingErrorCodeList">List of Amazon S3
4569
* Tagging error codes</a>.</p>
4670
* @example
@@ -85,6 +109,7 @@ export class UntagResourceCommand extends $Command
85109
.ep({
86110
...commonParams,
87111
RequiresAccountId: { type: "staticContextParams", value: true },
112+
ResourceArn: { type: "contextParams", name: "ResourceArn" },
88113
AccountId: { type: "contextParams", name: "AccountId" },
89114
})
90115
.m(function (this: any, Command: any, cs: any, config: S3ControlClientResolvedConfig, o: any) {

clients/client-s3-control/src/endpoint/EndpointParameters.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,6 @@ export interface EndpointParameters extends __EndpointParameters {
4545
Bucket?: string | undefined;
4646
AccessPointName?: string | undefined;
4747
UseArnRegion?: boolean | undefined;
48+
ResourceArn?: string | undefined;
4849
UseS3ExpressControlEndpoint?: boolean | undefined;
4950
}

clients/client-s3-control/src/endpoint/endpointResolver.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const cache = new EndpointCache({
1616
"OutpostId",
1717
"Region",
1818
"RequiresAccountId",
19+
"ResourceArn",
1920
"UseArnRegion",
2021
"UseDualStack",
2122
"UseFIPS",

0 commit comments

Comments
 (0)