volcengine.nas.AutoSnapshotPolicy
Explore with Pulumi AI
Provides a resource to manage nas auto snapshot policy
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@volcengine/pulumi";
const foo = new volcengine.nas.AutoSnapshotPolicy("foo", {
autoSnapshotPolicyName: "acc-test-auto_snapshot_policy",
repeatWeekdays: "1,3,5,7",
retentionDays: 20,
timePoints: "0,7,17",
});
import pulumi
import pulumi_volcengine as volcengine
foo = volcengine.nas.AutoSnapshotPolicy("foo",
auto_snapshot_policy_name="acc-test-auto_snapshot_policy",
repeat_weekdays="1,3,5,7",
retention_days=20,
time_points="0,7,17")
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/nas"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := nas.NewAutoSnapshotPolicy(ctx, "foo", &nas.AutoSnapshotPolicyArgs{
AutoSnapshotPolicyName: pulumi.String("acc-test-auto_snapshot_policy"),
RepeatWeekdays: pulumi.String("1,3,5,7"),
RetentionDays: pulumi.Int(20),
TimePoints: pulumi.String("0,7,17"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var foo = new Volcengine.Nas.AutoSnapshotPolicy("foo", new()
{
AutoSnapshotPolicyName = "acc-test-auto_snapshot_policy",
RepeatWeekdays = "1,3,5,7",
RetentionDays = 20,
TimePoints = "0,7,17",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.nas.AutoSnapshotPolicy;
import com.pulumi.volcengine.nas.AutoSnapshotPolicyArgs;
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) {
var foo = new AutoSnapshotPolicy("foo", AutoSnapshotPolicyArgs.builder()
.autoSnapshotPolicyName("acc-test-auto_snapshot_policy")
.repeatWeekdays("1,3,5,7")
.retentionDays(20)
.timePoints("0,7,17")
.build());
}
}
resources:
foo:
type: volcengine:nas:AutoSnapshotPolicy
properties:
autoSnapshotPolicyName: acc-test-auto_snapshot_policy
repeatWeekdays: 1,3,5,7
retentionDays: 20
timePoints: 0,7,17
Create AutoSnapshotPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AutoSnapshotPolicy(name: string, args: AutoSnapshotPolicyArgs, opts?: CustomResourceOptions);
@overload
def AutoSnapshotPolicy(resource_name: str,
args: AutoSnapshotPolicyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AutoSnapshotPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
auto_snapshot_policy_name: Optional[str] = None,
repeat_weekdays: Optional[str] = None,
time_points: Optional[str] = None,
retention_days: Optional[int] = None)
func NewAutoSnapshotPolicy(ctx *Context, name string, args AutoSnapshotPolicyArgs, opts ...ResourceOption) (*AutoSnapshotPolicy, error)
public AutoSnapshotPolicy(string name, AutoSnapshotPolicyArgs args, CustomResourceOptions? opts = null)
public AutoSnapshotPolicy(String name, AutoSnapshotPolicyArgs args)
public AutoSnapshotPolicy(String name, AutoSnapshotPolicyArgs args, CustomResourceOptions options)
type: volcengine:nas:AutoSnapshotPolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args AutoSnapshotPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args AutoSnapshotPolicyArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args AutoSnapshotPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AutoSnapshotPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AutoSnapshotPolicyArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var volcengineAutoSnapshotPolicyResource = new Volcengine.Nas.AutoSnapshotPolicy("volcengineAutoSnapshotPolicyResource", new()
{
AutoSnapshotPolicyName = "string",
RepeatWeekdays = "string",
TimePoints = "string",
RetentionDays = 0,
});
example, err := nas.NewAutoSnapshotPolicy(ctx, "volcengineAutoSnapshotPolicyResource", &nas.AutoSnapshotPolicyArgs{
AutoSnapshotPolicyName: pulumi.String("string"),
RepeatWeekdays: pulumi.String("string"),
TimePoints: pulumi.String("string"),
RetentionDays: pulumi.Int(0),
})
var volcengineAutoSnapshotPolicyResource = new com.pulumi.volcengine.nas.AutoSnapshotPolicy("volcengineAutoSnapshotPolicyResource", com.pulumi.volcengine.nas.AutoSnapshotPolicyArgs.builder()
.autoSnapshotPolicyName("string")
.repeatWeekdays("string")
.timePoints("string")
.retentionDays(0)
.build());
volcengine_auto_snapshot_policy_resource = volcengine.nas.AutoSnapshotPolicy("volcengineAutoSnapshotPolicyResource",
auto_snapshot_policy_name="string",
repeat_weekdays="string",
time_points="string",
retention_days=0)
const volcengineAutoSnapshotPolicyResource = new volcengine.nas.AutoSnapshotPolicy("volcengineAutoSnapshotPolicyResource", {
autoSnapshotPolicyName: "string",
repeatWeekdays: "string",
timePoints: "string",
retentionDays: 0,
});
type: volcengine:nas:AutoSnapshotPolicy
properties:
autoSnapshotPolicyName: string
repeatWeekdays: string
retentionDays: 0
timePoints: string
AutoSnapshotPolicy Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The AutoSnapshotPolicy resource accepts the following input properties:
- Auto
Snapshot stringPolicy Name - The name of the auto snapshot policy.
- Repeat
Weekdays string - The repeat weekdays of the auto snapshot policy. Support setting multiple dates, separated by English commas. Valid values:
1
~7
. - Time
Points string - The time points of the auto snapshot policy. Support setting multiple dates, separated by English commas. Valid values:
0
~23
. - Retention
Days int - The retention days of the auto snapshot policy. Valid values: -1(permanent) or 1 ~ 65536. Default is 30.
- Auto
Snapshot stringPolicy Name - The name of the auto snapshot policy.
- Repeat
Weekdays string - The repeat weekdays of the auto snapshot policy. Support setting multiple dates, separated by English commas. Valid values:
1
~7
. - Time
Points string - The time points of the auto snapshot policy. Support setting multiple dates, separated by English commas. Valid values:
0
~23
. - Retention
Days int - The retention days of the auto snapshot policy. Valid values: -1(permanent) or 1 ~ 65536. Default is 30.
- auto
Snapshot StringPolicy Name - The name of the auto snapshot policy.
- repeat
Weekdays String - The repeat weekdays of the auto snapshot policy. Support setting multiple dates, separated by English commas. Valid values:
1
~7
. - time
Points String - The time points of the auto snapshot policy. Support setting multiple dates, separated by English commas. Valid values:
0
~23
. - retention
Days Integer - The retention days of the auto snapshot policy. Valid values: -1(permanent) or 1 ~ 65536. Default is 30.
- auto
Snapshot stringPolicy Name - The name of the auto snapshot policy.
- repeat
Weekdays string - The repeat weekdays of the auto snapshot policy. Support setting multiple dates, separated by English commas. Valid values:
1
~7
. - time
Points string - The time points of the auto snapshot policy. Support setting multiple dates, separated by English commas. Valid values:
0
~23
. - retention
Days number - The retention days of the auto snapshot policy. Valid values: -1(permanent) or 1 ~ 65536. Default is 30.
- auto_
snapshot_ strpolicy_ name - The name of the auto snapshot policy.
- repeat_
weekdays str - The repeat weekdays of the auto snapshot policy. Support setting multiple dates, separated by English commas. Valid values:
1
~7
. - time_
points str - The time points of the auto snapshot policy. Support setting multiple dates, separated by English commas. Valid values:
0
~23
. - retention_
days int - The retention days of the auto snapshot policy. Valid values: -1(permanent) or 1 ~ 65536. Default is 30.
- auto
Snapshot StringPolicy Name - The name of the auto snapshot policy.
- repeat
Weekdays String - The repeat weekdays of the auto snapshot policy. Support setting multiple dates, separated by English commas. Valid values:
1
~7
. - time
Points String - The time points of the auto snapshot policy. Support setting multiple dates, separated by English commas. Valid values:
0
~23
. - retention
Days Number - The retention days of the auto snapshot policy. Valid values: -1(permanent) or 1 ~ 65536. Default is 30.
Outputs
All input properties are implicitly available as output properties. Additionally, the AutoSnapshotPolicy resource produces the following output properties:
- Create
Time string - The create time of auto snapshot policy.
- File
System intCount - The count of file system which auto snapshot policy bind.
- Id string
- The provider-assigned unique ID for this managed resource.
- Status string
- The status of auto snapshot policy.
- Create
Time string - The create time of auto snapshot policy.
- File
System intCount - The count of file system which auto snapshot policy bind.
- Id string
- The provider-assigned unique ID for this managed resource.
- Status string
- The status of auto snapshot policy.
- create
Time String - The create time of auto snapshot policy.
- file
System IntegerCount - The count of file system which auto snapshot policy bind.
- id String
- The provider-assigned unique ID for this managed resource.
- status String
- The status of auto snapshot policy.
- create
Time string - The create time of auto snapshot policy.
- file
System numberCount - The count of file system which auto snapshot policy bind.
- id string
- The provider-assigned unique ID for this managed resource.
- status string
- The status of auto snapshot policy.
- create_
time str - The create time of auto snapshot policy.
- file_
system_ intcount - The count of file system which auto snapshot policy bind.
- id str
- The provider-assigned unique ID for this managed resource.
- status str
- The status of auto snapshot policy.
- create
Time String - The create time of auto snapshot policy.
- file
System NumberCount - The count of file system which auto snapshot policy bind.
- id String
- The provider-assigned unique ID for this managed resource.
- status String
- The status of auto snapshot policy.
Look up Existing AutoSnapshotPolicy Resource
Get an existing AutoSnapshotPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: AutoSnapshotPolicyState, opts?: CustomResourceOptions): AutoSnapshotPolicy
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
auto_snapshot_policy_name: Optional[str] = None,
create_time: Optional[str] = None,
file_system_count: Optional[int] = None,
repeat_weekdays: Optional[str] = None,
retention_days: Optional[int] = None,
status: Optional[str] = None,
time_points: Optional[str] = None) -> AutoSnapshotPolicy
func GetAutoSnapshotPolicy(ctx *Context, name string, id IDInput, state *AutoSnapshotPolicyState, opts ...ResourceOption) (*AutoSnapshotPolicy, error)
public static AutoSnapshotPolicy Get(string name, Input<string> id, AutoSnapshotPolicyState? state, CustomResourceOptions? opts = null)
public static AutoSnapshotPolicy get(String name, Output<String> id, AutoSnapshotPolicyState state, CustomResourceOptions options)
resources: _: type: volcengine:nas:AutoSnapshotPolicy get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Auto
Snapshot stringPolicy Name - The name of the auto snapshot policy.
- Create
Time string - The create time of auto snapshot policy.
- File
System intCount - The count of file system which auto snapshot policy bind.
- Repeat
Weekdays string - The repeat weekdays of the auto snapshot policy. Support setting multiple dates, separated by English commas. Valid values:
1
~7
. - Retention
Days int - The retention days of the auto snapshot policy. Valid values: -1(permanent) or 1 ~ 65536. Default is 30.
- Status string
- The status of auto snapshot policy.
- Time
Points string - The time points of the auto snapshot policy. Support setting multiple dates, separated by English commas. Valid values:
0
~23
.
- Auto
Snapshot stringPolicy Name - The name of the auto snapshot policy.
- Create
Time string - The create time of auto snapshot policy.
- File
System intCount - The count of file system which auto snapshot policy bind.
- Repeat
Weekdays string - The repeat weekdays of the auto snapshot policy. Support setting multiple dates, separated by English commas. Valid values:
1
~7
. - Retention
Days int - The retention days of the auto snapshot policy. Valid values: -1(permanent) or 1 ~ 65536. Default is 30.
- Status string
- The status of auto snapshot policy.
- Time
Points string - The time points of the auto snapshot policy. Support setting multiple dates, separated by English commas. Valid values:
0
~23
.
- auto
Snapshot StringPolicy Name - The name of the auto snapshot policy.
- create
Time String - The create time of auto snapshot policy.
- file
System IntegerCount - The count of file system which auto snapshot policy bind.
- repeat
Weekdays String - The repeat weekdays of the auto snapshot policy. Support setting multiple dates, separated by English commas. Valid values:
1
~7
. - retention
Days Integer - The retention days of the auto snapshot policy. Valid values: -1(permanent) or 1 ~ 65536. Default is 30.
- status String
- The status of auto snapshot policy.
- time
Points String - The time points of the auto snapshot policy. Support setting multiple dates, separated by English commas. Valid values:
0
~23
.
- auto
Snapshot stringPolicy Name - The name of the auto snapshot policy.
- create
Time string - The create time of auto snapshot policy.
- file
System numberCount - The count of file system which auto snapshot policy bind.
- repeat
Weekdays string - The repeat weekdays of the auto snapshot policy. Support setting multiple dates, separated by English commas. Valid values:
1
~7
. - retention
Days number - The retention days of the auto snapshot policy. Valid values: -1(permanent) or 1 ~ 65536. Default is 30.
- status string
- The status of auto snapshot policy.
- time
Points string - The time points of the auto snapshot policy. Support setting multiple dates, separated by English commas. Valid values:
0
~23
.
- auto_
snapshot_ strpolicy_ name - The name of the auto snapshot policy.
- create_
time str - The create time of auto snapshot policy.
- file_
system_ intcount - The count of file system which auto snapshot policy bind.
- repeat_
weekdays str - The repeat weekdays of the auto snapshot policy. Support setting multiple dates, separated by English commas. Valid values:
1
~7
. - retention_
days int - The retention days of the auto snapshot policy. Valid values: -1(permanent) or 1 ~ 65536. Default is 30.
- status str
- The status of auto snapshot policy.
- time_
points str - The time points of the auto snapshot policy. Support setting multiple dates, separated by English commas. Valid values:
0
~23
.
- auto
Snapshot StringPolicy Name - The name of the auto snapshot policy.
- create
Time String - The create time of auto snapshot policy.
- file
System NumberCount - The count of file system which auto snapshot policy bind.
- repeat
Weekdays String - The repeat weekdays of the auto snapshot policy. Support setting multiple dates, separated by English commas. Valid values:
1
~7
. - retention
Days Number - The retention days of the auto snapshot policy. Valid values: -1(permanent) or 1 ~ 65536. Default is 30.
- status String
- The status of auto snapshot policy.
- time
Points String - The time points of the auto snapshot policy. Support setting multiple dates, separated by English commas. Valid values:
0
~23
.
Import
NasAutoSnapshotPolicy can be imported using the id, e.g.
$ pulumi import volcengine:nas/autoSnapshotPolicy:AutoSnapshotPolicy default resource_id
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengine
Terraform Provider.