1. Packages
  2. AWS
  3. API Docs
  4. backup
  5. Selection
AWS v6.77.0 published on Wednesday, Apr 9, 2025 by Pulumi

aws.backup.Selection

Explore with Pulumi AI

Manages selection conditions for AWS Backup plan resources.

Example Usage

IAM Role

For more information about creating and managing IAM Roles for backups and restores, see the AWS Backup Developer Guide.

The below example creates an IAM role with the default managed IAM Policy for allowing AWS Backup to create backups.

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

const assumeRole = aws.iam.getPolicyDocument({
    statements: [{
        effect: "Allow",
        principals: [{
            type: "Service",
            identifiers: ["backup.amazonaws.com"],
        }],
        actions: ["sts:AssumeRole"],
    }],
});
const example = new aws.iam.Role("example", {
    name: "example",
    assumeRolePolicy: assumeRole.then(assumeRole => assumeRole.json),
});
const exampleRolePolicyAttachment = new aws.iam.RolePolicyAttachment("example", {
    policyArn: "arn:aws:iam::aws:policy/service-role/AWSBackupServiceRolePolicyForBackup",
    role: example.name,
});
const exampleSelection = new aws.backup.Selection("example", {iamRoleArn: example.arn});
Copy
import pulumi
import pulumi_aws as aws

assume_role = aws.iam.get_policy_document(statements=[{
    "effect": "Allow",
    "principals": [{
        "type": "Service",
        "identifiers": ["backup.amazonaws.com"],
    }],
    "actions": ["sts:AssumeRole"],
}])
example = aws.iam.Role("example",
    name="example",
    assume_role_policy=assume_role.json)
example_role_policy_attachment = aws.iam.RolePolicyAttachment("example",
    policy_arn="arn:aws:iam::aws:policy/service-role/AWSBackupServiceRolePolicyForBackup",
    role=example.name)
