1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. getCbsSnapshots
tencentcloud 1.81.183 published on Wednesday, Apr 16, 2025 by tencentcloudstack

tencentcloud.getCbsSnapshots

Explore with Pulumi AI

Use this data source to query detailed information of CBS snapshots.

Example Usage

Query all snapshots

import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";

const snapshots = tencentcloud.getCbsSnapshots({});
Copy
import pulumi
import pulumi_tencentcloud as tencentcloud

snapshots = tencentcloud.get_cbs_snapshots()
Copy
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.GetCbsSnapshots(ctx, &tencentcloud.GetCbsSnapshotsArgs{}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;

return await Deployment.RunAsync(() => 
{
    var snapshots = Tencentcloud.GetCbsSnapshots.Invoke();

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.TencentcloudFunctions;
import com.pulumi.tencentcloud.inputs.GetCbsSnapshotsArgs;
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 snapshots = TencentcloudFunctions.getCbsSnapshots();

    }
}
Copy
variables:
  snapshots:
    fn::invoke:
      function: tencentcloud:getCbsSnapshots
      arguments: {}
Copy

Query snapshots by filters

import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";

const snapshots = tencentcloud.getCbsSnapshots({
    availabilityZone: "ap-guangzhou-4",
});
Copy
import pulumi
import pulumi_tencentcloud as tencentcloud

snapshots = tencentcloud.get_cbs_snapshots(availability_zone="ap-guangzhou-4")
Copy
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.GetCbsSnapshots(ctx, &tencentcloud.GetCbsSnapshotsArgs{
			AvailabilityZone: pulumi.StringRef("ap-guangzhou-4"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;

return await Deployment.RunAsync(() => 
{
    var snapshots = Tencentcloud.GetCbsSnapshots.Invoke(new()
    {
        AvailabilityZone = "ap-guangzhou-4",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.TencentcloudFunctions;
import com.pulumi.tencentcloud.inputs.GetCbsSnapshotsArgs;
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 snapshots = TencentcloudFunctions.getCbsSnapshots(GetCbsSnapshotsArgs.builder()
            .availabilityZone("ap-guangzhou-4")
            .build());

    }
}
Copy
variables:
  snapshots:
    fn::invoke:
      function: tencentcloud:getCbsSnapshots
      arguments:
        availabilityZone: ap-guangzhou-4
Copy

Using getCbsSnapshots

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 getCbsSnapshots(args: GetCbsSnapshotsArgs, opts?: InvokeOptions): Promise<GetCbsSnapshotsResult>
function getCbsSnapshotsOutput(args: GetCbsSnapshotsOutputArgs, opts?: InvokeOptions): Output<GetCbsSnapshotsResult>
Copy
def get_cbs_snapshots(availability_zone: Optional[str] = None,
                      id: Optional[str] = None,
                      project_id: Optional[str] = None,
                      result_output_file: Optional[str] = None,
                      snapshot_id: Optional[str] = None,
                      snapshot_name: Optional[str] = None,
                      storage_id: Optional[str] = None,
                      storage_usage: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetCbsSnapshotsResult
def get_cbs_snapshots_output(availability_zone: Optional[pulumi.Input[str]] = None,
                      id: Optional[pulumi.Input[str]] = None,
                      project_id: Optional[pulumi.Input[str]] = None,
                      result_output_file: Optional[pulumi.Input[str]] = None,
                      snapshot_id: Optional[pulumi.Input[str]] = None,
                      snapshot_name: Optional[pulumi.Input[str]] = None,
                      storage_id: Optional[pulumi.Input[str]] = None,
                      storage_usage: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetCbsSnapshotsResult]
Copy
func GetCbsSnapshots(ctx *Context, args *GetCbsSnapshotsArgs, opts ...InvokeOption) (*GetCbsSnapshotsResult, error)
func GetCbsSnapshotsOutput(ctx *Context, args *GetCbsSnapshotsOutputArgs, opts ...InvokeOption) GetCbsSnapshotsResultOutput
Copy

> Note: This function is named GetCbsSnapshots in the Go SDK.

public static class GetCbsSnapshots 
{
    public static Task<GetCbsSnapshotsResult> InvokeAsync(GetCbsSnapshotsArgs args, InvokeOptions? opts = null)
    public static Output<GetCbsSnapshotsResult> Invoke(GetCbsSnapshotsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetCbsSnapshotsResult> getCbsSnapshots(GetCbsSnapshotsArgs args, InvokeOptions options)
public static Output<GetCbsSnapshotsResult> getCbsSnapshots(GetCbsSnapshotsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: tencentcloud:index/getCbsSnapshots:getCbsSnapshots
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

AvailabilityZone string
The available zone that the CBS instance locates at.
Id string
ProjectId string
ID of the project within the snapshot.
ResultOutputFile string
Used to save results.
SnapshotId string
ID of the snapshot to be queried.
SnapshotName string
Name of the snapshot to be queried.
StorageId string
ID of the the CBS which this snapshot created from.
StorageUsage string
Types of CBS which this snapshot created from, and available values include SYSTEM_DISK and DATA_DISK.
AvailabilityZone string
The available zone that the CBS instance locates at.
Id string
ProjectId string
ID of the project within the snapshot.
ResultOutputFile string
Used to save results.
SnapshotId string
ID of the snapshot to be queried.
SnapshotName string
Name of the snapshot to be queried.
StorageId string
ID of the the CBS which this snapshot created from.
StorageUsage string
Types of CBS which this snapshot created from, and available values include SYSTEM_DISK and DATA_DISK.
availabilityZone String
The available zone that the CBS instance locates at.
id String
projectId String
ID of the project within the snapshot.
resultOutputFile String
Used to save results.
snapshotId String
ID of the snapshot to be queried.
snapshotName String
Name of the snapshot to be queried.
storageId String
ID of the the CBS which this snapshot created from.
storageUsage String
Types of CBS which this snapshot created from, and available values include SYSTEM_DISK and DATA_DISK.
availabilityZone string
The available zone that the CBS instance locates at.
id string
projectId string
ID of the project within the snapshot.
resultOutputFile string
Used to save results.
snapshotId string
ID of the snapshot to be queried.
snapshotName string
Name of the snapshot to be queried.
storageId string
ID of the the CBS which this snapshot created from.
storageUsage string
Types of CBS which this snapshot created from, and available values include SYSTEM_DISK and DATA_DISK.
availability_zone str
The available zone that the CBS instance locates at.
id str
project_id str
ID of the project within the snapshot.
result_output_file str
Used to save results.
snapshot_id str
ID of the snapshot to be queried.
snapshot_name str
Name of the snapshot to be queried.
storage_id str
ID of the the CBS which this snapshot created from.
storage_usage str
Types of CBS which this snapshot created from, and available values include SYSTEM_DISK and DATA_DISK.
availabilityZone String
The available zone that the CBS instance locates at.
id String
projectId String
ID of the project within the snapshot.
resultOutputFile String
Used to save results.
snapshotId String
ID of the snapshot to be queried.
snapshotName String
Name of the snapshot to be queried.
storageId String
ID of the the CBS which this snapshot created from.
storageUsage String
Types of CBS which this snapshot created from, and available values include SYSTEM_DISK and DATA_DISK.

getCbsSnapshots Result

The following output properties are available:

Id string
SnapshotLists List<GetCbsSnapshotsSnapshotList>
A list of snapshot. Each element contains the following attributes:
AvailabilityZone string
The available zone that the CBS instance locates at.
ProjectId string
ID of the project within the snapshot.
ResultOutputFile string
SnapshotId string
ID of the snapshot.
SnapshotName string
Name of the snapshot.
StorageId string
ID of the the CBS which this snapshot created from.
StorageUsage string
Types of CBS which this snapshot created from.
Id string
SnapshotLists []GetCbsSnapshotsSnapshotList
A list of snapshot. Each element contains the following attributes:
AvailabilityZone string
The available zone that the CBS instance locates at.
ProjectId string
ID of the project within the snapshot.
ResultOutputFile string
SnapshotId string
ID of the snapshot.
SnapshotName string
Name of the snapshot.
StorageId string
ID of the the CBS which this snapshot created from.
StorageUsage string
Types of CBS which this snapshot created from.
id String
snapshotLists List<GetCbsSnapshotsSnapshotList>
A list of snapshot. Each element contains the following attributes:
availabilityZone String
The available zone that the CBS instance locates at.
projectId String
ID of the project within the snapshot.
resultOutputFile String
snapshotId String
ID of the snapshot.
snapshotName String
Name of the snapshot.
storageId String
ID of the the CBS which this snapshot created from.
storageUsage String
Types of CBS which this snapshot created from.
id string
snapshotLists GetCbsSnapshotsSnapshotList[]
A list of snapshot. Each element contains the following attributes:
availabilityZone string
The available zone that the CBS instance locates at.
projectId string
ID of the project within the snapshot.
resultOutputFile string
snapshotId string
ID of the snapshot.
snapshotName string
Name of the snapshot.
storageId string
ID of the the CBS which this snapshot created from.
storageUsage string
Types of CBS which this snapshot created from.
id str
snapshot_lists Sequence[GetCbsSnapshotsSnapshotList]
A list of snapshot. Each element contains the following attributes:
availability_zone str
The available zone that the CBS instance locates at.
project_id str
ID of the project within the snapshot.
result_output_file str
snapshot_id str
ID of the snapshot.
snapshot_name str
Name of the snapshot.
storage_id str
ID of the the CBS which this snapshot created from.
storage_usage str
Types of CBS which this snapshot created from.
id String
snapshotLists List<Property Map>
A list of snapshot. Each element contains the following attributes:
availabilityZone String
The available zone that the CBS instance locates at.
projectId String
ID of the project within the snapshot.
resultOutputFile String
snapshotId String
ID of the snapshot.
snapshotName String
Name of the snapshot.
storageId String
ID of the the CBS which this snapshot created from.
storageUsage String
Types of CBS which this snapshot created from.

Supporting Types

GetCbsSnapshotsSnapshotList

AvailabilityZone This property is required. string
The available zone that the CBS instance locates at.
CreateTime This property is required. string
Creation time of snapshot.
Encrypt This property is required. bool
Indicates whether the snapshot is encrypted.
Percent This property is required. double
Snapshot creation progress percentage.
ProjectId This property is required. double
ID of the project within the snapshot.
SnapshotId This property is required. string
ID of the snapshot to be queried.
SnapshotName This property is required. string
Name of the snapshot to be queried.
StorageId This property is required. string
ID of the the CBS which this snapshot created from.
StorageSize This property is required. double
Volume of storage which this snapshot created from.
StorageUsage This property is required. string
Types of CBS which this snapshot created from, and available values include SYSTEM_DISK and DATA_DISK.
AvailabilityZone This property is required. string
The available zone that the CBS instance locates at.
CreateTime This property is required. string
Creation time of snapshot.
Encrypt This property is required. bool
Indicates whether the snapshot is encrypted.
Percent This property is required. float64
Snapshot creation progress percentage.
ProjectId This property is required. float64
ID of the project within the snapshot.
SnapshotId This property is required. string
ID of the snapshot to be queried.
SnapshotName This property is required. string
Name of the snapshot to be queried.
StorageId This property is required. string
ID of the the CBS which this snapshot created from.
StorageSize This property is required. float64
Volume of storage which this snapshot created from.
StorageUsage This property is required. string
Types of CBS which this snapshot created from, and available values include SYSTEM_DISK and DATA_DISK.
availabilityZone This property is required. String
The available zone that the CBS instance locates at.
createTime This property is required. String
Creation time of snapshot.
encrypt This property is required. Boolean
Indicates whether the snapshot is encrypted.
percent This property is required. Double
Snapshot creation progress percentage.
projectId This property is required. Double
ID of the project within the snapshot.
snapshotId This property is required. String
ID of the snapshot to be queried.
snapshotName This property is required. String
Name of the snapshot to be queried.
storageId This property is required. String
ID of the the CBS which this snapshot created from.
storageSize This property is required. Double
Volume of storage which this snapshot created from.
storageUsage This property is required. String
Types of CBS which this snapshot created from, and available values include SYSTEM_DISK and DATA_DISK.
availabilityZone This property is required. string
The available zone that the CBS instance locates at.
createTime This property is required. string
Creation time of snapshot.
encrypt This property is required. boolean
Indicates whether the snapshot is encrypted.
percent This property is required. number
Snapshot creation progress percentage.
projectId This property is required. number
ID of the project within the snapshot.
snapshotId This property is required. string
ID of the snapshot to be queried.
snapshotName This property is required. string
Name of the snapshot to be queried.
storageId This property is required. string
ID of the the CBS which this snapshot created from.
storageSize This property is required. number
Volume of storage which this snapshot created from.
storageUsage This property is required. string
Types of CBS which this snapshot created from, and available values include SYSTEM_DISK and DATA_DISK.
availability_zone This property is required. str
The available zone that the CBS instance locates at.
create_time This property is required. str
Creation time of snapshot.
encrypt This property is required. bool
Indicates whether the snapshot is encrypted.
percent This property is required. float
Snapshot creation progress percentage.
project_id This property is required. float
ID of the project within the snapshot.
snapshot_id This property is required. str
ID of the snapshot to be queried.
snapshot_name This property is required. str
Name of the snapshot to be queried.
storage_id This property is required. str
ID of the the CBS which this snapshot created from.
storage_size This property is required. float
Volume of storage which this snapshot created from.
storage_usage This property is required. str
Types of CBS which this snapshot created from, and available values include SYSTEM_DISK and DATA_DISK.
availabilityZone This property is required. String
The available zone that the CBS instance locates at.
createTime This property is required. String
Creation time of snapshot.
encrypt This property is required. Boolean
Indicates whether the snapshot is encrypted.
percent This property is required. Number
Snapshot creation progress percentage.
projectId This property is required. Number
ID of the project within the snapshot.
snapshotId This property is required. String
ID of the snapshot to be queried.
snapshotName This property is required. String
Name of the snapshot to be queried.
storageId This property is required. String
ID of the the CBS which this snapshot created from.
storageSize This property is required. Number
Volume of storage which this snapshot created from.
storageUsage This property is required. String
Types of CBS which this snapshot created from, and available values include SYSTEM_DISK and DATA_DISK.

Package Details

Repository
tencentcloud tencentcloudstack/terraform-provider-tencentcloud
License
Notes
This Pulumi package is based on the tencentcloud Terraform Provider.