Scaleway v1.15.0 published on Tuesday, Jul 30, 2024 by pulumiverse
scaleway.getInstanceSnapshot
Explore with Pulumi AI
Gets information about an instance snapshot.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumi/scaleway";
const byName = scaleway.getInstanceSnapshot({
name: "my-snapshot-name",
});
const byId = scaleway.getInstanceSnapshot({
snapshotId: "11111111-1111-1111-1111-111111111111",
});
import pulumi
import pulumi_scaleway as scaleway
by_name = scaleway.get_instance_snapshot(name="my-snapshot-name")
by_id = scaleway.get_instance_snapshot(snapshot_id="11111111-1111-1111-1111-111111111111")
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := scaleway.LookupInstanceSnapshot(ctx, &scaleway.LookupInstanceSnapshotArgs{
Name: pulumi.StringRef("my-snapshot-name"),
}, nil)
if err != nil {
return err
}
_, err = scaleway.LookupInstanceSnapshot(ctx, &scaleway.LookupInstanceSnapshotArgs{
SnapshotId: pulumi.StringRef("11111111-1111-1111-1111-111111111111"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumi.Scaleway;
return await Deployment.RunAsync(() =>
{
var byName = Scaleway.GetInstanceSnapshot.Invoke(new()
{
Name = "my-snapshot-name",
});
var byId = Scaleway.GetInstanceSnapshot.Invoke(new()
{
SnapshotId = "11111111-1111-1111-1111-111111111111",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.ScalewayFunctions;
import com.pulumi.scaleway.inputs.GetInstanceSnapshotArgs;
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 byName = ScalewayFunctions.getInstanceSnapshot(GetInstanceSnapshotArgs.builder()
.name("my-snapshot-name")
.build());
final var byId = ScalewayFunctions.getInstanceSnapshot(GetInstanceSnapshotArgs.builder()
.snapshotId("11111111-1111-1111-1111-111111111111")
.build());
}
}
variables:
byName:
fn::invoke:
Function: scaleway:getInstanceSnapshot
Arguments:
name: my-snapshot-name
byId:
fn::invoke:
Function: scaleway:getInstanceSnapshot
Arguments:
snapshotId: 11111111-1111-1111-1111-111111111111
Using getInstanceSnapshot
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 getInstanceSnapshot(args: GetInstanceSnapshotArgs, opts?: InvokeOptions): Promise<GetInstanceSnapshotResult>
function getInstanceSnapshotOutput(args: GetInstanceSnapshotOutputArgs, opts?: InvokeOptions): Output<GetInstanceSnapshotResult>
def get_instance_snapshot(name: Optional[str] = None,
project_id: Optional[str] = None,
snapshot_id: Optional[str] = None,
zone: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetInstanceSnapshotResult
def get_instance_snapshot_output(name: Optional[pulumi.Input[str]] = None,
project_id: Optional[pulumi.Input[str]] = None,
snapshot_id: Optional[pulumi.Input[str]] = None,
zone: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetInstanceSnapshotResult]
func LookupInstanceSnapshot(ctx *Context, args *LookupInstanceSnapshotArgs, opts ...InvokeOption) (*LookupInstanceSnapshotResult, error)
func LookupInstanceSnapshotOutput(ctx *Context, args *LookupInstanceSnapshotOutputArgs, opts ...InvokeOption) LookupInstanceSnapshotResultOutput
> Note: This function is named LookupInstanceSnapshot
in the Go SDK.
public static class GetInstanceSnapshot
{
public static Task<GetInstanceSnapshotResult> InvokeAsync(GetInstanceSnapshotArgs args, InvokeOptions? opts = null)
public static Output<GetInstanceSnapshotResult> Invoke(GetInstanceSnapshotInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetInstanceSnapshotResult> getInstanceSnapshot(GetInstanceSnapshotArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: scaleway:index/getInstanceSnapshot:getInstanceSnapshot
arguments:
# arguments dictionary
The following arguments are supported:
- Name string
- The snapshot name.
Only one of
name
andsnapshot_id
should be specified. - Project
Id string project_id
) The ID of the project the snapshot is associated with.- Snapshot
Id string - The snapshot id.
Only one of
name
andsnapshot_id
should be specified. - Zone string
zone
) The zone in which the snapshot exists.
- Name string
- The snapshot name.
Only one of
name
andsnapshot_id
should be specified. - Project
Id string project_id
) The ID of the project the snapshot is associated with.- Snapshot
Id string - The snapshot id.
Only one of
name
andsnapshot_id
should be specified. - Zone string
zone
) The zone in which the snapshot exists.
- name String
- The snapshot name.
Only one of
name
andsnapshot_id
should be specified. - project
Id String project_id
) The ID of the project the snapshot is associated with.- snapshot
Id String - The snapshot id.
Only one of
name
andsnapshot_id
should be specified. - zone String
zone
) The zone in which the snapshot exists.
- name string
- The snapshot name.
Only one of
name
andsnapshot_id
should be specified. - project
Id string project_id
) The ID of the project the snapshot is associated with.- snapshot
Id string - The snapshot id.
Only one of
name
andsnapshot_id
should be specified. - zone string
zone
) The zone in which the snapshot exists.
- name str
- The snapshot name.
Only one of
name
andsnapshot_id
should be specified. - project_
id str project_id
) The ID of the project the snapshot is associated with.- snapshot_
id str - The snapshot id.
Only one of
name
andsnapshot_id
should be specified. - zone str
zone
) The zone in which the snapshot exists.
- name String
- The snapshot name.
Only one of
name
andsnapshot_id
should be specified. - project
Id String project_id
) The ID of the project the snapshot is associated with.- snapshot
Id String - The snapshot id.
Only one of
name
andsnapshot_id
should be specified. - zone String
zone
) The zone in which the snapshot exists.
getInstanceSnapshot Result
The following output properties are available:
- Created
At string - Id string
- The provider-assigned unique ID for this managed resource.
- Imports
List<Pulumiverse.
Scaleway. Outputs. Get Instance Snapshot Import> - Organization
Id string - Size
In intGb - List<string>
- Type string
- Volume
Id string - Name string
- Project
Id string - Snapshot
Id string - Zone string
- Created
At string - Id string
- The provider-assigned unique ID for this managed resource.
- Imports
[]Get
Instance Snapshot Import - Organization
Id string - Size
In intGb - []string
- Type string
- Volume
Id string - Name string
- Project
Id string - Snapshot
Id string - Zone string
- created
At String - id String
- The provider-assigned unique ID for this managed resource.
- imports
List<Get
Instance Snapshot Import> - organization
Id String - size
In IntegerGb - List<String>
- type String
- volume
Id String - name String
- project
Id String - snapshot
Id String - zone String
- created
At string - id string
- The provider-assigned unique ID for this managed resource.
- imports
Get
Instance Snapshot Import[] - organization
Id string - size
In numberGb - string[]
- type string
- volume
Id string - name string
- project
Id string - snapshot
Id string - zone string
- created_
at str - id str
- The provider-assigned unique ID for this managed resource.
- imports
Sequence[Get
Instance Snapshot Import] - organization_
id str - size_
in_ intgb - Sequence[str]
- type str
- volume_
id str - name str
- project_
id str - snapshot_
id str - zone str
- created
At String - id String
- The provider-assigned unique ID for this managed resource.
- imports List<Property Map>
- organization
Id String - size
In NumberGb - List<String>
- type String
- volume
Id String - name String
- project
Id String - snapshot
Id String - zone String
Supporting Types
GetInstanceSnapshotImport
Package Details
- Repository
- scaleway pulumiverse/pulumi-scaleway
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
scaleway
Terraform Provider.