Skip to content

Commit dfc58ea

Browse files
author
awstools
committed
feat(client-datasync): AWS DataSync now supports a new ObjectTags Task API option that can be used to control whether Object Tags are transferred.
1 parent 92a5c30 commit dfc58ea

File tree

3 files changed

+46
-4
lines changed

3 files changed

+46
-4
lines changed

clients/client-datasync/src/models/models_0.ts

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ export class InvalidRequestException extends __BaseException {
104104
readonly name: "InvalidRequestException" = "InvalidRequestException";
105105
readonly $fault: "client" = "client";
106106
errorCode?: string;
107+
datasyncErrorCode?: string;
107108
/**
108109
* @internal
109110
*/
@@ -115,6 +116,7 @@ export class InvalidRequestException extends __BaseException {
115116
});
116117
Object.setPrototypeOf(this, InvalidRequestException.prototype);
117118
this.errorCode = opts.errorCode;
119+
this.datasyncErrorCode = opts.datasyncErrorCode;
118120
}
119121
}
120122

@@ -1328,6 +1330,11 @@ export enum Mtime {
13281330
PRESERVE = "PRESERVE",
13291331
}
13301332

1333+
export enum ObjectTags {
1334+
NONE = "NONE",
1335+
PRESERVE = "PRESERVE",
1336+
}
1337+
13311338
export enum OverwriteMode {
13321339
ALWAYS = "ALWAYS",
13331340
NEVER = "NEVER",
@@ -1403,7 +1410,7 @@ export interface Options {
14031410
* <p>POINT_IN_TIME_CONSISTENT: Scan the entire source and entire destination
14041411
* at the end of the transfer
14051412
* to verify that source and destination are fully
1406-
* synchronized. This option isn't supported when transferring to S3 Glacier or S3 Glacier Deep Archive storage classes.</p>
1413+
* synchronized. This option isn't supported when transferring to S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive storage classes.</p>
14071414
* <p>NONE: No additional verification is done at the end of the
14081415
* transfer, but all data transmissions are integrity-checked with
14091416
* checksum verification during the transfer.</p>
@@ -1443,7 +1450,8 @@ export interface Options {
14431450
* <p>A value that indicates the last time that a file was modified (that is, a file was
14441451
* written to) before the PREPARING phase. This option is required for cases when you need to run
14451452
* the same task more than one time. </p>
1446-
* <p>Default value: PRESERVE. </p>
1453+
* <p>Default Value: <code>PRESERVE</code>
1454+
* </p>
14471455
* <p>PRESERVE: Preserve original <code>Mtime</code> (recommended)</p>
14481456
* <p> NONE: Ignore <code>Mtime</code>. </p>
14491457
* <note>
@@ -1606,6 +1614,13 @@ export interface Options {
16061614
* </p>
16071615
*/
16081616
SecurityDescriptorCopyFlags?: SmbSecurityDescriptorCopyFlags | string;
1617+
1618+
/**
1619+
* <p>Specifies whether object tags are maintained when transferring between object storage systems. If you want your DataSync task to ignore object tags, specify the <code>NONE</code> value.</p>
1620+
* <p>Default Value: <code>PRESERVE</code>
1621+
* </p>
1622+
*/
1623+
ObjectTags?: ObjectTags | string;
16091624
}
16101625

16111626
export namespace Options {

clients/client-datasync/src/protocols/Aws_json1_1.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3268,6 +3268,7 @@ const serializeAws_json1_1Options = (input: Options, context: __SerdeContext): a
32683268
...(input.Gid !== undefined && input.Gid !== null && { Gid: input.Gid }),
32693269
...(input.LogLevel !== undefined && input.LogLevel !== null && { LogLevel: input.LogLevel }),
32703270
...(input.Mtime !== undefined && input.Mtime !== null && { Mtime: input.Mtime }),
3271+
...(input.ObjectTags !== undefined && input.ObjectTags !== null && { ObjectTags: input.ObjectTags }),
32713272
...(input.OverwriteMode !== undefined && input.OverwriteMode !== null && { OverwriteMode: input.OverwriteMode }),
32723273
...(input.PosixPermissions !== undefined &&
32733274
input.PosixPermissions !== null && { PosixPermissions: input.PosixPermissions }),
@@ -4069,6 +4070,7 @@ const deserializeAws_json1_1InvalidRequestException = (
40694070
context: __SerdeContext
40704071
): InvalidRequestException => {
40714072
return {
4073+
datasyncErrorCode: __expectString(output.datasyncErrorCode),
40724074
errorCode: __expectString(output.errorCode),
40734075
message: __expectString(output.message),
40744076
} as any;
@@ -4171,6 +4173,7 @@ const deserializeAws_json1_1Options = (output: any, context: __SerdeContext): Op
41714173
Gid: __expectString(output.Gid),
41724174
LogLevel: __expectString(output.LogLevel),
41734175
Mtime: __expectString(output.Mtime),
4176+
ObjectTags: __expectString(output.ObjectTags),
41744177
OverwriteMode: __expectString(output.OverwriteMode),
41754178
PosixPermissions: __expectString(output.PosixPermissions),
41764179
PreserveDeletedFiles: __expectString(output.PreserveDeletedFiles),

codegen/sdk-codegen/aws-models/datasync.json

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2863,6 +2863,9 @@
28632863
},
28642864
"errorCode": {
28652865
"target": "com.amazonaws.datasync#string"
2866+
},
2867+
"datasyncErrorCode": {
2868+
"target": "com.amazonaws.datasync#string"
28662869
}
28672870
},
28682871
"traits": {
@@ -3535,6 +3538,21 @@
35353538
]
35363539
}
35373540
},
3541+
"com.amazonaws.datasync#ObjectTags": {
3542+
"type": "string",
3543+
"traits": {
3544+
"smithy.api#enum": [
3545+
{
3546+
"value": "PRESERVE",
3547+
"name": "PRESERVE"
3548+
},
3549+
{
3550+
"value": "NONE",
3551+
"name": "NONE"
3552+
}
3553+
]
3554+
}
3555+
},
35383556
"com.amazonaws.datasync#OnPremConfig": {
35393557
"type": "structure",
35403558
"members": {
@@ -3603,7 +3621,7 @@
36033621
"VerifyMode": {
36043622
"target": "com.amazonaws.datasync#VerifyMode",
36053623
"traits": {
3606-
"smithy.api#documentation": "<p>A value that determines whether a data integrity verification should be performed at\n the end of a task execution after all data and metadata have been transferred. \n For more information, see \n <a href=\"https://docs.aws.amazon.com/datasync/latest/userguide/create-task.html\">Configure task settings</a>.\n </p>\n <p>Default value: POINT_IN_TIME_CONSISTENT.</p>\n <p>ONLY_FILES_TRANSFERRED (recommended): Perform verification only on files that were transferred.\n </p>\n \n <p>POINT_IN_TIME_CONSISTENT: Scan the entire source and entire destination \n at the end of the transfer \n to verify that source and destination are fully \n synchronized. This option isn't supported when transferring to S3 Glacier or S3 Glacier Deep Archive storage classes.</p>\n <p>NONE: No additional verification is done at the end of the \n transfer, but all data transmissions are integrity-checked with \n checksum verification during the transfer.</p>"
3624+
"smithy.api#documentation": "<p>A value that determines whether a data integrity verification should be performed at\n the end of a task execution after all data and metadata have been transferred. \n For more information, see \n <a href=\"https://docs.aws.amazon.com/datasync/latest/userguide/create-task.html\">Configure task settings</a>.\n </p>\n <p>Default value: POINT_IN_TIME_CONSISTENT.</p>\n <p>ONLY_FILES_TRANSFERRED (recommended): Perform verification only on files that were transferred.\n </p>\n \n <p>POINT_IN_TIME_CONSISTENT: Scan the entire source and entire destination \n at the end of the transfer \n to verify that source and destination are fully \n synchronized. This option isn't supported when transferring to S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive storage classes.</p>\n <p>NONE: No additional verification is done at the end of the \n transfer, but all data transmissions are integrity-checked with \n checksum verification during the transfer.</p>"
36073625
}
36083626
},
36093627
"OverwriteMode": {
@@ -3621,7 +3639,7 @@
36213639
"Mtime": {
36223640
"target": "com.amazonaws.datasync#Mtime",
36233641
"traits": {
3624-
"smithy.api#documentation": "<p>A value that indicates the last time that a file was modified (that is, a file was\n written to) before the PREPARING phase. This option is required for cases when you need to run\n the same task more than one time. </p>\n <p>Default value: PRESERVE. </p>\n <p>PRESERVE: Preserve original <code>Mtime</code> (recommended)</p>\n <p> NONE: Ignore <code>Mtime</code>. </p>\n <note>\n <p>If <code>Mtime</code> is set to PRESERVE, <code>Atime</code> must be set to\n BEST_EFFORT.</p>\n <p>If <code>Mtime</code> is set to NONE, <code>Atime</code> must also be set to NONE.\n </p>\n </note>"
3642+
"smithy.api#documentation": "<p>A value that indicates the last time that a file was modified (that is, a file was\n written to) before the PREPARING phase. This option is required for cases when you need to run\n the same task more than one time. </p>\n <p>Default Value: <code>PRESERVE</code>\n </p>\n <p>PRESERVE: Preserve original <code>Mtime</code> (recommended)</p>\n <p> NONE: Ignore <code>Mtime</code>. </p>\n <note>\n <p>If <code>Mtime</code> is set to PRESERVE, <code>Atime</code> must be set to\n BEST_EFFORT.</p>\n <p>If <code>Mtime</code> is set to NONE, <code>Atime</code> must also be set to NONE.\n </p>\n </note>"
36253643
}
36263644
},
36273645
"Uid": {
@@ -3683,6 +3701,12 @@
36833701
"traits": {
36843702
"smithy.api#documentation": "<p>A value that determines which components of the SMB security descriptor are copied from source\n to destination objects.\n </p>\n <p>This value is only used for transfers \n between SMB and Amazon FSx for Windows File Server locations, or between two Amazon FSx for Windows File\n Server locations. For more information about how \n DataSync handles metadata, see\n <a href=\"https://docs.aws.amazon.com/datasync/latest/userguide/special-files.html\">How DataSync Handles Metadata and Special Files</a>.\n </p>\n <p>Default value: OWNER_DACL.</p>\n\n <p>\n <b>OWNER_DACL</b>: For each copied object, DataSync copies the following metadata:</p>\n <ul>\n <li>\n <p>Object owner.</p>\n </li>\n <li>\n <p>NTFS discretionary access control lists (DACLs), which determine whether to \n grant access to an object.</p>\n </li>\n </ul>\n <p>When choosing this option, DataSync does NOT copy the NTFS system access control lists\n (SACLs), which are used by administrators to log attempts to access a secured object.</p>\n \n <p>\n <b>OWNER_DACL_SACL</b>: For each copied object, DataSync copies the following metadata:</p> \n <ul>\n <li>\n <p>Object owner.</p>\n </li>\n <li>\n <p>NTFS discretionary access control lists (DACLs), which determine whether to\n grant access to an object.</p>\n </li>\n <li>\n <p>NTFS system access control lists (SACLs), which are used by administrators \n to log attempts to access a secured object.</p>\n </li>\n </ul>\n <p>Copying SACLs requires granting additional permissions to the Windows user that DataSync\n uses to access your SMB location. For information about choosing a user that ensures\n sufficient permissions to files, folders, and metadata, see <a href=\"create-smb-location.html#SMBuser\">user</a>.</p>\n \n <p>\n <b>NONE</b>: None of the SMB security descriptor components\n are copied. Destination objects are owned by the user that was provided for accessing the \n destination location. DACLs and SACLs are set based on the destination server’s configuration.\n </p>"
36853703
}
3704+
},
3705+
"ObjectTags": {
3706+
"target": "com.amazonaws.datasync#ObjectTags",
3707+
"traits": {
3708+
"smithy.api#documentation": "<p>Specifies whether object tags are maintained when transferring between object storage systems. If you want your DataSync task to ignore object tags, specify the <code>NONE</code> value.</p>\n <p>Default Value: <code>PRESERVE</code>\n </p>"
3709+
}
36863710
}
36873711
},
36883712
"traits": {

0 commit comments

Comments
 (0)