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
LookupSelectionin the Go SDK.
public static class GetSelection {
public static Task<GetSelectionResult> InvokeAsync(GetSelectionArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Plan
Id string The backup plan ID associated with the selection of resources.
- Selection
Id string The backup selection ID.
- Plan
Id string The backup plan ID associated with the selection of resources.
- Selection
Id string The backup selection ID.
- plan
Id string The backup plan ID associated with the selection of resources.
- selection
Id 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:
- Iam
Role stringArn 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.
- Plan
Id 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..
- Selection
Id string
- Iam
Role stringArn 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.
- Plan
Id 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..
- Selection
Id string
- iam
Role stringArn 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.
- plan
Id 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..
- selection
Id string
- iam_
role_ strarn 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
awsTerraform Provider.