Class Protection
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
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var available = Output.Create(Aws.GetAvailabilityZones.InvokeAsync());
var currentRegion = Output.Create(Aws.GetRegion.InvokeAsync());
var currentCallerIdentity = Output.Create(Aws.GetCallerIdentity.InvokeAsync());
var fooEip = new Aws.Ec2.Eip("fooEip", new Aws.Ec2.EipArgs
{
Vpc = true,
});
var fooProtection = new Aws.Shield.Protection("fooProtection", new Aws.Shield.ProtectionArgs
{
ResourceArn = Output.Tuple(currentRegion, currentCallerIdentity, fooEip.Id).Apply(values =>
{
var currentRegion = values.Item1;
var currentCallerIdentity = values.Item2;
var id = values.Item3;
return $"arn:aws:ec2:{currentRegion.Name}:{currentCallerIdentity.AccountId}:eip-allocation/{id}";
}),
});
}
}
Inherited Members
Namespace: Pulumi.Aws.Shield
Assembly: Pulumi.Aws.dll
Syntax
public class Protection : CustomResource
Constructors
View SourceProtection(String, ProtectionArgs, CustomResourceOptions)
Create a Protection resource with the given unique name, arguments, and options.
Declaration
public Protection(string name, ProtectionArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| ProtectionArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceName
A friendly name for the Protection you are creating.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ResourceArn
The ARN (Amazon Resource Name) of the resource to be protected.
Declaration
public Output<string> ResourceArn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, ProtectionState, CustomResourceOptions)
Get an existing Protection resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Protection Get(string name, Input<string> id, ProtectionState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| ProtectionState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Protection |