1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. getCbsSnapshotPolicies
tencentcloud 1.81.187 published on Monday, Apr 28, 2025 by tencentcloudstack

tencentcloud.getCbsSnapshotPolicies

Explore with Pulumi AI

Use this data source to query detailed information of CBS snapshot policies.

Example Usage

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

const policies = tencentcloud.getCbsSnapshotPolicies({
    snapshotPolicyId: "snap-f3io7adt",
    snapshotPolicyName: "test",
});
Copy
import pulumi
import pulumi_tencentcloud as tencentcloud

policies = tencentcloud.get_cbs_snapshot_policies(snapshot_policy_id="snap-f3io7adt",
    snapshot_policy_name="test")
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.GetCbsSnapshotPolicies(ctx, &tencentcloud.GetCbsSnapshotPoliciesArgs{
			SnapshotPolicyId:   pulumi.StringRef("snap-f3io7adt"),
			SnapshotPolicyName: pulumi.StringRef("test"),
		}, 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 policies = Tencentcloud.GetCbsSnapshotPolicies.Invoke(new()
    {
        SnapshotPolicyId = "snap-f3io7adt",
        SnapshotPolicyName = "test",
    });

});
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.GetCbsSnapshotPoliciesArgs;
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 policies = TencentcloudFunctions.getCbsSnapshotPolicies(GetCbsSnapshotPoliciesArgs.builder()
            .snapshotPolicyId("snap-f3io7adt")
            .snapshotPolicyName("test")
            .build());

    }
}
Copy
variables:
  policies:
    fn::invoke:
      function: tencentcloud:getCbsSnapshotPolicies
      arguments:
        snapshotPolicyId: snap-f3io7adt
        snapshotPolicyName: test
Copy

