1. Packages
  2. Edgecenter Provider
  3. API Docs
  4. getSnapshot
edgecenter 0.8.0 published on Wednesday, Apr 30, 2025 by edge-center

edgecenter.getSnapshot

Explore with Pulumi AI

edgecenter logo
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.
    ProjectId double
    The uuid of the project. Either 'projectid' or 'projectname' must be specified.
    ProjectName string
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    RegionId double
    The uuid of the region. Either 'regionid' or 'regionname' must be specified.
    RegionName string
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    SnapshotId string
    The ID of the snapshot.
    VolumeId 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.
    ProjectId float64
    The uuid of the project. Either 'projectid' or 'projectname' must be specified.
    ProjectName string
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    RegionId float64
    The uuid of the region. Either 'regionid' or 'regionname' must be specified.
    RegionName string
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    SnapshotId string
    The ID of the snapshot.
    VolumeId 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.
    projectId Double
    The uuid of the project. Either 'projectid' or 'projectname' must be specified.
    projectName String
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    regionId Double
    The uuid of the region. Either 'regionid' or 'regionname' must be specified.
    regionName String
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    snapshotId String
    The ID of the snapshot.
    volumeId 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.
    projectId number
    The uuid of the project. Either 'projectid' or 'projectname' must be specified.
    projectName string
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    regionId number
    The uuid of the region. Either 'regionid' or 'regionname' must be specified.
    regionName string
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    snapshotId string
    The ID of the snapshot.
    volumeId 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.
    projectId Number
    The uuid of the project. Either 'projectid' or 'projectname' must be specified.
    projectName String
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    regionId Number
    The uuid of the region. Either 'regionid' or 'regionname' must be specified.
    regionName String
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    snapshotId String
    The ID of the snapshot.
    volumeId String
    The ID of the volume this snapshot was made from.

    getSnapshot Result

    The following output properties are available:

    CreatedAt string
    The datetime when the snapshot was created.
    CreatorTaskId string
    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.
    ProjectId double
    The uuid of the project. Either 'projectid' or 'projectname' must be specified.
    ProjectName string
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    RegionId double
    The uuid of the region. Either 'regionid' or 'regionname' must be specified.
    RegionName string
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    Size double
    The size of the snapshot, GiB.
    SnapshotId string
    The ID of the snapshot.
    Status string
    The status of the snapshot.
    UpdatedAt string
    The datetime when the snapshot was last updated.
    VolumeId string
    The ID of the volume this snapshot was made from.
    CreatedAt string
    The datetime when the snapshot was created.
    CreatorTaskId string
    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.
    ProjectId float64
    The uuid of the project. Either 'projectid' or 'projectname' must be specified.
    ProjectName string
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    RegionId float64
    The uuid of the region. Either 'regionid' or 'regionname' must be specified.
    RegionName string
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    Size float64
    The size of the snapshot, GiB.
    SnapshotId string
    The ID of the snapshot.
    Status string
    The status of the snapshot.
    UpdatedAt string
    The datetime when the snapshot was last updated.
    VolumeId string
    The ID of the volume this snapshot was made from.
    createdAt String
    The datetime when the snapshot was created.
    creatorTaskId String
    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.
    projectId Double
    The uuid of the project. Either 'projectid' or 'projectname' must be specified.
    projectName String
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    regionId Double
    The uuid of the region. Either 'regionid' or 'regionname' must be specified.
    regionName String
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    size Double
    The size of the snapshot, GiB.
    snapshotId String
    The ID of the snapshot.
    status String
    The status of the snapshot.
    updatedAt String
    The datetime when the snapshot was last updated.
    volumeId String
    The ID of the volume this snapshot was made from.
    createdAt string
    The datetime when the snapshot was created.
    creatorTaskId string
    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.
    projectId number
    The uuid of the project. Either 'projectid' or 'projectname' must be specified.
    projectName string
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    regionId number
    The uuid of the region. Either 'regionid' or 'regionname' must be specified.
    regionName string
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    size number
    The size of the snapshot, GiB.
    snapshotId string
    The ID of the snapshot.
    status string
    The status of the snapshot.
    updatedAt string
    The datetime when the snapshot was last updated.
    volumeId string
    The ID of the volume this snapshot was made from.
    created_at str
    The datetime when the snapshot was created.
    creator_task_id str
    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.
    createdAt String
    The datetime when the snapshot was created.
    creatorTaskId String
    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.
    projectId Number
    The uuid of the project. Either 'projectid' or 'projectname' must be specified.
    projectName String
    The name of the project. Either 'projectid' or 'projectname' must be specified.
    regionId Number
    The uuid of the region. Either 'regionid' or 'regionname' must be specified.
    regionName String
    The name of the region. Either 'regionid' or 'regionname' must be specified.
    size Number
    The size of the snapshot, GiB.
    snapshotId String
    The ID of the snapshot.
    status String
    The status of the snapshot.
    updatedAt String
    The datetime when the snapshot was last updated.
    volumeId 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 logo
    edgecenter 0.8.0 published on Wednesday, Apr 30, 2025 by edge-center