CfnTelemetryRule
- class aws_cdk.aws_observabilityadmin.CfnTelemetryRule(scope, id, *, rule, rule_name, tags=None)
Bases:
CfnResourceCreates a telemetry rule that defines how telemetry should be configured for AWS resources in your account.
The rule specifies which resources should have telemetry enabled and how that telemetry data should be collected based on resource type, telemetry type, and selection criteria.
- See:
- CloudformationResource:
AWS::ObservabilityAdmin::TelemetryRule
- ExampleMetadata:
fixture=_generated
Example:
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 = observabilityadmin.CfnTelemetryRule(self, "MyCfnTelemetryRule", rule=observabilityadmin.CfnTelemetryRule.TelemetryRuleProperty( resource_type="resourceType", telemetry_type="telemetryType", # the properties below are optional 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" ), log_delivery_parameters=observabilityadmin.CfnTelemetryRule.LogDeliveryParametersProperty( log_types=["logTypes"] ), 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" )] ) ), selection_criteria="selectionCriteria", telemetry_source_types=["telemetrySourceTypes"] ), rule_name="ruleName", # the properties below are optional tags=[CfnTag( key="key", value="value" )] )
Create a new
AWS::ObservabilityAdmin::TelemetryRule.- Parameters:
scope (
Construct) – Scope in which this resource is defined.id (
str) – Construct identifier for this resource (unique in its scope).rule (
Union[IResolvable,TelemetryRuleProperty,Dict[str,Any]]) – Retrieves the details of a specific telemetry rule in your account.rule_name (
str) – The name of the telemetry rule.tags (
Optional[Sequence[Union[CfnTag,Dict[str,Any]]]]) – Lists all tags attached to the specified resource. Supports telemetry rule resources and telemetry pipeline resources.
Methods
- add_deletion_override(path)
Syntactic sugar for
addOverride(path, undefined).- Parameters:
path (
str) – The path of the value to delete.- Return type:
None
- add_dependency(target)
Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.
- Parameters:
target (
CfnResource)- Return type:
None
- add_depends_on(target)
(deprecated) Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
- Parameters:
target (
CfnResource)- Deprecated:
use addDependency
- Stability:
deprecated
- Return type:
None
- add_metadata(key, value)
Add a value to the CloudFormation Resource Metadata.
- Parameters:
key (
str)value (
Any)
- See:
- Return type:
None
Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.
- add_override(path, value)
Adds an override to the synthesized CloudFormation resource.
To add a property override, either use
addPropertyOverrideor prefixpathwith “Properties.” (i.e.Properties.TopicName).If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.
To include a literal
.in the property name, prefix with a\. In most programming languages you will need to write this as"\\."because the\itself will need to be escaped.For example:
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"]) cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")
would add the overrides Example:
"Properties": { "GlobalSecondaryIndexes": [ { "Projection": { "NonKeyAttributes": [ "myattribute" ] ... } ... }, { "ProjectionType": "INCLUDE" ... }, ] ... }
The
valueargument toaddOverridewill not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.- Parameters:
path (
str) –The path of the property, you can use dot notation to override values in complex types. Any intermediate keys will be created as needed.
value (
Any) –The value. Could be primitive or complex.
- Return type:
None
- add_property_deletion_override(property_path)
Adds an override that deletes the value of a property from the resource definition.
- Parameters:
property_path (
str) – The path to the property.- Return type:
None
- add_property_override(property_path, value)
Adds an override to a resource property.
Syntactic sugar for
addOverride("Properties.<...>", value).- Parameters:
property_path (
str) – The path of the property.value (
Any) – The value.
- Return type:
None
- apply_removal_policy(policy=None, *, apply_to_update_replace_policy=None, default=None)
Sets the deletion policy of the resource based on the removal policy specified.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.
The resource can be deleted (
RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN). In some cases, a snapshot can be taken of the resource prior to deletion (RemovalPolicy.SNAPSHOT). A list of resources that support this policy can be found in the following link:- Parameters:
policy (
Optional[RemovalPolicy])apply_to_update_replace_policy (
Optional[bool]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: truedefault (
Optional[RemovalPolicy]) – The default policy to apply in case the removal policy is not defined. Default: - Default value is resource specific. To determine the default value for a resource, please consult that specific resource’s documentation.
- See:
- Return type:
None
- get_att(attribute_name, type_hint=None)
Returns a token for an runtime attribute of this resource.
Ideally, use generated attribute accessors (e.g.
resource.arn), but this can be used for future compatibility in case there is no generated attribute.- Parameters:
attribute_name (
str) – The name of the attribute.type_hint (
Optional[ResolutionTypeHint])
- Return type:
- get_metadata(key)
Retrieve a value value from the CloudFormation Resource Metadata.
- Parameters:
key (
str)- See:
- Return type:
Any
Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.
- inspect(inspector)
Examines the CloudFormation resource and discloses attributes.
- Parameters:
inspector (
TreeInspector) – tree inspector to collect and process attributes.- Return type:
None
- obtain_dependencies()
Retrieves an array of resources this resource depends on.
This assembles dependencies on resources across stacks (including nested stacks) automatically.
- Return type:
List[Union[Stack,CfnResource]]
- obtain_resource_dependencies()
Get a shallow copy of dependencies between this resource and other resources in the same stack.
- Return type:
List[CfnResource]
- override_logical_id(new_logical_id)
Overrides the auto-generated logical ID with a specific ID.
- Parameters:
new_logical_id (
str) – The new logical ID to use for this stack element.- Return type:
None
- remove_dependency(target)
Indicates that this resource no longer depends on another resource.
This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.
- Parameters:
target (
CfnResource)- Return type:
None
- replace_dependency(target, new_target)
Replaces one dependency with another.
- Parameters:
target (
CfnResource) – The dependency to replace.new_target (
CfnResource) – The new dependency to add.
- Return type:
None
- to_string()
Returns a string representation of this construct.
- Return type:
str- Returns:
a string representation of this resource
Attributes
- CFN_RESOURCE_TYPE_NAME = 'AWS::ObservabilityAdmin::TelemetryRule'
- attr_rule_arn
The Amazon Resource Name (ARN) of the telemetry rule.
- CloudformationAttribute:
RuleArn
- cdk_tag_manager
Tag Manager which manages the tags for this resource.
- cfn_options
Options for this resource, such as condition, update policy etc.
- cfn_resource_type
AWS resource type.
- creation_stack
return:
the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.
- env
- logical_id
The logical ID for this CloudFormation stack element.
The logical ID of the element is calculated from the path of the resource node in the construct tree.
To override this value, use
overrideLogicalId(newLogicalId).- Returns:
the logical ID as a stringified token. This value will only get resolved during synthesis.
- node
The tree node.
- ref
Return a string that will be resolved to a CloudFormation
{ Ref }for this element.If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through
Lazy.any({ produce: resource.ref }).
- rule
Retrieves the details of a specific telemetry rule in your account.
- rule_name
The name of the telemetry rule.
- stack
The stack in which this element is defined.
CfnElements must be defined within a stack scope (directly or indirectly).
- tags
Lists all tags attached to the specified resource.
- telemetry_rule_ref
A reference to a TelemetryRule resource.
Static Methods
- classmethod is_cfn_element(x)
Returns
trueif a construct is a stack element (i.e. part of the synthesized cloudformation template).Uses duck-typing instead of
instanceofto allow stack elements from different versions of this library to be included in the same stack.- Parameters:
x (
Any)- Return type:
bool- Returns:
The construct as a stack element or undefined if it is not a stack element.
- classmethod is_cfn_resource(x)
Check whether the given object is a CfnResource.
- Parameters:
x (
Any)- Return type:
bool
- classmethod is_cfn_telemetry_rule(x)
Checks whether the given object is a CfnTelemetryRule.
- Parameters:
x (
Any)- Return type:
bool
- classmethod is_construct(x)
Checks if
xis a construct.Use this method instead of
instanceofto properly detectConstructinstances, even when the construct library is symlinked.Explanation: in JavaScript, multiple copies of the
constructslibrary on disk are seen as independent, completely different libraries. As a consequence, the classConstructin each copy of theconstructslibrary is seen as a different class, and an instance of one class will not test asinstanceofthe other class.npm installwill not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of theconstructslibrary can be accidentally installed, andinstanceofwill behave unpredictably. It is safest to avoid usinginstanceof, and using this type-testing method instead.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsConstruct.
ActionConditionProperty
- class CfnTelemetryRule.ActionConditionProperty(*, action=None)
Bases:
objectCondition that matches based on the specific WAF action taken on the request.
- Parameters:
action (
Optional[str]) – The WAF action to match against (ALLOW, BLOCK, COUNT, CAPTCHA, CHALLENGE, EXCLUDED_AS_COUNT).- See:
- ExampleMetadata:
fixture=_generated
Example:
# 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 action_condition_property = observabilityadmin.CfnTelemetryRule.ActionConditionProperty( action="action" )
Attributes
- action
The WAF action to match against (ALLOW, BLOCK, COUNT, CAPTCHA, CHALLENGE, EXCLUDED_AS_COUNT).
AdvancedEventSelectorProperty
- class CfnTelemetryRule.AdvancedEventSelectorProperty(*, field_selectors, name=None)
Bases:
objectAdvanced event selectors let you create fine-grained selectors for management, data, and network activity events.
- Parameters:
field_selectors (
Union[IResolvable,Sequence[Union[IResolvable,AdvancedFieldSelectorProperty,Dict[str,Any]]]]) – Contains all selector statements in an advanced event selector.name (
Optional[str]) – An optional, descriptive name for an advanced event selector, such as “Log data events for only two S3 buckets”.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# 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 advanced_event_selector_property = 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" )
Attributes
- field_selectors
Contains all selector statements in an advanced event selector.
- name
An optional, descriptive name for an advanced event selector, such as “Log data events for only two S3 buckets”.
AdvancedFieldSelectorProperty
- class CfnTelemetryRule.AdvancedFieldSelectorProperty(*, ends_with=None, equal_to=None, field=None, not_ends_with=None, not_equals=None, not_starts_with=None, starts_with=None)
Bases:
objectDefines criteria for selecting resources based on field values.
- Parameters:
ends_with (
Optional[Sequence[str]]) – Matches if the field value ends with the specified value.equal_to (
Optional[Sequence[str]]) – Matches if the field value equals the specified value.field (
Optional[str]) – The name of the field to use for selection.not_ends_with (
Optional[Sequence[str]]) – Matches if the field value does not end with the specified value.not_equals (
Optional[Sequence[str]]) – Matches if the field value does not equal the specified value.not_starts_with (
Optional[Sequence[str]]) – Matches if the field value does not start with the specified value.starts_with (
Optional[Sequence[str]]) – Matches if the field value starts with the specified value.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# 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 advanced_field_selector_property = 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"] )
Attributes
- ends_with
Matches if the field value ends with the specified value.
- equal_to
Matches if the field value equals the specified value.
- field
The name of the field to use for selection.
- not_ends_with
Matches if the field value does not end with the specified value.
- not_equals
Matches if the field value does not equal the specified value.
- not_starts_with
Matches if the field value does not start with the specified value.
- starts_with
Matches if the field value starts with the specified value.
CloudtrailParametersProperty
- class CfnTelemetryRule.CloudtrailParametersProperty(*, advanced_event_selectors)
Bases:
objectParameters specific to AWS CloudTrail telemetry configuration.
- Parameters:
advanced_event_selectors (
Union[IResolvable,Sequence[Union[IResolvable,AdvancedEventSelectorProperty,Dict[str,Any]]]]) – The advanced event selectors to use for filtering AWS CloudTrail events.- See:
- ExampleMetadata:
fixture=_generated
Example:
# 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 cloudtrail_parameters_property = 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" )] )
Attributes
- advanced_event_selectors
The advanced event selectors to use for filtering AWS CloudTrail events.
ConditionProperty
- class CfnTelemetryRule.ConditionProperty(*, action_condition=None, label_name_condition=None)
Bases:
objectA single condition that can match based on WAF rule action or label name.
- Parameters:
action_condition (
Union[IResolvable,ActionConditionProperty,Dict[str,Any],None]) – Matches log records based on the WAF rule action taken (ALLOW, BLOCK, COUNT, etc.).label_name_condition (
Union[IResolvable,LabelNameConditionProperty,Dict[str,Any],None]) – Matches log records based on WAF rule labels applied to the request.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# 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 condition_property = observabilityadmin.CfnTelemetryRule.ConditionProperty( action_condition=observabilityadmin.CfnTelemetryRule.ActionConditionProperty( action="action" ), label_name_condition=observabilityadmin.CfnTelemetryRule.LabelNameConditionProperty( label_name="labelName" ) )
Attributes
- action_condition
Matches log records based on the WAF rule action taken (ALLOW, BLOCK, COUNT, etc.).
- label_name_condition
Matches log records based on WAF rule labels applied to the request.
ELBLoadBalancerLoggingParametersProperty
- class CfnTelemetryRule.ELBLoadBalancerLoggingParametersProperty(*, field_delimiter=None, output_format=None)
Bases:
objectConfiguration parameters for ELB load balancer logging, including output format and field delimiter settings.
- Parameters:
field_delimiter (
Optional[str]) – The delimiter character used to separate fields in ELB access log entries when using plain text format.output_format (
Optional[str]) – The format for ELB access log entries (plain text or JSON format).
- See:
- ExampleMetadata:
fixture=_generated
Example:
# 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 e_lBLoad_balancer_logging_parameters_property = observabilityadmin.CfnTelemetryRule.ELBLoadBalancerLoggingParametersProperty( field_delimiter="fieldDelimiter", output_format="outputFormat" )
Attributes
- field_delimiter
The delimiter character used to separate fields in ELB access log entries when using plain text format.
- output_format
The format for ELB access log entries (plain text or JSON format).
FieldToMatchProperty
- class CfnTelemetryRule.FieldToMatchProperty(*, method=None, query_string=None, single_header=None, uri_path=None)
Bases:
objectSpecifies a field in the request to redact from WAF logs, such as headers, query parameters, or body content.
- Parameters:
method (
Optional[str]) – Redacts the HTTP method from WAF logs.query_string (
Optional[str]) – Redacts the entire query string from WAF logs.single_header (
Union[IResolvable,SingleHeaderProperty,Dict[str,Any],None]) – Redacts a specific header field by name from WAF logs.uri_path (
Optional[str]) – Redacts the URI path from WAF logs.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# 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 field_to_match_property = observabilityadmin.CfnTelemetryRule.FieldToMatchProperty( method="method", query_string="queryString", single_header=observabilityadmin.CfnTelemetryRule.SingleHeaderProperty( name="name" ), uri_path="uriPath" )
Attributes
- method
Redacts the HTTP method from WAF logs.
- query_string
Redacts the entire query string from WAF logs.
- single_header
Redacts a specific header field by name from WAF logs.
- uri_path
Redacts the URI path from WAF logs.
FilterProperty
- class CfnTelemetryRule.FilterProperty(*, behavior=None, conditions=None, requirement=None)
Bases:
objectA single filter condition that specifies behavior, requirement, and matching conditions for WAF log records.
- Parameters:
behavior (
Optional[str]) – The action to take for log records matching this filter (KEEP or DROP).conditions (
Union[IResolvable,Sequence[Union[IResolvable,ConditionProperty,Dict[str,Any]]],None]) – The list of conditions that determine if a log record matches this filter.requirement (
Optional[str]) – Whether the log record must meet all conditions (MEETS_ALL) or any condition (MEETS_ANY) to match this filter.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# 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 filter_property = 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" )
Attributes
- behavior
The action to take for log records matching this filter (KEEP or DROP).
- conditions
The list of conditions that determine if a log record matches this filter.
- requirement
Whether the log record must meet all conditions (MEETS_ALL) or any condition (MEETS_ANY) to match this filter.
LabelNameConditionProperty
- class CfnTelemetryRule.LabelNameConditionProperty(*, label_name=None)
Bases:
objectCondition that matches based on WAF rule labels, with label names limited to 1024 characters.
- Parameters:
label_name (
Optional[str]) – The label name to match, supporting alphanumeric characters, underscores, hyphens, and colons.- See:
- ExampleMetadata:
fixture=_generated
Example:
# 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 label_name_condition_property = observabilityadmin.CfnTelemetryRule.LabelNameConditionProperty( label_name="labelName" )
Attributes
- label_name
The label name to match, supporting alphanumeric characters, underscores, hyphens, and colons.
LogDeliveryParametersProperty
- class CfnTelemetryRule.LogDeliveryParametersProperty(*, log_types=None)
Bases:
objectConfiguration parameters for Amazon Bedrock AgentCore logging, including
logTypesettings.- Parameters:
log_types (
Optional[Sequence[str]]) – The type of log that the source is sending.- See:
- ExampleMetadata:
fixture=_generated
Example:
# 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 log_delivery_parameters_property = observabilityadmin.CfnTelemetryRule.LogDeliveryParametersProperty( log_types=["logTypes"] )
Attributes
- log_types
The type of log that the source is sending.
LoggingFilterProperty
- class CfnTelemetryRule.LoggingFilterProperty(*, default_behavior=None, filters=None)
Bases:
objectConfiguration that determines which WAF log records to keep or drop based on specified conditions.
- Parameters:
default_behavior (
Optional[str]) – The default action (KEEP or DROP) for log records that don’t match any filter conditions.filters (
Union[IResolvable,Sequence[Union[IResolvable,FilterProperty,Dict[str,Any]]],None]) – A list of filter conditions that determine log record handling behavior.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# 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 logging_filter_property = 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" )] )
Attributes
- default_behavior
The default action (KEEP or DROP) for log records that don’t match any filter conditions.
- filters
A list of filter conditions that determine log record handling behavior.
SingleHeaderProperty
- class CfnTelemetryRule.SingleHeaderProperty(*, name)
Bases:
objectStructure containing a name field limited to 64 characters for header or query parameter identification.
- Parameters:
name (
str) – The name value, limited to 64 characters.- See:
- ExampleMetadata:
fixture=_generated
Example:
# 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 single_header_property = observabilityadmin.CfnTelemetryRule.SingleHeaderProperty( name="name" )
Attributes
- name
The name value, limited to 64 characters.
TelemetryDestinationConfigurationProperty
- class CfnTelemetryRule.TelemetryDestinationConfigurationProperty(*, cloudtrail_parameters=None, destination_pattern=None, destination_type=None, elb_load_balancer_logging_parameters=None, log_delivery_parameters=None, retention_in_days=None, vpc_flow_log_parameters=None, waf_logging_parameters=None)
Bases:
objectConfiguration specifying where and how telemetry data should be delivered for AWS resources.
- Parameters:
cloudtrail_parameters (
Union[IResolvable,CloudtrailParametersProperty,Dict[str,Any],None]) – Configuration parameters specific to AWS CloudTrail when CloudTrail is the source type.destination_pattern (
Optional[str]) – The pattern used to generate the destination path or name, supporting macros like and .destination_type (
Optional[str]) – The type of destination for the telemetry data (e.g., “Amazon CloudWatch Logs”, “S3”).elb_load_balancer_logging_parameters (
Union[IResolvable,ELBLoadBalancerLoggingParametersProperty,Dict[str,Any],None]) – Configuration parameters specific to ELB load balancer logging when ELB is the resource type.log_delivery_parameters (
Union[IResolvable,LogDeliveryParametersProperty,Dict[str,Any],None]) – Configuration parameters specific to Amazon Bedrock AgentCore logging when Amazon Bedrock AgentCore is the resource type.retention_in_days (
Union[int,float,None]) – The number of days to retain the telemetry data in the destination.vpc_flow_log_parameters (
Union[IResolvable,VPCFlowLogParametersProperty,Dict[str,Any],None]) – Configuration parameters specific to VPC Flow Logs when VPC is the resource type.waf_logging_parameters (
Union[IResolvable,WAFLoggingParametersProperty,Dict[str,Any],None]) – Configuration parameters specific to WAF logging when WAF is the resource type.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# 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_destination_configuration_property = 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" ), log_delivery_parameters=observabilityadmin.CfnTelemetryRule.LogDeliveryParametersProperty( log_types=["logTypes"] ), 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" )] ) )
Attributes
- cloudtrail_parameters
Configuration parameters specific to AWS CloudTrail when CloudTrail is the source type.
- destination_pattern
The pattern used to generate the destination path or name, supporting macros like and .
- destination_type
The type of destination for the telemetry data (e.g., “Amazon CloudWatch Logs”, “S3”).
- elb_load_balancer_logging_parameters
Configuration parameters specific to ELB load balancer logging when ELB is the resource type.
- log_delivery_parameters
Configuration parameters specific to Amazon Bedrock AgentCore logging when Amazon Bedrock AgentCore is the resource type.
- retention_in_days
The number of days to retain the telemetry data in the destination.
- vpc_flow_log_parameters
Configuration parameters specific to VPC Flow Logs when VPC is the resource type.
- waf_logging_parameters
Configuration parameters specific to WAF logging when WAF is the resource type.
TelemetryRuleProperty
- class CfnTelemetryRule.TelemetryRuleProperty(*, resource_type, telemetry_type, destination_configuration=None, selection_criteria=None, telemetry_source_types=None)
Bases:
objectDefines how telemetry should be configured for specific AWS resources.
- Parameters:
resource_type (
str) – The type of AWS resource to configure telemetry for (e.g., “AWS::EC2::VPC”, “AWS::EKS::Cluster”, “AWS::WAFv2::WebACL”).telemetry_type (
str) – The type of telemetry to collect (Logs, Metrics, or Traces).destination_configuration (
Union[IResolvable,TelemetryDestinationConfigurationProperty,Dict[str,Any],None]) – Configuration specifying where and how the telemetry data should be delivered.selection_criteria (
Optional[str]) – Criteria for selecting which resources the rule applies to, such as resource tags.telemetry_source_types (
Optional[Sequence[str]]) – 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.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# 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 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" ), log_delivery_parameters=observabilityadmin.CfnTelemetryRule.LogDeliveryParametersProperty( log_types=["logTypes"] ), 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" )] ) ), selection_criteria="selectionCriteria", telemetry_source_types=["telemetrySourceTypes"] )
Attributes
- destination_configuration
Configuration specifying where and how the telemetry data should be delivered.
- resource_type
The type of AWS resource to configure telemetry for (e.g., “AWS::EC2::VPC”, “AWS::EKS::Cluster”, “AWS::WAFv2::WebACL”).
- selection_criteria
Criteria for selecting which resources the rule applies to, such as resource tags.
- telemetry_source_types
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.
- telemetry_type
The type of telemetry to collect (Logs, Metrics, or Traces).
VPCFlowLogParametersProperty
- class CfnTelemetryRule.VPCFlowLogParametersProperty(*, log_format=None, max_aggregation_interval=None, traffic_type=None)
Bases:
objectConfiguration parameters specific to VPC Flow Logs.
- Parameters:
log_format (
Optional[str]) – The format in which VPC Flow Log entries should be logged.max_aggregation_interval (
Union[int,float,None]) – The maximum interval in seconds between the capture of flow log records.traffic_type (
Optional[str]) – The type of traffic to log (ACCEPT, REJECT, or ALL).
- See:
- ExampleMetadata:
fixture=_generated
Example:
# 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 v_pCFlow_log_parameters_property = observabilityadmin.CfnTelemetryRule.VPCFlowLogParametersProperty( log_format="logFormat", max_aggregation_interval=123, traffic_type="trafficType" )
Attributes
- log_format
The format in which VPC Flow Log entries should be logged.
- max_aggregation_interval
The maximum interval in seconds between the capture of flow log records.
- traffic_type
The type of traffic to log (ACCEPT, REJECT, or ALL).
WAFLoggingParametersProperty
- class CfnTelemetryRule.WAFLoggingParametersProperty(*, logging_filter=None, log_type=None, redacted_fields=None)
Bases:
objectConfiguration parameters for WAF logging, including redacted fields and logging filters.
- Parameters:
logging_filter (
Union[IResolvable,LoggingFilterProperty,Dict[str,Any],None]) – A filter configuration that determines which WAF log records to include or exclude.log_type (
Optional[str]) – The type of WAF logs to collect (currently supports WAF_LOGS).redacted_fields (
Union[IResolvable,Sequence[Union[IResolvable,FieldToMatchProperty,Dict[str,Any]]],None]) – The fields to redact from WAF logs to protect sensitive information.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# 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 w_aFLogging_parameters_property = 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" )] )
Attributes
- log_type
The type of WAF logs to collect (currently supports WAF_LOGS).
- logging_filter
A filter configuration that determines which WAF log records to include or exclude.
- redacted_fields
The fields to redact from WAF logs to protect sensitive information.