tencentcloud 1.81.187 published on Monday, Apr 28, 2025 by tencentcloudstack
tencentcloud.getCbsSnapshotPolicies
Explore with Pulumi AI
tencentcloud 1.81.187 published on Monday, Apr 28, 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
- Result
Output stringFile - Used to save results.
- Snapshot
Policy stringId - ID of the snapshot policy to be queried.
- Snapshot
Policy stringName - Name of the snapshot policy to be queried.
- Id string
- Result
Output stringFile - Used to save results.
- Snapshot
Policy stringId - ID of the snapshot policy to be queried.
- Snapshot
Policy stringName - Name of the snapshot policy to be queried.
- id String
- result
Output StringFile - Used to save results.
- snapshot
Policy StringId - ID of the snapshot policy to be queried.
- snapshot
Policy StringName - Name of the snapshot policy to be queried.
- id string
- result
Output stringFile - Used to save results.
- snapshot
Policy stringId - ID of the snapshot policy to be queried.
- snapshot
Policy stringName - Name of the snapshot policy to be queried.
- id str
- result_
output_ strfile - Used to save results.
- snapshot_
policy_ strid - ID of the snapshot policy to be queried.
- snapshot_
policy_ strname - Name of the snapshot policy to be queried.
- id String
- result
Output StringFile - Used to save results.
- snapshot
Policy StringId - ID of the snapshot policy to be queried.
- snapshot
Policy StringName - Name of the snapshot policy to be queried.
getCbsSnapshotPolicies Result
The following output properties are available:
- Id string
- Snapshot
Policy List<GetLists Cbs Snapshot Policies Snapshot Policy List> - A list of snapshot policy. Each element contains the following attributes:
- Result
Output stringFile - Snapshot
Policy stringId - ID of the snapshot policy.
- Snapshot
Policy stringName - Name of the snapshot policy.
- Id string
- Snapshot
Policy []GetLists Cbs Snapshot Policies Snapshot Policy List - A list of snapshot policy. Each element contains the following attributes:
- Result
Output stringFile - Snapshot
Policy stringId - ID of the snapshot policy.
- Snapshot
Policy stringName - Name of the snapshot policy.
- id String
- snapshot
Policy List<GetLists Cbs Snapshot Policies Snapshot Policy List> - A list of snapshot policy. Each element contains the following attributes:
- result
Output StringFile - snapshot
Policy StringId - ID of the snapshot policy.
- snapshot
Policy StringName - Name of the snapshot policy.
- id string
- snapshot
Policy GetLists Cbs Snapshot Policies Snapshot Policy List[] - A list of snapshot policy. Each element contains the following attributes:
- result
Output stringFile - snapshot
Policy stringId - ID of the snapshot policy.
- snapshot
Policy stringName - Name of the snapshot policy.
- id str
- snapshot_
policy_ Sequence[Getlists Cbs Snapshot Policies Snapshot Policy List] - A list of snapshot policy. Each element contains the following attributes:
- result_
output_ strfile - snapshot_
policy_ strid - ID of the snapshot policy.
- snapshot_
policy_ strname - Name of the snapshot policy.
- id String
- snapshot
Policy List<Property Map>Lists - A list of snapshot policy. Each element contains the following attributes:
- result
Output StringFile - snapshot
Policy StringId - ID of the snapshot policy.
- snapshot
Policy StringName - Name of the snapshot policy.
Supporting Types
GetCbsSnapshotPoliciesSnapshotPolicyList
- Attached
Storage Ids This property is required. List<string> - Storage IDs that the snapshot policy attached.
- Create
Time This property is required. string - Create time of the snapshot policy.
- Repeat
Hours This property is required. List<double> - Trigger hours of periodic snapshot.
- Repeat
Weekdays This property is required. List<double> - Trigger days of periodic snapshot.
- Retention
Days This property is required. double - Retention days of the snapshot.
- Snapshot
Policy Id This property is required. string - ID of the snapshot policy to be queried.
- Snapshot
Policy Name 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. []string - Storage IDs that the snapshot policy attached.
- Create
Time This property is required. string - Create time of the snapshot policy.
- Repeat
Hours This property is required. []float64 - Trigger hours of periodic snapshot.
- Repeat
Weekdays This property is required. []float64 - Trigger days of periodic snapshot.
- Retention
Days This property is required. float64 - Retention days of the snapshot.
- Snapshot
Policy Id This property is required. string - ID of the snapshot policy to be queried.
- Snapshot
Policy Name 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. List<String> - Storage IDs that the snapshot policy attached.
- create
Time This property is required. String - Create time of the snapshot policy.
- repeat
Hours This property is required. List<Double> - Trigger hours of periodic snapshot.
- repeat
Weekdays This property is required. List<Double> - Trigger days of periodic snapshot.
- retention
Days This property is required. Double - Retention days of the snapshot.
- snapshot
Policy Id This property is required. String - ID of the snapshot policy to be queried.
- snapshot
Policy Name 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. string[] - Storage IDs that the snapshot policy attached.
- create
Time This property is required. string - Create time of the snapshot policy.
- repeat
Hours This property is required. number[] - Trigger hours of periodic snapshot.
- repeat
Weekdays This property is required. number[] - Trigger days of periodic snapshot.
- retention
Days This property is required. number - Retention days of the snapshot.
- snapshot
Policy Id This property is required. string - ID of the snapshot policy to be queried.
- snapshot
Policy Name 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.
- attached
Storage Ids This property is required. List<String> - Storage IDs that the snapshot policy attached.
- create
Time This property is required. String - Create time of the snapshot policy.
- repeat
Hours This property is required. List<Number> - Trigger hours of periodic snapshot.
- repeat
Weekdays This property is required. List<Number> - Trigger days of periodic snapshot.
- retention
Days This property is required. Number - Retention days of the snapshot.
- snapshot
Policy Id This property is required. String - ID of the snapshot policy to be queried.
- snapshot
Policy Name 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.
tencentcloud 1.81.187 published on Monday, Apr 28, 2025 by tencentcloudstack