Snapshot

class Snapshot : KotlinCustomResource

A Google Cloud Filestore snapshot. To get more information about Snapshot, see:

Example Usage

Filestore Snapshot Basic

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()
.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()
.instance(instance.name())
.location("us-east1")
.build());
}
}

Filestore Snapshot Full

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()
.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()
.instance(instance.name())
.location("us-west1")
.description("Snapshot of test-instance-for-snapshot")
.labels(Map.of("my_label", "value"))
.build());
}
}

Import

Snapshot can be imported using any of these accepted formats

$ 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}}

Properties

Link copied to clipboard
val createTime: Output<String>

The time when the snapshot was created in RFC3339 text format.

Link copied to clipboard
val description: Output<String>?

A description of the snapshot with 2048 characters or less. Requests with longer descriptions will be rejected.

Link copied to clipboard

The amount of bytes needed to allocate a full copy of the snapshot content.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val instance: Output<String>

The resource name of the filestore instance.

Link copied to clipboard
val labels: Output<Map<String, String>>?

Resource labels to represent user-provided metadata.

Link copied to clipboard
val location: Output<String>

The name of the location of the instance. This can be a region for ENTERPRISE tier instances.

Link copied to clipboard
val name: Output<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.

Link copied to clipboard
val project: Output<String>

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val state: Output<String>

The snapshot state.

Link copied to clipboard
val urn: Output<String>