1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. ebs
  5. EnterpriseSnapshotPolicy
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

alicloud.ebs.EnterpriseSnapshotPolicy

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

    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:

    EnterpriseSnapshotPolicyName string
    The name of the resource.
    RetainRule Pulumi.AliCloud.Ebs.Inputs.EnterpriseSnapshotPolicyRetainRule
    Snapshot retention policy representing resources. See retain_rule below.
    Schedule Pulumi.AliCloud.Ebs.Inputs.EnterpriseSnapshotPolicySchedule
    The scheduling plan that represents the resource. See schedule below.
    TargetType string
    Represents the target type of resource binding.
    CrossRegionCopyInfo Pulumi.AliCloud.Ebs.Inputs.EnterpriseSnapshotPolicyCrossRegionCopyInfo
    Snapshot replication information. See cross_region_copy_info below.
    Desc string
    Description information representing the resource.
    ResourceGroupId string
    The ID of the resource group.
    SpecialRetainRules Pulumi.AliCloud.Ebs.Inputs.EnterpriseSnapshotPolicySpecialRetainRules
    Snapshot special retention rules. See special_retain_rules below.
    Status string
    The status of the resource.
    StorageRule Pulumi.AliCloud.Ebs.Inputs.EnterpriseSnapshotPolicyStorageRule
    Snapshot storage policy. See storage_rule below.
    Tags Dictionary<string, string>
    The tag of the resource.
    EnterpriseSnapshotPolicyName string
    The name of the resource.
    RetainRule EnterpriseSnapshotPolicyRetainRuleArgs
    Snapshot retention policy representing resources. See retain_rule below.
    Schedule EnterpriseSnapshotPolicyScheduleArgs
    The scheduling plan that represents the resource. See schedule below.
    TargetType string
    Represents the target type of resource binding.
    CrossRegionCopyInfo EnterpriseSnapshotPolicyCrossRegionCopyInfoArgs
    Snapshot replication information. See cross_region_copy_info below.
    Desc string
    Description information representing the resource.
    ResourceGroupId string
    The ID of the resource group.
    SpecialRetainRules EnterpriseSnapshotPolicySpecialRetainRulesArgs
    Snapshot special retention rules. See special_retain_rules below.
    Status string
    The status of the resource.
    StorageRule EnterpriseSnapshotPolicyStorageRuleArgs
    Snapshot storage policy. See storage_rule below.
    Tags map[string]string
    The tag of the resource.
    enterpriseSnapshotPolicyName String
    The name of the resource.
    retainRule EnterpriseSnapshotPolicyRetainRule
    Snapshot retention policy representing resources. See retain_rule below.
    schedule EnterpriseSnapshotPolicySchedule
    The scheduling plan that represents the resource. See schedule below.
    targetType String
    Represents the target type of resource binding.
    crossRegionCopyInfo EnterpriseSnapshotPolicyCrossRegionCopyInfo
    Snapshot replication information. See cross_region_copy_info below.
    desc String
    Description information representing the resource.
    resourceGroupId String
    The ID of the resource group.
    specialRetainRules EnterpriseSnapshotPolicySpecialRetainRules
    Snapshot special retention rules. See special_retain_rules below.
    status String
    The status of the resource.
    storageRule EnterpriseSnapshotPolicyStorageRule
    Snapshot storage policy. See storage_rule below.
    tags Map<String,String>
    The tag of the resource.
    enterpriseSnapshotPolicyName string
    The name of the resource.
    retainRule EnterpriseSnapshotPolicyRetainRule
    Snapshot retention policy representing resources. See retain_rule below.
    schedule EnterpriseSnapshotPolicySchedule
    The scheduling plan that represents the resource. See schedule below.
    targetType string
    Represents the target type of resource binding.
    crossRegionCopyInfo EnterpriseSnapshotPolicyCrossRegionCopyInfo
    Snapshot replication information. See cross_region_copy_info below.
    desc string
    Description information representing the resource.
    resourceGroupId string
    The ID of the resource group.
    specialRetainRules EnterpriseSnapshotPolicySpecialRetainRules
    Snapshot special retention rules. See special_retain_rules below.
    status string
    The status of the resource.
    storageRule EnterpriseSnapshotPolicyStorageRule
    Snapshot storage policy. See storage_rule below.
    tags {[key: string]: string}
    The tag of the resource.
    enterprise_snapshot_policy_name str
    The name of the resource.
    retain_rule EnterpriseSnapshotPolicyRetainRuleArgs
    Snapshot retention policy representing resources. See retain_rule below.
    schedule EnterpriseSnapshotPolicyScheduleArgs
    The scheduling plan that represents the resource. See schedule below.
    target_type str
    Represents the target type of resource binding.
    cross_region_copy_info EnterpriseSnapshotPolicyCrossRegionCopyInfoArgs
    Snapshot replication information. See cross_region_copy_info below.
    desc str
    Description information representing the resource.
    resource_group_id str
    The ID of the resource group.
    special_retain_rules EnterpriseSnapshotPolicySpecialRetainRulesArgs
    Snapshot special retention rules. See special_retain_rules below.
    status str
    The status of the resource.
    storage_rule EnterpriseSnapshotPolicyStorageRuleArgs
    Snapshot storage policy. See storage_rule below.
    tags Mapping[str, str]
    The tag of the resource.
    enterpriseSnapshotPolicyName String
    The name of the resource.
    retainRule Property Map
    Snapshot retention policy representing resources. See retain_rule below.
    schedule Property Map
    The scheduling plan that represents the resource. See schedule below.
    targetType String
    Represents the target type of resource binding.
    crossRegionCopyInfo Property Map
    Snapshot replication information. See cross_region_copy_info below.
    desc String
    Description information representing the resource.
    resourceGroupId String
    The ID of the resource group.
    specialRetainRules Property Map
    Snapshot special retention rules. See special_retain_rules below.
    status String
    The status of the resource.
    storageRule Property Map
    Snapshot storage policy. See storage_rule below.
    tags 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:

    CreateTime string
    The creation time of the resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    CreateTime string
    The creation time of the resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    createTime String
    The creation time of the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    createTime 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.
    createTime 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.
    The following state arguments are supported:
    CreateTime string
    The creation time of the resource.
    CrossRegionCopyInfo Pulumi.AliCloud.Ebs.Inputs.EnterpriseSnapshotPolicyCrossRegionCopyInfo
    Snapshot replication information. See cross_region_copy_info below.
    Desc string
    Description information representing the resource.
    EnterpriseSnapshotPolicyName string
    The name of the resource.
    ResourceGroupId string
    The ID of the resource group.
    RetainRule Pulumi.AliCloud.Ebs.Inputs.EnterpriseSnapshotPolicyRetainRule
    Snapshot retention policy representing resources. See retain_rule below.
    Schedule Pulumi.AliCloud.Ebs.Inputs.EnterpriseSnapshotPolicySchedule
    The scheduling plan that represents the resource. See schedule below.
    SpecialRetainRules Pulumi.AliCloud.Ebs.Inputs.EnterpriseSnapshotPolicySpecialRetainRules
    Snapshot special retention rules. See special_retain_rules below.
    Status string
    The status of the resource.
    StorageRule Pulumi.AliCloud.Ebs.Inputs.EnterpriseSnapshotPolicyStorageRule
    Snapshot storage policy. See storage_rule below.
    Tags Dictionary<string, string>
    The tag of the resource.
    TargetType string
    Represents the target type of resource binding.
    CreateTime string
    The creation time of the resource.
    CrossRegionCopyInfo EnterpriseSnapshotPolicyCrossRegionCopyInfoArgs
    Snapshot replication information. See cross_region_copy_info below.
    Desc string
    Description information representing the resource.
    EnterpriseSnapshotPolicyName string
    The name of the resource.
    ResourceGroupId string
    The ID of the resource group.
    RetainRule EnterpriseSnapshotPolicyRetainRuleArgs
    Snapshot retention policy representing resources. See retain_rule below.
    Schedule EnterpriseSnapshotPolicyScheduleArgs
    The scheduling plan that represents the resource. See schedule below.
    SpecialRetainRules EnterpriseSnapshotPolicySpecialRetainRulesArgs
    Snapshot special retention rules. See special_retain_rules below.
    Status string
    The status of the resource.
    StorageRule EnterpriseSnapshotPolicyStorageRuleArgs
    Snapshot storage policy. See storage_rule below.
    Tags map[string]string
    The tag of the resource.
    TargetType string
    Represents the target type of resource binding.
    createTime String
    The creation time of the resource.
    crossRegionCopyInfo EnterpriseSnapshotPolicyCrossRegionCopyInfo
    Snapshot replication information. See cross_region_copy_info below.
    desc String
    Description information representing the resource.
    enterpriseSnapshotPolicyName String
    The name of the resource.
    resourceGroupId String
    The ID of the resource group.
    retainRule EnterpriseSnapshotPolicyRetainRule
    Snapshot retention policy representing resources. See retain_rule below.
    schedule EnterpriseSnapshotPolicySchedule
    The scheduling plan that represents the resource. See schedule below.
    specialRetainRules EnterpriseSnapshotPolicySpecialRetainRules
    Snapshot special retention rules. See special_retain_rules below.
    status String
    The status of the resource.
    storageRule EnterpriseSnapshotPolicyStorageRule
    Snapshot storage policy. See storage_rule below.
    tags Map<String,String>
    The tag of the resource.
    targetType String
    Represents the target type of resource binding.
    createTime string
    The creation time of the resource.
    crossRegionCopyInfo EnterpriseSnapshotPolicyCrossRegionCopyInfo
    Snapshot replication information. See cross_region_copy_info below.
    desc string
    Description information representing the resource.
    enterpriseSnapshotPolicyName string
    The name of the resource.
    resourceGroupId string
    The ID of the resource group.
    retainRule EnterpriseSnapshotPolicyRetainRule
    Snapshot retention policy representing resources. See retain_rule below.
    schedule EnterpriseSnapshotPolicySchedule
    The scheduling plan that represents the resource. See schedule below.
    specialRetainRules EnterpriseSnapshotPolicySpecialRetainRules
    Snapshot special retention rules. See special_retain_rules below.
    status string
    The status of the resource.
    storageRule EnterpriseSnapshotPolicyStorageRule
    Snapshot storage policy. See storage_rule below.
    tags {[key: string]: string}
    The tag of the resource.
    targetType string
    Represents the target type of resource binding.
    create_time str
    The creation time of the resource.
    cross_region_copy_info EnterpriseSnapshotPolicyCrossRegionCopyInfoArgs
    Snapshot replication information. See cross_region_copy_info below.
    desc str
    Description information representing the resource.
    enterprise_snapshot_policy_name str
    The name of the resource.
    resource_group_id str
    The ID of the resource group.
    retain_rule EnterpriseSnapshotPolicyRetainRuleArgs
    Snapshot retention policy representing resources. See retain_rule below.
    schedule EnterpriseSnapshotPolicyScheduleArgs
    The scheduling plan that represents the resource. See schedule below.
    special_retain_rules EnterpriseSnapshotPolicySpecialRetainRulesArgs
    Snapshot special retention rules. See special_retain_rules below.
    status str
    The status of the resource.
    storage_rule EnterpriseSnapshotPolicyStorageRuleArgs
    Snapshot storage policy. See storage_rule below.
    tags Mapping[str, str]
    The tag of the resource.
    target_type str
    Represents the target type of resource binding.
    createTime String
    The creation time of the resource.
    crossRegionCopyInfo Property Map
    Snapshot replication information. See cross_region_copy_info below.
    desc String
    Description information representing the resource.
    enterpriseSnapshotPolicyName String
    The name of the resource.
    resourceGroupId String
    The ID of the resource group.
    retainRule Property Map
    Snapshot retention policy representing resources. See retain_rule below.
    schedule Property Map
    The scheduling plan that represents the resource. See schedule below.
    specialRetainRules Property Map
    Snapshot special retention rules. See special_retain_rules below.
    status String
    The status of the resource.
    storageRule Property Map
    Snapshot storage policy. See storage_rule below.
    tags Map<String>
    The tag of the resource.
    targetType String
    Represents the target type of resource binding.

    Supporting Types

    EnterpriseSnapshotPolicyCrossRegionCopyInfo, EnterpriseSnapshotPolicyCrossRegionCopyInfoArgs

    Enabled bool
    Enable Snapshot replication.
    Regions List<Pulumi.AliCloud.Ebs.Inputs.EnterpriseSnapshotPolicyCrossRegionCopyInfoRegion>
    Destination region for Snapshot replication. See regions below.
    Enabled bool
    Enable Snapshot replication.
    Regions []EnterpriseSnapshotPolicyCrossRegionCopyInfoRegion
    Destination region for Snapshot replication. See regions below.
    enabled Boolean
    Enable Snapshot replication.
    regions List<EnterpriseSnapshotPolicyCrossRegionCopyInfoRegion>
    Destination region for Snapshot replication. See regions below.
    enabled boolean
    Enable Snapshot replication.
    regions EnterpriseSnapshotPolicyCrossRegionCopyInfoRegion[]
    Destination region for Snapshot replication. See regions below.
    enabled bool
    Enable Snapshot replication.
    regions Sequence[EnterpriseSnapshotPolicyCrossRegionCopyInfoRegion]
    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

    RegionId string
    Destination region ID.
    RetainDays int
    Number of days of snapshot retention for replication.
    RegionId string
    Destination region ID.
    RetainDays int
    Number of days of snapshot retention for replication.
    regionId String
    Destination region ID.
    retainDays Integer
    Number of days of snapshot retention for replication.
    regionId string
    Destination region ID.
    retainDays 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.
    regionId String
    Destination region ID.
    retainDays Number
    Number of days of snapshot retention for replication.

    EnterpriseSnapshotPolicyRetainRule, EnterpriseSnapshotPolicyRetainRuleArgs

    Number int
    Retention based on counting method.
    TimeInterval int
    Time unit.
    TimeUnit string
    Time-based retention.
    Number int
    Retention based on counting method.
    TimeInterval int
    Time unit.
    TimeUnit string
    Time-based retention.
    number Integer
    Retention based on counting method.
    timeInterval Integer
    Time unit.
    timeUnit String
    Time-based retention.
    number number
    Retention based on counting method.
    timeInterval number
    Time unit.
    timeUnit 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.
    timeInterval Number
    Time unit.
    timeUnit String
    Time-based retention.

    EnterpriseSnapshotPolicySchedule, EnterpriseSnapshotPolicyScheduleArgs

    CronExpression string
    CronTab expression.
    CronExpression string
    CronTab expression.
    cronExpression String
    CronTab expression.
    cronExpression string
    CronTab expression.
    cron_expression str
    CronTab expression.
    cronExpression String
    CronTab expression.

    EnterpriseSnapshotPolicySpecialRetainRules, EnterpriseSnapshotPolicySpecialRetainRulesArgs

    Enabled bool
    Whether special reservations are enabled. Value range:

    • true
    • false.
    Rules List<Pulumi.AliCloud.Ebs.Inputs.EnterpriseSnapshotPolicySpecialRetainRulesRule>
    List of special retention rules. See rules below.
    Enabled bool
    Whether special reservations are enabled. Value range:

    • true
    • false.
    Rules []EnterpriseSnapshotPolicySpecialRetainRulesRule
    List of special retention rules. See rules below.
    enabled Boolean
    Whether special reservations are enabled. Value range:

    • true
    • false.
    rules List<EnterpriseSnapshotPolicySpecialRetainRulesRule>
    List of special retention rules. See rules below.
    enabled boolean
    Whether special reservations are enabled. Value range:

    • true
    • false.
    rules EnterpriseSnapshotPolicySpecialRetainRulesRule[]
    List of special retention rules. See rules below.
    enabled bool
    Whether special reservations are enabled. Value range:

    • true
    • false.
    rules Sequence[EnterpriseSnapshotPolicySpecialRetainRulesRule]
    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

    SpecialPeriodUnit string
    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.
    TimeInterval int
    TimeUnit string
    SpecialPeriodUnit string
    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.
    TimeInterval int
    TimeUnit string
    specialPeriodUnit String
    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.
    timeInterval Integer
    timeUnit String
    specialPeriodUnit string
    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.
    timeInterval number
    timeUnit string
    special_period_unit str
    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
    specialPeriodUnit String
    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.
    timeInterval Number
    timeUnit String

    EnterpriseSnapshotPolicyStorageRule, EnterpriseSnapshotPolicyStorageRuleArgs

    EnableImmediateAccess bool
    Snapshot speed available.
    EnableImmediateAccess bool
    Snapshot speed available.
    enableImmediateAccess Boolean
    Snapshot speed available.
    enableImmediateAccess boolean
    Snapshot speed available.
    enable_immediate_access bool
    Snapshot speed available.
    enableImmediateAccess Boolean
    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.
    alicloud logo
    Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi