Module shield
This page documents the language specification for the aws package. If you're looking for help working with the inputs, outputs, or functions of aws resources in a Pulumi program, please see the resource documentation for examples and API reference.
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-awsrepo; however, if that doesn’t turn up anything, please consult the sourceterraform-providers/terraform-provider-awsrepo.
Resources
Others
Resources
Resource Protection
class Protection extends CustomResourceEnables 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 available = pulumi.output(aws.getAvailabilityZones({ async: true }));
const currentRegion = pulumi.output(aws.getRegion({ async: true }));
const currentCallerIdentity = pulumi.output(aws.getCallerIdentity({ async: true }));
const fooEip = new aws.ec2.Eip("foo", {
vpc: true,
});
const fooProtection = new aws.shield.Protection("foo", {
resourceArn: pulumi.interpolate`arn:aws:ec2:${currentRegion.name!}:${currentCallerIdentity.accountId}:eip-allocation/${fooEip.id}`,
});constructor
new Protection(name: string, args: ProtectionArgs, opts?: pulumi.CustomResourceOptions)Create a Protection resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA 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): ProtectionGet 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 | undefinedmethod isInstance
public static isInstance(obj: any): obj is ProtectionReturns 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.
Others
interface ProtectionArgs
interface ProtectionArgsThe 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
interface ProtectionStateInput 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.