Documentation
¶
Index ¶
- type Protection
- type ProtectionArgs
- type ProtectionArray
- type ProtectionArrayInput
- type ProtectionArrayOutput
- func (ProtectionArrayOutput) ElementType() reflect.Type
- func (o ProtectionArrayOutput) Index(i pulumi.IntInput) ProtectionOutput
- func (o ProtectionArrayOutput) ToProtectionArrayOutput() ProtectionArrayOutput
- func (o ProtectionArrayOutput) ToProtectionArrayOutputWithContext(ctx context.Context) ProtectionArrayOutput
- type ProtectionGroup
- type ProtectionGroupArgs
- type ProtectionGroupArray
- type ProtectionGroupArrayInput
- type ProtectionGroupArrayOutput
- func (ProtectionGroupArrayOutput) ElementType() reflect.Type
- func (o ProtectionGroupArrayOutput) Index(i pulumi.IntInput) ProtectionGroupOutput
- func (o ProtectionGroupArrayOutput) ToProtectionGroupArrayOutput() ProtectionGroupArrayOutput
- func (o ProtectionGroupArrayOutput) ToProtectionGroupArrayOutputWithContext(ctx context.Context) ProtectionGroupArrayOutput
- type ProtectionGroupInput
- type ProtectionGroupMap
- type ProtectionGroupMapInput
- type ProtectionGroupMapOutput
- func (ProtectionGroupMapOutput) ElementType() reflect.Type
- func (o ProtectionGroupMapOutput) MapIndex(k pulumi.StringInput) ProtectionGroupOutput
- func (o ProtectionGroupMapOutput) ToProtectionGroupMapOutput() ProtectionGroupMapOutput
- func (o ProtectionGroupMapOutput) ToProtectionGroupMapOutputWithContext(ctx context.Context) ProtectionGroupMapOutput
- type ProtectionGroupOutput
- func (o ProtectionGroupOutput) Aggregation() pulumi.StringOutput
- func (ProtectionGroupOutput) ElementType() reflect.Type
- func (o ProtectionGroupOutput) Members() pulumi.StringArrayOutput
- func (o ProtectionGroupOutput) Pattern() pulumi.StringOutput
- func (o ProtectionGroupOutput) ProtectionGroupArn() pulumi.StringOutput
- func (o ProtectionGroupOutput) ProtectionGroupId() pulumi.StringOutput
- func (o ProtectionGroupOutput) ResourceType() pulumi.StringPtrOutput
- func (o ProtectionGroupOutput) Tags() pulumi.StringMapOutput
- func (o ProtectionGroupOutput) TagsAll() pulumi.StringMapOutput
- func (o ProtectionGroupOutput) ToProtectionGroupOutput() ProtectionGroupOutput
- func (o ProtectionGroupOutput) ToProtectionGroupOutputWithContext(ctx context.Context) ProtectionGroupOutput
- type ProtectionGroupState
- type ProtectionHealthCheckAssociation
- func GetProtectionHealthCheckAssociation(ctx *pulumi.Context, name string, id pulumi.IDInput, ...) (*ProtectionHealthCheckAssociation, error)
- func NewProtectionHealthCheckAssociation(ctx *pulumi.Context, name string, args *ProtectionHealthCheckAssociationArgs, ...) (*ProtectionHealthCheckAssociation, error)
- func (*ProtectionHealthCheckAssociation) ElementType() reflect.Type
- func (i *ProtectionHealthCheckAssociation) ToProtectionHealthCheckAssociationOutput() ProtectionHealthCheckAssociationOutput
- func (i *ProtectionHealthCheckAssociation) ToProtectionHealthCheckAssociationOutputWithContext(ctx context.Context) ProtectionHealthCheckAssociationOutput
- type ProtectionHealthCheckAssociationArgs
- type ProtectionHealthCheckAssociationArray
- func (ProtectionHealthCheckAssociationArray) ElementType() reflect.Type
- func (i ProtectionHealthCheckAssociationArray) ToProtectionHealthCheckAssociationArrayOutput() ProtectionHealthCheckAssociationArrayOutput
- func (i ProtectionHealthCheckAssociationArray) ToProtectionHealthCheckAssociationArrayOutputWithContext(ctx context.Context) ProtectionHealthCheckAssociationArrayOutput
- type ProtectionHealthCheckAssociationArrayInput
- type ProtectionHealthCheckAssociationArrayOutput
- func (ProtectionHealthCheckAssociationArrayOutput) ElementType() reflect.Type
- func (o ProtectionHealthCheckAssociationArrayOutput) Index(i pulumi.IntInput) ProtectionHealthCheckAssociationOutput
- func (o ProtectionHealthCheckAssociationArrayOutput) ToProtectionHealthCheckAssociationArrayOutput() ProtectionHealthCheckAssociationArrayOutput
- func (o ProtectionHealthCheckAssociationArrayOutput) ToProtectionHealthCheckAssociationArrayOutputWithContext(ctx context.Context) ProtectionHealthCheckAssociationArrayOutput
- type ProtectionHealthCheckAssociationInput
- type ProtectionHealthCheckAssociationMap
- func (ProtectionHealthCheckAssociationMap) ElementType() reflect.Type
- func (i ProtectionHealthCheckAssociationMap) ToProtectionHealthCheckAssociationMapOutput() ProtectionHealthCheckAssociationMapOutput
- func (i ProtectionHealthCheckAssociationMap) ToProtectionHealthCheckAssociationMapOutputWithContext(ctx context.Context) ProtectionHealthCheckAssociationMapOutput
- type ProtectionHealthCheckAssociationMapInput
- type ProtectionHealthCheckAssociationMapOutput
- func (ProtectionHealthCheckAssociationMapOutput) ElementType() reflect.Type
- func (o ProtectionHealthCheckAssociationMapOutput) MapIndex(k pulumi.StringInput) ProtectionHealthCheckAssociationOutput
- func (o ProtectionHealthCheckAssociationMapOutput) ToProtectionHealthCheckAssociationMapOutput() ProtectionHealthCheckAssociationMapOutput
- func (o ProtectionHealthCheckAssociationMapOutput) ToProtectionHealthCheckAssociationMapOutputWithContext(ctx context.Context) ProtectionHealthCheckAssociationMapOutput
- type ProtectionHealthCheckAssociationOutput
- func (ProtectionHealthCheckAssociationOutput) ElementType() reflect.Type
- func (o ProtectionHealthCheckAssociationOutput) HealthCheckArn() pulumi.StringOutput
- func (o ProtectionHealthCheckAssociationOutput) ShieldProtectionId() pulumi.StringOutput
- func (o ProtectionHealthCheckAssociationOutput) ToProtectionHealthCheckAssociationOutput() ProtectionHealthCheckAssociationOutput
- func (o ProtectionHealthCheckAssociationOutput) ToProtectionHealthCheckAssociationOutputWithContext(ctx context.Context) ProtectionHealthCheckAssociationOutput
- type ProtectionHealthCheckAssociationState
- type ProtectionInput
- type ProtectionMap
- type ProtectionMapInput
- type ProtectionMapOutput
- func (ProtectionMapOutput) ElementType() reflect.Type
- func (o ProtectionMapOutput) MapIndex(k pulumi.StringInput) ProtectionOutput
- func (o ProtectionMapOutput) ToProtectionMapOutput() ProtectionMapOutput
- func (o ProtectionMapOutput) ToProtectionMapOutputWithContext(ctx context.Context) ProtectionMapOutput
- type ProtectionOutput
- func (o ProtectionOutput) Arn() pulumi.StringOutput
- func (ProtectionOutput) ElementType() reflect.Type
- func (o ProtectionOutput) Name() pulumi.StringOutput
- func (o ProtectionOutput) ResourceArn() pulumi.StringOutput
- func (o ProtectionOutput) Tags() pulumi.StringMapOutput
- func (o ProtectionOutput) TagsAll() pulumi.StringMapOutput
- func (o ProtectionOutput) ToProtectionOutput() ProtectionOutput
- func (o ProtectionOutput) ToProtectionOutputWithContext(ctx context.Context) ProtectionOutput
- type ProtectionState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Protection ¶
type Protection struct {
pulumi.CustomResourceState
// The ARN of the Protection.
Arn pulumi.StringOutput `pulumi:"arn"`
// A friendly name for the Protection you are creating.
Name pulumi.StringOutput `pulumi:"name"`
// The ARN (Amazon Resource Name) of the resource to be protected.
ResourceArn pulumi.StringOutput `pulumi:"resourceArn"`
// Key-value map of resource tags. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
}
Enables AWS Shield Advanced for a specific AWS resource. The resource can be an Amazon CloudFront distribution, Elastic Load Balancing load balancer, AWS Global Accelerator accelerator, Elastic IP Address, or an Amazon Route 53 hosted zone.
## Example Usage ### Create protection
```go package main
import (
"fmt" "github.com/pulumi/pulumi-aws/sdk/v5/go/aws" "github.com/pulumi/pulumi-aws/sdk/v5/go/aws/ec2" "github.com/pulumi/pulumi-aws/sdk/v5/go/aws/shield" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := aws.GetAvailabilityZones(ctx, nil, nil)
if err != nil {
return err
}
currentRegion, err := aws.GetRegion(ctx, nil, nil)
if err != nil {
return err
}
currentCallerIdentity, err := aws.GetCallerIdentity(ctx, nil, nil)
if err != nil {
return err
}
exampleEip, err := ec2.NewEip(ctx, "exampleEip", &ec2.EipArgs{
Vpc: pulumi.Bool(true),
})
if err != nil {
return err
}
_, err = shield.NewProtection(ctx, "exampleProtection", &shield.ProtectionArgs{
ResourceArn: exampleEip.ID().ApplyT(func(id string) (string, error) {
return fmt.Sprintf("arn:aws:ec2:%v:%v:eip-allocation/%v", currentRegion.Name, currentCallerIdentity.AccountId, id), nil
}).(pulumi.StringOutput),
Tags: pulumi.StringMap{
"Environment": pulumi.String("Dev"),
},
})
if err != nil {
return err
}
return nil
})
}
```
## Import
Shield protection resources can be imported by specifying their ID e.g.,
```sh
$ pulumi import aws:shield/protection:Protection example ff9592dc-22f3-4e88-afa1-7b29fde9669a
```
func GetProtection ¶
func GetProtection(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ProtectionState, opts ...pulumi.ResourceOption) (*Protection, error)
GetProtection gets an existing Protection resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
func NewProtection ¶
func NewProtection(ctx *pulumi.Context, name string, args *ProtectionArgs, opts ...pulumi.ResourceOption) (*Protection, error)
NewProtection registers a new resource with the given unique name, arguments, and options.
func (*Protection) ElementType ¶
func (*Protection) ElementType() reflect.Type
func (*Protection) ToProtectionOutput ¶
func (i *Protection) ToProtectionOutput() ProtectionOutput
func (*Protection) ToProtectionOutputWithContext ¶
func (i *Protection) ToProtectionOutputWithContext(ctx context.Context) ProtectionOutput
type ProtectionArgs ¶
type ProtectionArgs struct {
// A friendly name for the Protection you are creating.
Name pulumi.StringPtrInput
// The ARN (Amazon Resource Name) of the resource to be protected.
ResourceArn pulumi.StringInput
// Key-value map of resource tags. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Tags pulumi.StringMapInput
// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
TagsAll pulumi.StringMapInput
}
The set of arguments for constructing a Protection resource.
func (ProtectionArgs) ElementType ¶
func (ProtectionArgs) ElementType() reflect.Type
type ProtectionArray ¶
type ProtectionArray []ProtectionInput
func (ProtectionArray) ElementType ¶
func (ProtectionArray) ElementType() reflect.Type
func (ProtectionArray) ToProtectionArrayOutput ¶
func (i ProtectionArray) ToProtectionArrayOutput() ProtectionArrayOutput
func (ProtectionArray) ToProtectionArrayOutputWithContext ¶
func (i ProtectionArray) ToProtectionArrayOutputWithContext(ctx context.Context) ProtectionArrayOutput
type ProtectionArrayInput ¶
type ProtectionArrayInput interface {
pulumi.Input
ToProtectionArrayOutput() ProtectionArrayOutput
ToProtectionArrayOutputWithContext(context.Context) ProtectionArrayOutput
}
ProtectionArrayInput is an input type that accepts ProtectionArray and ProtectionArrayOutput values. You can construct a concrete instance of `ProtectionArrayInput` via:
ProtectionArray{ ProtectionArgs{...} }
type ProtectionArrayOutput ¶
type ProtectionArrayOutput struct{ *pulumi.OutputState }
func (ProtectionArrayOutput) ElementType ¶
func (ProtectionArrayOutput) ElementType() reflect.Type
func (ProtectionArrayOutput) Index ¶
func (o ProtectionArrayOutput) Index(i pulumi.IntInput) ProtectionOutput
func (ProtectionArrayOutput) ToProtectionArrayOutput ¶
func (o ProtectionArrayOutput) ToProtectionArrayOutput() ProtectionArrayOutput
func (ProtectionArrayOutput) ToProtectionArrayOutputWithContext ¶
func (o ProtectionArrayOutput) ToProtectionArrayOutputWithContext(ctx context.Context) ProtectionArrayOutput
type ProtectionGroup ¶
type ProtectionGroup struct {
pulumi.CustomResourceState
// Defines how AWS Shield combines resource data for the group in order to detect, mitigate, and report events.
Aggregation pulumi.StringOutput `pulumi:"aggregation"`
// The Amazon Resource Names (ARNs) 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.
Members pulumi.StringArrayOutput `pulumi:"members"`
// The criteria to use to choose the protected resources for inclusion in the group.
Pattern pulumi.StringOutput `pulumi:"pattern"`
// The ARN (Amazon Resource Name) of the protection group.
ProtectionGroupArn pulumi.StringOutput `pulumi:"protectionGroupArn"`
// The name of the protection group.
ProtectionGroupId pulumi.StringOutput `pulumi:"protectionGroupId"`
// The resource type to include 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.
ResourceType pulumi.StringPtrOutput `pulumi:"resourceType"`
// Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
}
Creates a grouping of protected resources so they can be handled as a collective. This resource grouping improves the accuracy of detection and reduces false positives. For more information see [Managing AWS Shield Advanced protection groups](https://docs.aws.amazon.com/waf/latest/developerguide/manage-protection-group.html)
## Example Usage ### Create protection group for all resources
```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/shield" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := shield.NewProtectionGroup(ctx, "example", &shield.ProtectionGroupArgs{
Aggregation: pulumi.String("MAX"),
Pattern: pulumi.String("ALL"),
ProtectionGroupId: pulumi.String("example"),
})
if err != nil {
return err
}
return nil
})
}
``` ### Create protection group for arbitrary number of resources
```go package main
import (
"fmt" "github.com/pulumi/pulumi-aws/sdk/v5/go/aws" "github.com/pulumi/pulumi-aws/sdk/v5/go/aws/ec2" "github.com/pulumi/pulumi-aws/sdk/v5/go/aws/shield" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
currentRegion, err := aws.GetRegion(ctx, nil, nil)
if err != nil {
return err
}
currentCallerIdentity, err := aws.GetCallerIdentity(ctx, nil, nil)
if err != nil {
return err
}
exampleEip, err := ec2.NewEip(ctx, "exampleEip", &ec2.EipArgs{
Vpc: pulumi.Bool(true),
})
if err != nil {
return err
}
exampleProtection, err := shield.NewProtection(ctx, "exampleProtection", &shield.ProtectionArgs{
ResourceArn: exampleEip.ID().ApplyT(func(id string) (string, error) {
return fmt.Sprintf("arn:aws:ec2:%v:%v:eip-allocation/%v", currentRegion.Name, currentCallerIdentity.AccountId, id), nil
}).(pulumi.StringOutput),
})
if err != nil {
return err
}
_, err = shield.NewProtectionGroup(ctx, "exampleProtectionGroup", &shield.ProtectionGroupArgs{
ProtectionGroupId: pulumi.String("example"),
Aggregation: pulumi.String("MEAN"),
Pattern: pulumi.String("ARBITRARY"),
Members: pulumi.StringArray{
exampleEip.ID().ApplyT(func(id string) (string, error) {
return fmt.Sprintf("arn:aws:ec2:%v:%v:eip-allocation/%v", currentRegion.Name, currentCallerIdentity.AccountId, id), nil
}).(pulumi.StringOutput),
},
}, pulumi.DependsOn([]pulumi.Resource{
exampleProtection,
}))
if err != nil {
return err
}
return nil
})
}
``` ### Create protection group for a type of resource
```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/shield" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := shield.NewProtectionGroup(ctx, "example", &shield.ProtectionGroupArgs{
Aggregation: pulumi.String("SUM"),
Pattern: pulumi.String("BY_RESOURCE_TYPE"),
ProtectionGroupId: pulumi.String("example"),
ResourceType: pulumi.String("ELASTIC_IP_ALLOCATION"),
})
if err != nil {
return err
}
return nil
})
}
```
## Import
Shield protection group resources can be imported by specifying their protection group id.
```sh
$ pulumi import aws:shield/protectionGroup:ProtectionGroup example example
```
func GetProtectionGroup ¶
func GetProtectionGroup(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ProtectionGroupState, opts ...pulumi.ResourceOption) (*ProtectionGroup, error)
GetProtectionGroup gets an existing ProtectionGroup resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
func NewProtectionGroup ¶
func NewProtectionGroup(ctx *pulumi.Context, name string, args *ProtectionGroupArgs, opts ...pulumi.ResourceOption) (*ProtectionGroup, error)
NewProtectionGroup registers a new resource with the given unique name, arguments, and options.
func (*ProtectionGroup) ElementType ¶
func (*ProtectionGroup) ElementType() reflect.Type
func (*ProtectionGroup) ToProtectionGroupOutput ¶
func (i *ProtectionGroup) ToProtectionGroupOutput() ProtectionGroupOutput
func (*ProtectionGroup) ToProtectionGroupOutputWithContext ¶
func (i *ProtectionGroup) ToProtectionGroupOutputWithContext(ctx context.Context) ProtectionGroupOutput
type ProtectionGroupArgs ¶
type ProtectionGroupArgs struct {
// Defines how AWS Shield combines resource data for the group in order to detect, mitigate, and report events.
Aggregation pulumi.StringInput
// The Amazon Resource Names (ARNs) 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.
Members pulumi.StringArrayInput
// The criteria to use to choose the protected resources for inclusion in the group.
Pattern pulumi.StringInput
// The name of the protection group.
ProtectionGroupId pulumi.StringInput
// The resource type to include 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.
ResourceType pulumi.StringPtrInput
// Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Tags pulumi.StringMapInput
// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
TagsAll pulumi.StringMapInput
}
The set of arguments for constructing a ProtectionGroup resource.
func (ProtectionGroupArgs) ElementType ¶
func (ProtectionGroupArgs) ElementType() reflect.Type
type ProtectionGroupArray ¶
type ProtectionGroupArray []ProtectionGroupInput
func (ProtectionGroupArray) ElementType ¶
func (ProtectionGroupArray) ElementType() reflect.Type
func (ProtectionGroupArray) ToProtectionGroupArrayOutput ¶
func (i ProtectionGroupArray) ToProtectionGroupArrayOutput() ProtectionGroupArrayOutput
func (ProtectionGroupArray) ToProtectionGroupArrayOutputWithContext ¶
func (i ProtectionGroupArray) ToProtectionGroupArrayOutputWithContext(ctx context.Context) ProtectionGroupArrayOutput
type ProtectionGroupArrayInput ¶
type ProtectionGroupArrayInput interface {
pulumi.Input
ToProtectionGroupArrayOutput() ProtectionGroupArrayOutput
ToProtectionGroupArrayOutputWithContext(context.Context) ProtectionGroupArrayOutput
}
ProtectionGroupArrayInput is an input type that accepts ProtectionGroupArray and ProtectionGroupArrayOutput values. You can construct a concrete instance of `ProtectionGroupArrayInput` via:
ProtectionGroupArray{ ProtectionGroupArgs{...} }
type ProtectionGroupArrayOutput ¶
type ProtectionGroupArrayOutput struct{ *pulumi.OutputState }
func (ProtectionGroupArrayOutput) ElementType ¶
func (ProtectionGroupArrayOutput) ElementType() reflect.Type
func (ProtectionGroupArrayOutput) Index ¶
func (o ProtectionGroupArrayOutput) Index(i pulumi.IntInput) ProtectionGroupOutput
func (ProtectionGroupArrayOutput) ToProtectionGroupArrayOutput ¶
func (o ProtectionGroupArrayOutput) ToProtectionGroupArrayOutput() ProtectionGroupArrayOutput
func (ProtectionGroupArrayOutput) ToProtectionGroupArrayOutputWithContext ¶
func (o ProtectionGroupArrayOutput) ToProtectionGroupArrayOutputWithContext(ctx context.Context) ProtectionGroupArrayOutput
type ProtectionGroupInput ¶
type ProtectionGroupInput interface {
pulumi.Input
ToProtectionGroupOutput() ProtectionGroupOutput
ToProtectionGroupOutputWithContext(ctx context.Context) ProtectionGroupOutput
}
type ProtectionGroupMap ¶
type ProtectionGroupMap map[string]ProtectionGroupInput
func (ProtectionGroupMap) ElementType ¶
func (ProtectionGroupMap) ElementType() reflect.Type
func (ProtectionGroupMap) ToProtectionGroupMapOutput ¶
func (i ProtectionGroupMap) ToProtectionGroupMapOutput() ProtectionGroupMapOutput
func (ProtectionGroupMap) ToProtectionGroupMapOutputWithContext ¶
func (i ProtectionGroupMap) ToProtectionGroupMapOutputWithContext(ctx context.Context) ProtectionGroupMapOutput
type ProtectionGroupMapInput ¶
type ProtectionGroupMapInput interface {
pulumi.Input
ToProtectionGroupMapOutput() ProtectionGroupMapOutput
ToProtectionGroupMapOutputWithContext(context.Context) ProtectionGroupMapOutput
}
ProtectionGroupMapInput is an input type that accepts ProtectionGroupMap and ProtectionGroupMapOutput values. You can construct a concrete instance of `ProtectionGroupMapInput` via:
ProtectionGroupMap{ "key": ProtectionGroupArgs{...} }
type ProtectionGroupMapOutput ¶
type ProtectionGroupMapOutput struct{ *pulumi.OutputState }
func (ProtectionGroupMapOutput) ElementType ¶
func (ProtectionGroupMapOutput) ElementType() reflect.Type
func (ProtectionGroupMapOutput) MapIndex ¶
func (o ProtectionGroupMapOutput) MapIndex(k pulumi.StringInput) ProtectionGroupOutput
func (ProtectionGroupMapOutput) ToProtectionGroupMapOutput ¶
func (o ProtectionGroupMapOutput) ToProtectionGroupMapOutput() ProtectionGroupMapOutput
func (ProtectionGroupMapOutput) ToProtectionGroupMapOutputWithContext ¶
func (o ProtectionGroupMapOutput) ToProtectionGroupMapOutputWithContext(ctx context.Context) ProtectionGroupMapOutput
type ProtectionGroupOutput ¶
type ProtectionGroupOutput struct{ *pulumi.OutputState }
func (ProtectionGroupOutput) Aggregation ¶ added in v5.4.0
func (o ProtectionGroupOutput) Aggregation() pulumi.StringOutput
Defines how AWS Shield combines resource data for the group in order to detect, mitigate, and report events.
func (ProtectionGroupOutput) ElementType ¶
func (ProtectionGroupOutput) ElementType() reflect.Type
func (ProtectionGroupOutput) Members ¶ added in v5.4.0
func (o ProtectionGroupOutput) Members() pulumi.StringArrayOutput
The Amazon Resource Names (ARNs) 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.
func (ProtectionGroupOutput) Pattern ¶ added in v5.4.0
func (o ProtectionGroupOutput) Pattern() pulumi.StringOutput
The criteria to use to choose the protected resources for inclusion in the group.
func (ProtectionGroupOutput) ProtectionGroupArn ¶ added in v5.4.0
func (o ProtectionGroupOutput) ProtectionGroupArn() pulumi.StringOutput
The ARN (Amazon Resource Name) of the protection group.
func (ProtectionGroupOutput) ProtectionGroupId ¶ added in v5.4.0
func (o ProtectionGroupOutput) ProtectionGroupId() pulumi.StringOutput
The name of the protection group.
func (ProtectionGroupOutput) ResourceType ¶ added in v5.4.0
func (o ProtectionGroupOutput) ResourceType() pulumi.StringPtrOutput
The resource type to include 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.
func (ProtectionGroupOutput) Tags ¶ added in v5.4.0
func (o ProtectionGroupOutput) Tags() pulumi.StringMapOutput
Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
func (ProtectionGroupOutput) TagsAll ¶ added in v5.4.0
func (o ProtectionGroupOutput) TagsAll() pulumi.StringMapOutput
A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
func (ProtectionGroupOutput) ToProtectionGroupOutput ¶
func (o ProtectionGroupOutput) ToProtectionGroupOutput() ProtectionGroupOutput
func (ProtectionGroupOutput) ToProtectionGroupOutputWithContext ¶
func (o ProtectionGroupOutput) ToProtectionGroupOutputWithContext(ctx context.Context) ProtectionGroupOutput
type ProtectionGroupState ¶
type ProtectionGroupState struct {
// Defines how AWS Shield combines resource data for the group in order to detect, mitigate, and report events.
Aggregation pulumi.StringPtrInput
// The Amazon Resource Names (ARNs) 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.
Members pulumi.StringArrayInput
// The criteria to use to choose the protected resources for inclusion in the group.
Pattern pulumi.StringPtrInput
// The ARN (Amazon Resource Name) of the protection group.
ProtectionGroupArn pulumi.StringPtrInput
// The name of the protection group.
ProtectionGroupId pulumi.StringPtrInput
// The resource type to include 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.
ResourceType pulumi.StringPtrInput
// Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Tags pulumi.StringMapInput
// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
TagsAll pulumi.StringMapInput
}
func (ProtectionGroupState) ElementType ¶
func (ProtectionGroupState) ElementType() reflect.Type
type ProtectionHealthCheckAssociation ¶
type ProtectionHealthCheckAssociation struct {
pulumi.CustomResourceState
// The ARN (Amazon Resource Name) of the Route53 Health Check resource which will be associated to the protected resource.
HealthCheckArn pulumi.StringOutput `pulumi:"healthCheckArn"`
// The ID of the protected resource.
ShieldProtectionId pulumi.StringOutput `pulumi:"shieldProtectionId"`
}
Creates an association between a Route53 Health Check and a Shield Advanced protected resource. This association uses the health of your applications to improve responsiveness and accuracy in attack detection and mitigation.
Blog post: [AWS Shield Advanced now supports Health Based Detection](https://aws.amazon.com/about-aws/whats-new/2020/02/aws-shield-advanced-now-supports-health-based-detection/)
## Example Usage ### Create an association between a protected EIP and a Route53 Health Check
```go package main
import (
"fmt" "github.com/pulumi/pulumi-aws/sdk/v5/go/aws" "github.com/pulumi/pulumi-aws/sdk/v5/go/aws/ec2" "github.com/pulumi/pulumi-aws/sdk/v5/go/aws/route53" "github.com/pulumi/pulumi-aws/sdk/v5/go/aws/shield" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
currentRegion, err := aws.GetRegion(ctx, nil, nil)
if err != nil {
return err
}
currentCallerIdentity, err := aws.GetCallerIdentity(ctx, nil, nil)
if err != nil {
return err
}
currentPartition, err := aws.GetPartition(ctx, nil, nil)
if err != nil {
return err
}
exampleEip, err := ec2.NewEip(ctx, "exampleEip", &ec2.EipArgs{
Vpc: pulumi.Bool(true),
Tags: pulumi.StringMap{
"Name": pulumi.String("example"),
},
})
if err != nil {
return err
}
exampleProtection, err := shield.NewProtection(ctx, "exampleProtection", &shield.ProtectionArgs{
ResourceArn: exampleEip.ID().ApplyT(func(id string) (string, error) {
return fmt.Sprintf("arn:%v:ec2:%v:%v:eip-allocation/%v", currentPartition.Partition, currentRegion.Name, currentCallerIdentity.AccountId, id), nil
}).(pulumi.StringOutput),
})
if err != nil {
return err
}
exampleHealthCheck, err := route53.NewHealthCheck(ctx, "exampleHealthCheck", &route53.HealthCheckArgs{
IpAddress: exampleEip.PublicIp,
Port: pulumi.Int(80),
Type: pulumi.String("HTTP"),
ResourcePath: pulumi.String("/ready"),
FailureThreshold: pulumi.Int(3),
RequestInterval: pulumi.Int(30),
Tags: pulumi.StringMap{
"Name": pulumi.String("tf-example-health-check"),
},
})
if err != nil {
return err
}
_, err = shield.NewProtectionHealthCheckAssociation(ctx, "exampleProtectionHealthCheckAssociation", &shield.ProtectionHealthCheckAssociationArgs{
HealthCheckArn: exampleHealthCheck.Arn,
ShieldProtectionId: exampleProtection.ID(),
})
if err != nil {
return err
}
return nil
})
}
```
## Import
Shield protection health check association resources can be imported by specifying the `shield_protection_id` and `health_check_arn` e.g.,
```sh
$ pulumi import aws:shield/protectionHealthCheckAssociation:ProtectionHealthCheckAssociation example ff9592dc-22f3-4e88-afa1-7b29fde9669a+arn:aws:route53:::healthcheck/3742b175-edb9-46bc-9359-f53e3b794b1b
```
func GetProtectionHealthCheckAssociation ¶
func GetProtectionHealthCheckAssociation(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ProtectionHealthCheckAssociationState, opts ...pulumi.ResourceOption) (*ProtectionHealthCheckAssociation, error)
GetProtectionHealthCheckAssociation gets an existing ProtectionHealthCheckAssociation resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
func NewProtectionHealthCheckAssociation ¶
func NewProtectionHealthCheckAssociation(ctx *pulumi.Context, name string, args *ProtectionHealthCheckAssociationArgs, opts ...pulumi.ResourceOption) (*ProtectionHealthCheckAssociation, error)
NewProtectionHealthCheckAssociation registers a new resource with the given unique name, arguments, and options.
func (*ProtectionHealthCheckAssociation) ElementType ¶
func (*ProtectionHealthCheckAssociation) ElementType() reflect.Type
func (*ProtectionHealthCheckAssociation) ToProtectionHealthCheckAssociationOutput ¶
func (i *ProtectionHealthCheckAssociation) ToProtectionHealthCheckAssociationOutput() ProtectionHealthCheckAssociationOutput
func (*ProtectionHealthCheckAssociation) ToProtectionHealthCheckAssociationOutputWithContext ¶
func (i *ProtectionHealthCheckAssociation) ToProtectionHealthCheckAssociationOutputWithContext(ctx context.Context) ProtectionHealthCheckAssociationOutput
type ProtectionHealthCheckAssociationArgs ¶
type ProtectionHealthCheckAssociationArgs struct {
// The ARN (Amazon Resource Name) of the Route53 Health Check resource which will be associated to the protected resource.
HealthCheckArn pulumi.StringInput
// The ID of the protected resource.
ShieldProtectionId pulumi.StringInput
}
The set of arguments for constructing a ProtectionHealthCheckAssociation resource.
func (ProtectionHealthCheckAssociationArgs) ElementType ¶
func (ProtectionHealthCheckAssociationArgs) ElementType() reflect.Type
type ProtectionHealthCheckAssociationArray ¶
type ProtectionHealthCheckAssociationArray []ProtectionHealthCheckAssociationInput
func (ProtectionHealthCheckAssociationArray) ElementType ¶
func (ProtectionHealthCheckAssociationArray) ElementType() reflect.Type
func (ProtectionHealthCheckAssociationArray) ToProtectionHealthCheckAssociationArrayOutput ¶
func (i ProtectionHealthCheckAssociationArray) ToProtectionHealthCheckAssociationArrayOutput() ProtectionHealthCheckAssociationArrayOutput
func (ProtectionHealthCheckAssociationArray) ToProtectionHealthCheckAssociationArrayOutputWithContext ¶
func (i ProtectionHealthCheckAssociationArray) ToProtectionHealthCheckAssociationArrayOutputWithContext(ctx context.Context) ProtectionHealthCheckAssociationArrayOutput
type ProtectionHealthCheckAssociationArrayInput ¶
type ProtectionHealthCheckAssociationArrayInput interface {
pulumi.Input
ToProtectionHealthCheckAssociationArrayOutput() ProtectionHealthCheckAssociationArrayOutput
ToProtectionHealthCheckAssociationArrayOutputWithContext(context.Context) ProtectionHealthCheckAssociationArrayOutput
}
ProtectionHealthCheckAssociationArrayInput is an input type that accepts ProtectionHealthCheckAssociationArray and ProtectionHealthCheckAssociationArrayOutput values. You can construct a concrete instance of `ProtectionHealthCheckAssociationArrayInput` via:
ProtectionHealthCheckAssociationArray{ ProtectionHealthCheckAssociationArgs{...} }
type ProtectionHealthCheckAssociationArrayOutput ¶
type ProtectionHealthCheckAssociationArrayOutput struct{ *pulumi.OutputState }
func (ProtectionHealthCheckAssociationArrayOutput) ElementType ¶
func (ProtectionHealthCheckAssociationArrayOutput) ElementType() reflect.Type
func (ProtectionHealthCheckAssociationArrayOutput) ToProtectionHealthCheckAssociationArrayOutput ¶
func (o ProtectionHealthCheckAssociationArrayOutput) ToProtectionHealthCheckAssociationArrayOutput() ProtectionHealthCheckAssociationArrayOutput
func (ProtectionHealthCheckAssociationArrayOutput) ToProtectionHealthCheckAssociationArrayOutputWithContext ¶
func (o ProtectionHealthCheckAssociationArrayOutput) ToProtectionHealthCheckAssociationArrayOutputWithContext(ctx context.Context) ProtectionHealthCheckAssociationArrayOutput
type ProtectionHealthCheckAssociationInput ¶
type ProtectionHealthCheckAssociationInput interface {
pulumi.Input
ToProtectionHealthCheckAssociationOutput() ProtectionHealthCheckAssociationOutput
ToProtectionHealthCheckAssociationOutputWithContext(ctx context.Context) ProtectionHealthCheckAssociationOutput
}
type ProtectionHealthCheckAssociationMap ¶
type ProtectionHealthCheckAssociationMap map[string]ProtectionHealthCheckAssociationInput
func (ProtectionHealthCheckAssociationMap) ElementType ¶
func (ProtectionHealthCheckAssociationMap) ElementType() reflect.Type
func (ProtectionHealthCheckAssociationMap) ToProtectionHealthCheckAssociationMapOutput ¶
func (i ProtectionHealthCheckAssociationMap) ToProtectionHealthCheckAssociationMapOutput() ProtectionHealthCheckAssociationMapOutput
func (ProtectionHealthCheckAssociationMap) ToProtectionHealthCheckAssociationMapOutputWithContext ¶
func (i ProtectionHealthCheckAssociationMap) ToProtectionHealthCheckAssociationMapOutputWithContext(ctx context.Context) ProtectionHealthCheckAssociationMapOutput
type ProtectionHealthCheckAssociationMapInput ¶
type ProtectionHealthCheckAssociationMapInput interface {
pulumi.Input
ToProtectionHealthCheckAssociationMapOutput() ProtectionHealthCheckAssociationMapOutput
ToProtectionHealthCheckAssociationMapOutputWithContext(context.Context) ProtectionHealthCheckAssociationMapOutput
}
ProtectionHealthCheckAssociationMapInput is an input type that accepts ProtectionHealthCheckAssociationMap and ProtectionHealthCheckAssociationMapOutput values. You can construct a concrete instance of `ProtectionHealthCheckAssociationMapInput` via:
ProtectionHealthCheckAssociationMap{ "key": ProtectionHealthCheckAssociationArgs{...} }
type ProtectionHealthCheckAssociationMapOutput ¶
type ProtectionHealthCheckAssociationMapOutput struct{ *pulumi.OutputState }
func (ProtectionHealthCheckAssociationMapOutput) ElementType ¶
func (ProtectionHealthCheckAssociationMapOutput) ElementType() reflect.Type
func (ProtectionHealthCheckAssociationMapOutput) MapIndex ¶
func (o ProtectionHealthCheckAssociationMapOutput) MapIndex(k pulumi.StringInput) ProtectionHealthCheckAssociationOutput
func (ProtectionHealthCheckAssociationMapOutput) ToProtectionHealthCheckAssociationMapOutput ¶
func (o ProtectionHealthCheckAssociationMapOutput) ToProtectionHealthCheckAssociationMapOutput() ProtectionHealthCheckAssociationMapOutput
func (ProtectionHealthCheckAssociationMapOutput) ToProtectionHealthCheckAssociationMapOutputWithContext ¶
func (o ProtectionHealthCheckAssociationMapOutput) ToProtectionHealthCheckAssociationMapOutputWithContext(ctx context.Context) ProtectionHealthCheckAssociationMapOutput
type ProtectionHealthCheckAssociationOutput ¶
type ProtectionHealthCheckAssociationOutput struct{ *pulumi.OutputState }
func (ProtectionHealthCheckAssociationOutput) ElementType ¶
func (ProtectionHealthCheckAssociationOutput) ElementType() reflect.Type
func (ProtectionHealthCheckAssociationOutput) HealthCheckArn ¶ added in v5.4.0
func (o ProtectionHealthCheckAssociationOutput) HealthCheckArn() pulumi.StringOutput
The ARN (Amazon Resource Name) of the Route53 Health Check resource which will be associated to the protected resource.
func (ProtectionHealthCheckAssociationOutput) ShieldProtectionId ¶ added in v5.4.0
func (o ProtectionHealthCheckAssociationOutput) ShieldProtectionId() pulumi.StringOutput
The ID of the protected resource.
func (ProtectionHealthCheckAssociationOutput) ToProtectionHealthCheckAssociationOutput ¶
func (o ProtectionHealthCheckAssociationOutput) ToProtectionHealthCheckAssociationOutput() ProtectionHealthCheckAssociationOutput
func (ProtectionHealthCheckAssociationOutput) ToProtectionHealthCheckAssociationOutputWithContext ¶
func (o ProtectionHealthCheckAssociationOutput) ToProtectionHealthCheckAssociationOutputWithContext(ctx context.Context) ProtectionHealthCheckAssociationOutput
type ProtectionHealthCheckAssociationState ¶
type ProtectionHealthCheckAssociationState struct {
// The ARN (Amazon Resource Name) of the Route53 Health Check resource which will be associated to the protected resource.
HealthCheckArn pulumi.StringPtrInput
// The ID of the protected resource.
ShieldProtectionId pulumi.StringPtrInput
}
func (ProtectionHealthCheckAssociationState) ElementType ¶
func (ProtectionHealthCheckAssociationState) ElementType() reflect.Type
type ProtectionInput ¶
type ProtectionInput interface {
pulumi.Input
ToProtectionOutput() ProtectionOutput
ToProtectionOutputWithContext(ctx context.Context) ProtectionOutput
}
type ProtectionMap ¶
type ProtectionMap map[string]ProtectionInput
func (ProtectionMap) ElementType ¶
func (ProtectionMap) ElementType() reflect.Type
func (ProtectionMap) ToProtectionMapOutput ¶
func (i ProtectionMap) ToProtectionMapOutput() ProtectionMapOutput
func (ProtectionMap) ToProtectionMapOutputWithContext ¶
func (i ProtectionMap) ToProtectionMapOutputWithContext(ctx context.Context) ProtectionMapOutput
type ProtectionMapInput ¶
type ProtectionMapInput interface {
pulumi.Input
ToProtectionMapOutput() ProtectionMapOutput
ToProtectionMapOutputWithContext(context.Context) ProtectionMapOutput
}
ProtectionMapInput is an input type that accepts ProtectionMap and ProtectionMapOutput values. You can construct a concrete instance of `ProtectionMapInput` via:
ProtectionMap{ "key": ProtectionArgs{...} }
type ProtectionMapOutput ¶
type ProtectionMapOutput struct{ *pulumi.OutputState }
func (ProtectionMapOutput) ElementType ¶
func (ProtectionMapOutput) ElementType() reflect.Type
func (ProtectionMapOutput) MapIndex ¶
func (o ProtectionMapOutput) MapIndex(k pulumi.StringInput) ProtectionOutput
func (ProtectionMapOutput) ToProtectionMapOutput ¶
func (o ProtectionMapOutput) ToProtectionMapOutput() ProtectionMapOutput
func (ProtectionMapOutput) ToProtectionMapOutputWithContext ¶
func (o ProtectionMapOutput) ToProtectionMapOutputWithContext(ctx context.Context) ProtectionMapOutput
type ProtectionOutput ¶
type ProtectionOutput struct{ *pulumi.OutputState }
func (ProtectionOutput) Arn ¶ added in v5.4.0
func (o ProtectionOutput) Arn() pulumi.StringOutput
The ARN of the Protection.
func (ProtectionOutput) ElementType ¶
func (ProtectionOutput) ElementType() reflect.Type
func (ProtectionOutput) Name ¶ added in v5.4.0
func (o ProtectionOutput) Name() pulumi.StringOutput
A friendly name for the Protection you are creating.
func (ProtectionOutput) ResourceArn ¶ added in v5.4.0
func (o ProtectionOutput) ResourceArn() pulumi.StringOutput
The ARN (Amazon Resource Name) of the resource to be protected.
func (ProtectionOutput) Tags ¶ added in v5.4.0
func (o ProtectionOutput) Tags() pulumi.StringMapOutput
Key-value map of resource tags. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
func (ProtectionOutput) TagsAll ¶ added in v5.4.0
func (o ProtectionOutput) TagsAll() pulumi.StringMapOutput
A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
func (ProtectionOutput) ToProtectionOutput ¶
func (o ProtectionOutput) ToProtectionOutput() ProtectionOutput
func (ProtectionOutput) ToProtectionOutputWithContext ¶
func (o ProtectionOutput) ToProtectionOutputWithContext(ctx context.Context) ProtectionOutput
type ProtectionState ¶
type ProtectionState struct {
// The ARN of the Protection.
Arn pulumi.StringPtrInput
// A friendly name for the Protection you are creating.
Name pulumi.StringPtrInput
// The ARN (Amazon Resource Name) of the resource to be protected.
ResourceArn pulumi.StringPtrInput
// Key-value map of resource tags. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Tags pulumi.StringMapInput
// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
TagsAll pulumi.StringMapInput
}
func (ProtectionState) ElementType ¶
func (ProtectionState) ElementType() reflect.Type