Class: AWSCDK::ObservabilityAdmin::CfnTelemetryRule::TelemetryRuleProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
observability_admin/cfn_telemetry_rule.rb

Overview

Defines how telemetry should be configured for specific AWS resources.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(resource_type:, telemetry_type:, allow_field_updates: nil, all_regions: nil, destination_configuration: nil, regions: nil, selection_criteria: nil, telemetry_source_types: nil) ⇒ TelemetryRuleProperty

Returns a new instance of TelemetryRuleProperty.

Parameters:

  • resource_type (String)

    The type of AWS resource to configure telemetry for (e.g., "AWS::EC2::VPC", "AWS::EKS::Cluster", "AWS::WAFv2::WebACL").

  • telemetry_type (String)

    The type of telemetry to collect (Logs, Metrics, or Traces).

  • allow_field_updates (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    When true, configuration drift in managed telemetry resources will be detected and remediated for resource-level fields.

  • all_regions (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    When true, the rule is replicated to all supported regions.

  • destination_configuration (AWSCDK::IResolvable, AWSCDK::ObservabilityAdmin::CfnTelemetryRule::TelemetryDestinationConfigurationProperty, nil) (defaults to: nil)

    Configuration specifying where and how the telemetry data should be delivered.

  • regions (Array<String>, nil) (defaults to: nil)

    List of AWS region codes where the rule should be replicated.

  • selection_criteria (String, nil) (defaults to: nil)

    Criteria for selecting which resources the rule applies to, such as resource tags.

  • telemetry_source_types (Array<String>, nil) (defaults to: nil)

    The specific telemetry source types to configure for the resource, such as VPC_FLOW_LOGS or EKS_AUDIT_LOGS.



1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
# File 'observability_admin/cfn_telemetry_rule.rb', line 1256

def initialize(resource_type:, telemetry_type:, allow_field_updates: nil, all_regions: nil, destination_configuration: nil, regions: nil, selection_criteria: nil, telemetry_source_types: nil)
  @resource_type = resource_type
  Jsii::Type.check_type(@resource_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "resourceType")
  @telemetry_type = telemetry_type
  Jsii::Type.check_type(@telemetry_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "telemetryType")
  @allow_field_updates = allow_field_updates
  Jsii::Type.check_type(@allow_field_updates, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "allowFieldUpdates") unless @allow_field_updates.nil?
  @all_regions = all_regions
  Jsii::Type.check_type(@all_regions, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "allRegions") unless @all_regions.nil?
  @destination_configuration = destination_configuration.is_a?(Hash) ? ::AWSCDK::ObservabilityAdmin::CfnTelemetryRule::TelemetryDestinationConfigurationProperty.new(**destination_configuration.transform_keys(&:to_sym)) : destination_configuration
  Jsii::Type.check_type(@destination_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19vYnNlcnZhYmlsaXR5YWRtaW4uQ2ZuVGVsZW1ldHJ5UnVsZS5UZWxlbWV0cnlEZXN0aW5hdGlvbkNvbmZpZ3VyYXRpb25Qcm9wZXJ0eSJ9XX19")), "destinationConfiguration") unless @destination_configuration.nil?
  @regions = regions
  Jsii::Type.check_type(@regions, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "regions") unless @regions.nil?
  @selection_criteria = selection_criteria
  Jsii::Type.check_type(@selection_criteria, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "selectionCriteria") unless @selection_criteria.nil?
  @telemetry_source_types = telemetry_source_types
  Jsii::Type.check_type(@telemetry_source_types, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "telemetrySourceTypes") unless @telemetry_source_types.nil?
end

Instance Attribute Details

#all_regionsBoolean, ... (readonly)

When true, the rule is replicated to all supported regions.



1295
1296
1297
# File 'observability_admin/cfn_telemetry_rule.rb', line 1295

def all_regions
  @all_regions
end

#allow_field_updatesBoolean, ... (readonly)

Note:

Default: - false

When true, configuration drift in managed telemetry resources will be detected and remediated for resource-level fields.



1290
1291
1292
# File 'observability_admin/cfn_telemetry_rule.rb', line 1290

def allow_field_updates
  @allow_field_updates
end

#destination_configurationAWSCDK::IResolvable, ... (readonly)

Configuration specifying where and how the telemetry data should be delivered.



1300
1301
1302
# File 'observability_admin/cfn_telemetry_rule.rb', line 1300

def destination_configuration
  @destination_configuration
end

#regionsArray<String>? (readonly)

List of AWS region codes where the rule should be replicated.



1305
1306
1307
# File 'observability_admin/cfn_telemetry_rule.rb', line 1305

def regions
  @regions
end

#resource_typeString (readonly)

The type of AWS resource to configure telemetry for (e.g., "AWS::EC2::VPC", "AWS::EKS::Cluster", "AWS::WAFv2::WebACL").



1279
1280
1281
# File 'observability_admin/cfn_telemetry_rule.rb', line 1279

def resource_type
  @resource_type
end

#selection_criteriaString? (readonly)

Criteria for selecting which resources the rule applies to, such as resource tags.



1310
1311
1312
# File 'observability_admin/cfn_telemetry_rule.rb', line 1310

def selection_criteria
  @selection_criteria
end

#telemetry_source_typesArray<String>? (readonly)

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.



1317
1318
1319
# File 'observability_admin/cfn_telemetry_rule.rb', line 1317

def telemetry_source_types
  @telemetry_source_types
end

#telemetry_typeString (readonly)

The type of telemetry to collect (Logs, Metrics, or Traces).



1284
1285
1286
# File 'observability_admin/cfn_telemetry_rule.rb', line 1284

def telemetry_type
  @telemetry_type
end

Class Method Details

.jsii_propertiesObject



1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
# File 'observability_admin/cfn_telemetry_rule.rb', line 1319

def self.jsii_properties
  {
    :resource_type => "resourceType",
    :telemetry_type => "telemetryType",
    :allow_field_updates => "allowFieldUpdates",
    :all_regions => "allRegions",
    :destination_configuration => "destinationConfiguration",
    :regions => "regions",
    :selection_criteria => "selectionCriteria",
    :telemetry_source_types => "telemetrySourceTypes",
  }
end

Instance Method Details

#to_jsiiObject



1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
# File 'observability_admin/cfn_telemetry_rule.rb', line 1332

def to_jsii
  result = {}
  result.merge!({
    "resourceType" => @resource_type,
    "telemetryType" => @telemetry_type,
    "allowFieldUpdates" => @allow_field_updates,
    "allRegions" => @all_regions,
    "destinationConfiguration" => @destination_configuration,
    "regions" => @regions,
    "selectionCriteria" => @selection_criteria,
    "telemetrySourceTypes" => @telemetry_source_types,
  })
  result.compact
end