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

tencentcloud.getCbsSnapshots

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    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({});
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    snapshots = tencentcloud.get_cbs_snapshots()
    
    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
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var snapshots = Tencentcloud.GetCbsSnapshots.Invoke();
    
    });
    
    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();
    
        }
    }
    
    variables:
      snapshots:
        fn::invoke:
          function: tencentcloud:getCbsSnapshots
          arguments: {}
    

    Query snapshots by filters

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const snapshots = tencentcloud.getCbsSnapshots({
        availabilityZone: "ap-guangzhou-4",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    snapshots = tencentcloud.get_cbs_snapshots(availability_zone="ap-guangzhou-4")
    
    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
    	})
    }
    
    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",
        });
    
    });
    
    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());
    
        }
    }
    
    variables:
      snapshots:
        fn::invoke:
          function: tencentcloud:getCbsSnapshots
          arguments:
            availabilityZone: ap-guangzhou-4
    

    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>
    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]
    func GetCbsSnapshots(ctx *Context, args *GetCbsSnapshotsArgs, opts ...InvokeOption) (*GetCbsSnapshotsResult, error)
    func GetCbsSnapshotsOutput(ctx *Context, args *GetCbsSnapshotsOutputArgs, opts ...InvokeOption) GetCbsSnapshotsResultOutput

    > 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)
    }
    public static CompletableFuture<GetCbsSnapshotsResult> getCbsSnapshots(GetCbsSnapshotsArgs args, InvokeOptions options)
    public static Output<GetCbsSnapshotsResult> getCbsSnapshots(GetCbsSnapshotsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: tencentcloud:index/getCbsSnapshots:getCbsSnapshots
      arguments:
        # arguments dictionary

    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 string
    The available zone that the CBS instance locates at.
    CreateTime string
    Creation time of snapshot.
    Encrypt bool
    Indicates whether the snapshot is encrypted.
    Percent double
    Snapshot creation progress percentage.
    ProjectId double
    ID of the project within the snapshot.
    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.
    StorageSize double
    Volume of storage 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.
    CreateTime string
    Creation time of snapshot.
    Encrypt bool
    Indicates whether the snapshot is encrypted.
    Percent float64
    Snapshot creation progress percentage.
    ProjectId float64
    ID of the project within the snapshot.
    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.
    StorageSize float64
    Volume of storage 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.
    createTime String
    Creation time of snapshot.
    encrypt Boolean
    Indicates whether the snapshot is encrypted.
    percent Double
    Snapshot creation progress percentage.
    projectId Double
    ID of the project within the snapshot.
    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.
    storageSize Double
    Volume of storage 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.
    createTime string
    Creation time of snapshot.
    encrypt boolean
    Indicates whether the snapshot is encrypted.
    percent number
    Snapshot creation progress percentage.
    projectId number
    ID of the project within the snapshot.
    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.
    storageSize number
    Volume of storage 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.
    create_time str
    Creation time of snapshot.
    encrypt bool
    Indicates whether the snapshot is encrypted.
    percent float
    Snapshot creation progress percentage.
    project_id float
    ID of the project within the snapshot.
    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_size float
    Volume of storage 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.
    createTime String
    Creation time of snapshot.
    encrypt Boolean
    Indicates whether the snapshot is encrypted.
    percent Number
    Snapshot creation progress percentage.
    projectId Number
    ID of the project within the snapshot.
    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.
    storageSize Number
    Volume of storage which this snapshot created from.
    storageUsage 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.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack