Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(docs): convert example generation to Smithy #6193

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions clients/client-s3/src/commands/AbortMultipartUploadCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,20 +132,23 @@ export interface AbortMultipartUploadCommandOutput extends AbortMultipartUploadO
* @throws {@link S3ServiceException}
* <p>Base exception class for all service exceptions from S3 service.</p>
*
* @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<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,40 +252,8 @@ export interface CompleteMultipartUploadCommandOutput extends CompleteMultipartU
* @throws {@link S3ServiceException}
* <p>Base exception class for all service exceptions from S3 service.</p>
*
* @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.<Region>.amazonaws.com/bigobject"
* }
* *\/
* // example id: to-complete-multipart-upload-1481851590483
* ```
*
* @public
*/
export class CompleteMultipartUploadCommand extends $Command
.classBuilder<
Expand Down
20 changes: 10 additions & 10 deletions clients/client-s3/src/commands/CopyObjectCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,28 +284,28 @@ export interface CopyObjectCommandOutput extends CopyObjectOutput, __MetadataBea
* @throws {@link S3ServiceException}
* <p>Base exception class for all service exceptions from S3 service.</p>
*
* @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<
Expand Down
25 changes: 12 additions & 13 deletions clients/client-s3/src/commands/CreateBucketCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,42 +217,41 @@ export interface CreateBucketCommandOutput extends CreateBucketOutput, __Metadat
* @throws {@link S3ServiceException}
* <p>Base exception class for all service exceptions from S3 service.</p>
*
* @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.<Region>.s3.amazonaws.com/"
* Location: "http://examplebucket.<Region>.s3.amazonaws.com/"
* }
* *\/
* // example id: to-create-a-bucket-in-a-specific-region-1483399072992
* ```
*
* @public
*/
export class CreateBucketCommand extends $Command
.classBuilder<
Expand Down
18 changes: 9 additions & 9 deletions clients/client-s3/src/commands/CreateMultipartUploadCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -320,26 +320,26 @@ export interface CreateMultipartUploadCommandOutput extends CreateMultipartUploa
* @throws {@link S3ServiceException}
* <p>Base exception class for all service exceptions from S3 service.</p>
*
* @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<
Expand Down
1 change: 1 addition & 0 deletions clients/client-s3/src/commands/CreateSessionCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ export interface CreateSessionCommandOutput extends CreateSessionOutput, __Metad
* @throws {@link S3ServiceException}
* <p>Base exception class for all service exceptions from S3 service.</p>
*
*
* @public
*/
export class CreateSessionCommand extends $Command
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export interface DeleteBucketAnalyticsConfigurationCommandOutput extends __Metad
* @throws {@link S3ServiceException}
* <p>Base exception class for all service exceptions from S3 service.</p>
*
*
* @public
*/
export class DeleteBucketAnalyticsConfigurationCommand extends $Command
Expand Down
13 changes: 8 additions & 5 deletions clients/client-s3/src/commands/DeleteBucketCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,18 +103,21 @@ export interface DeleteBucketCommandOutput extends __MetadataBearer {}
* @throws {@link S3ServiceException}
* <p>Base exception class for all service exceptions from S3 service.</p>
*
* @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<
Expand Down
13 changes: 8 additions & 5 deletions clients/client-s3/src/commands/DeleteBucketCorsCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,18 +77,21 @@ export interface DeleteBucketCorsCommandOutput extends __MetadataBearer {}
* @throws {@link S3ServiceException}
* <p>Base exception class for all service exceptions from S3 service.</p>
*
* @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<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export interface DeleteBucketEncryptionCommandOutput extends __MetadataBearer {}
* @throws {@link S3ServiceException}
* <p>Base exception class for all service exceptions from S3 service.</p>
*
*
* @public
*/
export class DeleteBucketEncryptionCommand extends $Command
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ export interface DeleteBucketIntelligentTieringConfigurationCommandOutput extend
* @throws {@link S3ServiceException}
* <p>Base exception class for all service exceptions from S3 service.</p>
*
*
* @public
*/
export class DeleteBucketIntelligentTieringConfigurationCommand extends $Command
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ export interface DeleteBucketInventoryConfigurationCommandOutput extends __Metad
* @throws {@link S3ServiceException}
* <p>Base exception class for all service exceptions from S3 service.</p>
*
*
* @public
*/
export class DeleteBucketInventoryConfigurationCommand extends $Command
Expand Down
13 changes: 8 additions & 5 deletions clients/client-s3/src/commands/DeleteBucketLifecycleCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,21 @@ export interface DeleteBucketLifecycleCommandOutput extends __MetadataBearer {}
* @throws {@link S3ServiceException}
* <p>Base exception class for all service exceptions from S3 service.</p>
*
* @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<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export interface DeleteBucketMetricsConfigurationCommandOutput extends __Metadat
* @throws {@link S3ServiceException}
* <p>Base exception class for all service exceptions from S3 service.</p>
*
*
* @public
*/
export class DeleteBucketMetricsConfigurationCommand extends $Command
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export interface DeleteBucketOwnershipControlsCommandOutput extends __MetadataBe
* @throws {@link S3ServiceException}
* <p>Base exception class for all service exceptions from S3 service.</p>
*
*
* @public
*/
export class DeleteBucketOwnershipControlsCommand extends $Command
Expand Down
13 changes: 8 additions & 5 deletions clients/client-s3/src/commands/DeleteBucketPolicyCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,18 +115,21 @@ export interface DeleteBucketPolicyCommandOutput extends __MetadataBearer {}
* @throws {@link S3ServiceException}
* <p>Base exception class for all service exceptions from S3 service.</p>
*
* @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<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,21 @@ export interface DeleteBucketReplicationCommandOutput extends __MetadataBearer {
* @throws {@link S3ServiceException}
* <p>Base exception class for all service exceptions from S3 service.</p>
*
* @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<
Expand Down
Loading
Loading