vkcs 0.9.3 published on Tuesday, Apr 15, 2025 by vk-cs
vkcs.getBlockstorageSnapshot
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 vkcs from "@pulumi/vkcs";
const recentSnapshot = vkcs.getBlockstorageSnapshot({
name: "snapshot-tf-example",
mostRecent: true,
});
import pulumi
import pulumi_vkcs as vkcs
recent_snapshot = vkcs.get_blockstorage_snapshot(name="snapshot-tf-example",
most_recent=True)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/vkcs/vkcs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vkcs.LookupBlockstorageSnapshot(ctx, &vkcs.LookupBlockstorageSnapshotArgs{
Name: pulumi.StringRef("snapshot-tf-example"),
MostRecent: pulumi.BoolRef(true),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vkcs = Pulumi.Vkcs;
return await Deployment.RunAsync(() =>
{
var recentSnapshot = Vkcs.GetBlockstorageSnapshot.Invoke(new()
{
Name = "snapshot-tf-example",
MostRecent = true,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vkcs.VkcsFunctions;
import com.pulumi.vkcs.inputs.GetBlockstorageSnapshotArgs;
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 recentSnapshot = VkcsFunctions.getBlockstorageSnapshot(GetBlockstorageSnapshotArgs.builder()
.name("snapshot-tf-example")
.mostRecent(true)
.build());
}
}
variables:
recentSnapshot:
fn::invoke:
function: vkcs:getBlockstorageSnapshot
arguments:
name: snapshot-tf-example
mostRecent: true
Using getBlockstorageSnapshot
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 getBlockstorageSnapshot(args: GetBlockstorageSnapshotArgs, opts?: InvokeOptions): Promise<GetBlockstorageSnapshotResult>
function getBlockstorageSnapshotOutput(args: GetBlockstorageSnapshotOutputArgs, opts?: InvokeOptions): Output<GetBlockstorageSnapshotResult>
def get_blockstorage_snapshot(id: Optional[str] = None,
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) -> GetBlockstorageSnapshotResult
def get_blockstorage_snapshot_output(id: Optional[pulumi.Input[str]] = None,
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[GetBlockstorageSnapshotResult]
func LookupBlockstorageSnapshot(ctx *Context, args *LookupBlockstorageSnapshotArgs, opts ...InvokeOption) (*LookupBlockstorageSnapshotResult, error)
func LookupBlockstorageSnapshotOutput(ctx *Context, args *LookupBlockstorageSnapshotOutputArgs, opts ...InvokeOption) LookupBlockstorageSnapshotResultOutput
> Note: This function is named LookupBlockstorageSnapshot
in the Go SDK.
public static class GetBlockstorageSnapshot
{
public static Task<GetBlockstorageSnapshotResult> InvokeAsync(GetBlockstorageSnapshotArgs args, InvokeOptions? opts = null)
public static Output<GetBlockstorageSnapshotResult> Invoke(GetBlockstorageSnapshotInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetBlockstorageSnapshotResult> getBlockstorageSnapshot(GetBlockstorageSnapshotArgs args, InvokeOptions options)
public static Output<GetBlockstorageSnapshotResult> getBlockstorageSnapshot(GetBlockstorageSnapshotArgs args, InvokeOptions options)
fn::invoke:
function: vkcs:index/getBlockstorageSnapshot:getBlockstorageSnapshot
arguments:
# arguments dictionary
The following arguments are supported:
- Id string
- string → ID of the resource.
- Most
Recent bool - optional boolean → Pick the most recently created snapshot if there are multiple results.
- Name string
- optional string → The name of the snapshot.
- Region string
- optional string → The region in which to obtain the Block Storage client. If omitted, the
region
argument of the provider is used. - Status string
- optional string → The status of the snapshot.
- Volume
Id string - optional string → The ID of the snapshot's volume.
- Id string
- string → ID of the resource.
- Most
Recent bool - optional boolean → Pick the most recently created snapshot if there are multiple results.
- Name string
- optional string → The name of the snapshot.
- Region string
- optional string → The region in which to obtain the Block Storage client. If omitted, the
region
argument of the provider is used. - Status string
- optional string → The status of the snapshot.
- Volume
Id string - optional string → The ID of the snapshot's volume.
- id String
- string → ID of the resource.
- most
Recent Boolean - optional boolean → Pick the most recently created snapshot if there are multiple results.
- name String
- optional string → The name of the snapshot.
- region String
- optional string → The region in which to obtain the Block Storage client. If omitted, the
region
argument of the provider is used. - status String
- optional string → The status of the snapshot.
- volume
Id String - optional string → The ID of the snapshot's volume.
- id string
- string → ID of the resource.
- most
Recent boolean - optional boolean → Pick the most recently created snapshot if there are multiple results.
- name string
- optional string → The name of the snapshot.
- region string
- optional string → The region in which to obtain the Block Storage client. If omitted, the
region
argument of the provider is used. - status string
- optional string → The status of the snapshot.
- volume
Id string - optional string → The ID of the snapshot's volume.
- id str
- string → ID of the resource.
- most_
recent bool - optional boolean → Pick the most recently created snapshot if there are multiple results.
- name str
- optional string → The name of the snapshot.
- region str
- optional string → The region in which to obtain the Block Storage client. If omitted, the
region
argument of the provider is used. - status str
- optional string → The status of the snapshot.
- volume_
id str - optional string → The ID of the snapshot's volume.
- id String
- string → ID of the resource.
- most
Recent Boolean - optional boolean → Pick the most recently created snapshot if there are multiple results.
- name String
- optional string → The name of the snapshot.
- region String
- optional string → The region in which to obtain the Block Storage client. If omitted, the
region
argument of the provider is used. - status String
- optional string → The status of the snapshot.
- volume
Id String - optional string → The ID of the snapshot's volume.
getBlockstorageSnapshot Result
The following output properties are available:
- Description string
- string → The snapshot's description.
- Id string
- string → ID of the resource.
- Metadata Dictionary<string, string>
- map of string → The snapshot's metadata.
- Name string
- Region string
- Size double
- number → The size of the snapshot.
- Status string
- Volume
Id string - Most
Recent bool
- Description string
- string → The snapshot's description.
- Id string
- string → ID of the resource.
- Metadata map[string]string
- map of string → The snapshot's metadata.
- Name string
- Region string
- Size float64
- number → The size of the snapshot.
- Status string
- Volume
Id string - Most
Recent bool
- description String
- string → The snapshot's description.
- id String
- string → ID of the resource.
- metadata Map<String,String>
- map of string → The snapshot's metadata.
- name String
- region String
- size Double
- number → The size of the snapshot.
- status String
- volume
Id String - most
Recent Boolean
- description string
- string → The snapshot's description.
- id string
- string → ID of the resource.
- metadata {[key: string]: string}
- map of string → The snapshot's metadata.
- name string
- region string
- size number
- number → The size of the snapshot.
- status string
- volume
Id string - most
Recent boolean
- description str
- string → The snapshot's description.
- id str
- string → ID of the resource.
- metadata Mapping[str, str]
- map of string → The snapshot's metadata.
- name str
- region str
- size float
- number → The size of the snapshot.
- status str
- volume_
id str - most_
recent bool
- description String
- string → The snapshot's description.
- id String
- string → ID of the resource.
- metadata Map<String>
- map of string → The snapshot's metadata.
- name String
- region String
- size Number
- number → The size of the snapshot.
- status String
- volume
Id String - most
Recent Boolean
Package Details
- Repository
- vkcs vk-cs/terraform-provider-vkcs
- License
- Notes
- This Pulumi package is based on the
vkcs
Terraform Provider.