1. Packages
  2. AWS Classic
  3. API Docs
  4. backup
  5. getSelection

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.44.0 published on Monday, Jul 8, 2024 by Pulumi

aws.backup.getSelection

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.44.0 published on Monday, Jul 8, 2024 by Pulumi

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = aws.backup.getSelection({
        planId: exampleAwsBackupPlan.id,
        selectionId: "selection-id-example",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.backup.get_selection(plan_id=example_aws_backup_plan["id"],
        selection_id="selection-id-example")
    
    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.LookupSelection(ctx, &backup.LookupSelectionArgs{
    			PlanId:      exampleAwsBackupPlan.Id,
    			SelectionId: "selection-id-example",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Aws.Backup.GetSelection.Invoke(new()
        {
            PlanId = exampleAwsBackupPlan.Id,
            SelectionId = "selection-id-example",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.backup.BackupFunctions;
    import com.pulumi.aws.backup.inputs.GetSelectionArgs;
    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 example = BackupFunctions.getSelection(GetSelectionArgs.builder()
                .planId(exampleAwsBackupPlan.id())
                .selectionId("selection-id-example")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: aws:backup:getSelection
          Arguments:
            planId: ${exampleAwsBackupPlan.id}
            selectionId: selection-id-example
    

    Using getSelection

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getSelection(args: GetSelectionArgs, opts?: InvokeOptions): Promise<GetSelectionResult>
    function getSelectionOutput(args: GetSelectionOutputArgs, opts?: InvokeOptions): Output<GetSelectionResult>
    def get_selection(plan_id: Optional[str] = None,
                      selection_id: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetSelectionResult
    def get_selection_output(plan_id: Optional[pulumi.Input[str]] = None,
                      selection_id: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetSelectionResult]
    func LookupSelection(ctx *Context, args *LookupSelectionArgs, opts ...InvokeOption) (*LookupSelectionResult, error)
    func LookupSelectionOutput(ctx *Context, args *LookupSelectionOutputArgs, opts ...InvokeOption) LookupSelectionResultOutput

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

    public static class GetSelection 
    {
        public static Task<GetSelectionResult> InvokeAsync(GetSelectionArgs args, InvokeOptions? opts = null)
        public static Output<GetSelectionResult> Invoke(GetSelectionInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSelectionResult> getSelection(GetSelectionArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:backup/getSelection:getSelection
      arguments:
        # arguments dictionary

    The following arguments are supported:

    PlanId string
    Backup plan ID associated with the selection of resources.
    SelectionId string
    Backup selection ID.
    PlanId string
    Backup plan ID associated with the selection of resources.
    SelectionId string
    Backup selection ID.
    planId String
    Backup plan ID associated with the selection of resources.
    selectionId String
    Backup selection ID.
    planId string
    Backup plan ID associated with the selection of resources.
    selectionId string
    Backup selection ID.
    plan_id str
    Backup plan ID associated with the selection of resources.
    selection_id str
    Backup selection ID.
    planId String
    Backup plan ID associated with the selection of resources.
    selectionId String
    Backup selection ID.

    getSelection Result

    The following output properties are available:

    IamRoleArn string
    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
    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
    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
    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
    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
    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
    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
    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
    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
    Display name of a resource selection document.
    plan_id str
    resources 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_id str
    iamRoleArn String
    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
    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

    Package Details

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

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.44.0 published on Monday, Jul 8, 2024 by Pulumi