Class: AWSCDK::Shield::CfnProtectionGroupProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Shield::CfnProtectionGroupProps
- Defined in:
- shield/cfn_protection_group_props.rb
Overview
Properties for defining a CfnProtectionGroup.
Instance Attribute Summary collapse
-
#aggregation ⇒ String
readonly
Defines how AWS Shield combines resource data for the group in order to detect, mitigate, and report events.
-
#members ⇒ Array<String>?
readonly
The ARNs (Amazon Resource Names) of the resources to include in the protection group.
-
#pattern ⇒ String
readonly
The criteria to use to choose the protected resources for inclusion in the group.
-
#protection_group_id ⇒ String
readonly
The name of the protection group.
-
#resource_type ⇒ String?
readonly
The resource type to include in the protection group.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
Key:value pairs associated with an AWS resource.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(aggregation:, pattern:, protection_group_id:, members: nil, resource_type: nil, tags: nil) ⇒ CfnProtectionGroupProps
constructor
A new instance of CfnProtectionGroupProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(aggregation:, pattern:, protection_group_id:, members: nil, resource_type: nil, tags: nil) ⇒ CfnProtectionGroupProps
Returns a new instance of CfnProtectionGroupProps.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'shield/cfn_protection_group_props.rb', line 15 def initialize(aggregation:, pattern:, protection_group_id:, members: nil, resource_type: nil, tags: nil) @aggregation = aggregation Jsii::Type.check_type(@aggregation, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "aggregation") @pattern = pattern Jsii::Type.check_type(@pattern, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "pattern") @protection_group_id = protection_group_id Jsii::Type.check_type(@protection_group_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "protectionGroupId") @members = members Jsii::Type.check_type(@members, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "members") unless @members.nil? @resource_type = resource_type Jsii::Type.check_type(@resource_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "resourceType") unless @resource_type.nil? @tags = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil? end |
Instance Attribute Details
#aggregation ⇒ String (readonly)
Defines how AWS Shield combines resource data for the group in order to detect, mitigate, and report events.
Sum- Use the total traffic across the group. This is a good choice for most cases. Examples include Elastic IP addresses for EC2 instances that scale manually or automatically.Mean- Use the average of the traffic across the group. This is a good choice for resources that share traffic uniformly. Examples include accelerators and load balancers.Max- Use the highest traffic from each resource. This is useful for resources that don't share traffic and for resources that share that traffic in a non-uniform way. Examples include Amazon CloudFront distributions and origin resources for CloudFront distributions.
38 39 40 |
# File 'shield/cfn_protection_group_props.rb', line 38 def aggregation @aggregation end |
#members ⇒ Array<String>? (readonly)
The ARNs (Amazon Resource Names) of the resources to include in the protection group.
You must set this when you set Pattern to ARBITRARY and you must not set it for any other Pattern setting.
59 60 61 |
# File 'shield/cfn_protection_group_props.rb', line 59 def members @members end |
#pattern ⇒ String (readonly)
The criteria to use to choose the protected resources for inclusion in the group.
You can include all resources that have protections, provide a list of resource ARNs (Amazon Resource Names), or include all resources of a specified resource type.
45 46 47 |
# File 'shield/cfn_protection_group_props.rb', line 45 def pattern @pattern end |
#protection_group_id ⇒ String (readonly)
The name of the protection group.
You use this to identify the protection group in lists and to manage the protection group, for example to update, delete, or describe it.
52 53 54 |
# File 'shield/cfn_protection_group_props.rb', line 52 def protection_group_id @protection_group_id end |
#resource_type ⇒ String? (readonly)
The resource type to include in the protection group.
All protected resources of this type are included in the protection group. You must set this when you set Pattern to BY_RESOURCE_TYPE and you must not set it for any other Pattern setting.
66 67 68 |
# File 'shield/cfn_protection_group_props.rb', line 66 def resource_type @resource_type end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
Key:value pairs associated with an AWS resource.
The key:value pair can be anything you define. Typically, the tag key represents a category (such as "environment") and the tag value represents a specific value within that category (such as "test," "development," or "production"). You can add up to 50 tags to each AWS resource.
73 74 75 |
# File 'shield/cfn_protection_group_props.rb', line 73 def @tags end |
Class Method Details
.jsii_properties ⇒ Object
75 76 77 78 79 80 81 82 83 84 |
# File 'shield/cfn_protection_group_props.rb', line 75 def self.jsii_properties { :aggregation => "aggregation", :pattern => "pattern", :protection_group_id => "protectionGroupId", :members => "members", :resource_type => "resourceType", :tags => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'shield/cfn_protection_group_props.rb', line 86 def to_jsii result = {} result.merge!({ "aggregation" => @aggregation, "pattern" => @pattern, "protectionGroupId" => @protection_group_id, "members" => @members, "resourceType" => @resource_type, "tags" => @tags, }) result.compact end |