Vultr v2.21.1 published on Monday, Jul 22, 2024 by dirien
vultr.getSnapshot
Explore with Pulumi AI
Get information about a Vultr snapshot.
Example Usage
Get the information for a snapshot by description
:
import * as pulumi from "@pulumi/pulumi";
import * as vultr from "@pulumi/vultr";
const mySnapshot = vultr.getSnapshot({
filters: [{
name: "description",
values: ["my-snapshot-description"],
}],
});
import pulumi
import pulumi_vultr as vultr
my_snapshot = vultr.get_snapshot(filters=[vultr.GetSnapshotFilterArgs(
name="description",
values=["my-snapshot-description"],
)])
package main
import (
"github.com/dirien/pulumi-vultr/sdk/v2/go/vultr"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vultr.LookupSnapshot(ctx, &vultr.LookupSnapshotArgs{
Filters: []vultr.GetSnapshotFilter{
{
Name: "description",
Values: []string{
"my-snapshot-description",
},
},
},
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vultr = Pulumi.Vultr;
return await Deployment.RunAsync(() =>
{
var mySnapshot = Vultr.GetSnapshot.Invoke(new()
{
Filters = new[]
{
new Vultr.Inputs.GetSnapshotFilterInputArgs
{
Name = "description",
Values = new[]
{
"my-snapshot-description",
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vultr.VultrFunctions;
import com.pulumi.vultr.inputs.GetSnapshotArgs;
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 mySnapshot = VultrFunctions.getSnapshot(GetSnapshotArgs.builder()
.filters(GetSnapshotFilterArgs.builder()
.name("description")
.values("my-snapshot-description")
.build())
.build());
}
}
variables:
mySnapshot:
fn::invoke:
Function: vultr:getSnapshot
Arguments:
filters:
- name: description
values:
- my-snapshot-description
Using getSnapshot
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 getSnapshot(args: GetSnapshotArgs, opts?: InvokeOptions): Promise<GetSnapshotResult>
function getSnapshotOutput(args: GetSnapshotOutputArgs, opts?: InvokeOptions): Output<GetSnapshotResult>
def get_snapshot(filters: Optional[Sequence[GetSnapshotFilter]] = None,
opts: Optional[InvokeOptions] = None) -> GetSnapshotResult
def get_snapshot_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetSnapshotFilterArgs]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetSnapshotResult]
func LookupSnapshot(ctx *Context, args *LookupSnapshotArgs, opts ...InvokeOption) (*LookupSnapshotResult, error)
func LookupSnapshotOutput(ctx *Context, args *LookupSnapshotOutputArgs, opts ...InvokeOption) LookupSnapshotResultOutput
> Note: This function is named LookupSnapshot
in the Go SDK.
public static class GetSnapshot
{
public static Task<GetSnapshotResult> InvokeAsync(GetSnapshotArgs args, InvokeOptions? opts = null)
public static Output<GetSnapshotResult> Invoke(GetSnapshotInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetSnapshotResult> getSnapshot(GetSnapshotArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: vultr:index/getSnapshot:getSnapshot
arguments:
# arguments dictionary
The following arguments are supported:
- Filters
List<ediri.
Vultr. Inputs. Get Snapshot Filter> - Query parameters for finding snapshots.
- Filters
[]Get
Snapshot Filter - Query parameters for finding snapshots.
- filters
List<Get
Snapshot Filter> - Query parameters for finding snapshots.
- filters
Get
Snapshot Filter[] - Query parameters for finding snapshots.
- filters
Sequence[Get
Snapshot Filter] - Query parameters for finding snapshots.
- filters List<Property Map>
- Query parameters for finding snapshots.
getSnapshot Result
The following output properties are available:
- App
Id int - The application ID of the snapshot.
- Date
Created string - The date the snapshot was added to your Vultr account.
- Description string
- The description of the snapshot.
- Id string
- The provider-assigned unique ID for this managed resource.
- Os
Id int - The operating system ID of the snapshot.
- Size int
- The size of the snapshot in bytes.
- Status string
- The status of the snapshot.
- Filters
List<ediri.
Vultr. Outputs. Get Snapshot Filter>
- App
Id int - The application ID of the snapshot.
- Date
Created string - The date the snapshot was added to your Vultr account.
- Description string
- The description of the snapshot.
- Id string
- The provider-assigned unique ID for this managed resource.
- Os
Id int - The operating system ID of the snapshot.
- Size int
- The size of the snapshot in bytes.
- Status string
- The status of the snapshot.
- Filters
[]Get
Snapshot Filter
- app
Id Integer - The application ID of the snapshot.
- date
Created String - The date the snapshot was added to your Vultr account.
- description String
- The description of the snapshot.
- id String
- The provider-assigned unique ID for this managed resource.
- os
Id Integer - The operating system ID of the snapshot.
- size Integer
- The size of the snapshot in bytes.
- status String
- The status of the snapshot.
- filters
List<Get
Snapshot Filter>
- app
Id number - The application ID of the snapshot.
- date
Created string - The date the snapshot was added to your Vultr account.
- description string
- The description of the snapshot.
- id string
- The provider-assigned unique ID for this managed resource.
- os
Id number - The operating system ID of the snapshot.
- size number
- The size of the snapshot in bytes.
- status string
- The status of the snapshot.
- filters
Get
Snapshot Filter[]
- app_
id int - The application ID of the snapshot.
- date_
created str - The date the snapshot was added to your Vultr account.
- description str
- The description of the snapshot.
- id str
- The provider-assigned unique ID for this managed resource.
- os_
id int - The operating system ID of the snapshot.
- size int
- The size of the snapshot in bytes.
- status str
- The status of the snapshot.
- filters
Sequence[Get
Snapshot Filter]
- app
Id Number - The application ID of the snapshot.
- date
Created String - The date the snapshot was added to your Vultr account.
- description String
- The description of the snapshot.
- id String
- The provider-assigned unique ID for this managed resource.
- os
Id Number - The operating system ID of the snapshot.
- size Number
- The size of the snapshot in bytes.
- status String
- The status of the snapshot.
- filters List<Property Map>
Supporting Types
GetSnapshotFilter
Package Details
- Repository
- vultr dirien/pulumi-vultr
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
vultr
Terraform Provider.