Google Cloud Native is in preview. Google Cloud Classic is fully supported.
google-native.file/v1.Snapshot
Explore with Pulumi AI
Google Cloud Native is in preview. Google Cloud Classic is fully supported.
Creates a snapshot. Auto-naming is currently not supported for this resource.
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_id: Optional[str] = None,
snapshot_id: Optional[str] = None,
description: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
location: 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: google-native:file/v1: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.
Constructor example
The following reference example uses placeholder values for all input properties.
var examplesnapshotResourceResourceFromFilev1 = new GoogleNative.File.V1.Snapshot("examplesnapshotResourceResourceFromFilev1", new()
{
InstanceId = "string",
SnapshotId = "string",
Description = "string",
Labels =
{
{ "string", "string" },
},
Location = "string",
Project = "string",
});
example, err := file.NewSnapshot(ctx, "examplesnapshotResourceResourceFromFilev1", &file.SnapshotArgs{
InstanceId: pulumi.String("string"),
SnapshotId: pulumi.String("string"),
Description: pulumi.String("string"),
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
Location: pulumi.String("string"),
Project: pulumi.String("string"),
})
var examplesnapshotResourceResourceFromFilev1 = new Snapshot("examplesnapshotResourceResourceFromFilev1", SnapshotArgs.builder()
.instanceId("string")
.snapshotId("string")
.description("string")
.labels(Map.of("string", "string"))
.location("string")
.project("string")
.build());
examplesnapshot_resource_resource_from_filev1 = google_native.file.v1.Snapshot("examplesnapshotResourceResourceFromFilev1",
instance_id="string",
snapshot_id="string",
description="string",
labels={
"string": "string",
},
location="string",
project="string")
const examplesnapshotResourceResourceFromFilev1 = new google_native.file.v1.Snapshot("examplesnapshotResourceResourceFromFilev1", {
instanceId: "string",
snapshotId: "string",
description: "string",
labels: {
string: "string",
},
location: "string",
project: "string",
});
type: google-native:file/v1:Snapshot
properties:
description: string
instanceId: string
labels:
string: string
location: string
project: string
snapshotId: 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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Snapshot resource accepts the following input properties:
- Instance
Id string - Snapshot
Id string - Required. The ID to use for the snapshot. The ID must be unique within the specified instance. This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
- 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.
- Location string
- Project string
- Instance
Id string - Snapshot
Id string - Required. The ID to use for the snapshot. The ID must be unique within the specified instance. This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
- 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.
- Location string
- Project string
- instance
Id String - snapshot
Id String - Required. The ID to use for the snapshot. The ID must be unique within the specified instance. This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
- 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.
- location String
- project String
- instance
Id string - snapshot
Id string - Required. The ID to use for the snapshot. The ID must be unique within the specified instance. This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
- 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.
- location string
- project string
- instance_
id str - snapshot_
id str - Required. The ID to use for the snapshot. The ID must be unique within the specified instance. This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
- 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.
- location str
- project str
- instance
Id String - snapshot
Id String - Required. The ID to use for the snapshot. The ID must be unique within the specified instance. This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
- 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.
- location String
- project String
Outputs
All input properties are implicitly available as output properties. Additionally, the Snapshot resource produces the following output properties:
- Create
Time string - The time when the snapshot was created.
- Filesystem
Used stringBytes - 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.
- Name string
- The resource name of the snapshot, in the format
projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapshots/{snapshot_id}
. - State string
- The snapshot state.
- Create
Time string - The time when the snapshot was created.
- Filesystem
Used stringBytes - 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.
- Name string
- The resource name of the snapshot, in the format
projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapshots/{snapshot_id}
. - State string
- The snapshot state.
- create
Time String - The time when the snapshot was created.
- filesystem
Used StringBytes - 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.
- name String
- The resource name of the snapshot, in the format
projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapshots/{snapshot_id}
. - state String
- The snapshot state.
- create
Time string - The time when the snapshot was created.
- filesystem
Used stringBytes - 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.
- name string
- The resource name of the snapshot, in the format
projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapshots/{snapshot_id}
. - state string
- The snapshot state.
- create_
time str - The time when the snapshot was created.
- filesystem_
used_ strbytes - 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.
- name str
- The resource name of the snapshot, in the format
projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapshots/{snapshot_id}
. - state str
- The snapshot state.
- create
Time String - The time when the snapshot was created.
- filesystem
Used StringBytes - 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.
- name String
- The resource name of the snapshot, in the format
projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapshots/{snapshot_id}
. - state String
- The snapshot state.
Package Details
- Repository
- Google Cloud Native pulumi/pulumi-google-native
- License
- Apache-2.0
Google Cloud Native is in preview. Google Cloud Classic is fully supported.