Module shield

@pulumi/aws > shield

This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-aws repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-aws repo.

class Protection

extends CustomResource

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

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const fooEip = new aws.ec2.Eip("foo", {
    vpc: true,
});
const available = pulumi.output(aws.getAvailabilityZones({}));
const currentCallerIdentity = pulumi.output(aws.getCallerIdentity({}));
const currentRegion = pulumi.output(aws.getRegion({}));
const fooProtection = new aws.shield.Protection("foo", {
    resourceArn: pulumi.interpolate`arn:aws:ec2:${currentRegion.name}:${currentCallerIdentity.accountId}:eip-allocation/${fooEip.id}`,
});

This content is derived from https://github.com/terraform-providers/terraform-provider-aws/blob/master/website/docs/r/shield_protection.html.markdown.

constructor

new Protection(name: string, args: ProtectionArgs, opts?: pulumi.CustomResourceOptions)

Create a Protection resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ProtectionState, opts?: pulumi.CustomResourceOptions): Protection

Get an existing Protection resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): boolean

Returns true if the given object is an instance of Protection. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

A friendly name for the Protection you are creating.

property resourceArn

public resourceArn: pulumi.Output<string>;

The ARN (Amazon Resource Name) of the resource to be protected.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

interface ProtectionArgs

The set of arguments for constructing a Protection resource.

property name

name?: pulumi.Input<string>;

A friendly name for the Protection you are creating.

property resourceArn

resourceArn: pulumi.Input<string>;

The ARN (Amazon Resource Name) of the resource to be protected.

interface ProtectionState

Input properties used for looking up and filtering Protection resources.

property name

name?: pulumi.Input<string>;

A friendly name for the Protection you are creating.

property resourceArn

resourceArn?: pulumi.Input<string>;

The ARN (Amazon Resource Name) of the resource to be protected.