Skip to content

Commit 722e3a1

Browse files
authored
Add YAML file for xray (#7878)
1 parent 9d7b25e commit 722e3a1

4 files changed

Lines changed: 310 additions & 24 deletions

File tree

Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
# zexi 0.4.0
2+
xray_CreateGroup:
3+
languages:
4+
Kotlin:
5+
versions:
6+
- sdk_version: 1
7+
github: kotlin/services/xray
8+
sdkguide:
9+
excerpts:
10+
- description:
11+
snippet_tags:
12+
- xray.kotlin_create_group.main
13+
Java:
14+
versions:
15+
- sdk_version: 2
16+
github: javav2/example_code/xray
17+
sdkguide:
18+
excerpts:
19+
- description:
20+
snippet_tags:
21+
- xray.java2_create_group.main
22+
services:
23+
xray: {CreateGroup}
24+
xray_CreateSamplingRule:
25+
languages:
26+
Kotlin:
27+
versions:
28+
- sdk_version: 1
29+
github: kotlin/services/xray
30+
sdkguide:
31+
excerpts:
32+
- description:
33+
snippet_tags:
34+
- xray.kotlin_create_rule.main
35+
Java:
36+
versions:
37+
- sdk_version: 2
38+
github: javav2/example_code/xray
39+
sdkguide:
40+
excerpts:
41+
- description:
42+
snippet_tags:
43+
- xray.java2_create_rule.main
44+
services:
45+
xray: {CreateSamplingRule}
46+
xray_DeleteGroup:
47+
languages:
48+
Kotlin:
49+
versions:
50+
- sdk_version: 1
51+
github: kotlin/services/xray
52+
sdkguide:
53+
excerpts:
54+
- description:
55+
snippet_tags:
56+
- xray.kotlin_delete_group.main
57+
Java:
58+
versions:
59+
- sdk_version: 2
60+
github: javav2/example_code/xray
61+
sdkguide:
62+
excerpts:
63+
- description:
64+
snippet_tags:
65+
- xray.java2_delete_group.main
66+
services:
67+
xray: {DeleteGroup}
68+
xray_DeleteSamplingRule:
69+
languages:
70+
Kotlin:
71+
versions:
72+
- sdk_version: 1
73+
github: kotlin/services/xray
74+
sdkguide:
75+
excerpts:
76+
- description:
77+
snippet_tags:
78+
- xray.kotlin_delete_rule.main
79+
Java:
80+
versions:
81+
- sdk_version: 2
82+
github: javav2/example_code/xray
83+
sdkguide:
84+
excerpts:
85+
- description:
86+
snippet_tags:
87+
- xray.java2_delete_rule.main
88+
services:
89+
xray: {DeleteSamplingRule}
90+
xray_GetGroups:
91+
languages:
92+
Kotlin:
93+
versions:
94+
- sdk_version: 1
95+
github: kotlin/services/xray
96+
sdkguide:
97+
excerpts:
98+
- description:
99+
snippet_tags:
100+
- xray.kotlin_get_groups.main
101+
Java:
102+
versions:
103+
- sdk_version: 2
104+
github: javav2/example_code/xray
105+
sdkguide:
106+
excerpts:
107+
- description:
108+
snippet_tags:
109+
- xray.java2_get_groups.main
110+
services:
111+
xray: {GetGroups}
112+
xray_GetSamplingRules:
113+
languages:
114+
Kotlin:
115+
versions:
116+
- sdk_version: 1
117+
github: kotlin/services/xray
118+
sdkguide:
119+
excerpts:
120+
- description:
121+
snippet_tags:
122+
- xray.kotlin_get_rules.main
123+
Java:
124+
versions:
125+
- sdk_version: 2
126+
github: javav2/example_code/xray
127+
sdkguide:
128+
excerpts:
129+
- description:
130+
snippet_tags:
131+
- xray.java2_get_rules.main
132+
services:
133+
xray: {GetSamplingRules}
134+
xray_GetServiceGraph:
135+
languages:
136+
Kotlin:
137+
versions:
138+
- sdk_version: 1
139+
github: kotlin/services/xray
140+
sdkguide:
141+
excerpts:
142+
- description:
143+
snippet_tags:
144+
- xray.kotlin_get_graph.main
145+
Java:
146+
versions:
147+
- sdk_version: 2
148+
github: javav2/example_code/xray
149+
sdkguide:
150+
excerpts:
151+
- description:
152+
snippet_tags:
153+
- xray.java2_get_graph.main
154+
services:
155+
xray: {GetServiceGraph}

.doc_gen/validation.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ allow_list:
3232
- "DescribeInstancePatchStatesForPatchGroup"
3333
- "DescribeOrderableDBInstanceOptionsOutput"
3434
- "DescribeReplicationTaskAssessmentResults"
35+
- "src/main/java/com/example/xray/GetGroups"
3536
- "DescribeTransitGatewayPeeringAttachments"
3637
- "DescribeVpcEndpointServiceConfigurations"
3738
- "DisassociateAwsAccountFromPartnerAccount"

javav2/example_code/xray/README.md

Lines changed: 78 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,84 @@
1-
# AWS X-Ray Java code examples
1+
# X-Ray code examples for the SDK for Java 2.x
22

3-
This README discusses how to run the Java code examples for AWS X-Ray.
3+
## Overview
44

5-
## Running the AWS X-Ray Java files
5+
Shows how to use the AWS SDK for Java 2.x to work with AWS X-Ray.
66

7-
**IMPORTANT**
7+
<!--custom.overview.start-->
8+
<!--custom.overview.end-->
89

9-
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.
10+
_X-Ray _
1011

11-
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.
12+
## ⚠ Important
1213

13-
To run these examples, you can setup your development environment. For more information,
14-
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).
14+
* 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/).
15+
* Running the tests might result in charges to your AWS account.
16+
* 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).
17+
* 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).
18+
19+
<!--custom.important.start-->
20+
<!--custom.important.end-->
21+
22+
## Code examples
23+
24+
### Prerequisites
25+
26+
For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav2` folder.
27+
28+
29+
<!--custom.prerequisites.start-->
30+
<!--custom.prerequisites.end-->
31+
32+
### Single actions
33+
34+
Code excerpts that show you how to call individual service functions.
35+
36+
- [CreateGroup](src/main/java/com/example/xray/CreateGroup.java#L6)
37+
- [CreateSamplingRule](src/main/java/com/example/xray/CreateSamplingRule.java#L6)
38+
- [DeleteGroup](src/main/java/com/example/xray/DeleteGroup.java#L6)
39+
- [DeleteSamplingRule](src/main/java/com/example/xray/DeleteSamplingRule.java#L6)
40+
- [GetGroups](src/main/java/com/example/xray/GetGroups.java#L6)
41+
- [GetSamplingRules](src/main/java/com/example/xray/GetSamplingRules.java#L6)
42+
- [GetServiceGraph](src/main/java/com/example/xray/GetServiceGraph.java#L6)
43+
44+
45+
<!--custom.examples.start-->
46+
<!--custom.examples.end-->
47+
48+
## Run the examples
49+
50+
### Instructions
51+
52+
53+
<!--custom.instructions.start-->
54+
<!--custom.instructions.end-->
55+
56+
57+
58+
### Tests
59+
60+
⚠ Running tests might result in charges to your AWS account.
61+
62+
63+
To find instructions for running these tests, see the [README](../../README.md#Tests)
64+
in the `javav2` folder.
65+
66+
67+
68+
<!--custom.tests.start-->
69+
<!--custom.tests.end-->
70+
71+
## Additional resources
72+
73+
- [X-Ray Developer Guide](https://docs.aws.amazon.com/xray/latest/devguide/aws-xray.html)
74+
- [X-Ray API Reference](https://docs.aws.amazon.com/xray/latest/api/Welcome.html)
75+
- [SDK for Java 2.x X-Ray reference](https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/xray/package-summary.html)
76+
77+
<!--custom.resources.start-->
78+
<!--custom.resources.end-->
79+
80+
---
81+
82+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
83+
84+
SPDX-License-Identifier: Apache-2.0

kotlin/services/xray/README.md

Lines changed: 76 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,84 @@
1-
# AWS X-Ray Kotlin code examples
1+
# X-Ray code examples for the SDK for Kotlin
22

3-
This README discusses how to run the Kotlin code examples for AWS X-Ray.
3+
## Overview
44

5-
## Running the AWS X-Ray Kotlin files
5+
Shows how to use the AWS SDK for Kotlin to work with AWS X-Ray.
66

7-
**IMPORTANT**
7+
<!--custom.overview.start-->
8+
<!--custom.overview.end-->
89

9-
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.
10+
_X-Ray _
1011

11-
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.
12+
## ⚠ Important
1213

13-
You will find these examples:
14+
* 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/).
15+
* Running the tests might result in charges to your AWS account.
16+
* 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).
17+
* 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).
1418

15-
- **CreateGroup** - Demonstrates how to create an AWS X-Ray group with a filter expression.
16-
- **CreateSamplingRule** - Demonstrates how to create a rule to control sampling behavior for instrumented applications.
17-
- **DeleteGroup** - Demonstrates how to delete an AWS X-Ray group.
18-
- **DeleteSamplingRule** - Demonstrates how to create a rule to control sampling behavior for instrumented applications.
19-
- **GetGroups** - Demonstrates how to retrieve all active group details.
20-
- **GetSamplingRules** - Demonstrates how to retrieve sampling rules.
21-
- **GetServiceGraph** - Demonstrates how to retrieve a document that describes services that process incoming requests.
19+
<!--custom.important.start-->
20+
<!--custom.important.end-->
2221

23-
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,
24-
see [Get started with the AWS SDK for Kotlin](https://docs.aws.amazon.com/sdk-for-kotlin/latest/developer-guide/setup.html).
22+
## Code examples
23+
24+
### Prerequisites
25+
26+
For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotlin` folder.
27+
28+
29+
<!--custom.prerequisites.start-->
30+
<!--custom.prerequisites.end-->
31+
32+
### Single actions
33+
34+
Code excerpts that show you how to call individual service functions.
35+
36+
- [CreateGroup](src/main/kotlin/com/kotlin/xray/CreateGroup.kt#L39)
37+
- [CreateSamplingRule](src/main/kotlin/com/kotlin/xray/CreateSamplingRule.kt#L41)
38+
- [DeleteGroup](src/main/kotlin/com/kotlin/xray/DeleteGroup.kt#L39)
39+
- [DeleteSamplingRule](src/main/kotlin/com/kotlin/xray/DeleteSamplingRule.kt#L39)
40+
- [GetGroups](src/main/kotlin/com/kotlin/xray/GetGroups.kt#L22)
41+
- [GetSamplingRules](src/main/kotlin/com/kotlin/xray/GetSamplingRules.kt#L22)
42+
- [GetServiceGraph](src/main/kotlin/com/kotlin/xray/GetServiceGraph.kt#L39)
43+
44+
45+
<!--custom.examples.start-->
46+
<!--custom.examples.end-->
47+
48+
## Run the examples
49+
50+
### Instructions
51+
52+
53+
<!--custom.instructions.start-->
54+
<!--custom.instructions.end-->
55+
56+
57+
58+
### Tests
59+
60+
⚠ Running tests might result in charges to your AWS account.
61+
62+
63+
To find instructions for running these tests, see the [README](../../README.md#Tests)
64+
in the `kotlin` folder.
65+
66+
67+
68+
<!--custom.tests.start-->
69+
<!--custom.tests.end-->
70+
71+
## Additional resources
72+
73+
- [X-Ray Developer Guide](https://docs.aws.amazon.com/xray/latest/devguide/aws-xray.html)
74+
- [X-Ray API Reference](https://docs.aws.amazon.com/xray/latest/api/Welcome.html)
75+
- [SDK for Kotlin X-Ray reference](https://sdk.amazonaws.com/kotlin/api/latest/xray/index.html)
76+
77+
<!--custom.resources.start-->
78+
<!--custom.resources.end-->
79+
80+
---
81+
82+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
83+
84+
SPDX-License-Identifier: Apache-2.0

0 commit comments

Comments
 (0)