example_selection = aws.backup.Selection("example", iam_role_arn=example.arn)
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/backup"
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		assumeRole, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{
			Statements: []iam.GetPolicyDocumentStatement{
				{
					Effect: pulumi.StringRef("Allow"),
					Principals: []iam.GetPolicyDocumentStatementPrincipal{
						{
							Type: "Service",
							Identifiers: []string{
								"backup.amazonaws.com",
							},
						},
					},
					Actions: []string{
						"sts:AssumeRole",
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		example, err := iam.NewRole(ctx, "example", &iam.RoleArgs{
			Name:             pulumi.String("example"),
			AssumeRolePolicy: pulumi.String(assumeRole.Json),
		})
		if err != nil {
			return err
		}
		_, err = iam.NewRolePolicyAttachment(ctx, "example", &iam.RolePolicyAttachmentArgs{
			PolicyArn: pulumi.String("arn:aws:iam::aws:policy/service-role/AWSBackupServiceRolePolicyForBackup"),
			Role:      example.Name,
		})
		if err != nil {
			return err
		}
		_, err = backup.NewSelection(ctx, "example", &backup.SelectionArgs{
			IamRoleArn: example.Arn,
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var assumeRole = Aws.Iam.GetPolicyDocument.Invoke(new()
    {
        Statements = new[]
        {
            new Aws.Iam.Inputs.GetPolicyDocumentStatementInputArgs
            {
                Effect = "Allow",
                Principals = new[]
                {
                    new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalInputArgs
                    {
                        Type = "Service",
                        Identifiers = new[]
                        {
                            "backup.amazonaws.com",
                        },
                    },
                },
                Actions = new[]
                {
                    "sts:AssumeRole",
                },
            },
        },
    });

    var example = new Aws.Iam.Role("example", new()
    {
        Name = "example",
        AssumeRolePolicy = assumeRole.Apply(getPolicyDocumentResult => getPolicyDocumentResult.Json),
    });

    var exampleRolePolicyAttachment = new Aws.Iam.RolePolicyAttachment("example", new()
    {
        PolicyArn = "arn:aws:iam::aws:policy/service-role/AWSBackupServiceRolePolicyForBackup",
        Role = example.Name,
    });

    var exampleSelection = new Aws.Backup.Selection("example", new()
    {
        IamRoleArn = example.Arn,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.iam.IamFunctions;
import com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;
import com.pulumi.aws.iam.Role;
import com.pulumi.aws.iam.RoleArgs;
import com.pulumi.aws.iam.RolePolicyAttachment;
import com.pulumi.aws.iam.RolePolicyAttachmentArgs;
import com.pulumi.aws.backup.Selection;
import com.pulumi.aws.backup.SelectionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var assumeRole = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
            .statements(GetPolicyDocumentStatementArgs.builder()
                .effect("Allow")
                .principals(GetPolicyDocumentStatementPrincipalArgs.builder()
                    .type("Service")
                    .identifiers("backup.amazonaws.com")
                    .build())
                .actions("sts:AssumeRole")
                .build())
            .build());

        var example = new Role("example", RoleArgs.builder()
            .name("example")
            .assumeRolePolicy(assumeRole.json())
            .build());

        var exampleRolePolicyAttachment = new RolePolicyAttachment("exampleRolePolicyAttachment", RolePolicyAttachmentArgs.builder()
            .policyArn("arn:aws:iam::aws:policy/service-role/AWSBackupServiceRolePolicyForBackup")
            .role(example.name())
            .build());

        var exampleSelection = new Selection("exampleSelection", SelectionArgs.builder()
            .iamRoleArn(example.arn())
            .build());

    }
}
Copy
resources:
  example:
    type: aws:iam:Role
    properties:
      name: example
      assumeRolePolicy: ${assumeRole.json}
  exampleRolePolicyAttachment:
    type: aws:iam:RolePolicyAttachment
    name: example
    properties:
      policyArn: arn:aws:iam::aws:policy/service-role/AWSBackupServiceRolePolicyForBackup
      role: ${example.name}
  exampleSelection:
    type: aws:backup:Selection
    name: example
    properties:
      iamRoleArn: ${example.arn}
variables:
  assumeRole:
    fn::invoke:
      function: aws:iam:getPolicyDocument
      arguments:
        statements:
          - effect: Allow
            principals:
              - type: Service
                identifiers:
                  - backup.amazonaws.com
            actions:
              - sts:AssumeRole
Copy

Selecting Backups By Tag

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

const example = new aws.backup.Selection("example", {
    iamRoleArn: exampleAwsIamRole.arn,
    name: "my_example_backup_selection",
    planId: exampleAwsBackupPlan.id,
    selectionTags: [{
        type: "STRINGEQUALS",
        key: "foo",
        value: "bar",
    }],
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.backup.Selection("example",
    iam_role_arn=example_aws_iam_role["arn"],
    name="my_example_backup_selection",
    plan_id=example_aws_backup_plan["id"],
    selection_tags=[{
        "type": "STRINGEQUALS",
        "key": "foo",
        "value": "bar",
    }])
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/backup"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := backup.NewSelection(ctx, "example", &backup.SelectionArgs{
			IamRoleArn: pulumi.Any(exampleAwsIamRole.Arn),
			Name:       pulumi.String("my_example_backup_selection"),
			PlanId:     pulumi.Any(exampleAwsBackupPlan.Id),
			SelectionTags: backup.SelectionSelectionTagArray{
				&backup.SelectionSelectionTagArgs{
					Type:  pulumi.String("STRINGEQUALS"),
					Key:   pulumi.String("foo"),
					Value: pulumi.String("bar"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = new Aws.Backup.Selection("example", new()
    {
        IamRoleArn = exampleAwsIamRole.Arn,
        Name = "my_example_backup_selection",
        PlanId = exampleAwsBackupPlan.Id,
        SelectionTags = new[]
        {
            new Aws.Backup.Inputs.SelectionSelectionTagArgs
            {
                Type = "STRINGEQUALS",
                Key = "foo",
                Value = "bar",
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.backup.Selection;
import com.pulumi.aws.backup.SelectionArgs;
import com.pulumi.aws.backup.inputs.SelectionSelectionTagArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new Selection("example", SelectionArgs.builder()
            .iamRoleArn(exampleAwsIamRole.arn())
            .name("my_example_backup_selection")
            .planId(exampleAwsBackupPlan.id())
            .selectionTags(SelectionSelectionTagArgs.builder()
                .type("STRINGEQUALS")
                .key("foo")
                .value("bar")
                .build())
            .build());

    }
}
Copy
resources:
  example:
    type: aws:backup:Selection
    properties:
      iamRoleArn: ${exampleAwsIamRole.arn}
      name: my_example_backup_selection
      planId: ${exampleAwsBackupPlan.id}
      selectionTags:
        - type: STRINGEQUALS
          key: foo
          value: bar
Copy

Selecting Backups By Conditions

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

const example = new aws.backup.Selection("example", {
    iamRoleArn: exampleAwsIamRole.arn,
    name: "my_example_backup_selection",
    planId: exampleAwsBackupPlan.id,
    resources: ["*"],
    conditions: [{
        stringEquals: [{
            key: "aws:ResourceTag/Component",
            value: "rds",
        }],
        stringLikes: [{
            key: "aws:ResourceTag/Application",
            value: "app*",
        }],
        stringNotEquals: [{
            key: "aws:ResourceTag/Backup",
            value: "false",
        }],
        stringNotLikes: [{
            key: "aws:ResourceTag/Environment",
            value: "test*",
        }],
    }],
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.backup.Selection("example",
    iam_role_arn=example_aws_iam_role["arn"],
    name="my_example_backup_selection",
    plan_id=example_aws_backup_plan["id"],
    resources=["*"],
    conditions=[{
        "string_equals": [{
            "key": "aws:ResourceTag/Component",
            "value": "rds",
        }],
        "string_likes": [{
            "key": "aws:ResourceTag/Application",
            "value": "app*",
        }],
        "string_not_equals": [{
            "key": "aws:ResourceTag/Backup",
            "value": "false",
        }],
        "string_not_likes": [{
            "key": "aws:ResourceTag/Environment",
            "value": "test*",
        }],
    }])
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/backup"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := backup.NewSelection(ctx, "example", &backup.SelectionArgs{
			IamRoleArn: pulumi.Any(exampleAwsIamRole.Arn),
			Name:       pulumi.String("my_example_backup_selection"),
			PlanId:     pulumi.Any(exampleAwsBackupPlan.Id),
			Resources: pulumi.StringArray{
				pulumi.String("*"),
			},
			Conditions: backup.SelectionConditionArray{
				&backup.SelectionConditionArgs{
					StringEquals: backup.SelectionConditionStringEqualArray{
						&backup.SelectionConditionStringEqualArgs{
							Key:   pulumi.String("aws:ResourceTag/Component"),
							Value: pulumi.String("rds"),
						},
					},
					StringLikes: backup.SelectionConditionStringLikeArray{
						&backup.SelectionConditionStringLikeArgs{
							Key:   pulumi.String("aws:ResourceTag/Application"),
							Value: pulumi.String("app*"),
						},
					},
					StringNotEquals: backup.SelectionConditionStringNotEqualArray{
						&backup.SelectionConditionStringNotEqualArgs{
							Key:   pulumi.String("aws:ResourceTag/Backup"),
							Value: pulumi.String("false"),
						},
					},
					StringNotLikes: backup.SelectionConditionStringNotLikeArray{
						&backup.SelectionConditionStringNotLikeArgs{
							Key:   pulumi.String("aws:ResourceTag/Environment"),
							Value: pulumi.String("test*"),
						},
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = new Aws.Backup.Selection("example", new()
    {
        IamRoleArn = exampleAwsIamRole.Arn,
        Name = "my_example_backup_selection",
        PlanId = exampleAwsBackupPlan.Id,
        Resources = new[]
        {
            "*",
        },
        Conditions = new[]
        {
            new Aws.Backup.Inputs.SelectionConditionArgs
            {
                StringEquals = new[]
                {
                    new Aws.Backup.Inputs.SelectionConditionStringEqualArgs
                    {
                        Key = "aws:ResourceTag/Component",
                        Value = "rds",
                    },
                },
                StringLikes = new[]
                {
                    new Aws.Backup.Inputs.SelectionConditionStringLikeArgs
                    {
                        Key = "aws:ResourceTag/Application",
                        Value = "app*",
                    },
                },
                StringNotEquals = new[]
                {
                    new Aws.Backup.Inputs.SelectionConditionStringNotEqualArgs
                    {
                        Key = "aws:ResourceTag/Backup",
                        Value = "false",
                    },
                },
                StringNotLikes = new[]
                {
                    new Aws.Backup.Inputs.SelectionConditionStringNotLikeArgs
                    {
                        Key = "aws:ResourceTag/Environment",
                        Value = "test*",
                    },
                },
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.backup.Selection;
import com.pulumi.aws.backup.SelectionArgs;
import com.pulumi.aws.backup.inputs.SelectionConditionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new Selection("example", SelectionArgs.builder()
            .iamRoleArn(exampleAwsIamRole.arn())
            .name("my_example_backup_selection")
            .planId(exampleAwsBackupPlan.id())
            .resources("*")
            .conditions(SelectionConditionArgs.builder()
                .stringEquals(SelectionConditionStringEqualArgs.builder()
                    .key("aws:ResourceTag/Component")
                    .value("rds")
                    .build())
                .stringLikes(SelectionConditionStringLikeArgs.builder()
                    .key("aws:ResourceTag/Application")
                    .value("app*")
                    .build())
                .stringNotEquals(SelectionConditionStringNotEqualArgs.builder()
                    .key("aws:ResourceTag/Backup")
                    .value("false")
                    .build())
                .stringNotLikes(SelectionConditionStringNotLikeArgs.builder()
                    .key("aws:ResourceTag/Environment")
                    .value("test*")
                    .build())
                .build())
            .build());

    }
}
Copy
resources:
  example:
    type: aws:backup:Selection
    properties:
      iamRoleArn: ${exampleAwsIamRole.arn}
      name: my_example_backup_selection
      planId: ${exampleAwsBackupPlan.id}
      resources:
        - '*'
      conditions:
        - stringEquals:
            - key: aws:ResourceTag/Component
              value: rds
          stringLikes:
            - key: aws:ResourceTag/Application
              value: app*
          stringNotEquals:
            - key: aws:ResourceTag/Backup
              value: 'false'
          stringNotLikes:
            - key: aws:ResourceTag/Environment
              value: test*
Copy

Selecting Backups By Resource

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

const example = new aws.backup.Selection("example", {
    iamRoleArn: exampleAwsIamRole.arn,
    name: "my_example_backup_selection",
    planId: exampleAwsBackupPlan.id,
    resources: [
        exampleAwsDbInstance.arn,
        exampleAwsEbsVolume.arn,
        exampleAwsEfsFileSystem.arn,
    ],
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.backup.Selection("example",
    iam_role_arn=example_aws_iam_role["arn"],
    name="my_example_backup_selection",
    plan_id=example_aws_backup_plan["id"],
    resources=[
        example_aws_db_instance["arn"],
        example_aws_ebs_volume["arn"],
        example_aws_efs_file_system["arn"],
    ])
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/backup"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := backup.NewSelection(ctx, "example", &backup.SelectionArgs{
			IamRoleArn: pulumi.Any(exampleAwsIamRole.Arn),
			Name:       pulumi.String("my_example_backup_selection"),
			PlanId:     pulumi.Any(exampleAwsBackupPlan.Id),
			Resources: pulumi.StringArray{
				exampleAwsDbInstance.Arn,
				exampleAwsEbsVolume.Arn,
				exampleAwsEfsFileSystem.Arn,
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = new Aws.Backup.Selection("example", new()
    {
        IamRoleArn = exampleAwsIamRole.Arn,
        Name = "my_example_backup_selection",
        PlanId = exampleAwsBackupPlan.Id,
        Resources = new[]
        {
            exampleAwsDbInstance.Arn,
            exampleAwsEbsVolume.Arn,
            exampleAwsEfsFileSystem.Arn,
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.backup.Selection;
import com.pulumi.aws.backup.SelectionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new Selection("example", SelectionArgs.builder()
            .iamRoleArn(exampleAwsIamRole.arn())
            .name("my_example_backup_selection")
            .planId(exampleAwsBackupPlan.id())
            .resources(            
                exampleAwsDbInstance.arn(),
                exampleAwsEbsVolume.arn(),
                exampleAwsEfsFileSystem.arn())
            .build());

    }
}
Copy
resources:
  example:
    type: aws:backup:Selection
    properties:
      iamRoleArn: ${exampleAwsIamRole.arn}
      name: my_example_backup_selection
      planId: ${exampleAwsBackupPlan.id}
      resources:
        - ${exampleAwsDbInstance.arn}
        - ${exampleAwsEbsVolume.arn}
        - ${exampleAwsEfsFileSystem.arn}
Copy

Selecting Backups By Not Resource

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

const example = new aws.backup.Selection("example", {
    iamRoleArn: exampleAwsIamRole.arn,
    name: "my_example_backup_selection",
    planId: exampleAwsBackupPlan.id,
    notResources: [
        exampleAwsDbInstance.arn,
        exampleAwsEbsVolume.arn,
        exampleAwsEfsFileSystem.arn,
    ],
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.backup.Selection("example",
    iam_role_arn=example_aws_iam_role["arn"],
    name="my_example_backup_selection",
    plan_id=example_aws_backup_plan["id"],
    not_resources=[
        example_aws_db_instance["arn"],
        example_aws_ebs_volume["arn"],
        example_aws_efs_file_system["arn"],
    ])
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/backup"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := backup.NewSelection(ctx, "example", &backup.SelectionArgs{
			IamRoleArn: pulumi.Any(exampleAwsIamRole.Arn),
			Name:       pulumi.String("my_example_backup_selection"),
			PlanId:     pulumi.Any(exampleAwsBackupPlan.Id),
			NotResources: pulumi.StringArray{
				exampleAwsDbInstance.Arn,
				exampleAwsEbsVolume.Arn,
				exampleAwsEfsFileSystem.Arn,
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = new Aws.Backup.Selection("example", new()
    {
        IamRoleArn = exampleAwsIamRole.Arn,
        Name = "my_example_backup_selection",
        PlanId = exampleAwsBackupPlan.Id,
        NotResources = new[]
        {
            exampleAwsDbInstance.Arn,
            exampleAwsEbsVolume.Arn,
            exampleAwsEfsFileSystem.Arn,
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.backup.Selection;
import com.pulumi.aws.backup.SelectionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new Selection("example", SelectionArgs.builder()
            .iamRoleArn(exampleAwsIamRole.arn())
            .name("my_example_backup_selection")
            .planId(exampleAwsBackupPlan.id())
            .notResources(            
                exampleAwsDbInstance.arn(),
                exampleAwsEbsVolume.arn(),
                exampleAwsEfsFileSystem.arn())
            .build());

    }
}
Copy
resources:
  example:
    type: aws:backup:Selection
    properties:
      iamRoleArn: ${exampleAwsIamRole.arn}
      name: my_example_backup_selection
      planId: ${exampleAwsBackupPlan.id}
      notResources:
        - ${exampleAwsDbInstance.arn}
        - ${exampleAwsEbsVolume.arn}
        - ${exampleAwsEfsFileSystem.arn}
Copy

Create Selection Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Selection(name: string, args: SelectionArgs, opts?: CustomResourceOptions);
@overload
def Selection(resource_name: str,
              args: SelectionArgs,
              opts: Optional[ResourceOptions] = None)

@overload
def Selection(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              iam_role_arn: Optional[str] = None,
              plan_id: Optional[str] = None,
              conditions: Optional[Sequence[SelectionConditionArgs]] = None,
              name: Optional[str] = None,
              not_resources: Optional[Sequence[str]] = None,
              resources: Optional[Sequence[str]] = None,
              selection_tags: Optional[Sequence[SelectionSelectionTagArgs]] = None)
func NewSelection(ctx *Context, name string, args SelectionArgs, opts ...ResourceOption) (*Selection, error)
public Selection(string name, SelectionArgs args, CustomResourceOptions? opts = null)
public Selection(String name, SelectionArgs args)
public Selection(String name, SelectionArgs args, CustomResourceOptions options)
type: aws:backup:Selection
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. SelectionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. SelectionArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. SelectionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. SelectionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. SelectionArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var selectionResource = new Aws.Backup.Selection("selectionResource", new()
{
    IamRoleArn = "string",
    PlanId = "string",
    Conditions = new[]
    {
        new Aws.Backup.Inputs.SelectionConditionArgs
        {
            StringEquals = new[]
            {
                new Aws.Backup.Inputs.SelectionConditionStringEqualArgs
                {
                    Key = "string",
                    Value = "string",
                },
            },
            StringLikes = new[]
            {
                new Aws.Backup.Inputs.SelectionConditionStringLikeArgs
                {
                    Key = "string",
                    Value = "string",
                },
            },
            StringNotEquals = new[]
            {
                new Aws.Backup.Inputs.SelectionConditionStringNotEqualArgs
                {
                    Key = "string",
                    Value = "string",
                },
            },
            StringNotLikes = new[]
            {
                new Aws.Backup.Inputs.SelectionConditionStringNotLikeArgs
                {
                    Key = "string",
                    Value = "string",
                },
            },
        },
    },
    Name = "string",
    NotResources = new[]
    {
        "string",
    },
    Resources = new[]
    {
        "string",
    },
    SelectionTags = new[]
    {
        new Aws.Backup.Inputs.SelectionSelectionTagArgs
        {
            Key = "string",
            Type = "string",
            Value = "string",
        },
    },
});
Copy
example, err := backup.NewSelection(ctx, "selectionResource", &backup.SelectionArgs{
	IamRoleArn: pulumi.String("string"),
	PlanId:     pulumi.String("string"),
	Conditions: backup.SelectionConditionArray{
		&backup.SelectionConditionArgs{
			StringEquals: backup.SelectionConditionStringEqualArray{
				&backup.SelectionConditionStringEqualArgs{
					Key:   pulumi.String("string"),
					Value: pulumi.String("string"),
				},
			},
			StringLikes: backup.SelectionConditionStringLikeArray{
				&backup.SelectionConditionStringLikeArgs{
					Key:   pulumi.String("string"),
					Value: pulumi.String("string"),
				},
			},
			StringNotEquals: backup.SelectionConditionStringNotEqualArray{
				&backup.SelectionConditionStringNotEqualArgs{
					Key:   pulumi.String("string"),
					Value: pulumi.String("string"),
				},
			},
			StringNotLikes: backup.SelectionConditionStringNotLikeArray{
				&backup.SelectionConditionStringNotLikeArgs{
					Key:   pulumi.String("string"),
					Value: pulumi.String("string"),
				},
			},
		},
	},
	Name: pulumi.String("string"),
	NotResources: pulumi.StringArray{
		pulumi.String("string"),
	},
	Resources: pulumi.StringArray{
		pulumi.String("string"),
	},
	SelectionTags: backup.SelectionSelectionTagArray{
		&backup.SelectionSelectionTagArgs{
			Key:   pulumi.String("string"),
			Type:  pulumi.String("string"),
			Value: pulumi.String("string"),
		},
	},
})
Copy
var selectionResource = new Selection("selectionResource", SelectionArgs.builder()
    .iamRoleArn("string")
    .planId("string")
    .conditions(SelectionConditionArgs.builder()
        .stringEquals(SelectionConditionStringEqualArgs.builder()
            .key("string")
            .value("string")
            .build())
        .stringLikes(SelectionConditionStringLikeArgs.builder()
            .key("string")
            .value("string")
            .build())
        .stringNotEquals(SelectionConditionStringNotEqualArgs.builder()
            .key("string")
            .value("string")
            .build())
        .stringNotLikes(SelectionConditionStringNotLikeArgs.builder()
            .key("string")
            .value("string")
            .build())
        .build())
    .name("string")
    .notResources("string")
    .resources("string")
    .selectionTags(SelectionSelectionTagArgs.builder()
        .key("string")
        .type("string")
        .value("string")
        .build())
    .build());
Copy
selection_resource = aws.backup.Selection("selectionResource",
    iam_role_arn="string",
    plan_id="string",
    conditions=[{
        "string_equals": [{
            "key": "string",
            "value": "string",
        }],
        "string_likes": [{
            "key": "string",
            "value": "string",
        }],
        "string_not_equals": [{
            "key": "string",
            "value": "string",
        }],
        "string_not_likes": [{
            "key": "string",
            "value": "string",
        }],
    }],
    name="string",
    not_resources=["string"],
    resources=["string"],
    selection_tags=[{
        "key": "string",
        "type": "string",
        "value": "string",
    }])
Copy
const selectionResource = new aws.backup.Selection("selectionResource", {
    iamRoleArn: "string",
    planId: "string",
    conditions: [{
        stringEquals: [{
            key: "string",
            value: "string",
        }],
        stringLikes: [{
            key: "string",
            value: "string",
        }],
        stringNotEquals: [{
            key: "string",
            value: "string",
        }],
        stringNotLikes: [{
            key: "string",
            value: "string",
        }],
    }],
    name: "string",
    notResources: ["string"],
    resources: ["string"],
    selectionTags: [{
        key: "string",
        type: "string",
        value: "string",
    }],
});
Copy
type: aws:backup:Selection
properties:
    conditions:
        - stringEquals:
            - key: string
              value: string
          stringLikes:
            - key: string
              value: string
          stringNotEquals:
            - key: string
              value: string
          stringNotLikes:
            - key: string
              value: string
    iamRoleArn: string
    name: string
    notResources:
        - string
    planId: string
    resources:
        - string
    selectionTags:
        - key: string
          type: string
          value: string
Copy

Selection Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Selection resource accepts the following input properties:

IamRoleArn
This property is required.
Changes to this property will trigger replacement.
string
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.
PlanId
This property is required.
Changes to this property will trigger replacement.
string
The backup plan ID to be associated with the selection of resources.
Conditions Changes to this property will trigger replacement. List<SelectionCondition>
Condition-based filters used to specify sets of resources for a backup plan. See below for details.
Name Changes to this property will trigger replacement. string
The display name of a resource selection document.
NotResources Changes to this property will trigger replacement. List<string>
An array of strings that either contain Amazon Resource Names (ARNs) or match patterns of resources to exclude from a backup plan.
Resources Changes to this property will trigger replacement. List<string>
An array of strings that either contain Amazon Resource Names (ARNs) or match patterns of resources to assign to a backup plan.
SelectionTags Changes to this property will trigger replacement. List<SelectionSelectionTag>
Tag-based conditions used to specify a set of resources to assign to a backup plan. See below for details.
IamRoleArn
This property is required.
Changes to this property will trigger replacement.
string
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.
PlanId
This property is required.
Changes to this property will trigger replacement.
string
The backup plan ID to be associated with the selection of resources.
Conditions Changes to this property will trigger replacement. []SelectionConditionArgs
Condition-based filters used to specify sets of resources for a backup plan. See below for details.
Name Changes to this property will trigger replacement. string
The display name of a resource selection document.
NotResources Changes to this property will trigger replacement. []string
An array of strings that either contain Amazon Resource Names (ARNs) or match patterns of resources to exclude from a backup plan.
Resources Changes to this property will trigger replacement. []string
An array of strings that either contain Amazon Resource Names (ARNs) or match patterns of resources to assign to a backup plan.
SelectionTags Changes to this property will trigger replacement. []SelectionSelectionTagArgs
Tag-based conditions used to specify a set of resources to assign to a backup plan. See below for details.
iamRoleArn
This property is required.
Changes to this property will trigger replacement.
String
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.
planId
This property is required.
Changes to this property will trigger replacement.
String
The backup plan ID to be associated with the selection of resources.
conditions Changes to this property will trigger replacement. List<SelectionCondition>
Condition-based filters used to specify sets of resources for a backup plan. See below for details.
name Changes to this property will trigger replacement. String
The display name of a resource selection document.
notResources Changes to this property will trigger replacement. List<String>
An array of strings that either contain Amazon Resource Names (ARNs) or match patterns of resources to exclude from a backup plan.
resources Changes to this property will trigger replacement. List<String>
An array of strings that either contain Amazon Resource Names (ARNs) or match patterns of resources to assign to a backup plan.
selectionTags Changes to this property will trigger replacement. List<SelectionSelectionTag>
Tag-based conditions used to specify a set of resources to assign to a backup plan. See below for details.
iamRoleArn
This property is required.
Changes to this property will trigger replacement.
string
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.
planId
This property is required.
Changes to this property will trigger replacement.
string
The backup plan ID to be associated with the selection of resources.
conditions Changes to this property will trigger replacement. SelectionCondition[]
Condition-based filters used to specify sets of resources for a backup plan. See below for details.
name Changes to this property will trigger replacement. string
The display name of a resource selection document.
notResources Changes to this property will trigger replacement. string[]
An array of strings that either contain Amazon Resource Names (ARNs) or match patterns of resources to exclude from a backup plan.
resources Changes to this property will trigger replacement. string[]
An array of strings that either contain Amazon Resource Names (ARNs) or match patterns of resources to assign to a backup plan.
selectionTags Changes to this property will trigger replacement. SelectionSelectionTag[]
Tag-based conditions used to specify a set of resources to assign to a backup plan. See below for details.
iam_role_arn
This property is required.
Changes to this property will trigger replacement.
str
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.
plan_id
This property is required.
Changes to this property will trigger replacement.
str
The backup plan ID to be associated with the selection of resources.
conditions Changes to this property will trigger replacement. Sequence[SelectionConditionArgs]
Condition-based filters used to specify sets of resources for a backup plan. See below for details.
name Changes to this property will trigger replacement. str
The display name of a resource selection document.
not_resources Changes to this property will trigger replacement. Sequence[str]
An array of strings that either contain Amazon Resource Names (ARNs) or match patterns of resources to exclude from a backup plan.
resources Changes to this property will trigger replacement. Sequence[str]
An array of strings that either contain Amazon Resource Names (ARNs) or match patterns of resources to assign to a backup plan.
selection_tags Changes to this property will trigger replacement. Sequence[SelectionSelectionTagArgs]
Tag-based conditions used to specify a set of resources to assign to a backup plan. See below for details.
iamRoleArn
This property is required.
Changes to this property will trigger replacement.
String
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.
planId
This property is required.
Changes to this property will trigger replacement.
String
The backup plan ID to be associated with the selection of resources.
conditions Changes to this property will trigger replacement. List<Property Map>
Condition-based filters used to specify sets of resources for a backup plan. See below for details.
name Changes to this property will trigger replacement. String
The display name of a resource selection document.
notResources Changes to this property will trigger replacement. List<String>
An array of strings that either contain Amazon Resource Names (ARNs) or match patterns of resources to exclude from a backup plan.
resources Changes to this property will trigger replacement. List<String>
An array of strings that either contain Amazon Resource Names (ARNs) or match patterns of resources to assign to a backup plan.
selectionTags Changes to this property will trigger replacement. List<Property Map>
Tag-based conditions used to specify a set of resources to assign to a backup plan. See below for details.

Outputs

All input properties are implicitly available as output properties. Additionally, the Selection resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing Selection Resource

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

public static get(name: string, id: Input<ID>, state?: SelectionState, opts?: CustomResourceOptions): Selection
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        conditions: Optional[Sequence[SelectionConditionArgs]] = None,
        iam_role_arn: Optional[str] = None,
        name: Optional[str] = None,
        not_resources: Optional[Sequence[str]] = None,
        plan_id: Optional[str] = None,
        resources: Optional[Sequence[str]] = None,
        selection_tags: Optional[Sequence[SelectionSelectionTagArgs]] = None) -> Selection
func GetSelection(ctx *Context, name string, id IDInput, state *SelectionState, opts ...ResourceOption) (*Selection, error)
public static Selection Get(string name, Input<string> id, SelectionState? state, CustomResourceOptions? opts = null)
public static Selection get(String name, Output<String> id, SelectionState state, CustomResourceOptions options)
resources:  _:    type: aws:backup:Selection    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Conditions Changes to this property will trigger replacement. List<SelectionCondition>
Condition-based filters used to specify sets of resources for a backup plan. See below for details.
IamRoleArn Changes to this property will trigger replacement. string
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.
Name Changes to this property will trigger replacement. string
The display name of a resource selection document.
NotResources Changes to this property will trigger replacement. List<string>
An array of strings that either contain Amazon Resource Names (ARNs) or match patterns of resources to exclude from a backup plan.
PlanId Changes to this property will trigger replacement. string
The backup plan ID to be associated with the selection of resources.
Resources Changes to this property will trigger replacement. List<string>
An array of strings that either contain Amazon Resource Names (ARNs) or match patterns of resources to assign to a backup plan.
SelectionTags Changes to this property will trigger replacement. List<SelectionSelectionTag>
Tag-based conditions used to specify a set of resources to assign to a backup plan. See below for details.
Conditions Changes to this property will trigger replacement. []SelectionConditionArgs
Condition-based filters used to specify sets of resources for a backup plan. See below for details.
IamRoleArn Changes to this property will trigger replacement. string
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.
Name Changes to this property will trigger replacement. string
The display name of a resource selection document.
NotResources Changes to this property will trigger replacement. []string
An array of strings that either contain Amazon Resource Names (ARNs) or match patterns of resources to exclude from a backup plan.
PlanId Changes to this property will trigger replacement. string
The backup plan ID to be associated with the selection of resources.
Resources Changes to this property will trigger replacement. []string
An array of strings that either contain Amazon Resource Names (ARNs) or match patterns of resources to assign to a backup plan.
SelectionTags Changes to this property will trigger replacement. []SelectionSelectionTagArgs
Tag-based conditions used to specify a set of resources to assign to a backup plan. See below for details.
conditions Changes to this property will trigger replacement. List<SelectionCondition>
Condition-based filters used to specify sets of resources for a backup plan. See below for details.
iamRoleArn Changes to this property will trigger replacement. String
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.
name Changes to this property will trigger replacement. String
The display name of a resource selection document.
notResources Changes to this property will trigger replacement. List<String>
An array of strings that either contain Amazon Resource Names (ARNs) or match patterns of resources to exclude from a backup plan.
planId Changes to this property will trigger replacement. String
The backup plan ID to be associated with the selection of resources.
resources Changes to this property will trigger replacement. List<String>
An array of strings that either contain Amazon Resource Names (ARNs) or match patterns of resources to assign to a backup plan.
selectionTags Changes to this property will trigger replacement. List<SelectionSelectionTag>
Tag-based conditions used to specify a set of resources to assign to a backup plan. See below for details.
conditions Changes to this property will trigger replacement. SelectionCondition[]
Condition-based filters used to specify sets of resources for a backup plan. See below for details.
iamRoleArn Changes to this property will trigger replacement. string
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.
name Changes to this property will trigger replacement. string
The display name of a resource selection document.
notResources Changes to this property will trigger replacement. string[]
An array of strings that either contain Amazon Resource Names (ARNs) or match patterns of resources to exclude from a backup plan.
planId Changes to this property will trigger replacement. string
The backup plan ID to be associated with the selection of resources.
resources Changes to this property will trigger replacement. string[]
An array of strings that either contain Amazon Resource Names (ARNs) or match patterns of resources to assign to a backup plan.
selectionTags Changes to this property will trigger replacement. SelectionSelectionTag[]
Tag-based conditions used to specify a set of resources to assign to a backup plan. See below for details.
conditions Changes to this property will trigger replacement. Sequence[SelectionConditionArgs]
Condition-based filters used to specify sets of resources for a backup plan. See below for details.
iam_role_arn Changes to this property will trigger replacement. str
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.
name Changes to this property will trigger replacement. str
The display name of a resource selection document.
not_resources Changes to this property will trigger replacement. Sequence[str]
An array of strings that either contain Amazon Resource Names (ARNs) or match patterns of resources to exclude from a backup plan.
plan_id Changes to this property will trigger replacement. str
The backup plan ID to be associated with the selection of resources.
resources Changes to this property will trigger replacement. Sequence[str]
An array of strings that either contain Amazon Resource Names (ARNs) or match patterns of resources to assign to a backup plan.
selection_tags Changes to this property will trigger replacement. Sequence[SelectionSelectionTagArgs]
Tag-based conditions used to specify a set of resources to assign to a backup plan. See below for details.
conditions Changes to this property will trigger replacement. List<Property Map>
Condition-based filters used to specify sets of resources for a backup plan. See below for details.
iamRoleArn Changes to this property will trigger replacement. String
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.
name Changes to this property will trigger replacement. String
The display name of a resource selection document.
notResources Changes to this property will trigger replacement. List<String>
An array of strings that either contain Amazon Resource Names (ARNs) or match patterns of resources to exclude from a backup plan.
planId Changes to this property will trigger replacement. String
The backup plan ID to be associated with the selection of resources.
resources Changes to this property will trigger replacement. List<String>
An array of strings that either contain Amazon Resource Names (ARNs) or match patterns of resources to assign to a backup plan.
selectionTags Changes to this property will trigger replacement. List<Property Map>
Tag-based conditions used to specify a set of resources to assign to a backup plan. See below for details.

Supporting Types

SelectionCondition
, SelectionConditionArgs

StringEquals Changes to this property will trigger replacement. List<SelectionConditionStringEqual>
Filters the values of your tagged resources for only those resources that you tagged with the same value. Also called "exact matching". See below for details.
StringLikes Changes to this property will trigger replacement. List<SelectionConditionStringLike>
Filters the values of your tagged resources for matching tag values with the use of a wildcard character (*) anywhere in the string. For example, prod* or *rod* matches the tag value production. See below for details.
StringNotEquals Changes to this property will trigger replacement. List<SelectionConditionStringNotEqual>
Filters the values of your tagged resources for only those resources that you tagged that do not have the same value. Also called "negated matching". See below for details.
StringNotLikes Changes to this property will trigger replacement. List<SelectionConditionStringNotLike>
Filters the values of your tagged resources for non-matching tag values with the use of a wildcard character (*) anywhere in the string. See below for details.
StringEquals Changes to this property will trigger replacement. []SelectionConditionStringEqual
Filters the values of your tagged resources for only those resources that you tagged with the same value. Also called "exact matching". See below for details.
StringLikes Changes to this property will trigger replacement. []SelectionConditionStringLike
Filters the values of your tagged resources for matching tag values with the use of a wildcard character (*) anywhere in the string. For example, prod* or *rod* matches the tag value production. See below for details.
StringNotEquals Changes to this property will trigger replacement. []SelectionConditionStringNotEqual
Filters the values of your tagged resources for only those resources that you tagged that do not have the same value. Also called "negated matching". See below for details.
StringNotLikes Changes to this property will trigger replacement. []SelectionConditionStringNotLike
Filters the values of your tagged resources for non-matching tag values with the use of a wildcard character (*) anywhere in the string. See below for details.
stringEquals Changes to this property will trigger replacement. List<SelectionConditionStringEqual>
Filters the values of your tagged resources for only those resources that you tagged with the same value. Also called "exact matching". See below for details.
stringLikes Changes to this property will trigger replacement. List<SelectionConditionStringLike>
Filters the values of your tagged resources for matching tag values with the use of a wildcard character (*) anywhere in the string. For example, prod* or *rod* matches the tag value production. See below for details.
stringNotEquals Changes to this property will trigger replacement. List<SelectionConditionStringNotEqual>
Filters the values of your tagged resources for only those resources that you tagged that do not have the same value. Also called "negated matching". See below for details.
stringNotLikes Changes to this property will trigger replacement. List<SelectionConditionStringNotLike>
Filters the values of your tagged resources for non-matching tag values with the use of a wildcard character (*) anywhere in the string. See below for details.
stringEquals Changes to this property will trigger replacement. SelectionConditionStringEqual[]
Filters the values of your tagged resources for only those resources that you tagged with the same value. Also called "exact matching". See below for details.
stringLikes Changes to this property will trigger replacement. SelectionConditionStringLike[]
Filters the values of your tagged resources for matching tag values with the use of a wildcard character (*) anywhere in the string. For example, prod* or *rod* matches the tag value production. See below for details.
stringNotEquals Changes to this property will trigger replacement. SelectionConditionStringNotEqual[]
Filters the values of your tagged resources for only those resources that you tagged that do not have the same value. Also called "negated matching". See below for details.
stringNotLikes Changes to this property will trigger replacement. SelectionConditionStringNotLike[]
Filters the values of your tagged resources for non-matching tag values with the use of a wildcard character (*) anywhere in the string. See below for details.
string_equals Changes to this property will trigger replacement. Sequence[SelectionConditionStringEqual]
Filters the values of your tagged resources for only those resources that you tagged with the same value. Also called "exact matching". See below for details.
string_likes Changes to this property will trigger replacement. Sequence[SelectionConditionStringLike]
Filters the values of your tagged resources for matching tag values with the use of a wildcard character (*) anywhere in the string. For example, prod* or *rod* matches the tag value production. See below for details.
string_not_equals Changes to this property will trigger replacement. Sequence[SelectionConditionStringNotEqual]
Filters the values of your tagged resources for only those resources that you tagged that do not have the same value. Also called "negated matching". See below for details.
string_not_likes Changes to this property will trigger replacement. Sequence[SelectionConditionStringNotLike]
Filters the values of your tagged resources for non-matching tag values with the use of a wildcard character (*) anywhere in the string. See below for details.
stringEquals Changes to this property will trigger replacement. List<Property Map>
Filters the values of your tagged resources for only those resources that you tagged with the same value. Also called "exact matching". See below for details.
stringLikes Changes to this property will trigger replacement. List<Property Map>
Filters the values of your tagged resources for matching tag values with the use of a wildcard character (*) anywhere in the string. For example, prod* or *rod* matches the tag value production. See below for details.
stringNotEquals Changes to this property will trigger replacement. List<Property Map>
Filters the values of your tagged resources for only those resources that you tagged that do not have the same value. Also called "negated matching". See below for details.
stringNotLikes Changes to this property will trigger replacement. List<Property Map>
Filters the values of your tagged resources for non-matching tag values with the use of a wildcard character (*) anywhere in the string. See below for details.

SelectionConditionStringEqual
, SelectionConditionStringEqualArgs

Key
This property is required.
Changes to this property will trigger replacement.
string
Key for the filter.
Value
This property is required.
Changes to this property will trigger replacement.
string
Value for the filter.
Key
This property is required.
Changes to this property will trigger replacement.
string
Key for the filter.
Value
This property is required.
Changes to this property will trigger replacement.
string
Value for the filter.
key
This property is required.
Changes to this property will trigger replacement.
String
Key for the filter.
value
This property is required.
Changes to this property will trigger replacement.
String
Value for the filter.
key
This property is required.
Changes to this property will trigger replacement.
string
Key for the filter.
value
This property is required.
Changes to this property will trigger replacement.
string
Value for the filter.
key
This property is required.
Changes to this property will trigger replacement.
str
Key for the filter.
value
This property is required.
Changes to this property will trigger replacement.
str
Value for the filter.
key
This property is required.
Changes to this property will trigger replacement.
String
Key for the filter.
value
This property is required.
Changes to this property will trigger replacement.
String
Value for the filter.

SelectionConditionStringLike
, SelectionConditionStringLikeArgs

Key
This property is required.
Changes to this property will trigger replacement.
string
Key for the filter.
Value
This property is required.
Changes to this property will trigger replacement.
string
Value for the filter.
Key
This property is required.
Changes to this property will trigger replacement.
string
Key for the filter.
Value
This property is required.
Changes to this property will trigger replacement.
string
Value for the filter.
key
This property is required.
Changes to this property will trigger replacement.
String
Key for the filter.
value
This property is required.
Changes to this property will trigger replacement.
String
Value for the filter.
key
This property is required.
Changes to this property will trigger replacement.
string
Key for the filter.
value
This property is required.
Changes to this property will trigger replacement.
string
Value for the filter.
key
This property is required.
Changes to this property will trigger replacement.
str
Key for the filter.
value
This property is required.
Changes to this property will trigger replacement.
str
Value for the filter.
key
This property is required.
Changes to this property will trigger replacement.
String
Key for the filter.
value
This property is required.
Changes to this property will trigger replacement.
String
Value for the filter.

SelectionConditionStringNotEqual
, SelectionConditionStringNotEqualArgs

Key
This property is required.
Changes to this property will trigger replacement.
string
Key for the filter.
Value
This property is required.
Changes to this property will trigger replacement.
string
Value for the filter.
Key
This property is required.
Changes to this property will trigger replacement.
string
Key for the filter.
Value
This property is required.
Changes to this property will trigger replacement.
string
Value for the filter.
key
This property is required.
Changes to this property will trigger replacement.
String
Key for the filter.
value
This property is required.
Changes to this property will trigger replacement.
String
Value for the filter.
key
This property is required.
Changes to this property will trigger replacement.
string
Key for the filter.
value
This property is required.
Changes to this property will trigger replacement.
string
Value for the filter.
key
This property is required.
Changes to this property will trigger replacement.
str
Key for the filter.
value
This property is required.
Changes to this property will trigger replacement.
str
Value for the filter.
key
This property is required.
Changes to this property will trigger replacement.
String
Key for the filter.
value
This property is required.
Changes to this property will trigger replacement.
String
Value for the filter.

SelectionConditionStringNotLike
, SelectionConditionStringNotLikeArgs

Key
This property is required.
Changes to this property will trigger replacement.
string
Key for the filter.
Value
This property is required.
Changes to this property will trigger replacement.
string
Value for the filter.
Key
This property is required.
Changes to this property will trigger replacement.
string
Key for the filter.
Value
This property is required.
Changes to this property will trigger replacement.
string
Value for the filter.
key
This property is required.
Changes to this property will trigger replacement.
String
Key for the filter.
value
This property is required.
Changes to this property will trigger replacement.
String
Value for the filter.
key
This property is required.
Changes to this property will trigger replacement.
string
Key for the filter.
value
This property is required.
Changes to this property will trigger replacement.
string
Value for the filter.
key
This property is required.
Changes to this property will trigger replacement.
str
Key for the filter.
value
This property is required.
Changes to this property will trigger replacement.
str
Value for the filter.
key
This property is required.
Changes to this property will trigger replacement.
String
Key for the filter.
value
This property is required.
Changes to this property will trigger replacement.
String
Value for the filter.

SelectionSelectionTag
, SelectionSelectionTagArgs

Key
This property is required.
Changes to this property will trigger replacement.
string
Key for the filter.
Type
This property is required.
Changes to this property will trigger replacement.
string
An operation, such as STRINGEQUALS, that is applied to the key-value pair used to filter resources in a selection.
Value
This property is required.
Changes to this property will trigger replacement.
string
Value for the filter.
Key
This property is required.
Changes to this property will trigger replacement.
string
Key for the filter.
Type
This property is required.
Changes to this property will trigger replacement.
string
An operation, such as STRINGEQUALS, that is applied to the key-value pair used to filter resources in a selection.
Value
This property is required.
Changes to this property will trigger replacement.
string
Value for the filter.
key
This property is required.
Changes to this property will trigger replacement.
String
Key for the filter.
type
This property is required.
Changes to this property will trigger replacement.
String
An operation, such as STRINGEQUALS, that is applied to the key-value pair used to filter resources in a selection.
value
This property is required.
Changes to this property will trigger replacement.
String
Value for the filter.
key
This property is required.
Changes to this property will trigger replacement.
string
Key for the filter.
type
This property is required.
Changes to this property will trigger replacement.
string
An operation, such as STRINGEQUALS, that is applied to the key-value pair used to filter resources in a selection.
value
This property is required.
Changes to this property will trigger replacement.
string
Value for the filter.
key
This property is required.
Changes to this property will trigger replacement.
str
Key for the filter.
type
This property is required.
Changes to this property will trigger replacement.
str
An operation, such as STRINGEQUALS, that is applied to the key-value pair used to filter resources in a selection.
value
This property is required.
Changes to this property will trigger replacement.
str
Value for the filter.
key
This property is required.
Changes to this property will trigger replacement.
String
Key for the filter.
type
This property is required.
Changes to this property will trigger replacement.
String
An operation, such as STRINGEQUALS, that is applied to the key-value pair used to filter resources in a selection.
value
This property is required.
Changes to this property will trigger replacement.
String
Value for the filter.

Import

Using pulumi import, import Backup selection using the role plan_id and id separated by |. For example:

$ pulumi import aws:backup/selection:Selection example plan-id|selection-id
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.