Skip to content

Commit f699098

Browse files
author
awstools
committed
feat(client-s3-control): Add additional endpoint tests for S3 Control. Fix missing endpoint parameters for PutBucketVersioning and GetBucketVersioning. Prior to this fix, those operations may have resulted in an invalid endpoint being resolved.
1 parent dba9471 commit f699098

16 files changed

+203
-172
lines changed

clients/client-s3-control/src/S3Control.ts

Lines changed: 0 additions & 32 deletions
Large diffs are not rendered by default.

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ export interface CreateBucketCommandOutput extends CreateBucketResult, __Metadat
5656
* <p>For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts
5757
* endpoint hostname prefix and <code>x-amz-outpost-id</code> in your API request, see the
5858
* <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_CreateBucket.html#API_control_CreateBucket_Examples">Examples</a> section.</p>
59-
*
6059
* <p>The following actions are related to <code>CreateBucket</code> for
6160
* Amazon S3 on Outposts:</p>
6261
* <ul>

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ export interface DeleteAccessPointCommandOutput extends __MetadataBearer {}
2626

2727
/**
2828
* <p>Deletes the specified access point.</p>
29-
*
3029
* <p>All Amazon S3 on Outposts REST API requests for this action require an additional parameter of <code>x-amz-outpost-id</code> to be passed with the request. In addition, you must use an S3 on Outposts endpoint hostname prefix instead of <code>s3-control</code>. For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and the <code>x-amz-outpost-id</code> derived by using the access point ARN, see the <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_DeleteAccessPoint.html#API_control_DeleteAccessPoint_Examples">Examples</a> section.</p>
3130
* <p>The following actions are related to <code>DeleteAccessPoint</code>:</p>
3231
* <ul>

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ export interface DeleteBucketLifecycleConfigurationCommandOutput extends __Metad
4343
* owner has this permission and the Outposts bucket owner can grant this permission to
4444
* others.</p>
4545
* <p>All Amazon S3 on Outposts REST API requests for this action require an additional parameter of <code>x-amz-outpost-id</code> to be passed with the request. In addition, you must use an S3 on Outposts endpoint hostname prefix instead of <code>s3-control</code>. For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and the <code>x-amz-outpost-id</code> derived by using the access point ARN, see the <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_DeleteBucketLifecycleConfiguration.html#API_control_DeleteBucketLifecycleConfiguration_Examples">Examples</a> section.</p>
46-
*
4746
* <p>For more information about object expiration, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#intro-lifecycle-rules-actions">Elements to Describe Lifecycle Actions</a>.</p>
4847
* <p>Related actions include:</p>
4948
* <ul>

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,24 +36,18 @@ export interface DeleteBucketPolicyCommandOutput extends __MetadataBearer {}
3636
* and belong to the bucket owner's account to use this action. For more information, see
3737
* <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">Using
3838
* Amazon S3 on Outposts</a> in <i>Amazon S3 User Guide</i>.</p>
39-
*
4039
* <p>If you don't have <code>DeleteBucketPolicy</code> permissions, Amazon S3 returns a <code>403
4140
* Access Denied</code> error. If you have the correct permissions, but you're not using an
4241
* identity that belongs to the bucket owner's account, Amazon S3 returns a <code>405 Method Not
4342
* Allowed</code> error. </p>
44-
*
45-
*
4643
* <important>
4744
* <p>As a security precaution, the root user of the Amazon Web Services account that owns a bucket can
4845
* always use this action, even if the policy explicitly denies the root user the ability
4946
* to perform this action.</p>
5047
* </important>
51-
*
5248
* <p>For more information about bucket policies, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html">Using Bucket Policies and User
5349
* Policies</a>. </p>
54-
*
5550
* <p>All Amazon S3 on Outposts REST API requests for this action require an additional parameter of <code>x-amz-outpost-id</code> to be passed with the request. In addition, you must use an S3 on Outposts endpoint hostname prefix instead of <code>s3-control</code>. For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and the <code>x-amz-outpost-id</code> derived by using the access point ARN, see the <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_DeleteBucketPolicy.html#API_control_DeleteBucketPolicy_Examples">Examples</a> section.</p>
56-
*
5751
* <p>The following actions are related to <code>DeleteBucketPolicy</code>:</p>
5852
* <ul>
5953
* <li>

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,10 @@ export interface DeleteBucketTaggingCommandOutput extends __MetadataBearer {}
3131
* </note>
3232
* <p>Deletes the tags from the Outposts bucket. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">Using
3333
* Amazon S3 on Outposts</a> in <i>Amazon S3 User Guide</i>.</p>
34-
*
3534
* <p>To use this action, you must have permission to perform the
3635
* <code>PutBucketTagging</code> action. By default, the bucket owner has this permission
3736
* and can grant this permission to others. </p>
38-
*
3937
* <p>All Amazon S3 on Outposts REST API requests for this action require an additional parameter of <code>x-amz-outpost-id</code> to be passed with the request. In addition, you must use an S3 on Outposts endpoint hostname prefix instead of <code>s3-control</code>. For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and the <code>x-amz-outpost-id</code> derived by using the access point ARN, see the <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_DeleteBucketTagging.html#API_control_DeleteBucketTagging_Examples">Examples</a> section.</p>
40-
*
4138
* <p>The following actions are related to <code>DeleteBucketTagging</code>:</p>
4239
* <ul>
4340
* <li>

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ export interface GetAccessPointCommandOutput extends GetAccessPointResult, __Met
3232
/**
3333
* <p>Returns configuration information about the specified access point.</p>
3434
* <p></p>
35-
*
3635
* <p>All Amazon S3 on Outposts REST API requests for this action require an additional parameter of <code>x-amz-outpost-id</code> to be passed with the request. In addition, you must use an S3 on Outposts endpoint hostname prefix instead of <code>s3-control</code>. For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and the <code>x-amz-outpost-id</code> derived by using the access point ARN, see the <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_GetAccessPoint.html#API_control_GetAccessPoint_Examples">Examples</a> section.</p>
3736
* <p>The following actions are related to <code>GetAccessPoint</code>:</p>
3837
* <ul>

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,12 @@ export interface GetBucketLifecycleConfigurationCommandOutput
4141
* information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html">Using Amazon S3 on Outposts</a> and for
4242
* information about lifecycle configuration, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html"> Object Lifecycle
4343
* Management</a> in <i>Amazon S3 User Guide</i>.</p>
44-
*
4544
* <p>To use this action, you must have permission to perform the
4645
* <code>s3-outposts:GetLifecycleConfiguration</code> action. The Outposts bucket owner
4746
* has this permission, by default. The bucket owner can grant this permission to others. For
4847
* more information about permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources">Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html">Managing
4948
* Access Permissions to Your Amazon S3 Resources</a>.</p>
50-
*
5149
* <p>All Amazon S3 on Outposts REST API requests for this action require an additional parameter of <code>x-amz-outpost-id</code> to be passed with the request. In addition, you must use an S3 on Outposts endpoint hostname prefix instead of <code>s3-control</code>. For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and the <code>x-amz-outpost-id</code> derived by using the access point ARN, see the <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_GetBucketLifecycleConfiguration.html#API_control_GetBucketLifecycleConfiguration_Examples">Examples</a> section.</p>
52-
*
5350
* <p>
5451
* <code>GetBucketLifecycleConfiguration</code> has the following special error:</p>
5552
* <ul>

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,23 +41,18 @@ export interface GetBucketPolicyCommandOutput extends GetBucketPolicyResult, __M
4141
* bucket, the calling identity must have the <code>GetBucketPolicy</code> permissions on the
4242
* specified bucket and belong to the bucket owner's account in order to use this
4343
* action.</p>
44-
*
4544
* <p>Only users from Outposts bucket owner account with the right permissions can perform
4645
* actions on an Outposts bucket. If you don't have <code>s3-outposts:GetBucketPolicy</code>
4746
* permissions or you're not using an identity that belongs to the bucket owner's account,
4847
* Amazon S3 returns a <code>403 Access Denied</code> error.</p>
49-
*
5048
* <important>
5149
* <p>As a security precaution, the root user of the Amazon Web Services account that owns a bucket can
5250
* always use this action, even if the policy explicitly denies the root user the ability
5351
* to perform this action.</p>
5452
* </important>
55-
*
5653
* <p>For more information about bucket policies, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html">Using Bucket Policies and User
5754
* Policies</a>.</p>
58-
*
5955
* <p>All Amazon S3 on Outposts REST API requests for this action require an additional parameter of <code>x-amz-outpost-id</code> to be passed with the request. In addition, you must use an S3 on Outposts endpoint hostname prefix instead of <code>s3-control</code>. For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and the <code>x-amz-outpost-id</code> derived by using the access point ARN, see the <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_GetBucketPolicy.html#API_control_GetBucketPolicy_Examples">Examples</a> section.</p>
60-
*
6156
* <p>The following actions are related to <code>GetBucketPolicy</code>:</p>
6257
* <ul>
6358
* <li>

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ export interface GetBucketTaggingCommandOutput extends GetBucketTaggingResult, _
4040
* <p>To use this action, you must have permission to perform the
4141
* <code>GetBucketTagging</code> action. By default, the bucket owner has this permission
4242
* and can grant this permission to others.</p>
43-
*
4443
* <p>
4544
* <code>GetBucketTagging</code> has the following special error:</p>
4645
* <ul>
@@ -55,7 +54,6 @@ export interface GetBucketTaggingCommandOutput extends GetBucketTaggingResult, _
5554
* </li>
5655
* </ul>
5756
* <p>All Amazon S3 on Outposts REST API requests for this action require an additional parameter of <code>x-amz-outpost-id</code> to be passed with the request. In addition, you must use an S3 on Outposts endpoint hostname prefix instead of <code>s3-control</code>. For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and the <code>x-amz-outpost-id</code> derived by using the access point ARN, see the <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_GetBucketTagging.html#API_control_GetBucketTagging_Examples">Examples</a> section.</p>
58-
*
5957
* <p>The following actions are related to <code>GetBucketTagging</code>:</p>
6058
* <ul>
6159
* <li>

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ export class GetBucketVersioningCommand extends $Command<
8888

8989
public static getEndpointParameterInstructions(): EndpointParameterInstructions {
9090
return {
91+
RequiresAccountId: { type: "staticContextParams", value: true },
92+
AccountId: { type: "contextParams", name: "AccountId" },
93+
Bucket: { type: "contextParams", name: "Bucket" },
9194
UseArnRegion: { type: "clientContextParams", name: "useArnRegion" },
9295
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
9396
Endpoint: { type: "builtInParams", name: "endpoint" },

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,24 +37,18 @@ export interface PutBucketPolicyCommandOutput extends __MetadataBearer {}
3737
* Outposts bucket, the calling identity must have the <code>PutBucketPolicy</code>
3838
* permissions on the specified Outposts bucket and belong to the bucket owner's account in
3939
* order to use this action.</p>
40-
*
4140
* <p>If you don't have <code>PutBucketPolicy</code> permissions, Amazon S3 returns a <code>403
4241
* Access Denied</code> error. If you have the correct permissions, but you're not using an
4342
* identity that belongs to the bucket owner's account, Amazon S3 returns a <code>405 Method Not
4443
* Allowed</code> error.</p>
45-
*
4644
* <important>
4745
* <p> As a security precaution, the root user of the Amazon Web Services account that owns a bucket can
4846
* always use this action, even if the policy explicitly denies the root user the ability
4947
* to perform this action. </p>
5048
* </important>
51-
*
52-
*
5349
* <p>For more information about bucket policies, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html">Using Bucket Policies and User
5450
* Policies</a>.</p>
55-
*
5651
* <p>All Amazon S3 on Outposts REST API requests for this action require an additional parameter of <code>x-amz-outpost-id</code> to be passed with the request. In addition, you must use an S3 on Outposts endpoint hostname prefix instead of <code>s3-control</code>. For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and the <code>x-amz-outpost-id</code> derived by using the access point ARN, see the <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_PutBucketPolicy.html#API_control_PutBucketPolicy_Examples">Examples</a> section.</p>
57-
*
5852
* <p>The following actions are related to <code>PutBucketPolicy</code>:</p>
5953
* <ul>
6054
* <li>

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ export interface PutBucketTaggingCommandOutput extends __MetadataBearer {}
3939
* name, and then organize your billing information to see the total cost of that application
4040
* across several services. For more information, see <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html">Cost allocation and
4141
* tagging</a>.</p>
42-
*
4342
* <note>
4443
* <p>Within a bucket, if you add a tag that has the same key as an existing tag, the new
4544
* value overwrites the old value. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/CostAllocTagging.html"> Using cost allocation in Amazon S3
@@ -50,7 +49,6 @@ export interface PutBucketTaggingCommandOutput extends __MetadataBearer {}
5049
* permission by default and can grant this permission to others. For more information about
5150
* permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources"> Permissions Related to Bucket Subresource Operations</a> and <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html">Managing
5251
* access permissions to your Amazon S3 resources</a>.</p>
53-
*
5452
* <p>
5553
* <code>PutBucketTagging</code> has the following special errors:</p>
5654
* <ul>
@@ -98,7 +96,6 @@ export interface PutBucketTaggingCommandOutput extends __MetadataBearer {}
9896
* </li>
9997
* </ul>
10098
* <p>All Amazon S3 on Outposts REST API requests for this action require an additional parameter of <code>x-amz-outpost-id</code> to be passed with the request. In addition, you must use an S3 on Outposts endpoint hostname prefix instead of <code>s3-control</code>. For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and the <code>x-amz-outpost-id</code> derived by using the access point ARN, see the <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_PutBucketTagging.html#API_control_PutBucketTagging_Examples">Examples</a> section.</p>
101-
*
10299
* <p>The following actions are related to <code>PutBucketTagging</code>:</p>
103100
* <ul>
104101
* <li>

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ export class PutBucketVersioningCommand extends $Command<
108108

109109
public static getEndpointParameterInstructions(): EndpointParameterInstructions {
110110
return {
111+
RequiresAccountId: { type: "staticContextParams", value: true },
112+
AccountId: { type: "contextParams", name: "AccountId" },
113+
Bucket: { type: "contextParams", name: "Bucket" },
111114
UseArnRegion: { type: "clientContextParams", name: "useArnRegion" },
112115
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
113116
Endpoint: { type: "builtInParams", name: "endpoint" },

0 commit comments

Comments
 (0)