Volcengine v0.0.27 published on Tuesday, Dec 10, 2024 by Volcengine
volcengine.ebs.AutoSnapshotPolicies
Explore with Pulumi AI
Use this data source to query detailed information of ebs auto snapshot policies
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@pulumi/volcengine";
import * as volcengine from "@volcengine/pulumi";
const fooAutoSnapshotPolicy: volcengine.ebs.AutoSnapshotPolicy[] = [];
for (const range = {value: 0}; range.value < 2; range.value++) {
fooAutoSnapshotPolicy.push(new volcengine.ebs.AutoSnapshotPolicy(`fooAutoSnapshotPolicy-${range.value}`, {
autoSnapshotPolicyName: "acc-test-auto-snapshot-policy",
timePoints: [
"1",
"5",
"9",
],
retentionDays: -1,
repeatWeekdays: [
"2",
"6",
],
projectName: "default",
tags: [{
key: "k1",
value: "v1",
}],
}));
}
const fooAutoSnapshotPolicies = volcengine.ebs.AutoSnapshotPoliciesOutput({
ids: fooAutoSnapshotPolicy.map(__item => __item.id),
});
import pulumi
import pulumi_volcengine as volcengine
foo_auto_snapshot_policy = []
for range in [{"value": i} for i in range(0, 2)]:
foo_auto_snapshot_policy.append(volcengine.ebs.AutoSnapshotPolicy(f"fooAutoSnapshotPolicy-{range['value']}",
auto_snapshot_policy_name="acc-test-auto-snapshot-policy",
time_points=[
"1",
"5",
"9",
],
retention_days=-1,
repeat_weekdays=[
"2",
"6",
],
project_name="default",
tags=[volcengine.ebs.AutoSnapshotPolicyTagArgs(
key="k1",
value="v1",
)]))
foo_auto_snapshot_policies = volcengine.ebs.auto_snapshot_policies_output(ids=[__item.id for __item in foo_auto_snapshot_policy])
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/ebs"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
var fooAutoSnapshotPolicy []*ebs.AutoSnapshotPolicy
for index := 0; index < 2; index++ {
key0 := index
_ := index
__res, err := ebs.NewAutoSnapshotPolicy(ctx, fmt.Sprintf("fooAutoSnapshotPolicy-%v", key0), &ebs.AutoSnapshotPolicyArgs{
AutoSnapshotPolicyName: pulumi.String("acc-test-auto-snapshot-policy"),
TimePoints: pulumi.StringArray{
pulumi.String("1"),
pulumi.String("5"),
pulumi.String("9"),
},
RetentionDays: -1,
RepeatWeekdays: pulumi.StringArray{
pulumi.String("2"),
pulumi.String("6"),
},
ProjectName: pulumi.String("default"),
Tags: ebs.AutoSnapshotPolicyTagArray{
&ebs.AutoSnapshotPolicyTagArgs{
Key: pulumi.String("k1"),
Value: pulumi.String("v1"),
},
},
})
if err != nil {
return err
}
fooAutoSnapshotPolicy = append(fooAutoSnapshotPolicy, __res)
}
_ = ebs.AutoSnapshotPoliciesOutput(ctx, ebs.AutoSnapshotPoliciesOutputArgs{
Ids: %!v(PANIC=Format method: fatal: A failure has occurred: unlowered splat expression @ #-functions-volcengine:ebs-autoSnapshotPolicies:AutoSnapshotPolicies.pp:16,9-36),
}, nil);
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var fooAutoSnapshotPolicy = new List<Volcengine.Ebs.AutoSnapshotPolicy>();
for (var rangeIndex = 0; rangeIndex < 2; rangeIndex++)
{
var range = new { Value = rangeIndex };
fooAutoSnapshotPolicy.Add(new Volcengine.Ebs.AutoSnapshotPolicy($"fooAutoSnapshotPolicy-{range.Value}", new()
{
AutoSnapshotPolicyName = "acc-test-auto-snapshot-policy",
TimePoints = new[]
{
"1",
"5",
"9",
},
RetentionDays = -1,
RepeatWeekdays = new[]
{
"2",
"6",
},
ProjectName = "default",
Tags = new[]
{
new Volcengine.Ebs.Inputs.AutoSnapshotPolicyTagArgs
{
Key = "k1",
Value = "v1",
},
},
}));
}
var fooAutoSnapshotPolicies = Volcengine.Ebs.AutoSnapshotPolicies.Invoke(new()
{
Ids = fooAutoSnapshotPolicy.Select(__item => __item.Id).ToList(),
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.ebs.AutoSnapshotPolicy;
import com.pulumi.volcengine.ebs.AutoSnapshotPolicyArgs;
import com.pulumi.volcengine.ebs.inputs.AutoSnapshotPolicyTagArgs;
import com.pulumi.volcengine.ebs.EbsFunctions;
import com.pulumi.volcengine.ebs.inputs.AutoSnapshotPoliciesArgs;
import com.pulumi.codegen.internal.KeyedValue;
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) {
for (var i = 0; i < 2; i++) {
new AutoSnapshotPolicy("fooAutoSnapshotPolicy-" + i, AutoSnapshotPolicyArgs.builder()
.autoSnapshotPolicyName("acc-test-auto-snapshot-policy")
.timePoints(
1,
5,
9)
.retentionDays("TODO: GenUnaryOpExpression")
.repeatWeekdays(
2,
6)
.projectName("default")
.tags(AutoSnapshotPolicyTagArgs.builder()
.key("k1")
.value("v1")
.build())
.build());
}
final var fooAutoSnapshotPolicies = EbsFunctions.AutoSnapshotPolicies(AutoSnapshotPoliciesArgs.builder()
.ids(fooAutoSnapshotPolicy.stream().map(element -> element.id()).collect(toList()))
.build());
}
}
Coming soon!
Using AutoSnapshotPolicies
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 autoSnapshotPolicies(args: AutoSnapshotPoliciesArgs, opts?: InvokeOptions): Promise<AutoSnapshotPoliciesResult>
function autoSnapshotPoliciesOutput(args: AutoSnapshotPoliciesOutputArgs, opts?: InvokeOptions): Output<AutoSnapshotPoliciesResult>
def auto_snapshot_policies(ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
project_name: Optional[str] = None,
tags: Optional[Sequence[AutoSnapshotPoliciesTag]] = None,
opts: Optional[InvokeOptions] = None) -> AutoSnapshotPoliciesResult
def auto_snapshot_policies_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
project_name: Optional[pulumi.Input[str]] = None,
tags: Optional[pulumi.Input[Sequence[pulumi.Input[AutoSnapshotPoliciesTagArgs]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[AutoSnapshotPoliciesResult]
func AutoSnapshotPolicies(ctx *Context, args *AutoSnapshotPoliciesArgs, opts ...InvokeOption) (*AutoSnapshotPoliciesResult, error)
func AutoSnapshotPoliciesOutput(ctx *Context, args *AutoSnapshotPoliciesOutputArgs, opts ...InvokeOption) AutoSnapshotPoliciesResultOutput
public static class AutoSnapshotPolicies
{
public static Task<AutoSnapshotPoliciesResult> InvokeAsync(AutoSnapshotPoliciesArgs args, InvokeOptions? opts = null)
public static Output<AutoSnapshotPoliciesResult> Invoke(AutoSnapshotPoliciesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<AutoSnapshotPoliciesResult> autoSnapshotPolicies(AutoSnapshotPoliciesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: volcengine:ebs:AutoSnapshotPolicies
arguments:
# arguments dictionary
The following arguments are supported:
- Ids List<string>
- A list of auto snapshot policy IDs.
- Name
Regex string - A Name Regex of Resource.
- Output
File string - File name where to save data source results.
- Project
Name string - The project name of auto snapshot policy.
- List<Auto
Snapshot Policies Tag> - Tags.
- Ids []string
- A list of auto snapshot policy IDs.
- Name
Regex string - A Name Regex of Resource.
- Output
File string - File name where to save data source results.
- Project
Name string - The project name of auto snapshot policy.
- []Auto
Snapshot Policies Tag - Tags.
- ids List<String>
- A list of auto snapshot policy IDs.
- name
Regex String - A Name Regex of Resource.
- output
File String - File name where to save data source results.
- project
Name String - The project name of auto snapshot policy.
- List<Auto
Snapshot Policies Tag> - Tags.
- ids string[]
- A list of auto snapshot policy IDs.
- name
Regex string - A Name Regex of Resource.
- output
File string - File name where to save data source results.
- project
Name string - The project name of auto snapshot policy.
- Auto
Snapshot Policies Tag[] - Tags.
- ids Sequence[str]
- A list of auto snapshot policy IDs.
- name_
regex str - A Name Regex of Resource.
- output_
file str - File name where to save data source results.
- project_
name str - The project name of auto snapshot policy.
- Sequence[Auto
Snapshot Policies Tag] - Tags.
- ids List<String>
- A list of auto snapshot policy IDs.
- name
Regex String - A Name Regex of Resource.
- output
File String - File name where to save data source results.
- project
Name String - The project name of auto snapshot policy.
- List<Property Map>
- Tags.
AutoSnapshotPolicies Result
The following output properties are available:
- Auto
Snapshot List<AutoPolicies Snapshot Policies Auto Snapshot Policy> - The collection of query.
- Id string
- The provider-assigned unique ID for this managed resource.
- Total
Count int - The total count of query.
- Ids List<string>
- Name
Regex string - Output
File string - Project
Name string - The project name of the auto snapshot policy.
- List<Auto
Snapshot Policies Tag> - Tags.
- Auto
Snapshot []AutoPolicies Snapshot Policies Auto Snapshot Policy - The collection of query.
- Id string
- The provider-assigned unique ID for this managed resource.
- Total
Count int - The total count of query.
- Ids []string
- Name
Regex string - Output
File string - Project
Name string - The project name of the auto snapshot policy.
- []Auto
Snapshot Policies Tag - Tags.
- auto
Snapshot List<AutoPolicies Snapshot Policies Auto Snapshot Policy> - The collection of query.
- id String
- The provider-assigned unique ID for this managed resource.
- total
Count Integer - The total count of query.
- ids List<String>
- name
Regex String - output
File String - project
Name String - The project name of the auto snapshot policy.
- List<Auto
Snapshot Policies Tag> - Tags.
- auto
Snapshot AutoPolicies Snapshot Policies Auto Snapshot Policy[] - The collection of query.
- id string
- The provider-assigned unique ID for this managed resource.
- total
Count number - The total count of query.
- ids string[]
- name
Regex string - output
File string - project
Name string - The project name of the auto snapshot policy.
- Auto
Snapshot Policies Tag[] - Tags.
- auto_
snapshot_ Sequence[Autopolicies Snapshot Policies Auto Snapshot Policy] - The collection of query.
- id str
- The provider-assigned unique ID for this managed resource.
- total_
count int - The total count of query.
- ids Sequence[str]
- name_
regex str - output_
file str - project_
name str - The project name of the auto snapshot policy.
- Sequence[Auto
Snapshot Policies Tag] - Tags.
- auto
Snapshot List<Property Map>Policies - The collection of query.
- id String
- The provider-assigned unique ID for this managed resource.
- total
Count Number - The total count of query.
- ids List<String>
- name
Regex String - output
File String - project
Name String - The project name of the auto snapshot policy.
- List<Property Map>
- Tags.
Supporting Types
AutoSnapshotPoliciesAutoSnapshotPolicy
- Auto
Snapshot stringPolicy Id - The id of the auto snapshot policy.
- Auto
Snapshot stringPolicy Name - The name of the auto snapshot policy.
- Created
At string - The creation time of the auto snapshot policy.
- Id string
- The id of the auto snapshot policy.
- Project
Name string - The project name of auto snapshot policy.
- Repeat
Days int - Create snapshots repeatedly on a daily basis, with intervals of a certain number of days between each snapshot.
- Repeat
Weekdays List<string> - The date of creating snapshot repeatedly by week. The value range is
1-7
, for example, 1 represents Monday. - Retention
Days int - The retention days of the auto snapshot.
-1
means permanently preserving the snapshot. - Status string
- The status of the auto snapshot policy.
- List<Auto
Snapshot Policies Auto Snapshot Policy Tag> - Tags.
- Time
Points List<string> - The creation time points of the auto snapshot policy. The value range is
0~23
, representing a total of 24 time points from 00:00 to 23:00, for example, 1 represents 01:00. - Updated
At string - The updated time of the auto snapshot policy.
- int
- The number of volumes associated with the auto snapshot policy.
- Auto
Snapshot stringPolicy Id - The id of the auto snapshot policy.
- Auto
Snapshot stringPolicy Name - The name of the auto snapshot policy.
- Created
At string - The creation time of the auto snapshot policy.
- Id string
- The id of the auto snapshot policy.
- Project
Name string - The project name of auto snapshot policy.
- Repeat
Days int - Create snapshots repeatedly on a daily basis, with intervals of a certain number of days between each snapshot.
- Repeat
Weekdays []string - The date of creating snapshot repeatedly by week. The value range is
1-7
, for example, 1 represents Monday. - Retention
Days int - The retention days of the auto snapshot.
-1
means permanently preserving the snapshot. - Status string
- The status of the auto snapshot policy.
- []Auto
Snapshot Policies Auto Snapshot Policy Tag - Tags.
- Time
Points []string - The creation time points of the auto snapshot policy. The value range is
0~23
, representing a total of 24 time points from 00:00 to 23:00, for example, 1 represents 01:00. - Updated
At string - The updated time of the auto snapshot policy.
- int
- The number of volumes associated with the auto snapshot policy.
- auto
Snapshot StringPolicy Id - The id of the auto snapshot policy.
- auto
Snapshot StringPolicy Name - The name of the auto snapshot policy.
- created
At String - The creation time of the auto snapshot policy.
- id String
- The id of the auto snapshot policy.
- project
Name String - The project name of auto snapshot policy.
- repeat
Days Integer - Create snapshots repeatedly on a daily basis, with intervals of a certain number of days between each snapshot.
- repeat
Weekdays List<String> - The date of creating snapshot repeatedly by week. The value range is
1-7
, for example, 1 represents Monday. - retention
Days Integer - The retention days of the auto snapshot.
-1
means permanently preserving the snapshot. - status String
- The status of the auto snapshot policy.
- List<Auto
Snapshot Policies Auto Snapshot Policy Tag> - Tags.
- time
Points List<String> - The creation time points of the auto snapshot policy. The value range is
0~23
, representing a total of 24 time points from 00:00 to 23:00, for example, 1 represents 01:00. - updated
At String - The updated time of the auto snapshot policy.
- Integer
- The number of volumes associated with the auto snapshot policy.
- auto
Snapshot stringPolicy Id - The id of the auto snapshot policy.
- auto
Snapshot stringPolicy Name - The name of the auto snapshot policy.
- created
At string - The creation time of the auto snapshot policy.
- id string
- The id of the auto snapshot policy.
- project
Name string - The project name of auto snapshot policy.
- repeat
Days number - Create snapshots repeatedly on a daily basis, with intervals of a certain number of days between each snapshot.
- repeat
Weekdays string[] - The date of creating snapshot repeatedly by week. The value range is
1-7
, for example, 1 represents Monday. - retention
Days number - The retention days of the auto snapshot.
-1
means permanently preserving the snapshot. - status string
- The status of the auto snapshot policy.
- Auto
Snapshot Policies Auto Snapshot Policy Tag[] - Tags.
- time
Points string[] - The creation time points of the auto snapshot policy. The value range is
0~23
, representing a total of 24 time points from 00:00 to 23:00, for example, 1 represents 01:00. - updated
At string - The updated time of the auto snapshot policy.
- number
- The number of volumes associated with the auto snapshot policy.
- auto_
snapshot_ strpolicy_ id - The id of the auto snapshot policy.
- auto_
snapshot_ strpolicy_ name - The name of the auto snapshot policy.
- created_
at str - The creation time of the auto snapshot policy.
- id str
- The id of the auto snapshot policy.
- project_
name str - The project name of auto snapshot policy.
- repeat_
days int - Create snapshots repeatedly on a daily basis, with intervals of a certain number of days between each snapshot.
- repeat_
weekdays Sequence[str] - The date of creating snapshot repeatedly by week. The value range is
1-7
, for example, 1 represents Monday. - retention_
days int - The retention days of the auto snapshot.
-1
means permanently preserving the snapshot. - status str
- The status of the auto snapshot policy.
- Sequence[Auto
Snapshot Policies Auto Snapshot Policy Tag] - Tags.
- time_
points Sequence[str] - The creation time points of the auto snapshot policy. The value range is
0~23
, representing a total of 24 time points from 00:00 to 23:00, for example, 1 represents 01:00. - updated_
at str - The updated time of the auto snapshot policy.
- volume_
nums int - The number of volumes associated with the auto snapshot policy.
- auto
Snapshot StringPolicy Id - The id of the auto snapshot policy.
- auto
Snapshot StringPolicy Name - The name of the auto snapshot policy.
- created
At String - The creation time of the auto snapshot policy.
- id String
- The id of the auto snapshot policy.
- project
Name String - The project name of auto snapshot policy.
- repeat
Days Number - Create snapshots repeatedly on a daily basis, with intervals of a certain number of days between each snapshot.
- repeat
Weekdays List<String> - The date of creating snapshot repeatedly by week. The value range is
1-7
, for example, 1 represents Monday. - retention
Days Number - The retention days of the auto snapshot.
-1
means permanently preserving the snapshot. - status String
- The status of the auto snapshot policy.
- List<Property Map>
- Tags.
- time
Points List<String> - The creation time points of the auto snapshot policy. The value range is
0~23
, representing a total of 24 time points from 00:00 to 23:00, for example, 1 represents 01:00. - updated
At String - The updated time of the auto snapshot policy.
- Number
- The number of volumes associated with the auto snapshot policy.
AutoSnapshotPoliciesAutoSnapshotPolicyTag
AutoSnapshotPoliciesTag
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengine
Terraform Provider.