Class: AWSCDK::Config::CfnOrganizationConfigRule::OrganizationCustomPolicyRuleMetadataProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
config/cfn_organization_config_rule.rb

Overview

An object that specifies metadata for your organization's AWS Config Custom Policy rule.

The metadata includes the runtime system in use, which accounts have debug logging enabled, and other custom rule metadata, such as resource type, resource ID of AWS resource, and organization trigger types that initiate AWS Config to evaluate AWS resources against a rule.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(policy_text:, runtime:, debug_log_delivery_accounts: nil, description: nil, input_parameters: nil, maximum_execution_frequency: nil, organization_config_rule_trigger_types: nil, resource_id_scope: nil, resource_types_scope: nil, tag_key_scope: nil, tag_value_scope: nil) ⇒ OrganizationCustomPolicyRuleMetadataProperty

Returns a new instance of OrganizationCustomPolicyRuleMetadataProperty.

Parameters:

  • policy_text (String)

    The policy definition containing the logic for your organization AWS Config Custom Policy rule.

  • runtime (String)

    The runtime system for your organization AWS Config Custom Policy rules.

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

    A list of accounts that you can enable debug logging for your organization AWS Config Custom Policy rule.

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

    The description that you provide for your organization AWS Config Custom Policy rule.

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

    A string, in JSON format, that is passed to your organization AWS Config Custom Policy rule.

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

    The maximum frequency with which AWS Config runs evaluations for a rule.

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

    The type of notification that initiates AWS Config to run an evaluation for a rule.

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

    The ID of the AWS resource that was evaluated.

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

    The type of the AWS resource that was evaluated.

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

    One part of a key-value pair that make up a tag.

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

    The optional part of a key-value pair that make up a tag.



601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
# File 'config/cfn_organization_config_rule.rb', line 601

def initialize(policy_text:, runtime:, debug_log_delivery_accounts: nil, description: nil, input_parameters: nil, maximum_execution_frequency: nil, organization_config_rule_trigger_types: nil, resource_id_scope: nil, resource_types_scope: nil, tag_key_scope: nil, tag_value_scope: nil)
  @policy_text = policy_text
  Jsii::Type.check_type(@policy_text, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "policyText")
  @runtime = runtime
  Jsii::Type.check_type(@runtime, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "runtime")
  @debug_log_delivery_accounts = debug_log_delivery_accounts
  Jsii::Type.check_type(@debug_log_delivery_accounts, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "debugLogDeliveryAccounts") unless @debug_log_delivery_accounts.nil?
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @input_parameters = input_parameters
  Jsii::Type.check_type(@input_parameters, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "inputParameters") unless @input_parameters.nil?
  @maximum_execution_frequency = maximum_execution_frequency
  Jsii::Type.check_type(@maximum_execution_frequency, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "maximumExecutionFrequency") unless @maximum_execution_frequency.nil?
  @organization_config_rule_trigger_types = organization_config_rule_trigger_types
  Jsii::Type.check_type(@organization_config_rule_trigger_types, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "organizationConfigRuleTriggerTypes") unless @organization_config_rule_trigger_types.nil?
  @resource_id_scope = resource_id_scope
  Jsii::Type.check_type(@resource_id_scope, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "resourceIdScope") unless @resource_id_scope.nil?
  @resource_types_scope = resource_types_scope
  Jsii::Type.check_type(@resource_types_scope, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "resourceTypesScope") unless @resource_types_scope.nil?
  @tag_key_scope = tag_key_scope
  Jsii::Type.check_type(@tag_key_scope, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "tagKeyScope") unless @tag_key_scope.nil?
  @tag_value_scope = tag_value_scope
  Jsii::Type.check_type(@tag_value_scope, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "tagValueScope") unless @tag_value_scope.nil?
end

Instance Attribute Details

#debug_log_delivery_accountsArray<String>? (readonly)

A list of accounts that you can enable debug logging for your organization AWS Config Custom Policy rule.

List is null when debug logging is enabled for all accounts.



644
645
646
# File 'config/cfn_organization_config_rule.rb', line 644

def debug_log_delivery_accounts
  @debug_log_delivery_accounts
end

#descriptionString? (readonly)

The description that you provide for your organization AWS Config Custom Policy rule.



649
650
651
# File 'config/cfn_organization_config_rule.rb', line 649

def description
  @description
end

#input_parametersString? (readonly)

