# AWS::XRay Construct Library

This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project.

TypeScript:

```ts
import * as xray from 'aws-cdk-lib/aws-xray';
```

Python:

```python
import aws_cdk.aws_xray as xray
```

Java:

```java
import software.amazon.awscdk.services.xray.*;
```

C# / .NET:

```csharp
using Amazon.CDK.AWS.XRay;
```

Golang:

```go
import xray "github.com/aws/aws-cdk-go/awscdk"
```

There are no official hand-written ([L2](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) constructs for this service yet. Here are some suggestions on how to proceed:

- Search [Construct Hub for XRay construct libraries](https://constructs.dev/search?q=xray)
- Use the automatically generated [L1](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_l1_using) constructs, in the same way you would use [the CloudFormation AWS::XRay resources](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/AWS_XRay.html) directly.

There are no hand-written ([L2](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_lib)) constructs for this service yet.
However, you can still use the automatically generated [L1](https://docs.aws.amazon.com/cdk/latest/guide/constructs.html#constructs_l1_using) constructs, and use this service exactly as you would using CloudFormation directly.

For more information on the resources and properties available for this service, see the [CloudFormation documentation for AWS::XRay](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/AWS_XRay.html).

(Read the [CDK Contributing Guide](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and submit an RFC if you are interested in contributing to this construct library.)

## Types

### Constructs (L1)

- [`CfnGroup`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_xray.CfnGroup.html) Construct (L1) Use the `AWS::XRay::Group` resource to specify a group with a name and a filter expression.
- [`CfnResourcePolicy`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_xray.CfnResourcePolicy.html) Construct (L1) Use `AWS::XRay::ResourcePolicy` to specify an X-Ray resource-based policy, which grants one or more AWS services and accounts permissions to access X-Ray .
- [`CfnSamplingRule`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_xray.CfnSamplingRule.html) Construct (L1) Use the `AWS::XRay::SamplingRule` resource to specify a sampling rule, which controls sampling behavior for instrumented applications.
- [`CfnTransactionSearchConfig`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_xray.CfnTransactionSearchConfig.html) Construct (L1) This schema provides construct and validation rules for AWS-XRay TransactionSearchConfig resource parameters.

### Structs

- [`CfnGroup.InsightsConfigurationProperty`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_xray.CfnGroup.InsightsConfigurationProperty.html) Struct The structure containing configurations related to insights.
- [`CfnGroupProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_xray.CfnGroupProps.html) Struct Properties for defining a `CfnGroup`.
- [`CfnResourcePolicyProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_xray.CfnResourcePolicyProps.html) Struct Properties for defining a `CfnResourcePolicy`.
- [`CfnSamplingRule.SamplingRateBoostProperty`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_xray.CfnSamplingRule.SamplingRateBoostProperty.html) Struct
- [`CfnSamplingRule.SamplingRuleProperty`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_xray.CfnSamplingRule.SamplingRuleProperty.html) Struct A sampling rule that services use to decide whether to instrument a request.
- [`CfnSamplingRule.SamplingRuleRecordProperty`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_xray.CfnSamplingRule.SamplingRuleRecordProperty.html) Struct
- [`CfnSamplingRule.SamplingRuleUpdateProperty`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_xray.CfnSamplingRule.SamplingRuleUpdateProperty.html) Struct
- [`CfnSamplingRuleProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_xray.CfnSamplingRuleProps.html) Struct Properties for defining a `CfnSamplingRule`.
- [`CfnTransactionSearchConfig.CloudWatchLogsConfigurationProperty`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_xray.CfnTransactionSearchConfig.CloudWatchLogsConfigurationProperty.html) Struct Configuration for the CloudWatch Logs log group that X-Ray creates when this resource enables Transaction Search.
- [`CfnTransactionSearchConfigProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_xray.CfnTransactionSearchConfigProps.html) Struct Properties for defining a `CfnTransactionSearchConfig`.
