Try AWS Native preview for resources not in the classic version.
AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi
aws.backup.getSelection
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
AWS Classic v6.42.0 published on Wednesday, Jun 26, 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:
- Plan
Id string - Backup plan ID associated with the selection of resources.
- Selection
Id string - Backup selection ID.
- Plan
Id string - Backup plan ID associated with the selection of resources.
- Selection
Id string - Backup selection ID.
- plan
Id String - Backup plan ID associated with the selection of resources.
- selection
Id String - Backup selection ID.
- plan
Id string - Backup plan ID associated with the selection of resources.
- selection
Id string - Backup selection ID.
- plan_
id str - Backup plan ID associated with the selection of resources.
- selection_
id str - Backup selection ID.
- plan
Id String - Backup plan ID associated with the selection of resources.
- selection
Id String - Backup selection ID.
getSelection Result
The following output properties are available:
- Iam
Role stringArn - 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.
- 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 - 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.
- 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 - 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.
- 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 - 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.
- 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 - 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
- iam
Role StringArn - 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.
- 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
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.
AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi