get Selection
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",
});
Content copied to clipboard
import pulumi
import pulumi_aws as aws
example = aws.backup.get_selection(plan_id=example_aws_backup_plan["id"],
selection_id="selection-id-example")
Content copied to clipboard
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",
});
});
Content copied to clipboard
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
})
}
Content copied to clipboard
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());
}
}
Content copied to clipboard
variables:
example:
fn::invoke:
function: aws:backup:getSelection
arguments:
planId: ${exampleAwsBackupPlan.id}
selectionId: selection-id-example
Content copied to clipboard
Return
A collection of values returned by getSelection.
Parameters
argument
A collection of arguments for invoking getSelection.
Return
A collection of values returned by getSelection.
Parameters
plan Id
Backup plan ID associated with the selection of resources.
selection Id
Backup selection ID.
See also
suspend fun getSelection(argument: suspend GetSelectionPlainArgsBuilder.() -> Unit): GetSelectionResult
Return
A collection of values returned by getSelection.
Parameters
argument
Builder for com.pulumi.aws.backup.kotlin.inputs.GetSelectionPlainArgs.