Skip to content

Commit b3f21a5

Browse files
author
AWS
committed
Amazon Simple Storage Service Update: Added new params copySource and key to copyObject API for supporting S3 Access Grants plugin. These changes will not change any of the existing S3 API functionality.
1 parent 6c5eed5 commit b3f21a5

File tree

4 files changed

+40
-0
lines changed

4 files changed

+40
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"type": "feature",
3+
"category": "Amazon Simple Storage Service",
4+
"contributor": "",
5+
"description": "Added new params copySource and key to copyObject API for supporting S3 Access Grants plugin. These changes will not change any of the existing S3 API functionality."
6+
}

services/s3/src/main/resources/codegen-resources/endpoint-rule-set.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@
6868
"documentation": "The S3 Prefix used to send the request. This is an optional parameter that will be set automatically for operations that are scoped to an S3 Prefix.",
6969
"type": "String"
7070
},
71+
"CopySource": {
72+
"required": false,
73+
"documentation": "The Copy Source used for Copy Object request. This is an optional parameter that will be set automatically for operations that are scoped to Copy Source.",
74+
"type": "String"
75+
},
7176
"DisableAccessPoints": {
7277
"required": false,
7378
"documentation": "Internal parameter to disable Access Point Buckets",

services/s3/src/main/resources/codegen-resources/endpoint-tests.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1793,6 +1793,33 @@
17931793
"Key": "key"
17941794
}
17951795
},
1796+
{
1797+
"documentation": "virtual addressing, aws-global region with Copy Source, and Key uses the global endpoint. Copy Source and Key parameters should not be used in endpoint evaluation.",
1798+
"expect": {
1799+
"endpoint": {
1800+
"properties": {
1801+
"authSchemes": [
1802+
{
1803+
"name": "sigv4",
1804+
"signingName": "s3",
1805+
"signingRegion": "us-east-1",
1806+
"disableDoubleEncoding": true
1807+
}
1808+
]
1809+
},
1810+
"url": "https://bucket-name.s3.amazonaws.com"
1811+
}
1812+
},
1813+
"params": {
1814+
"Region": "aws-global",
1815+
"Bucket": "bucket-name",
1816+
"UseFIPS": false,
1817+
"UseDualStack": false,
1818+
"Accelerate": false,
1819+
"CopySource": "/copy/source",
1820+
"Key": "key"
1821+
}
1822+
},
17961823
{
17971824
"documentation": "virtual addressing, aws-global region with fips uses the regional fips endpoint",
17981825
"expect": {

services/s3/src/main/resources/codegen-resources/service-2.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2384,6 +2384,7 @@
23842384
"CopySource":{
23852385
"shape":"CopySource",
23862386
"documentation":"<p>Specifies the source object for the copy operation. The source object can be up to 5 GB. If the source object is an object that was uploaded by using a multipart upload, the object copy will be a single part object after the source object is copied to the destination bucket.</p> <p>You specify the value of the copy source in one of two formats, depending on whether you want to access the source object through an <a href=\"https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html\">access point</a>:</p> <ul> <li> <p>For objects not accessed through an access point, specify the name of the source bucket and the key of the source object, separated by a slash (/). For example, to copy the object <code>reports/january.pdf</code> from the general purpose bucket <code>awsexamplebucket</code>, use <code>awsexamplebucket/reports/january.pdf</code>. The value must be URL-encoded. To copy the object <code>reports/january.pdf</code> from the directory bucket <code>awsexamplebucket--use1-az5--x-s3</code>, use <code>awsexamplebucket--use1-az5--x-s3/reports/january.pdf</code>. The value must be URL-encoded.</p> </li> <li> <p>For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format <code>arn:aws:s3:&lt;Region&gt;:&lt;account-id&gt;:accesspoint/&lt;access-point-name&gt;/object/&lt;key&gt;</code>. For example, to copy the object <code>reports/january.pdf</code> through access point <code>my-access-point</code> owned by account <code>123456789012</code> in Region <code>us-west-2</code>, use the URL encoding of <code>arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf</code>. The value must be URL encoded.</p> <note> <ul> <li> <p>Amazon S3 supports copy operations using Access points only when the source and destination buckets are in the same Amazon Web Services Region.</p> </li> <li> <p>Access points are not supported by directory buckets.</p> </li> </ul> </note> <p>Alternatively, for objects accessed through Amazon S3 on Outposts, specify the ARN of the object as accessed in the format <code>arn:aws:s3-outposts:&lt;Region&gt;:&lt;account-id&gt;:outpost/&lt;outpost-id&gt;/object/&lt;key&gt;</code>. For example, to copy the object <code>reports/january.pdf</code> through outpost <code>my-outpost</code> owned by account <code>123456789012</code> in Region <code>us-west-2</code>, use the URL encoding of <code>arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf</code>. The value must be URL-encoded. </p> </li> </ul> <p>If your source bucket versioning is enabled, the <code>x-amz-copy-source</code> header by default identifies the current version of an object to copy. If the current version is a delete marker, Amazon S3 behaves as if the object was deleted. To copy a different version, use the <code>versionId</code> query parameter. Specifically, append <code>?versionId=&lt;version-id&gt;</code> to the value (for example, <code>awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893</code>). If you don't specify a version ID, Amazon S3 copies the latest version of the source object.</p> <p>If you enable versioning on the destination bucket, Amazon S3 generates a unique version ID for the copied object. This version ID is different from the version ID of the source object. Amazon S3 returns the version ID of the copied object in the <code>x-amz-version-id</code> response header in the response.</p> <p>If you do not enable versioning or suspend it on the destination bucket, the version ID that Amazon S3 generates in the <code>x-amz-version-id</code> response header is always null.</p> <note> <p> <b>Directory buckets</b> - S3 Versioning isn't enabled and supported for directory buckets.</p> </note>",
2387+
"contextParam":{"name":"CopySource"},
23872388
"location":"header",
23882389
"locationName":"x-amz-copy-source"
23892390
},
@@ -2444,6 +2445,7 @@
24442445
"Key":{
24452446
"shape":"ObjectKey",
24462447
"documentation":"<p>The key of the destination object.</p>",
2448+
"contextParam":{"name":"Key"},
24472449
"location":"uri",
24482450
"locationName":"Key"
24492451
},

0 commit comments

Comments
 (0)