alicloud.ecs.EcsSnapshotGroup
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
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var defaultResourceGroups = AliCloud.ResourceManager.GetResourceGroups.Invoke(new()
{
NameRegex = "default",
});
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),
CpuCoreCount = 2,
MemorySize = 4,
SystemDiskCategory = "cloud_essd",
});
var defaultNetworks = AliCloud.Vpc.GetNetworks.Invoke(new()
{
NameRegex = "default-NODELETING",
});
var defaultSwitches = AliCloud.Vpc.GetSwitches.Invoke(new()
{
VpcId = defaultNetworks.Apply(getNetworksResult => getNetworksResult.Ids[0]),
ZoneId = defaultZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
});
var defaultSecurityGroup = new AliCloud.Ecs.SecurityGroup("defaultSecurityGroup", new()
{
Description = "New security group",
VpcId = defaultNetworks.Apply(getNetworksResult => getNetworksResult.Ids[0]),
});
var defaultDisk = new List<AliCloud.Ecs.Disk>();
for (var rangeIndex = 0; rangeIndex < 2; rangeIndex++)
{
var range = new { Value = rangeIndex };
defaultDisk.Add(new AliCloud.Ecs.Disk($"defaultDisk-{range.Value}", new()
{
DiskName = @var.Name,
ZoneId = defaultInstanceTypes.Apply(getInstanceTypesResult => getInstanceTypesResult.InstanceTypes[0]?.AvailabilityZones[0]),
Category = "cloud_essd",
Size = 20,
}));
}
var defaultImages = AliCloud.Ecs.GetImages.Invoke(new()
{
Owners = "system",
});
var defaultInstance = new AliCloud.Ecs.Instance("defaultInstance", new()
{
AvailabilityZone = defaultZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
InstanceName = @var.Name,
HostName = "tf-testAcc",
ImageId = defaultImages.Apply(getImagesResult => getImagesResult.Images[0]?.Id),
InstanceType = defaultInstanceTypes.Apply(getInstanceTypesResult => getInstanceTypesResult.InstanceTypes[0]?.Id),
SecurityGroups = new[]
{
defaultSecurityGroup.Id,
},
VswitchId = defaultSwitches.Apply(getSwitchesResult => getSwitchesResult.Ids[0]),
});
var defaultDiskAttachment = new List<AliCloud.Ecs.DiskAttachment>();
for (var rangeIndex = 0; rangeIndex < 2; rangeIndex++)
{
var range = new { Value = rangeIndex };
defaultDiskAttachment.Add(new AliCloud.Ecs.DiskAttachment($"defaultDiskAttachment-{range.Value}", new()
{
DiskId = defaultDisk.Select(__item => __item.Id).ToList()[range.Value],
InstanceId = defaultInstance.Id,
}));
}
var example = new AliCloud.Ecs.EcsSnapshotGroup("example", new()
{
Description = "example_value",
DiskIds = new[]
{
defaultDiskAttachment[0].DiskId,
defaultDiskAttachment[1].DiskId,
},
SnapshotGroupName = "example_value",
ResourceGroupId = defaultResourceGroups.Apply(getResourceGroupsResult => getResourceGroupsResult.Groups[0]?.Id),
InstanceId = defaultDiskAttachment[0].InstanceId,
InstantAccess = true,
InstantAccessRetentionDays = 1,
Tags =
{
{ "Created", "TF" },
{ "For", "Acceptance-test" },
},
});
});
Coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.resourcemanager.ResourcemanagerFunctions;
import com.pulumi.alicloud.resourcemanager.inputs.GetResourceGroupsArgs;
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.vpc.VpcFunctions;
import com.pulumi.alicloud.vpc.inputs.GetNetworksArgs;
import com.pulumi.alicloud.vpc.inputs.GetSwitchesArgs;
import com.pulumi.alicloud.ecs.SecurityGroup;
import com.pulumi.alicloud.ecs.SecurityGroupArgs;
import com.pulumi.alicloud.ecs.Disk;
import com.pulumi.alicloud.ecs.DiskArgs;
import com.pulumi.alicloud.ecs.inputs.GetImagesArgs;
import com.pulumi.alicloud.ecs.Instance;
import com.pulumi.alicloud.ecs.InstanceArgs;
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 com.pulumi.codegen.internal.KeyedValue;
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 defaultResourceGroups = ResourcemanagerFunctions.getResourceGroups(GetResourceGroupsArgs.builder()
.nameRegex("default")
.build());
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()))
.cpuCoreCount(2)
.memorySize(4)
.systemDiskCategory("cloud_essd")
.build());
final var defaultNetworks = VpcFunctions.getNetworks(GetNetworksArgs.builder()
.nameRegex("default-NODELETING")
.build());
final var defaultSwitches = VpcFunctions.getSwitches(GetSwitchesArgs.builder()
.vpcId(defaultNetworks.applyValue(getNetworksResult -> getNetworksResult.ids()[0]))
.zoneId(defaultZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
.build());
var defaultSecurityGroup = new SecurityGroup("defaultSecurityGroup", SecurityGroupArgs.builder()
.description("New security group")
.vpcId(defaultNetworks.applyValue(getNetworksResult -> getNetworksResult.ids()[0]))
.build());
for (var i = 0; i < 2; i++) {
new Disk("defaultDisk-" + i, DiskArgs.builder()
.diskName(var_.name())
.zoneId(defaultInstanceTypes.applyValue(getInstanceTypesResult -> getInstanceTypesResult.instanceTypes()[0].availabilityZones()[0]))
.category("cloud_essd")
.size("20")
.build());
}
final var defaultImages = EcsFunctions.getImages(GetImagesArgs.builder()
.owners("system")
.build());
var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()
.availabilityZone(defaultZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
.instanceName(var_.name())
.hostName("tf-testAcc")
.imageId(defaultImages.applyValue(getImagesResult -> getImagesResult.images()[0].id()))
.instanceType(defaultInstanceTypes.applyValue(getInstanceTypesResult -> getInstanceTypesResult.instanceTypes()[0].id()))
.securityGroups(defaultSecurityGroup.id())
.vswitchId(defaultSwitches.applyValue(getSwitchesResult -> getSwitchesResult.ids()[0]))
.build());
for (var i = 0; i < 2; i++) {
new DiskAttachment("defaultDiskAttachment-" + i, DiskAttachmentArgs.builder()
.diskId(defaultDisk.stream().map(element -> element.id()).collect(toList())[range.value()])
.instanceId(defaultInstance.id())
.build());
}
var example = new EcsSnapshotGroup("example", EcsSnapshotGroupArgs.builder()
.description("example_value")
.diskIds(
defaultDiskAttachment[0].diskId(),
defaultDiskAttachment[1].diskId())
.snapshotGroupName("example_value")
.resourceGroupId(defaultResourceGroups.applyValue(getResourceGroupsResult -> getResourceGroupsResult.groups()[0].id()))
.instanceId(defaultDiskAttachment[0].instanceId())
.instantAccess(true)
.instantAccessRetentionDays(1)
.tags(Map.ofEntries(
Map.entry("Created", "TF"),
Map.entry("For", "Acceptance-test")
))
.build());
}
}
import pulumi
import pulumi_alicloud as alicloud
default_resource_groups = alicloud.resourcemanager.get_resource_groups(name_regex="default")
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,
cpu_core_count=2,
memory_size=4,
system_disk_category="cloud_essd")
default_networks = alicloud.vpc.get_networks(name_regex="default-NODELETING")
default_switches = alicloud.vpc.get_switches(vpc_id=default_networks.ids[0],
zone_id=default_zones.zones[0].id)
default_security_group = alicloud.ecs.SecurityGroup("defaultSecurityGroup",
description="New security group",
vpc_id=default_networks.ids[0])
default_disk = []
for range in [{"value": i} for i in range(0, 2)]:
default_disk.append(alicloud.ecs.Disk(f"defaultDisk-{range['value']}",
disk_name=var["name"],
zone_id=default_instance_types.instance_types[0].availability_zones[0],
category="cloud_essd",
size=20))
default_images = alicloud.ecs.get_images(owners="system")
default_instance = alicloud.ecs.Instance("defaultInstance",
availability_zone=default_zones.zones[0].id,
instance_name=var["name"],
host_name="tf-testAcc",
image_id=default_images.images[0].id,
instance_type=default_instance_types.instance_types[0].id,
security_groups=[default_security_group.id],
vswitch_id=default_switches.ids[0])
default_disk_attachment = []
for range in [{"value": i} for i in range(0, 2)]:
default_disk_attachment.append(alicloud.ecs.DiskAttachment(f"defaultDiskAttachment-{range['value']}",
disk_id=[__item.id for __item in default_disk][range["value"]],
instance_id=default_instance.id))
example = alicloud.ecs.EcsSnapshotGroup("example",
description="example_value",
disk_ids=[
default_disk_attachment[0].disk_id,
default_disk_attachment[1].disk_id,
],
snapshot_group_name="example_value",
resource_group_id=default_resource_groups.groups[0].id,
instance_id=default_disk_attachment[0].instance_id,
instant_access=True,
instant_access_retention_days=1,
tags={
"Created": "TF",
"For": "Acceptance-test",
})
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const defaultResourceGroups = alicloud.resourcemanager.getResourceGroups({
nameRegex: "default",
});
const defaultZones = alicloud.getZones({
availableResourceCreation: "Instance",
availableDiskCategory: "cloud_essd",
});
const defaultInstanceTypes = defaultZones.then(defaultZones => alicloud.ecs.getInstanceTypes({
availabilityZone: defaultZones.zones?.[0]?.id,
cpuCoreCount: 2,
memorySize: 4,
systemDiskCategory: "cloud_essd",
}));
const defaultNetworks = alicloud.vpc.getNetworks({
nameRegex: "default-NODELETING",
});
const defaultSwitches = Promise.all([defaultNetworks, defaultZones]).then(([defaultNetworks, defaultZones]) => alicloud.vpc.getSwitches({
vpcId: defaultNetworks.ids?.[0],
zoneId: defaultZones.zones?.[0]?.id,
}));
const defaultSecurityGroup = new alicloud.ecs.SecurityGroup("defaultSecurityGroup", {
description: "New security group",
vpcId: defaultNetworks.then(defaultNetworks => defaultNetworks.ids?.[0]),
});
const defaultDisk: alicloud.ecs.Disk[] = [];
for (const range = {value: 0}; range.value < 2; range.value++) {
defaultDisk.push(new alicloud.ecs.Disk(`defaultDisk-${range.value}`, {
diskName: _var.name,
zoneId: defaultInstanceTypes.then(defaultInstanceTypes => defaultInstanceTypes.instanceTypes?.[0]?.availabilityZones?.[0]),
category: "cloud_essd",
size: 20,
}));
}
const defaultImages = alicloud.ecs.getImages({
owners: "system",
});
const defaultInstance = new alicloud.ecs.Instance("defaultInstance", {
availabilityZone: defaultZones.then(defaultZones => defaultZones.zones?.[0]?.id),
instanceName: _var.name,
hostName: "tf-testAcc",
imageId: defaultImages.then(defaultImages => defaultImages.images?.[0]?.id),
instanceType: defaultInstanceTypes.then(defaultInstanceTypes => defaultInstanceTypes.instanceTypes?.[0]?.id),
securityGroups: [defaultSecurityGroup.id],
vswitchId: defaultSwitches.then(defaultSwitches => defaultSwitches.ids?.[0]),
});
const defaultDiskAttachment: alicloud.ecs.DiskAttachment[] = [];
for (const range = {value: 0}; range.value < 2; range.value++) {
defaultDiskAttachment.push(new alicloud.ecs.DiskAttachment(`defaultDiskAttachment-${range.value}`, {
diskId: defaultDisk.map(__item => __item.id)[range.value],
instanceId: defaultInstance.id,
}));
}
const example = new alicloud.ecs.EcsSnapshotGroup("example", {
description: "example_value",
diskIds: [
defaultDiskAttachment[0].diskId,
defaultDiskAttachment[1].diskId,
],
snapshotGroupName: "example_value",
resourceGroupId: defaultResourceGroups.then(defaultResourceGroups => defaultResourceGroups.groups?.[0]?.id),
instanceId: defaultDiskAttachment[0].instanceId,
instantAccess: true,
instantAccessRetentionDays: 1,
tags: {
Created: "TF",
For: "Acceptance-test",
},
});
Coming soon!
Create EcsSnapshotGroup Resource
new EcsSnapshotGroup(name: string, args?: EcsSnapshotGroupArgs, opts?: CustomResourceOptions);
@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)
@overload
def EcsSnapshotGroup(resource_name: str,
args: Optional[EcsSnapshotGroupArgs] = None,
opts: Optional[ResourceOptions] = 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.
- 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.
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://.
- Disk
Ids List<string> The ID of disk for which to create snapshots. You can specify multiple disk IDs across instances with the same zone.
- Exclude
Disk List<string>Ids 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 string The ID of the instance.
- Instant
Access bool Specifies whether to enable the instant access feature.
- Instant
Access intRetention Days Specify the number of days for which the instant access feature is available. Unit: days. Valid values:
1
to65535
.- Resource
Group stringId The ID of the resource group to which the snapshot consistency group belongs.
- Snapshot
Group stringName The name of the snapshot-consistent group. The name must be
2
to128
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 withhttp://
orhttps://
.- 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://.
- Disk
Ids []string The ID of disk for which to create snapshots. You can specify multiple disk IDs across instances with the same zone.
- Exclude
Disk []stringIds 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 string The ID of the instance.
- Instant
Access bool Specifies whether to enable the instant access feature.
- Instant
Access intRetention Days Specify the number of days for which the instant access feature is available. Unit: days. Valid values:
1
to65535
.- Resource
Group stringId The ID of the resource group to which the snapshot consistency group belongs.
- Snapshot
Group stringName The name of the snapshot-consistent group. The name must be
2
to128
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 withhttp://
orhttps://
.- 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://.
- disk
Ids List<String> The ID of disk for which to create snapshots. You can specify multiple disk IDs across instances with the same zone.
- exclude
Disk List<String>Ids 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 String The ID of the instance.
- instant
Access Boolean Specifies whether to enable the instant access feature.
- instant
Access IntegerRetention Days Specify the number of days for which the instant access feature is available. Unit: days. Valid values:
1
to65535
.- resource
Group StringId The ID of the resource group to which the snapshot consistency group belongs.
- snapshot
Group StringName The name of the snapshot-consistent group. The name must be
2
to128
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 withhttp://
orhttps://
.- 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://.
- disk
Ids string[] The ID of disk for which to create snapshots. You can specify multiple disk IDs across instances with the same zone.
- exclude
Disk string[]Ids 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 string The ID of the instance.
- instant
Access boolean Specifies whether to enable the instant access feature.
- instant
Access numberRetention Days Specify the number of days for which the instant access feature is available. Unit: days. Valid values:
1
to65535
.- resource
Group stringId The ID of the resource group to which the snapshot consistency group belongs.
- snapshot
Group stringName The name of the snapshot-consistent group. The name must be
2
to128
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 withhttp://
orhttps://
.- {[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_ Sequence[str]ids 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_ intretention_ days Specify the number of days for which the instant access feature is available. Unit: days. Valid values:
1
to65535
.- resource_
group_ strid The ID of the resource group to which the snapshot consistency group belongs.
- snapshot_
group_ strname The name of the snapshot-consistent group. The name must be
2
to128
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 withhttp://
orhttps://
.- 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://.
- disk
Ids List<String> The ID of disk for which to create snapshots. You can specify multiple disk IDs across instances with the same zone.
- exclude
Disk List<String>Ids 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 String The ID of the instance.
- instant
Access Boolean Specifies whether to enable the instant access feature.
- instant
Access NumberRetention Days Specify the number of days for which the instant access feature is available. Unit: days. Valid values:
1
to65535
.- resource
Group StringId The ID of the resource group to which the snapshot consistency group belongs.
- snapshot
Group StringName The name of the snapshot-consistent group. The name must be
2
to128
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 withhttp://
orhttps://
.- 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:
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.
- 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://.
- Disk
Ids List<string> The ID of disk for which to create snapshots. You can specify multiple disk IDs across instances with the same zone.
- Exclude
Disk List<string>Ids 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 string The ID of the instance.
- Instant
Access bool Specifies whether to enable the instant access feature.
- Instant
Access intRetention Days Specify the number of days for which the instant access feature is available. Unit: days. Valid values:
1
to65535
.- Resource
Group stringId The ID of the resource group to which the snapshot consistency group belongs.
- Snapshot
Group stringName The name of the snapshot-consistent group. The name must be
2
to128
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 withhttp://
orhttps://
.- Status string
The status of the resource.
- 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://.
- Disk
Ids []string The ID of disk for which to create snapshots. You can specify multiple disk IDs across instances with the same zone.
- Exclude
Disk []stringIds 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 string The ID of the instance.
- Instant
Access bool Specifies whether to enable the instant access feature.
- Instant
Access intRetention Days Specify the number of days for which the instant access feature is available. Unit: days. Valid values:
1
to65535
.- Resource
Group stringId The ID of the resource group to which the snapshot consistency group belongs.
- Snapshot
Group stringName The name of the snapshot-consistent group. The name must be
2
to128
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 withhttp://
orhttps://
.- Status string
The status of the resource.
- 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://.
- disk
Ids List<String> The ID of disk for which to create snapshots. You can specify multiple disk IDs across instances with the same zone.
- exclude
Disk List<String>Ids 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 String The ID of the instance.
- instant
Access Boolean Specifies whether to enable the instant access feature.
- instant
Access IntegerRetention Days Specify the number of days for which the instant access feature is available. Unit: days. Valid values:
1
to65535
.- resource
Group StringId The ID of the resource group to which the snapshot consistency group belongs.
- snapshot
Group StringName The name of the snapshot-consistent group. The name must be
2
to128
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 withhttp://
orhttps://
.- status String
The status of the resource.
- 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://.
- disk
Ids string[] The ID of disk for which to create snapshots. You can specify multiple disk IDs across instances with the same zone.
- exclude
Disk string[]Ids 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 string The ID of the instance.
- instant
Access boolean Specifies whether to enable the instant access feature.
- instant
Access numberRetention Days Specify the number of days for which the instant access feature is available. Unit: days. Valid values:
1
to65535
.- resource
Group stringId The ID of the resource group to which the snapshot consistency group belongs.
- snapshot
Group stringName The name of the snapshot-consistent group. The name must be
2
to128
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 withhttp://
orhttps://
.- status string
The status of the resource.
- {[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_ Sequence[str]ids 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_ intretention_ days Specify the number of days for which the instant access feature is available. Unit: days. Valid values:
1
to65535
.- resource_
group_ strid The ID of the resource group to which the snapshot consistency group belongs.
- snapshot_
group_ strname The name of the snapshot-consistent group. The name must be
2
to128
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 withhttp://
orhttps://
.- status str
The status of the resource.
- 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://.
- disk
Ids List<String> The ID of disk for which to create snapshots. You can specify multiple disk IDs across instances with the same zone.
- exclude
Disk List<String>Ids 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 String The ID of the instance.
- instant
Access Boolean Specifies whether to enable the instant access feature.
- instant
Access NumberRetention Days Specify the number of days for which the instant access feature is available. Unit: days. Valid values:
1
to65535
.- resource
Group StringId The ID of the resource group to which the snapshot consistency group belongs.
- snapshot
Group StringName The name of the snapshot-consistent group. The name must be
2
to128
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 withhttp://
orhttps://
.- status String
The status of the resource.
- 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>
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.