shield

package
v3.34.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 23, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

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/v3/go/aws"
"github.com/pulumi/pulumi-aws/sdk/v3/go/aws/ec2"
"github.com/pulumi/pulumi-aws/sdk/v3/go/aws/shield"
"github.com/pulumi/pulumi/sdk/v2/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 added in v3.13.0

func (*Protection) ElementType() reflect.Type

func (*Protection) ToProtectionOutput added in v3.13.0

func (i *Protection) ToProtectionOutput() ProtectionOutput

func (*Protection) ToProtectionOutputWithContext added in v3.13.0

func (i *Protection) ToProtectionOutputWithContext(ctx context.Context) ProtectionOutput

func (*Protection) ToProtectionPtrOutput added in v3.25.0

func (i *Protection) ToProtectionPtrOutput() ProtectionPtrOutput

func (*Protection) ToProtectionPtrOutputWithContext added in v3.25.0

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 added in v3.25.0

type ProtectionArray []ProtectionInput

func (ProtectionArray) ElementType added in v3.25.0

func (ProtectionArray) ElementType() reflect.Type

func (ProtectionArray) ToProtectionArrayOutput added in v3.25.0

func (i ProtectionArray) ToProtectionArrayOutput() ProtectionArrayOutput

func (ProtectionArray) ToProtectionArrayOutputWithContext added in v3.25.0

func (i ProtectionArray) ToProtectionArrayOutputWithContext(ctx context.Context) ProtectionArrayOutput

type ProtectionArrayInput added in v3.25.0

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 added in v3.25.0

type ProtectionArrayOutput struct{ *pulumi.OutputState }

func (ProtectionArrayOutput) ElementType added in v3.25.0

func (ProtectionArrayOutput) ElementType() reflect.Type

func (ProtectionArrayOutput) Index added in v3.25.0

func (ProtectionArrayOutput) ToProtectionArrayOutput added in v3.25.0

func (o ProtectionArrayOutput) ToProtectionArrayOutput() ProtectionArrayOutput

func (ProtectionArrayOutput) ToProtectionArrayOutputWithContext added in v3.25.0

func (o ProtectionArrayOutput) ToProtectionArrayOutputWithContext(ctx context.Context) ProtectionArrayOutput

type ProtectionInput added in v3.13.0

type ProtectionInput interface {
	pulumi.Input

	ToProtectionOutput() ProtectionOutput
	ToProtectionOutputWithContext(ctx context.Context) ProtectionOutput
}

type ProtectionMap added in v3.25.0

type ProtectionMap map[string]ProtectionInput

func (ProtectionMap) ElementType added in v3.25.0

func (ProtectionMap) ElementType() reflect.Type

func (ProtectionMap) ToProtectionMapOutput added in v3.25.0

func (i ProtectionMap) ToProtectionMapOutput() ProtectionMapOutput

func (ProtectionMap) ToProtectionMapOutputWithContext added in v3.25.0

func (i ProtectionMap) ToProtectionMapOutputWithContext(ctx context.Context) ProtectionMapOutput

type ProtectionMapInput added in v3.25.0

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 added in v3.25.0

type ProtectionMapOutput struct{ *pulumi.OutputState }

func (ProtectionMapOutput) ElementType added in v3.25.0

func (ProtectionMapOutput) ElementType() reflect.Type

func (ProtectionMapOutput) MapIndex added in v3.25.0

func (ProtectionMapOutput) ToProtectionMapOutput added in v3.25.0

func (o ProtectionMapOutput) ToProtectionMapOutput() ProtectionMapOutput

func (ProtectionMapOutput) ToProtectionMapOutputWithContext added in v3.25.0

func (o ProtectionMapOutput) ToProtectionMapOutputWithContext(ctx context.Context) ProtectionMapOutput

type ProtectionOutput added in v3.13.0

type ProtectionOutput struct {
	*pulumi.OutputState
}

func (ProtectionOutput) ElementType added in v3.13.0

func (ProtectionOutput) ElementType() reflect.Type

func (ProtectionOutput) ToProtectionOutput added in v3.13.0

func (o ProtectionOutput) ToProtectionOutput() ProtectionOutput

func (ProtectionOutput) ToProtectionOutputWithContext added in v3.13.0

func (o ProtectionOutput) ToProtectionOutputWithContext(ctx context.Context) ProtectionOutput

func (ProtectionOutput) ToProtectionPtrOutput added in v3.25.0

func (o ProtectionOutput) ToProtectionPtrOutput() ProtectionPtrOutput

func (ProtectionOutput) ToProtectionPtrOutputWithContext added in v3.25.0

func (o ProtectionOutput) ToProtectionPtrOutputWithContext(ctx context.Context) ProtectionPtrOutput

type ProtectionPtrInput added in v3.25.0

type ProtectionPtrInput interface {
	pulumi.Input

	ToProtectionPtrOutput() ProtectionPtrOutput
	ToProtectionPtrOutputWithContext(ctx context.Context) ProtectionPtrOutput
}

type ProtectionPtrOutput added in v3.25.0

type ProtectionPtrOutput struct {
	*pulumi.OutputState
}

func (ProtectionPtrOutput) ElementType added in v3.25.0

func (ProtectionPtrOutput) ElementType() reflect.Type

func (ProtectionPtrOutput) ToProtectionPtrOutput added in v3.25.0

func (o ProtectionPtrOutput) ToProtectionPtrOutput() ProtectionPtrOutput

func (ProtectionPtrOutput) ToProtectionPtrOutputWithContext added in v3.25.0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL