alicloud.ecs.AutoSnapshotPolicy
Explore with Pulumi AI
Provides a ECS Auto Snapshot Policy resource.
For information about ECS Auto Snapshot Policy and how to use it, see What is Auto Snapshot Policy.
NOTE: Available since v1.117.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const example = new alicloud.ecs.AutoSnapshotPolicy("example", {
name: "terraform-example",
repeatWeekdays: [
"1",
"2",
"3",
],
retentionDays: -1,
timePoints: [
"1",
"22",
"23",
],
});
import pulumi
import pulumi_alicloud as alicloud
example = alicloud.ecs.AutoSnapshotPolicy("example",
name="terraform-example",
repeat_weekdays=[
"1",
"2",
"3",
],
retention_days=-1,
time_points=[
"1",
"22",
"23",
])
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ecs.NewAutoSnapshotPolicy(ctx, "example", &ecs.AutoSnapshotPolicyArgs{
Name: pulumi.String("terraform-example"),
RepeatWeekdays: pulumi.StringArray{
pulumi.String("1"),
pulumi.String("2"),
pulumi.String("3"),
},
RetentionDays: pulumi.Int(-1),
TimePoints: pulumi.StringArray{
pulumi.String("1"),
pulumi.String("22"),
pulumi.String("23"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var example = new AliCloud.Ecs.AutoSnapshotPolicy("example", new()
{
Name = "terraform-example",
RepeatWeekdays = new[]
{
"1",
"2",
"3",
},
RetentionDays = -1,
TimePoints = new[]
{
"1",
"22",
"23",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ecs.AutoSnapshotPolicy;
import com.pulumi.alicloud.ecs.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 example = new AutoSnapshotPolicy("example", AutoSnapshotPolicyArgs.builder()
.name("terraform-example")
.repeatWeekdays(
"1",
"2",
"3")
.retentionDays(-1)
.timePoints(
"1",
"22",
"23")
.build());
}
}
resources:
example:
type: alicloud:ecs:AutoSnapshotPolicy
properties:
name: terraform-example
repeatWeekdays:
- '1'
- '2'
- '3'
retentionDays: -1
timePoints:
- '1'
- '22'
- '23'
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,
repeat_weekdays: Optional[Sequence[str]] = None,
retention_days: Optional[int] = None,
time_points: Optional[Sequence[str]] = None,
auto_snapshot_policy_name: Optional[str] = None,
copied_snapshots_retention_days: Optional[int] = None,
copy_encryption_configuration: Optional[AutoSnapshotPolicyCopyEncryptionConfigurationArgs] = None,
enable_cross_region_copy: Optional[bool] = None,
name: Optional[str] = None,
resource_group_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
target_copy_regions: Optional[Sequence[str]] = 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: alicloud:ecs: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 autoSnapshotPolicyResource = new AliCloud.Ecs.AutoSnapshotPolicy("autoSnapshotPolicyResource", new()
{
RepeatWeekdays = new[]
{
"string",
},
RetentionDays = 0,
TimePoints = new[]
{
"string",
},
AutoSnapshotPolicyName = "string",
CopiedSnapshotsRetentionDays = 0,
CopyEncryptionConfiguration = new AliCloud.Ecs.Inputs.AutoSnapshotPolicyCopyEncryptionConfigurationArgs
{
Encrypted = false,
KmsKeyId = "string",
},
EnableCrossRegionCopy = false,
ResourceGroupId = "string",
Tags =
{
{ "string", "string" },
},
TargetCopyRegions = new[]
{
"string",
},
});
example, err := ecs.NewAutoSnapshotPolicy(ctx, "autoSnapshotPolicyResource", &ecs.AutoSnapshotPolicyArgs{
RepeatWeekdays: pulumi.StringArray{
pulumi.String("string"),
},
RetentionDays: pulumi.Int(0),
TimePoints: pulumi.StringArray{
pulumi.String("string"),
},
AutoSnapshotPolicyName: pulumi.String("string"),
CopiedSnapshotsRetentionDays: pulumi.Int(0),
CopyEncryptionConfiguration: &ecs.AutoSnapshotPolicyCopyEncryptionConfigurationArgs{
Encrypted: pulumi.Bool(false),
KmsKeyId: pulumi.String("string"),
},
EnableCrossRegionCopy: pulumi.Bool(false),
ResourceGroupId: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
TargetCopyRegions: pulumi.StringArray{
pulumi.String("string"),
},
})
var autoSnapshotPolicyResource = new AutoSnapshotPolicy("autoSnapshotPolicyResource", AutoSnapshotPolicyArgs.builder()
.repeatWeekdays("string")
.retentionDays(0)
.timePoints("string")
.autoSnapshotPolicyName("string")
.copiedSnapshotsRetentionDays(0)
.copyEncryptionConfiguration(AutoSnapshotPolicyCopyEncryptionConfigurationArgs.builder()
.encrypted(false)
.kmsKeyId("string")
.build())
.enableCrossRegionCopy(false)
.resourceGroupId("string")
.tags(Map.of("string", "string"))
.targetCopyRegions("string")
.build());
auto_snapshot_policy_resource = alicloud.ecs.AutoSnapshotPolicy("autoSnapshotPolicyResource",
repeat_weekdays=["string"],
retention_days=0,
time_points=["string"],
auto_snapshot_policy_name="string",
copied_snapshots_retention_days=0,
copy_encryption_configuration={
"encrypted": False,
"kms_key_id": "string",
},
enable_cross_region_copy=False,
resource_group_id="string",
tags={
"string": "string",
},
target_copy_regions=["string"])
const autoSnapshotPolicyResource = new alicloud.ecs.AutoSnapshotPolicy("autoSnapshotPolicyResource", {
repeatWeekdays: ["string"],
retentionDays: 0,
timePoints: ["string"],
autoSnapshotPolicyName: "string",
copiedSnapshotsRetentionDays: 0,
copyEncryptionConfiguration: {
encrypted: false,
kmsKeyId: "string",
},
enableCrossRegionCopy: false,
resourceGroupId: "string",
tags: {
string: "string",
},
targetCopyRegions: ["string"],
});
type: alicloud:ecs:AutoSnapshotPolicy
properties:
autoSnapshotPolicyName: string
copiedSnapshotsRetentionDays: 0
copyEncryptionConfiguration:
encrypted: false
kmsKeyId: string
enableCrossRegionCopy: false
repeatWeekdays:
- string
resourceGroupId: string
retentionDays: 0
tags:
string: string
targetCopyRegions:
- string
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:
- Repeat
Weekdays List<string> - The days of the week on which to create automatic snapshots. Valid values:
1
to7
, which correspond to the days of the week. For example,1
indicates Monday. One or more days can be specified. - Retention
Days int - The retention period of the automatic snapshots. Unit: days. Valid values:
-1
: Automatic snapshots are retained until they are deleted.
- Time
Points List<string> The points in time of the day at which to create automatic snapshots.
The time is displayed in UTC+8. Unit: hours. Valid values:
0
to23
, which correspond to the 24 points in time on the hour from 00:00:00 to 23:00:00. For example, 1 indicates 01:00:00. Multiple points in time can be specified.The parameter value is a JSON array that contains up to 24 points in time separated by commas (,). Example: ["0", "1", ... "23"].
The following arguments will be discarded. Please use new fields as soon as possible:
- Auto
Snapshot stringPolicy Name - The name of the automatic snapshot policy. The name must be 2 to 128 characters in length. The name must start with a letter and cannot start with http:// or https://. The name can contain letters, digits, colons (:), underscores (_), and hyphens (-).
- Copied
Snapshots intRetention Days - The retention period of the snapshot copy in the destination region. Unit: days. Valid values:
-1
: The snapshot copy is retained until it is deleted.
- Copy
Encryption Pulumi.Configuration Ali Cloud. Ecs. Inputs. Auto Snapshot Policy Copy Encryption Configuration - The encryption parameters for cross-region snapshot replication. See
copy_encryption_configuration
below. - Enable
Cross boolRegion Copy - Specifies whether to enable cross-region replication for snapshots. Valid values:
true
,false
. - Name string
- . Field
name
has been deprecated from provider version 1.236.0. New fieldauto_snapshot_policy_name
instead. - Resource
Group stringId - The ID of the resource group. If this parameter is specified to query resources, up to 1,000 resources that belong to the specified resource group can be displayed in the response.
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Target
Copy List<string>Regions - The destination region to which to copy the snapshot. You can specify only a single destination region.
- Repeat
Weekdays []string - The days of the week on which to create automatic snapshots. Valid values:
1
to7
, which correspond to the days of the week. For example,1
indicates Monday. One or more days can be specified. - Retention
Days int - The retention period of the automatic snapshots. Unit: days. Valid values:
-1
: Automatic snapshots are retained until they are deleted.
- Time
Points []string The points in time of the day at which to create automatic snapshots.
The time is displayed in UTC+8. Unit: hours. Valid values:
0
to23
, which correspond to the 24 points in time on the hour from 00:00:00 to 23:00:00. For example, 1 indicates 01:00:00. Multiple points in time can be specified.The parameter value is a JSON array that contains up to 24 points in time separated by commas (,). Example: ["0", "1", ... "23"].
The following arguments will be discarded. Please use new fields as soon as possible:
- Auto
Snapshot stringPolicy Name - The name of the automatic snapshot policy. The name must be 2 to 128 characters in length. The name must start with a letter and cannot start with http:// or https://. The name can contain letters, digits, colons (:), underscores (_), and hyphens (-).
- Copied
Snapshots intRetention Days - The retention period of the snapshot copy in the destination region. Unit: days. Valid values:
-1
: The snapshot copy is retained until it is deleted.
- Copy
Encryption AutoConfiguration Snapshot Policy Copy Encryption Configuration Args - The encryption parameters for cross-region snapshot replication. See
copy_encryption_configuration
below. - Enable
Cross boolRegion Copy - Specifies whether to enable cross-region replication for snapshots. Valid values:
true
,false
. - Name string
- . Field
name
has been deprecated from provider version 1.236.0. New fieldauto_snapshot_policy_name
instead. - Resource
Group stringId - The ID of the resource group. If this parameter is specified to query resources, up to 1,000 resources that belong to the specified resource group can be displayed in the response.
- map[string]string
- A mapping of tags to assign to the resource.
- Target
Copy []stringRegions - The destination region to which to copy the snapshot. You can specify only a single destination region.
- repeat
Weekdays List<String> - The days of the week on which to create automatic snapshots. Valid values:
1
to7
, which correspond to the days of the week. For example,1
indicates Monday. One or more days can be specified. - retention
Days Integer - The retention period of the automatic snapshots. Unit: days. Valid values:
-1
: Automatic snapshots are retained until they are deleted.
- time
Points List<String> The points in time of the day at which to create automatic snapshots.
The time is displayed in UTC+8. Unit: hours. Valid values:
0
to23
, which correspond to the 24 points in time on the hour from 00:00:00 to 23:00:00. For example, 1 indicates 01:00:00. Multiple points in time can be specified.The parameter value is a JSON array that contains up to 24 points in time separated by commas (,). Example: ["0", "1", ... "23"].
The following arguments will be discarded. Please use new fields as soon as possible:
- auto
Snapshot StringPolicy Name - The name of the automatic snapshot policy. The name must be 2 to 128 characters in length. The name must start with a letter and cannot start with http:// or https://. The name can contain letters, digits, colons (:), underscores (_), and hyphens (-).
- copied
Snapshots IntegerRetention Days - The retention period of the snapshot copy in the destination region. Unit: days. Valid values:
-1
: The snapshot copy is retained until it is deleted.
- copy
Encryption AutoConfiguration Snapshot Policy Copy Encryption Configuration - The encryption parameters for cross-region snapshot replication. See
copy_encryption_configuration
below. - enable
Cross BooleanRegion Copy - Specifies whether to enable cross-region replication for snapshots. Valid values:
true
,false
. - name String
- . Field
name
has been deprecated from provider version 1.236.0. New fieldauto_snapshot_policy_name
instead. - resource
Group StringId - The ID of the resource group. If this parameter is specified to query resources, up to 1,000 resources that belong to the specified resource group can be displayed in the response.
- Map<String,String>
- A mapping of tags to assign to the resource.
- target
Copy List<String>Regions - The destination region to which to copy the snapshot. You can specify only a single destination region.
- repeat
Weekdays string[] - The days of the week on which to create automatic snapshots. Valid values:
1
to7
, which correspond to the days of the week. For example,1
indicates Monday. One or more days can be specified. - retention
Days number - The retention period of the automatic snapshots. Unit: days. Valid values:
-1
: Automatic snapshots are retained until they are deleted.
- time
Points string[] The points in time of the day at which to create automatic snapshots.
The time is displayed in UTC+8. Unit: hours. Valid values:
0
to23
, which correspond to the 24 points in time on the hour from 00:00:00 to 23:00:00. For example, 1 indicates 01:00:00. Multiple points in time can be specified.The parameter value is a JSON array that contains up to 24 points in time separated by commas (,). Example: ["0", "1", ... "23"].
The following arguments will be discarded. Please use new fields as soon as possible:
- auto
Snapshot stringPolicy Name - The name of the automatic snapshot policy. The name must be 2 to 128 characters in length. The name must start with a letter and cannot start with http:// or https://. The name can contain letters, digits, colons (:), underscores (_), and hyphens (-).
- copied
Snapshots numberRetention Days - The retention period of the snapshot copy in the destination region. Unit: days. Valid values:
-1
: The snapshot copy is retained until it is deleted.
- copy
Encryption AutoConfiguration Snapshot Policy Copy Encryption Configuration - The encryption parameters for cross-region snapshot replication. See
copy_encryption_configuration
below. - enable
Cross booleanRegion Copy - Specifies whether to enable cross-region replication for snapshots. Valid values:
true
,false
. - name string
- . Field
name
has been deprecated from provider version 1.236.0. New fieldauto_snapshot_policy_name
instead. - resource
Group stringId - The ID of the resource group. If this parameter is specified to query resources, up to 1,000 resources that belong to the specified resource group can be displayed in the response.
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- target
Copy string[]Regions - The destination region to which to copy the snapshot. You can specify only a single destination region.
- repeat_
weekdays Sequence[str] - The days of the week on which to create automatic snapshots. Valid values:
1
to7
, which correspond to the days of the week. For example,1
indicates Monday. One or more days can be specified. - retention_
days int - The retention period of the automatic snapshots. Unit: days. Valid values:
-1
: Automatic snapshots are retained until they are deleted.
- time_
points Sequence[str] The points in time of the day at which to create automatic snapshots.
The time is displayed in UTC+8. Unit: hours. Valid values:
0
to23
, which correspond to the 24 points in time on the hour from 00:00:00 to 23:00:00. For example, 1 indicates 01:00:00. Multiple points in time can be specified.The parameter value is a JSON array that contains up to 24 points in time separated by commas (,). Example: ["0", "1", ... "23"].
The following arguments will be discarded. Please use new fields as soon as possible:
- auto_
snapshot_ strpolicy_ name - The name of the automatic snapshot policy. The name must be 2 to 128 characters in length. The name must start with a letter and cannot start with http:// or https://. The name can contain letters, digits, colons (:), underscores (_), and hyphens (-).
- copied_
snapshots_ intretention_ days - The retention period of the snapshot copy in the destination region. Unit: days. Valid values:
-1
: The snapshot copy is retained until it is deleted.
- copy_
encryption_ Autoconfiguration Snapshot Policy Copy Encryption Configuration Args - The encryption parameters for cross-region snapshot replication. See
copy_encryption_configuration
below. - enable_
cross_ boolregion_ copy - Specifies whether to enable cross-region replication for snapshots. Valid values:
true
,false
. - name str
- . Field
name
has been deprecated from provider version 1.236.0. New fieldauto_snapshot_policy_name
instead. - resource_
group_ strid - The ID of the resource group. If this parameter is specified to query resources, up to 1,000 resources that belong to the specified resource group can be displayed in the response.
- Mapping[str, str]
- A mapping of tags to assign to the resource.
- target_
copy_ Sequence[str]regions - The destination region to which to copy the snapshot. You can specify only a single destination region.
- repeat
Weekdays List<String> - The days of the week on which to create automatic snapshots. Valid values:
1
to7
, which correspond to the days of the week. For example,1
indicates Monday. One or more days can be specified. - retention
Days Number - The retention period of the automatic snapshots. Unit: days. Valid values:
-1
: Automatic snapshots are retained until they are deleted.
- time
Points List<String> The points in time of the day at which to create automatic snapshots.
The time is displayed in UTC+8. Unit: hours. Valid values:
0
to23
, which correspond to the 24 points in time on the hour from 00:00:00 to 23:00:00. For example, 1 indicates 01:00:00. Multiple points in time can be specified.The parameter value is a JSON array that contains up to 24 points in time separated by commas (,). Example: ["0", "1", ... "23"].
The following arguments will be discarded. Please use new fields as soon as possible:
- auto
Snapshot StringPolicy Name - The name of the automatic snapshot policy. The name must be 2 to 128 characters in length. The name must start with a letter and cannot start with http:// or https://. The name can contain letters, digits, colons (:), underscores (_), and hyphens (-).
- copied
Snapshots NumberRetention Days - The retention period of the snapshot copy in the destination region. Unit: days. Valid values:
-1
: The snapshot copy is retained until it is deleted.
- copy
Encryption Property MapConfiguration - The encryption parameters for cross-region snapshot replication. See
copy_encryption_configuration
below. - enable
Cross BooleanRegion Copy - Specifies whether to enable cross-region replication for snapshots. Valid values:
true
,false
. - name String
- . Field
name
has been deprecated from provider version 1.236.0. New fieldauto_snapshot_policy_name
instead. - resource
Group StringId - The ID of the resource group. If this parameter is specified to query resources, up to 1,000 resources that belong to the specified resource group can be displayed in the response.
- Map<String>
- A mapping of tags to assign to the resource.
- target
Copy List<String>Regions - The destination region to which to copy the snapshot. You can specify only a single destination region.
Outputs
All input properties are implicitly available as output properties. Additionally, the AutoSnapshotPolicy resource produces the following output properties:
- Create
Time string - (Available since v1.236.0) The time when the automatic snapshot policy was created. The time follows the ISO 8601 standard in the yyyy-MM-ddThh:mm:ssZ format. The time is displayed in UTC.
- Id string
- The provider-assigned unique ID for this managed resource.
- Region
Id string - (Available since v1.236.0) The region ID of the automatic snapshot policy.
- Status string
- The status of the automatic snapshot policy.
- Create
Time string - (Available since v1.236.0) The time when the automatic snapshot policy was created. The time follows the ISO 8601 standard in the yyyy-MM-ddThh:mm:ssZ format. The time is displayed in UTC.
- Id string
- The provider-assigned unique ID for this managed resource.
- Region
Id string - (Available since v1.236.0) The region ID of the automatic snapshot policy.
- Status string
- The status of the automatic snapshot policy.
- create
Time String - (Available since v1.236.0) The time when the automatic snapshot policy was created. The time follows the ISO 8601 standard in the yyyy-MM-ddThh:mm:ssZ format. The time is displayed in UTC.
- id String
- The provider-assigned unique ID for this managed resource.
- region
Id String - (Available since v1.236.0) The region ID of the automatic snapshot policy.
- status String
- The status of the automatic snapshot policy.
- create
Time string - (Available since v1.236.0) The time when the automatic snapshot policy was created. The time follows the ISO 8601 standard in the yyyy-MM-ddThh:mm:ssZ format. The time is displayed in UTC.
- id string
- The provider-assigned unique ID for this managed resource.
- region
Id string - (Available since v1.236.0) The region ID of the automatic snapshot policy.
- status string
- The status of the automatic snapshot policy.
- create_
time str - (Available since v1.236.0) The time when the automatic snapshot policy was created. The time follows the ISO 8601 standard in the yyyy-MM-ddThh:mm:ssZ format. The time is displayed in UTC.
- id str
- The provider-assigned unique ID for this managed resource.
- region_
id str - (Available since v1.236.0) The region ID of the automatic snapshot policy.
- status str
- The status of the automatic snapshot policy.
- create
Time String - (Available since v1.236.0) The time when the automatic snapshot policy was created. The time follows the ISO 8601 standard in the yyyy-MM-ddThh:mm:ssZ format. The time is displayed in UTC.
- id String
- The provider-assigned unique ID for this managed resource.
- region
Id String - (Available since v1.236.0) The region ID of the automatic snapshot policy.
- status String
- The status of the automatic 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,
copied_snapshots_retention_days: Optional[int] = None,
copy_encryption_configuration: Optional[AutoSnapshotPolicyCopyEncryptionConfigurationArgs] = None,
create_time: Optional[str] = None,
enable_cross_region_copy: Optional[bool] = None,
name: Optional[str] = None,
region_id: Optional[str] = None,
repeat_weekdays: Optional[Sequence[str]] = None,
resource_group_id: Optional[str] = None,
retention_days: Optional[int] = None,
status: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
target_copy_regions: Optional[Sequence[str]] = None,
time_points: Optional[Sequence[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: alicloud:ecs: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 automatic snapshot policy. The name must be 2 to 128 characters in length. The name must start with a letter and cannot start with http:// or https://. The name can contain letters, digits, colons (:), underscores (_), and hyphens (-).
- Copied
Snapshots intRetention Days - The retention period of the snapshot copy in the destination region. Unit: days. Valid values:
-1
: The snapshot copy is retained until it is deleted.
- Copy
Encryption Pulumi.Configuration Ali Cloud. Ecs. Inputs. Auto Snapshot Policy Copy Encryption Configuration - The encryption parameters for cross-region snapshot replication. See
copy_encryption_configuration
below. - Create
Time string - (Available since v1.236.0) The time when the automatic snapshot policy was created. The time follows the ISO 8601 standard in the yyyy-MM-ddThh:mm:ssZ format. The time is displayed in UTC.
- Enable
Cross boolRegion Copy - Specifies whether to enable cross-region replication for snapshots. Valid values:
true
,false
. - Name string
- . Field
name
has been deprecated from provider version 1.236.0. New fieldauto_snapshot_policy_name
instead. - Region
Id string - (Available since v1.236.0) The region ID of the automatic snapshot policy.
- Repeat
Weekdays List<string> - The days of the week on which to create automatic snapshots. Valid values:
1
to7
, which correspond to the days of the week. For example,1
indicates Monday. One or more days can be specified. - Resource
Group stringId - The ID of the resource group. If this parameter is specified to query resources, up to 1,000 resources that belong to the specified resource group can be displayed in the response.
- Retention
Days int - The retention period of the automatic snapshots. Unit: days. Valid values:
-1
: Automatic snapshots are retained until they are deleted.
- Status string
- The status of the automatic snapshot policy.
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Target
Copy List<string>Regions - The destination region to which to copy the snapshot. You can specify only a single destination region.
- Time
Points List<string> The points in time of the day at which to create automatic snapshots.
The time is displayed in UTC+8. Unit: hours. Valid values:
0
to23
, which correspond to the 24 points in time on the hour from 00:00:00 to 23:00:00. For example, 1 indicates 01:00:00. Multiple points in time can be specified.The parameter value is a JSON array that contains up to 24 points in time separated by commas (,). Example: ["0", "1", ... "23"].
The following arguments will be discarded. Please use new fields as soon as possible:
- Auto
Snapshot stringPolicy Name - The name of the automatic snapshot policy. The name must be 2 to 128 characters in length. The name must start with a letter and cannot start with http:// or https://. The name can contain letters, digits, colons (:), underscores (_), and hyphens (-).
- Copied
Snapshots intRetention Days - The retention period of the snapshot copy in the destination region. Unit: days. Valid values:
-1
: The snapshot copy is retained until it is deleted.
- Copy
Encryption AutoConfiguration Snapshot Policy Copy Encryption Configuration Args - The encryption parameters for cross-region snapshot replication. See
copy_encryption_configuration
below. - Create
Time string - (Available since v1.236.0) The time when the automatic snapshot policy was created. The time follows the ISO 8601 standard in the yyyy-MM-ddThh:mm:ssZ format. The time is displayed in UTC.
- Enable
Cross boolRegion Copy - Specifies whether to enable cross-region replication for snapshots. Valid values:
true
,false
. - Name string
- . Field
name
has been deprecated from provider version 1.236.0. New fieldauto_snapshot_policy_name
instead. - Region
Id string - (Available since v1.236.0) The region ID of the automatic snapshot policy.
- Repeat
Weekdays []string - The days of the week on which to create automatic snapshots. Valid values:
1
to7
, which correspond to the days of the week. For example,1
indicates Monday. One or more days can be specified. - Resource
Group stringId - The ID of the resource group. If this parameter is specified to query resources, up to 1,000 resources that belong to the specified resource group can be displayed in the response.
- Retention
Days int - The retention period of the automatic snapshots. Unit: days. Valid values:
-1
: Automatic snapshots are retained until they are deleted.
- Status string
- The status of the automatic snapshot policy.
- map[string]string
- A mapping of tags to assign to the resource.
- Target
Copy []stringRegions - The destination region to which to copy the snapshot. You can specify only a single destination region.
- Time
Points []string The points in time of the day at which to create automatic snapshots.
The time is displayed in UTC+8. Unit: hours. Valid values:
0
to23
, which correspond to the 24 points in time on the hour from 00:00:00 to 23:00:00. For example, 1 indicates 01:00:00. Multiple points in time can be specified.The parameter value is a JSON array that contains up to 24 points in time separated by commas (,). Example: ["0", "1", ... "23"].
The following arguments will be discarded. Please use new fields as soon as possible:
- auto
Snapshot StringPolicy Name - The name of the automatic snapshot policy. The name must be 2 to 128 characters in length. The name must start with a letter and cannot start with http:// or https://. The name can contain letters, digits, colons (:), underscores (_), and hyphens (-).
- copied
Snapshots IntegerRetention Days - The retention period of the snapshot copy in the destination region. Unit: days. Valid values:
-1
: The snapshot copy is retained until it is deleted.
- copy
Encryption AutoConfiguration Snapshot Policy Copy Encryption Configuration - The encryption parameters for cross-region snapshot replication. See
copy_encryption_configuration
below. - create
Time String - (Available since v1.236.0) The time when the automatic snapshot policy was created. The time follows the ISO 8601 standard in the yyyy-MM-ddThh:mm:ssZ format. The time is displayed in UTC.
- enable
Cross BooleanRegion Copy - Specifies whether to enable cross-region replication for snapshots. Valid values:
true
,false
. - name String
- . Field
name
has been deprecated from provider version 1.236.0. New fieldauto_snapshot_policy_name
instead. - region
Id String - (Available since v1.236.0) The region ID of the automatic snapshot policy.
- repeat
Weekdays List<String> - The days of the week on which to create automatic snapshots. Valid values:
1
to7
, which correspond to the days of the week. For example,1
indicates Monday. One or more days can be specified. - resource
Group StringId - The ID of the resource group. If this parameter is specified to query resources, up to 1,000 resources that belong to the specified resource group can be displayed in the response.
- retention
Days Integer - The retention period of the automatic snapshots. Unit: days. Valid values:
-1
: Automatic snapshots are retained until they are deleted.
- status String
- The status of the automatic snapshot policy.
- Map<String,String>
- A mapping of tags to assign to the resource.
- target
Copy List<String>Regions - The destination region to which to copy the snapshot. You can specify only a single destination region.
- time
Points List<String> The points in time of the day at which to create automatic snapshots.
The time is displayed in UTC+8. Unit: hours. Valid values:
0
to23
, which correspond to the 24 points in time on the hour from 00:00:00 to 23:00:00. For example, 1 indicates 01:00:00. Multiple points in time can be specified.The parameter value is a JSON array that contains up to 24 points in time separated by commas (,). Example: ["0", "1", ... "23"].
The following arguments will be discarded. Please use new fields as soon as possible:
- auto
Snapshot stringPolicy Name - The name of the automatic snapshot policy. The name must be 2 to 128 characters in length. The name must start with a letter and cannot start with http:// or https://. The name can contain letters, digits, colons (:), underscores (_), and hyphens (-).
- copied
Snapshots numberRetention Days - The retention period of the snapshot copy in the destination region. Unit: days. Valid values:
-1
: The snapshot copy is retained until it is deleted.
- copy
Encryption AutoConfiguration Snapshot Policy Copy Encryption Configuration - The encryption parameters for cross-region snapshot replication. See
copy_encryption_configuration
below. - create
Time string - (Available since v1.236.0) The time when the automatic snapshot policy was created. The time follows the ISO 8601 standard in the yyyy-MM-ddThh:mm:ssZ format. The time is displayed in UTC.
- enable
Cross booleanRegion Copy - Specifies whether to enable cross-region replication for snapshots. Valid values:
true
,false
. - name string
- . Field
name
has been deprecated from provider version 1.236.0. New fieldauto_snapshot_policy_name
instead. - region
Id string - (Available since v1.236.0) The region ID of the automatic snapshot policy.
- repeat
Weekdays string[] - The days of the week on which to create automatic snapshots. Valid values:
1
to7
, which correspond to the days of the week. For example,1
indicates Monday. One or more days can be specified. - resource
Group stringId - The ID of the resource group. If this parameter is specified to query resources, up to 1,000 resources that belong to the specified resource group can be displayed in the response.
- retention
Days number - The retention period of the automatic snapshots. Unit: days. Valid values:
-1
: Automatic snapshots are retained until they are deleted.
- status string
- The status of the automatic snapshot policy.
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- target
Copy string[]Regions - The destination region to which to copy the snapshot. You can specify only a single destination region.
- time
Points string[] The points in time of the day at which to create automatic snapshots.
The time is displayed in UTC+8. Unit: hours. Valid values:
0
to23
, which correspond to the 24 points in time on the hour from 00:00:00 to 23:00:00. For example, 1 indicates 01:00:00. Multiple points in time can be specified.The parameter value is a JSON array that contains up to 24 points in time separated by commas (,). Example: ["0", "1", ... "23"].
The following arguments will be discarded. Please use new fields as soon as possible:
- auto_
snapshot_ strpolicy_ name - The name of the automatic snapshot policy. The name must be 2 to 128 characters in length. The name must start with a letter and cannot start with http:// or https://. The name can contain letters, digits, colons (:), underscores (_), and hyphens (-).
- copied_
snapshots_ intretention_ days - The retention period of the snapshot copy in the destination region. Unit: days. Valid values:
-1
: The snapshot copy is retained until it is deleted.
- copy_
encryption_ Autoconfiguration Snapshot Policy Copy Encryption Configuration Args - The encryption parameters for cross-region snapshot replication. See
copy_encryption_configuration
below. - create_
time str - (Available since v1.236.0) The time when the automatic snapshot policy was created. The time follows the ISO 8601 standard in the yyyy-MM-ddThh:mm:ssZ format. The time is displayed in UTC.
- enable_
cross_ boolregion_ copy - Specifies whether to enable cross-region replication for snapshots. Valid values:
true
,false
. - name str
- . Field
name
has been deprecated from provider version 1.236.0. New fieldauto_snapshot_policy_name
instead. - region_
id str - (Available since v1.236.0) The region ID of the automatic snapshot policy.
- repeat_
weekdays Sequence[str] - The days of the week on which to create automatic snapshots. Valid values:
1
to7
, which correspond to the days of the week. For example,1
indicates Monday. One or more days can be specified. - resource_
group_ strid - The ID of the resource group. If this parameter is specified to query resources, up to 1,000 resources that belong to the specified resource group can be displayed in the response.
- retention_
days int - The retention period of the automatic snapshots. Unit: days. Valid values:
-1
: Automatic snapshots are retained until they are deleted.
- status str
- The status of the automatic snapshot policy.
- Mapping[str, str]
- A mapping of tags to assign to the resource.
- target_
copy_ Sequence[str]regions - The destination region to which to copy the snapshot. You can specify only a single destination region.
- time_
points Sequence[str] The points in time of the day at which to create automatic snapshots.
The time is displayed in UTC+8. Unit: hours. Valid values:
0
to23
, which correspond to the 24 points in time on the hour from 00:00:00 to 23:00:00. For example, 1 indicates 01:00:00. Multiple points in time can be specified.The parameter value is a JSON array that contains up to 24 points in time separated by commas (,). Example: ["0", "1", ... "23"].
The following arguments will be discarded. Please use new fields as soon as possible:
- auto
Snapshot StringPolicy Name - The name of the automatic snapshot policy. The name must be 2 to 128 characters in length. The name must start with a letter and cannot start with http:// or https://. The name can contain letters, digits, colons (:), underscores (_), and hyphens (-).
- copied
Snapshots NumberRetention Days - The retention period of the snapshot copy in the destination region. Unit: days. Valid values:
-1
: The snapshot copy is retained until it is deleted.
- copy
Encryption Property MapConfiguration - The encryption parameters for cross-region snapshot replication. See
copy_encryption_configuration
below. - create
Time String - (Available since v1.236.0) The time when the automatic snapshot policy was created. The time follows the ISO 8601 standard in the yyyy-MM-ddThh:mm:ssZ format. The time is displayed in UTC.
- enable
Cross BooleanRegion Copy - Specifies whether to enable cross-region replication for snapshots. Valid values:
true
,false
. - name String
- . Field
name
has been deprecated from provider version 1.236.0. New fieldauto_snapshot_policy_name
instead. - region
Id String - (Available since v1.236.0) The region ID of the automatic snapshot policy.
- repeat
Weekdays List<String> - The days of the week on which to create automatic snapshots. Valid values:
1
to7
, which correspond to the days of the week. For example,1
indicates Monday. One or more days can be specified. - resource
Group StringId - The ID of the resource group. If this parameter is specified to query resources, up to 1,000 resources that belong to the specified resource group can be displayed in the response.
- retention
Days Number - The retention period of the automatic snapshots. Unit: days. Valid values:
-1
: Automatic snapshots are retained until they are deleted.
- status String
- The status of the automatic snapshot policy.
- Map<String>
- A mapping of tags to assign to the resource.
- target
Copy List<String>Regions - The destination region to which to copy the snapshot. You can specify only a single destination region.
- time
Points List<String> The points in time of the day at which to create automatic snapshots.
The time is displayed in UTC+8. Unit: hours. Valid values:
0
to23
, which correspond to the 24 points in time on the hour from 00:00:00 to 23:00:00. For example, 1 indicates 01:00:00. Multiple points in time can be specified.The parameter value is a JSON array that contains up to 24 points in time separated by commas (,). Example: ["0", "1", ... "23"].
The following arguments will be discarded. Please use new fields as soon as possible:
Supporting Types
AutoSnapshotPolicyCopyEncryptionConfiguration, AutoSnapshotPolicyCopyEncryptionConfigurationArgs
- encrypted bool
- Whether to enable encryption for cross-region snapshot replication. Default value:
false
. Valid values:true
,false
. - kms_
key_ strid - The ID of the Key Management Service (KMS) key used to encrypt snapshots in cross-region snapshot replication.
Import
ECS Auto Snapshot Policy can be imported using the id, e.g.
$ pulumi import alicloud:ecs/autoSnapshotPolicy:AutoSnapshotPolicy example <id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.