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

tencentcloud.getCbsSnapshotPolicies

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 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",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    policies = tencentcloud.get_cbs_snapshot_policies(snapshot_policy_id="snap-f3io7adt",
        snapshot_policy_name="test")
    
    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
    	})
    }
    
    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",
        });
    
    });
    
    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());
    
        }
    }
    
    variables:
      policies:
        fn::invoke:
          function: tencentcloud:getCbsSnapshotPolicies
          arguments:
            snapshotPolicyId: snap-f3io7adt
            snapshotPolicyName: test
    

    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>
    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]
    func GetCbsSnapshotPolicies(ctx *Context, args *GetCbsSnapshotPoliciesArgs, opts ...InvokeOption) (*GetCbsSnapshotPoliciesResult, error)
    func GetCbsSnapshotPoliciesOutput(ctx *Context, args *GetCbsSnapshotPoliciesOutputArgs, opts ...InvokeOption) GetCbsSnapshotPoliciesResultOutput

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

    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 List<string>
    Storage IDs that the snapshot policy attached.
    CreateTime string
    Create time of the snapshot policy.
    RepeatHours List<double>
    Trigger hours of periodic snapshot.
    RepeatWeekdays List<double>
    Trigger days of periodic snapshot.
    RetentionDays double
    Retention days of the snapshot.
    SnapshotPolicyId string
    ID of the snapshot policy to be queried.
    SnapshotPolicyName string
    Name of the snapshot policy to be queried.
    Status string
    Status of the snapshot policy.
    AttachedStorageIds []string
    Storage IDs that the snapshot policy attached.
    CreateTime string
    Create time of the snapshot policy.
    RepeatHours []float64
    Trigger hours of periodic snapshot.
    RepeatWeekdays []float64
    Trigger days of periodic snapshot.
    RetentionDays float64
    Retention days of the snapshot.
    SnapshotPolicyId string
    ID of the snapshot policy to be queried.
    SnapshotPolicyName string
    Name of the snapshot policy to be queried.
    Status string
    Status of the snapshot policy.
    attachedStorageIds List<String>
    Storage IDs that the snapshot policy attached.
    createTime String
    Create time of the snapshot policy.
    repeatHours List<Double>
    Trigger hours of periodic snapshot.
    repeatWeekdays List<Double>
    Trigger days of periodic snapshot.
    retentionDays Double
    Retention days of the snapshot.
    snapshotPolicyId String
    ID of the snapshot policy to be queried.
    snapshotPolicyName String
    Name of the snapshot policy to be queried.
    status String
    Status of the snapshot policy.
    attachedStorageIds string[]
    Storage IDs that the snapshot policy attached.
    createTime string
    Create time of the snapshot policy.
    repeatHours number[]
    Trigger hours of periodic snapshot.
    repeatWeekdays number[]
    Trigger days of periodic snapshot.
    retentionDays number
    Retention days of the snapshot.
    snapshotPolicyId string
    ID of the snapshot policy to be queried.
    snapshotPolicyName string
    Name of the snapshot policy to be queried.
    status string
    Status of the snapshot policy.
    attached_storage_ids Sequence[str]
    Storage IDs that the snapshot policy attached.
    create_time str
    Create time of the snapshot policy.
    repeat_hours Sequence[float]
    Trigger hours of periodic snapshot.
    repeat_weekdays Sequence[float]
    Trigger days of periodic snapshot.
    retention_days float
    Retention days of the snapshot.
    snapshot_policy_id str
    ID of the snapshot policy to be queried.
    snapshot_policy_name str
    Name of the snapshot policy to be queried.
    status str
    Status of the snapshot policy.
    attachedStorageIds List<String>
    Storage IDs that the snapshot policy attached.
    createTime String
    Create time of the snapshot policy.
    repeatHours List<Number>
    Trigger hours of periodic snapshot.
    repeatWeekdays List<Number>
    Trigger days of periodic snapshot.
    retentionDays Number
    Retention days of the snapshot.
    snapshotPolicyId String
    ID of the snapshot policy to be queried.
    snapshotPolicyName String
    Name of the snapshot policy to be queried.
    status 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.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack