From 8744907515c2a38ae0173d9fcedcd71d20262d90 Mon Sep 17 00:00:00 2001 From: Laren-AWS <57545972+Laren-AWS@users.noreply.github.com> Date: Tue, 29 Oct 2024 10:30:33 -0700 Subject: [PATCH] Meta/tools: update to latest tools and update metadata & READMEs to match (#7016) * Update S3 Control metadata for Java to generate a README in the correct folder and point to that folder from links in docs. * Update to latest tools release and simultaneously update S3 control metadata and README so everything works out correctly. --- .doc_gen/metadata/s3-control_metadata.yaml | 20 ++-- .github/workflows/validate-doc-metadata.yml | 2 +- .tools/readmes/config.py | 1 + .../main/java/com/example/s3/batch/README.md | 112 ++++++++++++++++++ 4 files changed, 124 insertions(+), 11 deletions(-) create mode 100644 javav2/example_code/s3/src/main/java/com/example/s3/batch/README.md diff --git a/.doc_gen/metadata/s3-control_metadata.yaml b/.doc_gen/metadata/s3-control_metadata.yaml index ef7c53f00de..73622adfd55 100644 --- a/.doc_gen/metadata/s3-control_metadata.yaml +++ b/.doc_gen/metadata/s3-control_metadata.yaml @@ -7,21 +7,21 @@ s3-control_Hello: Java: versions: - sdk_version: 2 - github: javav2/example_code/s3 + github: javav2/example_code/s3/src/main/java/com/example/s3/batch sdkguide: excerpts: - description: snippet_tags: - s3control.java2.list_jobs.main services: - s3-control: {ListJobsPaginator} + s3-control: {ListJobs} s3-control_CreateJob: languages: Java: versions: - sdk_version: 2 - github: javav2/example_code/s3 + github: javav2/example_code/s3/src/main/java/com/example/s3/batch sdkguide: excerpts: - description: Create an asynchronous S3 job. @@ -40,7 +40,7 @@ s3-control_PutJobTagging: Java: versions: - sdk_version: 2 - github: javav2/example_code/s3 + github: javav2/example_code/s3/src/main/java/com/example/s3/batch sdkguide: excerpts: - description: @@ -53,7 +53,7 @@ s3-control_DescribeJob: Java: versions: - sdk_version: 2 - github: javav2/example_code/s3 + github: javav2/example_code/s3/src/main/java/com/example/s3/batch sdkguide: excerpts: - description: @@ -66,7 +66,7 @@ s3-control_DeleteJobTagging: Java: versions: - sdk_version: 2 - github: javav2/example_code/s3 + github: javav2/example_code/s3/src/main/java/com/example/s3/batch sdkguide: excerpts: - description: @@ -79,7 +79,7 @@ s3-control_GetJobTagging: Java: versions: - sdk_version: 2 - github: javav2/example_code/s3 + github: javav2/example_code/s3/src/main/java/com/example/s3/batch sdkguide: excerpts: - description: @@ -92,7 +92,7 @@ s3-control_UpdateJobStatus: Java: versions: - sdk_version: 2 - github: javav2/example_code/s3 + github: javav2/example_code/s3/src/main/java/com/example/s3/batch sdkguide: excerpts: - description: @@ -105,7 +105,7 @@ s3-control_UpdateJobPriority: Java: versions: - sdk_version: 2 - github: javav2/example_code/s3 + github: javav2/example_code/s3/src/main/java/com/example/s3/batch sdkguide: excerpts: - description: @@ -120,7 +120,7 @@ s3-control_Basics: Java: versions: - sdk_version: 2 - github: javav2/example_code/s3 + github: javav2/example_code/s3/src/main/java/com/example/s3/batch sdkguide: excerpts: - description: Learn core operations. diff --git a/.github/workflows/validate-doc-metadata.yml b/.github/workflows/validate-doc-metadata.yml index 0885729858c..d01b478aeee 100644 --- a/.github/workflows/validate-doc-metadata.yml +++ b/.github/workflows/validate-doc-metadata.yml @@ -16,7 +16,7 @@ jobs: - name: checkout repo content uses: actions/checkout@v4 - name: validate metadata - uses: awsdocs/aws-doc-sdk-examples-tools@2024.43.0 + uses: awsdocs/aws-doc-sdk-examples-tools@2024.44.0 with: doc_gen_only: "False" strict_titles: "True" diff --git a/.tools/readmes/config.py b/.tools/readmes/config.py index 230122157e2..0420b7da49a 100644 --- a/.tools/readmes/config.py +++ b/.tools/readmes/config.py @@ -53,6 +53,7 @@ "service_folder": 'javav2/example_code/{{service["name"]}}', "sdk_api_ref": 'https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/{{service["name"]}}/package-summary.html', "service_folder_overrides": { + "s3-control": "javav2/example_code/s3/src/main/java/com/example/s3/batch", "medical-imaging": "javav2/example_code/medicalimaging", }, }, diff --git a/javav2/example_code/s3/src/main/java/com/example/s3/batch/README.md b/javav2/example_code/s3/src/main/java/com/example/s3/batch/README.md new file mode 100644 index 00000000000..0843d40fd05 --- /dev/null +++ b/javav2/example_code/s3/src/main/java/com/example/s3/batch/README.md @@ -0,0 +1,112 @@ +# Amazon S3 Control code examples for the SDK for Java 2.x + +## Overview + +Shows how to use the AWS SDK for Java 2.x to work with Amazon S3 Control. + + + + +_Amazon S3 Control lets you manage S3 resources._ + +## ⚠ Important + +* Running this code might result in charges to your AWS account. For more details, see [AWS Pricing](https://aws.amazon.com/pricing/) and [Free Tier](https://aws.amazon.com/free/). +* Running the tests might result in charges to your AWS account. +* We recommend that you grant your code least privilege. At most, grant only the minimum permissions required to perform the task. For more information, see [Grant least privilege](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#grant-least-privilege). +* This code is not tested in every AWS Region. For more information, see [AWS Regional Services](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services). + + + + +## Code examples + +### Prerequisites + +For prerequisites, see the [README](../../../../../../../../../README.md#Prerequisites) in the `javav2` folder. + + + + + +### Get started + +- [Hello 'Amazon S3 Control'](HelloS3Batch.java#L5) (`ListJobs`) + + +### Basics + +Code examples that show you how to perform the essential operations within a service. + +- [Learn the basics](S3BatchScenario.java) + + +### Single actions + +Code excerpts that show you how to call individual service functions. + +- [CreateJob](S3BatchActions.java#L314) +- [DeleteJobTagging](S3BatchActions.java#L238) +- [DescribeJob](S3BatchActions.java#L263) +- [GetJobTagging](S3BatchActions.java#L204) +- [PutJobTagging](S3BatchActions.java#L434) +- [UpdateJobPriority](S3BatchActions.java#L173) +- [UpdateJobStatus](S3BatchActions.java#L146) + + + + + +## Run the examples + +### Instructions + + + + + +#### Hello 'Amazon S3 Control' + +This example shows you how to get started using 'Amazon S3 Control' + + +#### Learn the basics + +This example shows you how to learn core operations for'Amazon S3 Control'. + + + + + + + + + + +### Tests + +⚠ Running tests might result in charges to your AWS account. + + +To find instructions for running these tests, see the [README](../../../../../../../../../README.md#Tests) +in the `javav2` folder. + + + + + + +## Additional resources + +- [Amazon S3 Control User Guide](https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html) +- [Amazon S3 Control API Reference](https://docs.aws.amazon.com/AmazonS3/latest/API/Welcome.html) +- [SDK for Java 2.x Amazon S3 Control reference](https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/s3-control/package-summary.html) + + + + +--- + +Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 \ No newline at end of file