1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. filestore
  5. Snapshot
Google Cloud Classic v7.20.0 published on Wednesday, Apr 24, 2024 by Pulumi

gcp.filestore.Snapshot

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.20.0 published on Wednesday, Apr 24, 2024 by Pulumi

    A Google Cloud Filestore snapshot.

    To get more information about Snapshot, see:

    Example Usage

    Filestore Snapshot Basic

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const instance = new gcp.filestore.Instance("instance", {
        name: "test-instance-for-snapshot",
        location: "us-east1",
        tier: "ENTERPRISE",
        fileShares: {
            capacityGb: 1024,
            name: "share1",
        },
        networks: [{
            network: "default",
            modes: ["MODE_IPV4"],
        }],
    });
    const snapshot = new gcp.filestore.Snapshot("snapshot", {
        name: "test-snapshot",
        instance: instance.name,
        location: "us-east1",
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    instance = gcp.filestore.Instance("instance",
        name="test-instance-for-snapshot",
        location="us-east1",
        tier="ENTERPRISE",
        file_shares=gcp.filestore.InstanceFileSharesArgs(
            capacity_gb=1024,
            name="share1",
        ),
        networks=[gcp.filestore.InstanceNetworkArgs(
            network="default",
            modes=["MODE_IPV4"],
        )])
    snapshot = gcp.filestore.Snapshot("snapshot",
        name="test-snapshot",
        instance=instance.name,
        location="us-east1")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/filestore"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		instance, err := filestore.NewInstance(ctx, "instance", &filestore.InstanceArgs{
    			Name:     pulumi.String("test-instance-for-snapshot"),
    			Location: pulumi.String("us-east1"),
    			Tier:     pulumi.String("ENTERPRISE"),
    			FileShares: &filestore.InstanceFileSharesArgs{
    				CapacityGb: pulumi.Int(1024),
    				Name:       pulumi.String("share1"),
    			},
    			Networks: filestore.InstanceNetworkArray{
    				&filestore.InstanceNetworkArgs{
    					Network: pulumi.String("default"),
    					Modes: pulumi.StringArray{
    						pulumi.String("MODE_IPV4"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = filestore.NewSnapshot(ctx, "snapshot", &filestore.SnapshotArgs{
    			Name:     pulumi.String("test-snapshot"),
    			Instance: instance.Name,
    			Location: pulumi.String("us-east1"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var instance = new Gcp.Filestore.Instance("instance", new()
        {
            Name = "test-instance-for-snapshot",
            Location = "us-east1",
            Tier = "ENTERPRISE",
            FileShares = new Gcp.Filestore.Inputs.InstanceFileSharesArgs
            {
                CapacityGb = 1024,
                Name = "share1",
            },
            Networks = new[]
            {
                new Gcp.Filestore.Inputs.InstanceNetworkArgs
                {
                    Network = "default",
                    Modes = new[]
                    {
                        "MODE_IPV4",
                    },
                },
            },
        });
    
        var snapshot = new Gcp.Filestore.Snapshot("snapshot", new()
        {
            Name = "test-snapshot",
            Instance = instance.Name,
            Location = "us-east1",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.filestore.Instance;
    import com.pulumi.gcp.filestore.InstanceArgs;
    import com.pulumi.gcp.filestore.inputs.InstanceFileSharesArgs;
    import com.pulumi.gcp.filestore.inputs.InstanceNetworkArgs;
    import com.pulumi.gcp.filestore.Snapshot;
    import com.pulumi.gcp.filestore.SnapshotArgs;
    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) {
            var instance = new Instance("instance", InstanceArgs.builder()        
                .name("test-instance-for-snapshot")
                .location("us-east1")
                .tier("ENTERPRISE")
                .fileShares(InstanceFileSharesArgs.builder()
                    .capacityGb(1024)
                    .name("share1")
                    .build())
                .networks(InstanceNetworkArgs.builder()
                    .network("default")
                    .modes("MODE_IPV4")
                    .build())
                .build());
    
            var snapshot = new Snapshot("snapshot", SnapshotArgs.builder()        
                .name("test-snapshot")
                .instance(instance.name())
                .location("us-east1")
                .build());
    
        }
    }
    
    resources:
      snapshot:
        type: gcp:filestore:Snapshot
        properties:
          name: test-snapshot
          instance: ${instance.name}
          location: us-east1
      instance:
        type: gcp:filestore:Instance
        properties:
          name: test-instance-for-snapshot
          location: us-east1
          tier: ENTERPRISE
          fileShares:
            capacityGb: 1024
            name: share1
          networks:
            - network: default
              modes:
                - MODE_IPV4
    

    Filestore Snapshot Full

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const instance = new gcp.filestore.Instance("instance", {
        name: "test-instance-for-snapshot",
        location: "us-west1",
        tier: "ENTERPRISE",
        fileShares: {
            capacityGb: 1024,
            name: "share1",
        },
        networks: [{
            network: "default",
            modes: ["MODE_IPV4"],
        }],
    });
    const snapshot = new gcp.filestore.Snapshot("snapshot", {
        name: "test-snapshot",
        instance: instance.name,
        location: "us-west1",
        description: "Snapshot of test-instance-for-snapshot",
        labels: {
            my_label: "value",
        },
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    instance = gcp.filestore.Instance("instance",
        name="test-instance-for-snapshot",
        location="us-west1",
        tier="ENTERPRISE",
        file_shares=gcp.filestore.InstanceFileSharesArgs(
            capacity_gb=1024,
            name="share1",
        ),
        networks=[gcp.filestore.InstanceNetworkArgs(
            network="default",
            modes=["MODE_IPV4"],
        )])
    snapshot = gcp.filestore.Snapshot("snapshot",
        name="test-snapshot",
        instance=instance.name,
        location="us-west1",
        description="Snapshot of test-instance-for-snapshot",
        labels={
            "my_label": "value",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/filestore"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		instance, err := filestore.NewInstance(ctx, "instance", &filestore.InstanceArgs{
    			Name:     pulumi.String("test-instance-for-snapshot"),
    			Location: pulumi.String("us-west1"),
    			Tier:     pulumi.String("ENTERPRISE"),
    			FileShares: &filestore.InstanceFileSharesArgs{
    				CapacityGb: pulumi.Int(1024),
    				Name:       pulumi.String("share1"),
    			},
    			Networks: filestore.InstanceNetworkArray{
    				&filestore.InstanceNetworkArgs{
    					Network: pulumi.String("default"),
    					Modes: pulumi.StringArray{
    						pulumi.String("MODE_IPV4"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = filestore.NewSnapshot(ctx, "snapshot", &filestore.SnapshotArgs{
    			Name:        pulumi.String("test-snapshot"),
    			Instance:    instance.Name,
    			Location:    pulumi.String("us-west1"),
    			Description: pulumi.String("Snapshot of test-instance-for-snapshot"),
    			Labels: pulumi.StringMap{
    				"my_label": pulumi.String("value"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var instance = new Gcp.Filestore.Instance("instance", new()
        {
            Name = "test-instance-for-snapshot",
            Location = "us-west1",
            Tier = "ENTERPRISE",
            FileShares = new Gcp.Filestore.Inputs.InstanceFileSharesArgs
            {
                CapacityGb = 1024,
                Name = "share1",
            },
            Networks = new[]
            {
                new Gcp.Filestore.Inputs.InstanceNetworkArgs
                {
                    Network = "default",
                    Modes = new[]
                    {
                        "MODE_IPV4",
                    },
                },
            },
        });
    
        var snapshot = new Gcp.Filestore.Snapshot("snapshot", new()
        {
            Name = "test-snapshot",
            Instance = instance.Name,
            Location = "us-west1",
            Description = "Snapshot of test-instance-for-snapshot",
            Labels = 
            {
                { "my_label", "value" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.filestore.Instance;
    import com.pulumi.gcp.filestore.InstanceArgs;
    import com.pulumi.gcp.filestore.inputs.InstanceFileSharesArgs;
    import com.pulumi.gcp.filestore.inputs.InstanceNetworkArgs;
    import com.pulumi.gcp.filestore.Snapshot;
    import com.pulumi.gcp.filestore.SnapshotArgs;
    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) {
            var instance = new Instance("instance", InstanceArgs.builder()        
                .name("test-instance-for-snapshot")
                .location("us-west1")
                .tier("ENTERPRISE")
                .fileShares(InstanceFileSharesArgs.builder()
                    .capacityGb(1024)
                    .name("share1")
                    .build())
                .networks(InstanceNetworkArgs.builder()
                    .network("default")
                    .modes("MODE_IPV4")
                    .build())
                .build());
    
            var snapshot = new Snapshot("snapshot", SnapshotArgs.builder()        
                .name("test-snapshot")
                .instance(instance.name())
                .location("us-west1")
                .description("Snapshot of test-instance-for-snapshot")
                .labels(Map.of("my_label", "value"))
                .build());
    
        }
    }
    
    resources:
      snapshot:
        type: gcp:filestore:Snapshot
        properties:
          name: test-snapshot
          instance: ${instance.name}
          location: us-west1
          description: Snapshot of test-instance-for-snapshot
          labels:
            my_label: value
      instance:
        type: gcp:filestore:Instance
        properties:
          name: test-instance-for-snapshot
          location: us-west1
          tier: ENTERPRISE
          fileShares:
            capacityGb: 1024
            name: share1
          networks:
            - network: default
              modes:
                - MODE_IPV4
    

    Create Snapshot Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Snapshot(name: string, args: SnapshotArgs, opts?: CustomResourceOptions);
    @overload
    def Snapshot(resource_name: str,
                 args: SnapshotArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def Snapshot(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 instance: Optional[str] = None,
                 location: Optional[str] = None,
                 description: Optional[str] = None,
                 labels: Optional[Mapping[str, str]] = None,
                 name: Optional[str] = None,
                 project: Optional[str] = None)
    func NewSnapshot(ctx *Context, name string, args SnapshotArgs, opts ...ResourceOption) (*Snapshot, error)
    public Snapshot(string name, SnapshotArgs args, CustomResourceOptions? opts = null)
    public Snapshot(String name, SnapshotArgs args)
    public Snapshot(String name, SnapshotArgs args, CustomResourceOptions options)
    
    type: gcp:filestore:Snapshot
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args SnapshotArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args SnapshotArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args SnapshotArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SnapshotArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SnapshotArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var gcpSnapshotResource = new Gcp.Filestore.Snapshot("gcpSnapshotResource", new()
    {
        Instance = "string",
        Location = "string",
        Description = "string",
        Labels = 
        {
            { "string", "string" },
        },
        Name = "string",
        Project = "string",
    });
    
    example, err := filestore.NewSnapshot(ctx, "gcpSnapshotResource", &filestore.SnapshotArgs{
    	Instance:    pulumi.String("string"),
    	Location:    pulumi.String("string"),
    	Description: pulumi.String("string"),
    	Labels: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Name:    pulumi.String("string"),
    	Project: pulumi.String("string"),
    })
    
    var gcpSnapshotResource = new Snapshot("gcpSnapshotResource", SnapshotArgs.builder()        
        .instance("string")
        .location("string")
        .description("string")
        .labels(Map.of("string", "string"))
        .name("string")
        .project("string")
        .build());
    
    gcp_snapshot_resource = gcp.filestore.Snapshot("gcpSnapshotResource",
        instance="string",
        location="string",
        description="string",
        labels={
            "string": "string",
        },
        name="string",
        project="string")
    
    const gcpSnapshotResource = new gcp.filestore.Snapshot("gcpSnapshotResource", {
        instance: "string",
        location: "string",
        description: "string",
        labels: {
            string: "string",
        },
        name: "string",
        project: "string",
    });
    
    type: gcp:filestore:Snapshot
    properties:
        description: string
        instance: string
        labels:
            string: string
        location: string
        name: string
        project: string
    

    Snapshot Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Snapshot resource accepts the following input properties:

    Instance string
    The resource name of the filestore instance.


    Location string
    The name of the location of the instance. This can be a region for ENTERPRISE tier instances.
    Description string
    A description of the snapshot with 2048 characters or less. Requests with longer descriptions will be rejected.
    Labels Dictionary<string, string>

    Resource labels to represent user-provided metadata.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.

    Name string
    The resource name of the snapshot. The name must be unique within the specified instance. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    Instance string
    The resource name of the filestore instance.


    Location string
    The name of the location of the instance. This can be a region for ENTERPRISE tier instances.
    Description string
    A description of the snapshot with 2048 characters or less. Requests with longer descriptions will be rejected.
    Labels map[string]string

    Resource labels to represent user-provided metadata.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.

    Name string
    The resource name of the snapshot. The name must be unique within the specified instance. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    instance String
    The resource name of the filestore instance.


    location String
    The name of the location of the instance. This can be a region for ENTERPRISE tier instances.
    description String
    A description of the snapshot with 2048 characters or less. Requests with longer descriptions will be rejected.
    labels Map<String,String>

    Resource labels to represent user-provided metadata.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.

    name String
    The resource name of the snapshot. The name must be unique within the specified instance. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    instance string
    The resource name of the filestore instance.


    location string
    The name of the location of the instance. This can be a region for ENTERPRISE tier instances.
    description string
    A description of the snapshot with 2048 characters or less. Requests with longer descriptions will be rejected.
    labels {[key: string]: string}

    Resource labels to represent user-provided metadata.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.

    name string
    The resource name of the snapshot. The name must be unique within the specified instance. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    instance str
    The resource name of the filestore instance.


    location str
    The name of the location of the instance. This can be a region for ENTERPRISE tier instances.
    description str
    A description of the snapshot with 2048 characters or less. Requests with longer descriptions will be rejected.
    labels Mapping[str, str]

    Resource labels to represent user-provided metadata.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.

    name str
    The resource name of the snapshot. The name must be unique within the specified instance. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    instance String
    The resource name of the filestore instance.


    location String
    The name of the location of the instance. This can be a region for ENTERPRISE tier instances.
    description String
    A description of the snapshot with 2048 characters or less. Requests with longer descriptions will be rejected.
    labels Map<String>

    Resource labels to represent user-provided metadata.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.

    name String
    The resource name of the snapshot. The name must be unique within the specified instance. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Snapshot resource produces the following output properties:

    CreateTime string
    The time when the snapshot was created in RFC3339 text format.
    EffectiveLabels Dictionary<string, string>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    FilesystemUsedBytes string
    The amount of bytes needed to allocate a full copy of the snapshot content.
    Id string
    The provider-assigned unique ID for this managed resource.
    PulumiLabels Dictionary<string, string>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    State string
    The snapshot state.
    CreateTime string
    The time when the snapshot was created in RFC3339 text format.
    EffectiveLabels map[string]string
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    FilesystemUsedBytes string
    The amount of bytes needed to allocate a full copy of the snapshot content.
    Id string
    The provider-assigned unique ID for this managed resource.
    PulumiLabels map[string]string
    The combination of labels configured directly on the resource and default labels configured on the provider.
    State string
    The snapshot state.
    createTime String
    The time when the snapshot was created in RFC3339 text format.
    effectiveLabels Map<String,String>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    filesystemUsedBytes String
    The amount of bytes needed to allocate a full copy of the snapshot content.
    id String
    The provider-assigned unique ID for this managed resource.
    pulumiLabels Map<String,String>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    state String
    The snapshot state.
    createTime string
    The time when the snapshot was created in RFC3339 text format.
    effectiveLabels {[key: string]: string}
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    filesystemUsedBytes string
    The amount of bytes needed to allocate a full copy of the snapshot content.
    id string
    The provider-assigned unique ID for this managed resource.
    pulumiLabels {[key: string]: string}
    The combination of labels configured directly on the resource and default labels configured on the provider.
    state string
    The snapshot state.
    create_time str
    The time when the snapshot was created in RFC3339 text format.
    effective_labels Mapping[str, str]
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    filesystem_used_bytes str
    The amount of bytes needed to allocate a full copy of the snapshot content.
    id str
    The provider-assigned unique ID for this managed resource.
    pulumi_labels Mapping[str, str]
    The combination of labels configured directly on the resource and default labels configured on the provider.
    state str
    The snapshot state.
    createTime String
    The time when the snapshot was created in RFC3339 text format.
    effectiveLabels Map<String>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    filesystemUsedBytes String
    The amount of bytes needed to allocate a full copy of the snapshot content.
    id String
    The provider-assigned unique ID for this managed resource.
    pulumiLabels Map<String>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    state String
    The snapshot state.

    Look up Existing Snapshot Resource

    Get an existing Snapshot resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: SnapshotState, opts?: CustomResourceOptions): Snapshot
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            create_time: Optional[str] = None,
            description: Optional[str] = None,
            effective_labels: Optional[Mapping[str, str]] = None,
            filesystem_used_bytes: Optional[str] = None,
            instance: Optional[str] = None,
            labels: Optional[Mapping[str, str]] = None,
            location: Optional[str] = None,
            name: Optional[str] = None,
            project: Optional[str] = None,
            pulumi_labels: Optional[Mapping[str, str]] = None,
            state: Optional[str] = None) -> Snapshot
    func GetSnapshot(ctx *Context, name string, id IDInput, state *SnapshotState, opts ...ResourceOption) (*Snapshot, error)
    public static Snapshot Get(string name, Input<string> id, SnapshotState? state, CustomResourceOptions? opts = null)
    public static Snapshot get(String name, Output<String> id, SnapshotState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    CreateTime string
    The time when the snapshot was created in RFC3339 text format.
    Description string
    A description of the snapshot with 2048 characters or less. Requests with longer descriptions will be rejected.
    EffectiveLabels Dictionary<string, string>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    FilesystemUsedBytes string
    The amount of bytes needed to allocate a full copy of the snapshot content.
    Instance string
    The resource name of the filestore instance.


    Labels Dictionary<string, string>

    Resource labels to represent user-provided metadata.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.

    Location string
    The name of the location of the instance. This can be a region for ENTERPRISE tier instances.
    Name string
    The resource name of the snapshot. The name must be unique within the specified instance. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    PulumiLabels Dictionary<string, string>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    State string
    The snapshot state.
    CreateTime string
    The time when the snapshot was created in RFC3339 text format.
    Description string
    A description of the snapshot with 2048 characters or less. Requests with longer descriptions will be rejected.
    EffectiveLabels map[string]string
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    FilesystemUsedBytes string
    The amount of bytes needed to allocate a full copy of the snapshot content.
    Instance string
    The resource name of the filestore instance.


    Labels map[string]string

    Resource labels to represent user-provided metadata.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.

    Location string
    The name of the location of the instance. This can be a region for ENTERPRISE tier instances.
    Name string
    The resource name of the snapshot. The name must be unique within the specified instance. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    PulumiLabels map[string]string
    The combination of labels configured directly on the resource and default labels configured on the provider.
    State string
    The snapshot state.
    createTime String
    The time when the snapshot was created in RFC3339 text format.
    description String
    A description of the snapshot with 2048 characters or less. Requests with longer descriptions will be rejected.
    effectiveLabels Map<String,String>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    filesystemUsedBytes String
    The amount of bytes needed to allocate a full copy of the snapshot content.
    instance String
    The resource name of the filestore instance.


    labels Map<String,String>

    Resource labels to represent user-provided metadata.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.

    location String
    The name of the location of the instance. This can be a region for ENTERPRISE tier instances.
    name String
    The resource name of the snapshot. The name must be unique within the specified instance. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    pulumiLabels Map<String,String>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    state String
    The snapshot state.
    createTime string
    The time when the snapshot was created in RFC3339 text format.
    description string
    A description of the snapshot with 2048 characters or less. Requests with longer descriptions will be rejected.
    effectiveLabels {[key: string]: string}
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    filesystemUsedBytes string
    The amount of bytes needed to allocate a full copy of the snapshot content.
    instance string
    The resource name of the filestore instance.


    labels {[key: string]: string}

    Resource labels to represent user-provided metadata.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.

    location string
    The name of the location of the instance. This can be a region for ENTERPRISE tier instances.
    name string
    The resource name of the snapshot. The name must be unique within the specified instance. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    pulumiLabels {[key: string]: string}
    The combination of labels configured directly on the resource and default labels configured on the provider.
    state string
    The snapshot state.
    create_time str
    The time when the snapshot was created in RFC3339 text format.
    description str
    A description of the snapshot with 2048 characters or less. Requests with longer descriptions will be rejected.
    effective_labels Mapping[str, str]
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    filesystem_used_bytes str
    The amount of bytes needed to allocate a full copy of the snapshot content.
    instance str
    The resource name of the filestore instance.


    labels Mapping[str, str]

    Resource labels to represent user-provided metadata.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.

    location str
    The name of the location of the instance. This can be a region for ENTERPRISE tier instances.
    name str
    The resource name of the snapshot. The name must be unique within the specified instance. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    pulumi_labels Mapping[str, str]
    The combination of labels configured directly on the resource and default labels configured on the provider.
    state str
    The snapshot state.
    createTime String
    The time when the snapshot was created in RFC3339 text format.
    description String
    A description of the snapshot with 2048 characters or less. Requests with longer descriptions will be rejected.
    effectiveLabels Map<String>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    filesystemUsedBytes String
    The amount of bytes needed to allocate a full copy of the snapshot content.
    instance String
    The resource name of the filestore instance.


    labels Map<String>

    Resource labels to represent user-provided metadata.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.

    location String
    The name of the location of the instance. This can be a region for ENTERPRISE tier instances.
    name String
    The resource name of the snapshot. The name must be unique within the specified instance. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    pulumiLabels Map<String>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    state String
    The snapshot state.

    Import

    Snapshot can be imported using any of these accepted formats:

    • projects/{{project}}/locations/{{location}}/instances/{{instance}}/snapshots/{{name}}

    • {{project}}/{{location}}/{{instance}}/{{name}}

    • {{location}}/{{instance}}/{{name}}

    When using the pulumi import command, Snapshot can be imported using one of the formats above. For example:

    $ pulumi import gcp:filestore/snapshot:Snapshot default projects/{{project}}/locations/{{location}}/instances/{{instance}}/snapshots/{{name}}
    
    $ pulumi import gcp:filestore/snapshot:Snapshot default {{project}}/{{location}}/{{instance}}/{{name}}
    
    $ pulumi import gcp:filestore/snapshot:Snapshot default {{location}}/{{instance}}/{{name}}
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Google Cloud (GCP) Classic pulumi/pulumi-gcp
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the google-beta Terraform Provider.
    gcp logo
    Google Cloud Classic v7.20.0 published on Wednesday, Apr 24, 2024 by Pulumi