1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. ecs
  5. EcsSnapshotGroup
Alibaba Cloud v3.52.1 published on Thursday, Apr 4, 2024 by Pulumi

alicloud.ecs.EcsSnapshotGroup

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.52.1 published on Thursday, Apr 4, 2024 by Pulumi

    Provides a ECS Snapshot Group resource.

    For information about ECS Snapshot Group and how to use it, see What is Snapshot Group.

    NOTE: Available in v1.160.0+.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const defaultZones = alicloud.getZones({
        availableResourceCreation: "Instance",
        availableDiskCategory: "cloud_essd",
    });
    const defaultInstanceTypes = defaultZones.then(defaultZones => alicloud.ecs.getInstanceTypes({
        availabilityZone: defaultZones.zones?.[0]?.id,
        systemDiskCategory: "cloud_essd",
    }));
    const defaultImages = alicloud.ecs.getImages({
        owners: "system",
    });
    const defaultNetwork = new alicloud.vpc.Network("defaultNetwork", {
        vpcName: "terraform-example",
        cidrBlock: "172.17.3.0/24",
    });
    const defaultSwitch = new alicloud.vpc.Switch("defaultSwitch", {
        vswitchName: "terraform-example",
        cidrBlock: "172.17.3.0/24",
        vpcId: defaultNetwork.id,
        zoneId: defaultZones.then(defaultZones => defaultZones.zones?.[0]?.id),
    });
    const defaultSecurityGroup = new alicloud.ecs.SecurityGroup("defaultSecurityGroup", {vpcId: defaultNetwork.id});
    const defaultInstance = new alicloud.ecs.Instance("defaultInstance", {
        availabilityZone: defaultZones.then(defaultZones => defaultZones.zones?.[0]?.id),
        instanceName: "terraform-example",
        securityGroups: [defaultSecurityGroup.id],
        vswitchId: defaultSwitch.id,
        instanceType: defaultInstanceTypes.then(defaultInstanceTypes => defaultInstanceTypes.instanceTypes?.[0]?.id),
        imageId: defaultImages.then(defaultImages => defaultImages.images?.[0]?.id),
        internetMaxBandwidthOut: 10,
    });
    const defaultEcsDisk = new alicloud.ecs.EcsDisk("defaultEcsDisk", {
        zoneId: defaultZones.then(defaultZones => defaultZones.zones?.[0]?.id),
        diskName: "terraform-example",
        description: "terraform-example",
        category: "cloud_essd",
        size: 30,
    });
    const defaultDiskAttachment = new alicloud.ecs.DiskAttachment("defaultDiskAttachment", {
        diskId: defaultEcsDisk.id,
        instanceId: defaultInstance.id,
    });
    const defaultEcsSnapshotGroup = new alicloud.ecs.EcsSnapshotGroup("defaultEcsSnapshotGroup", {
        description: "terraform-example",
        diskIds: [defaultEcsDisk.id],
        snapshotGroupName: "terraform-example",
        instanceId: defaultInstance.id,
        instantAccess: true,
        instantAccessRetentionDays: 1,
        tags: {
            Created: "TF",
            For: "Acceptance",
        },
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default_zones = alicloud.get_zones(available_resource_creation="Instance",
        available_disk_category="cloud_essd")
    default_instance_types = alicloud.ecs.get_instance_types(availability_zone=default_zones.zones[0].id,
        system_disk_category="cloud_essd")
    default_images = alicloud.ecs.get_images(owners="system")
    default_network = alicloud.vpc.Network("defaultNetwork",
        vpc_name="terraform-example",
        cidr_block="172.17.3.0/24")
    default_switch = alicloud.vpc.Switch("defaultSwitch",
        vswitch_name="terraform-example",
        cidr_block="172.17.3.0/24",
        vpc_id=default_network.id,
        zone_id=default_zones.zones[0].id)
    default_security_group = alicloud.ecs.SecurityGroup("defaultSecurityGroup", vpc_id=default_network.id)
    default_instance = alicloud.ecs.Instance("defaultInstance",
        availability_zone=default_zones.zones[0].id,
        instance_name="terraform-example",
        security_groups=[default_security_group.id],
        vswitch_id=default_switch.id,
        instance_type=default_instance_types.instance_types[0].id,
        image_id=default_images.images[0].id,
        internet_max_bandwidth_out=10)
    default_ecs_disk = alicloud.ecs.EcsDisk("defaultEcsDisk",
        zone_id=default_zones.zones[0].id,
        disk_name="terraform-example",
        description="terraform-example",
        category="cloud_essd",
        size=30)
    default_disk_attachment = alicloud.ecs.DiskAttachment("defaultDiskAttachment",
        disk_id=default_ecs_disk.id,
        instance_id=default_instance.id)
    default_ecs_snapshot_group = alicloud.ecs.EcsSnapshotGroup("defaultEcsSnapshotGroup",
        description="terraform-example",
        disk_ids=[default_ecs_disk.id],
        snapshot_group_name="terraform-example",
        instance_id=default_instance.id,
        instant_access=True,
        instant_access_retention_days=1,
        tags={
            "Created": "TF",
            "For": "Acceptance",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		defaultZones, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
    			AvailableResourceCreation: pulumi.StringRef("Instance"),
    			AvailableDiskCategory:     pulumi.StringRef("cloud_essd"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultInstanceTypes, err := ecs.GetInstanceTypes(ctx, &ecs.GetInstanceTypesArgs{
    			AvailabilityZone:   pulumi.StringRef(defaultZones.Zones[0].Id),
    			SystemDiskCategory: pulumi.StringRef("cloud_essd"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultImages, err := ecs.GetImages(ctx, &ecs.GetImagesArgs{
    			Owners: pulumi.StringRef("system"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultNetwork, err := vpc.NewNetwork(ctx, "defaultNetwork", &vpc.NetworkArgs{
    			VpcName:   pulumi.String("terraform-example"),
    			CidrBlock: pulumi.String("172.17.3.0/24"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultSwitch, err := vpc.NewSwitch(ctx, "defaultSwitch", &vpc.SwitchArgs{
    			VswitchName: pulumi.String("terraform-example"),
    			CidrBlock:   pulumi.String("172.17.3.0/24"),
    			VpcId:       defaultNetwork.ID(),
    			ZoneId:      pulumi.String(defaultZones.Zones[0].Id),
    		})
    		if err != nil {
    			return err
    		}
    		defaultSecurityGroup, err := ecs.NewSecurityGroup(ctx, "defaultSecurityGroup", &ecs.SecurityGroupArgs{
    			VpcId: defaultNetwork.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		defaultInstance, err := ecs.NewInstance(ctx, "defaultInstance", &ecs.InstanceArgs{
    			AvailabilityZone: pulumi.String(defaultZones.Zones[0].Id),
    			InstanceName:     pulumi.String("terraform-example"),
    			SecurityGroups: pulumi.StringArray{
    				defaultSecurityGroup.ID(),
    			},
    			VswitchId:               defaultSwitch.ID(),
    			InstanceType:            pulumi.String(defaultInstanceTypes.InstanceTypes[0].Id),
    			ImageId:                 pulumi.String(defaultImages.Images[0].Id),
    			InternetMaxBandwidthOut: pulumi.Int(10),
    		})
    		if err != nil {
    			return err
    		}
    		defaultEcsDisk, err := ecs.NewEcsDisk(ctx, "defaultEcsDisk", &ecs.EcsDiskArgs{
    			ZoneId:      pulumi.String(defaultZones.Zones[0].Id),
    			DiskName:    pulumi.String("terraform-example"),
    			Description: pulumi.String("terraform-example"),
    			Category:    pulumi.String("cloud_essd"),
    			Size:        pulumi.Int(30),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = ecs.NewDiskAttachment(ctx, "defaultDiskAttachment", &ecs.DiskAttachmentArgs{
    			DiskId:     defaultEcsDisk.ID(),
    			InstanceId: defaultInstance.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = ecs.NewEcsSnapshotGroup(ctx, "defaultEcsSnapshotGroup", &ecs.EcsSnapshotGroupArgs{
    			Description: pulumi.String("terraform-example"),
    			DiskIds: pulumi.StringArray{
    				defaultEcsDisk.ID(),
    			},
    			SnapshotGroupName:          pulumi.String("terraform-example"),
    			InstanceId:                 defaultInstance.ID(),
    			InstantAccess:              pulumi.Bool(true),
    			InstantAccessRetentionDays: pulumi.Int(1),
    			Tags: pulumi.Map{
    				"Created": pulumi.Any("TF"),
    				"For":     pulumi.Any("Acceptance"),
    			},
    		})
    		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 defaultZones = AliCloud.GetZones.Invoke(new()
        {
            AvailableResourceCreation = "Instance",
            AvailableDiskCategory = "cloud_essd",
        });
    
        var defaultInstanceTypes = AliCloud.Ecs.GetInstanceTypes.Invoke(new()
        {
            AvailabilityZone = defaultZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
            SystemDiskCategory = "cloud_essd",
        });
    
        var defaultImages = AliCloud.Ecs.GetImages.Invoke(new()
        {
            Owners = "system",
        });
    
        var defaultNetwork = new AliCloud.Vpc.Network("defaultNetwork", new()
        {
            VpcName = "terraform-example",
            CidrBlock = "172.17.3.0/24",
        });
    
        var defaultSwitch = new AliCloud.Vpc.Switch("defaultSwitch", new()
        {
            VswitchName = "terraform-example",
            CidrBlock = "172.17.3.0/24",
            VpcId = defaultNetwork.Id,
            ZoneId = defaultZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
        });
    
        var defaultSecurityGroup = new AliCloud.Ecs.SecurityGroup("defaultSecurityGroup", new()
        {
            VpcId = defaultNetwork.Id,
        });
    
        var defaultInstance = new AliCloud.Ecs.Instance("defaultInstance", new()
        {
            AvailabilityZone = defaultZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
            InstanceName = "terraform-example",
            SecurityGroups = new[]
            {
                defaultSecurityGroup.Id,
            },
            VswitchId = defaultSwitch.Id,
            InstanceType = defaultInstanceTypes.Apply(getInstanceTypesResult => getInstanceTypesResult.InstanceTypes[0]?.Id),
            ImageId = defaultImages.Apply(getImagesResult => getImagesResult.Images[0]?.Id),
            InternetMaxBandwidthOut = 10,
        });
    
        var defaultEcsDisk = new AliCloud.Ecs.EcsDisk("defaultEcsDisk", new()
        {
            ZoneId = defaultZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
            DiskName = "terraform-example",
            Description = "terraform-example",
            Category = "cloud_essd",
            Size = 30,
        });
    
        var defaultDiskAttachment = new AliCloud.Ecs.DiskAttachment("defaultDiskAttachment", new()
        {
            DiskId = defaultEcsDisk.Id,
            InstanceId = defaultInstance.Id,
        });
    
        var defaultEcsSnapshotGroup = new AliCloud.Ecs.EcsSnapshotGroup("defaultEcsSnapshotGroup", new()
        {
            Description = "terraform-example",
            DiskIds = new[]
            {
                defaultEcsDisk.Id,
            },
            SnapshotGroupName = "terraform-example",
            InstanceId = defaultInstance.Id,
            InstantAccess = true,
            InstantAccessRetentionDays = 1,
            Tags = 
            {
                { "Created", "TF" },
                { "For", "Acceptance" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.AlicloudFunctions;
    import com.pulumi.alicloud.inputs.GetZonesArgs;
    import com.pulumi.alicloud.ecs.EcsFunctions;
    import com.pulumi.alicloud.ecs.inputs.GetInstanceTypesArgs;
    import com.pulumi.alicloud.ecs.inputs.GetImagesArgs;
    import com.pulumi.alicloud.vpc.Network;
    import com.pulumi.alicloud.vpc.NetworkArgs;
    import com.pulumi.alicloud.vpc.Switch;
    import com.pulumi.alicloud.vpc.SwitchArgs;
    import com.pulumi.alicloud.ecs.SecurityGroup;
    import com.pulumi.alicloud.ecs.SecurityGroupArgs;
    import com.pulumi.alicloud.ecs.Instance;
    import com.pulumi.alicloud.ecs.InstanceArgs;
    import com.pulumi.alicloud.ecs.EcsDisk;
    import com.pulumi.alicloud.ecs.EcsDiskArgs;
    import com.pulumi.alicloud.ecs.DiskAttachment;
    import com.pulumi.alicloud.ecs.DiskAttachmentArgs;
    import com.pulumi.alicloud.ecs.EcsSnapshotGroup;
    import com.pulumi.alicloud.ecs.EcsSnapshotGroupArgs;
    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 defaultZones = AlicloudFunctions.getZones(GetZonesArgs.builder()
                .availableResourceCreation("Instance")
                .availableDiskCategory("cloud_essd")
                .build());
    
            final var defaultInstanceTypes = EcsFunctions.getInstanceTypes(GetInstanceTypesArgs.builder()
                .availabilityZone(defaultZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
                .systemDiskCategory("cloud_essd")
                .build());
    
            final var defaultImages = EcsFunctions.getImages(GetImagesArgs.builder()
                .owners("system")
                .build());
    
            var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()        
                .vpcName("terraform-example")
                .cidrBlock("172.17.3.0/24")
                .build());
    
            var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()        
                .vswitchName("terraform-example")
                .cidrBlock("172.17.3.0/24")
                .vpcId(defaultNetwork.id())
                .zoneId(defaultZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
                .build());
    
            var defaultSecurityGroup = new SecurityGroup("defaultSecurityGroup", SecurityGroupArgs.builder()        
                .vpcId(defaultNetwork.id())
                .build());
    
            var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()        
                .availabilityZone(defaultZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
                .instanceName("terraform-example")
                .securityGroups(defaultSecurityGroup.id())
                .vswitchId(defaultSwitch.id())
                .instanceType(defaultInstanceTypes.applyValue(getInstanceTypesResult -> getInstanceTypesResult.instanceTypes()[0].id()))
                .imageId(defaultImages.applyValue(getImagesResult -> getImagesResult.images()[0].id()))
                .internetMaxBandwidthOut(10)
                .build());
    
            var defaultEcsDisk = new EcsDisk("defaultEcsDisk", EcsDiskArgs.builder()        
                .zoneId(defaultZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
                .diskName("terraform-example")
                .description("terraform-example")
                .category("cloud_essd")
                .size("30")
                .build());
    
            var defaultDiskAttachment = new DiskAttachment("defaultDiskAttachment", DiskAttachmentArgs.builder()        
                .diskId(defaultEcsDisk.id())
                .instanceId(defaultInstance.id())
                .build());
    
            var defaultEcsSnapshotGroup = new EcsSnapshotGroup("defaultEcsSnapshotGroup", EcsSnapshotGroupArgs.builder()        
                .description("terraform-example")
                .diskIds(defaultEcsDisk.id())
                .snapshotGroupName("terraform-example")
                .instanceId(defaultInstance.id())
                .instantAccess(true)
                .instantAccessRetentionDays(1)
                .tags(Map.ofEntries(
                    Map.entry("Created", "TF"),
                    Map.entry("For", "Acceptance")
                ))
                .build());
    
        }
    }
    
    resources:
      defaultNetwork:
        type: alicloud:vpc:Network
        properties:
          vpcName: terraform-example
          cidrBlock: 172.17.3.0/24
      defaultSwitch:
        type: alicloud:vpc:Switch
        properties:
          vswitchName: terraform-example
          cidrBlock: 172.17.3.0/24
          vpcId: ${defaultNetwork.id}
          zoneId: ${defaultZones.zones[0].id}
      defaultSecurityGroup:
        type: alicloud:ecs:SecurityGroup
        properties:
          vpcId: ${defaultNetwork.id}
      defaultInstance:
        type: alicloud:ecs:Instance
        properties:
          availabilityZone: ${defaultZones.zones[0].id}
          instanceName: terraform-example
          securityGroups:
            - ${defaultSecurityGroup.id}
          vswitchId: ${defaultSwitch.id}
          instanceType: ${defaultInstanceTypes.instanceTypes[0].id}
          imageId: ${defaultImages.images[0].id}
          internetMaxBandwidthOut: 10
      defaultEcsDisk:
        type: alicloud:ecs:EcsDisk
        properties:
          zoneId: ${defaultZones.zones[0].id}
          diskName: terraform-example
          description: terraform-example
          category: cloud_essd
          size: '30'
      defaultDiskAttachment:
        type: alicloud:ecs:DiskAttachment
        properties:
          diskId: ${defaultEcsDisk.id}
          instanceId: ${defaultInstance.id}
      defaultEcsSnapshotGroup:
        type: alicloud:ecs:EcsSnapshotGroup
        properties:
          description: terraform-example
          diskIds:
            - ${defaultEcsDisk.id}
          snapshotGroupName: terraform-example
          instanceId: ${defaultInstance.id}
          instantAccess: true
          instantAccessRetentionDays: 1
          tags:
            Created: TF
            For: Acceptance
    variables:
      defaultZones:
        fn::invoke:
          Function: alicloud:getZones
          Arguments:
            availableResourceCreation: Instance
            availableDiskCategory: cloud_essd
      defaultInstanceTypes:
        fn::invoke:
          Function: alicloud:ecs:getInstanceTypes
          Arguments:
            availabilityZone: ${defaultZones.zones[0].id}
            systemDiskCategory: cloud_essd
      defaultImages:
        fn::invoke:
          Function: alicloud:ecs:getImages
          Arguments:
            owners: system
    

    Create EcsSnapshotGroup Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new EcsSnapshotGroup(name: string, args?: EcsSnapshotGroupArgs, opts?: CustomResourceOptions);
    @overload
    def EcsSnapshotGroup(resource_name: str,
                         args: Optional[EcsSnapshotGroupArgs] = None,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def EcsSnapshotGroup(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         description: Optional[str] = None,
                         disk_ids: Optional[Sequence[str]] = None,
                         exclude_disk_ids: Optional[Sequence[str]] = None,
                         instance_id: Optional[str] = None,
                         instant_access: Optional[bool] = None,
                         instant_access_retention_days: Optional[int] = None,
                         resource_group_id: Optional[str] = None,
                         snapshot_group_name: Optional[str] = None,
                         tags: Optional[Mapping[str, Any]] = None)
    func NewEcsSnapshotGroup(ctx *Context, name string, args *EcsSnapshotGroupArgs, opts ...ResourceOption) (*EcsSnapshotGroup, error)
    public EcsSnapshotGroup(string name, EcsSnapshotGroupArgs? args = null, CustomResourceOptions? opts = null)
    public EcsSnapshotGroup(String name, EcsSnapshotGroupArgs args)
    public EcsSnapshotGroup(String name, EcsSnapshotGroupArgs args, CustomResourceOptions options)
    
    type: alicloud:ecs:EcsSnapshotGroup
    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 EcsSnapshotGroupArgs
    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 EcsSnapshotGroupArgs
    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 EcsSnapshotGroupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args EcsSnapshotGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args EcsSnapshotGroupArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var ecsSnapshotGroupResource = new AliCloud.Ecs.EcsSnapshotGroup("ecsSnapshotGroupResource", new()
    {
        Description = "string",
        DiskIds = new[]
        {
            "string",
        },
        ExcludeDiskIds = new[]
        {
            "string",
        },
        InstanceId = "string",
        InstantAccess = false,
        InstantAccessRetentionDays = 0,
        ResourceGroupId = "string",
        SnapshotGroupName = "string",
        Tags = 
        {
            { "string", "any" },
        },
    });
    
    example, err := ecs.NewEcsSnapshotGroup(ctx, "ecsSnapshotGroupResource", &ecs.EcsSnapshotGroupArgs{
    	Description: pulumi.String("string"),
    	DiskIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	ExcludeDiskIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	InstanceId:                 pulumi.String("string"),
    	InstantAccess:              pulumi.Bool(false),
    	InstantAccessRetentionDays: pulumi.Int(0),
    	ResourceGroupId:            pulumi.String("string"),
    	SnapshotGroupName:          pulumi.String("string"),
    	Tags: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    })
    
    var ecsSnapshotGroupResource = new EcsSnapshotGroup("ecsSnapshotGroupResource", EcsSnapshotGroupArgs.builder()        
        .description("string")
        .diskIds("string")
        .excludeDiskIds("string")
        .instanceId("string")
        .instantAccess(false)
        .instantAccessRetentionDays(0)
        .resourceGroupId("string")
        .snapshotGroupName("string")
        .tags(Map.of("string", "any"))
        .build());
    
    ecs_snapshot_group_resource = alicloud.ecs.EcsSnapshotGroup("ecsSnapshotGroupResource",
        description="string",
        disk_ids=["string"],
        exclude_disk_ids=["string"],
        instance_id="string",
        instant_access=False,
        instant_access_retention_days=0,
        resource_group_id="string",
        snapshot_group_name="string",
        tags={
            "string": "any",
        })
    
    const ecsSnapshotGroupResource = new alicloud.ecs.EcsSnapshotGroup("ecsSnapshotGroupResource", {
        description: "string",
        diskIds: ["string"],
        excludeDiskIds: ["string"],
        instanceId: "string",
        instantAccess: false,
        instantAccessRetentionDays: 0,
        resourceGroupId: "string",
        snapshotGroupName: "string",
        tags: {
            string: "any",
        },
    });
    
    type: alicloud:ecs:EcsSnapshotGroup
    properties:
        description: string
        diskIds:
            - string
        excludeDiskIds:
            - string
        instanceId: string
        instantAccess: false
        instantAccessRetentionDays: 0
        resourceGroupId: string
        snapshotGroupName: string
        tags:
            string: any
    

    EcsSnapshotGroup Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The EcsSnapshotGroup resource accepts the following input properties:

    Description string
    The description of the snapshot-consistent group. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
    DiskIds List<string>
    The ID of disk for which to create snapshots. You can specify multiple disk IDs across instances with the same zone.
    ExcludeDiskIds List<string>
    The ID of disk N for which you do not need to create snapshots. After this parameter is specified, the created snapshot-consistent group does not contain snapshots of the disk.
    InstanceId string
    The ID of the instance.
    InstantAccess bool
    Specifies whether to enable the instant access feature.
    InstantAccessRetentionDays int
    Specify the number of days for which the instant access feature is available. Unit: days. Valid values: 1 to 65535.
    ResourceGroupId string
    The ID of the resource group to which the snapshot consistency group belongs.
    SnapshotGroupName string
    The name of the snapshot-consistent group. The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), hyphens (-), and colons (:). It must start with a letter or a digit and cannot start with http:// or https://.
    Tags Dictionary<string, object>
    A mapping of tags to assign to the snapshot group.
    Description string
    The description of the snapshot-consistent group. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
    DiskIds []string
    The ID of disk for which to create snapshots. You can specify multiple disk IDs across instances with the same zone.
    ExcludeDiskIds []string
    The ID of disk N for which you do not need to create snapshots. After this parameter is specified, the created snapshot-consistent group does not contain snapshots of the disk.
    InstanceId string
    The ID of the instance.
    InstantAccess bool
    Specifies whether to enable the instant access feature.
    InstantAccessRetentionDays int
    Specify the number of days for which the instant access feature is available. Unit: days. Valid values: 1 to 65535.
    ResourceGroupId string
    The ID of the resource group to which the snapshot consistency group belongs.
    SnapshotGroupName string
    The name of the snapshot-consistent group. The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), hyphens (-), and colons (:). It must start with a letter or a digit and cannot start with http:// or https://.
    Tags map[string]interface{}
    A mapping of tags to assign to the snapshot group.
    description String
    The description of the snapshot-consistent group. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
    diskIds List<String>
    The ID of disk for which to create snapshots. You can specify multiple disk IDs across instances with the same zone.
    excludeDiskIds List<String>
    The ID of disk N for which you do not need to create snapshots. After this parameter is specified, the created snapshot-consistent group does not contain snapshots of the disk.
    instanceId String
    The ID of the instance.
    instantAccess Boolean
    Specifies whether to enable the instant access feature.
    instantAccessRetentionDays Integer
    Specify the number of days for which the instant access feature is available. Unit: days. Valid values: 1 to 65535.
    resourceGroupId String
    The ID of the resource group to which the snapshot consistency group belongs.
    snapshotGroupName String
    The name of the snapshot-consistent group. The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), hyphens (-), and colons (:). It must start with a letter or a digit and cannot start with http:// or https://.
    tags Map<String,Object>
    A mapping of tags to assign to the snapshot group.
    description string
    The description of the snapshot-consistent group. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
    diskIds string[]
    The ID of disk for which to create snapshots. You can specify multiple disk IDs across instances with the same zone.
    excludeDiskIds string[]
    The ID of disk N for which you do not need to create snapshots. After this parameter is specified, the created snapshot-consistent group does not contain snapshots of the disk.
    instanceId string
    The ID of the instance.
    instantAccess boolean
    Specifies whether to enable the instant access feature.
    instantAccessRetentionDays number
    Specify the number of days for which the instant access feature is available. Unit: days. Valid values: 1 to 65535.
    resourceGroupId string
    The ID of the resource group to which the snapshot consistency group belongs.
    snapshotGroupName string
    The name of the snapshot-consistent group. The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), hyphens (-), and colons (:). It must start with a letter or a digit and cannot start with http:// or https://.
    tags {[key: string]: any}
    A mapping of tags to assign to the snapshot group.
    description str
    The description of the snapshot-consistent group. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
    disk_ids Sequence[str]
    The ID of disk for which to create snapshots. You can specify multiple disk IDs across instances with the same zone.
    exclude_disk_ids Sequence[str]
    The ID of disk N for which you do not need to create snapshots. After this parameter is specified, the created snapshot-consistent group does not contain snapshots of the disk.
    instance_id str
    The ID of the instance.
    instant_access bool
    Specifies whether to enable the instant access feature.
    instant_access_retention_days int
    Specify the number of days for which the instant access feature is available. Unit: days. Valid values: 1 to 65535.
    resource_group_id str
    The ID of the resource group to which the snapshot consistency group belongs.
    snapshot_group_name str
    The name of the snapshot-consistent group. The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), hyphens (-), and colons (:). It must start with a letter or a digit and cannot start with http:// or https://.
    tags Mapping[str, Any]
    A mapping of tags to assign to the snapshot group.
    description String
    The description of the snapshot-consistent group. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
    diskIds List<String>
    The ID of disk for which to create snapshots. You can specify multiple disk IDs across instances with the same zone.
    excludeDiskIds List<String>
    The ID of disk N for which you do not need to create snapshots. After this parameter is specified, the created snapshot-consistent group does not contain snapshots of the disk.
    instanceId String
    The ID of the instance.
    instantAccess Boolean
    Specifies whether to enable the instant access feature.
    instantAccessRetentionDays Number
    Specify the number of days for which the instant access feature is available. Unit: days. Valid values: 1 to 65535.
    resourceGroupId String
    The ID of the resource group to which the snapshot consistency group belongs.
    snapshotGroupName String
    The name of the snapshot-consistent group. The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), hyphens (-), and colons (:). It must start with a letter or a digit and cannot start with http:// or https://.
    tags Map<Any>
    A mapping of tags to assign to the snapshot group.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the EcsSnapshotGroup resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of the resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of the resource.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    The status of the resource.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    The status of the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of the resource.

    Look up Existing EcsSnapshotGroup Resource

    Get an existing EcsSnapshotGroup 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?: EcsSnapshotGroupState, opts?: CustomResourceOptions): EcsSnapshotGroup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            disk_ids: Optional[Sequence[str]] = None,
            exclude_disk_ids: Optional[Sequence[str]] = None,
            instance_id: Optional[str] = None,
            instant_access: Optional[bool] = None,
            instant_access_retention_days: Optional[int] = None,
            resource_group_id: Optional[str] = None,
            snapshot_group_name: Optional[str] = None,
            status: Optional[str] = None,
            tags: Optional[Mapping[str, Any]] = None) -> EcsSnapshotGroup
    func GetEcsSnapshotGroup(ctx *Context, name string, id IDInput, state *EcsSnapshotGroupState, opts ...ResourceOption) (*EcsSnapshotGroup, error)
    public static EcsSnapshotGroup Get(string name, Input<string> id, EcsSnapshotGroupState? state, CustomResourceOptions? opts = null)
    public static EcsSnapshotGroup get(String name, Output<String> id, EcsSnapshotGroupState 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:
    Description string
    The description of the snapshot-consistent group. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
    DiskIds List<string>
    The ID of disk for which to create snapshots. You can specify multiple disk IDs across instances with the same zone.
    ExcludeDiskIds List<string>
    The ID of disk N for which you do not need to create snapshots. After this parameter is specified, the created snapshot-consistent group does not contain snapshots of the disk.
    InstanceId string
    The ID of the instance.
    InstantAccess bool
    Specifies whether to enable the instant access feature.
    InstantAccessRetentionDays int
    Specify the number of days for which the instant access feature is available. Unit: days. Valid values: 1 to 65535.
    ResourceGroupId string
    The ID of the resource group to which the snapshot consistency group belongs.
    SnapshotGroupName string
    The name of the snapshot-consistent group. The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), hyphens (-), and colons (:). It must start with a letter or a digit and cannot start with http:// or https://.
    Status string
    The status of the resource.
    Tags Dictionary<string, object>
    A mapping of tags to assign to the snapshot group.
    Description string
    The description of the snapshot-consistent group. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
    DiskIds []string
    The ID of disk for which to create snapshots. You can specify multiple disk IDs across instances with the same zone.
    ExcludeDiskIds []string
    The ID of disk N for which you do not need to create snapshots. After this parameter is specified, the created snapshot-consistent group does not contain snapshots of the disk.
    InstanceId string
    The ID of the instance.
    InstantAccess bool
    Specifies whether to enable the instant access feature.
    InstantAccessRetentionDays int
    Specify the number of days for which the instant access feature is available. Unit: days. Valid values: 1 to 65535.
    ResourceGroupId string
    The ID of the resource group to which the snapshot consistency group belongs.
    SnapshotGroupName string
    The name of the snapshot-consistent group. The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), hyphens (-), and colons (:). It must start with a letter or a digit and cannot start with http:// or https://.
    Status string
    The status of the resource.
    Tags map[string]interface{}
    A mapping of tags to assign to the snapshot group.
    description String
    The description of the snapshot-consistent group. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
    diskIds List<String>
    The ID of disk for which to create snapshots. You can specify multiple disk IDs across instances with the same zone.
    excludeDiskIds List<String>
    The ID of disk N for which you do not need to create snapshots. After this parameter is specified, the created snapshot-consistent group does not contain snapshots of the disk.
    instanceId String
    The ID of the instance.
    instantAccess Boolean
    Specifies whether to enable the instant access feature.
    instantAccessRetentionDays Integer
    Specify the number of days for which the instant access feature is available. Unit: days. Valid values: 1 to 65535.
    resourceGroupId String
    The ID of the resource group to which the snapshot consistency group belongs.
    snapshotGroupName String
    The name of the snapshot-consistent group. The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), hyphens (-), and colons (:). It must start with a letter or a digit and cannot start with http:// or https://.
    status String
    The status of the resource.
    tags Map<String,Object>
    A mapping of tags to assign to the snapshot group.
    description string
    The description of the snapshot-consistent group. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
    diskIds string[]
    The ID of disk for which to create snapshots. You can specify multiple disk IDs across instances with the same zone.
    excludeDiskIds string[]
    The ID of disk N for which you do not need to create snapshots. After this parameter is specified, the created snapshot-consistent group does not contain snapshots of the disk.
    instanceId string
    The ID of the instance.
    instantAccess boolean
    Specifies whether to enable the instant access feature.
    instantAccessRetentionDays number
    Specify the number of days for which the instant access feature is available. Unit: days. Valid values: 1 to 65535.
    resourceGroupId string
    The ID of the resource group to which the snapshot consistency group belongs.
    snapshotGroupName string
    The name of the snapshot-consistent group. The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), hyphens (-), and colons (:). It must start with a letter or a digit and cannot start with http:// or https://.
    status string
    The status of the resource.
    tags {[key: string]: any}
    A mapping of tags to assign to the snapshot group.
    description str
    The description of the snapshot-consistent group. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
    disk_ids Sequence[str]
    The ID of disk for which to create snapshots. You can specify multiple disk IDs across instances with the same zone.
    exclude_disk_ids Sequence[str]
    The ID of disk N for which you do not need to create snapshots. After this parameter is specified, the created snapshot-consistent group does not contain snapshots of the disk.
    instance_id str
    The ID of the instance.
    instant_access bool
    Specifies whether to enable the instant access feature.
    instant_access_retention_days int
    Specify the number of days for which the instant access feature is available. Unit: days. Valid values: 1 to 65535.
    resource_group_id str
    The ID of the resource group to which the snapshot consistency group belongs.
    snapshot_group_name str
    The name of the snapshot-consistent group. The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), hyphens (-), and colons (:). It must start with a letter or a digit and cannot start with http:// or https://.
    status str
    The status of the resource.
    tags Mapping[str, Any]
    A mapping of tags to assign to the snapshot group.
    description String
    The description of the snapshot-consistent group. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
    diskIds List<String>
    The ID of disk for which to create snapshots. You can specify multiple disk IDs across instances with the same zone.
    excludeDiskIds List<String>
    The ID of disk N for which you do not need to create snapshots. After this parameter is specified, the created snapshot-consistent group does not contain snapshots of the disk.
    instanceId String
    The ID of the instance.
    instantAccess Boolean
    Specifies whether to enable the instant access feature.
    instantAccessRetentionDays Number
    Specify the number of days for which the instant access feature is available. Unit: days. Valid values: 1 to 65535.
    resourceGroupId String
    The ID of the resource group to which the snapshot consistency group belongs.
    snapshotGroupName String
    The name of the snapshot-consistent group. The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), hyphens (-), and colons (:). It must start with a letter or a digit and cannot start with http:// or https://.
    status String
    The status of the resource.
    tags Map<Any>
    A mapping of tags to assign to the snapshot group.

    Import

    ECS Snapshot Group can be imported using the id, e.g.

    $ pulumi import alicloud:ecs/ecsSnapshotGroup:EcsSnapshotGroup 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.52.1 published on Thursday, Apr 4, 2024 by Pulumi