Show / Hide Table of Contents

Class Selection

Manages selection conditions for AWS Backup plan resources.

Example Usage

IAM Role

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var exampleRole = new Aws.Iam.Role("exampleRole", new Aws.Iam.RoleArgs
    {
        AssumeRolePolicy = @"{
""Version"": ""2012-10-17"",
""Statement"": [
{
  ""Action"": [""sts:AssumeRole""],
  ""Effect"": ""allow"",
  ""Principal"": {
    ""Service"": [""backup.amazonaws.com""]
  }
}
]
}

",
    });
    var exampleRolePolicyAttachment = new Aws.Iam.RolePolicyAttachment("exampleRolePolicyAttachment", new Aws.Iam.RolePolicyAttachmentArgs
    {
        PolicyArn = "arn:aws:iam::aws:policy/service-role/AWSBackupServiceRolePolicyForBackup",
        Role = exampleRole.Name,
    });
    var exampleSelection = new Aws.Backup.Selection("exampleSelection", new Aws.Backup.SelectionArgs
    {
        IamRoleArn = exampleRole.Arn,
    });
}

}

Selecting Backups By Tag

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var example = new Aws.Backup.Selection("example", new Aws.Backup.SelectionArgs
    {
        IamRoleArn = aws_iam_role.Example.Arn,
        PlanId = aws_backup_plan.Example.Id,
        SelectionTags = 
        {
            new Aws.Backup.Inputs.SelectionSelectionTagArgs
            {
                Key = "foo",
                Type = "STRINGEQUALS",
                Value = "bar",
            },
        },
    });
}

}

Selecting Backups By Resource

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var example = new Aws.Backup.Selection("example", new Aws.Backup.SelectionArgs
    {
        IamRoleArn = aws_iam_role.Example.Arn,
        PlanId = aws_backup_plan.Example.Id,
        Resources = 
        {
            aws_db_instance.Example.Arn,
            aws_ebs_volume.Example.Arn,
            aws_efs_file_system.Example.Arn,
        },
    });
}

}
Inheritance
System.Object
Resource
CustomResource
Selection
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Aws.Backup
Assembly: Pulumi.Aws.dll
Syntax
public class Selection : CustomResource

Constructors

View Source

Selection(String, SelectionArgs, CustomResourceOptions)

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

Declaration
public Selection(string name, SelectionArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

SelectionArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

IamRoleArn

The ARN of the IAM role that AWS Backup uses to authenticate when restoring and backing up the target resource. See the AWS Backup Developer Guide for additional information about using AWS managed policies or creating custom policies attached to the IAM role.

Declaration
public Output<string> IamRoleArn { get; }
Property Value
Type Description
Output<System.String>
View Source

Name

The display name of a resource selection document.

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

PlanId

The backup plan ID to be associated with the selection of resources.

Declaration
public Output<string> PlanId { get; }
Property Value
Type Description
Output<System.String>
View Source

Resources

An array of strings that either contain Amazon Resource Names (ARNs) or match patterns of resources to assign to a backup plan..

Declaration
public Output<ImmutableArray<string>> Resources { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

SelectionTags

Tag-based conditions used to specify a set of resources to assign to a backup plan.

Declaration
public Output<ImmutableArray<SelectionSelectionTag>> SelectionTags { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<SelectionSelectionTag>>

Methods

View Source

Get(String, Input<String>, SelectionState, CustomResourceOptions)

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

Declaration
public static Selection Get(string name, Input<string> id, SelectionState 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.

SelectionState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
Selection
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.