OpenStack v5.0.0 published on Friday, Sep 27, 2024 by Pulumi
openstack.blockstorage.getSnapshotV3
Explore with Pulumi AI
Use this data source to get information about an existing snapshot.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";
const snapshot1 = openstack.blockstorage.getSnapshotV3({
name: "snapshot_1",
mostRecent: true,
});
import pulumi
import pulumi_openstack as openstack
snapshot1 = openstack.blockstorage.get_snapshot_v3(name="snapshot_1",
most_recent=True)
package main
import (
"github.com/pulumi/pulumi-openstack/sdk/v5/go/openstack/blockstorage"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := blockstorage.GetSnapshotV3(ctx, &blockstorage.GetSnapshotV3Args{
Name: pulumi.StringRef("snapshot_1"),
MostRecent: pulumi.BoolRef(true),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using OpenStack = Pulumi.OpenStack;
return await Deployment.RunAsync(() =>
{
var snapshot1 = OpenStack.BlockStorage.GetSnapshotV3.Invoke(new()
{
Name = "snapshot_1",
MostRecent = true,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.openstack.blockstorage.BlockstorageFunctions;
import com.pulumi.openstack.blockstorage.inputs.GetSnapshotV3Args;
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 snapshot1 = BlockstorageFunctions.getSnapshotV3(GetSnapshotV3Args.builder()
.name("snapshot_1")
.mostRecent(true)
.build());
}
}
variables:
snapshot1:
fn::invoke:
Function: openstack:blockstorage:getSnapshotV3
Arguments:
name: snapshot_1
mostRecent: true
Using getSnapshotV3
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 getSnapshotV3(args: GetSnapshotV3Args, opts?: InvokeOptions): Promise<GetSnapshotV3Result>
function getSnapshotV3Output(args: GetSnapshotV3OutputArgs, opts?: InvokeOptions): Output<GetSnapshotV3Result>
def get_snapshot_v3(most_recent: Optional[bool] = None,
name: Optional[str] = None,
region: Optional[str] = None,
status: Optional[str] = None,
volume_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetSnapshotV3Result
def get_snapshot_v3_output(most_recent: Optional[pulumi.Input[bool]] = None,
name: Optional[pulumi.Input[str]] = None,
region: Optional[pulumi.Input[str]] = None,
status: Optional[pulumi.Input[str]] = None,
volume_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetSnapshotV3Result]
func GetSnapshotV3(ctx *Context, args *GetSnapshotV3Args, opts ...InvokeOption) (*GetSnapshotV3Result, error)
func GetSnapshotV3Output(ctx *Context, args *GetSnapshotV3OutputArgs, opts ...InvokeOption) GetSnapshotV3ResultOutput
> Note: This function is named GetSnapshotV3
in the Go SDK.
public static class GetSnapshotV3
{
public static Task<GetSnapshotV3Result> InvokeAsync(GetSnapshotV3Args args, InvokeOptions? opts = null)
public static Output<GetSnapshotV3Result> Invoke(GetSnapshotV3InvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetSnapshotV3Result> getSnapshotV3(GetSnapshotV3Args args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: openstack:blockstorage/getSnapshotV3:getSnapshotV3
arguments:
# arguments dictionary
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 V3 Block Storage
client. If omitted, the
region
argument 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 V3 Block Storage
client. If omitted, the
region
argument 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 V3 Block Storage
client. If omitted, the
region
argument 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 V3 Block Storage
client. If omitted, the
region
argument 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 V3 Block Storage
client. If omitted, the
region
argument of the provider is used. - status str
- The status of the snapshot.
- volume_
id str - 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 V3 Block Storage
client. If omitted, the
region
argument of the provider is used. - status String
- The status of the snapshot.
- volume
Id String - The ID of the snapshot's volume.
getSnapshotV3 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, string>
- 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]string
- 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,String>
- The snapshot's metadata.
- name String
- See Argument Reference above.
- region String
- See Argument Reference above.
- size Integer
- The size of the snapshot.
- status String
- See Argument Reference above.
- volume
Id String - See Argument Reference above.
- most
Recent Boolean
- description string
- The snapshot's description.
- id string
- The provider-assigned unique ID for this managed resource.
- metadata {[key: string]: string}
- 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 Mapping[str, str]
- The snapshot's metadata.
- name str
- See Argument Reference above.
- region str
- See Argument Reference above.
- size int
- The size of the snapshot.
- status str
- See Argument Reference above.
- volume_
id str - 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>
- 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
Package Details
- Repository
- OpenStack pulumi/pulumi-openstack
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
openstack
Terraform Provider.