A string, in JSON format, that is passed to your organization AWS Config Custom Policy rule.



654
655
656
# File 'config/cfn_organization_config_rule.rb', line 654

def input_parameters
  @input_parameters
end

#maximum_execution_frequencyString? (readonly)

The maximum frequency with which AWS Config runs evaluations for a rule.

Your AWS Config Custom Policy rule is triggered when AWS Config delivers the configuration snapshot. For more information, see ConfigSnapshotDeliveryProperties .



661
662
663
# File 'config/cfn_organization_config_rule.rb', line 661

def maximum_execution_frequency
  @maximum_execution_frequency
end

#organization_config_rule_trigger_typesArray<String>? (readonly)

The type of notification that initiates AWS Config to run an evaluation for a rule.

For AWS Config Custom Policy rules, AWS Config supports change-initiated notification types:

  • ConfigurationItemChangeNotification - Initiates an evaluation when AWS Config delivers a configuration item as a result of a resource change.
  • OversizedConfigurationItemChangeNotification - Initiates an evaluation when AWS Config delivers an oversized configuration item. AWS Config may generate this notification type when a resource changes and the notification exceeds the maximum size allowed by Amazon SNS.


671
672
673
# File 'config/cfn_organization_config_rule.rb', line 671

def organization_config_rule_trigger_types
  @organization_config_rule_trigger_types
end

#policy_textString (readonly)

The policy definition containing the logic for your organization AWS Config Custom Policy rule.



630
631
632
# File 'config/cfn_organization_config_rule.rb', line 630

def policy_text
  @policy_text
end

#resource_id_scopeString? (readonly)

The ID of the AWS resource that was evaluated.



676
677
678
# File 'config/cfn_organization_config_rule.rb', line 676

def resource_id_scope
  @resource_id_scope
end

#resource_types_scopeArray<String>? (readonly)

The type of the AWS resource that was evaluated.



681
682
683
# File 'config/cfn_organization_config_rule.rb', line 681

def resource_types_scope
  @resource_types_scope
end

#runtimeString (readonly)

The runtime system for your organization AWS Config Custom Policy rules.

Guard is a policy-as-code language that allows you to write policies that are enforced by AWS Config Custom Policy rules. For more information about Guard, see the Guard GitHub Repository .



637
638
639
# File 'config/cfn_organization_config_rule.rb', line 637

def runtime
  @runtime
end

#tag_key_scopeString? (readonly)

One part of a key-value pair that make up a tag.

A key is a general label that acts like a category for more specific tag values.



688
689
690
# File 'config/cfn_organization_config_rule.rb', line 688

def tag_key_scope
  @tag_key_scope
end

#tag_value_scopeString? (readonly)

The optional part of a key-value pair that make up a tag.

A value acts as a descriptor within a tag category (key).



695
696
697
# File 'config/cfn_organization_config_rule.rb', line 695

def tag_value_scope
  @tag_value_scope
end

Class Method Details

.jsii_propertiesObject



697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
# File 'config/cfn_organization_config_rule.rb', line 697

def self.jsii_properties
  {
    :policy_text => "policyText",
    :runtime => "runtime",
    :debug_log_delivery_accounts => "debugLogDeliveryAccounts",
    :description => "description",
    :input_parameters => "inputParameters",
    :maximum_execution_frequency => "maximumExecutionFrequency",
    :organization_config_rule_trigger_types => "organizationConfigRuleTriggerTypes",
    :resource_id_scope => "resourceIdScope",
    :resource_types_scope => "resourceTypesScope",
    :tag_key_scope => "tagKeyScope",
    :tag_value_scope => "tagValueScope",
  }
end

Instance Method Details

#to_jsiiObject



713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
# File 'config/cfn_organization_config_rule.rb', line 713

def to_jsii
  result = {}
  result.merge!({
    "policyText" => @policy_text,
    "runtime" => @runtime,
    "debugLogDeliveryAccounts" => @debug_log_delivery_accounts,
    "description" => @description,
    "inputParameters" => @input_parameters,
    "maximumExecutionFrequency" => @maximum_execution_frequency,
    "organizationConfigRuleTriggerTypes" => @organization_config_rule_trigger_types,
    "resourceIdScope" => @resource_id_scope,
    "resourceTypesScope" => @resource_types_scope,
    "tagKeyScope" => @tag_key_scope,
    "tagValueScope" => @tag_value_scope,
  })
  result.compact
end