Class: AWSCDK::Config::CfnOrganizationConfigRule::OrganizationCustomRuleMetadataProperty

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

Overview

An object that specifies organization custom rule metadata such as resource type, resource ID of AWS resource, Lambda function ARN, and organization trigger types that trigger AWS Config to evaluate your AWS resources against a rule.

It also provides the frequency with which you want AWS Config to run evaluations for the rule if the trigger type is periodic.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(lambda_function_arn:, organization_config_rule_trigger_types:, description: nil, input_parameters: nil, maximum_execution_frequency: nil, resource_id_scope: nil, resource_types_scope: nil, tag_key_scope: nil, tag_value_scope: nil) ⇒ OrganizationCustomRuleMetadataProperty

Returns a new instance of OrganizationCustomRuleMetadataProperty.

Parameters:

  • lambda_function_arn (String)

    The lambda function ARN.

  • organization_config_rule_trigger_types (Array<String>)

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

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

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

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

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

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

    The maximum frequency with which AWS Config runs evaluations 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.



749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
# File 'config/cfn_organization_config_rule.rb', line 749

def initialize(lambda_function_arn:, organization_config_rule_trigger_types:, description: nil, input_parameters: nil, maximum_execution_frequency: nil, resource_id_scope: nil, resource_types_scope: nil, tag_key_scope: nil, tag_value_scope: nil)
  @lambda_function_arn = lambda_function_arn
  Jsii::Type.check_type(@lambda_function_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "lambdaFunctionArn")
  @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")
  @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?
  @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

#descriptionString? (readonly)

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



790
791
792
# File 'config/cfn_organization_config_rule.rb', line 790

def description
  @description
end

#input_parametersString? (readonly)

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



795
796
797
# File 'config/cfn_organization_config_rule.rb', line 795

def input_parameters
  @input_parameters
end

#lambda_function_arnString (readonly)

The lambda function ARN.



774
775
776
# File 'config/cfn_organization_config_rule.rb', line 774

def lambda_function_arn
  @lambda_function_arn
end

#maximum_execution_frequencyString? (readonly)

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

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

By default, rules with a periodic trigger are evaluated every 24 hours. To change the frequency, specify a valid value for the MaximumExecutionFrequency parameter.



804
805
806
# File 'config/cfn_organization_config_rule.rb', line 804

def maximum_execution_frequency
  @maximum_execution_frequency
end

#organization_config_rule_trigger_typesArray<String> (readonly)

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

You can specify the following notification types:

  • ConfigurationItemChangeNotification - Triggers an evaluation when AWS Config delivers a configuration item as a result of a resource change.
  • OversizedConfigurationItemChangeNotification - Triggers 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.
  • ScheduledNotification - Triggers a periodic evaluation at the frequency specified for MaximumExecutionFrequency .


785
786
787
# File 'config/cfn_organization_config_rule.rb', line 785

def organization_config_rule_trigger_types
  @organization_config_rule_trigger_types
end

#resource_id_scopeString? (readonly)

The ID of the AWS resource that was evaluated.



809
810
811
# File 'config/cfn_organization_config_rule.rb', line 809

def resource_id_scope
  @resource_id_scope
end

#resource_types_scopeArray<String>? (readonly)

The type of the AWS resource that was evaluated.



814
815
816
# File 'config/cfn_organization_config_rule.rb', line 814

def resource_types_scope
  @resource_types_scope
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.



821
822
823
# File 'config/cfn_organization_config_rule.rb', line 821

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).



828
829
830
# File 'config/cfn_organization_config_rule.rb', line 828

def tag_value_scope
  @tag_value_scope
end

Class Method Details

.jsii_propertiesObject



830
831
832
833
834
835
836
837
838
839
840
841
842
# File 'config/cfn_organization_config_rule.rb', line 830

def self.jsii_properties
  {
    :lambda_function_arn => "lambdaFunctionArn",
    :organization_config_rule_trigger_types => "organizationConfigRuleTriggerTypes",
    :description => "description",
    :input_parameters => "inputParameters",
    :maximum_execution_frequency => "maximumExecutionFrequency",
    :resource_id_scope => "resourceIdScope",
    :resource_types_scope => "resourceTypesScope",
    :tag_key_scope => "tagKeyScope",
    :tag_value_scope => "tagValueScope",
  }
end

Instance Method Details

#to_jsiiObject



844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
# File 'config/cfn_organization_config_rule.rb', line 844

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