diff --git a/clients/client-s3/src/commands/AbortMultipartUploadCommand.ts b/clients/client-s3/src/commands/AbortMultipartUploadCommand.ts index 4b7f603bf086..7d871c7bff7e 100644 --- a/clients/client-s3/src/commands/AbortMultipartUploadCommand.ts +++ b/clients/client-s3/src/commands/AbortMultipartUploadCommand.ts @@ -132,20 +132,23 @@ export interface AbortMultipartUploadCommandOutput extends AbortMultipartUploadO * @throws {@link S3ServiceException} *
Base exception class for all service exceptions from S3 service.
* - * @public + * * @example To abort a multipart upload * ```javascript - * // The following example aborts a multipart upload. + * /* The following example aborts a multipart upload. *\/ * const input = { - * "Bucket": "examplebucket", - * "Key": "bigobject", - * "UploadId": "xadcOB_7YPBOJuoFiQ9cz4P3Pe6FIZwO4f7wN93uHsNBEw97pl5eNwzExg0LAT2dUN91cOmrEQHDsP3WA60CEg--" + * Bucket: "examplebucket", + * Key: "bigobject", + * UploadId: "xadcOB_7YPBOJuoFiQ9cz4P3Pe6FIZwO4f7wN93uHsNBEw97pl5eNwzExg0LAT2dUN91cOmrEQHDsP3WA60CEg--" * }; * const command = new AbortMultipartUploadCommand(input); - * await client.send(command); - * // example id: to-abort-a-multipart-upload-1481853354987 + * const response = await client.send(command); + * /* response is + * { /* empty *\/ } + * *\/ * ``` * + * @public */ export class AbortMultipartUploadCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/CompleteMultipartUploadCommand.ts b/clients/client-s3/src/commands/CompleteMultipartUploadCommand.ts index dd12554f6656..92676f54e113 100644 --- a/clients/client-s3/src/commands/CompleteMultipartUploadCommand.ts +++ b/clients/client-s3/src/commands/CompleteMultipartUploadCommand.ts @@ -252,40 +252,8 @@ export interface CompleteMultipartUploadCommandOutput extends CompleteMultipartU * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* - * @public - * @example To complete multipart upload - * ```javascript - * // The following example completes a multipart upload. - * const input = { - * "Bucket": "examplebucket", - * "Key": "bigobject", - * "MultipartUpload": { - * "Parts": [ - * { - * "ETag": "\"d8c2eafd90c266e19ab9dcacc479f8af\"", - * "PartNumber": "1" - * }, - * { - * "ETag": "\"d8c2eafd90c266e19ab9dcacc479f8af\"", - * "PartNumber": "2" - * } - * ] - * }, - * "UploadId": "7YPBOJuoFiQ9cz4P3Pe6FIZwO4f7wN93uHsNBEw97pl5eNwzExg0LAT2dUN91cOmrEQHDsP3WA60CEg--" - * }; - * const command = new CompleteMultipartUploadCommand(input); - * const response = await client.send(command); - * /* response == - * { - * "Bucket": "acexamplebucket", - * "ETag": "\"4d9031c7644d8081c2829f4ea23c55f7-2\"", - * "Key": "bigobject", - * "Location": "https://examplebucket.s3.Base exception class for all service exceptions from S3 service.
* - * @public + * * @example To copy an object * ```javascript - * // The following example copies an object from one bucket to another. + * /* The following example copies an object from one bucket to another. *\/ * const input = { - * "Bucket": "destinationbucket", - * "CopySource": "/sourcebucket/HappyFacejpg", - * "Key": "HappyFaceCopyjpg" + * Bucket: "destinationbucket", + * CopySource: "/sourcebucket/HappyFacejpg", + * Key: "HappyFaceCopyjpg" * }; * const command = new CopyObjectCommand(input); * const response = await client.send(command); - * /* response == + * /* response is * { - * "CopyObjectResult": { - * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", - * "LastModified": "2016-12-15T17:38:53.000Z" + * CopyObjectResult: { + * ETag: ""6805f2cfc46c0f04559748bb039d69ae"", + * LastModified: "2016-12-15T17:38:53.000Z" * } * } * *\/ - * // example id: to-copy-an-object-1481823186878 * ``` * + * @public */ export class CopyObjectCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/CreateBucketCommand.ts b/clients/client-s3/src/commands/CreateBucketCommand.ts index c462775fd666..68863d0748ae 100644 --- a/clients/client-s3/src/commands/CreateBucketCommand.ts +++ b/clients/client-s3/src/commands/CreateBucketCommand.ts @@ -217,42 +217,41 @@ export interface CreateBucketCommandOutput extends CreateBucketOutput, __Metadat * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* - * @public + * * @example To create a bucket * ```javascript - * // The following example creates a bucket. + * /* The following example creates a bucket. *\/ * const input = { - * "Bucket": "examplebucket" + * Bucket: "examplebucket" * }; * const command = new CreateBucketCommand(input); * const response = await client.send(command); - * /* response == + * /* response is * { - * "Location": "/examplebucket" + * Location: "/examplebucket" * } * *\/ - * // example id: to-create-a-bucket--1472851826060 * ``` * * @example To create a bucket in a specific region * ```javascript - * // The following example creates a bucket. The request specifies an AWS region where to create the bucket. + * /* The following example creates a bucket. The request specifies an AWS region where to create the bucket. *\/ * const input = { - * "Bucket": "examplebucket", - * "CreateBucketConfiguration": { - * "LocationConstraint": "eu-west-1" + * Bucket: "examplebucket", + * CreateBucketConfiguration: { + * LocationConstraint: "eu-west-1" * } * }; * const command = new CreateBucketCommand(input); * const response = await client.send(command); - * /* response == + * /* response is * { - * "Location": "http://examplebucket.Base exception class for all service exceptions from S3 service.
* - * @public + * * @example To initiate a multipart upload * ```javascript - * // The following example initiates a multipart upload. + * /* The following example initiates a multipart upload. *\/ * const input = { - * "Bucket": "examplebucket", - * "Key": "largeobject" + * Bucket: "examplebucket", + * Key: "largeobject" * }; * const command = new CreateMultipartUploadCommand(input); * const response = await client.send(command); - * /* response == + * /* response is * { - * "Bucket": "examplebucket", - * "Key": "largeobject", - * "UploadId": "ibZBv_75gd9r8lH_gqXatLdxMVpAlj6ZQjEs.OwyF3953YdwbcQnMA2BLGn8Lx12fQNICtMw5KyteFeHw.Sjng--" + * Bucket: "examplebucket", + * Key: "largeobject", + * UploadId: "ibZBv_75gd9r8lH_gqXatLdxMVpAlj6ZQjEs.OwyF3953YdwbcQnMA2BLGn8Lx12fQNICtMw5KyteFeHw.Sjng--" * } * *\/ - * // example id: to-initiate-a-multipart-upload-1481836794513 * ``` * + * @public */ export class CreateMultipartUploadCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/CreateSessionCommand.ts b/clients/client-s3/src/commands/CreateSessionCommand.ts index 1421553c52f5..8ddfda5671c6 100644 --- a/clients/client-s3/src/commands/CreateSessionCommand.ts +++ b/clients/client-s3/src/commands/CreateSessionCommand.ts @@ -127,6 +127,7 @@ export interface CreateSessionCommandOutput extends CreateSessionOutput, __Metad * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* + * * @public */ export class CreateSessionCommand extends $Command diff --git a/clients/client-s3/src/commands/DeleteBucketAnalyticsConfigurationCommand.ts b/clients/client-s3/src/commands/DeleteBucketAnalyticsConfigurationCommand.ts index 56b32ffae1eb..cdb0e63d3f8b 100644 --- a/clients/client-s3/src/commands/DeleteBucketAnalyticsConfigurationCommand.ts +++ b/clients/client-s3/src/commands/DeleteBucketAnalyticsConfigurationCommand.ts @@ -88,6 +88,7 @@ export interface DeleteBucketAnalyticsConfigurationCommandOutput extends __Metad * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* + * * @public */ export class DeleteBucketAnalyticsConfigurationCommand extends $Command diff --git a/clients/client-s3/src/commands/DeleteBucketCommand.ts b/clients/client-s3/src/commands/DeleteBucketCommand.ts index fcd46b21a1e3..9e33a565bebb 100644 --- a/clients/client-s3/src/commands/DeleteBucketCommand.ts +++ b/clients/client-s3/src/commands/DeleteBucketCommand.ts @@ -103,18 +103,21 @@ export interface DeleteBucketCommandOutput extends __MetadataBearer {} * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* - * @public + * * @example To delete a bucket * ```javascript - * // The following example deletes the specified bucket. + * /* The following example deletes the specified bucket. *\/ * const input = { - * "Bucket": "forrandall2" + * Bucket: "forrandall2" * }; * const command = new DeleteBucketCommand(input); - * await client.send(command); - * // example id: to-delete-a-bucket-1473108514262 + * const response = await client.send(command); + * /* response is + * { /* metadata only *\/ } + * *\/ * ``` * + * @public */ export class DeleteBucketCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/DeleteBucketCorsCommand.ts b/clients/client-s3/src/commands/DeleteBucketCorsCommand.ts index dc92c59b64e3..ec815440bcf6 100644 --- a/clients/client-s3/src/commands/DeleteBucketCorsCommand.ts +++ b/clients/client-s3/src/commands/DeleteBucketCorsCommand.ts @@ -77,18 +77,21 @@ export interface DeleteBucketCorsCommandOutput extends __MetadataBearer {} * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* - * @public + * * @example To delete cors configuration on a bucket. * ```javascript - * // The following example deletes CORS configuration on a bucket. + * /* The following example deletes CORS configuration on a bucket. *\/ * const input = { - * "Bucket": "examplebucket" + * Bucket: "examplebucket" * }; * const command = new DeleteBucketCorsCommand(input); - * await client.send(command); - * // example id: to-delete-cors-configuration-on-a-bucket-1483042856112 + * const response = await client.send(command); + * /* response is + * { /* metadata only *\/ } + * *\/ * ``` * + * @public */ export class DeleteBucketCorsCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/DeleteBucketEncryptionCommand.ts b/clients/client-s3/src/commands/DeleteBucketEncryptionCommand.ts index f1b8c1096850..a15363294bf0 100644 --- a/clients/client-s3/src/commands/DeleteBucketEncryptionCommand.ts +++ b/clients/client-s3/src/commands/DeleteBucketEncryptionCommand.ts @@ -79,6 +79,7 @@ export interface DeleteBucketEncryptionCommandOutput extends __MetadataBearer {} * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* + * * @public */ export class DeleteBucketEncryptionCommand extends $Command diff --git a/clients/client-s3/src/commands/DeleteBucketIntelligentTieringConfigurationCommand.ts b/clients/client-s3/src/commands/DeleteBucketIntelligentTieringConfigurationCommand.ts index 5bb63858c984..5763d0f4caf5 100644 --- a/clients/client-s3/src/commands/DeleteBucketIntelligentTieringConfigurationCommand.ts +++ b/clients/client-s3/src/commands/DeleteBucketIntelligentTieringConfigurationCommand.ts @@ -82,6 +82,7 @@ export interface DeleteBucketIntelligentTieringConfigurationCommandOutput extend * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* + * * @public */ export class DeleteBucketIntelligentTieringConfigurationCommand extends $Command diff --git a/clients/client-s3/src/commands/DeleteBucketInventoryConfigurationCommand.ts b/clients/client-s3/src/commands/DeleteBucketInventoryConfigurationCommand.ts index d02e623d7a72..6fb6811a3b30 100644 --- a/clients/client-s3/src/commands/DeleteBucketInventoryConfigurationCommand.ts +++ b/clients/client-s3/src/commands/DeleteBucketInventoryConfigurationCommand.ts @@ -86,6 +86,7 @@ export interface DeleteBucketInventoryConfigurationCommandOutput extends __Metad * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* + * * @public */ export class DeleteBucketInventoryConfigurationCommand extends $Command diff --git a/clients/client-s3/src/commands/DeleteBucketLifecycleCommand.ts b/clients/client-s3/src/commands/DeleteBucketLifecycleCommand.ts index 54d4fc40a896..db5ac455b037 100644 --- a/clients/client-s3/src/commands/DeleteBucketLifecycleCommand.ts +++ b/clients/client-s3/src/commands/DeleteBucketLifecycleCommand.ts @@ -79,18 +79,21 @@ export interface DeleteBucketLifecycleCommandOutput extends __MetadataBearer {} * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* - * @public + * * @example To delete lifecycle configuration on a bucket. * ```javascript - * // The following example deletes lifecycle configuration on a bucket. + * /* The following example deletes lifecycle configuration on a bucket. *\/ * const input = { - * "Bucket": "examplebucket" + * Bucket: "examplebucket" * }; * const command = new DeleteBucketLifecycleCommand(input); - * await client.send(command); - * // example id: to-delete-lifecycle-configuration-on-a-bucket-1483043310583 + * const response = await client.send(command); + * /* response is + * { /* metadata only *\/ } + * *\/ * ``` * + * @public */ export class DeleteBucketLifecycleCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/DeleteBucketMetricsConfigurationCommand.ts b/clients/client-s3/src/commands/DeleteBucketMetricsConfigurationCommand.ts index 886bf0b1f55d..7c26ca46917a 100644 --- a/clients/client-s3/src/commands/DeleteBucketMetricsConfigurationCommand.ts +++ b/clients/client-s3/src/commands/DeleteBucketMetricsConfigurationCommand.ts @@ -94,6 +94,7 @@ export interface DeleteBucketMetricsConfigurationCommandOutput extends __Metadat * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* + * * @public */ export class DeleteBucketMetricsConfigurationCommand extends $Command diff --git a/clients/client-s3/src/commands/DeleteBucketOwnershipControlsCommand.ts b/clients/client-s3/src/commands/DeleteBucketOwnershipControlsCommand.ts index c75a845054df..9e748bd00a74 100644 --- a/clients/client-s3/src/commands/DeleteBucketOwnershipControlsCommand.ts +++ b/clients/client-s3/src/commands/DeleteBucketOwnershipControlsCommand.ts @@ -78,6 +78,7 @@ export interface DeleteBucketOwnershipControlsCommandOutput extends __MetadataBe * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* + * * @public */ export class DeleteBucketOwnershipControlsCommand extends $Command diff --git a/clients/client-s3/src/commands/DeleteBucketPolicyCommand.ts b/clients/client-s3/src/commands/DeleteBucketPolicyCommand.ts index b3b14e455eb2..adb7fd2caf4a 100644 --- a/clients/client-s3/src/commands/DeleteBucketPolicyCommand.ts +++ b/clients/client-s3/src/commands/DeleteBucketPolicyCommand.ts @@ -115,18 +115,21 @@ export interface DeleteBucketPolicyCommandOutput extends __MetadataBearer {} * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* - * @public + * * @example To delete bucket policy * ```javascript - * // The following example deletes bucket policy on the specified bucket. + * /* The following example deletes bucket policy on the specified bucket. *\/ * const input = { - * "Bucket": "examplebucket" + * Bucket: "examplebucket" * }; * const command = new DeleteBucketPolicyCommand(input); - * await client.send(command); - * // example id: to-delete-bucket-policy-1483043406577 + * const response = await client.send(command); + * /* response is + * { /* metadata only *\/ } + * *\/ * ``` * + * @public */ export class DeleteBucketPolicyCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/DeleteBucketReplicationCommand.ts b/clients/client-s3/src/commands/DeleteBucketReplicationCommand.ts index 64d5de900ef3..1e9cc6d38bc2 100644 --- a/clients/client-s3/src/commands/DeleteBucketReplicationCommand.ts +++ b/clients/client-s3/src/commands/DeleteBucketReplicationCommand.ts @@ -81,18 +81,21 @@ export interface DeleteBucketReplicationCommandOutput extends __MetadataBearer { * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* - * @public + * * @example To delete bucket replication configuration * ```javascript - * // The following example deletes replication configuration set on bucket. + * /* The following example deletes replication configuration set on bucket. *\/ * const input = { - * "Bucket": "example" + * Bucket: "example" * }; * const command = new DeleteBucketReplicationCommand(input); - * await client.send(command); - * // example id: to-delete-bucket-replication-configuration-1483043684668 + * const response = await client.send(command); + * /* response is + * { /* metadata only *\/ } + * *\/ * ``` * + * @public */ export class DeleteBucketReplicationCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/DeleteBucketTaggingCommand.ts b/clients/client-s3/src/commands/DeleteBucketTaggingCommand.ts index 63fb5d3065f5..294128f06e94 100644 --- a/clients/client-s3/src/commands/DeleteBucketTaggingCommand.ts +++ b/clients/client-s3/src/commands/DeleteBucketTaggingCommand.ts @@ -73,18 +73,21 @@ export interface DeleteBucketTaggingCommandOutput extends __MetadataBearer {} * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* - * @public + * * @example To delete bucket tags * ```javascript - * // The following example deletes bucket tags. + * /* The following example deletes bucket tags. *\/ * const input = { - * "Bucket": "examplebucket" + * Bucket: "examplebucket" * }; * const command = new DeleteBucketTaggingCommand(input); - * await client.send(command); - * // example id: to-delete-bucket-tags-1483043846509 + * const response = await client.send(command); + * /* response is + * { /* metadata only *\/ } + * *\/ * ``` * + * @public */ export class DeleteBucketTaggingCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/DeleteBucketWebsiteCommand.ts b/clients/client-s3/src/commands/DeleteBucketWebsiteCommand.ts index 663cb2fb7cfc..adb84cc7e9bb 100644 --- a/clients/client-s3/src/commands/DeleteBucketWebsiteCommand.ts +++ b/clients/client-s3/src/commands/DeleteBucketWebsiteCommand.ts @@ -80,18 +80,21 @@ export interface DeleteBucketWebsiteCommandOutput extends __MetadataBearer {} * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* - * @public + * * @example To delete bucket website configuration * ```javascript - * // The following example deletes bucket website configuration. + * /* The following example deletes bucket website configuration. *\/ * const input = { - * "Bucket": "examplebucket" + * Bucket: "examplebucket" * }; * const command = new DeleteBucketWebsiteCommand(input); - * await client.send(command); - * // example id: to-delete-bucket-website-configuration-1483043937825 + * const response = await client.send(command); + * /* response is + * { /* metadata only *\/ } + * *\/ * ``` * + * @public */ export class DeleteBucketWebsiteCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/DeleteObjectCommand.ts b/clients/client-s3/src/commands/DeleteObjectCommand.ts index 0762586ab8be..4c6fabd0f24f 100644 --- a/clients/client-s3/src/commands/DeleteObjectCommand.ts +++ b/clients/client-s3/src/commands/DeleteObjectCommand.ts @@ -161,31 +161,36 @@ export interface DeleteObjectCommandOutput extends DeleteObjectOutput, __Metadat * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* - * @public + * * @example To delete an object (from a non-versioned bucket) * ```javascript - * // The following example deletes an object from a non-versioned bucket. + * /* The following example deletes an object from a non-versioned bucket. *\/ * const input = { - * "Bucket": "ExampleBucket", - * "Key": "HappyFace.jpg" + * Bucket: "ExampleBucket", + * Key: "HappyFace.jpg" * }; * const command = new DeleteObjectCommand(input); - * await client.send(command); - * // example id: to-delete-an-object-from-a-non-versioned-bucket-1481588533089 + * const response = await client.send(command); + * /* response is + * { /* metadata only *\/ } + * *\/ * ``` * * @example To delete an object * ```javascript - * // The following example deletes an object from an S3 bucket. + * /* The following example deletes an object from an S3 bucket. *\/ * const input = { - * "Bucket": "examplebucket", - * "Key": "objectkey.jpg" + * Bucket: "examplebucket", + * Key: "objectkey.jpg" * }; * const command = new DeleteObjectCommand(input); - * await client.send(command); - * // example id: to-delete-an-object-1472850136595 + * const response = await client.send(command); + * /* response is + * { /* empty *\/ } + * *\/ * ``` * + * @public */ export class DeleteObjectCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/DeleteObjectTaggingCommand.ts b/clients/client-s3/src/commands/DeleteObjectTaggingCommand.ts index 829a9b612bf1..39ebf84c5437 100644 --- a/clients/client-s3/src/commands/DeleteObjectTaggingCommand.ts +++ b/clients/client-s3/src/commands/DeleteObjectTaggingCommand.ts @@ -80,42 +80,41 @@ export interface DeleteObjectTaggingCommandOutput extends DeleteObjectTaggingOut * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* - * @public + * * @example To remove tag set from an object version * ```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 version. The request specifies both the object key and object version. *\/ * const input = { - * "Bucket": "examplebucket", - * "Key": "HappyFace.jpg", - * "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI" + * Bucket: "examplebucket", + * Key: "HappyFace.jpg", + * VersionId: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI" * }; * const command = new DeleteObjectTaggingCommand(input); * const response = await client.send(command); - * /* response == + * /* response is * { - * "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI" + * VersionId: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI" * } * *\/ - * // example id: to-remove-tag-set-from-an-object-version-1483145285913 * ``` * * @example To remove tag set from an object * ```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. If the bucket is versioning enabled, the operation removes tag set from the latest object version. *\/ * const input = { - * "Bucket": "examplebucket", - * "Key": "HappyFace.jpg" + * Bucket: "examplebucket", + * Key: "HappyFace.jpg" * }; * const command = new DeleteObjectTaggingCommand(input); * const response = await client.send(command); - * /* response == + * /* response is * { - * "VersionId": "null" + * VersionId: "null" * } * *\/ - * // example id: to-remove-tag-set-from-an-object-1483145342862 * ``` * + * @public */ export class DeleteObjectTaggingCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/DeleteObjectsCommand.ts b/clients/client-s3/src/commands/DeleteObjectsCommand.ts index dcd01b988cbd..35e1f3ac9f52 100644 --- a/clients/client-s3/src/commands/DeleteObjectsCommand.ts +++ b/clients/client-s3/src/commands/DeleteObjectsCommand.ts @@ -211,83 +211,45 @@ export interface DeleteObjectsCommandOutput extends DeleteObjectsOutput, __Metad * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* - * @public - * @example To delete multiple object versions from a versioned bucket - * ```javascript - * // The following example deletes objects from a bucket. The request specifies object versions. S3 deletes specific object versions and returns the key and versions of deleted objects in the response. - * const input = { - * "Bucket": "examplebucket", - * "Delete": { - * "Objects": [ - * { - * "Key": "HappyFace.jpg", - * "VersionId": "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b" - * }, - * { - * "Key": "HappyFace.jpg", - * "VersionId": "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd" - * } - * ], - * "Quiet": false - * } - * }; - * const command = new DeleteObjectsCommand(input); - * const response = await client.send(command); - * /* response == - * { - * "Deleted": [ - * { - * "Key": "HappyFace.jpg", - * "VersionId": "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd" - * }, - * { - * "Key": "HappyFace.jpg", - * "VersionId": "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b" - * } - * ] - * } - * *\/ - * // example id: to-delete-multiple-object-versions-from-a-versioned-bucket-1483147087737 - * ``` * - * @example To delete multiple objects from a versioned bucket + * @example To delete multiple object versions from a versioned bucket * ```javascript - * // The following example deletes objects from a bucket. The bucket is versioned, and the request does not specify the object version to delete. In this case, all versions remain in the bucket and S3 adds a delete marker. + * /* The following example deletes objects from a bucket. The request specifies object versions. S3 deletes specific object versions and returns the key and versions of deleted objects in the response. *\/ * const input = { - * "Bucket": "examplebucket", - * "Delete": { - * "Objects": [ + * Bucket: "examplebucket", + * Delete: { + * Objects: [ * { - * "Key": "objectkey1" + * Key: "HappyFace.jpg", + * VersionId: "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b" * }, * { - * "Key": "objectkey2" + * Key: "HappyFace.jpg", + * VersionId: "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd" * } * ], - * "Quiet": false + * Quiet: false * } * }; * const command = new DeleteObjectsCommand(input); * const response = await client.send(command); - * /* response == + * /* response is * { - * "Deleted": [ + * Deleted: [ * { - * "DeleteMarker": "true", - * "DeleteMarkerVersionId": "A._w1z6EFiCF5uhtQMDal9JDkID9tQ7F", - * "Key": "objectkey1" + * Key: "HappyFace.jpg", + * VersionId: "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd" * }, * { - * "DeleteMarker": "true", - * "DeleteMarkerVersionId": "iOd_ORxhkKe_e8G8_oSGxt2PjsCZKlkt", - * "Key": "objectkey2" + * Key: "HappyFace.jpg", + * VersionId: "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b" * } * ] * } * *\/ - * // example id: to-delete-multiple-objects-from-a-versioned-bucket-1483146248805 * ``` * + * @public */ export class DeleteObjectsCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/DeletePublicAccessBlockCommand.ts b/clients/client-s3/src/commands/DeletePublicAccessBlockCommand.ts index fcf103724887..b67fc132626c 100644 --- a/clients/client-s3/src/commands/DeletePublicAccessBlockCommand.ts +++ b/clients/client-s3/src/commands/DeletePublicAccessBlockCommand.ts @@ -84,6 +84,7 @@ export interface DeletePublicAccessBlockCommandOutput extends __MetadataBearer { * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* + * * @public */ export class DeletePublicAccessBlockCommand extends $Command diff --git a/clients/client-s3/src/commands/GetBucketAccelerateConfigurationCommand.ts b/clients/client-s3/src/commands/GetBucketAccelerateConfigurationCommand.ts index cf9e8104e5ed..a0e95525213f 100644 --- a/clients/client-s3/src/commands/GetBucketAccelerateConfigurationCommand.ts +++ b/clients/client-s3/src/commands/GetBucketAccelerateConfigurationCommand.ts @@ -91,6 +91,7 @@ export interface GetBucketAccelerateConfigurationCommandOutput * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* + * * @public */ export class GetBucketAccelerateConfigurationCommand extends $Command diff --git a/clients/client-s3/src/commands/GetBucketAclCommand.ts b/clients/client-s3/src/commands/GetBucketAclCommand.ts index a772d9247b75..1d918429ade8 100644 --- a/clients/client-s3/src/commands/GetBucketAclCommand.ts +++ b/clients/client-s3/src/commands/GetBucketAclCommand.ts @@ -99,6 +99,7 @@ export interface GetBucketAclCommandOutput extends GetBucketAclOutput, __Metadat * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* + * * @public */ export class GetBucketAclCommand extends $Command diff --git a/clients/client-s3/src/commands/GetBucketAnalyticsConfigurationCommand.ts b/clients/client-s3/src/commands/GetBucketAnalyticsConfigurationCommand.ts index 7ecea306558d..37b760a2297d 100644 --- a/clients/client-s3/src/commands/GetBucketAnalyticsConfigurationCommand.ts +++ b/clients/client-s3/src/commands/GetBucketAnalyticsConfigurationCommand.ts @@ -124,6 +124,7 @@ export interface GetBucketAnalyticsConfigurationCommandOutput * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* + * * @public */ export class GetBucketAnalyticsConfigurationCommand extends $Command diff --git a/clients/client-s3/src/commands/GetBucketCorsCommand.ts b/clients/client-s3/src/commands/GetBucketCorsCommand.ts index 38519995ceff..025d8120dafa 100644 --- a/clients/client-s3/src/commands/GetBucketCorsCommand.ts +++ b/clients/client-s3/src/commands/GetBucketCorsCommand.ts @@ -100,36 +100,36 @@ export interface GetBucketCorsCommandOutput extends GetBucketCorsOutput, __Metad * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* - * @public + * * @example To get cors configuration set on a bucket * ```javascript - * // The following example returns cross-origin resource sharing (CORS) configuration set on a bucket. + * /* The following example returns cross-origin resource sharing (CORS) configuration set on a bucket. *\/ * const input = { - * "Bucket": "examplebucket" + * Bucket: "examplebucket" * }; * const command = new GetBucketCorsCommand(input); * const response = await client.send(command); - * /* response == + * /* response is * { - * "CORSRules": [ + * CORSRules: [ * { - * "AllowedHeaders": [ + * AllowedHeaders: [ * "Authorization" * ], - * "AllowedMethods": [ + * AllowedMethods: [ * "GET" * ], - * "AllowedOrigins": [ + * AllowedOrigins: [ * "*" * ], - * "MaxAgeSeconds": 3000 + * MaxAgeSeconds: 3000 * } * ] * } * *\/ - * // example id: to-get-cors-configuration-set-on-a-bucket-1481596855475 * ``` * + * @public */ export class GetBucketCorsCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/GetBucketEncryptionCommand.ts b/clients/client-s3/src/commands/GetBucketEncryptionCommand.ts index 04d6dbef09d5..5a4dcec1c9e2 100644 --- a/clients/client-s3/src/commands/GetBucketEncryptionCommand.ts +++ b/clients/client-s3/src/commands/GetBucketEncryptionCommand.ts @@ -94,6 +94,7 @@ export interface GetBucketEncryptionCommandOutput extends GetBucketEncryptionOut * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* + * * @public */ export class GetBucketEncryptionCommand extends $Command diff --git a/clients/client-s3/src/commands/GetBucketIntelligentTieringConfigurationCommand.ts b/clients/client-s3/src/commands/GetBucketIntelligentTieringConfigurationCommand.ts index cf50ffd46d94..6c31589a4ed5 100644 --- a/clients/client-s3/src/commands/GetBucketIntelligentTieringConfigurationCommand.ts +++ b/clients/client-s3/src/commands/GetBucketIntelligentTieringConfigurationCommand.ts @@ -114,6 +114,7 @@ export interface GetBucketIntelligentTieringConfigurationCommandOutput * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* + * * @public */ export class GetBucketIntelligentTieringConfigurationCommand extends $Command diff --git a/clients/client-s3/src/commands/GetBucketInventoryConfigurationCommand.ts b/clients/client-s3/src/commands/GetBucketInventoryConfigurationCommand.ts index 8e225c899f09..077aabb18684 100644 --- a/clients/client-s3/src/commands/GetBucketInventoryConfigurationCommand.ts +++ b/clients/client-s3/src/commands/GetBucketInventoryConfigurationCommand.ts @@ -122,6 +122,7 @@ export interface GetBucketInventoryConfigurationCommandOutput * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* + * * @public */ export class GetBucketInventoryConfigurationCommand extends $Command diff --git a/clients/client-s3/src/commands/GetBucketLifecycleConfigurationCommand.ts b/clients/client-s3/src/commands/GetBucketLifecycleConfigurationCommand.ts index c7382303849c..1910a11d969e 100644 --- a/clients/client-s3/src/commands/GetBucketLifecycleConfigurationCommand.ts +++ b/clients/client-s3/src/commands/GetBucketLifecycleConfigurationCommand.ts @@ -169,35 +169,35 @@ export interface GetBucketLifecycleConfigurationCommandOutput * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* - * @public + * * @example To get lifecycle configuration on a bucket * ```javascript - * // The following example retrieves lifecycle configuration on set on a bucket. + * /* The following example retrieves lifecycle configuration on set on a bucket. *\/ * const input = { - * "Bucket": "examplebucket" + * Bucket: "examplebucket" * }; * const command = new GetBucketLifecycleConfigurationCommand(input); * const response = await client.send(command); - * /* response == + * /* response is * { - * "Rules": [ + * Rules: [ * { - * "ID": "Rule for TaxDocs/", - * "Prefix": "TaxDocs", - * "Status": "Enabled", - * "Transitions": [ + * ID: "Rule for TaxDocs/", + * Prefix: "TaxDocs", + * Status: "Enabled", + * Transitions: [ * { - * "Days": 365, - * "StorageClass": "STANDARD_IA" + * Days: 365, + * StorageClass: "STANDARD_IA" * } * ] * } * ] * } * *\/ - * // example id: to-get-lifecycle-configuration-on-a-bucket-1481666063200 * ``` * + * @public */ export class GetBucketLifecycleConfigurationCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/GetBucketLocationCommand.ts b/clients/client-s3/src/commands/GetBucketLocationCommand.ts index a7e257f68b87..425ab3b67c75 100644 --- a/clients/client-s3/src/commands/GetBucketLocationCommand.ts +++ b/clients/client-s3/src/commands/GetBucketLocationCommand.ts @@ -84,23 +84,23 @@ export interface GetBucketLocationCommandOutput extends GetBucketLocationOutput, * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* - * @public + * * @example To get bucket location * ```javascript - * // The following example returns bucket location. + * /* The following example returns bucket location. *\/ * const input = { - * "Bucket": "examplebucket" + * Bucket: "examplebucket" * }; * const command = new GetBucketLocationCommand(input); * const response = await client.send(command); - * /* response == + * /* response is * { - * "LocationConstraint": "us-west-2" + * LocationConstraint: "us-west-2" * } * *\/ - * // example id: to-get-bucket-location-1481594573609 * ``` * + * @public */ export class GetBucketLocationCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/GetBucketLoggingCommand.ts b/clients/client-s3/src/commands/GetBucketLoggingCommand.ts index 93b9c2e30246..81156abdd1be 100644 --- a/clients/client-s3/src/commands/GetBucketLoggingCommand.ts +++ b/clients/client-s3/src/commands/GetBucketLoggingCommand.ts @@ -94,6 +94,7 @@ export interface GetBucketLoggingCommandOutput extends GetBucketLoggingOutput, _ * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* + * * @public */ export class GetBucketLoggingCommand extends $Command diff --git a/clients/client-s3/src/commands/GetBucketMetricsConfigurationCommand.ts b/clients/client-s3/src/commands/GetBucketMetricsConfigurationCommand.ts index 6512c71fa652..20b1f36145b4 100644 --- a/clients/client-s3/src/commands/GetBucketMetricsConfigurationCommand.ts +++ b/clients/client-s3/src/commands/GetBucketMetricsConfigurationCommand.ts @@ -117,6 +117,7 @@ export interface GetBucketMetricsConfigurationCommandOutput * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* + * * @public */ export class GetBucketMetricsConfigurationCommand extends $Command diff --git a/clients/client-s3/src/commands/GetBucketNotificationConfigurationCommand.ts b/clients/client-s3/src/commands/GetBucketNotificationConfigurationCommand.ts index 08ad4e43fd67..1404991e69d5 100644 --- a/clients/client-s3/src/commands/GetBucketNotificationConfigurationCommand.ts +++ b/clients/client-s3/src/commands/GetBucketNotificationConfigurationCommand.ts @@ -141,6 +141,7 @@ export interface GetBucketNotificationConfigurationCommandOutput extends Notific * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* + * * @public */ export class GetBucketNotificationConfigurationCommand extends $Command diff --git a/clients/client-s3/src/commands/GetBucketOwnershipControlsCommand.ts b/clients/client-s3/src/commands/GetBucketOwnershipControlsCommand.ts index 19c71fb6b0b7..3eef121a99b2 100644 --- a/clients/client-s3/src/commands/GetBucketOwnershipControlsCommand.ts +++ b/clients/client-s3/src/commands/GetBucketOwnershipControlsCommand.ts @@ -83,6 +83,7 @@ export interface GetBucketOwnershipControlsCommandOutput extends GetBucketOwners * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* + * * @public */ export class GetBucketOwnershipControlsCommand extends $Command diff --git a/clients/client-s3/src/commands/GetBucketPolicyCommand.ts b/clients/client-s3/src/commands/GetBucketPolicyCommand.ts index 12c259d1e901..68b62fd7ce24 100644 --- a/clients/client-s3/src/commands/GetBucketPolicyCommand.ts +++ b/clients/client-s3/src/commands/GetBucketPolicyCommand.ts @@ -117,23 +117,23 @@ export interface GetBucketPolicyCommandOutput extends GetBucketPolicyOutput, __M * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* - * @public + * * @example To get bucket policy * ```javascript - * // The following example returns bucket policy associated with a bucket. + * /* The following example returns bucket policy associated with a bucket. *\/ * const input = { - * "Bucket": "examplebucket" + * Bucket: "examplebucket" * }; * const command = new GetBucketPolicyCommand(input); * const response = await client.send(command); - * /* response == + * /* response is * { - * "Policy": "{\"Version\":\"2008-10-17\",\"Id\":\"LogPolicy\",\"Statement\":[{\"Sid\":\"Enables the log delivery group to publish logs to your bucket \",\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"111122223333\"},\"Action\":[\"s3:GetBucketAcl\",\"s3:GetObjectAcl\",\"s3:PutObject\"],\"Resource\":[\"arn:aws:s3:::policytest1/*\",\"arn:aws:s3:::policytest1\"]}]}" + * Policy: "{"Version":"2008-10-17","Id":"LogPolicy","Statement":[{"Sid":"Enables the log delivery group to publish logs to your bucket ","Effect":"Allow","Principal":{"AWS":"111122223333"},"Action":["s3:GetBucketAcl","s3:GetObjectAcl","s3:PutObject"],"Resource":["arn:aws:s3:::policytest1/*","arn:aws:s3:::policytest1"]}]}" * } * *\/ - * // example id: to-get-bucket-policy-1481595098424 * ``` * + * @public */ export class GetBucketPolicyCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/GetBucketPolicyStatusCommand.ts b/clients/client-s3/src/commands/GetBucketPolicyStatusCommand.ts index ec9df74d765d..5bde0fc4ddd2 100644 --- a/clients/client-s3/src/commands/GetBucketPolicyStatusCommand.ts +++ b/clients/client-s3/src/commands/GetBucketPolicyStatusCommand.ts @@ -89,6 +89,7 @@ export interface GetBucketPolicyStatusCommandOutput extends GetBucketPolicyStatu * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* + * * @public */ export class GetBucketPolicyStatusCommand extends $Command diff --git a/clients/client-s3/src/commands/GetBucketReplicationCommand.ts b/clients/client-s3/src/commands/GetBucketReplicationCommand.ts index 17e0f4c6bffc..d089e5578305 100644 --- a/clients/client-s3/src/commands/GetBucketReplicationCommand.ts +++ b/clients/client-s3/src/commands/GetBucketReplicationCommand.ts @@ -151,35 +151,35 @@ export interface GetBucketReplicationCommandOutput extends GetBucketReplicationO * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* - * @public + * * @example To get replication configuration set on a bucket * ```javascript - * // The following example returns replication configuration set on a bucket. + * /* The following example returns replication configuration set on a bucket. *\/ * const input = { - * "Bucket": "examplebucket" + * Bucket: "examplebucket" * }; * const command = new GetBucketReplicationCommand(input); * const response = await client.send(command); - * /* response == + * /* response is * { - * "ReplicationConfiguration": { - * "Role": "arn:aws:iam::acct-id:role/example-role", - * "Rules": [ + * ReplicationConfiguration: { + * Role: "arn:aws:iam::acct-id:role/example-role", + * Rules: [ * { - * "Destination": { - * "Bucket": "arn:aws:s3:::destination-bucket" + * Destination: { + * Bucket: "arn:aws:s3:::destination-bucket" * }, - * "ID": "MWIwNTkwZmItMTE3MS00ZTc3LWJkZDEtNzRmODQwYzc1OTQy", - * "Prefix": "Tax", - * "Status": "Enabled" + * ID: "MWIwNTkwZmItMTE3MS00ZTc3LWJkZDEtNzRmODQwYzc1OTQy", + * Prefix: "Tax", + * Status: "Enabled" * } * ] * } * } * *\/ - * // example id: to-get-replication-configuration-set-on-a-bucket-1481593597175 * ``` * + * @public */ export class GetBucketReplicationCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/GetBucketRequestPaymentCommand.ts b/clients/client-s3/src/commands/GetBucketRequestPaymentCommand.ts index 4561303ad9d8..0072871b7998 100644 --- a/clients/client-s3/src/commands/GetBucketRequestPaymentCommand.ts +++ b/clients/client-s3/src/commands/GetBucketRequestPaymentCommand.ts @@ -69,23 +69,23 @@ export interface GetBucketRequestPaymentCommandOutput extends GetBucketRequestPa * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* - * @public + * * @example To get bucket versioning configuration * ```javascript - * // The following example retrieves bucket versioning configuration. + * /* The following example retrieves bucket versioning configuration. *\/ * const input = { - * "Bucket": "examplebucket" + * Bucket: "examplebucket" * }; * const command = new GetBucketRequestPaymentCommand(input); * const response = await client.send(command); - * /* response == + * /* response is * { - * "Payer": "BucketOwner" + * Payer: "BucketOwner" * } * *\/ - * // example id: to-get-bucket-versioning-configuration-1483037183929 * ``` * + * @public */ export class GetBucketRequestPaymentCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/GetBucketTaggingCommand.ts b/clients/client-s3/src/commands/GetBucketTaggingCommand.ts index c7d86711ea8e..311c301c027e 100644 --- a/clients/client-s3/src/commands/GetBucketTaggingCommand.ts +++ b/clients/client-s3/src/commands/GetBucketTaggingCommand.ts @@ -93,32 +93,32 @@ export interface GetBucketTaggingCommandOutput extends GetBucketTaggingOutput, _ * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* - * @public + * * @example To get tag set associated with a bucket * ```javascript - * // The following example returns tag set associated with a bucket + * /* The following example returns tag set associated with a bucket *\/ * const input = { - * "Bucket": "examplebucket" + * Bucket: "examplebucket" * }; * const command = new GetBucketTaggingCommand(input); * const response = await client.send(command); - * /* response == + * /* response is * { - * "TagSet": [ + * TagSet: [ * { - * "Key": "key1", - * "Value": "value1" + * Key: "key1", + * Value: "value1" * }, * { - * "Key": "key2", - * "Value": "value2" + * Key: "key2", + * Value: "value2" * } * ] * } * *\/ - * // example id: to-get-tag-set-associated-with-a-bucket-1481593232107 * ``` * + * @public */ export class GetBucketTaggingCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/GetBucketVersioningCommand.ts b/clients/client-s3/src/commands/GetBucketVersioningCommand.ts index 9c49d7933aa2..0ce651701be2 100644 --- a/clients/client-s3/src/commands/GetBucketVersioningCommand.ts +++ b/clients/client-s3/src/commands/GetBucketVersioningCommand.ts @@ -82,24 +82,24 @@ export interface GetBucketVersioningCommandOutput extends GetBucketVersioningOut * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* - * @public + * * @example To get bucket versioning configuration * ```javascript - * // The following example retrieves bucket versioning configuration. + * /* The following example retrieves bucket versioning configuration. *\/ * const input = { - * "Bucket": "examplebucket" + * Bucket: "examplebucket" * }; * const command = new GetBucketVersioningCommand(input); * const response = await client.send(command); - * /* response == + * /* response is * { - * "MFADelete": "Disabled", - * "Status": "Enabled" + * MFADelete: "Disabled", + * Status: "Enabled" * } * *\/ - * // example id: to-get-bucket-versioning-configuration-1483037183929 * ``` * + * @public */ export class GetBucketVersioningCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/GetBucketWebsiteCommand.ts b/clients/client-s3/src/commands/GetBucketWebsiteCommand.ts index 0498630edcbf..ae030ed4b134 100644 --- a/clients/client-s3/src/commands/GetBucketWebsiteCommand.ts +++ b/clients/client-s3/src/commands/GetBucketWebsiteCommand.ts @@ -102,28 +102,28 @@ export interface GetBucketWebsiteCommandOutput extends GetBucketWebsiteOutput, _ * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* - * @public + * * @example To get bucket website configuration * ```javascript - * // The following example retrieves website configuration of a bucket. + * /* The following example retrieves website configuration of a bucket. *\/ * const input = { - * "Bucket": "examplebucket" + * Bucket: "examplebucket" * }; * const command = new GetBucketWebsiteCommand(input); * const response = await client.send(command); - * /* response == + * /* response is * { - * "ErrorDocument": { - * "Key": "error.html" + * ErrorDocument: { + * Key: "error.html" * }, - * "IndexDocument": { - * "Suffix": "index.html" + * IndexDocument: { + * Suffix: "index.html" * } * } * *\/ - * // example id: to-get-bucket-website-configuration-1483037016926 * ``` * + * @public */ export class GetBucketWebsiteCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/GetObjectAclCommand.ts b/clients/client-s3/src/commands/GetObjectAclCommand.ts index 36d70066b7f3..604e039d0587 100644 --- a/clients/client-s3/src/commands/GetObjectAclCommand.ts +++ b/clients/client-s3/src/commands/GetObjectAclCommand.ts @@ -119,61 +119,61 @@ export interface GetObjectAclCommandOutput extends GetObjectAclOutput, __Metadat * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* - * @public + * * @example To retrieve object ACL * ```javascript - * // The following example retrieves access control list (ACL) of an object. + * /* The following example retrieves access control list (ACL) of an object. *\/ * const input = { - * "Bucket": "examplebucket", - * "Key": "HappyFace.jpg" + * Bucket: "examplebucket", + * Key: "HappyFace.jpg" * }; * const command = new GetObjectAclCommand(input); * const response = await client.send(command); - * /* response == + * /* response is * { - * "Grants": [ + * Grants: [ * { - * "Grantee": { - * "DisplayName": "owner-display-name", - * "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc", - * "Type": "CanonicalUser" + * Grantee: { + * DisplayName: "owner-display-name", + * ID: "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc", + * Type: "CanonicalUser" * }, - * "Permission": "WRITE" + * Permission: "WRITE" * }, * { - * "Grantee": { - * "DisplayName": "owner-display-name", - * "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc", - * "Type": "CanonicalUser" + * Grantee: { + * DisplayName: "owner-display-name", + * ID: "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc", + * Type: "CanonicalUser" * }, - * "Permission": "WRITE_ACP" + * Permission: "WRITE_ACP" * }, * { - * "Grantee": { - * "DisplayName": "owner-display-name", - * "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc", - * "Type": "CanonicalUser" + * Grantee: { + * DisplayName: "owner-display-name", + * ID: "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc", + * Type: "CanonicalUser" * }, - * "Permission": "READ" + * Permission: "READ" * }, * { - * "Grantee": { - * "DisplayName": "owner-display-name", - * "ID": "852b113eexamplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc", - * "Type": "CanonicalUser" + * Grantee: { + * DisplayName: "owner-display-name", + * ID: "852b113eexamplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc", + * Type: "CanonicalUser" * }, - * "Permission": "READ_ACP" + * Permission: "READ_ACP" * } * ], - * "Owner": { - * "DisplayName": "owner-display-name", - * "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" + * Owner: { + * DisplayName: "owner-display-name", + * ID: "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" * } * } * *\/ - * // example id: to-retrieve-object-acl-1481833557740 * ``` * + * @public */ export class GetObjectAclCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/GetObjectAttributesCommand.ts b/clients/client-s3/src/commands/GetObjectAttributesCommand.ts index 6756fa7b2496..f78b17a78ea1 100644 --- a/clients/client-s3/src/commands/GetObjectAttributesCommand.ts +++ b/clients/client-s3/src/commands/GetObjectAttributesCommand.ts @@ -290,6 +290,7 @@ export interface GetObjectAttributesCommandOutput extends GetObjectAttributesOut * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* + * * @public */ export class GetObjectAttributesCommand extends $Command diff --git a/clients/client-s3/src/commands/GetObjectCommand.ts b/clients/client-s3/src/commands/GetObjectCommand.ts index 2c0dd7c3dcdd..d60cf8db79b1 100644 --- a/clients/client-s3/src/commands/GetObjectCommand.ts +++ b/clients/client-s3/src/commands/GetObjectCommand.ts @@ -285,56 +285,8 @@ export interface GetObjectCommandOutput extends OmitBase exception class for all service exceptions from S3 service.
* - * @public - * @example To retrieve a byte range of an object - * ```javascript - * // The following example retrieves an object for an S3 bucket. The request specifies the range header to retrieve a specific byte range. - * const input = { - * "Bucket": "examplebucket", - * "Key": "SampleFile.txt", - * "Range": "bytes=0-9" - * }; - * const command = new GetObjectCommand(input); - * const response = await client.send(command); - * /* response == - * { - * "AcceptRanges": "bytes", - * "ContentLength": "10", - * "ContentRange": "bytes 0-9/43", - * "ContentType": "text/plain", - * "ETag": "\"0d94420ffd0bc68cd3d152506b97a9cc\"", - * "LastModified": "Thu, 09 Oct 2014 22:57:28 GMT", - * "Metadata": {}, - * "VersionId": "null" - * } - * *\/ - * // example id: to-retrieve-a-byte-range-of-an-object--1481832674603 - * ``` - * - * @example To retrieve an object - * ```javascript - * // The following example retrieves an object for an S3 bucket. - * const input = { - * "Bucket": "examplebucket", - * "Key": "HappyFace.jpg" - * }; - * const command = new GetObjectCommand(input); - * const response = await client.send(command); - * /* response == - * { - * "AcceptRanges": "bytes", - * "ContentLength": "3191", - * "ContentType": "image/jpeg", - * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", - * "LastModified": "Thu, 15 Dec 2016 01:19:41 GMT", - * "Metadata": {}, - * "TagCount": 2, - * "VersionId": "null" - * } - * *\/ - * // example id: to-retrieve-an-object-1481827837012 - * ``` * + * @public */ export class GetObjectCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/GetObjectLegalHoldCommand.ts b/clients/client-s3/src/commands/GetObjectLegalHoldCommand.ts index b21c3486a7eb..7e7fdfadbb4c 100644 --- a/clients/client-s3/src/commands/GetObjectLegalHoldCommand.ts +++ b/clients/client-s3/src/commands/GetObjectLegalHoldCommand.ts @@ -74,6 +74,7 @@ export interface GetObjectLegalHoldCommandOutput extends GetObjectLegalHoldOutpu * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* + * * @public */ export class GetObjectLegalHoldCommand extends $Command diff --git a/clients/client-s3/src/commands/GetObjectLockConfigurationCommand.ts b/clients/client-s3/src/commands/GetObjectLockConfigurationCommand.ts index 31b113fec11e..8894b25de154 100644 --- a/clients/client-s3/src/commands/GetObjectLockConfigurationCommand.ts +++ b/clients/client-s3/src/commands/GetObjectLockConfigurationCommand.ts @@ -78,6 +78,7 @@ export interface GetObjectLockConfigurationCommandOutput extends GetObjectLockCo * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* + * * @public */ export class GetObjectLockConfigurationCommand extends $Command diff --git a/clients/client-s3/src/commands/GetObjectRetentionCommand.ts b/clients/client-s3/src/commands/GetObjectRetentionCommand.ts index 5427a527ad67..c1c87ed48649 100644 --- a/clients/client-s3/src/commands/GetObjectRetentionCommand.ts +++ b/clients/client-s3/src/commands/GetObjectRetentionCommand.ts @@ -75,6 +75,7 @@ export interface GetObjectRetentionCommandOutput extends GetObjectRetentionOutpu * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* + * * @public */ export class GetObjectRetentionCommand extends $Command diff --git a/clients/client-s3/src/commands/GetObjectTaggingCommand.ts b/clients/client-s3/src/commands/GetObjectTaggingCommand.ts index eb7d011d845b..950d2a97734e 100644 --- a/clients/client-s3/src/commands/GetObjectTaggingCommand.ts +++ b/clients/client-s3/src/commands/GetObjectTaggingCommand.ts @@ -96,58 +96,57 @@ export interface GetObjectTaggingCommandOutput extends GetObjectTaggingOutput, _ * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* - * @public + * * @example To retrieve tag set of an object * ```javascript - * // The following example retrieves tag set of an object. + * /* The following example retrieves tag set of an object. *\/ * const input = { - * "Bucket": "examplebucket", - * "Key": "HappyFace.jpg" + * Bucket: "examplebucket", + * Key: "HappyFace.jpg" * }; * const command = new GetObjectTaggingCommand(input); * const response = await client.send(command); - * /* response == + * /* response is * { - * "TagSet": [ + * TagSet: [ * { - * "Key": "Key4", - * "Value": "Value4" + * Key: "Key4", + * Value: "Value4" * }, * { - * "Key": "Key3", - * "Value": "Value3" + * Key: "Key3", + * Value: "Value3" * } * ], - * "VersionId": "null" + * VersionId: "null" * } * *\/ - * // example id: to-retrieve-tag-set-of-an-object-1481833847896 * ``` * * @example To retrieve tag set of a specific object version * ```javascript - * // The following example retrieves tag set of an object. The request specifies object version. + * /* The following example retrieves tag set of an object. The request specifies object version. *\/ * const input = { - * "Bucket": "examplebucket", - * "Key": "exampleobject", - * "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI" + * Bucket: "examplebucket", + * Key: "exampleobject", + * VersionId: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI" * }; * const command = new GetObjectTaggingCommand(input); * const response = await client.send(command); - * /* response == + * /* response is * { - * "TagSet": [ + * TagSet: [ * { - * "Key": "Key1", - * "Value": "Value1" + * Key: "Key1", + * Value: "Value1" * } * ], - * "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI" + * VersionId: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI" * } * *\/ - * // example id: to-retrieve-tag-set-of-a-specific-object-version-1483400283663 * ``` * + * @public */ export class GetObjectTaggingCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/GetObjectTorrentCommand.ts b/clients/client-s3/src/commands/GetObjectTorrentCommand.ts index bcf854d13c90..a2eea7ac8571 100644 --- a/clients/client-s3/src/commands/GetObjectTorrentCommand.ts +++ b/clients/client-s3/src/commands/GetObjectTorrentCommand.ts @@ -84,19 +84,22 @@ export interface GetObjectTorrentCommandOutput extends OmitBase exception class for all service exceptions from S3 service.
* + * * @public */ export class GetPublicAccessBlockCommand extends $Command diff --git a/clients/client-s3/src/commands/HeadBucketCommand.ts b/clients/client-s3/src/commands/HeadBucketCommand.ts index d8ff44747e27..a0f12b73b839 100644 --- a/clients/client-s3/src/commands/HeadBucketCommand.ts +++ b/clients/client-s3/src/commands/HeadBucketCommand.ts @@ -111,18 +111,21 @@ export interface HeadBucketCommandOutput extends HeadBucketOutput, __MetadataBea * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* - * @public + * * @example To determine if bucket exists * ```javascript - * // This operation checks to see if a bucket exists. + * /* This operation checks to see if a bucket exists. *\/ * const input = { - * "Bucket": "acl1" + * Bucket: "acl1" * }; * const command = new HeadBucketCommand(input); - * await client.send(command); - * // example id: to-determine-if-bucket-exists-1473110292262 + * const response = await client.send(command); + * /* response is + * { /* metadata only *\/ } + * *\/ * ``` * + * @public */ export class HeadBucketCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/HeadObjectCommand.ts b/clients/client-s3/src/commands/HeadObjectCommand.ts index 6dd6b0743b11..80fb2b9b2317 100644 --- a/clients/client-s3/src/commands/HeadObjectCommand.ts +++ b/clients/client-s3/src/commands/HeadObjectCommand.ts @@ -249,30 +249,8 @@ export interface HeadObjectCommandOutput extends HeadObjectOutput, __MetadataBea * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* - * @public - * @example To retrieve metadata of an object without returning the object itself - * ```javascript - * // The following example retrieves an object metadata. - * const input = { - * "Bucket": "examplebucket", - * "Key": "HappyFace.jpg" - * }; - * const command = new HeadObjectCommand(input); - * const response = await client.send(command); - * /* response == - * { - * "AcceptRanges": "bytes", - * "ContentLength": "3191", - * "ContentType": "image/jpeg", - * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", - * "LastModified": "Thu, 15 Dec 2016 01:19:41 GMT", - * "Metadata": {}, - * "VersionId": "null" - * } - * *\/ - * // example id: to-retrieve-metadata-of-an-object-without-returning-the-object-itself-1481834820480 - * ``` * + * @public */ export class HeadObjectCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/ListBucketAnalyticsConfigurationsCommand.ts b/clients/client-s3/src/commands/ListBucketAnalyticsConfigurationsCommand.ts index 953e54aeb02a..e39e3c266a99 100644 --- a/clients/client-s3/src/commands/ListBucketAnalyticsConfigurationsCommand.ts +++ b/clients/client-s3/src/commands/ListBucketAnalyticsConfigurationsCommand.ts @@ -136,6 +136,7 @@ export interface ListBucketAnalyticsConfigurationsCommandOutput * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* + * * @public */ export class ListBucketAnalyticsConfigurationsCommand extends $Command diff --git a/clients/client-s3/src/commands/ListBucketIntelligentTieringConfigurationsCommand.ts b/clients/client-s3/src/commands/ListBucketIntelligentTieringConfigurationsCommand.ts index 4bfc47bcce29..c62170449e27 100644 --- a/clients/client-s3/src/commands/ListBucketIntelligentTieringConfigurationsCommand.ts +++ b/clients/client-s3/src/commands/ListBucketIntelligentTieringConfigurationsCommand.ts @@ -119,6 +119,7 @@ export interface ListBucketIntelligentTieringConfigurationsCommandOutput * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* + * * @public */ export class ListBucketIntelligentTieringConfigurationsCommand extends $Command diff --git a/clients/client-s3/src/commands/ListBucketInventoryConfigurationsCommand.ts b/clients/client-s3/src/commands/ListBucketInventoryConfigurationsCommand.ts index 3b77b3ab3c13..8831dd834948 100644 --- a/clients/client-s3/src/commands/ListBucketInventoryConfigurationsCommand.ts +++ b/clients/client-s3/src/commands/ListBucketInventoryConfigurationsCommand.ts @@ -135,6 +135,7 @@ export interface ListBucketInventoryConfigurationsCommandOutput * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* + * * @public */ export class ListBucketInventoryConfigurationsCommand extends $Command diff --git a/clients/client-s3/src/commands/ListBucketMetricsConfigurationsCommand.ts b/clients/client-s3/src/commands/ListBucketMetricsConfigurationsCommand.ts index 7627928a2a75..64c8dea599aa 100644 --- a/clients/client-s3/src/commands/ListBucketMetricsConfigurationsCommand.ts +++ b/clients/client-s3/src/commands/ListBucketMetricsConfigurationsCommand.ts @@ -125,6 +125,7 @@ export interface ListBucketMetricsConfigurationsCommandOutput * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* + * * @public */ export class ListBucketMetricsConfigurationsCommand extends $Command diff --git a/clients/client-s3/src/commands/ListBucketsCommand.ts b/clients/client-s3/src/commands/ListBucketsCommand.ts index 657ed5f0d639..ea416773eb22 100644 --- a/clients/client-s3/src/commands/ListBucketsCommand.ts +++ b/clients/client-s3/src/commands/ListBucketsCommand.ts @@ -68,38 +68,38 @@ export interface ListBucketsCommandOutput extends ListBucketsOutput, __MetadataB * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* - * @public + * * @example To list all buckets * ```javascript - * // The following example returns all the buckets owned by the sender of this request. - * const input = {}; + * /* The following example returns all the buckets owned by the sender of this request. *\/ + * const input = { /* empty *\/ }; * const command = new ListBucketsCommand(input); * const response = await client.send(command); - * /* response == + * /* response is * { - * "Buckets": [ + * Buckets: [ * { - * "CreationDate": "2012-02-15T21:03:02.000Z", - * "Name": "examplebucket" + * CreationDate: "2012-02-15T21:03:02.000Z", + * Name: "examplebucket" * }, * { - * "CreationDate": "2011-07-24T19:33:50.000Z", - * "Name": "examplebucket2" + * CreationDate: "2011-07-24T19:33:50.000Z", + * Name: "examplebucket2" * }, * { - * "CreationDate": "2010-12-17T00:56:49.000Z", - * "Name": "examplebucket3" + * CreationDate: "2010-12-17T00:56:49.000Z", + * Name: "examplebucket3" * } * ], - * "Owner": { - * "DisplayName": "own-display-name", - * "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31" + * Owner: { + * DisplayName: "own-display-name", + * ID: "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31" * } * } * *\/ - * // example id: to-list-buckets-1481910996058 * ``` * + * @public */ export class ListBucketsCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/ListDirectoryBucketsCommand.ts b/clients/client-s3/src/commands/ListDirectoryBucketsCommand.ts index 142dd9ed959d..606bcfa3b6d4 100644 --- a/clients/client-s3/src/commands/ListDirectoryBucketsCommand.ts +++ b/clients/client-s3/src/commands/ListDirectoryBucketsCommand.ts @@ -80,6 +80,7 @@ export interface ListDirectoryBucketsCommandOutput extends ListDirectoryBucketsO * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* + * * @public */ export class ListDirectoryBucketsCommand extends $Command diff --git a/clients/client-s3/src/commands/ListMultipartUploadsCommand.ts b/clients/client-s3/src/commands/ListMultipartUploadsCommand.ts index 3ece88c6a542..5fc029b7587c 100644 --- a/clients/client-s3/src/commands/ListMultipartUploadsCommand.ts +++ b/clients/client-s3/src/commands/ListMultipartUploadsCommand.ts @@ -208,107 +208,52 @@ export interface ListMultipartUploadsCommandOutput extends ListMultipartUploadsO * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* - * @public - * @example To list in-progress multipart uploads on a bucket - * ```javascript - * // The following example lists in-progress multipart uploads on a specific bucket. - * const input = { - * "Bucket": "examplebucket" - * }; - * const command = new ListMultipartUploadsCommand(input); - * const response = await client.send(command); - * /* response == - * { - * "Uploads": [ - * { - * "Initiated": "2014-05-01T05:40:58.000Z", - * "Initiator": { - * "DisplayName": "display-name", - * "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" - * }, - * "Key": "JavaFile", - * "Owner": { - * "DisplayName": "display-name", - * "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" - * }, - * "StorageClass": "STANDARD", - * "UploadId": "examplelUa.CInXklLQtSMJITdUnoZ1Y5GACB5UckOtspm5zbDMCkPF_qkfZzMiFZ6dksmcnqxJyIBvQMG9X9Q--" - * }, - * { - * "Initiated": "2014-05-01T05:41:27.000Z", - * "Initiator": { - * "DisplayName": "display-name", - * "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" - * }, - * "Key": "JavaFile", - * "Owner": { - * "DisplayName": "display-name", - * "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" - * }, - * "StorageClass": "STANDARD", - * "UploadId": "examplelo91lv1iwvWpvCiJWugw2xXLPAD7Z8cJyX9.WiIRgNrdG6Ldsn.9FtS63TCl1Uf5faTB.1U5Ckcbmdw--" - * } - * ] - * } - * *\/ - * // example id: to-list-in-progress-multipart-uploads-on-a-bucket-1481852775260 - * ``` * - * @example List next set of multipart uploads when previous result is truncated + * @example To list in-progress multipart uploads on a bucket * ```javascript - * // The following example specifies the upload-id-marker and key-marker from previous truncated response to retrieve next setup of multipart uploads. + * /* The following example lists in-progress multipart uploads on a specific bucket. *\/ * const input = { - * "Bucket": "examplebucket", - * "KeyMarker": "nextkeyfrompreviousresponse", - * "MaxUploads": "2", - * "UploadIdMarker": "valuefrompreviousresponse" + * Bucket: "examplebucket" * }; * const command = new ListMultipartUploadsCommand(input); * const response = await client.send(command); - * /* response == + * /* response is * { - * "Bucket": "acl1", - * "IsTruncated": true, - * "KeyMarker": "", - * "MaxUploads": "2", - * "NextKeyMarker": "someobjectkey", - * "NextUploadIdMarker": "examplelo91lv1iwvWpvCiJWugw2xXLPAD7Z8cJyX9.WiIRgNrdG6Ldsn.9FtS63TCl1Uf5faTB.1U5Ckcbmdw--", - * "UploadIdMarker": "", - * "Uploads": [ + * Uploads: [ * { - * "Initiated": "2014-05-01T05:40:58.000Z", - * "Initiator": { - * "DisplayName": "ownder-display-name", - * "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" + * Initiated: "2014-05-01T05:40:58.000Z", + * Initiator: { + * DisplayName: "display-name", + * ID: "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" * }, - * "Key": "JavaFile", - * "Owner": { - * "DisplayName": "mohanataws", - * "ID": "852b113e7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" + * Key: "JavaFile", + * Owner: { + * DisplayName: "display-name", + * ID: "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" * }, - * "StorageClass": "STANDARD", - * "UploadId": "gZ30jIqlUa.CInXklLQtSMJITdUnoZ1Y5GACB5UckOtspm5zbDMCkPF_qkfZzMiFZ6dksmcnqxJyIBvQMG9X9Q--" + * StorageClass: "STANDARD", + * UploadId: "examplelUa.CInXklLQtSMJITdUnoZ1Y5GACB5UckOtspm5zbDMCkPF_qkfZzMiFZ6dksmcnqxJyIBvQMG9X9Q--" * }, * { - * "Initiated": "2014-05-01T05:41:27.000Z", - * "Initiator": { - * "DisplayName": "ownder-display-name", - * "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" + * Initiated: "2014-05-01T05:41:27.000Z", + * Initiator: { + * DisplayName: "display-name", + * ID: "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" * }, - * "Key": "JavaFile", - * "Owner": { - * "DisplayName": "ownder-display-name", - * "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" + * Key: "JavaFile", + * Owner: { + * DisplayName: "display-name", + * ID: "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" * }, - * "StorageClass": "STANDARD", - * "UploadId": "b7tZSqIlo91lv1iwvWpvCiJWugw2xXLPAD7Z8cJyX9.WiIRgNrdG6Ldsn.9FtS63TCl1Uf5faTB.1U5Ckcbmdw--" + * StorageClass: "STANDARD", + * UploadId: "examplelo91lv1iwvWpvCiJWugw2xXLPAD7Z8cJyX9.WiIRgNrdG6Ldsn.9FtS63TCl1Uf5faTB.1U5Ckcbmdw--" * } * ] * } * *\/ - * // example id: list-next-set-of-multipart-uploads-when-previous-result-is-truncated-1482428106748 * ``` * + * @public */ export class ListMultipartUploadsCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/ListObjectVersionsCommand.ts b/clients/client-s3/src/commands/ListObjectVersionsCommand.ts index 33a2a8eb7674..e5915bc4c0b4 100644 --- a/clients/client-s3/src/commands/ListObjectVersionsCommand.ts +++ b/clients/client-s3/src/commands/ListObjectVersionsCommand.ts @@ -153,51 +153,51 @@ export interface ListObjectVersionsCommandOutput extends ListObjectVersionsOutpu * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* - * @public + * * @example To list object versions * ```javascript - * // The following example returns versions of an object with specific key name prefix. + * /* The following example returns versions of an object with specific key name prefix. *\/ * const input = { - * "Bucket": "examplebucket", - * "Prefix": "HappyFace.jpg" + * Bucket: "examplebucket", + * Prefix: "HappyFace.jpg" * }; * const command = new ListObjectVersionsCommand(input); * const response = await client.send(command); - * /* response == + * /* response is * { - * "Versions": [ + * Versions: [ * { - * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", - * "IsLatest": true, - * "Key": "HappyFace.jpg", - * "LastModified": "2016-12-15T01:19:41.000Z", - * "Owner": { - * "DisplayName": "owner-display-name", - * "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" + * ETag: ""6805f2cfc46c0f04559748bb039d69ae"", + * IsLatest: true, + * Key: "HappyFace.jpg", + * LastModified: "2016-12-15T01:19:41.000Z", + * Owner: { + * DisplayName: "owner-display-name", + * ID: "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" * }, - * "Size": 3191, - * "StorageClass": "STANDARD", - * "VersionId": "null" + * Size: 3191, + * StorageClass: "STANDARD", + * VersionId: "null" * }, * { - * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", - * "IsLatest": false, - * "Key": "HappyFace.jpg", - * "LastModified": "2016-12-13T00:58:26.000Z", - * "Owner": { - * "DisplayName": "owner-display-name", - * "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" + * ETag: ""6805f2cfc46c0f04559748bb039d69ae"", + * IsLatest: false, + * Key: "HappyFace.jpg", + * LastModified: "2016-12-13T00:58:26.000Z", + * Owner: { + * DisplayName: "owner-display-name", + * ID: "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" * }, - * "Size": 3191, - * "StorageClass": "STANDARD", - * "VersionId": "PHtexPGjH2y.zBgT8LmB7wwLI2mpbz.k" + * Size: 3191, + * StorageClass: "STANDARD", + * VersionId: "PHtexPGjH2y.zBgT8LmB7wwLI2mpbz.k" * } * ] * } * *\/ - * // example id: to-list-object-versions-1481910996058 * ``` * + * @public */ export class ListObjectVersionsCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/ListObjectsCommand.ts b/clients/client-s3/src/commands/ListObjectsCommand.ts index ea5eb5405855..fdf380189981 100644 --- a/clients/client-s3/src/commands/ListObjectsCommand.ts +++ b/clients/client-s3/src/commands/ListObjectsCommand.ts @@ -139,48 +139,8 @@ export interface ListObjectsCommandOutput extends ListObjectsOutput, __MetadataB * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* - * @public - * @example To list objects in a bucket - * ```javascript - * // The following example list two objects in a bucket. - * const input = { - * "Bucket": "examplebucket", - * "MaxKeys": "2" - * }; - * const command = new ListObjectsCommand(input); - * const response = await client.send(command); - * /* response == - * { - * "Contents": [ - * { - * "ETag": "\"70ee1738b6b21e2c8a43f3a5ab0eee71\"", - * "Key": "example1.jpg", - * "LastModified": "2014-11-21T19:40:05.000Z", - * "Owner": { - * "DisplayName": "myname", - * "ID": "12345example25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" - * }, - * "Size": 11, - * "StorageClass": "STANDARD" - * }, - * { - * "ETag": "\"9c8af9a76df052144598c115ef33e511\"", - * "Key": "example2.jpg", - * "LastModified": "2013-11-15T01:10:49.000Z", - * "Owner": { - * "DisplayName": "myname", - * "ID": "12345example25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" - * }, - * "Size": 713193, - * "StorageClass": "STANDARD" - * } - * ], - * "NextMarker": "eyJNYXJrZXIiOiBudWxsLCAiYm90b190cnVuY2F0ZV9hbW91bnQiOiAyfQ==" - * } - * *\/ - * // example id: to-list-objects-in-a-bucket-1473447646507 - * ``` * + * @public */ export class ListObjectsCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/ListObjectsV2Command.ts b/clients/client-s3/src/commands/ListObjectsV2Command.ts index 71050a630e4e..089ae030d55f 100644 --- a/clients/client-s3/src/commands/ListObjectsV2Command.ts +++ b/clients/client-s3/src/commands/ListObjectsV2Command.ts @@ -183,45 +183,8 @@ export interface ListObjectsV2CommandOutput extends ListObjectsV2Output, __Metad * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* - * @public - * @example To get object list - * ```javascript - * // The following example retrieves object list. The request specifies max keys to limit response to include only 2 object keys. - * const input = { - * "Bucket": "DOC-EXAMPLE-BUCKET", - * "MaxKeys": "2" - * }; - * const command = new ListObjectsV2Command(input); - * const response = await client.send(command); - * /* response == - * { - * "Contents": [ - * { - * "ETag": "\"70ee1738b6b21e2c8a43f3a5ab0eee71\"", - * "Key": "happyface.jpg", - * "LastModified": "2014-11-21T19:40:05.000Z", - * "Size": 11, - * "StorageClass": "STANDARD" - * }, - * { - * "ETag": "\"becf17f89c30367a9a44495d62ed521a-1\"", - * "Key": "test.jpg", - * "LastModified": "2014-05-02T04:51:50.000Z", - * "Size": 4192256, - * "StorageClass": "STANDARD" - * } - * ], - * "IsTruncated": true, - * "KeyCount": "2", - * "MaxKeys": "2", - * "Name": "DOC-EXAMPLE-BUCKET", - * "NextContinuationToken": "1w41l63U0xa8q7smH50vCxyTQqdxo69O3EmK28Bi5PcROI4wI/EyIJg==", - * "Prefix": "" - * } - * *\/ - * // example id: to-get-object-list - * ``` * + * @public */ export class ListObjectsV2Command extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/ListPartsCommand.ts b/clients/client-s3/src/commands/ListPartsCommand.ts index a5b9d0e4c50a..568e871bf713 100644 --- a/clients/client-s3/src/commands/ListPartsCommand.ts +++ b/clients/client-s3/src/commands/ListPartsCommand.ts @@ -177,47 +177,8 @@ export interface ListPartsCommandOutput extends ListPartsOutput, __MetadataBeare * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* - * @public - * @example To list parts of a multipart upload. - * ```javascript - * // The following example lists parts uploaded for a specific multipart upload. - * const input = { - * "Bucket": "examplebucket", - * "Key": "bigobject", - * "UploadId": "example7YPBOJuoFiQ9cz4P3Pe6FIZwO4f7wN93uHsNBEw97pl5eNwzExg0LAT2dUN91cOmrEQHDsP3WA60CEg--" - * }; - * const command = new ListPartsCommand(input); - * const response = await client.send(command); - * /* response == - * { - * "Initiator": { - * "DisplayName": "owner-display-name", - * "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" - * }, - * "Owner": { - * "DisplayName": "owner-display-name", - * "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" - * }, - * "Parts": [ - * { - * "ETag": "\"d8c2eafd90c266e19ab9dcacc479f8af\"", - * "LastModified": "2016-12-16T00:11:42.000Z", - * "PartNumber": "1", - * "Size": 26246026 - * }, - * { - * "ETag": "\"d8c2eafd90c266e19ab9dcacc479f8af\"", - * "LastModified": "2016-12-16T00:15:01.000Z", - * "PartNumber": "2", - * "Size": 26246026 - * } - * ], - * "StorageClass": "STANDARD" - * } - * *\/ - * // example id: to-list-parts-of-a-multipart-upload-1481852006923 - * ``` * + * @public */ export class ListPartsCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/PutBucketAccelerateConfigurationCommand.ts b/clients/client-s3/src/commands/PutBucketAccelerateConfigurationCommand.ts index 63f0c164aa6a..cf4bae5c0683 100644 --- a/clients/client-s3/src/commands/PutBucketAccelerateConfigurationCommand.ts +++ b/clients/client-s3/src/commands/PutBucketAccelerateConfigurationCommand.ts @@ -103,6 +103,7 @@ export interface PutBucketAccelerateConfigurationCommandOutput extends __Metadat * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* + * * @public */ export class PutBucketAccelerateConfigurationCommand extends $Command diff --git a/clients/client-s3/src/commands/PutBucketAclCommand.ts b/clients/client-s3/src/commands/PutBucketAclCommand.ts index 976e9e2c3be2..1f13bb1c5686 100644 --- a/clients/client-s3/src/commands/PutBucketAclCommand.ts +++ b/clients/client-s3/src/commands/PutBucketAclCommand.ts @@ -281,20 +281,23 @@ export interface PutBucketAclCommandOutput extends __MetadataBearer {} * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* - * @public + * * @example Put bucket acl * ```javascript - * // The following example replaces existing ACL on a bucket. The ACL grants the bucket owner (specified using the owner ID) and write permission to the LogDelivery group. Because this is a replace operation, you must specify all the grants in your request. To incrementally add or remove ACL grants, you might use the console. + * /* The following example replaces existing ACL on a bucket. The ACL grants the bucket owner (specified using the owner ID) and write permission to the LogDelivery group. Because this is a replace operation, you must specify all the grants in your request. To incrementally add or remove ACL grants, you might use the console. *\/ * const input = { - * "Bucket": "examplebucket", - * "GrantFullControl": "id=examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484", - * "GrantWrite": "uri=http://acs.amazonaws.com/groups/s3/LogDelivery" + * Bucket: "examplebucket", + * GrantFullControl: "id=examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484", + * GrantWrite: "uri=http://acs.amazonaws.com/groups/s3/LogDelivery" * }; * const command = new PutBucketAclCommand(input); - * await client.send(command); - * // example id: put-bucket-acl-1482260397033 + * const response = await client.send(command); + * /* response is + * { /* metadata only *\/ } + * *\/ * ``` * + * @public */ export class PutBucketAclCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/PutBucketAnalyticsConfigurationCommand.ts b/clients/client-s3/src/commands/PutBucketAnalyticsConfigurationCommand.ts index fba4ffbe04fe..a93464bfb5fb 100644 --- a/clients/client-s3/src/commands/PutBucketAnalyticsConfigurationCommand.ts +++ b/clients/client-s3/src/commands/PutBucketAnalyticsConfigurationCommand.ts @@ -195,6 +195,7 @@ export interface PutBucketAnalyticsConfigurationCommandOutput extends __Metadata * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* + * * @public */ export class PutBucketAnalyticsConfigurationCommand extends $Command diff --git a/clients/client-s3/src/commands/PutBucketCorsCommand.ts b/clients/client-s3/src/commands/PutBucketCorsCommand.ts index 76fa3c5b1b3d..efeef062eb45 100644 --- a/clients/client-s3/src/commands/PutBucketCorsCommand.ts +++ b/clients/client-s3/src/commands/PutBucketCorsCommand.ts @@ -133,52 +133,55 @@ export interface PutBucketCorsCommandOutput extends __MetadataBearer {} * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* - * @public + * * @example To set cors configuration on a bucket. * ```javascript - * // The following example enables PUT, POST, and DELETE requests from www.example.com, and enables GET requests from any domain. + * /* The following example enables PUT, POST, and DELETE requests from www.example.com, and enables GET requests from any domain. *\/ * const input = { - * "Bucket": "", - * "CORSConfiguration": { - * "CORSRules": [ + * Bucket: "", + * CORSConfiguration: { + * CORSRules: [ * { - * "AllowedHeaders": [ + * AllowedHeaders: [ * "*" * ], - * "AllowedMethods": [ + * AllowedMethods: [ * "PUT", * "POST", * "DELETE" * ], - * "AllowedOrigins": [ + * AllowedOrigins: [ * "http://www.example.com" * ], - * "ExposeHeaders": [ + * ExposeHeaders: [ * "x-amz-server-side-encryption" * ], - * "MaxAgeSeconds": 3000 + * MaxAgeSeconds: 3000 * }, * { - * "AllowedHeaders": [ + * AllowedHeaders: [ * "Authorization" * ], - * "AllowedMethods": [ + * AllowedMethods: [ * "GET" * ], - * "AllowedOrigins": [ + * AllowedOrigins: [ * "*" * ], - * "MaxAgeSeconds": 3000 + * MaxAgeSeconds: 3000 * } * ] * }, - * "ContentMD5": "" + * ContentMD5: "" * }; * const command = new PutBucketCorsCommand(input); - * await client.send(command); - * // example id: to-set-cors-configuration-on-a-bucket-1483037818805 + * const response = await client.send(command); + * /* response is + * { /* metadata only *\/ } + * *\/ * ``` * + * @public */ export class PutBucketCorsCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/PutBucketEncryptionCommand.ts b/clients/client-s3/src/commands/PutBucketEncryptionCommand.ts index ecd16c8564c6..de4b1cf9c674 100644 --- a/clients/client-s3/src/commands/PutBucketEncryptionCommand.ts +++ b/clients/client-s3/src/commands/PutBucketEncryptionCommand.ts @@ -101,6 +101,7 @@ export interface PutBucketEncryptionCommandOutput extends __MetadataBearer {} * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* + * * @public */ export class PutBucketEncryptionCommand extends $Command diff --git a/clients/client-s3/src/commands/PutBucketIntelligentTieringConfigurationCommand.ts b/clients/client-s3/src/commands/PutBucketIntelligentTieringConfigurationCommand.ts index 132f19572d80..0042277b4608 100644 --- a/clients/client-s3/src/commands/PutBucketIntelligentTieringConfigurationCommand.ts +++ b/clients/client-s3/src/commands/PutBucketIntelligentTieringConfigurationCommand.ts @@ -141,6 +141,7 @@ export interface PutBucketIntelligentTieringConfigurationCommandOutput extends _ * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* + * * @public */ export class PutBucketIntelligentTieringConfigurationCommand extends $Command diff --git a/clients/client-s3/src/commands/PutBucketInventoryConfigurationCommand.ts b/clients/client-s3/src/commands/PutBucketInventoryConfigurationCommand.ts index 44dddcb8e37c..6c57eaa92e48 100644 --- a/clients/client-s3/src/commands/PutBucketInventoryConfigurationCommand.ts +++ b/clients/client-s3/src/commands/PutBucketInventoryConfigurationCommand.ts @@ -175,6 +175,7 @@ export interface PutBucketInventoryConfigurationCommandOutput extends __Metadata * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* + * * @public */ export class PutBucketInventoryConfigurationCommand extends $Command diff --git a/clients/client-s3/src/commands/PutBucketLifecycleConfigurationCommand.ts b/clients/client-s3/src/commands/PutBucketLifecycleConfigurationCommand.ts index 9dda273bbbc9..740a185c3728 100644 --- a/clients/client-s3/src/commands/PutBucketLifecycleConfigurationCommand.ts +++ b/clients/client-s3/src/commands/PutBucketLifecycleConfigurationCommand.ts @@ -205,27 +205,27 @@ export interface PutBucketLifecycleConfigurationCommandOutput extends __Metadata * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* - * @public + * * @example Put bucket lifecycle * ```javascript - * // The following example replaces existing lifecycle configuration, if any, on the specified bucket. + * /* The following example replaces existing lifecycle configuration, if any, on the specified bucket. *\/ * const input = { - * "Bucket": "examplebucket", - * "LifecycleConfiguration": { - * "Rules": [ + * Bucket: "examplebucket", + * LifecycleConfiguration: { + * Rules: [ * { - * "Expiration": { - * "Days": 3650 + * Expiration: { + * Days: 3650 * }, - * "Filter": { - * "Prefix": "documents/" + * Filter: { + * Prefix: "documents/" * }, - * "ID": "TestOnly", - * "Status": "Enabled", - * "Transitions": [ + * ID: "TestOnly", + * Status: "Enabled", + * Transitions: [ * { - * "Days": 365, - * "StorageClass": "GLACIER" + * Days: 365, + * StorageClass: "GLACIER" * } * ] * } @@ -233,10 +233,13 @@ export interface PutBucketLifecycleConfigurationCommandOutput extends __Metadata * } * }; * const command = new PutBucketLifecycleConfigurationCommand(input); - * await client.send(command); - * // example id: put-bucket-lifecycle-1482264533092 + * const response = await client.send(command); + * /* response is + * { /* metadata only *\/ } + * *\/ * ``` * + * @public */ export class PutBucketLifecycleConfigurationCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/PutBucketLoggingCommand.ts b/clients/client-s3/src/commands/PutBucketLoggingCommand.ts index d9c916296e0a..5647dafaaf6b 100644 --- a/clients/client-s3/src/commands/PutBucketLoggingCommand.ts +++ b/clients/client-s3/src/commands/PutBucketLoggingCommand.ts @@ -168,33 +168,36 @@ export interface PutBucketLoggingCommandOutput extends __MetadataBearer {} * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* - * @public + * * @example Set logging configuration for a bucket * ```javascript - * // The following example sets logging policy on a bucket. For the Log Delivery group to deliver logs to the destination bucket, it needs permission for the READ_ACP action which the policy grants. + * /* The following example sets logging policy on a bucket. For the Log Delivery group to deliver logs to the destination bucket, it needs permission for the READ_ACP action which the policy grants. *\/ * const input = { - * "Bucket": "sourcebucket", - * "BucketLoggingStatus": { - * "LoggingEnabled": { - * "TargetBucket": "targetbucket", - * "TargetGrants": [ + * Bucket: "sourcebucket", + * BucketLoggingStatus: { + * LoggingEnabled: { + * TargetBucket: "targetbucket", + * TargetGrants: [ * { - * "Grantee": { - * "Type": "Group", - * "URI": "http://acs.amazonaws.com/groups/global/AllUsers" + * Grantee: { + * Type: "Group", + * URI: "http://acs.amazonaws.com/groups/global/AllUsers" * }, - * "Permission": "READ" + * Permission: "READ" * } * ], - * "TargetPrefix": "MyBucketLogs/" + * TargetPrefix: "MyBucketLogs/" * } * } * }; * const command = new PutBucketLoggingCommand(input); - * await client.send(command); - * // example id: set-logging-configuration-for-a-bucket-1482269119909 + * const response = await client.send(command); + * /* response is + * { /* metadata only *\/ } + * *\/ * ``` * + * @public */ export class PutBucketLoggingCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/PutBucketMetricsConfigurationCommand.ts b/clients/client-s3/src/commands/PutBucketMetricsConfigurationCommand.ts index 19a79a6210ec..e5a9d23d4c16 100644 --- a/clients/client-s3/src/commands/PutBucketMetricsConfigurationCommand.ts +++ b/clients/client-s3/src/commands/PutBucketMetricsConfigurationCommand.ts @@ -128,6 +128,7 @@ export interface PutBucketMetricsConfigurationCommandOutput extends __MetadataBe * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* + * * @public */ export class PutBucketMetricsConfigurationCommand extends $Command diff --git a/clients/client-s3/src/commands/PutBucketNotificationConfigurationCommand.ts b/clients/client-s3/src/commands/PutBucketNotificationConfigurationCommand.ts index 2016d33b9769..f4fcfec51530 100644 --- a/clients/client-s3/src/commands/PutBucketNotificationConfigurationCommand.ts +++ b/clients/client-s3/src/commands/PutBucketNotificationConfigurationCommand.ts @@ -172,28 +172,31 @@ export interface PutBucketNotificationConfigurationCommandOutput extends __Metad * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* - * @public + * * @example Set notification configuration for a bucket * ```javascript - * // The following example sets notification configuration on a bucket to publish the object created events to an SNS topic. + * /* The following example sets notification configuration on a bucket to publish the object created events to an SNS topic. *\/ * const input = { - * "Bucket": "examplebucket", - * "NotificationConfiguration": { - * "TopicConfigurations": [ + * Bucket: "examplebucket", + * NotificationConfiguration: { + * TopicConfigurations: [ * { - * "Events": [ + * Events: [ * "s3:ObjectCreated:*" * ], - * "TopicArn": "arn:aws:sns:us-west-2:123456789012:s3-notification-topic" + * TopicArn: "arn:aws:sns:us-west-2:123456789012:s3-notification-topic" * } * ] * } * }; * const command = new PutBucketNotificationConfigurationCommand(input); - * await client.send(command); - * // example id: set-notification-configuration-for-a-bucket-1482270296426 + * const response = await client.send(command); + * /* response is + * { /* metadata only *\/ } + * *\/ * ``` * + * @public */ export class PutBucketNotificationConfigurationCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/PutBucketOwnershipControlsCommand.ts b/clients/client-s3/src/commands/PutBucketOwnershipControlsCommand.ts index b30fbc2f0a27..b211f1f824db 100644 --- a/clients/client-s3/src/commands/PutBucketOwnershipControlsCommand.ts +++ b/clients/client-s3/src/commands/PutBucketOwnershipControlsCommand.ts @@ -84,6 +84,7 @@ export interface PutBucketOwnershipControlsCommandOutput extends __MetadataBeare * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* + * * @public */ export class PutBucketOwnershipControlsCommand extends $Command diff --git a/clients/client-s3/src/commands/PutBucketPolicyCommand.ts b/clients/client-s3/src/commands/PutBucketPolicyCommand.ts index b27ab54fcd1e..bbbf08a4a659 100644 --- a/clients/client-s3/src/commands/PutBucketPolicyCommand.ts +++ b/clients/client-s3/src/commands/PutBucketPolicyCommand.ts @@ -125,19 +125,22 @@ export interface PutBucketPolicyCommandOutput extends __MetadataBearer {} * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* - * @public + * * @example Set bucket policy * ```javascript - * // The following example sets a permission policy on a bucket. + * /* The following example sets a permission policy on a bucket. *\/ * const input = { - * "Bucket": "examplebucket", - * "Policy": "{\"Version\": \"2012-10-17\", \"Statement\": [{ \"Sid\": \"id-1\",\"Effect\": \"Allow\",\"Principal\": {\"AWS\": \"arn:aws:iam::123456789012:root\"}, \"Action\": [ \"s3:PutObject\",\"s3:PutObjectAcl\"], \"Resource\": [\"arn:aws:s3:::acl3/*\" ] } ]}" + * Bucket: "examplebucket", + * Policy: "{"Version": "2012-10-17", "Statement": [{ "Sid": "id-1","Effect": "Allow","Principal": {"AWS": "arn:aws:iam::123456789012:root"}, "Action": [ "s3:PutObject","s3:PutObjectAcl"], "Resource": ["arn:aws:s3:::acl3/*" ] } ]}" * }; * const command = new PutBucketPolicyCommand(input); - * await client.send(command); - * // example id: set-bucket-policy-1482448903302 + * const response = await client.send(command); + * /* response is + * { /* metadata only *\/ } + * *\/ * ``` * + * @public */ export class PutBucketPolicyCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/PutBucketReplicationCommand.ts b/clients/client-s3/src/commands/PutBucketReplicationCommand.ts index 6d49272bb2c9..3f1f654b074c 100644 --- a/clients/client-s3/src/commands/PutBucketReplicationCommand.ts +++ b/clients/client-s3/src/commands/PutBucketReplicationCommand.ts @@ -195,31 +195,34 @@ export interface PutBucketReplicationCommandOutput extends __MetadataBearer {} * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* - * @public + * * @example Set replication configuration on a bucket * ```javascript - * // The following example sets replication configuration on a bucket. + * /* The following example sets replication configuration on a bucket. *\/ * const input = { - * "Bucket": "examplebucket", - * "ReplicationConfiguration": { - * "Role": "arn:aws:iam::123456789012:role/examplerole", - * "Rules": [ + * Bucket: "examplebucket", + * ReplicationConfiguration: { + * Role: "arn:aws:iam::123456789012:role/examplerole", + * Rules: [ * { - * "Destination": { - * "Bucket": "arn:aws:s3:::destinationbucket", - * "StorageClass": "STANDARD" + * Destination: { + * Bucket: "arn:aws:s3:::destinationbucket", + * StorageClass: "STANDARD" * }, - * "Prefix": "", - * "Status": "Enabled" + * Prefix: "", + * Status: "Enabled" * } * ] * } * }; * const command = new PutBucketReplicationCommand(input); - * await client.send(command); - * // example id: id-1 + * const response = await client.send(command); + * /* response is + * { /* metadata only *\/ } + * *\/ * ``` * + * @public */ export class PutBucketReplicationCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/PutBucketRequestPaymentCommand.ts b/clients/client-s3/src/commands/PutBucketRequestPaymentCommand.ts index 8d47ba75f018..c905d4646151 100644 --- a/clients/client-s3/src/commands/PutBucketRequestPaymentCommand.ts +++ b/clients/client-s3/src/commands/PutBucketRequestPaymentCommand.ts @@ -80,21 +80,24 @@ export interface PutBucketRequestPaymentCommandOutput extends __MetadataBearer { * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* - * @public + * * @example Set request payment configuration on a bucket. * ```javascript - * // The following example sets request payment configuration on a bucket so that person requesting the download is charged. + * /* The following example sets request payment configuration on a bucket so that person requesting the download is charged. *\/ * const input = { - * "Bucket": "examplebucket", - * "RequestPaymentConfiguration": { - * "Payer": "Requester" + * Bucket: "examplebucket", + * RequestPaymentConfiguration: { + * Payer: "Requester" * } * }; * const command = new PutBucketRequestPaymentCommand(input); - * await client.send(command); - * // example id: set-request-payment-configuration-on-a-bucket-1482343596680 + * const response = await client.send(command); + * /* response is + * { /* metadata only *\/ } + * *\/ * ``` * + * @public */ export class PutBucketRequestPaymentCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/PutBucketTaggingCommand.ts b/clients/client-s3/src/commands/PutBucketTaggingCommand.ts index 2135a118e4f5..76cac8209cf6 100644 --- a/clients/client-s3/src/commands/PutBucketTaggingCommand.ts +++ b/clients/client-s3/src/commands/PutBucketTaggingCommand.ts @@ -125,30 +125,33 @@ export interface PutBucketTaggingCommandOutput extends __MetadataBearer {} * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* - * @public + * * @example Set tags on a bucket * ```javascript - * // The following example sets tags on a bucket. Any existing tags are replaced. + * /* The following example sets tags on a bucket. Any existing tags are replaced. *\/ * const input = { - * "Bucket": "examplebucket", - * "Tagging": { - * "TagSet": [ + * Bucket: "examplebucket", + * Tagging: { + * TagSet: [ * { - * "Key": "Key1", - * "Value": "Value1" + * Key: "Key1", + * Value: "Value1" * }, * { - * "Key": "Key2", - * "Value": "Value2" + * Key: "Key2", + * Value: "Value2" * } * ] * } * }; * const command = new PutBucketTaggingCommand(input); - * await client.send(command); - * // example id: set-tags-on-a-bucket-1482346269066 + * const response = await client.send(command); + * /* response is + * { /* metadata only *\/ } + * *\/ * ``` * + * @public */ export class PutBucketTaggingCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/PutBucketVersioningCommand.ts b/clients/client-s3/src/commands/PutBucketVersioningCommand.ts index ae2ee3230358..b4b85ed48979 100644 --- a/clients/client-s3/src/commands/PutBucketVersioningCommand.ts +++ b/clients/client-s3/src/commands/PutBucketVersioningCommand.ts @@ -105,22 +105,25 @@ export interface PutBucketVersioningCommandOutput extends __MetadataBearer {} * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* - * @public + * * @example Set versioning configuration on a bucket * ```javascript - * // The following example sets versioning configuration on bucket. The configuration enables versioning on the bucket. + * /* The following example sets versioning configuration on bucket. The configuration enables versioning on the bucket. *\/ * const input = { - * "Bucket": "examplebucket", - * "VersioningConfiguration": { - * "MFADelete": "Disabled", - * "Status": "Enabled" + * Bucket: "examplebucket", + * VersioningConfiguration: { + * MFADelete: "Disabled", + * Status: "Enabled" * } * }; * const command = new PutBucketVersioningCommand(input); - * await client.send(command); - * // example id: set-versioning-configuration-on-a-bucket-1482344186279 + * const response = await client.send(command); + * /* response is + * { /* metadata only *\/ } + * *\/ * ``` * + * @public */ export class PutBucketVersioningCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/PutBucketWebsiteCommand.ts b/clients/client-s3/src/commands/PutBucketWebsiteCommand.ts index 8709d1259dd5..54bcc4dfee04 100644 --- a/clients/client-s3/src/commands/PutBucketWebsiteCommand.ts +++ b/clients/client-s3/src/commands/PutBucketWebsiteCommand.ts @@ -209,27 +209,30 @@ export interface PutBucketWebsiteCommandOutput extends __MetadataBearer {} * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* - * @public + * * @example Set website configuration on a bucket * ```javascript - * // The following example adds website configuration to a bucket. + * /* The following example adds website configuration to a bucket. *\/ * const input = { - * "Bucket": "examplebucket", - * "ContentMD5": "", - * "WebsiteConfiguration": { - * "ErrorDocument": { - * "Key": "error.html" + * Bucket: "examplebucket", + * ContentMD5: "", + * WebsiteConfiguration: { + * ErrorDocument: { + * Key: "error.html" * }, - * "IndexDocument": { - * "Suffix": "index.html" + * IndexDocument: { + * Suffix: "index.html" * } * } * }; * const command = new PutBucketWebsiteCommand(input); - * await client.send(command); - * // example id: set-website-configuration-on-a-bucket-1482346836261 + * const response = await client.send(command); + * /* response is + * { /* metadata only *\/ } + * *\/ * ``` * + * @public */ export class PutBucketWebsiteCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/PutObjectAclCommand.ts b/clients/client-s3/src/commands/PutObjectAclCommand.ts index b4f4e70abc6f..921fe0c473d9 100644 --- a/clients/client-s3/src/commands/PutObjectAclCommand.ts +++ b/clients/client-s3/src/commands/PutObjectAclCommand.ts @@ -277,22 +277,25 @@ export interface PutObjectAclCommandOutput extends PutObjectAclOutput, __Metadat * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* - * @public + * * @example To grant permissions using object ACL * ```javascript - * // The following example adds grants to an object ACL. The first permission grants user1 and user2 FULL_CONTROL and the AllUsers group READ permission. + * /* The following example adds grants to an object ACL. The first permission grants user1 and user2 FULL_CONTROL and the AllUsers group READ permission. *\/ * const input = { - * "AccessControlPolicy": {}, - * "Bucket": "examplebucket", - * "GrantFullControl": "emailaddress=user1@example.com,emailaddress=user2@example.com", - * "GrantRead": "uri=http://acs.amazonaws.com/groups/global/AllUsers", - * "Key": "HappyFace.jpg" + * AccessControlPolicy: { /* empty *\/ }, + * Bucket: "examplebucket", + * GrantFullControl: "emailaddress=user1@example.com,emailaddress=user2@example.com", + * GrantRead: "uri=http://acs.amazonaws.com/groups/global/AllUsers", + * Key: "HappyFace.jpg" * }; * const command = new PutObjectAclCommand(input); - * await client.send(command); - * // example id: to-grant-permissions-using-object-acl-1481835549285 + * const response = await client.send(command); + * /* response is + * { /* empty *\/ } + * *\/ * ``` * + * @public */ export class PutObjectAclCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/PutObjectCommand.ts b/clients/client-s3/src/commands/PutObjectCommand.ts index 158d99723276..bed93fe18fc9 100644 --- a/clients/client-s3/src/commands/PutObjectCommand.ts +++ b/clients/client-s3/src/commands/PutObjectCommand.ts @@ -244,152 +244,146 @@ export interface PutObjectCommandOutput extends PutObjectOutput, __MetadataBeare * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* - * @public + * * @example To upload an object and specify server-side encryption and object tags * ```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 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": "filetoupload", - * "Bucket": "examplebucket", - * "Key": "exampleobject", - * "ServerSideEncryption": "AES256", - * "Tagging": "key1=value1&key2=value2" + * Body: "filetoupload", + * Bucket: "examplebucket", + * Key: "exampleobject", + * ServerSideEncryption: "AES256", + * Tagging: "key1=value1&key2=value2" * }; * const command = new PutObjectCommand(input); * const response = await client.send(command); - * /* response == + * /* response is * { - * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", - * "ServerSideEncryption": "AES256", - * "VersionId": "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt" + * ETag: ""6805f2cfc46c0f04559748bb039d69ae"", + * ServerSideEncryption: "AES256", + * VersionId: "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt" * } * *\/ - * // example id: to-upload-an-object-and-specify-server-side-encryption-and-object-tags-1483398331831 * ``` * * @example To create an object. * ```javascript - * // The following example creates an object. If the bucket is versioning enabled, S3 returns version ID in response. + * /* The following example creates an object. If the bucket is versioning enabled, S3 returns version ID in response. *\/ * const input = { - * "Body": "filetoupload", - * "Bucket": "examplebucket", - * "Key": "objectkey" + * Body: "filetoupload", + * Bucket: "examplebucket", + * Key: "objectkey" * }; * const command = new PutObjectCommand(input); * const response = await client.send(command); - * /* response == + * /* response is * { - * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", - * "VersionId": "Bvq0EDKxOcXLJXNo_Lkz37eM3R4pfzyQ" + * ETag: ""6805f2cfc46c0f04559748bb039d69ae"", + * VersionId: "Bvq0EDKxOcXLJXNo_Lkz37eM3R4pfzyQ" * } * *\/ - * // example id: to-create-an-object-1483147613675 * ``` * * @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. + * /* 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" + * 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 == + * /* response is * { - * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", - * "ServerSideEncryption": "AES256", - * "VersionId": "CG612hodqujkf8FaaNfp8U..FIhLROcp" + * ETag: ""6805f2cfc46c0f04559748bb039d69ae"", + * ServerSideEncryption: "AES256", + * VersionId: "CG612hodqujkf8FaaNfp8U..FIhLROcp" * } * *\/ - * // example id: to-upload-an-object-(specify-optional-headers) * ``` * * @example To upload an object and specify optional 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 optional object tags. The bucket is versioned, therefore S3 returns version ID of the newly created object. *\/ * const input = { - * "Body": "c:\\HappyFace.jpg", - * "Bucket": "examplebucket", - * "Key": "HappyFace.jpg", - * "Tagging": "key1=value1&key2=value2" + * Body: "c:\HappyFace.jpg", + * Bucket: "examplebucket", + * Key: "HappyFace.jpg", + * Tagging: "key1=value1&key2=value2" * }; * const command = new PutObjectCommand(input); * const response = await client.send(command); - * /* response == + * /* response is * { - * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", - * "VersionId": "psM2sYY4.o1501dSx8wMvnkOzSBB.V4a" + * ETag: ""6805f2cfc46c0f04559748bb039d69ae"", + * VersionId: "psM2sYY4.o1501dSx8wMvnkOzSBB.V4a" * } * *\/ - * // example id: to-upload-an-object-and-specify-optional-tags-1481762310955 * ``` * * @example To upload object and specify user-defined metadata * ```javascript - * // The following example creates an object. The request also specifies optional metadata. If the bucket is versioning enabled, S3 returns version ID in response. + * /* The following example creates an object. The request also specifies optional metadata. If the bucket is versioning enabled, S3 returns version ID in response. *\/ * const input = { - * "Body": "filetoupload", - * "Bucket": "examplebucket", - * "Key": "exampleobject", - * "Metadata": { - * "metadata1": "value1", - * "metadata2": "value2" + * Body: "filetoupload", + * Bucket: "examplebucket", + * Key: "exampleobject", + * Metadata: { + * metadata1: "value1", + * metadata2: "value2" * } * }; * const command = new PutObjectCommand(input); * const response = await client.send(command); - * /* response == + * /* response is * { - * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", - * "VersionId": "pSKidl4pHBiNwukdbcPXAIs.sshFFOc0" + * ETag: ""6805f2cfc46c0f04559748bb039d69ae"", + * VersionId: "pSKidl4pHBiNwukdbcPXAIs.sshFFOc0" * } * *\/ - * // example id: to-upload-object-and-specify-user-defined-metadata-1483396974757 * ``` * * @example To upload an object and specify canned ACL. * ```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 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" + * ACL: "authenticated-read", + * Body: "filetoupload", + * Bucket: "examplebucket", + * Key: "exampleobject" * }; * const command = new PutObjectCommand(input); * const response = await client.send(command); - * /* response == + * /* response is * { - * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", - * "VersionId": "Kirh.unyZwjQ69YxcQLA8z4F5j3kJJKr" + * ETag: ""6805f2cfc46c0f04559748bb039d69ae"", + * VersionId: "Kirh.unyZwjQ69YxcQLA8z4F5j3kJJKr" * } * *\/ - * // example id: to-upload-an-object-and-specify-canned-acl-1483397779571 * ``` * * @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. + * /* 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" + * Body: "HappyFace.jpg", + * Bucket: "examplebucket", + * Key: "HappyFace.jpg" * }; * const command = new PutObjectCommand(input); * const response = await client.send(command); - * /* response == + * /* response is * { - * "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", - * "VersionId": "tpf3zF08nBplQK1XLOefGskR7mGDwcDk" + * ETag: ""6805f2cfc46c0f04559748bb039d69ae"", + * VersionId: "tpf3zF08nBplQK1XLOefGskR7mGDwcDk" * } * *\/ - * // example id: to-upload-an-object-1481760101010 * ``` * + * @public */ export class PutObjectCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/PutObjectLegalHoldCommand.ts b/clients/client-s3/src/commands/PutObjectLegalHoldCommand.ts index 80d427dfd734..c062591eae7d 100644 --- a/clients/client-s3/src/commands/PutObjectLegalHoldCommand.ts +++ b/clients/client-s3/src/commands/PutObjectLegalHoldCommand.ts @@ -71,6 +71,7 @@ export interface PutObjectLegalHoldCommandOutput extends PutObjectLegalHoldOutpu * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* + * * @public */ export class PutObjectLegalHoldCommand extends $Command diff --git a/clients/client-s3/src/commands/PutObjectLockConfigurationCommand.ts b/clients/client-s3/src/commands/PutObjectLockConfigurationCommand.ts index b1bbe0cf30a4..d42a9889ee89 100644 --- a/clients/client-s3/src/commands/PutObjectLockConfigurationCommand.ts +++ b/clients/client-s3/src/commands/PutObjectLockConfigurationCommand.ts @@ -94,6 +94,7 @@ export interface PutObjectLockConfigurationCommandOutput extends PutObjectLockCo * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* + * * @public */ export class PutObjectLockConfigurationCommand extends $Command diff --git a/clients/client-s3/src/commands/PutObjectRetentionCommand.ts b/clients/client-s3/src/commands/PutObjectRetentionCommand.ts index cfa30340fb22..4a4111501ed1 100644 --- a/clients/client-s3/src/commands/PutObjectRetentionCommand.ts +++ b/clients/client-s3/src/commands/PutObjectRetentionCommand.ts @@ -74,6 +74,7 @@ export interface PutObjectRetentionCommandOutput extends PutObjectRetentionOutpu * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* + * * @public */ export class PutObjectRetentionCommand extends $Command diff --git a/clients/client-s3/src/commands/PutObjectTaggingCommand.ts b/clients/client-s3/src/commands/PutObjectTaggingCommand.ts index 038c99507a19..c3613b958dfc 100644 --- a/clients/client-s3/src/commands/PutObjectTaggingCommand.ts +++ b/clients/client-s3/src/commands/PutObjectTaggingCommand.ts @@ -125,36 +125,36 @@ export interface PutObjectTaggingCommandOutput extends PutObjectTaggingOutput, _ * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* - * @public + * * @example To add tags to an existing object * ```javascript - * // The following example adds tags to an existing object. + * /* The following example adds tags to an existing object. *\/ * const input = { - * "Bucket": "examplebucket", - * "Key": "HappyFace.jpg", - * "Tagging": { - * "TagSet": [ + * Bucket: "examplebucket", + * Key: "HappyFace.jpg", + * Tagging: { + * TagSet: [ * { - * "Key": "Key3", - * "Value": "Value3" + * Key: "Key3", + * Value: "Value3" * }, * { - * "Key": "Key4", - * "Value": "Value4" + * Key: "Key4", + * Value: "Value4" * } * ] * } * }; * const command = new PutObjectTaggingCommand(input); * const response = await client.send(command); - * /* response == + * /* response is * { - * "VersionId": "null" + * VersionId: "null" * } * *\/ - * // example id: to-add-tags-to-an-existing-object-1481764668793 * ``` * + * @public */ export class PutObjectTaggingCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/PutPublicAccessBlockCommand.ts b/clients/client-s3/src/commands/PutPublicAccessBlockCommand.ts index 1d2af629d1fc..31921c9d7fa7 100644 --- a/clients/client-s3/src/commands/PutPublicAccessBlockCommand.ts +++ b/clients/client-s3/src/commands/PutPublicAccessBlockCommand.ts @@ -102,6 +102,7 @@ export interface PutPublicAccessBlockCommandOutput extends __MetadataBearer {} * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* + * * @public */ export class PutPublicAccessBlockCommand extends $Command diff --git a/clients/client-s3/src/commands/RestoreObjectCommand.ts b/clients/client-s3/src/commands/RestoreObjectCommand.ts index 4eebcef2f1ae..7d0f56decda8 100644 --- a/clients/client-s3/src/commands/RestoreObjectCommand.ts +++ b/clients/client-s3/src/commands/RestoreObjectCommand.ts @@ -350,25 +350,28 @@ export interface RestoreObjectCommandOutput extends RestoreObjectOutput, __Metad * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* - * @public + * * @example To restore an archived object * ```javascript - * // The following example restores for one day an archived copy of an object back into Amazon S3 bucket. + * /* The following example restores for one day an archived copy of an object back into Amazon S3 bucket. *\/ * const input = { - * "Bucket": "examplebucket", - * "Key": "archivedobjectkey", - * "RestoreRequest": { - * "Days": 1, - * "GlacierJobParameters": { - * "Tier": "Expedited" + * Bucket: "examplebucket", + * Key: "archivedobjectkey", + * RestoreRequest: { + * Days: 1, + * GlacierJobParameters: { + * Tier: "Expedited" * } * } * }; * const command = new RestoreObjectCommand(input); - * await client.send(command); - * // example id: to-restore-an-archived-object-1483049329953 + * const response = await client.send(command); + * /* response is + * { /* empty *\/ } + * *\/ * ``` * + * @public */ export class RestoreObjectCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/SelectObjectContentCommand.ts b/clients/client-s3/src/commands/SelectObjectContentCommand.ts index 04d84e8e69b4..b762c63475ef 100644 --- a/clients/client-s3/src/commands/SelectObjectContentCommand.ts +++ b/clients/client-s3/src/commands/SelectObjectContentCommand.ts @@ -244,6 +244,7 @@ export interface SelectObjectContentCommandOutput extends SelectObjectContentOut * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* + * * @public */ export class SelectObjectContentCommand extends $Command diff --git a/clients/client-s3/src/commands/UploadPartCommand.ts b/clients/client-s3/src/commands/UploadPartCommand.ts index f05c94fd854f..6c0983401fe5 100644 --- a/clients/client-s3/src/commands/UploadPartCommand.ts +++ b/clients/client-s3/src/commands/UploadPartCommand.ts @@ -253,27 +253,8 @@ export interface UploadPartCommandOutput extends UploadPartOutput, __MetadataBea * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* - * @public - * @example To upload a part - * ```javascript - * // The following example uploads part 1 of a multipart upload. The example specifies a file name for the part data. The Upload ID is same that is returned by the initiate multipart upload. - * const input = { - * "Body": "fileToUpload", - * "Bucket": "examplebucket", - * "Key": "examplelargeobject", - * "PartNumber": "1", - * "UploadId": "xadcOB_7YPBOJuoFiQ9cz4P3Pe6FIZwO4f7wN93uHsNBEw97pl5eNwzExg0LAT2dUN91cOmrEQHDsP3WA60CEg--" - * }; - * const command = new UploadPartCommand(input); - * const response = await client.send(command); - * /* response == - * { - * "ETag": "\"d8c2eafd90c266e19ab9dcacc479f8af\"" - * } - * *\/ - * // example id: to-upload-a-part-1481847914943 - * ``` * + * @public */ export class UploadPartCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/UploadPartCopyCommand.ts b/clients/client-s3/src/commands/UploadPartCopyCommand.ts index 3d73fb1a445c..8f7da05fa260 100644 --- a/clients/client-s3/src/commands/UploadPartCopyCommand.ts +++ b/clients/client-s3/src/commands/UploadPartCopyCommand.ts @@ -271,54 +271,8 @@ export interface UploadPartCopyCommandOutput extends UploadPartCopyOutput, __Met * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* - * @public - * @example To upload a part by copying data from an existing object as data source - * ```javascript - * // The following example uploads a part of a multipart upload by copying data from an existing object as data source. - * const input = { - * "Bucket": "examplebucket", - * "CopySource": "/bucketname/sourceobjectkey", - * "Key": "examplelargeobject", - * "PartNumber": "1", - * "UploadId": "exampleuoh_10OhKhT7YukE9bjzTPRiuaCotmZM_pFngJFir9OZNrSr5cWa3cq3LZSUsfjI4FI7PkP91We7Nrw--" - * }; - * const command = new UploadPartCopyCommand(input); - * const response = await client.send(command); - * /* response == - * { - * "CopyPartResult": { - * "ETag": "\"b0c6f0e7e054ab8fa2536a2677f8734d\"", - * "LastModified": "2016-12-29T21:24:43.000Z" - * } - * } - * *\/ - * // example id: to-upload-a-part-by-copying-data-from-an-existing-object-as-data-source-1483046746348 - * ``` - * - * @example To upload a part by copying byte range from an existing object as data source - * ```javascript - * // The following example uploads a part of a multipart upload by copying a specified byte range from an existing object as data source. - * const input = { - * "Bucket": "examplebucket", - * "CopySource": "/bucketname/sourceobjectkey", - * "CopySourceRange": "bytes=1-100000", - * "Key": "examplelargeobject", - * "PartNumber": "2", - * "UploadId": "exampleuoh_10OhKhT7YukE9bjzTPRiuaCotmZM_pFngJFir9OZNrSr5cWa3cq3LZSUsfjI4FI7PkP91We7Nrw--" - * }; - * const command = new UploadPartCopyCommand(input); - * const response = await client.send(command); - * /* response == - * { - * "CopyPartResult": { - * "ETag": "\"65d16d19e65a7508a51f043180edcc36\"", - * "LastModified": "2016-12-29T21:44:28.000Z" - * } - * } - * *\/ - * // example id: to-upload-a-part-by-copying-byte-range-from-an-existing-object-as-data-source-1483048068594 - * ``` * + * @public */ export class UploadPartCopyCommand extends $Command .classBuilder< diff --git a/clients/client-s3/src/commands/WriteGetObjectResponseCommand.ts b/clients/client-s3/src/commands/WriteGetObjectResponseCommand.ts index 5ac4744ce122..f0fea1e9d529 100644 --- a/clients/client-s3/src/commands/WriteGetObjectResponseCommand.ts +++ b/clients/client-s3/src/commands/WriteGetObjectResponseCommand.ts @@ -133,6 +133,7 @@ export interface WriteGetObjectResponseCommandOutput extends __MetadataBearer {} * @throws {@link S3ServiceException} *Base exception class for all service exceptions from S3 service.
* + * * @public */ export class WriteGetObjectResponseCommand extends $Command diff --git a/clients/client-s3/src/models/models_0.ts b/clients/client-s3/src/models/models_0.ts index b0f9951abf6e..2d0546825431 100644 --- a/clients/client-s3/src/models/models_0.ts +++ b/clients/client-s3/src/models/models_0.ts @@ -1,6 +1,5 @@ // smithy-typescript generated code import { ExceptionOptionType as __ExceptionOptionType, SENSITIVE_STRING } from "@smithy/smithy-client"; - import { StreamingBlobTypes } from "@smithy/types"; import { S3ServiceException as __BaseException } from "./S3ServiceException"; diff --git a/clients/client-s3/src/models/models_1.ts b/clients/client-s3/src/models/models_1.ts index b66d7727cacd..96378677b77e 100644 --- a/clients/client-s3/src/models/models_1.ts +++ b/clients/client-s3/src/models/models_1.ts @@ -1,6 +1,5 @@ // smithy-typescript generated code import { ExceptionOptionType as __ExceptionOptionType, SENSITIVE_STRING } from "@smithy/smithy-client"; - import { StreamingBlobTypes } from "@smithy/types"; import { @@ -28,7 +27,6 @@ import { StorageClass, Tag, } from "./models_0"; - import { S3ServiceException as __BaseException } from "./S3ServiceException"; /** diff --git a/scripts/api-examples/get-examples.js b/scripts/api-examples/get-examples.js deleted file mode 100644 index 38ecbc5069f7..000000000000 --- a/scripts/api-examples/get-examples.js +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env node - -/** - * Retrieves aws-models and extracts examples-1.json files for service models. - * Due to a backlogged issue, these examples are not available via Smithy. - */ - -const { existsSync } = require("fs"); -const { copySync } = require("fs-extra"); -const { execSync } = require("child_process"); -const { join } = require("path"); - -const jsv3Root = join(__dirname, "..", ".."); -const location = join(jsv3Root, "codegen", "sdk-codegen", "aws-models-examples"); -const colocation = join(jsv3Root, "..", "aws-models"); - -let pull = true; - -if (!existsSync(location)) { - // check co-located folder (e.g. in automation) - if (existsSync(colocation)) { - copySync(colocation, location, { overwrite: true }); - console.log("copied co-located aws-models dir"); - pull = false; - } else { - // clone it if not colocated. - execSync(`git clone git@github.com:aws/aws-models.git ${location}`); - console.log("cloned aws-models from GitHub"); - } -} - -if (pull) { - execSync(`cd ${location} && git pull`); -} diff --git a/scripts/api-examples/merge-examples.js b/scripts/api-examples/merge-examples.js deleted file mode 100644 index b8f0b6b7241f..000000000000 --- a/scripts/api-examples/merge-examples.js +++ /dev/null @@ -1,182 +0,0 @@ -/** - * Merge C2J examples into the Smithy models. - * Due to a backlogged issue, these examples are not available via Smithy. - * - * @see https://smithy.io/1.0/spec/core/documentation-traits.html#examples-trait - */ - -const { readdirSync, lstatSync, writeFileSync, existsSync, readFileSync } = require("fs"); -const { join, dirname } = require("path"); -const walk = require("../utils/walk"); - -module.exports = { - /** - * @param {string} clientsFolder - location of the client source files into which to merge examples. - * @param {string} [serviceParam] - a specific service sdk id for which to merge examples. - * When not provided, all services receive merged examples. - */ - async merge(clientsFolder = join(__dirname, "..", "..", "clients"), serviceParam) { - /** - * key - sdkId (Smithy). - * value - examples (C2J). - */ - const sdkIdToExamples = {}; - - /** - * key - sdkId (Smithy) normalized lower case. - * value - generated sources, commands folder. - */ - const sdkIdToCommandsFolder = {}; - - const location = join(__dirname, "..", "..", "codegen", "sdk-codegen", "aws-models-examples"); - const serviceFolders = readdirSync(location); - - for (const folder of serviceFolders) { - let sdkId; - if (!lstatSync(join(location, folder)).isDirectory()) { - continue; - } - try { - const smithyModel = require(join(location, folder, "smithy", "model.json")); - sdkId = Object.values(smithyModel.shapes).find((s) => s.type === "service").traits["aws.api#service"].sdkId; - } catch (e) { - console.error(`${folder} does not have a Smithy model.`); - continue; - } - const modelFolders = readdirSync(join(location, folder)).filter((name) => !name.startsWith(".")); - for (const c2jFolder of modelFolders.filter((name) => name !== "smithy")) { - const c2jFiles = readdirSync(join(location, folder, c2jFolder)); - for (const examples of c2jFiles.filter((file) => file.includes("examples"))) { - sdkIdToExamples[sdkId] = require(join(location, folder, c2jFolder, examples)); - } - } - } - - const smithyModelsLocation = join(__dirname, "..", "..", "codegen", "sdk-codegen", "aws-models"); - - for (const smithyModelFile of readdirSync(smithyModelsLocation)) { - /** - * This is an example of how to merge/map the examples into the Smithy model - * as the Smithy trait "examples". However, the examples do not work - * because some of them contain incorrect types and fail Smithy - * validation. - */ - continue; - - const model = require(join(smithyModelsLocation, smithyModelFile)); - sdkId = Object.values(model.shapes).find((s) => s.type === "service").traits["aws.api#service"].sdkId; - - if (sdkId in sdkIdToExamples) { - const examples = sdkIdToExamples[sdkId]; - const operations = Object.entries(model.shapes).filter(([, s]) => s.type === "operation"); - for ([name, operation] of operations) { - const [, simpleName] = name.split("#"); - const matchingExample = Object.entries(examples.examples).find(([name]) => name === simpleName); - if (matchingExample) { - const [, examples] = matchingExample; - - if (!operation.traits["smithy.api#examples"]) { - operation.traits["smithy.api#examples"] = examples.map((example) => { - return { - title: example.title, - documentation: example.description, - input: example.input, - output: example.output, - }; - }); - } - } - } - } - - writeFileSync(join(smithyModelsLocation, smithyModelFile), JSON.stringify(model, null, 2), "utf-8"); - } - - for (const [sdkId, examplesFile] of Object.entries(sdkIdToExamples)) { - const id = sdkId.replaceAll(" ", "-").toLowerCase(); - if (serviceParam && id !== serviceParam) { - continue; - } - console.log("processing examples for", id); - - const commandsFolder = await (async () => { - if (sdkIdToCommandsFolder[id]) { - return sdkIdToCommandsFolder[id]; - } - if (clientsFolder.endsWith("clients")) { - if (existsSync(join(clientsFolder, `client-${id}`, "src", "commands"))) { - return (sdkIdToCommandsFolder[id] = join(clientsFolder, `client-${id}`, "src", "commands")); - } - } - for await (const file of walk(clientsFolder)) { - if (/package\.json$/.test(file) && !file.includes("node_modules")) { - const pkg = require(file); - const clientId = pkg.name.split("@aws-sdk/client-").pop(); - if (clientId === id) { - return (sdkIdToCommandsFolder[id] = join(dirname(file), "src", "commands")); - } - } - } - })(); - - if (!commandsFolder) { - console.error("unable to find commands folder for", id); - continue; - } - - for (const [operation, examples] of Object.entries(examplesFile.examples)) { - const commandFile = join(commandsFolder, operation + "Command.ts"); - - if (existsSync(commandFile)) { - for (const example of examples) { - let buffer = []; - buffer.push( - ...`@example ${example.title} -\`\`\`javascript -${(example.description || "") - .split("\n") - .map((line) => `// ${line}`) - .join("\n")} -const input = ${JSON.stringify(example.input || {}, null, 2)}; -const command = new ${operation}Command(input); -${ - Object.keys(example.output || {}).length > 0 - ? `const response = await client.send(command); -/* response == -${JSON.stringify(example.output, null, 2)} -*\\/` - : `await client.send(command);` -} -// example id: ${example.id} -\`\`\` -`.split("\n") - ); - - const final = `${buffer.map((line) => " " + `* ${line}`.trim()).join("\n")} - */`; - const file = readFileSync(commandFile, "utf-8"); - - if (file.includes(example.id)) { - continue; - } else { - const contents = file.replace( - ` */\nexport class ${operation}Command`, - `${final} -export class ${operation}Command` - ); - writeFileSync(commandFile, contents, "utf-8"); - } - } - } - } - } - }, -}; - -if (process.argv.includes("--service")) { - module.exports.merge(void 0, process.argv[process.argv.indexOf("--service") + 1]); -} - -if (process.argv.includes("--all")) { - module.exports.merge(void 0); -} diff --git a/scripts/generate-clients/index.js b/scripts/generate-clients/index.js index 564e84f8cf19..1ed75ba4297a 100644 --- a/scripts/generate-clients/index.js +++ b/scripts/generate-clients/index.js @@ -123,8 +123,6 @@ const { await copyServerTests(CODE_GEN_PROTOCOL_TESTS_OUTPUT_DIR, PRIVATE_CLIENTS_DIR); } - require("../api-examples/get-examples"); - await require("../api-examples/merge-examples").merge(); const compress = require("../endpoints-ruleset/compress"); compress(); diff --git a/scripts/generate-clients/single-service.js b/scripts/generate-clients/single-service.js index e4f82a48ba32..c1c0d5ffac55 100644 --- a/scripts/generate-clients/single-service.js +++ b/scripts/generate-clients/single-service.js @@ -30,10 +30,6 @@ const { solo } = yargs(process.argv.slice(2)) const clientFolder = join(SDK_CLIENTS_DIR, `client-${solo}`); const libFolder = join(SDK_CLIENTS_DIR, "..", "lib", `lib-${solo}`); - // examples merging - require("../api-examples/get-examples"); - require("../api-examples/merge-examples").merge(void 0, solo); - console.log("================ starting eslint ================", "\n", new Date().toString(), solo); try { await spawnProcess("npx", ["eslint", "--quiet", "--fix", `${clientFolder}/src/**/*`]);