edgecenter 0.8.0 published on Wednesday, Apr 30, 2025 by edge-center
edgecenter.getSnapshot
Explore with Pulumi AI
edgecenter 0.8.0 published on Wednesday, Apr 30, 2025 by edge-center
A snapshot is a feature that allows you to capture the current state of the instance or volume at a specific point in time
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as edgecenter from "@pulumi/edgecenter";
const pr = edgecenter.getProject({
name: "test",
});
const rg = edgecenter.getRegion({
name: "ED-10 Preprod",
});
const _default = Promise.all([rg, pr]).then(([rg, pr]) => edgecenter.getSnapshot({
name: "default",
regionId: rg.id,
projectId: pr.id,
}));
export const view = _default;
import pulumi
import pulumi_edgecenter as edgecenter
pr = edgecenter.get_project(name="test")
rg = edgecenter.get_region(name="ED-10 Preprod")
default = edgecenter.get_snapshot(name="default",
region_id=rg.id,
project_id=pr.id)
pulumi.export("view", default)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/edgecenter/edgecenter"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
pr, err := edgecenter.LookupProject(ctx, &edgecenter.LookupProjectArgs{
Name: pulumi.StringRef("test"),
}, nil)
if err != nil {
return err
}
rg, err := edgecenter.GetRegion(ctx, &edgecenter.GetRegionArgs{
Name: "ED-10 Preprod",
}, nil)
if err != nil {
return err
}
_default, err := edgecenter.LookupSnapshot(ctx, &edgecenter.LookupSnapshotArgs{
Name: pulumi.StringRef("default"),
RegionId: pulumi.Float64Ref(rg.Id),
ProjectId: pulumi.Float64Ref(pr.Id),
}, nil)
if err != nil {
return err
}
ctx.Export("view", _default)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Edgecenter = Pulumi.Edgecenter;
return await Deployment.RunAsync(() =>
{
var pr = Edgecenter.GetProject.Invoke(new()
{
Name = "test",
});
var rg = Edgecenter.GetRegion.Invoke(new()
{
Name = "ED-10 Preprod",
});
var @default = Edgecenter.GetSnapshot.Invoke(new()
{
Name = "default",
RegionId = rg.Apply(getRegionResult => getRegionResult.Id),
ProjectId = pr.Apply(getProjectResult => getProjectResult.Id),
});
return new Dictionary<string, object?>
{
["view"] = @default,
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.edgecenter.EdgecenterFunctions;
import com.pulumi.edgecenter.inputs.GetProjectArgs;
import com.pulumi.edgecenter.inputs.GetRegionArgs;
import com.pulumi.edgecenter.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 pr = EdgecenterFunctions.getProject(GetProjectArgs.builder()
.name("test")
.build());
final var rg = EdgecenterFunctions.getRegion(GetRegionArgs.builder()
.name("ED-10 Preprod")
.build());
final var default = EdgecenterFunctions.getSnapshot(GetSnapshotArgs.builder()
.name("default")
.regionId(rg.applyValue(getRegionResult -> getRegionResult.id()))
.projectId(pr.applyValue(getProjectResult -> getProjectResult.id()))
.build());
ctx.export("view", default_);
}
}
variables:
pr:
fn::invoke:
function: edgecenter:getProject
arguments:
name: test
rg:
fn::invoke:
function: edgecenter:getRegion
arguments:
name: ED-10 Preprod
default:
fn::invoke:
function: edgecenter:getSnapshot
arguments:
name: default
regionId: ${rg.id}
projectId: ${pr.id}
outputs:
view: ${default}
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(id: Optional[str] = None,
name: Optional[str] = None,
project_id: Optional[float] = None,
project_name: Optional[str] = None,
region_id: Optional[float] = None,
region_name: Optional[str] = None,
snapshot_id: Optional[str] = None,
volume_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetSnapshotResult
def get_snapshot_output(id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
project_id: Optional[pulumi.Input[float]] = None,
project_name: Optional[pulumi.Input[str]] = None,
region_id: Optional[pulumi.Input[float]] = None,
region_name: Optional[pulumi.Input[str]] = None,
snapshot_id: Optional[pulumi.Input[str]] = None,
volume_id: Optional[pulumi.Input[str]] = 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)
public static Output<GetSnapshotResult> getSnapshot(GetSnapshotArgs args, InvokeOptions options)
fn::invoke:
function: edgecenter:index/getSnapshot:getSnapshot
arguments:
# arguments dictionary
The following arguments are supported:
- Id string
- The ID of this resource.
- Name string
- The name of the snapshot. Use only with uniq name.
- Project
Id double - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- Project
Name string - The name of the project. Either 'projectid' or 'projectname' must be specified.
- Region
Id double - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- Region
Name string - The name of the region. Either 'regionid' or 'regionname' must be specified.
- Snapshot
Id string - The ID of the snapshot.
- Volume
Id string - The ID of the volume this snapshot was made from.
- Id string
- The ID of this resource.
- Name string
- The name of the snapshot. Use only with uniq name.
- Project
Id float64 - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- Project
Name string - The name of the project. Either 'projectid' or 'projectname' must be specified.
- Region
Id float64 - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- Region
Name string - The name of the region. Either 'regionid' or 'regionname' must be specified.
- Snapshot
Id string - The ID of the snapshot.
- Volume
Id string - The ID of the volume this snapshot was made from.
- id String
- The ID of this resource.
- name String
- The name of the snapshot. Use only with uniq name.
- project
Id Double - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project
Name String - The name of the project. Either 'projectid' or 'projectname' must be specified.
- region
Id Double - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- region
Name String - The name of the region. Either 'regionid' or 'regionname' must be specified.
- snapshot
Id String - The ID of the snapshot.
- volume
Id String - The ID of the volume this snapshot was made from.
- id string
- The ID of this resource.
- name string
- The name of the snapshot. Use only with uniq name.
- project
Id number - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project
Name string - The name of the project. Either 'projectid' or 'projectname' must be specified.
- region
Id number - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- region
Name string - The name of the region. Either 'regionid' or 'regionname' must be specified.
- snapshot
Id string - The ID of the snapshot.
- volume
Id string - The ID of the volume this snapshot was made from.
- id str
- The ID of this resource.
- name str
- The name of the snapshot. Use only with uniq name.
- project_
id float - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project_
name str - The name of the project. Either 'projectid' or 'projectname' must be specified.
- region_
id float - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- region_
name str - The name of the region. Either 'regionid' or 'regionname' must be specified.
- snapshot_
id str - The ID of the snapshot.
- volume_
id str - The ID of the volume this snapshot was made from.
- id String
- The ID of this resource.
- name String
- The name of the snapshot. Use only with uniq name.
- project
Id Number - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project
Name String - The name of the project. Either 'projectid' or 'projectname' must be specified.
- region
Id Number - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- region
Name String - The name of the region. Either 'regionid' or 'regionname' must be specified.
- snapshot
Id String - The ID of the snapshot.
- volume
Id String - The ID of the volume this snapshot was made from.
getSnapshot Result
The following output properties are available:
- Created
At string - The datetime when the snapshot was created.
- Creator
Task stringId - The task that created this entity.
- Description string
- The description of the snapshot.
- Id string
- The ID of this resource.
- Metadata Dictionary<string, string>
- The metadata
- Name string
- The name of the snapshot. Use only with uniq name.
- Project
Id double - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- Project
Name string - The name of the project. Either 'projectid' or 'projectname' must be specified.
- Region
Id double - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- Region
Name string - The name of the region. Either 'regionid' or 'regionname' must be specified.
- Size double
- The size of the snapshot, GiB.
- Snapshot
Id string - The ID of the snapshot.
- Status string
- The status of the snapshot.
- Updated
At string - The datetime when the snapshot was last updated.
- Volume
Id string - The ID of the volume this snapshot was made from.
- Created
At string - The datetime when the snapshot was created.
- Creator
Task stringId - The task that created this entity.
- Description string
- The description of the snapshot.
- Id string
- The ID of this resource.
- Metadata map[string]string
- The metadata
- Name string
- The name of the snapshot. Use only with uniq name.
- Project
Id float64 - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- Project
Name string - The name of the project. Either 'projectid' or 'projectname' must be specified.
- Region
Id float64 - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- Region
Name string - The name of the region. Either 'regionid' or 'regionname' must be specified.
- Size float64
- The size of the snapshot, GiB.
- Snapshot
Id string - The ID of the snapshot.
- Status string
- The status of the snapshot.
- Updated
At string - The datetime when the snapshot was last updated.
- Volume
Id string - The ID of the volume this snapshot was made from.
- created
At String - The datetime when the snapshot was created.
- creator
Task StringId - The task that created this entity.
- description String
- The description of the snapshot.
- id String
- The ID of this resource.
- metadata Map<String,String>
- The metadata
- name String
- The name of the snapshot. Use only with uniq name.
- project
Id Double - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project
Name String - The name of the project. Either 'projectid' or 'projectname' must be specified.
- region
Id Double - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- region
Name String - The name of the region. Either 'regionid' or 'regionname' must be specified.
- size Double
- The size of the snapshot, GiB.
- snapshot
Id String - The ID of the snapshot.
- status String
- The status of the snapshot.
- updated
At String - The datetime when the snapshot was last updated.
- volume
Id String - The ID of the volume this snapshot was made from.
- created
At string - The datetime when the snapshot was created.
- creator
Task stringId - The task that created this entity.
- description string
- The description of the snapshot.
- id string
- The ID of this resource.
- metadata {[key: string]: string}
- The metadata
- name string
- The name of the snapshot. Use only with uniq name.
- project
Id number - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project
Name string - The name of the project. Either 'projectid' or 'projectname' must be specified.
- region
Id number - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- region
Name string - The name of the region. Either 'regionid' or 'regionname' must be specified.
- size number
- The size of the snapshot, GiB.
- snapshot
Id string - The ID of the snapshot.
- status string
- The status of the snapshot.
- updated
At string - The datetime when the snapshot was last updated.
- volume
Id string - The ID of the volume this snapshot was made from.
- created_
at str - The datetime when the snapshot was created.
- creator_
task_ strid - The task that created this entity.
- description str
- The description of the snapshot.
- id str
- The ID of this resource.
- metadata Mapping[str, str]
- The metadata
- name str
- The name of the snapshot. Use only with uniq name.
- project_
id float - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project_
name str - The name of the project. Either 'projectid' or 'projectname' must be specified.
- region_
id float - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- region_
name str - The name of the region. Either 'regionid' or 'regionname' must be specified.
- size float
- The size of the snapshot, GiB.
- snapshot_
id str - The ID of the snapshot.
- status str
- The status of the snapshot.
- updated_
at str - The datetime when the snapshot was last updated.
- volume_
id str - The ID of the volume this snapshot was made from.
- created
At String - The datetime when the snapshot was created.
- creator
Task StringId - The task that created this entity.
- description String
- The description of the snapshot.
- id String
- The ID of this resource.
- metadata Map<String>
- The metadata
- name String
- The name of the snapshot. Use only with uniq name.
- project
Id Number - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project
Name String - The name of the project. Either 'projectid' or 'projectname' must be specified.
- region
Id Number - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- region
Name String - The name of the region. Either 'regionid' or 'regionname' must be specified.
- size Number
- The size of the snapshot, GiB.
- snapshot
Id String - The ID of the snapshot.
- status String
- The status of the snapshot.
- updated
At String - The datetime when the snapshot was last updated.
- volume
Id String - The ID of the volume this snapshot was made from.
Package Details
- Repository
- edgecenter edge-center/terraform-provider-edgecenter
- License
- Notes
- This Pulumi package is based on the
edgecenter
Terraform Provider.
edgecenter 0.8.0 published on Wednesday, Apr 30, 2025 by edge-center