Skip to content
v2.278.0

CfnTelemetryRuleProps Struct ​

Properties for defining a CfnTelemetryRule.

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 cfnTelemetryRuleProps: observabilityadmin.CfnTelemetryRuleProps = {
  rule: {
    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'],
  },
  ruleName: 'ruleName',

  // the properties below are optional
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_observabilityadmin as observabilityadmin

cfn_telemetry_rule_props = observabilityadmin.CfnTelemetryRuleProps(
    rule=observabilityadmin.CfnTelemetryRule.TelemetryRuleProperty(
        resource_type="resourceType",
        telemetry_type="telemetryType",

        # the properties below are optional
        allow_field_updates=False,
        all_regions=False,
        destination_configuration=observabilityadmin.CfnTelemetryRule.TelemetryDestinationConfigurationProperty(
            cloudtrail_parameters=observabilityadmin.CfnTelemetryRule.CloudtrailParametersProperty(
                advanced_event_selectors=[observabilityadmin.CfnTelemetryRule.AdvancedEventSelectorProperty(
                    field_selectors=[observabilityadmin.CfnTelemetryRule.AdvancedFieldSelectorProperty(
                        ends_with=["endsWith"],
                        equal_to=["equalTo"],
                        field="field",
                        not_ends_with=["notEndsWith"],
                        not_equals=["notEquals"],
                        not_starts_with=["notStartsWith"],
                        starts_with=["startsWith"]
                    )],

                    # the properties below are optional
                    name="name"
                )]
            ),
            destination_pattern="destinationPattern",
            destination_type="destinationType",
            elb_load_balancer_logging_parameters=observabilityadmin.CfnTelemetryRule.ELBLoadBalancerLoggingParametersProperty(
                field_delimiter="fieldDelimiter",
                output_format="outputFormat"
            ),
            kms_key_arn="kmsKeyArn",
            log_delivery_parameters=observabilityadmin.CfnTelemetryRule.LogDeliveryParametersProperty(
                log_types=["logTypes"]
            ),
            msk_monitoring_parameters=observabilityadmin.CfnTelemetryRule.MskMonitoringParametersProperty(
                enhanced_monitoring="enhancedMonitoring"
            ),
            retention_in_days=123,
            vpc_flow_log_parameters=observabilityadmin.CfnTelemetryRule.VPCFlowLogParametersProperty(
                log_format="logFormat",
                max_aggregation_interval=123,
                traffic_type="trafficType"
            ),
            waf_logging_parameters=observabilityadmin.CfnTelemetryRule.WAFLoggingParametersProperty(
                logging_filter=observabilityadmin.CfnTelemetryRule.LoggingFilterProperty(
                    default_behavior="defaultBehavior",
                    filters=[observabilityadmin.CfnTelemetryRule.FilterProperty(
                        behavior="behavior",
                        conditions=[observabilityadmin.CfnTelemetryRule.ConditionProperty(
                            action_condition=observabilityadmin.CfnTelemetryRule.ActionConditionProperty(
                                action="action"
                            ),
                            label_name_condition=observabilityadmin.CfnTelemetryRule.LabelNameConditionProperty(
                                label_name="labelName"
                            )
                        )],
                        requirement="requirement"
                    )]
                ),
                log_type="logType",
                redacted_fields=[observabilityadmin.CfnTelemetryRule.FieldToMatchProperty(
                    method="method",
                    query_string="queryString",
                    single_header=observabilityadmin.CfnTelemetryRule.SingleHeaderProperty(
                        name="name"
                    ),
                    uri_path="uriPath"
                )]
            )
        ),
        regions=["regions"],
        selection_criteria="selectionCriteria",
        telemetry_source_types=["telemetrySourceTypes"]
    ),
    rule_name="ruleName",

    # the properties below are optional
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.observabilityadmin.*;

CfnTelemetryRuleProps cfnTelemetryRuleProps = CfnTelemetryRuleProps.builder()
        .rule(TelemetryRuleProperty.builder()
                .resourceType("resourceType")
                .telemetryType("telemetryType")

                // the properties below are optional
                .allowFieldUpdates(false)
                .allRegions(false)
                .destinationConfiguration(TelemetryDestinationConfigurationProperty.builder()
                        .cloudtrailParameters(CloudtrailParametersProperty.builder()
                                .advancedEventSelectors(List.of(AdvancedEventSelectorProperty.builder()
                                        .fieldSelectors(List.of(AdvancedFieldSelectorProperty.builder()
                                                .endsWith(List.of("endsWith"))
                                                .equalTo(List.of("equalTo"))
                                                .field("field")
                                                .notEndsWith(List.of("notEndsWith"))
                                                .notEquals(List.of("notEquals"))
                                                .notStartsWith(List.of("notStartsWith"))
                                                .startsWith(List.of("startsWith"))
                                                .build()))

                                        // the properties below are optional
                                        .name("name")
                                        .build()))
                                .build())
                        .destinationPattern("destinationPattern")
                        .destinationType("destinationType")
                        .elbLoadBalancerLoggingParameters(ELBLoadBalancerLoggingParametersProperty.builder()
                                .fieldDelimiter("fieldDelimiter")
                                .outputFormat("outputFormat")
                                .build())
                        .kmsKeyArn("kmsKeyArn")
                        .logDeliveryParameters(LogDeliveryParametersProperty.builder()
                                .logTypes(List.of("logTypes"))
                                .build())
                        .mskMonitoringParameters(MskMonitoringParametersProperty.builder()
                                .enhancedMonitoring("enhancedMonitoring")
                                .build())
                        .retentionInDays(123)
                        .vpcFlowLogParameters(VPCFlowLogParametersProperty.builder()
                                .logFormat("logFormat")
                                .maxAggregationInterval(123)
                                .trafficType("trafficType")
                                .build())
                        .wafLoggingParameters(WAFLoggingParametersProperty.builder()
                                .loggingFilter(LoggingFilterProperty.builder()
                                        .defaultBehavior("defaultBehavior")
                                        .filters(List.of(FilterProperty.builder()
                                                .behavior("behavior")
                                                .conditions(List.of(ConditionProperty.builder()
                                                        .actionCondition(ActionConditionProperty.builder()
                                                                .action("action")
                                                                .build())
                                                        .labelNameCondition(LabelNameConditionProperty.builder()
                                                                .labelName("labelName")
                                                                .build())
                                                        .build()))
                                                .requirement("requirement")
                                                .build()))
                                        .build())
                                .logType("logType")
                                .redactedFields(List.of(FieldToMatchProperty.builder()
                                        .method("method")
                                        .queryString("queryString")
                                        .singleHeader(SingleHeaderProperty.builder()
                                                .name("name")
                                                .build())
                                        .uriPath("uriPath")
                                        .build()))
                                .build())
                        .build())
                .regions(List.of("regions"))
                .selectionCriteria("selectionCriteria")
                .telemetrySourceTypes(List.of("telemetrySourceTypes"))
                .build())
        .ruleName("ruleName")

        // the properties below are optional
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ObservabilityAdmin;

var cfnTelemetryRuleProps = new CfnTelemetryRuleProps {
    Rule = new TelemetryRuleProperty {
        ResourceType = "resourceType",
        TelemetryType = "telemetryType",

        // the properties below are optional
        AllowFieldUpdates = false,
        AllRegions = false,
        DestinationConfiguration = new TelemetryDestinationConfigurationProperty {
            CloudtrailParameters = new CloudtrailParametersProperty {
                AdvancedEventSelectors = new [] { new AdvancedEventSelectorProperty {
                    FieldSelectors = new [] { new AdvancedFieldSelectorProperty {
                        EndsWith = new [] { "endsWith" },
                        EqualTo = new [] { "equalTo" },
                        Field = "field",
                        NotEndsWith = new [] { "notEndsWith" },
                        NotEquals = new [] { "notEquals" },
                        NotStartsWith = new [] { "notStartsWith" },
                        StartsWith = new [] { "startsWith" }
                    } },

                    // the properties below are optional
                    Name = "name"
                } }
            },
            DestinationPattern = "destinationPattern",
            DestinationType = "destinationType",
            ElbLoadBalancerLoggingParameters = new ELBLoadBalancerLoggingParametersProperty {
                FieldDelimiter = "fieldDelimiter",
                OutputFormat = "outputFormat"
            },
            KmsKeyArn = "kmsKeyArn",
            LogDeliveryParameters = new LogDeliveryParametersProperty {
                LogTypes = new [] { "logTypes" }
            },
            MskMonitoringParameters = new MskMonitoringParametersProperty {
                EnhancedMonitoring = "enhancedMonitoring"
            },
            RetentionInDays = 123,
            VpcFlowLogParameters = new VPCFlowLogParametersProperty {
                LogFormat = "logFormat",
                MaxAggregationInterval = 123,
                TrafficType = "trafficType"
            },
            WafLoggingParameters = new WAFLoggingParametersProperty {
                LoggingFilter = new LoggingFilterProperty {
                    DefaultBehavior = "defaultBehavior",
                    Filters = new [] { new FilterProperty {
                        Behavior = "behavior",
                        Conditions = new [] { new ConditionProperty {
                            ActionCondition = new ActionConditionProperty {
                                Action = "action"
                            },
                            LabelNameCondition = new LabelNameConditionProperty {
                                LabelName = "labelName"
                            }
                        } },
                        Requirement = "requirement"
                    } }
                },
                LogType = "logType",
                RedactedFields = new [] { new FieldToMatchProperty {
                    Method = "method",
                    QueryString = "queryString",
                    SingleHeader = new SingleHeaderProperty {
                        Name = "name"
                    },
                    UriPath = "uriPath"
                } }
            }
        },
        Regions = new [] { "regions" },
        SelectionCriteria = "selectionCriteria",
        TelemetrySourceTypes = new [] { "telemetrySourceTypes" }
    },
    RuleName = "ruleName",

    // the properties below are optional
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnTelemetryRuleProps := &CfnTelemetryRuleProps{
	Rule: &TelemetryRuleProperty{
		ResourceType: jsii.String("resourceType"),
		TelemetryType: jsii.String("telemetryType"),

		// the properties below are optional
		AllowFieldUpdates: jsii.Boolean(false),
		AllRegions: jsii.Boolean(false),
		DestinationConfiguration: &TelemetryDestinationConfigurationProperty{
			CloudtrailParameters: &CloudtrailParametersProperty{
				AdvancedEventSelectors: []interface{}{
					&AdvancedEventSelectorProperty{
						FieldSelectors: []interface{}{
							&AdvancedFieldSelectorProperty{
								EndsWith: []*string{
									jsii.String("endsWith"),
								},
								EqualTo: []*string{
									jsii.String("equalTo"),
								},
								Field: jsii.String("field"),
								NotEndsWith: []*string{
									jsii.String("notEndsWith"),
								},
								NotEquals: []*string{
									jsii.String("notEquals"),
								},
								NotStartsWith: []*string{
									jsii.String("notStartsWith"),
								},
								StartsWith: []*string{
									jsii.String("startsWith"),
								},
							},
						},

						// the properties below are optional
						Name: jsii.String("name"),
					},
				},
			},
			DestinationPattern: jsii.String("destinationPattern"),
			DestinationType: jsii.String("destinationType"),
			ElbLoadBalancerLoggingParameters: &ELBLoadBalancerLoggingParametersProperty{
				FieldDelimiter: jsii.String("fieldDelimiter"),
				OutputFormat: jsii.String("outputFormat"),
			},
			KmsKeyArn: jsii.String("kmsKeyArn"),
			LogDeliveryParameters: &LogDeliveryParametersProperty{
				LogTypes: []*string{
					jsii.String("logTypes"),
				},
			},
			MskMonitoringParameters: &MskMonitoringParametersProperty{
				EnhancedMonitoring: jsii.String("enhancedMonitoring"),
			},
			RetentionInDays: jsii.Number(123),
			VpcFlowLogParameters: &VPCFlowLogParametersProperty{
				LogFormat: jsii.String("logFormat"),
				MaxAggregationInterval: jsii.Number(123),
				TrafficType: jsii.String("trafficType"),
			},
			WafLoggingParameters: &WAFLoggingParametersProperty{
				LoggingFilter: &LoggingFilterProperty{
					DefaultBehavior: jsii.String("defaultBehavior"),
					Filters: []interface{}{
						&FilterProperty{
							Behavior: jsii.String("behavior"),
							Conditions: []interface{}{
								&ConditionProperty{
									ActionCondition: &ActionConditionProperty{
										Action: jsii.String("action"),
									},
									LabelNameCondition: &LabelNameConditionProperty{
										LabelName: jsii.String("labelName"),
									},
								},
							},
							Requirement: jsii.String("requirement"),
						},
					},
				},
				LogType: jsii.String("logType"),
				RedactedFields: []interface{}{
					&FieldToMatchProperty{
						Method: jsii.String("method"),
						QueryString: jsii.String("queryString"),
						SingleHeader: &SingleHeaderProperty{
							Name: jsii.String("name"),
						},
						UriPath: jsii.String("uriPath"),
					},
				},
			},
		},
		Regions: []*string{
			jsii.String("regions"),
		},
		SelectionCriteria: jsii.String("selectionCriteria"),
		TelemetrySourceTypes: []*string{
			jsii.String("telemetrySourceTypes"),
		},
	},
	RuleName: jsii.String("ruleName"),

	// the properties below are optional
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}

Properties ​

Retrieves the details of a specific telemetry rule in your account.
ruleNamestringrule_namestrruleNameStringRuleNamestringRuleName*string required #
The name of the telemetry rule.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #
Lists all tags attached to the specified resource.

Supports telemetry rule resources and telemetry pipeline resources.