TelemetryRuleProperty Struct
Defines how telemetry should be configured for specific AWS resources.
| Source | |
|---|---|
| Type last changed |
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'],
};
python
# 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
telemetry_rule_property = 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"]
)
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.*;
TelemetryRuleProperty telemetryRuleProperty = 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();
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 telemetryRuleProperty = 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" }
};
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"
telemetryRuleProperty := &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"),
},
}
Properties
allowFieldUpdatesoptionalboolean | IResolvableallow_field_updatesoptionaltyping.Union[bool, IResolvable]allowFieldUpdatesoptionalBooleanAllowFieldUpdatesoptionalboolAllowFieldUpdatesoptionalinterface{} = false #When true, configuration drift in managed telemetry resources will be detected and remediated for resource-level fields.
allRegionsoptionalboolean | IResolvableall_regionsoptionaltyping.Union[bool, IResolvable]allRegionsoptionalBooleanAllRegionsoptionalboolAllRegionsoptionalinterface{} #When true, the rule is replicated to all supported regions.
destinationConfigurationoptionalIResolvable | CfnTelemetryRule.destination_configurationoptionaltyping.Union[IResolvable, TelemetryDestinationConfigurationProperty]destinationConfigurationoptionalIResolvableDestinationConfigurationoptionalIResolvableDestinationConfigurationoptionalinterface{} #Configuration specifying where and how the telemetry data should be delivered.
regionsoptionalstring[]regionsoptionaltyping.List[str]regionsoptionalList<String>Regionsoptionalstring[]Regionsoptional*[]*string #List of AWS region codes where the rule should be replicated.
resourceTypestringresource_typestrresourceTypeStringResourceTypestringResourceType*string required #The type of AWS resource to configure telemetry for (e.g., "AWS::EC2::VPC", "AWS::EKS::Cluster", "AWS::WAFv2::WebACL").
selectionCriteriaoptionalstringselection_criteriaoptionalstrselectionCriteriaoptionalStringSelectionCriteriaoptionalstringSelectionCriteriaoptional*string #Criteria for selecting which resources the rule applies to, such as resource tags.
telemetrySourceTypesoptionalstring[]telemetry_source_typesoptionaltyping.List[str]telemetrySourceTypesoptionalList<String>TelemetrySourceTypesoptionalstring[]TelemetrySourceTypesoptional*[]*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.
telemetryTypestringtelemetry_typestrtelemetryTypeStringTelemetryTypestringTelemetryType*string required #The type of telemetry to collect (Logs, Metrics, or Traces).