alicloud.ebs.EnterpriseSnapshotPolicy
Explore with Pulumi AI
Provides a EBS Enterprise Snapshot Policy resource. enterprise snapshot policy.
For information about EBS Enterprise Snapshot Policy and how to use it, see What is Enterprise Snapshot Policy.
NOTE: Available since v1.215.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const defaultJkW46o = new alicloud.ecs.EcsDisk("defaultJkW46o", {
category: "cloud_essd",
description: "esp-attachment-test",
zoneId: "cn-hangzhou-i",
performanceLevel: "PL1",
size: 20,
diskName: name,
});
const defaultPE3jjR = new alicloud.ebs.EnterpriseSnapshotPolicy("defaultPE3jjR", {
status: "DISABLED",
desc: "DESC",
schedule: {
cronExpression: "0 0 0 1 * ?",
},
enterpriseSnapshotPolicyName: name,
targetType: "DISK",
retainRule: {
timeInterval: 120,
timeUnit: "DAYS",
},
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
default_jk_w46o = alicloud.ecs.EcsDisk("defaultJkW46o",
category="cloud_essd",
description="esp-attachment-test",
zone_id="cn-hangzhou-i",
performance_level="PL1",
size=20,
disk_name=name)
default_pe3jj_r = alicloud.ebs.EnterpriseSnapshotPolicy("defaultPE3jjR",
status="DISABLED",
desc="DESC",
schedule={
"cron_expression": "0 0 0 1 * ?",
},
enterprise_snapshot_policy_name=name,
target_type="DISK",
retain_rule={
"time_interval": 120,
"time_unit": "DAYS",
})
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ebs"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "terraform-example"
if param := cfg.Get("name"); param != "" {
name = param
}
_, err := ecs.NewEcsDisk(ctx, "defaultJkW46o", &ecs.EcsDiskArgs{
Category: pulumi.String("cloud_essd"),
Description: pulumi.String("esp-attachment-test"),
ZoneId: pulumi.String("cn-hangzhou-i"),
PerformanceLevel: pulumi.String("PL1"),
Size: pulumi.Int(20),
DiskName: pulumi.String(name),
})
if err != nil {
return err
}
_, err = ebs.NewEnterpriseSnapshotPolicy(ctx, "defaultPE3jjR", &ebs.EnterpriseSnapshotPolicyArgs{
Status: pulumi.String("DISABLED"),
Desc: pulumi.String("DESC"),
Schedule: &ebs.EnterpriseSnapshotPolicyScheduleArgs{
CronExpression: pulumi.String("0 0 0 1 * ?"),
},
EnterpriseSnapshotPolicyName: pulumi.String(name),
TargetType: pulumi.String("DISK"),
RetainRule: &ebs.EnterpriseSnapshotPolicyRetainRuleArgs{
TimeInterval: pulumi.Int(120),
TimeUnit: pulumi.String("DAYS"),
},
})
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 config = new Config();
var name = config.Get("name") ?? "terraform-example";
var defaultJkW46o = new AliCloud.Ecs.EcsDisk("defaultJkW46o", new()
{
Category = "cloud_essd",
Description = "esp-attachment-test",
ZoneId = "cn-hangzhou-i",
PerformanceLevel = "PL1",
Size = 20,
DiskName = name,
});
var defaultPE3jjR = new AliCloud.Ebs.EnterpriseSnapshotPolicy("defaultPE3jjR", new()
{
Status = "DISABLED",
Desc = "DESC",
Schedule = new AliCloud.Ebs.Inputs.EnterpriseSnapshotPolicyScheduleArgs
{
CronExpression = "0 0 0 1 * ?",
},
EnterpriseSnapshotPolicyName = name,
TargetType = "DISK",
RetainRule = new AliCloud.Ebs.Inputs.EnterpriseSnapshotPolicyRetainRuleArgs
{
TimeInterval = 120,
TimeUnit = "DAYS",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ecs.EcsDisk;
import com.pulumi.alicloud.ecs.EcsDiskArgs;
import com.pulumi.alicloud.ebs.EnterpriseSnapshotPolicy;
import com.pulumi.alicloud.ebs.EnterpriseSnapshotPolicyArgs;
import com.pulumi.alicloud.ebs.inputs.EnterpriseSnapshotPolicyScheduleArgs;
import com.pulumi.alicloud.ebs.inputs.EnterpriseSnapshotPolicyRetainRuleArgs;
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 config = ctx.config();
final var name = config.get("name").orElse("terraform-example");
var defaultJkW46o = new EcsDisk("defaultJkW46o", EcsDiskArgs.builder()
.category("cloud_essd")
.description("esp-attachment-test")
.zoneId("cn-hangzhou-i")
.performanceLevel("PL1")
.size("20")
.diskName(name)
.build());
var defaultPE3jjR = new EnterpriseSnapshotPolicy("defaultPE3jjR", EnterpriseSnapshotPolicyArgs.builder()
.status("DISABLED")
.desc("DESC")
.schedule(EnterpriseSnapshotPolicyScheduleArgs.builder()
.cronExpression("0 0 0 1 * ?")
.build())
.enterpriseSnapshotPolicyName(name)
.targetType("DISK")
.retainRule(EnterpriseSnapshotPolicyRetainRuleArgs.builder()
.timeInterval("120")
.timeUnit("DAYS")
.build())
.build());
}
}
configuration:
name:
type: string
default: terraform-example
resources:
defaultJkW46o:
type: alicloud:ecs:EcsDisk
properties:
category: cloud_essd
description: esp-attachment-test
zoneId: cn-hangzhou-i
performanceLevel: PL1
size: '20'
diskName: ${name}
defaultPE3jjR:
type: alicloud:ebs:EnterpriseSnapshotPolicy
properties:
status: DISABLED
desc: DESC
schedule:
cronExpression: 0 0 0 1 * ?
enterpriseSnapshotPolicyName: ${name}
targetType: DISK
retainRule:
timeInterval: '120'
timeUnit: DAYS
Create EnterpriseSnapshotPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new EnterpriseSnapshotPolicy(name: string, args: EnterpriseSnapshotPolicyArgs, opts?: CustomResourceOptions);
@overload
def EnterpriseSnapshotPolicy(resource_name: str,
args: EnterpriseSnapshotPolicyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def EnterpriseSnapshotPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
enterprise_snapshot_policy_name: Optional[str] = None,
retain_rule: Optional[EnterpriseSnapshotPolicyRetainRuleArgs] = None,
schedule: Optional[EnterpriseSnapshotPolicyScheduleArgs] = None,
target_type: Optional[str] = None,
cross_region_copy_info: Optional[EnterpriseSnapshotPolicyCrossRegionCopyInfoArgs] = None,
desc: Optional[str] = None,
resource_group_id: Optional[str] = None,
special_retain_rules: Optional[EnterpriseSnapshotPolicySpecialRetainRulesArgs] = None,
status: Optional[str] = None,
storage_rule: Optional[EnterpriseSnapshotPolicyStorageRuleArgs] = None,
tags: Optional[Mapping[str, str]] = None)
func NewEnterpriseSnapshotPolicy(ctx *Context, name string, args EnterpriseSnapshotPolicyArgs, opts ...ResourceOption) (*EnterpriseSnapshotPolicy, error)
public EnterpriseSnapshotPolicy(string name, EnterpriseSnapshotPolicyArgs args, CustomResourceOptions? opts = null)
public EnterpriseSnapshotPolicy(String name, EnterpriseSnapshotPolicyArgs args)
public EnterpriseSnapshotPolicy(String name, EnterpriseSnapshotPolicyArgs args, CustomResourceOptions options)
type: alicloud:ebs:EnterpriseSnapshotPolicy
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 EnterpriseSnapshotPolicyArgs
- 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 EnterpriseSnapshotPolicyArgs
- 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 EnterpriseSnapshotPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args EnterpriseSnapshotPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args EnterpriseSnapshotPolicyArgs
- 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 enterpriseSnapshotPolicyResource = new AliCloud.Ebs.EnterpriseSnapshotPolicy("enterpriseSnapshotPolicyResource", new()
{
EnterpriseSnapshotPolicyName = "string",
RetainRule = new AliCloud.Ebs.Inputs.EnterpriseSnapshotPolicyRetainRuleArgs
{
Number = 0,
TimeInterval = 0,
TimeUnit = "string",
},
Schedule = new AliCloud.Ebs.Inputs.EnterpriseSnapshotPolicyScheduleArgs
{
CronExpression = "string",
},
TargetType = "string",
CrossRegionCopyInfo = new AliCloud.Ebs.Inputs.EnterpriseSnapshotPolicyCrossRegionCopyInfoArgs
{
Enabled = false,
Regions = new[]
{
new AliCloud.Ebs.Inputs.EnterpriseSnapshotPolicyCrossRegionCopyInfoRegionArgs
{
RegionId = "string",
RetainDays = 0,
},
},
},
Desc = "string",
ResourceGroupId = "string",
SpecialRetainRules = new AliCloud.Ebs.Inputs.EnterpriseSnapshotPolicySpecialRetainRulesArgs
{
Enabled = false,
Rules = new[]
{
new AliCloud.Ebs.Inputs.EnterpriseSnapshotPolicySpecialRetainRulesRuleArgs
{
SpecialPeriodUnit = "string",
TimeInterval = 0,
TimeUnit = "string",
},
},
},
Status = "string",
StorageRule = new AliCloud.Ebs.Inputs.EnterpriseSnapshotPolicyStorageRuleArgs
{
EnableImmediateAccess = false,
},
Tags =
{
{ "string", "string" },
},
});
example, err := ebs.NewEnterpriseSnapshotPolicy(ctx, "enterpriseSnapshotPolicyResource", &ebs.EnterpriseSnapshotPolicyArgs{
EnterpriseSnapshotPolicyName: pulumi.String("string"),
RetainRule: &ebs.EnterpriseSnapshotPolicyRetainRuleArgs{
Number: pulumi.Int(0),
TimeInterval: pulumi.Int(0),
TimeUnit: pulumi.String("string"),
},
Schedule: &ebs.EnterpriseSnapshotPolicyScheduleArgs{
CronExpression: pulumi.String("string"),
},
TargetType: pulumi.String("string"),
CrossRegionCopyInfo: &ebs.EnterpriseSnapshotPolicyCrossRegionCopyInfoArgs{
Enabled: pulumi.Bool(false),
Regions: ebs.EnterpriseSnapshotPolicyCrossRegionCopyInfoRegionArray{
&ebs.EnterpriseSnapshotPolicyCrossRegionCopyInfoRegionArgs{
RegionId: pulumi.String("string"),
RetainDays: pulumi.Int(0),
},
},
},
Desc: pulumi.String("string"),
ResourceGroupId: pulumi.String("string"),
SpecialRetainRules: &ebs.EnterpriseSnapshotPolicySpecialRetainRulesArgs{
Enabled: pulumi.Bool(false),
Rules: ebs.EnterpriseSnapshotPolicySpecialRetainRulesRuleArray{
&ebs.EnterpriseSnapshotPolicySpecialRetainRulesRuleArgs{
SpecialPeriodUnit: pulumi.String("string"),
TimeInterval: pulumi.Int(0),
TimeUnit: pulumi.String("string"),
},
},
},
Status: pulumi.String("string"),
StorageRule: &ebs.EnterpriseSnapshotPolicyStorageRuleArgs{
EnableImmediateAccess: pulumi.Bool(false),
},
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var enterpriseSnapshotPolicyResource = new EnterpriseSnapshotPolicy("enterpriseSnapshotPolicyResource", EnterpriseSnapshotPolicyArgs.builder()
.enterpriseSnapshotPolicyName("string")
.retainRule(EnterpriseSnapshotPolicyRetainRuleArgs.builder()
.number(0)
.timeInterval(0)
.timeUnit("string")
.build())
.schedule(EnterpriseSnapshotPolicyScheduleArgs.builder()
.cronExpression("string")
.build())
.targetType("string")
.crossRegionCopyInfo(EnterpriseSnapshotPolicyCrossRegionCopyInfoArgs.builder()
.enabled(false)
.regions(EnterpriseSnapshotPolicyCrossRegionCopyInfoRegionArgs.builder()
.regionId("string")
.retainDays(0)
.build())
.build())
.desc("string")
.resourceGroupId("string")
.specialRetainRules(EnterpriseSnapshotPolicySpecialRetainRulesArgs.builder()
.enabled(false)
.rules(EnterpriseSnapshotPolicySpecialRetainRulesRuleArgs.builder()
.specialPeriodUnit("string")
.timeInterval(0)
.timeUnit("string")
.build())
.build())
.status("string")
.storageRule(EnterpriseSnapshotPolicyStorageRuleArgs.builder()
.enableImmediateAccess(false)
.build())
.tags(Map.of("string", "string"))
.build());
enterprise_snapshot_policy_resource = alicloud.ebs.EnterpriseSnapshotPolicy("enterpriseSnapshotPolicyResource",
enterprise_snapshot_policy_name="string",
retain_rule={
"number": 0,
"time_interval": 0,
"time_unit": "string",
},
schedule={
"cron_expression": "string",
},
target_type="string",
cross_region_copy_info={
"enabled": False,
"regions": [{
"region_id": "string",
"retain_days": 0,
}],
},
desc="string",
resource_group_id="string",
special_retain_rules={
"enabled": False,
"rules": [{
"special_period_unit": "string",
"time_interval": 0,
"time_unit": "string",
}],
},
status="string",
storage_rule={
"enable_immediate_access": False,
},
tags={
"string": "string",
})
const enterpriseSnapshotPolicyResource = new alicloud.ebs.EnterpriseSnapshotPolicy("enterpriseSnapshotPolicyResource", {
enterpriseSnapshotPolicyName: "string",
retainRule: {
number: 0,
timeInterval: 0,
timeUnit: "string",
},
schedule: {
cronExpression: "string",
},
targetType: "string",
crossRegionCopyInfo: {
enabled: false,
regions: [{
regionId: "string",
retainDays: 0,
}],
},
desc: "string",
resourceGroupId: "string",
specialRetainRules: {
enabled: false,
rules: [{
specialPeriodUnit: "string",
timeInterval: 0,
timeUnit: "string",
}],
},
status: "string",
storageRule: {
enableImmediateAccess: false,
},
tags: {
string: "string",
},
});
type: alicloud:ebs:EnterpriseSnapshotPolicy
properties:
crossRegionCopyInfo:
enabled: false
regions:
- regionId: string
retainDays: 0
desc: string
enterpriseSnapshotPolicyName: string
resourceGroupId: string
retainRule:
number: 0
timeInterval: 0
timeUnit: string
schedule:
cronExpression: string
specialRetainRules:
enabled: false
rules:
- specialPeriodUnit: string
timeInterval: 0
timeUnit: string
status: string
storageRule:
enableImmediateAccess: false
tags:
string: string
targetType: string
EnterpriseSnapshotPolicy 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 EnterpriseSnapshotPolicy resource accepts the following input properties:
- Enterprise
Snapshot stringPolicy Name - The name of the resource.
- Retain
Rule Pulumi.Ali Cloud. Ebs. Inputs. Enterprise Snapshot Policy Retain Rule - Snapshot retention policy representing resources. See
retain_rule
below. - Schedule
Pulumi.
Ali Cloud. Ebs. Inputs. Enterprise Snapshot Policy Schedule - The scheduling plan that represents the resource. See
schedule
below. - Target
Type string - Represents the target type of resource binding.
- Cross
Region Pulumi.Copy Info Ali Cloud. Ebs. Inputs. Enterprise Snapshot Policy Cross Region Copy Info - Snapshot replication information. See
cross_region_copy_info
below. - Desc string
- Description information representing the resource.
- Resource
Group stringId - The ID of the resource group.
- Special
Retain Pulumi.Rules Ali Cloud. Ebs. Inputs. Enterprise Snapshot Policy Special Retain Rules - Snapshot special retention rules. See
special_retain_rules
below. - Status string
- The status of the resource.
- Storage
Rule Pulumi.Ali Cloud. Ebs. Inputs. Enterprise Snapshot Policy Storage Rule - Snapshot storage policy. See
storage_rule
below. - Dictionary<string, string>
- The tag of the resource.
- Enterprise
Snapshot stringPolicy Name - The name of the resource.
- Retain
Rule EnterpriseSnapshot Policy Retain Rule Args - Snapshot retention policy representing resources. See
retain_rule
below. - Schedule
Enterprise
Snapshot Policy Schedule Args - The scheduling plan that represents the resource. See
schedule
below. - Target
Type string - Represents the target type of resource binding.
- Cross
Region EnterpriseCopy Info Snapshot Policy Cross Region Copy Info Args - Snapshot replication information. See
cross_region_copy_info
below. - Desc string
- Description information representing the resource.
- Resource
Group stringId - The ID of the resource group.
- Special
Retain EnterpriseRules Snapshot Policy Special Retain Rules Args - Snapshot special retention rules. See
special_retain_rules
below. - Status string
- The status of the resource.
- Storage
Rule EnterpriseSnapshot Policy Storage Rule Args - Snapshot storage policy. See
storage_rule
below. - map[string]string
- The tag of the resource.
- enterprise
Snapshot StringPolicy Name - The name of the resource.
- retain
Rule EnterpriseSnapshot Policy Retain Rule - Snapshot retention policy representing resources. See
retain_rule
below. - schedule
Enterprise
Snapshot Policy Schedule - The scheduling plan that represents the resource. See
schedule
below. - target
Type String - Represents the target type of resource binding.
- cross
Region EnterpriseCopy Info Snapshot Policy Cross Region Copy Info - Snapshot replication information. See
cross_region_copy_info
below. - desc String
- Description information representing the resource.
- resource
Group StringId - The ID of the resource group.
- special
Retain EnterpriseRules Snapshot Policy Special Retain Rules - Snapshot special retention rules. See
special_retain_rules
below. - status String
- The status of the resource.
- storage
Rule EnterpriseSnapshot Policy Storage Rule - Snapshot storage policy. See
storage_rule
below. - Map<String,String>
- The tag of the resource.
- enterprise
Snapshot stringPolicy Name - The name of the resource.
- retain
Rule EnterpriseSnapshot Policy Retain Rule - Snapshot retention policy representing resources. See
retain_rule
below. - schedule
Enterprise
Snapshot Policy Schedule - The scheduling plan that represents the resource. See
schedule
below. - target
Type string - Represents the target type of resource binding.
- cross
Region EnterpriseCopy Info Snapshot Policy Cross Region Copy Info - Snapshot replication information. See
cross_region_copy_info
below. - desc string
- Description information representing the resource.
- resource
Group stringId - The ID of the resource group.
- special
Retain EnterpriseRules Snapshot Policy Special Retain Rules - Snapshot special retention rules. See
special_retain_rules
below. - status string
- The status of the resource.
- storage
Rule EnterpriseSnapshot Policy Storage Rule - Snapshot storage policy. See
storage_rule
below. - {[key: string]: string}
- The tag of the resource.
- enterprise_
snapshot_ strpolicy_ name - The name of the resource.
- retain_
rule EnterpriseSnapshot Policy Retain Rule Args - Snapshot retention policy representing resources. See
retain_rule
below. - schedule
Enterprise
Snapshot Policy Schedule Args - The scheduling plan that represents the resource. See
schedule
below. - target_
type str - Represents the target type of resource binding.
- cross_
region_ Enterprisecopy_ info Snapshot Policy Cross Region Copy Info Args - Snapshot replication information. See
cross_region_copy_info
below. - desc str
- Description information representing the resource.
- resource_
group_ strid - The ID of the resource group.
- special_
retain_ Enterpriserules Snapshot Policy Special Retain Rules Args - Snapshot special retention rules. See
special_retain_rules
below. - status str
- The status of the resource.
- storage_
rule EnterpriseSnapshot Policy Storage Rule Args - Snapshot storage policy. See
storage_rule
below. - Mapping[str, str]
- The tag of the resource.
- enterprise
Snapshot StringPolicy Name - The name of the resource.
- retain
Rule Property Map - Snapshot retention policy representing resources. See
retain_rule
below. - schedule Property Map
- The scheduling plan that represents the resource. See
schedule
below. - target
Type String - Represents the target type of resource binding.
- cross
Region Property MapCopy Info - Snapshot replication information. See
cross_region_copy_info
below. - desc String
- Description information representing the resource.
- resource
Group StringId - The ID of the resource group.
- special
Retain Property MapRules - Snapshot special retention rules. See
special_retain_rules
below. - status String
- The status of the resource.
- storage
Rule Property Map - Snapshot storage policy. See
storage_rule
below. - Map<String>
- The tag of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the EnterpriseSnapshotPolicy resource produces the following output properties:
- Create
Time string - The creation time of the resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- Create
Time string - The creation time of the resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- create
Time String - The creation time of the resource.
- id String
- The provider-assigned unique ID for this managed resource.
- create
Time string - The creation time of the resource.
- id string
- The provider-assigned unique ID for this managed resource.
- create_
time str - The creation time of the resource.
- id str
- The provider-assigned unique ID for this managed resource.
- create
Time String - The creation time of the resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing EnterpriseSnapshotPolicy Resource
Get an existing EnterpriseSnapshotPolicy 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?: EnterpriseSnapshotPolicyState, opts?: CustomResourceOptions): EnterpriseSnapshotPolicy
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
create_time: Optional[str] = None,
cross_region_copy_info: Optional[EnterpriseSnapshotPolicyCrossRegionCopyInfoArgs] = None,
desc: Optional[str] = None,
enterprise_snapshot_policy_name: Optional[str] = None,
resource_group_id: Optional[str] = None,
retain_rule: Optional[EnterpriseSnapshotPolicyRetainRuleArgs] = None,
schedule: Optional[EnterpriseSnapshotPolicyScheduleArgs] = None,
special_retain_rules: Optional[EnterpriseSnapshotPolicySpecialRetainRulesArgs] = None,
status: Optional[str] = None,
storage_rule: Optional[EnterpriseSnapshotPolicyStorageRuleArgs] = None,
tags: Optional[Mapping[str, str]] = None,
target_type: Optional[str] = None) -> EnterpriseSnapshotPolicy
func GetEnterpriseSnapshotPolicy(ctx *Context, name string, id IDInput, state *EnterpriseSnapshotPolicyState, opts ...ResourceOption) (*EnterpriseSnapshotPolicy, error)
public static EnterpriseSnapshotPolicy Get(string name, Input<string> id, EnterpriseSnapshotPolicyState? state, CustomResourceOptions? opts = null)
public static EnterpriseSnapshotPolicy get(String name, Output<String> id, EnterpriseSnapshotPolicyState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Create
Time string - The creation time of the resource.
- Cross
Region Pulumi.Copy Info Ali Cloud. Ebs. Inputs. Enterprise Snapshot Policy Cross Region Copy Info - Snapshot replication information. See
cross_region_copy_info
below. - Desc string
- Description information representing the resource.
- Enterprise
Snapshot stringPolicy Name - The name of the resource.
- Resource
Group stringId - The ID of the resource group.
- Retain
Rule Pulumi.Ali Cloud. Ebs. Inputs. Enterprise Snapshot Policy Retain Rule - Snapshot retention policy representing resources. See
retain_rule
below. - Schedule
Pulumi.
Ali Cloud. Ebs. Inputs. Enterprise Snapshot Policy Schedule - The scheduling plan that represents the resource. See
schedule
below. - Special
Retain Pulumi.Rules Ali Cloud. Ebs. Inputs. Enterprise Snapshot Policy Special Retain Rules - Snapshot special retention rules. See
special_retain_rules
below. - Status string
- The status of the resource.
- Storage
Rule Pulumi.Ali Cloud. Ebs. Inputs. Enterprise Snapshot Policy Storage Rule - Snapshot storage policy. See
storage_rule
below. - Dictionary<string, string>
- The tag of the resource.
- Target
Type string - Represents the target type of resource binding.
- Create
Time string - The creation time of the resource.
- Cross
Region EnterpriseCopy Info Snapshot Policy Cross Region Copy Info Args - Snapshot replication information. See
cross_region_copy_info
below. - Desc string
- Description information representing the resource.
- Enterprise
Snapshot stringPolicy Name - The name of the resource.
- Resource
Group stringId - The ID of the resource group.
- Retain
Rule EnterpriseSnapshot Policy Retain Rule Args - Snapshot retention policy representing resources. See
retain_rule
below. - Schedule
Enterprise
Snapshot Policy Schedule Args - The scheduling plan that represents the resource. See
schedule
below. - Special
Retain EnterpriseRules Snapshot Policy Special Retain Rules Args - Snapshot special retention rules. See
special_retain_rules
below. - Status string
- The status of the resource.
- Storage
Rule EnterpriseSnapshot Policy Storage Rule Args - Snapshot storage policy. See
storage_rule
below. - map[string]string
- The tag of the resource.
- Target
Type string - Represents the target type of resource binding.
- create
Time String - The creation time of the resource.
- cross
Region EnterpriseCopy Info Snapshot Policy Cross Region Copy Info - Snapshot replication information. See
cross_region_copy_info
below. - desc String
- Description information representing the resource.
- enterprise
Snapshot StringPolicy Name - The name of the resource.
- resource
Group StringId - The ID of the resource group.
- retain
Rule EnterpriseSnapshot Policy Retain Rule - Snapshot retention policy representing resources. See
retain_rule
below. - schedule
Enterprise
Snapshot Policy Schedule - The scheduling plan that represents the resource. See
schedule
below. - special
Retain EnterpriseRules Snapshot Policy Special Retain Rules - Snapshot special retention rules. See
special_retain_rules
below. - status String
- The status of the resource.
- storage
Rule EnterpriseSnapshot Policy Storage Rule - Snapshot storage policy. See
storage_rule
below. - Map<String,String>
- The tag of the resource.
- target
Type String - Represents the target type of resource binding.
- create
Time string - The creation time of the resource.
- cross
Region EnterpriseCopy Info Snapshot Policy Cross Region Copy Info - Snapshot replication information. See
cross_region_copy_info
below. - desc string
- Description information representing the resource.
- enterprise
Snapshot stringPolicy Name - The name of the resource.
- resource
Group stringId - The ID of the resource group.
- retain
Rule EnterpriseSnapshot Policy Retain Rule - Snapshot retention policy representing resources. See
retain_rule
below. - schedule
Enterprise
Snapshot Policy Schedule - The scheduling plan that represents the resource. See
schedule
below. - special
Retain EnterpriseRules Snapshot Policy Special Retain Rules - Snapshot special retention rules. See
special_retain_rules
below. - status string
- The status of the resource.
- storage
Rule EnterpriseSnapshot Policy Storage Rule - Snapshot storage policy. See
storage_rule
below. - {[key: string]: string}
- The tag of the resource.
- target
Type string - Represents the target type of resource binding.
- create_
time str - The creation time of the resource.
- cross_
region_ Enterprisecopy_ info Snapshot Policy Cross Region Copy Info Args - Snapshot replication information. See
cross_region_copy_info
below. - desc str
- Description information representing the resource.
- enterprise_
snapshot_ strpolicy_ name - The name of the resource.
- resource_
group_ strid - The ID of the resource group.
- retain_
rule EnterpriseSnapshot Policy Retain Rule Args - Snapshot retention policy representing resources. See
retain_rule
below. - schedule
Enterprise
Snapshot Policy Schedule Args - The scheduling plan that represents the resource. See
schedule
below. - special_
retain_ Enterpriserules Snapshot Policy Special Retain Rules Args - Snapshot special retention rules. See
special_retain_rules
below. - status str
- The status of the resource.
- storage_
rule EnterpriseSnapshot Policy Storage Rule Args - Snapshot storage policy. See
storage_rule
below. - Mapping[str, str]
- The tag of the resource.
- target_
type str - Represents the target type of resource binding.
- create
Time String - The creation time of the resource.
- cross
Region Property MapCopy Info - Snapshot replication information. See
cross_region_copy_info
below. - desc String
- Description information representing the resource.
- enterprise
Snapshot StringPolicy Name - The name of the resource.
- resource
Group StringId - The ID of the resource group.
- retain
Rule Property Map - Snapshot retention policy representing resources. See
retain_rule
below. - schedule Property Map
- The scheduling plan that represents the resource. See
schedule
below. - special
Retain Property MapRules - Snapshot special retention rules. See
special_retain_rules
below. - status String
- The status of the resource.
- storage
Rule Property Map - Snapshot storage policy. See
storage_rule
below. - Map<String>
- The tag of the resource.
- target
Type String - Represents the target type of resource binding.
Supporting Types
EnterpriseSnapshotPolicyCrossRegionCopyInfo, EnterpriseSnapshotPolicyCrossRegionCopyInfoArgs
- Enabled bool
- Enable Snapshot replication.
- Regions
List<Pulumi.
Ali Cloud. Ebs. Inputs. Enterprise Snapshot Policy Cross Region Copy Info Region> - Destination region for Snapshot replication. See
regions
below.
- Enabled bool
- Enable Snapshot replication.
- Regions
[]Enterprise
Snapshot Policy Cross Region Copy Info Region - Destination region for Snapshot replication. See
regions
below.
- enabled Boolean
- Enable Snapshot replication.
- regions
List<Enterprise
Snapshot Policy Cross Region Copy Info Region> - Destination region for Snapshot replication. See
regions
below.
- enabled boolean
- Enable Snapshot replication.
- regions
Enterprise
Snapshot Policy Cross Region Copy Info Region[] - Destination region for Snapshot replication. See
regions
below.
- enabled bool
- Enable Snapshot replication.
- regions
Sequence[Enterprise
Snapshot Policy Cross Region Copy Info Region] - Destination region for Snapshot replication. See
regions
below.
- enabled Boolean
- Enable Snapshot replication.
- regions List<Property Map>
- Destination region for Snapshot replication. See
regions
below.
EnterpriseSnapshotPolicyCrossRegionCopyInfoRegion, EnterpriseSnapshotPolicyCrossRegionCopyInfoRegionArgs
- Region
Id string - Destination region ID.
- Retain
Days int - Number of days of snapshot retention for replication.
- Region
Id string - Destination region ID.
- Retain
Days int - Number of days of snapshot retention for replication.
- region
Id String - Destination region ID.
- retain
Days Integer - Number of days of snapshot retention for replication.
- region
Id string - Destination region ID.
- retain
Days number - Number of days of snapshot retention for replication.
- region_
id str - Destination region ID.
- retain_
days int - Number of days of snapshot retention for replication.
- region
Id String - Destination region ID.
- retain
Days Number - Number of days of snapshot retention for replication.
EnterpriseSnapshotPolicyRetainRule, EnterpriseSnapshotPolicyRetainRuleArgs
- Number int
- Retention based on counting method.
- Time
Interval int - Time unit.
- Time
Unit string - Time-based retention.
- Number int
- Retention based on counting method.
- Time
Interval int - Time unit.
- Time
Unit string - Time-based retention.
- number Integer
- Retention based on counting method.
- time
Interval Integer - Time unit.
- time
Unit String - Time-based retention.
- number number
- Retention based on counting method.
- time
Interval number - Time unit.
- time
Unit string - Time-based retention.
- number int
- Retention based on counting method.
- time_
interval int - Time unit.
- time_
unit str - Time-based retention.
- number Number
- Retention based on counting method.
- time
Interval Number - Time unit.
- time
Unit String - Time-based retention.
EnterpriseSnapshotPolicySchedule, EnterpriseSnapshotPolicyScheduleArgs
- Cron
Expression string - CronTab expression.
- Cron
Expression string - CronTab expression.
- cron
Expression String - CronTab expression.
- cron
Expression string - CronTab expression.
- cron_
expression str - CronTab expression.
- cron
Expression String - CronTab expression.
EnterpriseSnapshotPolicySpecialRetainRules, EnterpriseSnapshotPolicySpecialRetainRulesArgs
- Enabled bool
- Whether special reservations are enabled. Value range:
- true
- false.
- Rules
List<Pulumi.
Ali Cloud. Ebs. Inputs. Enterprise Snapshot Policy Special Retain Rules Rule> - List of special retention rules. See
rules
below.
- Enabled bool
- Whether special reservations are enabled. Value range:
- true
- false.
- Rules
[]Enterprise
Snapshot Policy Special Retain Rules Rule - List of special retention rules. See
rules
below.
- enabled Boolean
- Whether special reservations are enabled. Value range:
- true
- false.
- rules
List<Enterprise
Snapshot Policy Special Retain Rules Rule> - List of special retention rules. See
rules
below.
- enabled boolean
- Whether special reservations are enabled. Value range:
- true
- false.
- rules
Enterprise
Snapshot Policy Special Retain Rules Rule[] - List of special retention rules. See
rules
below.
- enabled bool
- Whether special reservations are enabled. Value range:
- true
- false.
- rules
Sequence[Enterprise
Snapshot Policy Special Retain Rules Rule] - List of special retention rules. See
rules
below.
- enabled Boolean
- Whether special reservations are enabled. Value range:
- true
- false.
- rules List<Property Map>
- List of special retention rules. See
rules
below.
EnterpriseSnapshotPolicySpecialRetainRulesRule, EnterpriseSnapshotPolicySpecialRetainRulesRuleArgs
- Special
Period stringUnit - The cycle unit of the special reserved snapshot. If the value is set to WEEKS, the first snapshot of each week is reserved. The retention time is determined by TimeUnit and TimeInterval. The value range is:
- WEEKS
- MONTHS
- YEARS.
- Time
Interval int - Time
Unit string
- Special
Period stringUnit - The cycle unit of the special reserved snapshot. If the value is set to WEEKS, the first snapshot of each week is reserved. The retention time is determined by TimeUnit and TimeInterval. The value range is:
- WEEKS
- MONTHS
- YEARS.
- Time
Interval int - Time
Unit string
- special
Period StringUnit - The cycle unit of the special reserved snapshot. If the value is set to WEEKS, the first snapshot of each week is reserved. The retention time is determined by TimeUnit and TimeInterval. The value range is:
- WEEKS
- MONTHS
- YEARS.
- time
Interval Integer - time
Unit String
- special
Period stringUnit - The cycle unit of the special reserved snapshot. If the value is set to WEEKS, the first snapshot of each week is reserved. The retention time is determined by TimeUnit and TimeInterval. The value range is:
- WEEKS
- MONTHS
- YEARS.
- time
Interval number - time
Unit string
- special_
period_ strunit - The cycle unit of the special reserved snapshot. If the value is set to WEEKS, the first snapshot of each week is reserved. The retention time is determined by TimeUnit and TimeInterval. The value range is:
- WEEKS
- MONTHS
- YEARS.
- time_
interval int - time_
unit str
- special
Period StringUnit - The cycle unit of the special reserved snapshot. If the value is set to WEEKS, the first snapshot of each week is reserved. The retention time is determined by TimeUnit and TimeInterval. The value range is:
- WEEKS
- MONTHS
- YEARS.
- time
Interval Number - time
Unit String
EnterpriseSnapshotPolicyStorageRule, EnterpriseSnapshotPolicyStorageRuleArgs
- Enable
Immediate boolAccess - Snapshot speed available.
- Enable
Immediate boolAccess - Snapshot speed available.
- enable
Immediate BooleanAccess - Snapshot speed available.
- enable
Immediate booleanAccess - Snapshot speed available.
- enable_
immediate_ boolaccess - Snapshot speed available.
- enable
Immediate BooleanAccess - Snapshot speed available.
Import
EBS Enterprise Snapshot Policy can be imported using the id, e.g.
$ pulumi import alicloud:ebs/enterpriseSnapshotPolicy:EnterpriseSnapshotPolicy 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.