GetSelection

Use this data source to get information on an existing backup selection.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Aws.Backup.GetSelection.InvokeAsync(new Aws.Backup.GetSelectionArgs
        {
            PlanId = data.Aws_backup_plan.Example.Id,
            SelectionId = "selection-id-example",
        }));
    }

}
package main

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

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := backup.LookupSelection(ctx, &backup.LookupSelectionArgs{
            PlanId:      data.Aws_backup_plan.Example.Id,
            SelectionId: "selection-id-example",
        }, nil)
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

example = aws.backup.get_selection(plan_id=data["aws_backup_plan"]["example"]["id"],
    selection_id="selection-id-example")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = aws_backup_plan_example.id.apply(id => aws.backup.getSelection({
    planId: id,
    selectionId: "selection-id-example",
}, { async: true }));

Using GetSelection

function getSelection(args: GetSelectionArgs, opts?: InvokeOptions): Promise<GetSelectionResult>
function  get_selection(plan_id=None, selection_id=None, opts=None)
func LookupSelection(ctx *Context, args *LookupSelectionArgs, opts ...InvokeOption) (*LookupSelectionResult, error)

Note: This function is named LookupSelection in the Go SDK.

public static class GetSelection {
    public static Task<GetSelectionResult> InvokeAsync(GetSelectionArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

PlanId string

The backup plan ID associated with the selection of resources.

SelectionId string

The backup selection ID.

PlanId string

The backup plan ID associated with the selection of resources.

SelectionId string

The backup selection ID.

planId string

The backup plan ID associated with the selection of resources.

selectionId string

The backup selection ID.

plan_id str

The backup plan ID associated with the selection of resources.

selection_id str

The backup selection ID.

GetSelection Result

The following output properties are available:

IamRoleArn 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.

Id string

The provider-assigned unique ID for this managed resource.

Name string

The display name of a resource selection document.

PlanId string
Resources List<string>

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

SelectionId string
IamRoleArn 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.

Id string

The provider-assigned unique ID for this managed resource.

Name string

The display name of a resource selection document.

PlanId string
Resources []string

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

SelectionId string
iamRoleArn 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.

id string

The provider-assigned unique ID for this managed resource.

name string

The display name of a resource selection document.

planId string
resources string[]

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

selectionId string
iam_role_arn 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.

id str

The provider-assigned unique ID for this managed resource.

name str

The display name of a resource selection document.

plan_id str
resources List[str]

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

selection_id str

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.