GetSnapshotV2
Use this data source to get information about an existing snapshot.
Example Usage
using Pulumi;
using OpenStack = Pulumi.OpenStack;
class MyStack : Stack
{
public MyStack()
{
var snapshot1 = Output.Create(OpenStack.BlockStorage.GetSnapshotV2.InvokeAsync(new OpenStack.BlockStorage.GetSnapshotV2Args
{
MostRecent = true,
Name = "snapshot_1",
}));
}
}
Coming soon!
import pulumi
import pulumi_openstack as openstack
snapshot1 = openstack.blockstorage.get_snapshot_v2(most_recent=True,
name="snapshot_1")import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";
const snapshot1 = pulumi.output(openstack.blockstorage.getSnapshotV2({
mostRecent: true,
name: "snapshot_1",
}, { async: true }));Using GetSnapshotV2
function getSnapshotV2(args: GetSnapshotV2Args, opts?: InvokeOptions): Promise<GetSnapshotV2Result>function get_snapshot_v2(most_recent=None, name=None, region=None, status=None, volume_id=None, opts=None)func GetSnapshotV2(ctx *Context, args *GetSnapshotV2Args, opts ...InvokeOption) (*GetSnapshotV2Result, error)public static class GetSnapshotV2 {
public static Task<GetSnapshotV2Result> InvokeAsync(GetSnapshotV2Args args, InvokeOptions? opts = null)
}The following arguments are supported:
- Most
Recent bool Pick the most recently created snapshot if there are multiple results.
- Name string
The name of the snapshot.
- Region string
The region in which to obtain the V2 Block Storage client. If omitted, the
regionargument of the provider is used.- Status string
The status of the snapshot.
- Volume
Id string The ID of the snapshot’s volume.
- Most
Recent bool Pick the most recently created snapshot if there are multiple results.
- Name string
The name of the snapshot.
- Region string
The region in which to obtain the V2 Block Storage client. If omitted, the
regionargument of the provider is used.- Status string
The status of the snapshot.
- Volume
Id string The ID of the snapshot’s volume.
- most
Recent boolean Pick the most recently created snapshot if there are multiple results.
- name string
The name of the snapshot.
- region string
The region in which to obtain the V2 Block Storage client. If omitted, the
regionargument of the provider is used.- status string
The status of the snapshot.
- volume
Id string The ID of the snapshot’s volume.
- most_
recent bool Pick the most recently created snapshot if there are multiple results.
- name str
The name of the snapshot.
- region str
The region in which to obtain the V2 Block Storage client. If omitted, the
regionargument of the provider is used.- status str
The status of the snapshot.
- volume_
id str The ID of the snapshot’s volume.
GetSnapshotV2 Result
The following output properties are available:
- Description string
The snapshot’s description.
- Id string
The provider-assigned unique ID for this managed resource.
- Metadata Dictionary<string, object>
The snapshot’s metadata.
- Name string
See Argument Reference above.
- Region string
See Argument Reference above.
- Size int
The size of the snapshot.
- Status string
See Argument Reference above.
- Volume
Id string See Argument Reference above.
- Most
Recent bool
- Description string
The snapshot’s description.
- Id string
The provider-assigned unique ID for this managed resource.
- Metadata map[string]interface{}
The snapshot’s metadata.
- Name string
See Argument Reference above.
- Region string
See Argument Reference above.
- Size int
The size of the snapshot.
- Status string
See Argument Reference above.
- Volume
Id string See Argument Reference above.
- Most
Recent bool
- description string
The snapshot’s description.
- id string
The provider-assigned unique ID for this managed resource.
- metadata {[key: string]: any}
The snapshot’s metadata.
- name string
See Argument Reference above.
- region string
See Argument Reference above.
- size number
The size of the snapshot.
- status string
See Argument Reference above.
- volume
Id string See Argument Reference above.
- most
Recent boolean
- description str
The snapshot’s description.
- id str
The provider-assigned unique ID for this managed resource.
- metadata Dict[str, Any]
The snapshot’s metadata.
- name str
See Argument Reference above.
- region str
See Argument Reference above.
- size float
The size of the snapshot.
- status str
See Argument Reference above.
- volume_
id str See Argument Reference above.
- most_
recent bool
Package Details
- Repository
- https://github.com/pulumi/pulumi-openstack
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
openstackTerraform Provider.