tencentcloud.CbsSnapshot
Explore with Pulumi AI
Provides a resource to create a CBS snapshot.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = new tencentcloud.CbsSnapshot("example", {
snapshotName: "tf-example",
storageId: "disk-alc1r5sw",
tags: {
createBy: "Terraform",
},
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.CbsSnapshot("example",
snapshot_name="tf-example",
storage_id="disk-alc1r5sw",
tags={
"createBy": "Terraform",
})
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := tencentcloud.NewCbsSnapshot(ctx, "example", &tencentcloud.CbsSnapshotArgs{
SnapshotName: pulumi.String("tf-example"),
StorageId: pulumi.String("disk-alc1r5sw"),
Tags: pulumi.StringMap{
"createBy": pulumi.String("Terraform"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var example = new Tencentcloud.CbsSnapshot("example", new()
{
SnapshotName = "tf-example",
StorageId = "disk-alc1r5sw",
Tags =
{
{ "createBy", "Terraform" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.CbsSnapshot;
import com.pulumi.tencentcloud.CbsSnapshotArgs;
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 example = new CbsSnapshot("example", CbsSnapshotArgs.builder()
.snapshotName("tf-example")
.storageId("disk-alc1r5sw")
.tags(Map.of("createBy", "Terraform"))
.build());
}
}
resources:
example:
type: tencentcloud:CbsSnapshot
properties:
snapshotName: tf-example
storageId: disk-alc1r5sw
tags:
createBy: Terraform
Create CbsSnapshot Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CbsSnapshot(name: string, args: CbsSnapshotArgs, opts?: CustomResourceOptions);
@overload
def CbsSnapshot(resource_name: str,
args: CbsSnapshotArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CbsSnapshot(resource_name: str,
opts: Optional[ResourceOptions] = None,
snapshot_name: Optional[str] = None,
storage_id: Optional[str] = None,
cbs_snapshot_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None)
func NewCbsSnapshot(ctx *Context, name string, args CbsSnapshotArgs, opts ...ResourceOption) (*CbsSnapshot, error)
public CbsSnapshot(string name, CbsSnapshotArgs args, CustomResourceOptions? opts = null)
public CbsSnapshot(String name, CbsSnapshotArgs args)
public CbsSnapshot(String name, CbsSnapshotArgs args, CustomResourceOptions options)
type: tencentcloud:CbsSnapshot
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 CbsSnapshotArgs
- 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 CbsSnapshotArgs
- 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 CbsSnapshotArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CbsSnapshotArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CbsSnapshotArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
CbsSnapshot 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 CbsSnapshot resource accepts the following input properties:
- Snapshot
Name string - Name of the snapshot.
- Storage
Id string - ID of the the CBS which this snapshot created from.
- Cbs
Snapshot stringId - ID of the resource.
- Dictionary<string, string>
- The available tags within this CBS Snapshot.
- Snapshot
Name string - Name of the snapshot.
- Storage
Id string - ID of the the CBS which this snapshot created from.
- Cbs
Snapshot stringId - ID of the resource.
- map[string]string
- The available tags within this CBS Snapshot.
- snapshot
Name String - Name of the snapshot.
- storage
Id String - ID of the the CBS which this snapshot created from.
- cbs
Snapshot StringId - ID of the resource.
- Map<String,String>
- The available tags within this CBS Snapshot.
- snapshot
Name string - Name of the snapshot.
- storage
Id string - ID of the the CBS which this snapshot created from.
- cbs
Snapshot stringId - ID of the resource.
- {[key: string]: string}
- The available tags within this CBS Snapshot.
- snapshot_
name str - Name of the snapshot.
- storage_
id str - ID of the the CBS which this snapshot created from.
- cbs_
snapshot_ strid - ID of the resource.
- Mapping[str, str]
- The available tags within this CBS Snapshot.
- snapshot
Name String - Name of the snapshot.
- storage
Id String - ID of the the CBS which this snapshot created from.
- cbs
Snapshot StringId - ID of the resource.
- Map<String>
- The available tags within this CBS Snapshot.
Outputs
All input properties are implicitly available as output properties. Additionally, the CbsSnapshot resource produces the following output properties:
- Create
Time string - Creation time of snapshot.
- Disk
Type string - Types of CBS which this snapshot created from.
- Id string
- The provider-assigned unique ID for this managed resource.
- Percent double
- Snapshot creation progress percentage. If the snapshot has created successfully, the constant value is 100.
- Snapshot
Status string - Status of the snapshot.
- Storage
Size double - Volume of storage which this snapshot created from.
- Create
Time string - Creation time of snapshot.
- Disk
Type string - Types of CBS which this snapshot created from.
- Id string
- The provider-assigned unique ID for this managed resource.
- Percent float64
- Snapshot creation progress percentage. If the snapshot has created successfully, the constant value is 100.
- Snapshot
Status string - Status of the snapshot.
- Storage
Size float64 - Volume of storage which this snapshot created from.
- create
Time String - Creation time of snapshot.
- disk
Type String - Types of CBS which this snapshot created from.
- id String
- The provider-assigned unique ID for this managed resource.
- percent Double
- Snapshot creation progress percentage. If the snapshot has created successfully, the constant value is 100.
- snapshot
Status String - Status of the snapshot.
- storage
Size Double - Volume of storage which this snapshot created from.
- create
Time string - Creation time of snapshot.
- disk
Type string - Types of CBS which this snapshot created from.
- id string
- The provider-assigned unique ID for this managed resource.
- percent number
- Snapshot creation progress percentage. If the snapshot has created successfully, the constant value is 100.
- snapshot
Status string - Status of the snapshot.
- storage
Size number - Volume of storage which this snapshot created from.
- create_
time str - Creation time of snapshot.
- disk_
type str - Types of CBS which this snapshot created from.
- id str
- The provider-assigned unique ID for this managed resource.
- percent float
- Snapshot creation progress percentage. If the snapshot has created successfully, the constant value is 100.
- snapshot_
status str - Status of the snapshot.
- storage_
size float - Volume of storage which this snapshot created from.
- create
Time String - Creation time of snapshot.
- disk
Type String - Types of CBS which this snapshot created from.
- id String
- The provider-assigned unique ID for this managed resource.
- percent Number
- Snapshot creation progress percentage. If the snapshot has created successfully, the constant value is 100.
- snapshot
Status String - Status of the snapshot.
- storage
Size Number - Volume of storage which this snapshot created from.
Look up Existing CbsSnapshot Resource
Get an existing CbsSnapshot 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?: CbsSnapshotState, opts?: CustomResourceOptions): CbsSnapshot
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cbs_snapshot_id: Optional[str] = None,
create_time: Optional[str] = None,
disk_type: Optional[str] = None,
percent: Optional[float] = None,
snapshot_name: Optional[str] = None,
snapshot_status: Optional[str] = None,
storage_id: Optional[str] = None,
storage_size: Optional[float] = None,
tags: Optional[Mapping[str, str]] = None) -> CbsSnapshot
func GetCbsSnapshot(ctx *Context, name string, id IDInput, state *CbsSnapshotState, opts ...ResourceOption) (*CbsSnapshot, error)
public static CbsSnapshot Get(string name, Input<string> id, CbsSnapshotState? state, CustomResourceOptions? opts = null)
public static CbsSnapshot get(String name, Output<String> id, CbsSnapshotState state, CustomResourceOptions options)
resources: _: type: tencentcloud:CbsSnapshot get: id: ${id}
- 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.
- Cbs
Snapshot stringId - ID of the resource.
- Create
Time string - Creation time of snapshot.
- Disk
Type string - Types of CBS which this snapshot created from.
- Percent double
- Snapshot creation progress percentage. If the snapshot has created successfully, the constant value is 100.
- Snapshot
Name string - Name of the snapshot.
- Snapshot
Status string - Status of the snapshot.
- Storage
Id string - ID of the the CBS which this snapshot created from.
- Storage
Size double - Volume of storage which this snapshot created from.
- Dictionary<string, string>
- The available tags within this CBS Snapshot.
- Cbs
Snapshot stringId - ID of the resource.
- Create
Time string - Creation time of snapshot.
- Disk
Type string - Types of CBS which this snapshot created from.
- Percent float64
- Snapshot creation progress percentage. If the snapshot has created successfully, the constant value is 100.
- Snapshot
Name string - Name of the snapshot.
- Snapshot
Status string - Status of the snapshot.
- Storage
Id string - ID of the the CBS which this snapshot created from.
- Storage
Size float64 - Volume of storage which this snapshot created from.
- map[string]string
- The available tags within this CBS Snapshot.
- cbs
Snapshot StringId - ID of the resource.
- create
Time String - Creation time of snapshot.
- disk
Type String - Types of CBS which this snapshot created from.
- percent Double
- Snapshot creation progress percentage. If the snapshot has created successfully, the constant value is 100.
- snapshot
Name String - Name of the snapshot.
- snapshot
Status String - Status of the snapshot.
- storage
Id String - ID of the the CBS which this snapshot created from.
- storage
Size Double - Volume of storage which this snapshot created from.
- Map<String,String>
- The available tags within this CBS Snapshot.
- cbs
Snapshot stringId - ID of the resource.
- create
Time string - Creation time of snapshot.
- disk
Type string - Types of CBS which this snapshot created from.
- percent number
- Snapshot creation progress percentage. If the snapshot has created successfully, the constant value is 100.
- snapshot
Name string - Name of the snapshot.
- snapshot
Status string - Status of the snapshot.
- storage
Id string - ID of the the CBS which this snapshot created from.
- storage
Size number - Volume of storage which this snapshot created from.
- {[key: string]: string}
- The available tags within this CBS Snapshot.
- cbs_
snapshot_ strid - ID of the resource.
- create_
time str - Creation time of snapshot.
- disk_
type str - Types of CBS which this snapshot created from.
- percent float
- Snapshot creation progress percentage. If the snapshot has created successfully, the constant value is 100.
- snapshot_
name str - Name of the snapshot.
- snapshot_
status str - Status of the snapshot.
- storage_
id str - ID of the the CBS which this snapshot created from.
- storage_
size float - Volume of storage which this snapshot created from.
- Mapping[str, str]
- The available tags within this CBS Snapshot.
- cbs
Snapshot StringId - ID of the resource.
- create
Time String - Creation time of snapshot.
- disk
Type String - Types of CBS which this snapshot created from.
- percent Number
- Snapshot creation progress percentage. If the snapshot has created successfully, the constant value is 100.
- snapshot
Name String - Name of the snapshot.
- snapshot
Status String - Status of the snapshot.
- storage
Id String - ID of the the CBS which this snapshot created from.
- storage
Size Number - Volume of storage which this snapshot created from.
- Map<String>
- The available tags within this CBS Snapshot.
Import
CBS snapshot can be imported using the id, e.g.
$ pulumi import tencentcloud:index/cbsSnapshot:CbsSnapshot example snap-3sa3f39b
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.