Documentation ¶
Index ¶
- type Protection
- func (*Protection) ElementType() reflect.Type
- func (i *Protection) ToProtectionOutput() ProtectionOutput
- func (i *Protection) ToProtectionOutputWithContext(ctx context.Context) ProtectionOutput
- func (i *Protection) ToProtectionPtrOutput() ProtectionPtrOutput
- func (i *Protection) ToProtectionPtrOutputWithContext(ctx context.Context) ProtectionPtrOutput
- 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 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 (ProtectionOutput) ElementType() reflect.Type
- func (o ProtectionOutput) ToProtectionOutput() ProtectionOutput
- func (o ProtectionOutput) ToProtectionOutputWithContext(ctx context.Context) ProtectionOutput
- func (o ProtectionOutput) ToProtectionPtrOutput() ProtectionPtrOutput
- func (o ProtectionOutput) ToProtectionPtrOutputWithContext(ctx context.Context) ProtectionPtrOutput
- type ProtectionPtrInput
- type ProtectionPtrOutput
- 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 // 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"` }
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/v4/go/aws" "github.com/pulumi/pulumi-aws/sdk/v4/go/aws/ec2" "github.com/pulumi/pulumi-aws/sdk/v4/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("%v%v%v%v%v%v", "arn:aws:ec2:", currentRegion.Name, ":", currentCallerIdentity.AccountId, ":eip-allocation/", id), nil }).(pulumi.StringOutput), }) 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
func (*Protection) ToProtectionPtrOutput ¶
func (i *Protection) ToProtectionPtrOutput() ProtectionPtrOutput
func (*Protection) ToProtectionPtrOutputWithContext ¶
func (i *Protection) ToProtectionPtrOutputWithContext(ctx context.Context) ProtectionPtrOutput
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 }
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 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) ElementType ¶
func (ProtectionOutput) ElementType() reflect.Type
func (ProtectionOutput) ToProtectionOutput ¶
func (o ProtectionOutput) ToProtectionOutput() ProtectionOutput
func (ProtectionOutput) ToProtectionOutputWithContext ¶
func (o ProtectionOutput) ToProtectionOutputWithContext(ctx context.Context) ProtectionOutput
func (ProtectionOutput) ToProtectionPtrOutput ¶
func (o ProtectionOutput) ToProtectionPtrOutput() ProtectionPtrOutput
func (ProtectionOutput) ToProtectionPtrOutputWithContext ¶
func (o ProtectionOutput) ToProtectionPtrOutputWithContext(ctx context.Context) ProtectionPtrOutput
type ProtectionPtrInput ¶
type ProtectionPtrInput interface { pulumi.Input ToProtectionPtrOutput() ProtectionPtrOutput ToProtectionPtrOutputWithContext(ctx context.Context) ProtectionPtrOutput }
type ProtectionPtrOutput ¶
type ProtectionPtrOutput struct {
*pulumi.OutputState
}
func (ProtectionPtrOutput) ElementType ¶
func (ProtectionPtrOutput) ElementType() reflect.Type
func (ProtectionPtrOutput) ToProtectionPtrOutput ¶
func (o ProtectionPtrOutput) ToProtectionPtrOutput() ProtectionPtrOutput
func (ProtectionPtrOutput) ToProtectionPtrOutputWithContext ¶
func (o ProtectionPtrOutput) ToProtectionPtrOutputWithContext(ctx context.Context) ProtectionPtrOutput
type ProtectionState ¶
type ProtectionState 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.StringPtrInput }
func (ProtectionState) ElementType ¶
func (ProtectionState) ElementType() reflect.Type