Using getCbsSnapshotPolicies

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 getCbsSnapshotPolicies(args: GetCbsSnapshotPoliciesArgs, opts?: InvokeOptions): Promise<GetCbsSnapshotPoliciesResult>
function getCbsSnapshotPoliciesOutput(args: GetCbsSnapshotPoliciesOutputArgs, opts?: InvokeOptions): Output<GetCbsSnapshotPoliciesResult>
Copy
def get_cbs_snapshot_policies(id: Optional[str] = None,
                              result_output_file: Optional[str] = None,
                              snapshot_policy_id: Optional[str] = None,
                              snapshot_policy_name: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetCbsSnapshotPoliciesResult
def get_cbs_snapshot_policies_output(id: Optional[pulumi.Input[str]] = None,
                              result_output_file: Optional[pulumi.Input[str]] = None,
                              snapshot_policy_id: Optional[pulumi.Input[str]] = None,
                              snapshot_policy_name: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetCbsSnapshotPoliciesResult]
Copy
func GetCbsSnapshotPolicies(ctx *Context, args *GetCbsSnapshotPoliciesArgs, opts ...InvokeOption) (*GetCbsSnapshotPoliciesResult, error)
func GetCbsSnapshotPoliciesOutput(ctx *Context, args *GetCbsSnapshotPoliciesOutputArgs, opts ...InvokeOption) GetCbsSnapshotPoliciesResultOutput
Copy

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

public static class GetCbsSnapshotPolicies 
{
    public static Task<GetCbsSnapshotPoliciesResult> InvokeAsync(GetCbsSnapshotPoliciesArgs args, InvokeOptions? opts = null)
    public static Output<GetCbsSnapshotPoliciesResult> Invoke(GetCbsSnapshotPoliciesInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetCbsSnapshotPoliciesResult> getCbsSnapshotPolicies(GetCbsSnapshotPoliciesArgs args, InvokeOptions options)
public static Output<GetCbsSnapshotPoliciesResult> getCbsSnapshotPolicies(GetCbsSnapshotPoliciesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: tencentcloud:index/getCbsSnapshotPolicies:getCbsSnapshotPolicies
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Id string
ResultOutputFile string
Used to save results.
SnapshotPolicyId string
ID of the snapshot policy to be queried.
SnapshotPolicyName string
Name of the snapshot policy to be queried.
Id string
ResultOutputFile string
Used to save results.
SnapshotPolicyId string
ID of the snapshot policy to be queried.
SnapshotPolicyName string
Name of the snapshot policy to be queried.
id String
resultOutputFile String
Used to save results.
snapshotPolicyId String
ID of the snapshot policy to be queried.
snapshotPolicyName String
Name of the snapshot policy to be queried.
id string
resultOutputFile string
Used to save results.
snapshotPolicyId string
ID of the snapshot policy to be queried.
snapshotPolicyName string
Name of the snapshot policy to be queried.
id str
result_output_file str
Used to save results.
snapshot_policy_id str
ID of the snapshot policy to be queried.
snapshot_policy_name str
Name of the snapshot policy to be queried.
id String
resultOutputFile String
Used to save results.
snapshotPolicyId String
ID of the snapshot policy to be queried.
snapshotPolicyName String
Name of the snapshot policy to be queried.

getCbsSnapshotPolicies Result

The following output properties are available:

Id string
SnapshotPolicyLists List<GetCbsSnapshotPoliciesSnapshotPolicyList>
A list of snapshot policy. Each element contains the following attributes:
ResultOutputFile string
SnapshotPolicyId string
ID of the snapshot policy.
SnapshotPolicyName string
Name of the snapshot policy.
Id string
SnapshotPolicyLists []GetCbsSnapshotPoliciesSnapshotPolicyList
A list of snapshot policy. Each element contains the following attributes:
ResultOutputFile string
SnapshotPolicyId string
ID of the snapshot policy.
SnapshotPolicyName string
Name of the snapshot policy.
id String
snapshotPolicyLists List<GetCbsSnapshotPoliciesSnapshotPolicyList>
A list of snapshot policy. Each element contains the following attributes:
resultOutputFile String
snapshotPolicyId String
ID of the snapshot policy.
snapshotPolicyName String
Name of the snapshot policy.
id string
snapshotPolicyLists GetCbsSnapshotPoliciesSnapshotPolicyList[]
A list of snapshot policy. Each element contains the following attributes:
resultOutputFile string
snapshotPolicyId string
ID of the snapshot policy.
snapshotPolicyName string
Name of the snapshot policy.
id str
snapshot_policy_lists Sequence[GetCbsSnapshotPoliciesSnapshotPolicyList]
A list of snapshot policy. Each element contains the following attributes:
result_output_file str
snapshot_policy_id str
ID of the snapshot policy.
snapshot_policy_name str
Name of the snapshot policy.
id String
snapshotPolicyLists List<Property Map>
A list of snapshot policy. Each element contains the following attributes:
resultOutputFile String
snapshotPolicyId String
ID of the snapshot policy.
snapshotPolicyName String
Name of the snapshot policy.

Supporting Types

GetCbsSnapshotPoliciesSnapshotPolicyList

AttachedStorageIds This property is required. List<string>
Storage IDs that the snapshot policy attached.
CreateTime This property is required. string
Create time of the snapshot policy.
RepeatHours This property is required. List<double>
Trigger hours of periodic snapshot.
RepeatWeekdays This property is required. List<double>
Trigger days of periodic snapshot.
RetentionDays This property is required. double
Retention days of the snapshot.
SnapshotPolicyId This property is required. string
ID of the snapshot policy to be queried.
SnapshotPolicyName This property is required. string
Name of the snapshot policy to be queried.
Status This property is required. string
Status of the snapshot policy.
AttachedStorageIds This property is required. []string
Storage IDs that the snapshot policy attached.
CreateTime This property is required. string
Create time of the snapshot policy.
RepeatHours This property is required. []float64
Trigger hours of periodic snapshot.
RepeatWeekdays This property is required. []float64
Trigger days of periodic snapshot.
RetentionDays This property is required. float64
Retention days of the snapshot.
SnapshotPolicyId This property is required. string
ID of the snapshot policy to be queried.
SnapshotPolicyName This property is required. string
Name of the snapshot policy to be queried.
Status This property is required. string
Status of the snapshot policy.
attachedStorageIds This property is required. List<String>
Storage IDs that the snapshot policy attached.
createTime This property is required. String
Create time of the snapshot policy.
repeatHours This property is required. List<Double>
Trigger hours of periodic snapshot.
repeatWeekdays This property is required. List<Double>
Trigger days of periodic snapshot.
retentionDays This property is required. Double
Retention days of the snapshot.
snapshotPolicyId This property is required. String
ID of the snapshot policy to be queried.
snapshotPolicyName This property is required. String
Name of the snapshot policy to be queried.
status This property is required. String
Status of the snapshot policy.
attachedStorageIds This property is required. string[]
Storage IDs that the snapshot policy attached.
createTime This property is required. string
Create time of the snapshot policy.
repeatHours This property is required. number[]
Trigger hours of periodic snapshot.
repeatWeekdays This property is required. number[]
Trigger days of periodic snapshot.
retentionDays This property is required. number
Retention days of the snapshot.
snapshotPolicyId This property is required. string
ID of the snapshot policy to be queried.
snapshotPolicyName This property is required. string
Name of the snapshot policy to be queried.
status This property is required. string
Status of the snapshot policy.
attached_storage_ids This property is required. Sequence[str]
Storage IDs that the snapshot policy attached.
create_time This property is required. str
Create time of the snapshot policy.
repeat_hours This property is required. Sequence[float]
Trigger hours of periodic snapshot.
repeat_weekdays This property is required. Sequence[float]
Trigger days of periodic snapshot.
retention_days This property is required. float
Retention days of the snapshot.
snapshot_policy_id This property is required. str
ID of the snapshot policy to be queried.
snapshot_policy_name This property is required. str
Name of the snapshot policy to be queried.
status This property is required. str
Status of the snapshot policy.
attachedStorageIds This property is required. List<String>
Storage IDs that the snapshot policy attached.
createTime This property is required. String
Create time of the snapshot policy.
repeatHours This property is required. List<Number>
Trigger hours of periodic snapshot.
repeatWeekdays This property is required. List<Number>
Trigger days of periodic snapshot.
retentionDays This property is required. Number
Retention days of the snapshot.
snapshotPolicyId This property is required. String
ID of the snapshot policy to be queried.
snapshotPolicyName This property is required. String
Name of the snapshot policy to be queried.
status This property is required. String
Status of the snapshot policy.

Package Details

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