get Snapshot Ids
Use this data source to get a list of EBS Snapshot IDs matching the specified criteria.
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ebs.EbsFunctions;
import com.pulumi.aws.ebs.inputs.GetSnapshotIdsArgs;
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 ebsVolumes = EbsFunctions.getSnapshotIds(GetSnapshotIdsArgs.builder()
.filters(
GetSnapshotIdsFilterArgs.builder()
.name("volume-size")
.values("40")
.build(),
GetSnapshotIdsFilterArgs.builder()
.name("tag:Name")
.values("Example")
.build())
.owners("self")
.build());
}
}
Content copied to clipboard
Return
A collection of values returned by getSnapshotIds.
Parameters
argument
A collection of arguments for invoking getSnapshotIds.
suspend fun getSnapshotIds(filters: List<GetSnapshotIdsFilter>? = null, owners: List<String>? = null, restorableByUserIds: List<String>? = null): GetSnapshotIdsResult
Return
A collection of values returned by getSnapshotIds.
Parameters
filters
One or more name/value pairs to filter off of. There are several valid keys, for a full reference, check out 1.
owners
Returns the snapshots owned by the specified owner id. Multiple owners can be specified.
restorable By User Ids
One or more AWS accounts IDs that can create volumes from the snapshot.
See also
suspend fun getSnapshotIds(argument: suspend GetSnapshotIdsPlainArgsBuilder.() -> Unit): GetSnapshotIdsResult
Return
A collection of values returned by getSnapshotIds.
Parameters
argument
Builder for com.pulumi.aws.ebs.kotlin.inputs.GetSnapshotIdsPlainArgs.