Skip to content
v2.275.0

CfnSamplingRuleProps Struct ​

Properties for defining a CfnSamplingRule.

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 ​

ruleNameoptionalstringrule_nameoptionalstrruleNameoptionalStringRuleNameoptionalstringRuleNameoptional*stringdeprecated#
this property has been deprecated

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

samplingRuleoptionalIResolvable | CfnSamplingRule.SamplingRulePropertysampling_ruleoptionaltyping.Union[IResolvable, SamplingRuleProperty]samplingRuleoptionalIResolvableSamplingRuleoptionalIResolvableSamplingRuleoptionalinterface{}#
The sampling rule to be created or updated.
samplingRuleRecordoptionalIResolvable | CfnSamplingRule.SamplingRuleRecordPropertysampling_rule_recordoptionaltyping.Union[IResolvable, SamplingRuleRecordProperty]samplingRuleRecordoptionalIResolvableSamplingRuleRecordoptionalIResolvableSamplingRuleRecordoptionalinterface{}deprecated#
this property has been deprecated
samplingRuleUpdateoptionalIResolvable | CfnSamplingRule.SamplingRuleUpdatePropertysampling_rule_updateoptionaltyping.Union[IResolvable, SamplingRuleUpdateProperty]samplingRuleUpdateoptionalIResolvableSamplingRuleUpdateoptionalIResolvableSamplingRuleUpdateoptionalinterface{}deprecated#
this property has been deprecated
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag#
An array of key-value pairs to apply to this resource.