CfnProtectionGroupProps Struct
Properties for defining a CfnProtectionGroup.
| Source | |
|---|---|
| Type last changed |
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_shield as shield } from 'aws-cdk-lib';
const cfnProtectionGroupProps: shield.CfnProtectionGroupProps = {
aggregation: 'aggregation',
pattern: 'pattern',
protectionGroupId: 'protectionGroupId',
// the properties below are optional
members: ['members'],
resourceType: 'resourceType',
tags: [{
key: 'key',
value: 'value',
}],
};
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_shield as shield
cfn_protection_group_props = shield.CfnProtectionGroupProps(
aggregation="aggregation",
pattern="pattern",
protection_group_id="protectionGroupId",
# the properties below are optional
members=["members"],
resource_type="resourceType",
tags=[CfnTag(
key="key",
value="value"
)]
)
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.shield.*;
CfnProtectionGroupProps cfnProtectionGroupProps = CfnProtectionGroupProps.builder()
.aggregation("aggregation")
.pattern("pattern")
.protectionGroupId("protectionGroupId")
// the properties below are optional
.members(List.of("members"))
.resourceType("resourceType")
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Shield;
var cfnProtectionGroupProps = new CfnProtectionGroupProps {
Aggregation = "aggregation",
Pattern = "pattern",
ProtectionGroupId = "protectionGroupId",
// the properties below are optional
Members = new [] { "members" },
ResourceType = "resourceType",
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
};
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
cfnProtectionGroupProps := &CfnProtectionGroupProps{
Aggregation: jsii.String("aggregation"),
Pattern: jsii.String("pattern"),
ProtectionGroupId: jsii.String("protectionGroupId"),
// the properties below are optional
Members: []*string{
jsii.String("members"),
},
ResourceType: jsii.String("resourceType"),
Tags: []CfnTag{
&CfnTag{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
}
Properties
notes
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.
membersoptionalstring[]membersoptionaltyping.List[str]membersoptionalList<String>Membersoptionalstring[]Membersoptional*[]*string #You must set this when you set Pattern to ARBITRARY and you must not set it for any other Pattern setting.
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.
protectionGroupIdstringprotection_group_idstrprotectionGroupIdStringProtectionGroupIdstringProtectionGroupId*string required #You use this to identify the protection group in lists and to manage the protection group, for example to update, delete, or describe it.
resourceTypeoptionalstringresource_typeoptionalstrresourceTypeoptionalStringResourceTypeoptionalstringResourceTypeoptional*string #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.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #notes
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.