Skip to content
Merged
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
155 changes: 155 additions & 0 deletions .doc_gen/metadata/xray_metadata.yaml
Original file line number Diff line number Diff line change
@@ -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}
1 change: 1 addition & 0 deletions .doc_gen/validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ allow_list:
- "DescribeInstancePatchStatesForPatchGroup"
- "DescribeOrderableDBInstanceOptionsOutput"
- "DescribeReplicationTaskAssessmentResults"
- "src/main/java/com/example/xray/GetGroups"
- "DescribeTransitGatewayPeeringAttachments"
- "DescribeVpcEndpointServiceConfigurations"
- "DisassociateAwsAccountFromPartnerAccount"
Expand Down
86 changes: 78 additions & 8 deletions javav2/example_code/xray/README.md
Original file line number Diff line number Diff line change
@@ -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**
<!--custom.overview.start-->
<!--custom.overview.end-->

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).

<!--custom.important.start-->
<!--custom.important.end-->

## Code examples

### Prerequisites

For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav2` folder.


<!--custom.prerequisites.start-->
<!--custom.prerequisites.end-->

### 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)


<!--custom.examples.start-->
<!--custom.examples.end-->

## Run the examples

### Instructions


<!--custom.instructions.start-->
<!--custom.instructions.end-->



### 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.



<!--custom.tests.start-->
<!--custom.tests.end-->

## 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)

<!--custom.resources.start-->
<!--custom.resources.end-->

---

Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0
92 changes: 76 additions & 16 deletions kotlin/services/xray/README.md
Original file line number Diff line number Diff line change
@@ -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**
<!--custom.overview.start-->
<!--custom.overview.end-->

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.
<!--custom.important.start-->
<!--custom.important.end-->

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.


<!--custom.prerequisites.start-->
<!--custom.prerequisites.end-->

### 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)


<!--custom.examples.start-->
<!--custom.examples.end-->

## Run the examples

### Instructions


<!--custom.instructions.start-->
<!--custom.instructions.end-->



### 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.



<!--custom.tests.start-->
<!--custom.tests.end-->

## 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)

<!--custom.resources.start-->
<!--custom.resources.end-->

---

Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0
Loading