From 46492e40fca532996b399b3955d81ab65e3d4300 Mon Sep 17 00:00:00 2001 From: Trivikram Kamat <16024985+trivikr@users.noreply.github.com> Date: Wed, 4 Sep 2024 09:07:23 -0700 Subject: [PATCH] docs(clients): update doc comments from codegen (#6434) --- .../src/commands/GetRunCommand.ts | 1 - .../src/commands/ListRunsCommand.ts | 1 - .../DescribeListenerAttributesCommand.ts | 11 +++ .../commands/DeleteObjectTaggingCommand.ts | 22 ++--- .../src/commands/GetObjectTaggingCommand.ts | 38 ++++---- .../src/commands/PutObjectCommand.ts | 96 +++++++++---------- 6 files changed, 89 insertions(+), 80 deletions(-) diff --git a/clients/client-device-farm/src/commands/GetRunCommand.ts b/clients/client-device-farm/src/commands/GetRunCommand.ts index 11b6e5007706d..eb2f750fa5288 100644 --- a/clients/client-device-farm/src/commands/GetRunCommand.ts +++ b/clients/client-device-farm/src/commands/GetRunCommand.ts @@ -176,7 +176,6 @@ export interface GetRunCommandOutput extends GetRunResult, __MetadataBearer {} * { * "run": { * "name": "My Test Run", - * "type": "BUILTIN_EXPLORER", * "arn": "arn:aws:devicefarm:us-west-2:123456789101:run:5e01a8c7-c861-4c0a-b1d5-5ec6e6c6dd23/0fcac17b-6122-44d7-ae5a-12345EXAMPLE", * "billingMethod": "METERED", * "completedJobs": 0, diff --git a/clients/client-device-farm/src/commands/ListRunsCommand.ts b/clients/client-device-farm/src/commands/ListRunsCommand.ts index 65c613fc78ea3..24e80124c8965 100644 --- a/clients/client-device-farm/src/commands/ListRunsCommand.ts +++ b/clients/client-device-farm/src/commands/ListRunsCommand.ts @@ -182,7 +182,6 @@ export interface ListRunsCommandOutput extends ListRunsResult, __MetadataBearer * "runs": [ * { * "name": "My Test Run", - * "type": "BUILTIN_EXPLORER", * "arn": "arn:aws:devicefarm:us-west-2:123456789101:run:5e01a8c7-c861-4c0a-b1d5-5ec6e6c6dd23/0fcac17b-6122-44d7-ae5a-12345EXAMPLE", * "billingMethod": "METERED", * "completedJobs": 0, diff --git a/clients/client-elastic-load-balancing-v2/src/commands/DescribeListenerAttributesCommand.ts b/clients/client-elastic-load-balancing-v2/src/commands/DescribeListenerAttributesCommand.ts index 0d165897dfc93..85549f06b1197 100644 --- a/clients/client-elastic-load-balancing-v2/src/commands/DescribeListenerAttributesCommand.ts +++ b/clients/client-elastic-load-balancing-v2/src/commands/DescribeListenerAttributesCommand.ts @@ -68,6 +68,17 @@ export interface DescribeListenerAttributesCommandOutput extends DescribeListene *

Base exception class for all service exceptions from ElasticLoadBalancingV2 service.

* * @public + * @example Describe listener attributes + * ```javascript + * // This example describes the attributes of the specified listener. + * const input = { + * "ListenerArn": "aws:elasticloadbalancing:us-east-1:123456789012:listener/net/my-listener/73e2d6bc24d8a067/d5dc06411fa5bcea" + * }; + * const command = new DescribeListenerAttributesCommand(input); + * await client.send(command); + * // example id: describe-listener-attributes-1724874395194 + * ``` + * */ export class DescribeListenerAttributesCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/DeleteObjectTaggingCommand.ts b/clients/client-s3/src/commands/DeleteObjectTaggingCommand.ts index 4aecca42dc0f9..5d588aa5d2664 100644 --- a/clients/client-s3/src/commands/DeleteObjectTaggingCommand.ts +++ b/clients/client-s3/src/commands/DeleteObjectTaggingCommand.ts @@ -82,39 +82,39 @@ export interface DeleteObjectTaggingCommandOutput extends DeleteObjectTaggingOut *

Base exception class for all service exceptions from S3 service.

* * @public - * @example To remove tag set from an object + * @example To remove tag set from an object version * ```javascript - * // The following example removes tag set associated with the specified object. If the bucket is versioning enabled, the operation removes tag set from the latest object version. + * // The following example removes tag set associated with the specified object version. The request specifies both the object key and object version. * const input = { * "Bucket": "examplebucket", - * "Key": "HappyFace.jpg" + * "Key": "HappyFace.jpg", + * "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI" * }; * const command = new DeleteObjectTaggingCommand(input); * const response = await client.send(command); * /* response == * { - * "VersionId": "null" + * "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI" * } * *\/ - * // example id: to-remove-tag-set-from-an-object-1483145342862 + * // example id: to-remove-tag-set-from-an-object-version-1483145285913 * ``` * - * @example To remove tag set from an object version + * @example To remove tag set from an object * ```javascript - * // The following example removes tag set associated with the specified object version. The request specifies both the object key and object version. + * // The following example removes tag set associated with the specified object. If the bucket is versioning enabled, the operation removes tag set from the latest object version. * const input = { * "Bucket": "examplebucket", - * "Key": "HappyFace.jpg", - * "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI" + * "Key": "HappyFace.jpg" * }; * const command = new DeleteObjectTaggingCommand(input); * const response = await client.send(command); * /* response == * { - * "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI" + * "VersionId": "null" * } * *\/ - * // example id: to-remove-tag-set-from-an-object-version-1483145285913 + * // example id: to-remove-tag-set-from-an-object-1483145342862 * ``` * */ diff --git a/clients/client-s3/src/commands/GetObjectTaggingCommand.ts b/clients/client-s3/src/commands/GetObjectTaggingCommand.ts index ef198b10d2afa..ea7e3bf92b74c 100644 --- a/clients/client-s3/src/commands/GetObjectTaggingCommand.ts +++ b/clients/client-s3/src/commands/GetObjectTaggingCommand.ts @@ -98,13 +98,12 @@ export interface GetObjectTaggingCommandOutput extends GetObjectTaggingOutput, _ *

Base exception class for all service exceptions from S3 service.

* * @public - * @example To retrieve tag set of a specific object version + * @example To retrieve tag set of an object * ```javascript - * // The following example retrieves tag set of an object. The request specifies object version. + * // The following example retrieves tag set of an object. * const input = { * "Bucket": "examplebucket", - * "Key": "exampleobject", - * "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI" + * "Key": "HappyFace.jpg" * }; * const command = new GetObjectTaggingCommand(input); * const response = await client.send(command); @@ -112,22 +111,27 @@ export interface GetObjectTaggingCommandOutput extends GetObjectTaggingOutput, _ * { * "TagSet": [ * { - * "Key": "Key1", - * "Value": "Value1" + * "Key": "Key4", + * "Value": "Value4" + * }, + * { + * "Key": "Key3", + * "Value": "Value3" * } * ], - * "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI" + * "VersionId": "null" * } * *\/ - * // example id: to-retrieve-tag-set-of-a-specific-object-version-1483400283663 + * // example id: to-retrieve-tag-set-of-an-object-1481833847896 * ``` * - * @example To retrieve tag set of an object + * @example To retrieve tag set of a specific object version * ```javascript - * // The following example retrieves tag set of an object. + * // The following example retrieves tag set of an object. The request specifies object version. * const input = { * "Bucket": "examplebucket", - * "Key": "HappyFace.jpg" + * "Key": "exampleobject", + * "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI" * }; * const command = new GetObjectTaggingCommand(input); * const response = await client.send(command); @@ -135,18 +139,14 @@ export interface GetObjectTaggingCommandOutput extends GetObjectTaggingOutput, _ * { * "TagSet": [ * { - * "Key": "Key4", - * "Value": "Value4" - * }, - * { - * "Key": "Key3", - * "Value": "Value3" + * "Key": "Key1", + * "Value": "Value1" * } * ], - * "VersionId": "null" + * "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI" * } * *\/ - * // example id: to-retrieve-tag-set-of-an-object-1481833847896 + * // example id: to-retrieve-tag-set-of-a-specific-object-version-1483400283663 * ``` * */ diff --git a/clients/client-s3/src/commands/PutObjectCommand.ts b/clients/client-s3/src/commands/PutObjectCommand.ts index 17dede643bee6..aa5e6f241fe5b 100644 --- a/clients/client-s3/src/commands/PutObjectCommand.ts +++ b/clients/client-s3/src/commands/PutObjectCommand.ts @@ -246,6 +246,28 @@ export interface PutObjectCommandOutput extends PutObjectOutput, __MetadataBeare *

Base exception class for all service exceptions from S3 service.

* * @public + * @example To upload an object (specify optional headers) + * ```javascript + * // The following example uploads an object. The request specifies optional request headers to directs S3 to use specific storage class and use server-side encryption. + * const input = { + * "Body": "HappyFace.jpg", + * "Bucket": "examplebucket", + * "Key": "HappyFace.jpg", + * "ServerSideEncryption": "AES256", + * "StorageClass": "STANDARD_IA" + * }; + * const command = new PutObjectCommand(input); + * const response = await client.send(command); + * /* response == + * { + * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", + * "ServerSideEncryption": "AES256", + * "VersionId": "CG612hodqujkf8FaaNfp8U..FIhLROcp" + * } + * *\/ + * // example id: to-upload-an-object-(specify-optional-headers) + * ``` + * * @example To create an object. * ```javascript * // The following example creates an object. If the bucket is versioning enabled, S3 returns version ID in response. @@ -265,68 +287,63 @@ export interface PutObjectCommandOutput extends PutObjectOutput, __MetadataBeare * // example id: to-create-an-object-1483147613675 * ``` * - * @example To upload an object (specify optional headers) + * @example To upload an object * ```javascript - * // The following example uploads an object. The request specifies optional request headers to directs S3 to use specific storage class and use server-side encryption. + * // The following example uploads an object to a versioning-enabled bucket. The source file is specified using Windows file syntax. S3 returns VersionId of the newly created object. * const input = { * "Body": "HappyFace.jpg", * "Bucket": "examplebucket", - * "Key": "HappyFace.jpg", - * "ServerSideEncryption": "AES256", - * "StorageClass": "STANDARD_IA" + * "Key": "HappyFace.jpg" * }; * const command = new PutObjectCommand(input); * const response = await client.send(command); * /* response == * { * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", - * "ServerSideEncryption": "AES256", - * "VersionId": "CG612hodqujkf8FaaNfp8U..FIhLROcp" + * "VersionId": "tpf3zF08nBplQK1XLOefGskR7mGDwcDk" * } * *\/ - * // example id: to-upload-an-object-(specify-optional-headers) + * // example id: to-upload-an-object-1481760101010 * ``` * - * @example To upload an object and specify canned ACL. + * @example To upload an object and specify optional tags * ```javascript - * // The following example uploads and object. The request specifies optional canned ACL (access control list) to all READ access to authenticated users. If the bucket is versioning enabled, S3 returns version ID in response. + * // The following example uploads an object. The request specifies optional object tags. The bucket is versioned, therefore S3 returns version ID of the newly created object. * const input = { - * "ACL": "authenticated-read", - * "Body": "filetoupload", + * "Body": "c:\\HappyFace.jpg", * "Bucket": "examplebucket", - * "Key": "exampleobject" + * "Key": "HappyFace.jpg", + * "Tagging": "key1=value1&key2=value2" * }; * const command = new PutObjectCommand(input); * const response = await client.send(command); * /* response == * { * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", - * "VersionId": "Kirh.unyZwjQ69YxcQLA8z4F5j3kJJKr" + * "VersionId": "psM2sYY4.o1501dSx8wMvnkOzSBB.V4a" * } * *\/ - * // example id: to-upload-an-object-and-specify-canned-acl-1483397779571 + * // example id: to-upload-an-object-and-specify-optional-tags-1481762310955 * ``` * - * @example To upload an object and specify server-side encryption and object tags + * @example To upload an object and specify canned ACL. * ```javascript - * // The following example uploads an object. The request specifies the optional server-side encryption option. The request also specifies optional object tags. If the bucket is versioning enabled, S3 returns version ID in response. + * // The following example uploads and object. The request specifies optional canned ACL (access control list) to all READ access to authenticated users. If the bucket is versioning enabled, S3 returns version ID in response. * const input = { + * "ACL": "authenticated-read", * "Body": "filetoupload", * "Bucket": "examplebucket", - * "Key": "exampleobject", - * "ServerSideEncryption": "AES256", - * "Tagging": "key1=value1&key2=value2" + * "Key": "exampleobject" * }; * const command = new PutObjectCommand(input); * const response = await client.send(command); * /* response == * { * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", - * "ServerSideEncryption": "AES256", - * "VersionId": "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt" + * "VersionId": "Kirh.unyZwjQ69YxcQLA8z4F5j3kJJKr" * } * *\/ - * // example id: to-upload-an-object-and-specify-server-side-encryption-and-object-tags-1483398331831 + * // example id: to-upload-an-object-and-specify-canned-acl-1483397779571 * ``` * * @example To upload object and specify user-defined metadata @@ -352,32 +369,14 @@ export interface PutObjectCommandOutput extends PutObjectOutput, __MetadataBeare * // example id: to-upload-object-and-specify-user-defined-metadata-1483396974757 * ``` * - * @example To upload an object - * ```javascript - * // The following example uploads an object to a versioning-enabled bucket. The source file is specified using Windows file syntax. S3 returns VersionId of the newly created object. - * const input = { - * "Body": "HappyFace.jpg", - * "Bucket": "examplebucket", - * "Key": "HappyFace.jpg" - * }; - * const command = new PutObjectCommand(input); - * const response = await client.send(command); - * /* response == - * { - * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", - * "VersionId": "tpf3zF08nBplQK1XLOefGskR7mGDwcDk" - * } - * *\/ - * // example id: to-upload-an-object-1481760101010 - * ``` - * - * @example To upload an object and specify optional tags + * @example To upload an object and specify server-side encryption and object tags * ```javascript - * // The following example uploads an object. The request specifies optional object tags. The bucket is versioned, therefore S3 returns version ID of the newly created object. + * // The following example uploads an object. The request specifies the optional server-side encryption option. The request also specifies optional object tags. If the bucket is versioning enabled, S3 returns version ID in response. * const input = { - * "Body": "c:\\HappyFace.jpg", + * "Body": "filetoupload", * "Bucket": "examplebucket", - * "Key": "HappyFace.jpg", + * "Key": "exampleobject", + * "ServerSideEncryption": "AES256", * "Tagging": "key1=value1&key2=value2" * }; * const command = new PutObjectCommand(input); @@ -385,10 +384,11 @@ export interface PutObjectCommandOutput extends PutObjectOutput, __MetadataBeare * /* response == * { * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", - * "VersionId": "psM2sYY4.o1501dSx8wMvnkOzSBB.V4a" + * "ServerSideEncryption": "AES256", + * "VersionId": "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt" * } * *\/ - * // example id: to-upload-an-object-and-specify-optional-tags-1481762310955 + * // example id: to-upload-an-object-and-specify-server-side-encryption-and-object-tags-1483398331831 * ``` * */