From dfc58ea4732b78fb464876a05439123ae69bce20 Mon Sep 17 00:00:00 2001 From: awstools Date: Thu, 5 May 2022 18:44:13 +0000 Subject: [PATCH] feat(client-datasync): AWS DataSync now supports a new ObjectTags Task API option that can be used to control whether Object Tags are transferred. --- .../client-datasync/src/models/models_0.ts | 19 +++++++++++-- .../src/protocols/Aws_json1_1.ts | 3 ++ codegen/sdk-codegen/aws-models/datasync.json | 28 +++++++++++++++++-- 3 files changed, 46 insertions(+), 4 deletions(-) diff --git a/clients/client-datasync/src/models/models_0.ts b/clients/client-datasync/src/models/models_0.ts index d64dee82daa0..60e5c0606738 100644 --- a/clients/client-datasync/src/models/models_0.ts +++ b/clients/client-datasync/src/models/models_0.ts @@ -104,6 +104,7 @@ export class InvalidRequestException extends __BaseException { readonly name: "InvalidRequestException" = "InvalidRequestException"; readonly $fault: "client" = "client"; errorCode?: string; + datasyncErrorCode?: string; /** * @internal */ @@ -115,6 +116,7 @@ export class InvalidRequestException extends __BaseException { }); Object.setPrototypeOf(this, InvalidRequestException.prototype); this.errorCode = opts.errorCode; + this.datasyncErrorCode = opts.datasyncErrorCode; } } @@ -1328,6 +1330,11 @@ export enum Mtime { PRESERVE = "PRESERVE", } +export enum ObjectTags { + NONE = "NONE", + PRESERVE = "PRESERVE", +} + export enum OverwriteMode { ALWAYS = "ALWAYS", NEVER = "NEVER", @@ -1403,7 +1410,7 @@ export interface Options { *

POINT_IN_TIME_CONSISTENT: Scan the entire source and entire destination * at the end of the transfer * to verify that source and destination are fully - * synchronized. This option isn't supported when transferring to S3 Glacier or S3 Glacier Deep Archive storage classes.

+ * synchronized. This option isn't supported when transferring to S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive storage classes.

*

NONE: No additional verification is done at the end of the * transfer, but all data transmissions are integrity-checked with * checksum verification during the transfer.

@@ -1443,7 +1450,8 @@ export interface Options { *

A value that indicates the last time that a file was modified (that is, a file was * written to) before the PREPARING phase. This option is required for cases when you need to run * the same task more than one time.

- *

Default value: PRESERVE.

+ *

Default Value: PRESERVE + *

*

PRESERVE: Preserve original Mtime (recommended)

*

NONE: Ignore Mtime.

* @@ -1606,6 +1614,13 @@ export interface Options { *

*/ SecurityDescriptorCopyFlags?: SmbSecurityDescriptorCopyFlags | string; + + /** + *

Specifies whether object tags are maintained when transferring between object storage systems. If you want your DataSync task to ignore object tags, specify the NONE value.

+ *

Default Value: PRESERVE + *

+ */ + ObjectTags?: ObjectTags | string; } export namespace Options { diff --git a/clients/client-datasync/src/protocols/Aws_json1_1.ts b/clients/client-datasync/src/protocols/Aws_json1_1.ts index c93d3254fa87..45801e9a1bfc 100644 --- a/clients/client-datasync/src/protocols/Aws_json1_1.ts +++ b/clients/client-datasync/src/protocols/Aws_json1_1.ts @@ -3268,6 +3268,7 @@ const serializeAws_json1_1Options = (input: Options, context: __SerdeContext): a ...(input.Gid !== undefined && input.Gid !== null && { Gid: input.Gid }), ...(input.LogLevel !== undefined && input.LogLevel !== null && { LogLevel: input.LogLevel }), ...(input.Mtime !== undefined && input.Mtime !== null && { Mtime: input.Mtime }), + ...(input.ObjectTags !== undefined && input.ObjectTags !== null && { ObjectTags: input.ObjectTags }), ...(input.OverwriteMode !== undefined && input.OverwriteMode !== null && { OverwriteMode: input.OverwriteMode }), ...(input.PosixPermissions !== undefined && input.PosixPermissions !== null && { PosixPermissions: input.PosixPermissions }), @@ -4069,6 +4070,7 @@ const deserializeAws_json1_1InvalidRequestException = ( context: __SerdeContext ): InvalidRequestException => { return { + datasyncErrorCode: __expectString(output.datasyncErrorCode), errorCode: __expectString(output.errorCode), message: __expectString(output.message), } as any; @@ -4171,6 +4173,7 @@ const deserializeAws_json1_1Options = (output: any, context: __SerdeContext): Op Gid: __expectString(output.Gid), LogLevel: __expectString(output.LogLevel), Mtime: __expectString(output.Mtime), + ObjectTags: __expectString(output.ObjectTags), OverwriteMode: __expectString(output.OverwriteMode), PosixPermissions: __expectString(output.PosixPermissions), PreserveDeletedFiles: __expectString(output.PreserveDeletedFiles), diff --git a/codegen/sdk-codegen/aws-models/datasync.json b/codegen/sdk-codegen/aws-models/datasync.json index 2e37d8f6907a..15d5ef4a146a 100644 --- a/codegen/sdk-codegen/aws-models/datasync.json +++ b/codegen/sdk-codegen/aws-models/datasync.json @@ -2863,6 +2863,9 @@ }, "errorCode": { "target": "com.amazonaws.datasync#string" + }, + "datasyncErrorCode": { + "target": "com.amazonaws.datasync#string" } }, "traits": { @@ -3535,6 +3538,21 @@ ] } }, + "com.amazonaws.datasync#ObjectTags": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "PRESERVE", + "name": "PRESERVE" + }, + { + "value": "NONE", + "name": "NONE" + } + ] + } + }, "com.amazonaws.datasync#OnPremConfig": { "type": "structure", "members": { @@ -3603,7 +3621,7 @@ "VerifyMode": { "target": "com.amazonaws.datasync#VerifyMode", "traits": { - "smithy.api#documentation": "

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 Configure task settings.\n

\n

Default value: POINT_IN_TIME_CONSISTENT.

\n

ONLY_FILES_TRANSFERRED (recommended): Perform verification only on files that were transferred.\n

\n \n

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.

\n

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.

" + "smithy.api#documentation": "

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 Configure task settings.\n

\n

Default value: POINT_IN_TIME_CONSISTENT.

\n

ONLY_FILES_TRANSFERRED (recommended): Perform verification only on files that were transferred.\n

\n \n

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.

\n

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.

" } }, "OverwriteMode": { @@ -3621,7 +3639,7 @@ "Mtime": { "target": "com.amazonaws.datasync#Mtime", "traits": { - "smithy.api#documentation": "

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.

\n

Default value: PRESERVE.

\n

PRESERVE: Preserve original Mtime (recommended)

\n

NONE: Ignore Mtime.

\n \n

If Mtime is set to PRESERVE, Atime must be set to\n BEST_EFFORT.

\n

If Mtime is set to NONE, Atime must also be set to NONE.\n

\n
" + "smithy.api#documentation": "

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.

\n

Default Value: PRESERVE\n

\n

PRESERVE: Preserve original Mtime (recommended)

\n

NONE: Ignore Mtime.

\n \n

If Mtime is set to PRESERVE, Atime must be set to\n BEST_EFFORT.

\n

If Mtime is set to NONE, Atime must also be set to NONE.\n

\n
" } }, "Uid": { @@ -3683,6 +3701,12 @@ "traits": { "smithy.api#documentation": "

A value that determines which components of the SMB security descriptor are copied from source\n to destination objects.\n

\n

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 How DataSync Handles Metadata and Special Files.\n

\n

Default value: OWNER_DACL.

\n\n

\n OWNER_DACL: For each copied object, DataSync copies the following metadata:

\n \n

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.

\n \n

\n OWNER_DACL_SACL: For each copied object, DataSync copies the following metadata:

\n \n

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 user.

\n \n

\n NONE: 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

" } + }, + "ObjectTags": { + "target": "com.amazonaws.datasync#ObjectTags", + "traits": { + "smithy.api#documentation": "

Specifies whether object tags are maintained when transferring between object storage systems. If you want your DataSync task to ignore object tags, specify the NONE value.

\n

Default Value: PRESERVE\n

" + } } }, "traits": {