diff --git a/.doc_gen/metadata/xray_metadata.yaml b/.doc_gen/metadata/xray_metadata.yaml new file mode 100644 index 00000000000..9d7db3d6a37 --- /dev/null +++ b/.doc_gen/metadata/xray_metadata.yaml @@ -0,0 +1,155 @@ +# zexi 0.4.0 +xray_CreateGroup: + languages: + Kotlin: + versions: + - sdk_version: 1 + github: kotlin/services/xray + sdkguide: + excerpts: + - description: + snippet_tags: + - xray.kotlin_create_group.main + Java: + versions: + - sdk_version: 2 + github: javav2/example_code/xray + sdkguide: + excerpts: + - description: + snippet_tags: + - xray.java2_create_group.main + services: + xray: {CreateGroup} +xray_CreateSamplingRule: + languages: + Kotlin: + versions: + - sdk_version: 1 + github: kotlin/services/xray + sdkguide: + excerpts: + - description: + snippet_tags: + - xray.kotlin_create_rule.main + Java: + versions: + - sdk_version: 2 + github: javav2/example_code/xray + sdkguide: + excerpts: + - description: + snippet_tags: + - xray.java2_create_rule.main + services: + xray: {CreateSamplingRule} +xray_DeleteGroup: + languages: + Kotlin: + versions: + - sdk_version: 1 + github: kotlin/services/xray + sdkguide: + excerpts: + - description: + snippet_tags: + - xray.kotlin_delete_group.main + Java: + versions: + - sdk_version: 2 + github: javav2/example_code/xray + sdkguide: + excerpts: + - description: + snippet_tags: + - xray.java2_delete_group.main + services: + xray: {DeleteGroup} +xray_DeleteSamplingRule: + languages: + Kotlin: + versions: + - sdk_version: 1 + github: kotlin/services/xray + sdkguide: + excerpts: + - description: + snippet_tags: + - xray.kotlin_delete_rule.main + Java: + versions: + - sdk_version: 2 + github: javav2/example_code/xray + sdkguide: + excerpts: + - description: + snippet_tags: + - xray.java2_delete_rule.main + services: + xray: {DeleteSamplingRule} +xray_GetGroups: + languages: + Kotlin: + versions: + - sdk_version: 1 + github: kotlin/services/xray + sdkguide: + excerpts: + - description: + snippet_tags: + - xray.kotlin_get_groups.main + Java: + versions: + - sdk_version: 2 + github: javav2/example_code/xray + sdkguide: + excerpts: + - description: + snippet_tags: + - xray.java2_get_groups.main + services: + xray: {GetGroups} +xray_GetSamplingRules: + languages: + Kotlin: + versions: + - sdk_version: 1 + github: kotlin/services/xray + sdkguide: + excerpts: + - description: + snippet_tags: + - xray.kotlin_get_rules.main + Java: + versions: + - sdk_version: 2 + github: javav2/example_code/xray + sdkguide: + excerpts: + - description: + snippet_tags: + - xray.java2_get_rules.main + services: + xray: {GetSamplingRules} +xray_GetServiceGraph: + languages: + Kotlin: + versions: + - sdk_version: 1 + github: kotlin/services/xray + sdkguide: + excerpts: + - description: + snippet_tags: + - xray.kotlin_get_graph.main + Java: + versions: + - sdk_version: 2 + github: javav2/example_code/xray + sdkguide: + excerpts: + - description: + snippet_tags: + - xray.java2_get_graph.main + services: + xray: {GetServiceGraph} diff --git a/.doc_gen/validation.yaml b/.doc_gen/validation.yaml index 4df85e36d77..d42adee5182 100644 --- a/.doc_gen/validation.yaml +++ b/.doc_gen/validation.yaml @@ -32,6 +32,7 @@ allow_list: - "DescribeInstancePatchStatesForPatchGroup" - "DescribeOrderableDBInstanceOptionsOutput" - "DescribeReplicationTaskAssessmentResults" + - "src/main/java/com/example/xray/GetGroups" - "DescribeTransitGatewayPeeringAttachments" - "DescribeVpcEndpointServiceConfigurations" - "DisassociateAwsAccountFromPartnerAccount" diff --git a/javav2/example_code/xray/README.md b/javav2/example_code/xray/README.md index aea8a42e5ec..fa3c5bcc7ad 100644 --- a/javav2/example_code/xray/README.md +++ b/javav2/example_code/xray/README.md @@ -1,14 +1,84 @@ -# AWS X-Ray Java code examples +# X-Ray code examples for the SDK for Java 2.x -This README discusses how to run the Java code examples for AWS X-Ray. +## Overview -## Running the AWS X-Ray Java files +Shows how to use the AWS SDK for Java 2.x to work with AWS X-Ray. -**IMPORTANT** + + -The Java code examples perform AWS operations for the account and AWS Region for which you've specified credentials, and you may incur AWS service charges by running them. See the [AWS Pricing page](https://aws.amazon.com/pricing/) for details about the charges you can expect for a given service and operation. +_X-Ray _ -Some of these examples perform *destructive* operations on AWS resources, such as deleting an AWS XRay group. **Be very careful** when running an operation that deletes or modifies AWS resources in your account. It's best to create separate test-only resources when experimenting with these examples. +## ⚠ Important -To run these examples, you can setup your development environment. For more information, -see [Get started with the AWS SDK for Java 2.x](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/get-started.html). +* 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. + + + + + +### Single actions + +Code excerpts that show you how to call individual service functions. + +- [CreateGroup](src/main/java/com/example/xray/CreateGroup.java#L6) +- [CreateSamplingRule](src/main/java/com/example/xray/CreateSamplingRule.java#L6) +- [DeleteGroup](src/main/java/com/example/xray/DeleteGroup.java#L6) +- [DeleteSamplingRule](src/main/java/com/example/xray/DeleteSamplingRule.java#L6) +- [GetGroups](src/main/java/com/example/xray/GetGroups.java#L6) +- [GetSamplingRules](src/main/java/com/example/xray/GetSamplingRules.java#L6) +- [GetServiceGraph](src/main/java/com/example/xray/GetServiceGraph.java#L6) + + + + + +## Run the examples + +### Instructions + + + + + + + +### 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 + +- [X-Ray Developer Guide](https://docs.aws.amazon.com/xray/latest/devguide/aws-xray.html) +- [X-Ray API Reference](https://docs.aws.amazon.com/xray/latest/api/Welcome.html) +- [SDK for Java 2.x X-Ray reference](https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/xray/package-summary.html) + + + + +--- + +Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 diff --git a/kotlin/services/xray/README.md b/kotlin/services/xray/README.md index 18449089409..cc665dacb9a 100644 --- a/kotlin/services/xray/README.md +++ b/kotlin/services/xray/README.md @@ -1,24 +1,84 @@ -# AWS X-Ray Kotlin code examples +# X-Ray code examples for the SDK for Kotlin -This README discusses how to run the Kotlin code examples for AWS X-Ray. +## Overview -## Running the AWS X-Ray Kotlin files +Shows how to use the AWS SDK for Kotlin to work with AWS X-Ray. -**IMPORTANT** + + -The Kotlin code examples perform AWS operations for the account and AWS Region for which you've specified credentials, and you may incur AWS service charges by running them. See the [AWS Pricing page](https://aws.amazon.com/pricing/) for details about the charges you can expect for a given service and operation. +_X-Ray _ -Some of these examples perform *destructive* operations on AWS resources, such as deleting an AWS X-Ray group. **Be very careful** when running an operation that deletes or modifies AWS resources in your account. It's best to create separate test-only resources when experimenting with these examples. +## ⚠ Important -You will find these examples: +* 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). -- **CreateGroup** - Demonstrates how to create an AWS X-Ray group with a filter expression. -- **CreateSamplingRule** - Demonstrates how to create a rule to control sampling behavior for instrumented applications. -- **DeleteGroup** - Demonstrates how to delete an AWS X-Ray group. -- **DeleteSamplingRule** - Demonstrates how to create a rule to control sampling behavior for instrumented applications. -- **GetGroups** - Demonstrates how to retrieve all active group details. -- **GetSamplingRules** - Demonstrates how to retrieve sampling rules. -- **GetServiceGraph** - Demonstrates how to retrieve a document that describes services that process incoming requests. + + -To run these examples, you can setup your development environment to use Gradle to configure and build AWS SDK for Kotlin projects. For more information, -see [Get started with the AWS SDK for Kotlin](https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html). +## Code examples + +### Prerequisites + +For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotlin` folder. + + + + + +### Single actions + +Code excerpts that show you how to call individual service functions. + +- [CreateGroup](src/main/kotlin/com/kotlin/xray/CreateGroup.kt#L39) +- [CreateSamplingRule](src/main/kotlin/com/kotlin/xray/CreateSamplingRule.kt#L41) +- [DeleteGroup](src/main/kotlin/com/kotlin/xray/DeleteGroup.kt#L39) +- [DeleteSamplingRule](src/main/kotlin/com/kotlin/xray/DeleteSamplingRule.kt#L39) +- [GetGroups](src/main/kotlin/com/kotlin/xray/GetGroups.kt#L22) +- [GetSamplingRules](src/main/kotlin/com/kotlin/xray/GetSamplingRules.kt#L22) +- [GetServiceGraph](src/main/kotlin/com/kotlin/xray/GetServiceGraph.kt#L39) + + + + + +## Run the examples + +### Instructions + + + + + + + +### 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 `kotlin` folder. + + + + + + +## Additional resources + +- [X-Ray Developer Guide](https://docs.aws.amazon.com/xray/latest/devguide/aws-xray.html) +- [X-Ray API Reference](https://docs.aws.amazon.com/xray/latest/api/Welcome.html) +- [SDK for Kotlin X-Ray reference](https://sdk.amazonaws.com/kotlin/api/latest/xray/index.html) + + + + +--- + +Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0