# TelemetryRuleProperty

Defines how telemetry should be configured for specific AWS resources.

- Source: Generated code
- Type last changed: v2.257.0 · 21 May 2026

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_observabilityadmin as observabilityadmin } from 'aws-cdk-lib';
const telemetryRuleProperty: observabilityadmin.CfnTelemetryRule.TelemetryRuleProperty = {
  resourceType: 'resourceType',
  telemetryType: 'telemetryType',

  // the properties below are optional
  allowFieldUpdates: false,
  allRegions: false,
  destinationConfiguration: {
    cloudtrailParameters: {
      advancedEventSelectors: [{
        fieldSelectors: [{
          endsWith: ['endsWith'],
          equalTo: ['equalTo'],
          field: 'field',
          notEndsWith: ['notEndsWith'],
          notEquals: ['notEquals'],
          notStartsWith: ['notStartsWith'],
          startsWith: ['startsWith'],
        }],

        // the properties below are optional
        name: 'name',
      }],
    },
    destinationPattern: 'destinationPattern',
    destinationType: 'destinationType',
    elbLoadBalancerLoggingParameters: {
      fieldDelimiter: 'fieldDelimiter',
      outputFormat: 'outputFormat',
    },
    kmsKeyArn: 'kmsKeyArn',
    logDeliveryParameters: {
      logTypes: ['logTypes'],
    },
    mskMonitoringParameters: {
      enhancedMonitoring: 'enhancedMonitoring',
    },
    retentionInDays: 123,
    vpcFlowLogParameters: {
      logFormat: 'logFormat',
      maxAggregationInterval: 123,
      trafficType: 'trafficType',
    },
    wafLoggingParameters: {
      loggingFilter: {
        defaultBehavior: 'defaultBehavior',
        filters: [{
          behavior: 'behavior',
          conditions: [{
            actionCondition: {
              action: 'action',
            },
            labelNameCondition: {
              labelName: 'labelName',
            },
          }],
          requirement: 'requirement',
        }],
      },
      logType: 'logType',
      redactedFields: [{
        method: 'method',
        queryString: 'queryString',
        singleHeader: {
          name: 'name',
        },
        uriPath: 'uriPath',
      }],
    },
  },
  regions: ['regions'],
  selectionCriteria: 'selectionCriteria',
  telemetrySourceTypes: ['telemetrySourceTypes'],
};
```

## Properties

- `allowFieldUpdates`: boolean | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) = false — When true, configuration drift in managed telemetry resources will be detected and remediated for resource-level fields.

- `allRegions`: boolean | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — When true, the rule is replicated to all supported regions.

- `destinationConfiguration`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnTelemetryRule.TelemetryDestinationConfigurationProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_observabilityadmin.CfnTelemetryRule.TelemetryDestinationConfigurationProperty.html) — Configuration specifying where and how the telemetry data should be delivered.

- `regions`: string[] — List of AWS region codes where the rule should be replicated.

- `resourceType`: string (required) — The type of AWS resource to configure telemetry for (e.g., "AWS::EC2::VPC", "AWS::EKS::Cluster", "AWS::WAFv2::WebACL").

- `selectionCriteria`: string — Criteria for selecting which resources the rule applies to, such as resource tags.

- `telemetrySourceTypes`: string[] — The specific telemetry source types to configure for the resource, such as VPC_FLOW_LOGS or EKS_AUDIT_LOGS.

  TelemetrySourceTypes must be correlated with the specific resource type.

- `telemetryType`: string (required) — The type of telemetry to collect (Logs, Metrics, or Traces).
