1. Packages
  2. OpenStack
  3. API Docs
  4. sharedfilesystem
  5. getSnapshot
OpenStack v4.0.0 published on Tuesday, May 21, 2024 by Pulumi

openstack.sharedfilesystem.getSnapshot

Explore with Pulumi AI

openstack logo
OpenStack v4.0.0 published on Tuesday, May 21, 2024 by Pulumi

    Use this data source to get the ID of an available Shared File System snapshot.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as openstack from "@pulumi/openstack";
    
    const snapshot1 = openstack.sharedfilesystem.getSnapshot({
        name: "snapshot_1",
    });
    
    import pulumi
    import pulumi_openstack as openstack
    
    snapshot1 = openstack.sharedfilesystem.get_snapshot(name="snapshot_1")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-openstack/sdk/v4/go/openstack/sharedfilesystem"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := sharedfilesystem.GetSnapshot(ctx, &sharedfilesystem.GetSnapshotArgs{
    			Name: pulumi.StringRef("snapshot_1"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using OpenStack = Pulumi.OpenStack;
    
    return await Deployment.RunAsync(() => 
    {
        var snapshot1 = OpenStack.SharedFileSystem.GetSnapshot.Invoke(new()
        {
            Name = "snapshot_1",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.openstack.sharedfilesystem.SharedfilesystemFunctions;
    import com.pulumi.openstack.sharedfilesystem.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 snapshot1 = SharedfilesystemFunctions.getSnapshot(GetSnapshotArgs.builder()
                .name("snapshot_1")
                .build());
    
        }
    }
    
    variables:
      snapshot1:
        fn::invoke:
          Function: openstack:sharedfilesystem:getSnapshot
          Arguments:
            name: snapshot_1
    

    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(description: Optional[str] = None,
                     name: Optional[str] = None,
                     region: Optional[str] = None,
                     share_id: Optional[str] = None,
                     status: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetSnapshotResult
    def get_snapshot_output(description: Optional[pulumi.Input[str]] = None,
                     name: Optional[pulumi.Input[str]] = None,
                     region: Optional[pulumi.Input[str]] = None,
                     share_id: Optional[pulumi.Input[str]] = None,
                     status: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetSnapshotResult]
    func GetSnapshot(ctx *Context, args *GetSnapshotArgs, opts ...InvokeOption) (*GetSnapshotResult, error)
    func GetSnapshotOutput(ctx *Context, args *GetSnapshotOutputArgs, opts ...InvokeOption) GetSnapshotResultOutput

    > Note: This function is named GetSnapshot 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: openstack:sharedfilesystem/getSnapshot:getSnapshot
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Description string
    The human-readable description of the snapshot.
    Name string
    The name of the snapshot.
    Region string
    The region in which to obtain the V2 Shared File System client.
    ShareId string
    The UUID of the source share that was used to create the snapshot.
    Status string
    A snapshot status filter. A valid value is available, error, creating, deleting, manage_starting, manage_error, unmanage_starting, unmanage_error or error_deleting.
    Description string
    The human-readable description of the snapshot.
    Name string
    The name of the snapshot.
    Region string
    The region in which to obtain the V2 Shared File System client.
    ShareId string
    The UUID of the source share that was used to create the snapshot.
    Status string
    A snapshot status filter. A valid value is available, error, creating, deleting, manage_starting, manage_error, unmanage_starting, unmanage_error or error_deleting.
    description String
    The human-readable description of the snapshot.
    name String
    The name of the snapshot.
    region String
    The region in which to obtain the V2 Shared File System client.
    shareId String
    The UUID of the source share that was used to create the snapshot.
    status String
    A snapshot status filter. A valid value is available, error, creating, deleting, manage_starting, manage_error, unmanage_starting, unmanage_error or error_deleting.
    description string
    The human-readable description of the snapshot.
    name string
    The name of the snapshot.
    region string
    The region in which to obtain the V2 Shared File System client.
    shareId string
    The UUID of the source share that was used to create the snapshot.
    status string
    A snapshot status filter. A valid value is available, error, creating, deleting, manage_starting, manage_error, unmanage_starting, unmanage_error or error_deleting.
    description str
    The human-readable description of the snapshot.
    name str
    The name of the snapshot.
    region str
    The region in which to obtain the V2 Shared File System client.
    share_id str
    The UUID of the source share that was used to create the snapshot.
    status str
    A snapshot status filter. A valid value is available, error, creating, deleting, manage_starting, manage_error, unmanage_starting, unmanage_error or error_deleting.
    description String
    The human-readable description of the snapshot.
    name String
    The name of the snapshot.
    region String
    The region in which to obtain the V2 Shared File System client.
    shareId String
    The UUID of the source share that was used to create the snapshot.
    status String
    A snapshot status filter. A valid value is available, error, creating, deleting, manage_starting, manage_error, unmanage_starting, unmanage_error or error_deleting.

    getSnapshot Result

    The following output properties are available:

    Description string
    See Argument Reference above.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    See Argument Reference above.
    ProjectId string
    See Argument Reference above.
    Region string
    ShareId string
    The UUID of the source share that was used to create the snapshot.
    ShareProto string
    The file system protocol of a share snapshot.
    ShareSize int
    The share snapshot size, in GBs.
    Size int
    The snapshot size, in GBs.
    Status string
    See Argument Reference above.
    Description string
    See Argument Reference above.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    See Argument Reference above.
    ProjectId string
    See Argument Reference above.
    Region string
    ShareId string
    The UUID of the source share that was used to create the snapshot.
    ShareProto string
    The file system protocol of a share snapshot.
    ShareSize int
    The share snapshot size, in GBs.
    Size int
    The snapshot size, in GBs.
    Status string
    See Argument Reference above.
    description String
    See Argument Reference above.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    See Argument Reference above.
    projectId String
    See Argument Reference above.
    region String
    shareId String
    The UUID of the source share that was used to create the snapshot.
    shareProto String
    The file system protocol of a share snapshot.
    shareSize Integer
    The share snapshot size, in GBs.
    size Integer
    The snapshot size, in GBs.
    status String
    See Argument Reference above.
    description string
    See Argument Reference above.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    See Argument Reference above.
    projectId string
    See Argument Reference above.
    region string
    shareId string
    The UUID of the source share that was used to create the snapshot.
    shareProto string
    The file system protocol of a share snapshot.
    shareSize number
    The share snapshot size, in GBs.
    size number
    The snapshot size, in GBs.
    status string
    See Argument Reference above.
    description str
    See Argument Reference above.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    See Argument Reference above.
    project_id str
    See Argument Reference above.
    region str
    share_id str
    The UUID of the source share that was used to create the snapshot.
    share_proto str
    The file system protocol of a share snapshot.
    share_size int
    The share snapshot size, in GBs.
    size int
    The snapshot size, in GBs.
    status str
    See Argument Reference above.
    description String
    See Argument Reference above.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    See Argument Reference above.
    projectId String
    See Argument Reference above.
    region String
    shareId String
    The UUID of the source share that was used to create the snapshot.
    shareProto String
    The file system protocol of a share snapshot.
    shareSize Number
    The share snapshot size, in GBs.
    size Number
    The snapshot size, in GBs.
    status String
    See Argument Reference above.

    Package Details

    Repository
    OpenStack pulumi/pulumi-openstack
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the openstack Terraform Provider.
    openstack logo
    OpenStack v4.0.0 published on Tuesday, May 21, 2024 by Pulumi