# CfnSamplingRuleProps

Properties for defining a `CfnSamplingRule`.

Extends: CfnSamplingRuleProps
Used as props by: CfnSamplingRule

- Source: Generated code
- Type last changed: v2.132.0 · 9 Mar 2024

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_xray as xray } from 'aws-cdk-lib';
const cfnSamplingRuleProps: xray.CfnSamplingRuleProps = {
  ruleName: 'ruleName',
  samplingRule: {
    fixedRate: 123,
    host: 'host',
    httpMethod: 'httpMethod',
    priority: 123,
    reservoirSize: 123,
    resourceArn: 'resourceArn',
    serviceName: 'serviceName',
    serviceType: 'serviceType',
    urlPath: 'urlPath',

    // the properties below are optional
    attributes: {
      attributesKey: 'attributes',
    },
    ruleArn: 'ruleArn',
    ruleName: 'ruleName',
    samplingRateBoost: {
      cooldownWindowMinutes: 123,
      maxRate: 123,
    },
    version: 123,
  },
  samplingRuleRecord: {
    createdAt: 'createdAt',
    modifiedAt: 'modifiedAt',
    samplingRule: {
      fixedRate: 123,
      host: 'host',
      httpMethod: 'httpMethod',
      priority: 123,
      reservoirSize: 123,
      resourceArn: 'resourceArn',
      serviceName: 'serviceName',
      serviceType: 'serviceType',
      urlPath: 'urlPath',

      // the properties below are optional
      attributes: {
        attributesKey: 'attributes',
      },
      ruleArn: 'ruleArn',
      ruleName: 'ruleName',
      samplingRateBoost: {
        cooldownWindowMinutes: 123,
        maxRate: 123,
      },
      version: 123,
    },
  },
  samplingRuleUpdate: {
    attributes: {
      attributesKey: 'attributes',
    },
    fixedRate: 123,
    host: 'host',
    httpMethod: 'httpMethod',
    priority: 123,
    reservoirSize: 123,
    resourceArn: 'resourceArn',
    ruleArn: 'ruleArn',
    ruleName: 'ruleName',
    samplingRateBoost: {
      cooldownWindowMinutes: 123,
      maxRate: 123,
    },
    serviceName: 'serviceName',
    serviceType: 'serviceType',
    urlPath: 'urlPath',
  },
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
```

## Properties

- `ruleName`: string — this property has been deprecated

  Specify a rule by either name or ARN, but not both.

- `samplingRule`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnSamplingRule.SamplingRuleProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_xray.CfnSamplingRule.SamplingRuleProperty.html) — The sampling rule to be created or updated.

- `samplingRuleRecord`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnSamplingRule.SamplingRuleRecordProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_xray.CfnSamplingRule.SamplingRuleRecordProperty.html) — this property has been deprecated

- `samplingRuleUpdate`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnSamplingRule.SamplingRuleUpdateProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_xray.CfnSamplingRule.SamplingRuleUpdateProperty.html) — this property has been deprecated

- `tags`: [CfnTag](/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — An array of key-value pairs to apply to this resource.
