This page documents the language specification for the alicloud package. If you're looking for help working with the inputs, outputs, or functions of alicloud resources in a Pulumi program, please see the resource documentation for examples and API reference.
ecs¶
This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-alicloud repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-alicloud repo.
- class
pulumi_alicloud.ecs.AutoProvisioningGroup(resource_name, opts=None, auto_provisioning_group_name=None, auto_provisioning_group_type=None, default_target_capacity_type=None, description=None, excess_capacity_termination_policy=None, launch_template_configs=None, launch_template_id=None, launch_template_version=None, max_spot_price=None, pay_as_you_go_allocation_strategy=None, pay_as_you_go_target_capacity=None, spot_allocation_strategy=None, spot_instance_interruption_behavior=None, spot_instance_pools_to_use_count=None, spot_target_capacity=None, terminate_instances=None, terminate_instances_with_expiration=None, total_target_capacity=None, valid_from=None, valid_until=None, __props__=None, __name__=None, __opts__=None)¶ Provides a ECS auto provisioning group resource which is a solution that uses preemptive instances and pay_as_you_go instances to rapidly deploy clusters.
NOTE: Available in 1.79.0+
import pulumi import pulumi_alicloud as alicloud config = pulumi.Config() name = config.get("name") if name is None: name = "auto_provisioning_group" default_zones = alicloud.get_zones(available_disk_category="cloud_efficiency", available_resource_creation="VSwitch") default_network = alicloud.vpc.Network("defaultNetwork", cidr_block="172.16.0.0/16") default_switch = alicloud.vpc.Switch("defaultSwitch", availability_zone=default_zones.zones[0]["id"], cidr_block="172.16.0.0/24", vpc_id=default_network.id) default_security_group = alicloud.ecs.SecurityGroup("defaultSecurityGroup", vpc_id=default_network.id) default_images = alicloud.ecs.get_images(most_recent=True, name_regex="^ubuntu_18.*64", owners="system") template = alicloud.ecs.LaunchTemplate("template", image_id=default_images.images[0]["id"], instance_type="ecs.n1.tiny", security_group_id=default_security_group.id) default_auto_provisioning_group = alicloud.ecs.AutoProvisioningGroup("defaultAutoProvisioningGroup", launch_template_configs=[{ "instance_type": "ecs.n1.small", "vswitch_id": default_switch.id, }], launch_template_id=template.id, pay_as_you_go_target_capacity="1", spot_target_capacity="2", total_target_capacity="4")
The config mapping supports the following:
instance_type- (Optional) The instance type of the Nth extended configurations of the launch template.max_price- (Required) The maximum price of the instance type specified in the Nth extended configurations of the launch template.vswitch_id- (Required) The ID of the VSwitch in the Nth extended configurations of the launch template.weighted_capacity- (Optional) The weight of the instance type specified in the Nth extended configurations of the launch template.priority- (Optional) The priority of the instance type specified in the Nth extended configurations of the launch template. A value of 0 indicates the highest priority.
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
default_target_capacity_type (pulumi.Input[str]) – The type of supplemental instances. When the total value of PayAsYouGoTargetCapacity and SpotTargetCapacity is smaller than the value of TotalTargetCapacity, the auto provisioning group will create instances of the specified type to meet the capacity requirements. Valid values:PayAsYouGo: Pay-as-you-go instances; Spot: Preemptible instances, Default value:
Spot.description (pulumi.Input[str]) – The description of the auto provisioning group.
excess_capacity_termination_policy (pulumi.Input[str]) – The shutdown policy for excess preemptible instances followed when the capacity of the auto provisioning group exceeds the target capacity. Valid values:
no-terminationandtermination,Default value:no-termination.launch_template_configs (pulumi.Input[list]) – DataDisk mappings to attach to ecs instance. See Block config below for details.
launch_template_id (pulumi.Input[str]) – The ID of the instance launch template associated with the auto provisioning group.
launch_template_version (pulumi.Input[str]) – The version of the instance launch template associated with the auto provisioning group.
max_spot_price (pulumi.Input[float]) – The global maximum price for preemptible instances in the auto provisioning group. If both the
MaxSpotPriceandLaunchTemplateConfig.N.MaxPriceparameters are specified, the maximum price is the lower value of the two.pay_as_you_go_allocation_strategy (pulumi.Input[str]) – The scale-out policy for pay-as-you-go instances. Valid values:
lowest-priceandprioritized,Default value:lowest-price.pay_as_you_go_target_capacity (pulumi.Input[str]) – The target capacity of pay-as-you-go instances in the auto provisioning group.
spot_allocation_strategy (pulumi.Input[str]) – The scale-out policy for preemptible instances. Valid values:lowest-price and
diversified,Default value:lowest-price.spot_instance_interruption_behavior (pulumi.Input[str]) – The default behavior after preemptible instances are shut down. Value values:
stopandterminate,Default value:stop.spot_instance_pools_to_use_count (pulumi.Input[float]) – This parameter takes effect when the
SpotAllocationStrategyparameter is set tolowest-price. The auto provisioning group selects instance types of the lowest cost to create instances.spot_target_capacity (pulumi.Input[str]) – The target capacity of preemptible instances in the auto provisioning group.
terminate_instances (pulumi.Input[bool]) – Specifies whether to release instances of the auto provisioning group. Valid values:false and
true, default value:false.terminate_instances_with_expiration (pulumi.Input[bool]) – The shutdown policy for preemptible instances when the auto provisioning group expires. Valid values:
falseandtrue, default value:false.total_target_capacity (pulumi.Input[str]) – The total target capacity of the auto provisioning group. The target capacity consists of the following three parts:PayAsYouGoTargetCapacity,SpotTargetCapacity and the supplemental capacity besides PayAsYouGoTargetCapacity and SpotTargetCapacity.
valid_from (pulumi.Input[str]) – The time when the auto provisioning group is started. The period of time between this point in time and the point in time specified by the
valid_untilparameter is the effective time period of the auto provisioning group.By default, an auto provisioning group is immediately started after creation.valid_until (pulumi.Input[str]) – The time when the auto provisioning group expires. The period of time between this point in time and the point in time specified by the
valid_fromparameter is the effective time period of the auto provisioning group.By default, an auto provisioning group never expires.
The launch_template_configs object supports the following:
instance_type(pulumi.Input[str])maxPrice(pulumi.Input[str])priority(pulumi.Input[str])vswitch_id(pulumi.Input[str])weightedCapacity(pulumi.Input[str])
default_target_capacity_type: pulumi.Output[str] = None¶The type of supplemental instances. When the total value of
PayAsYouGoTargetCapacityandSpotTargetCapacityis smaller than the value of TotalTargetCapacity, the auto provisioning group will create instances of the specified type to meet the capacity requirements. Valid values:PayAsYouGo: Pay-as-you-go instances; Spot: Preemptible instances, Default value:Spot.
description: pulumi.Output[str] = None¶The description of the auto provisioning group.
excess_capacity_termination_policy: pulumi.Output[str] = None¶The shutdown policy for excess preemptible instances followed when the capacity of the auto provisioning group exceeds the target capacity. Valid values:
no-terminationandtermination,Default value:no-termination.
launch_template_configs: pulumi.Output[list] = None¶DataDisk mappings to attach to ecs instance. See Block config below for details.
instance_type(str)maxPrice(str)priority(str)vswitch_id(str)weightedCapacity(str)
launch_template_id: pulumi.Output[str] = None¶The ID of the instance launch template associated with the auto provisioning group.
launch_template_version: pulumi.Output[str] = None¶The version of the instance launch template associated with the auto provisioning group.
max_spot_price: pulumi.Output[float] = None¶The global maximum price for preemptible instances in the auto provisioning group. If both the
MaxSpotPriceandLaunchTemplateConfig.N.MaxPriceparameters are specified, the maximum price is the lower value of the two.
pay_as_you_go_allocation_strategy: pulumi.Output[str] = None¶The scale-out policy for pay-as-you-go instances. Valid values:
lowest-priceandprioritized,Default value:lowest-price.
pay_as_you_go_target_capacity: pulumi.Output[str] = None¶The target capacity of pay-as-you-go instances in the auto provisioning group.
spot_allocation_strategy: pulumi.Output[str] = None¶The scale-out policy for preemptible instances. Valid values:
lowest-priceanddiversified,Default value:lowest-price.
spot_instance_interruption_behavior: pulumi.Output[str] = None¶The default behavior after preemptible instances are shut down. Value values:
stopandterminate,Default value:stop.
spot_instance_pools_to_use_count: pulumi.Output[float] = None¶This parameter takes effect when the
SpotAllocationStrategyparameter is set tolowest-price. The auto provisioning group selects instance types of the lowest cost to create instances.
spot_target_capacity: pulumi.Output[str] = None¶The target capacity of preemptible instances in the auto provisioning group.
terminate_instances: pulumi.Output[bool] = None¶Specifies whether to release instances of the auto provisioning group. Valid values:
falseandtrue, default value:false.
terminate_instances_with_expiration: pulumi.Output[bool] = None¶The shutdown policy for preemptible instances when the auto provisioning group expires. Valid values:
falseandtrue, default value:false.
total_target_capacity: pulumi.Output[str] = None¶The total target capacity of the auto provisioning group. The target capacity consists of the following three parts:PayAsYouGoTargetCapacity,SpotTargetCapacity and the supplemental capacity besides PayAsYouGoTargetCapacity and SpotTargetCapacity.
valid_from: pulumi.Output[str] = None¶The time when the auto provisioning group is started. The period of time between this point in time and the point in time specified by the
valid_untilparameter is the effective time period of the auto provisioning group.By default, an auto provisioning group is immediately started after creation.
valid_until: pulumi.Output[str] = None¶The time when the auto provisioning group expires. The period of time between this point in time and the point in time specified by the
valid_fromparameter is the effective time period of the auto provisioning group.By default, an auto provisioning group never expires.
- static
get(resource_name, id, opts=None, auto_provisioning_group_name=None, auto_provisioning_group_type=None, default_target_capacity_type=None, description=None, excess_capacity_termination_policy=None, launch_template_configs=None, launch_template_id=None, launch_template_version=None, max_spot_price=None, pay_as_you_go_allocation_strategy=None, pay_as_you_go_target_capacity=None, spot_allocation_strategy=None, spot_instance_interruption_behavior=None, spot_instance_pools_to_use_count=None, spot_target_capacity=None, terminate_instances=None, terminate_instances_with_expiration=None, total_target_capacity=None, valid_from=None, valid_until=None)¶ Get an existing AutoProvisioningGroup resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
default_target_capacity_type (pulumi.Input[str]) – The type of supplemental instances. When the total value of PayAsYouGoTargetCapacity and SpotTargetCapacity is smaller than the value of TotalTargetCapacity, the auto provisioning group will create instances of the specified type to meet the capacity requirements. Valid values:PayAsYouGo: Pay-as-you-go instances; Spot: Preemptible instances, Default value:
Spot.description (pulumi.Input[str]) – The description of the auto provisioning group.
excess_capacity_termination_policy (pulumi.Input[str]) – The shutdown policy for excess preemptible instances followed when the capacity of the auto provisioning group exceeds the target capacity. Valid values:
no-terminationandtermination,Default value:no-termination.launch_template_configs (pulumi.Input[list]) – DataDisk mappings to attach to ecs instance. See Block config below for details.
launch_template_id (pulumi.Input[str]) – The ID of the instance launch template associated with the auto provisioning group.
launch_template_version (pulumi.Input[str]) – The version of the instance launch template associated with the auto provisioning group.
max_spot_price (pulumi.Input[float]) – The global maximum price for preemptible instances in the auto provisioning group. If both the
MaxSpotPriceandLaunchTemplateConfig.N.MaxPriceparameters are specified, the maximum price is the lower value of the two.pay_as_you_go_allocation_strategy (pulumi.Input[str]) – The scale-out policy for pay-as-you-go instances. Valid values:
lowest-priceandprioritized,Default value:lowest-price.pay_as_you_go_target_capacity (pulumi.Input[str]) – The target capacity of pay-as-you-go instances in the auto provisioning group.
spot_allocation_strategy (pulumi.Input[str]) – The scale-out policy for preemptible instances. Valid values:lowest-price and
diversified,Default value:lowest-price.spot_instance_interruption_behavior (pulumi.Input[str]) – The default behavior after preemptible instances are shut down. Value values:
stopandterminate,Default value:stop.spot_instance_pools_to_use_count (pulumi.Input[float]) – This parameter takes effect when the
SpotAllocationStrategyparameter is set tolowest-price. The auto provisioning group selects instance types of the lowest cost to create instances.spot_target_capacity (pulumi.Input[str]) – The target capacity of preemptible instances in the auto provisioning group.
terminate_instances (pulumi.Input[bool]) – Specifies whether to release instances of the auto provisioning group. Valid values:false and
true, default value:false.terminate_instances_with_expiration (pulumi.Input[bool]) – The shutdown policy for preemptible instances when the auto provisioning group expires. Valid values:
falseandtrue, default value:false.total_target_capacity (pulumi.Input[str]) – The total target capacity of the auto provisioning group. The target capacity consists of the following three parts:PayAsYouGoTargetCapacity,SpotTargetCapacity and the supplemental capacity besides PayAsYouGoTargetCapacity and SpotTargetCapacity.
valid_from (pulumi.Input[str]) – The time when the auto provisioning group is started. The period of time between this point in time and the point in time specified by the
valid_untilparameter is the effective time period of the auto provisioning group.By default, an auto provisioning group is immediately started after creation.valid_until (pulumi.Input[str]) – The time when the auto provisioning group expires. The period of time between this point in time and the point in time specified by the
valid_fromparameter is the effective time period of the auto provisioning group.By default, an auto provisioning group never expires.
The launch_template_configs object supports the following:
instance_type(pulumi.Input[str])maxPrice(pulumi.Input[str])priority(pulumi.Input[str])vswitch_id(pulumi.Input[str])weightedCapacity(pulumi.Input[str])
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_alicloud.ecs.AwaitableGetDisksResult(category=None, disks=None, encrypted=None, id=None, ids=None, instance_id=None, name_regex=None, output_file=None, resource_group_id=None, tags=None, type=None)¶
- class
pulumi_alicloud.ecs.AwaitableGetEipsResult(eips=None, id=None, ids=None, in_use=None, ip_addresses=None, names=None, output_file=None, resource_group_id=None, tags=None)¶
- class
pulumi_alicloud.ecs.AwaitableGetImagesResult(id=None, ids=None, images=None, most_recent=None, name_regex=None, output_file=None, owners=None)¶
- class
pulumi_alicloud.ecs.AwaitableGetInstanceTypeFamiliesResult(families=None, generation=None, id=None, ids=None, instance_charge_type=None, output_file=None, spot_strategy=None, zone_id=None)¶
- class
pulumi_alicloud.ecs.AwaitableGetInstanceTypesResult(availability_zone=None, cpu_core_count=None, eni_amount=None, gpu_amount=None, gpu_spec=None, id=None, ids=None, instance_charge_type=None, instance_type_family=None, instance_types=None, is_outdated=None, kubernetes_node_role=None, memory_size=None, network_type=None, output_file=None, sorted_by=None, spot_strategy=None)¶
- class
pulumi_alicloud.ecs.AwaitableGetInstancesResult(availability_zone=None, id=None, ids=None, image_id=None, instances=None, name_regex=None, names=None, output_file=None, ram_role_name=None, resource_group_id=None, status=None, tags=None, vpc_id=None, vswitch_id=None)¶
- class
pulumi_alicloud.ecs.AwaitableGetKeyPairsResult(finger_print=None, id=None, ids=None, key_pairs=None, name_regex=None, names=None, output_file=None, resource_group_id=None, tags=None)¶
- class
pulumi_alicloud.ecs.AwaitableGetNetworkInterfacesResult(id=None, ids=None, instance_id=None, interfaces=None, name_regex=None, names=None, output_file=None, private_ip=None, resource_group_id=None, security_group_id=None, tags=None, type=None, vpc_id=None, vswitch_id=None)¶
- class
pulumi_alicloud.ecs.AwaitableGetSecurityGroupRulesResult(direction=None, group_desc=None, group_id=None, group_name=None, id=None, ip_protocol=None, nic_type=None, output_file=None, policy=None, rules=None)¶
- class
pulumi_alicloud.ecs.AwaitableGetSecurityGroupsResult(groups=None, id=None, ids=None, name_regex=None, names=None, output_file=None, resource_group_id=None, tags=None, vpc_id=None)¶
- class
pulumi_alicloud.ecs.AwaitableGetSnapshotsResult(disk_id=None, encrypted=None, id=None, ids=None, instance_id=None, name_regex=None, names=None, output_file=None, snapshots=None, source_disk_type=None, status=None, tags=None, type=None, usage=None)¶
- class
pulumi_alicloud.ecs.CopyImage(resource_name, opts=None, description=None, encrypted=None, force=None, image_name=None, kms_key_id=None, name=None, source_image_id=None, source_region_id=None, tags=None, __props__=None, __name__=None, __opts__=None)¶ Create a CopyImage resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource.
- static
get(resource_name, id, opts=None, description=None, encrypted=None, force=None, image_name=None, kms_key_id=None, name=None, source_image_id=None, source_region_id=None, tags=None)¶ Get an existing CopyImage resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- static
- class
pulumi_alicloud.ecs.Disk(resource_name, opts=None, availability_zone=None, category=None, delete_auto_snapshot=None, delete_with_instance=None, description=None, enable_auto_snapshot=None, encrypted=None, kms_key_id=None, name=None, resource_group_id=None, size=None, snapshot_id=None, tags=None, __props__=None, __name__=None, __opts__=None)¶ Create a Disk resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] availability_zone: The Zone to create the disk in. :param pulumi.Input[str] category: Category of the disk. Valid values are
cloud,cloud_efficiency,cloud_ssd,cloud_essd. Default iscloud_efficiency. :param pulumi.Input[bool] delete_auto_snapshot: Indicates whether the automatic snapshot is deleted when the disk is released. Default value: false. :param pulumi.Input[bool] delete_with_instance: Indicates whether the disk is released together with the instance: Default value: false. :param pulumi.Input[str] description: Description of the disk. This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null. :param pulumi.Input[bool] enable_auto_snapshot: Indicates whether to apply a created automatic snapshot policy to the disk. Default value: false. :param pulumi.Input[bool] encrypted: If true, the disk will be encrypted, conflict withsnapshot_id. :param pulumi.Input[str] kms_keyid: The ID of the KMS key corresponding to the data disk, The specified parameter ``Encrypted`` must be ``true`` when KmsKeyId is not empty. :param pulumi.Input[str] name: Name of the ECS disk. This name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as “-“,”.”,””, and must not begin or end with a hyphen, and must not begin with http:// or https://. Default value is null. :param pulumi.Input[str] resource_group_id: The Id of resource group which the disk belongs.> **NOTE:** Disk category `cloud` has been outdated and it only can be used none I/O Optimized ECS instances. Recommend `cloud_efficiency` and `cloud_ssd` disk.
- Parameters
size (pulumi.Input[float]) – The size of the disk in GiBs. When resize the disk, the new size must be greater than the former value, or you would get an error
InvalidDiskSize.TooSmall.snapshot_id (pulumi.Input[str]) – A snapshot to base the disk off of. If the disk size required by snapshot is greater than
size, thesizewill be ignored, conflict withencrypted.tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.
availability_zone: pulumi.Output[str] = None¶The Zone to create the disk in.
category: pulumi.Output[str] = None¶Category of the disk. Valid values are
cloud,cloud_efficiency,cloud_ssd,cloud_essd. Default iscloud_efficiency.
delete_auto_snapshot: pulumi.Output[bool] = None¶Indicates whether the automatic snapshot is deleted when the disk is released. Default value: false.
delete_with_instance: pulumi.Output[bool] = None¶Indicates whether the disk is released together with the instance: Default value: false.
description: pulumi.Output[str] = None¶Description of the disk. This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
enable_auto_snapshot: pulumi.Output[bool] = None¶Indicates whether to apply a created automatic snapshot policy to the disk. Default value: false.
encrypted: pulumi.Output[bool] = None¶If true, the disk will be encrypted, conflict with
snapshot_id.
kms_key_id: pulumi.Output[str] = None¶The ID of the KMS key corresponding to the data disk, The specified parameter
Encryptedmust betruewhen KmsKeyId is not empty.
name: pulumi.Output[str] = None¶Name of the ECS disk. This name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as “-“,”.”,”_”, and must not begin or end with a hyphen, and must not begin with http:// or https://. Default value is null.
resource_group_id: pulumi.Output[str] = None¶The Id of resource group which the disk belongs.
NOTE: Disk category
cloudhas been outdated and it only can be used none I/O Optimized ECS instances. Recommendcloud_efficiencyandcloud_ssddisk.
size: pulumi.Output[float] = None¶The size of the disk in GiBs. When resize the disk, the new size must be greater than the former value, or you would get an error
InvalidDiskSize.TooSmall.
snapshot_id: pulumi.Output[str] = None¶A snapshot to base the disk off of. If the disk size required by snapshot is greater than
size, thesizewill be ignored, conflict withencrypted.
status: pulumi.Output[str] = None¶The disk status.
A mapping of tags to assign to the resource.
- static
get(resource_name, id, opts=None, availability_zone=None, category=None, delete_auto_snapshot=None, delete_with_instance=None, description=None, enable_auto_snapshot=None, encrypted=None, kms_key_id=None, name=None, resource_group_id=None, size=None, snapshot_id=None, status=None, tags=None)¶ Get an existing Disk resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
availability_zone (pulumi.Input[str]) – The Zone to create the disk in.
category (pulumi.Input[str]) – Category of the disk. Valid values are
cloud,cloud_efficiency,cloud_ssd,cloud_essd. Default iscloud_efficiency.delete_auto_snapshot (pulumi.Input[bool]) – Indicates whether the automatic snapshot is deleted when the disk is released. Default value: false.
delete_with_instance (pulumi.Input[bool]) – Indicates whether the disk is released together with the instance: Default value: false.
description (pulumi.Input[str]) – Description of the disk. This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
enable_auto_snapshot (pulumi.Input[bool]) – Indicates whether to apply a created automatic snapshot policy to the disk. Default value: false.
encrypted (pulumi.Input[bool]) – If true, the disk will be encrypted, conflict with
snapshot_id.kms_key*id (pulumi.Input[str]) –
The ID of the KMS key corresponding to the data disk, The specified parameter
Encryptedmust betruewhen KmsKeyId is not empty.name (pulumi.Input[str]) – Name of the ECS disk. This name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as “-“,”.”,”*”, and must not begin or end with a hyphen, and must not begin with http:// or https://. Default value is null.
resource_group_id (pulumi.Input[str]) – The Id of resource group which the disk belongs.
> **NOTE:** Disk category `cloud` has been outdated and it only can be used none I/O Optimized ECS instances. Recommend `cloud_efficiency` and `cloud_ssd` disk.
- Parameters
size (pulumi.Input[float]) – The size of the disk in GiBs. When resize the disk, the new size must be greater than the former value, or you would get an error
InvalidDiskSize.TooSmall.snapshot_id (pulumi.Input[str]) – A snapshot to base the disk off of. If the disk size required by snapshot is greater than
size, thesizewill be ignored, conflict withencrypted.status (pulumi.Input[str]) – The disk status.
tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_alicloud.ecs.DiskAttachment(resource_name, opts=None, device_name=None, disk_id=None, instance_id=None, __props__=None, __name__=None, __opts__=None)¶ Create a DiskAttachment resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] device_name: The device name has been deprecated, and when attaching disk, it will be allocated automatically by system according to default order from /dev/xvdb to /dev/xvdz. :param pulumi.Input[str] disk_id: ID of the Disk to be attached. :param pulumi.Input[str] instance_id: ID of the Instance to attach to.
device_name: pulumi.Output[str] = None¶The device name has been deprecated, and when attaching disk, it will be allocated automatically by system according to default order from /dev/xvdb to /dev/xvdz.
disk_id: pulumi.Output[str] = None¶ID of the Disk to be attached.
instance_id: pulumi.Output[str] = None¶ID of the Instance to attach to.
- static
get(resource_name, id, opts=None, device_name=None, disk_id=None, instance_id=None)¶ Get an existing DiskAttachment resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
device_name (pulumi.Input[str]) – The device name has been deprecated, and when attaching disk, it will be allocated automatically by system according to default order from /dev/xvdb to /dev/xvdz.
disk_id (pulumi.Input[str]) – ID of the Disk to be attached.
instance_id (pulumi.Input[str]) – ID of the Instance to attach to.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_alicloud.ecs.Eip(resource_name, opts=None, bandwidth=None, description=None, instance_charge_type=None, internet_charge_type=None, isp=None, name=None, period=None, resource_group_id=None, tags=None, __props__=None, __name__=None, __opts__=None)¶ Create a Eip resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[float] bandwidth: Maximum bandwidth to the elastic public network, measured in Mbps (Mega bit per second). If this value is not specified, then automatically sets it to 5 Mbps. :param pulumi.Input[str] description: Description of the EIP instance, This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null. :param pulumi.Input[str] instance_charge_type: Elastic IP instance charge type. Valid values are “PrePaid” and “PostPaid”. Default to “PostPaid”. :param pulumi.Input[str] internet_charge_type: Internet charge type of the EIP, Valid values are
PayByBandwidth,PayByTraffic. Default toPayByBandwidth. From version1.7.1, default toPayByTraffic. It is only PayByBandwidth wheninstance_charge_typeis PrePaid. :param pulumi.Input[str] isp: The line type of the Elastic IP instance. Default toBGP. Other type of the isp need to open a whitelist. :param pulumi.Input[str] name: The name of the EIP instance. This name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as “-“,”.”,”_”, and must not begin or end with a hyphen, and must not begin with http:// or https://. :param pulumi.Input[float] period: The duration that you will buy the resource, in month. It is valid wheninstance_charge_typeisPrePaid.Default to 1. Valid values: [1-9, 12, 24, 36]. At present, the provider does not support modify “period” and you can do that via web console.
- Parameters
resource_group_id (pulumi.Input[str]) – The Id of resource group which the eip belongs.
tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.
bandwidth: pulumi.Output[float] = None¶Maximum bandwidth to the elastic public network, measured in Mbps (Mega bit per second). If this value is not specified, then automatically sets it to 5 Mbps.
description: pulumi.Output[str] = None¶Description of the EIP instance, This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
instance_charge_type: pulumi.Output[str] = None¶Elastic IP instance charge type. Valid values are “PrePaid” and “PostPaid”. Default to “PostPaid”.
internet_charge_type: pulumi.Output[str] = None¶Internet charge type of the EIP, Valid values are
PayByBandwidth,PayByTraffic. Default toPayByBandwidth. From version1.7.1, default toPayByTraffic. It is only PayByBandwidth wheninstance_charge_typeis PrePaid.
ip_address: pulumi.Output[str] = None¶The elastic ip address
isp: pulumi.Output[str] = None¶The line type of the Elastic IP instance. Default to
BGP. Other type of the isp need to open a whitelist.
name: pulumi.Output[str] = None¶The name of the EIP instance. This name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as “-“,”.”,”_”, and must not begin or end with a hyphen, and must not begin with http:// or https://.
period: pulumi.Output[float] = None¶The duration that you will buy the resource, in month. It is valid when
instance_charge_typeisPrePaid. Default to 1. Valid values: [1-9, 12, 24, 36]. At present, the provider does not support modify “period” and you can do that via web console.
resource_group_id: pulumi.Output[str] = None¶The Id of resource group which the eip belongs.
status: pulumi.Output[str] = None¶The EIP current status.
A mapping of tags to assign to the resource.
- static
get(resource_name, id, opts=None, bandwidth=None, description=None, instance_charge_type=None, internet_charge_type=None, ip_address=None, isp=None, name=None, period=None, resource_group_id=None, status=None, tags=None)¶ Get an existing Eip resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
bandwidth (pulumi.Input[float]) – Maximum bandwidth to the elastic public network, measured in Mbps (Mega bit per second). If this value is not specified, then automatically sets it to 5 Mbps.
description (pulumi.Input[str]) – Description of the EIP instance, This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
instance_charge_type (pulumi.Input[str]) – Elastic IP instance charge type. Valid values are “PrePaid” and “PostPaid”. Default to “PostPaid”.
internet_charge_type (pulumi.Input[str]) – Internet charge type of the EIP, Valid values are
PayByBandwidth,PayByTraffic. Default toPayByBandwidth. From version1.7.1, default toPayByTraffic. It is only PayByBandwidth wheninstance_charge_typeis PrePaid.ip*address (pulumi.Input[str]) –
The elastic ip address
isp (pulumi.Input[str]) – The line type of the Elastic IP instance. Default to
BGP. Other type of the isp need to open a whitelist.name (pulumi.Input[str]) – The name of the EIP instance. This name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as “-“,”.”,”*”, and must not begin or end with a hyphen, and must not begin with http:// or https://.
period (pulumi.Input[float]) – The duration that you will buy the resource, in month. It is valid when
instance_charge_typeisPrePaid. Default to 1. Valid values: [1-9, 12, 24, 36]. At present, the provider does not support modify “period” and you can do that via web console.resource_group_id (pulumi.Input[str]) – The Id of resource group which the eip belongs.
status (pulumi.Input[str]) – The EIP current status.
tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_alicloud.ecs.EipAssociation(resource_name, opts=None, allocation_id=None, instance_id=None, instance_type=None, private_ip_address=None, __props__=None, __name__=None, __opts__=None)¶ Create a EipAssociation resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] allocation_id: The allocation EIP ID. :param pulumi.Input[str] instance_id: The ID of the ECS or SLB instance or Nat Gateway. :param pulumi.Input[str] instance_type: The type of cloud product that the eip instance to bind. :param pulumi.Input[str] private_ip_address: The private IP address in the network segment of the vswitch which has been assigned.
allocation_id: pulumi.Output[str] = None¶The allocation EIP ID.
instance_id: pulumi.Output[str] = None¶The ID of the ECS or SLB instance or Nat Gateway.
instance_type: pulumi.Output[str] = None¶The type of cloud product that the eip instance to bind.
private_ip_address: pulumi.Output[str] = None¶The private IP address in the network segment of the vswitch which has been assigned.
- static
get(resource_name, id, opts=None, allocation_id=None, instance_id=None, instance_type=None, private_ip_address=None)¶ Get an existing EipAssociation resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
allocation_id (pulumi.Input[str]) – The allocation EIP ID.
instance_id (pulumi.Input[str]) – The ID of the ECS or SLB instance or Nat Gateway.
instance_type (pulumi.Input[str]) – The type of cloud product that the eip instance to bind.
private_ip_address (pulumi.Input[str]) – The private IP address in the network segment of the vswitch which has been assigned.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_alicloud.ecs.GetDisksResult(category=None, disks=None, encrypted=None, id=None, ids=None, instance_id=None, name_regex=None, output_file=None, resource_group_id=None, tags=None, type=None)¶ A collection of values returned by getDisks.
category= None¶Disk category. Possible values:
cloud(basic cloud disk),cloud_efficiency(ultra cloud disk),ephemeral_ssd(local SSD cloud disk),cloud_ssd(SSD cloud disk), andcloud_essd(ESSD cloud disk).
disks= None¶A list of disks. Each element contains the following attributes:
encrypted= None¶Indicate whether the disk is encrypted or not. Possible values:
onandoff.
id= None¶The provider-assigned unique ID for this managed resource.
instance_id= None¶ID of the related instance. It is
nullunless thestatusisIn_use.
resource_group_id= None¶The Id of resource group.
A map of tags assigned to the disk.
type= None¶Disk type. Possible values:
systemanddata.
- class
pulumi_alicloud.ecs.GetEipsResult(eips=None, id=None, ids=None, in_use=None, ip_addresses=None, names=None, output_file=None, resource_group_id=None, tags=None)¶ A collection of values returned by getEips.
eips= None¶A list of EIPs. Each element contains the following attributes:
id= None¶The provider-assigned unique ID for this managed resource.
ids= None¶(Optional) A list of EIP IDs.
names= None¶(Optional) A list of EIP names.
resource_group_id= None¶The Id of resource group which the eips belongs.
- class
pulumi_alicloud.ecs.GetImagesResult(id=None, ids=None, images=None, most_recent=None, name_regex=None, output_file=None, owners=None)¶ A collection of values returned by getImages.
id= None¶The provider-assigned unique ID for this managed resource.
ids= None¶A list of image IDs.
images= None¶A list of images. Each element contains the following attributes:
- class
pulumi_alicloud.ecs.GetInstanceTypeFamiliesResult(families=None, generation=None, id=None, ids=None, instance_charge_type=None, output_file=None, spot_strategy=None, zone_id=None)¶ A collection of values returned by getInstanceTypeFamilies.
generation= None¶The generation of the instance type family.
id= None¶The provider-assigned unique ID for this managed resource.
ids= None¶A list of instance type family IDs.
- class
pulumi_alicloud.ecs.GetInstanceTypesResult(availability_zone=None, cpu_core_count=None, eni_amount=None, gpu_amount=None, gpu_spec=None, id=None, ids=None, instance_charge_type=None, instance_type_family=None, instance_types=None, is_outdated=None, kubernetes_node_role=None, memory_size=None, network_type=None, output_file=None, sorted_by=None, spot_strategy=None)¶ A collection of values returned by getInstanceTypes.
cpu_core_count= None¶Number of CPU cores.
eni_amount= None¶The maximum number of network interfaces that an instance type can be attached to.
id= None¶The provider-assigned unique ID for this managed resource.
ids= None¶A list of instance type IDs.
instance_types= None¶A list of image types. Each element contains the following attributes:
memory_size= None¶Size of memory, measured in GB.
- class
pulumi_alicloud.ecs.GetInstancesResult(availability_zone=None, id=None, ids=None, image_id=None, instances=None, name_regex=None, names=None, output_file=None, ram_role_name=None, resource_group_id=None, status=None, tags=None, vpc_id=None, vswitch_id=None)¶ A collection of values returned by getInstances.
availability_zone= None¶Availability zone the instance belongs to.
id= None¶The provider-assigned unique ID for this managed resource.
ids= None¶A list of ECS instance IDs.
image_id= None¶Image ID the instance is using.
instances= None¶A list of instances. Each element contains the following attributes:
names= None¶A list of instances names.
ram_role_name= None¶The Ram role name.
resource_group_id= None¶The Id of resource group.
status= None¶Instance current status.
A map of tags assigned to the ECS instance.
vpc_id= None¶ID of the VPC the instance belongs to.
vswitch_id= None¶ID of the VSwitch the instance belongs to.
- class
pulumi_alicloud.ecs.GetKeyPairsResult(finger_print=None, id=None, ids=None, key_pairs=None, name_regex=None, names=None, output_file=None, resource_group_id=None, tags=None)¶ A collection of values returned by getKeyPairs.
finger_print= None¶Finger print of the key pair.
id= None¶The provider-assigned unique ID for this managed resource.
key_pairs= None¶A list of key pairs. Each element contains the following attributes:
names= None¶A list of key pair names.
resource_group_id= None¶The Id of resource group.
(Optional, Available in v1.66.0+) A mapping of tags to assign to the resource.
- class
pulumi_alicloud.ecs.GetNetworkInterfacesResult(id=None, ids=None, instance_id=None, interfaces=None, name_regex=None, names=None, output_file=None, private_ip=None, resource_group_id=None, security_group_id=None, tags=None, type=None, vpc_id=None, vswitch_id=None)¶ A collection of values returned by getNetworkInterfaces.
id= None¶The provider-assigned unique ID for this managed resource.
instance_id= None¶ID of the instance that the ENI is attached to.
interfaces= None¶A list of ENIs. Each element contains the following attributes:
private_ip= None¶Primary private IP of the ENI.
resource_group_id= None¶The Id of resource group.
A map of tags assigned to the ENI.
vpc_id= None¶ID of the VPC that the ENI belongs to.
vswitch_id= None¶ID of the VSwitch that the ENI is linked to.
- class
pulumi_alicloud.ecs.GetSecurityGroupRulesResult(direction=None, group_desc=None, group_id=None, group_name=None, id=None, ip_protocol=None, nic_type=None, output_file=None, policy=None, rules=None)¶ A collection of values returned by getSecurityGroupRules.
direction= None¶Authorization direction,
ingressoregress.
group_desc= None¶The description of the security group that owns the rules.
group_name= None¶The name of the security group that owns the rules.
id= None¶The provider-assigned unique ID for this managed resource.
ip_protocol= None¶The protocol. Can be
tcp,udp,icmp,greorall.
nic_type= None¶Network type,
internetorintranet.
policy= None¶Authorization policy. Can be either
acceptordrop.
rules= None¶A list of security group rules. Each element contains the following attributes:
- class
pulumi_alicloud.ecs.GetSecurityGroupsResult(groups=None, id=None, ids=None, name_regex=None, names=None, output_file=None, resource_group_id=None, tags=None, vpc_id=None)¶ A collection of values returned by getSecurityGroups.
groups= None¶A list of Security Groups. Each element contains the following attributes:
id= None¶The provider-assigned unique ID for this managed resource.
ids= None¶A list of Security Group IDs.
names= None¶A list of Security Group names.
resource_group_id= None¶The Id of resource group which the security_group belongs.
A map of tags assigned to the ECS instance.
vpc_id= None¶The ID of the VPC that owns the security group.
- class
pulumi_alicloud.ecs.GetSnapshotsResult(disk_id=None, encrypted=None, id=None, ids=None, instance_id=None, name_regex=None, names=None, output_file=None, snapshots=None, source_disk_type=None, status=None, tags=None, type=None, usage=None)¶ A collection of values returned by getSnapshots.
encrypted= None¶Whether the snapshot is encrypted or not.
id= None¶The provider-assigned unique ID for this managed resource.
ids= None¶A list of snapshot IDs.
names= None¶A list of snapshots names.
snapshots= None¶A list of snapshots. Each element contains the following attributes:
source_disk_type= None¶Source disk attribute. Value range:
System
Data
status= None¶The snapshot status. Value range:
progressing
accomplished
failed
A map of tags assigned to the snapshot.
usage= None¶Whether the snapshots are used to create resources or not. Value range:
image
disk
image_disk
none
- class
pulumi_alicloud.ecs.Image(resource_name, opts=None, architecture=None, description=None, disk_device_mappings=None, force=None, image_name=None, instance_id=None, name=None, platform=None, resource_group_id=None, snapshot_id=None, tags=None, __props__=None, __name__=None, __opts__=None)¶ Creates a custom image. You can then use a custom image to create ECS instances (RunInstances) or change the system disk for an existing instance (ReplaceSystemDisk).
NOTE: If you want to create a template from an ECS instance, you can specify the instance ID (InstanceId) to create a custom image. You must make sure that the status of the specified instance is Running or Stopped. After a successful invocation, each disk of the specified instance has a new snapshot created.
NOTE: If you want to create a custom image based on the system disk of your ECS instance, you can specify one of the system disk snapshots (SnapshotId) to create a custom image. However, the specified snapshot cannot be created on or before July 15, 2013.
NOTE: If you want to combine snapshots of multiple disks into an image template, you can specify DiskDeviceMapping to create a custom image.
NOTE: Available in 1.64.0+
import pulumi import pulumi_alicloud as alicloud default = alicloud.ecs.Image("default", architecture="x86_64", description="test-image", image_name="test-image", instance_id="i-bp1g6zv0ce8oghu7k***", platform="CentOS", resource_group_id="rg-bp67acfmxazb4ph***", tags={ "FinanceDept": "FinanceDeptJoshua", })
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
architecture (pulumi.Input[str]) – Specifies the architecture of the system disk after you specify a data disk snapshot as the data source of the system disk for creating an image. Valid values:
i386, Default isx86_64.description (pulumi.Input[str]) – The description of the image. It must be 2 to 256 characters in length and must not start with http:// or https://. Default value: null.
disk_device_mappings (pulumi.Input[list]) – Description of the system with disks and snapshots under the image.
force (pulumi.Input[bool]) – Indicates whether to force delete the custom image, Default is
false.
- true:Force deletes the custom image, regardless of whether the image is currently being used by other instances. - false:Verifies that the image is not currently in use by any other instances before deleting the image.
- Parameters
image*name (pulumi.Input[str]) –
The image name. It must be 2 to 128 characters in length, and must begin with a letter or Chinese character (beginning with http:// or https:// is not allowed). It can contain digits, colons (:), underscores (*), or hyphens (-). Default value: null.
instance_id (pulumi.Input[str]) – The instance ID.
platform (pulumi.Input[str]) – Specifies the operating system platform of the system disk after you specify a data disk snapshot as the data source of the system disk for creating an image. Valid values:
CentOS,Ubuntu,SUSE,OpenSUSE,RedHat,Debian,CoreOS,Aliyun Linux,Windows Server 2003,Windows Server 2008,Windows Server 2012,Windows 7, Default isOthers Linux,Customized Linux.resource_group_id (pulumi.Input[str]) – The ID of the enterprise resource group to which a custom image belongs
snapshot_id (pulumi.Input[str]) – Specifies a snapshot that is used to create a combined custom image.
tags (pulumi.Input[dict]) – The tag value of an image. The value of N ranges from 1 to 20.
The disk_device_mappings object supports the following:
device(pulumi.Input[str]) - Specifies the name of a disk in the combined custom image. Value range: /dev/xvda to /dev/xvdz.disk_type(pulumi.Input[str]) - Specifies the type of a disk in the combined custom image. If you specify this parameter, you can use a data disk snapshot as the data source of a system disk for creating an image. If it is not specified, the disk type is determined by the corresponding snapshot. Valid values:system,data,size(pulumi.Input[float]) - Specifies the size of a disk in the combined custom image, in GiB. Value range: 5 to 2000.snapshot_id(pulumi.Input[str]) - Specifies a snapshot that is used to create a combined custom image.
architecture: pulumi.Output[str] = None¶Specifies the architecture of the system disk after you specify a data disk snapshot as the data source of the system disk for creating an image. Valid values:
i386, Default isx86_64.
description: pulumi.Output[str] = None¶The description of the image. It must be 2 to 256 characters in length and must not start with http:// or https://. Default value: null.
disk_device_mappings: pulumi.Output[list] = None¶Description of the system with disks and snapshots under the image.
device(str) - Specifies the name of a disk in the combined custom image. Value range: /dev/xvda to /dev/xvdz.disk_type(str) - Specifies the type of a disk in the combined custom image. If you specify this parameter, you can use a data disk snapshot as the data source of a system disk for creating an image. If it is not specified, the disk type is determined by the corresponding snapshot. Valid values:system,data,size(float) - Specifies the size of a disk in the combined custom image, in GiB. Value range: 5 to 2000.snapshot_id(str) - Specifies a snapshot that is used to create a combined custom image.
force: pulumi.Output[bool] = None¶Indicates whether to force delete the custom image, Default is
false.true:Force deletes the custom image, regardless of whether the image is currently being used by other instances.
false:Verifies that the image is not currently in use by any other instances before deleting the image.
image_name: pulumi.Output[str] = None¶The image name. It must be 2 to 128 characters in length, and must begin with a letter or Chinese character (beginning with http:// or https:// is not allowed). It can contain digits, colons (:), underscores (_), or hyphens (-). Default value: null.
instance_id: pulumi.Output[str] = None¶The instance ID.
platform: pulumi.Output[str] = None¶Specifies the operating system platform of the system disk after you specify a data disk snapshot as the data source of the system disk for creating an image. Valid values:
CentOS,Ubuntu,SUSE,OpenSUSE,RedHat,Debian,CoreOS,Aliyun Linux,Windows Server 2003,Windows Server 2008,Windows Server 2012,Windows 7, Default isOthers Linux,Customized Linux.
resource_group_id: pulumi.Output[str] = None¶The ID of the enterprise resource group to which a custom image belongs
snapshot_id: pulumi.Output[str] = None¶Specifies a snapshot that is used to create a combined custom image.
The tag value of an image. The value of N ranges from 1 to 20.
- static
get(resource_name, id, opts=None, architecture=None, description=None, disk_device_mappings=None, force=None, image_name=None, instance_id=None, name=None, platform=None, resource_group_id=None, snapshot_id=None, tags=None)¶ Get an existing Image resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
architecture (pulumi.Input[str]) – Specifies the architecture of the system disk after you specify a data disk snapshot as the data source of the system disk for creating an image. Valid values:
i386, Default isx86_64.description (pulumi.Input[str]) – The description of the image. It must be 2 to 256 characters in length and must not start with http:// or https://. Default value: null.
disk_device_mappings (pulumi.Input[list]) – Description of the system with disks and snapshots under the image.
force (pulumi.Input[bool]) – Indicates whether to force delete the custom image, Default is
false.
- true:Force deletes the custom image, regardless of whether the image is currently being used by other instances. - false:Verifies that the image is not currently in use by any other instances before deleting the image.
- Parameters
image*name (pulumi.Input[str]) –
The image name. It must be 2 to 128 characters in length, and must begin with a letter or Chinese character (beginning with http:// or https:// is not allowed). It can contain digits, colons (:), underscores (*), or hyphens (-). Default value: null.
instance_id (pulumi.Input[str]) – The instance ID.
platform (pulumi.Input[str]) – Specifies the operating system platform of the system disk after you specify a data disk snapshot as the data source of the system disk for creating an image. Valid values:
CentOS,Ubuntu,SUSE,OpenSUSE,RedHat,Debian,CoreOS,Aliyun Linux,Windows Server 2003,Windows Server 2008,Windows Server 2012,Windows 7, Default isOthers Linux,Customized Linux.resource_group_id (pulumi.Input[str]) – The ID of the enterprise resource group to which a custom image belongs
snapshot_id (pulumi.Input[str]) – Specifies a snapshot that is used to create a combined custom image.
tags (pulumi.Input[dict]) – The tag value of an image. The value of N ranges from 1 to 20.
The disk_device_mappings object supports the following:
device(pulumi.Input[str]) - Specifies the name of a disk in the combined custom image. Value range: /dev/xvda to /dev/xvdz.disk_type(pulumi.Input[str]) - Specifies the type of a disk in the combined custom image. If you specify this parameter, you can use a data disk snapshot as the data source of a system disk for creating an image. If it is not specified, the disk type is determined by the corresponding snapshot. Valid values:system,data,size(pulumi.Input[float]) - Specifies the size of a disk in the combined custom image, in GiB. Value range: 5 to 2000.snapshot_id(pulumi.Input[str]) - Specifies a snapshot that is used to create a combined custom image.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_alicloud.ecs.ImageCopy(resource_name, opts=None, description=None, encrypted=None, force=None, image_name=None, kms_key_id=None, name=None, source_image_id=None, source_region_id=None, tags=None, __props__=None, __name__=None, __opts__=None)¶ Copies a custom image from one region to another. You can use copied images to perform operations in the target region, such as creating instances (RunInstances) and replacing system disks (ReplaceSystemDisk).
NOTE: You can only copy the custom image when it is in the Available state.
NOTE: You can only copy the image belonging to your Alibaba Cloud account. Images cannot be copied from one account to another.
NOTE: If the copying is not completed, you cannot call DeleteImage to delete the image but you can call CancelCopyImage to cancel the copying.
NOTE: Available in 1.66.0+.
import pulumi import pulumi_alicloud as alicloud default = alicloud.ecs.ImageCopy("default", description="test-image", image_name="test-image", source_image_id="m-bp1gxyhdswlsn18tu***", source_region_id="cn-hangzhou", tags={ "FinanceDept": "FinanceDeptJoshua", })
The following attributes are exported:
id- ID of the image.
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – The description of the image. It must be 2 to 256 characters in length and must not start with http:// or https://. Default value: null.
encrypted (pulumi.Input[bool]) – Indicates whether to encrypt the image.
force (pulumi.Input[bool]) – Indicates whether to force delete the custom image, Default is
false.
- true:Force deletes the custom image, regardless of whether the image is currently being used by other instances. - false:Verifies that the image is not currently in use by any other instances before deleting the image.
- Parameters
image*name (pulumi.Input[str]) –
The image name. It must be 2 to 128 characters in length, and must begin with a letter or Chinese character (beginning with http:// or https:// is not allowed). It can contain digits, colons (:), underscores (*), or hyphens (-). Default value: null.
kms_key_id (pulumi.Input[str]) – Key ID used to encrypt the image.
source_image_id (pulumi.Input[str]) – The source image ID.
source_region_id (pulumi.Input[str]) – The ID of the region to which the source custom image belongs. You can call DescribeRegions to view the latest regions of Alibaba Cloud.
tags (pulumi.Input[dict]) – The tag value of an image. The value of N ranges from 1 to 20.
description: pulumi.Output[str] = None¶The description of the image. It must be 2 to 256 characters in length and must not start with http:// or https://. Default value: null.
encrypted: pulumi.Output[bool] = None¶Indicates whether to encrypt the image.
force: pulumi.Output[bool] = None¶Indicates whether to force delete the custom image, Default is
false.true:Force deletes the custom image, regardless of whether the image is currently being used by other instances.
false:Verifies that the image is not currently in use by any other instances before deleting the image.
image_name: pulumi.Output[str] = None¶The image name. It must be 2 to 128 characters in length, and must begin with a letter or Chinese character (beginning with http:// or https:// is not allowed). It can contain digits, colons (:), underscores (_), or hyphens (-). Default value: null.
kms_key_id: pulumi.Output[str] = None¶Key ID used to encrypt the image.
source_image_id: pulumi.Output[str] = None¶The source image ID.
source_region_id: pulumi.Output[str] = None¶The ID of the region to which the source custom image belongs. You can call DescribeRegions to view the latest regions of Alibaba Cloud.
The tag value of an image. The value of N ranges from 1 to 20.
- static
get(resource_name, id, opts=None, description=None, encrypted=None, force=None, image_name=None, kms_key_id=None, name=None, source_image_id=None, source_region_id=None, tags=None)¶ Get an existing ImageCopy resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – The description of the image. It must be 2 to 256 characters in length and must not start with http:// or https://. Default value: null.
encrypted (pulumi.Input[bool]) – Indicates whether to encrypt the image.
force (pulumi.Input[bool]) – Indicates whether to force delete the custom image, Default is
false.
- true:Force deletes the custom image, regardless of whether the image is currently being used by other instances. - false:Verifies that the image is not currently in use by any other instances before deleting the image.
- Parameters
image*name (pulumi.Input[str]) –
The image name. It must be 2 to 128 characters in length, and must begin with a letter or Chinese character (beginning with http:// or https:// is not allowed). It can contain digits, colons (:), underscores (*), or hyphens (-). Default value: null.
kms_key_id (pulumi.Input[str]) – Key ID used to encrypt the image.
source_image_id (pulumi.Input[str]) – The source image ID.
source_region_id (pulumi.Input[str]) –
The ID of the region to which the source custom image belongs. You can call DescribeRegions to view the latest regions of Alibaba Cloud.
tags (pulumi.Input[dict]) – The tag value of an image. The value of N ranges from 1 to 20.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_alicloud.ecs.ImageExport(resource_name, opts=None, image_id=None, oss_bucket=None, oss_prefix=None, __props__=None, __name__=None, __opts__=None)¶ Export a custom image to the OSS bucket in the same region as the custom image.
NOTE: If you create an ECS instance using a mirror image and create a system disk snapshot again, exporting a custom image created from the system disk snapshot is not supported.
NOTE: Support for exporting custom images that include data disk snapshot information in the image. The number of data disks cannot exceed 4 and the maximum capacity of a single data disk cannot exceed 500 GiB.
NOTE: Before exporting the image, you must authorize the cloud server ECS official service account to write OSS permissions through RAM.
NOTE: Available in 1.68.0+.
import pulumi import pulumi_alicloud as alicloud default = alicloud.ecs.ImageExport("default", image_id="m-bp1gxy***", oss_bucket="ecsimageexportconfig", oss_prefix="ecsExport")
The following attributes are exported:
id- ID of the image.
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
image_id (pulumi.Input[str]) – The source image ID.
oss_bucket (pulumi.Input[str]) – Save the exported OSS bucket.
oss_prefix (pulumi.Input[str]) – The prefix of your OSS Object. It can be composed of numbers or letters, and the character length is 1 ~ 30.
image_id: pulumi.Output[str] = None¶The source image ID.
oss_bucket: pulumi.Output[str] = None¶Save the exported OSS bucket.
oss_prefix: pulumi.Output[str] = None¶The prefix of your OSS Object. It can be composed of numbers or letters, and the character length is 1 ~ 30.
- static
get(resource_name, id, opts=None, image_id=None, oss_bucket=None, oss_prefix=None)¶ Get an existing ImageExport resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
image_id (pulumi.Input[str]) – The source image ID.
oss_bucket (pulumi.Input[str]) – Save the exported OSS bucket.
oss_prefix (pulumi.Input[str]) – The prefix of your OSS Object. It can be composed of numbers or letters, and the character length is 1 ~ 30.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_alicloud.ecs.ImageImport(resource_name, opts=None, architecture=None, description=None, disk_device_mappings=None, image_name=None, license_type=None, os_type=None, platform=None, __props__=None, __name__=None, __opts__=None)¶ Import a copy of your local on-premise file to ECS, and appear as a custom replacement in the corresponding domain.
NOTE: You must upload the image file to the object storage OSS in advance.
NOTE: The region where the image is imported must be the same region as the OSS bucket where the image file is uploaded.
NOTE: Available in 1.69.0+.
import pulumi import pulumi_alicloud as alicloud this = alicloud.ecs.ImageImport("this", architecture="x86_64", description="test import image", disk_device_mappings=[{ "diskImageSize": 5, "oss_bucket": "testimportimage", "ossObject": "root.img", }], image_name="test-import-image", license_type="Auto", os_type="linux", platform="Ubuntu")
The following attributes are exported:
id- ID of the image.
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
architecture (pulumi.Input[str]) – Specifies the architecture of the system disk after you specify a data disk snapshot as the data source of the system disk for creating an image. Valid values:
i386, Default isx86_64.description (pulumi.Input[str]) – Description of the image. The length is 2 to 256 English or Chinese characters, and cannot begin with http: // and https: //.
disk_device_mappings (pulumi.Input[list]) – Description of the system with disks and snapshots under the image.
image*name (pulumi.Input[str]) –
The image name. The length is 2 ~ 128 English or Chinese characters. Must start with a english letter or Chinese, and cannot start with http: // and https: //. Can contain numbers, colons (:), underscores (*), or hyphens (-).
license_type (pulumi.Input[str]) – The type of the license used to activate the operating system after the image is imported. Default value:
Auto. Valid values:Auto,Aliyun,BYOL.os_type (pulumi.Input[str]) – Operating system platform type. Valid values:
windows, Default islinux.platform (pulumi.Input[str]) – Specifies the operating system platform of the system disk after you specify a data disk snapshot as the data source of the system disk for creating an image. Valid values:
CentOS,Ubuntu,SUSE,OpenSUSE,Debian,CoreOS,Windows Server 2003,Windows Server 2008,Windows Server 2012,Windows 7, Default isOthers Linux,Customized Linux.
The disk_device_mappings object supports the following:
device(pulumi.Input[str]) - The name of disk N in the custom image.diskImageSize(pulumi.Input[float]) - Resolution size. You must ensure that the system disk space ≥ file system space. Ranges: When n = 1, the system disk: 5 ~ 500GiB, When n = 2 ~ 17, that is, data disk: 5 ~ 1000GiB, When temporary is introduced, the system automatically detects the size, which is subject to the detection result.format(pulumi.Input[str]) - Image format. Value range: When theRAW,VHD,qcow2is imported into the image, the system automatically detects the image format, whichever comes first.oss_bucket(pulumi.Input[str]) - Save the exported OSS bucket.ossObject(pulumi.Input[str]) - The file name of your OSS Object.
architecture: pulumi.Output[str] = None¶Specifies the architecture of the system disk after you specify a data disk snapshot as the data source of the system disk for creating an image. Valid values:
i386, Default isx86_64.
description: pulumi.Output[str] = None¶Description of the image. The length is 2 to 256 English or Chinese characters, and cannot begin with http: // and https: //.
disk_device_mappings: pulumi.Output[list] = None¶Description of the system with disks and snapshots under the image.
device(str) - The name of disk N in the custom image.diskImageSize(float) - Resolution size. You must ensure that the system disk space ≥ file system space. Ranges: When n = 1, the system disk: 5 ~ 500GiB, When n = 2 ~ 17, that is, data disk: 5 ~ 1000GiB, When temporary is introduced, the system automatically detects the size, which is subject to the detection result.format(str) - Image format. Value range: When theRAW,VHD,qcow2is imported into the image, the system automatically detects the image format, whichever comes first.oss_bucket(str) - Save the exported OSS bucket.ossObject(str) - The file name of your OSS Object.
image_name: pulumi.Output[str] = None¶The image name. The length is 2 ~ 128 English or Chinese characters. Must start with a english letter or Chinese, and cannot start with http: // and https: //. Can contain numbers, colons (:), underscores (_), or hyphens (-).
license_type: pulumi.Output[str] = None¶The type of the license used to activate the operating system after the image is imported. Default value:
Auto. Valid values:Auto,Aliyun,BYOL.
os_type: pulumi.Output[str] = None¶Operating system platform type. Valid values:
windows, Default islinux.
platform: pulumi.Output[str] = None¶Specifies the operating system platform of the system disk after you specify a data disk snapshot as the data source of the system disk for creating an image. Valid values:
CentOS,Ubuntu,SUSE,OpenSUSE,Debian,CoreOS,Windows Server 2003,Windows Server 2008,Windows Server 2012,Windows 7, Default isOthers Linux,Customized Linux.
- static
get(resource_name, id, opts=None, architecture=None, description=None, disk_device_mappings=None, image_name=None, license_type=None, os_type=None, platform=None)¶ Get an existing ImageImport resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
architecture (pulumi.Input[str]) – Specifies the architecture of the system disk after you specify a data disk snapshot as the data source of the system disk for creating an image. Valid values:
i386, Default isx86_64.description (pulumi.Input[str]) – Description of the image. The length is 2 to 256 English or Chinese characters, and cannot begin with http: // and https: //.
disk_device_mappings (pulumi.Input[list]) – Description of the system with disks and snapshots under the image.
image*name (pulumi.Input[str]) –
The image name. The length is 2 ~ 128 English or Chinese characters. Must start with a english letter or Chinese, and cannot start with http: // and https: //. Can contain numbers, colons (:), underscores (*), or hyphens (-).
license_type (pulumi.Input[str]) – The type of the license used to activate the operating system after the image is imported. Default value:
Auto. Valid values:Auto,Aliyun,BYOL.os_type (pulumi.Input[str]) – Operating system platform type. Valid values:
windows, Default islinux.platform (pulumi.Input[str]) – Specifies the operating system platform of the system disk after you specify a data disk snapshot as the data source of the system disk for creating an image. Valid values:
CentOS,Ubuntu,SUSE,OpenSUSE,Debian,CoreOS,Windows Server 2003,Windows Server 2008,Windows Server 2012,Windows 7, Default isOthers Linux,Customized Linux.
The disk_device_mappings object supports the following:
device(pulumi.Input[str]) - The name of disk N in the custom image.diskImageSize(pulumi.Input[float]) - Resolution size. You must ensure that the system disk space ≥ file system space. Ranges: When n = 1, the system disk: 5 ~ 500GiB, When n = 2 ~ 17, that is, data disk: 5 ~ 1000GiB, When temporary is introduced, the system automatically detects the size, which is subject to the detection result.format(pulumi.Input[str]) - Image format. Value range: When theRAW,VHD,qcow2is imported into the image, the system automatically detects the image format, whichever comes first.oss_bucket(pulumi.Input[str]) - Save the exported OSS bucket.ossObject(pulumi.Input[str]) - The file name of your OSS Object.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
Manage image sharing permissions. You can share your custom image to other Alibaba Cloud users. The user can use the shared custom image to create ECS instances or replace the system disk of the instance.
NOTE: You can only share your own custom images to other Alibaba Cloud users.
NOTE: Each custom image can be shared with up to 50 Alibaba Cloud accounts. You can submit a ticket to share with more users.
NOTE: After creating an ECS instance using a shared image, once the custom image owner releases the image sharing relationship or deletes the custom image, the instance cannot initialize the system disk.
NOTE: Available in 1.68.0+.
import pulumi import pulumi_alicloud as alicloud default = alicloud.ecs.ImageSharePermission("default", account_id="1234567890", image_id="m-bp1gxyh***")
The following attributes are exported:
id- ID of the image. It formats as<image_id>:<account_id>
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
account_id (pulumi.Input[str]) – Alibaba Cloud Account ID. It is used to share images.
image_id (pulumi.Input[str]) – The source image ID.
Alibaba Cloud Account ID. It is used to share images.
The source image ID.
Get an existing ImageSharePermission resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
account_id (pulumi.Input[str]) – Alibaba Cloud Account ID. It is used to share images.
image_id (pulumi.Input[str]) – The source image ID.
Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_alicloud.ecs.Instance(resource_name, opts=None, allocate_public_ip=None, auto_release_time=None, auto_renew_period=None, availability_zone=None, credit_specification=None, data_disks=None, deletion_protection=None, description=None, dry_run=None, force_delete=None, host_name=None, image_id=None, include_data_disks=None, instance_charge_type=None, instance_name=None, instance_type=None, internet_charge_type=None, internet_max_bandwidth_in=None, internet_max_bandwidth_out=None, io_optimized=None, is_outdated=None, key_name=None, kms_encrypted_password=None, kms_encryption_context=None, password=None, period=None, period_unit=None, private_ip=None, renewal_status=None, resource_group_id=None, role_name=None, security_enhancement_strategy=None, security_groups=None, spot_price_limit=None, spot_strategy=None, status=None, subnet_id=None, system_disk_auto_snapshot_policy_id=None, system_disk_category=None, system_disk_size=None, tags=None, user_data=None, volume_tags=None, vswitch_id=None, __props__=None, __name__=None, __opts__=None)¶ Create a Instance resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[bool] allocate_public_ip: It has been deprecated from version “1.7.0”. Setting “internet_max_bandwidth_out” larger than 0 can allocate a public ip address for an instance. :param pulumi.Input[str] auto_release_time: The automatic release time of the
PostPaidinstance.The time follows the ISO 8601 standard and is in UTC time. Format: yyyy-MM-ddTHH:mm:ssZ. It must be at least half an hour later than the current time and less than 3 years since the current time. Set it to null can cancel automatic release attribute and the ECS instance will not be released automatically.
- Parameters
auto_renew_period (pulumi.Input[float]) – Auto renewal period of an instance, in the unit of month. It is valid when
instance_charge_typeisPrePaid. Default to 1. Valid value:
- [1, 2, 3, 6, 12] when `period_unit` in "Month" - [1, 2, 3] when `period_unit` in "Week"
- Parameters
availability_zone (pulumi.Input[str]) – The Zone to start the instance in. It is ignored and will be computed when set
vswitch_id.credit_specification (pulumi.Input[str]) – Performance mode of the t5 burstable instance. Valid values: ‘Standard’, ‘Unlimited’.
data_disks (pulumi.Input[list]) – The list of data disks created with instance.
deletion_protection (pulumi.Input[bool]) – Whether enable the deletion protection or not.
- true: Enable deletion protection. - false: Disable deletion protection.
- Parameters
description (pulumi.Input[str]) – The description of the data disk.
dry_run (pulumi.Input[bool]) – Specifies whether to send a dry-run request. Default to false.
- true: Only a dry-run request is sent and no instance is created. The system checks whether the required parameters are set, and validates the request format, service permissions, and available ECS instances. If the validation fails, the corresponding error code is returned. If the validation succeeds, the `DryRunOperation` error code is returned. - false: A request is sent. If the validation succeeds, the instance is created.
- Parameters
force_delete (pulumi.Input[bool]) – If it is true, the “PrePaid” instance will be change to “PostPaid” and then deleted forcibly. However, because of changing instance charge type has CPU core count quota limitation, so strongly recommand that “Don’t modify instance charge type frequentlly in one month”.
host*name (pulumi.Input[str]) –
Host name of the ECS, which is a string of at least two characters. “hostname” cannot start or end with “.” or “-“. In addition, two or more consecutive “.” or “-“ symbols are not allowed. On Windows, the host name can contain a maximum of 15 characters, which can be a combination of uppercase/lowercase letters, numerals, and “-“. The host name cannot contain dots (“.”) or contain only numeric characters. When it is changed, the instance will reboot to make the change take effect. On other OSs such as Linux, the host name can contain a maximum of 64 characters, which can be segments separated by dots (“.”), where each segment can contain uppercase/lowercase letters, numerals, or “*“. When it is changed, the instance will reboot to make the change take effect.
image_id (pulumi.Input[str]) – The Image to use for the instance. ECS instance’s image can be replaced via changing ‘image_id’. When it is changed, the instance will reboot to make the change take effect.
include_data_disks (pulumi.Input[bool]) – Whether to change instance disks charge type when changing instance charge type.
instance_charge_type (pulumi.Input[str]) – Valid values are
PrePaid,PostPaid, The default isPostPaid.instance_type (pulumi.Input[str]) – The type of instance to start. When it is changed, the instance will reboot to make the change take effect.
internet_charge_type (pulumi.Input[str]) – Internet charge type of the instance, Valid values are
PayByBandwidth,PayByTraffic. Default isPayByTraffic. At present, ‘PrePaid’ instance cannot change the value to “PayByBandwidth” from “PayByTraffic”.internet_max_bandwidth_in (pulumi.Input[float]) – Maximum incoming bandwidth from the public network, measured in Mbps (Mega bit per second). Value range: [1, 200]. If this value is not specified, then automatically sets it to 200 Mbps.
internet_max_bandwidth_out (pulumi.Input[float]) – Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bit per second). Value range: [0, 100]. Default to 0 Mbps.
io_optimized (pulumi.Input[str]) – It has been deprecated on instance resource. All the launched alicloud instances will be I/O optimized.
is_outdated (pulumi.Input[bool]) – Whether to use outdated instance type. Default to false.
key_name (pulumi.Input[str]) – The name of key pair that can login ECS instance successfully without password. If it is specified, the password would be invalid.
kms_encrypted_password (pulumi.Input[str]) – An KMS encrypts password used to an instance. If the
passwordis filled in, this field will be ignored. When it is changed, the instance will reboot to make the change take effect.kms_encryption_context (pulumi.Input[dict]) – An KMS encryption context used to decrypt
kms_encrypted_passwordbefore creating or updating an instance withkms_encrypted_password. See Encryption Context. It is valid whenkms_encrypted_passwordis set. When it is changed, the instance will reboot to make the change take effect.password (pulumi.Input[str]) – Password to an instance is a string of 8 to 30 characters. It must contain uppercase/lowercase letters and numerals, but cannot contain special symbols. When it is changed, the instance will reboot to make the change take effect.
period (pulumi.Input[float]) – The duration that you will buy the resource, in month. It is valid when
instance_charge_typeisPrePaid. Default to 1. Valid values:
- [1-9, 12, 24, 36, 48, 60] when `period_unit` in "Month" - [1-3] when `period_unit` in "Week"
- Parameters
period_unit (pulumi.Input[str]) – The duration unit that you will buy the resource. It is valid when
instance_charge_typeis ‘PrePaid’. Valid value: [“Week”, “Month”]. Default to “Month”.private_ip (pulumi.Input[str]) – Instance private IP address can be specified when you creating new instance. It is valid when
vswitch_idis specified. When it is changed, the instance will reboot to make the change take effect.renewal_status (pulumi.Input[str]) – Whether to renew an ECS instance automatically or not. It is valid when
instance_charge_typeisPrePaid. Default to “Normal”. Valid values:
- `AutoRenewal`: Enable auto renewal. - `Normal`: Disable auto renewal. - `NotRenewal`: No renewal any longer. After you specify this value, Alibaba Cloud stop sending notification of instance expiry, and only gives a brief reminder on the third day before the instance expiry.
- Parameters
resource_group_id (pulumi.Input[str]) – The Id of resource group which the instance belongs.
role_name (pulumi.Input[str]) – Instance RAM role name. The name is provided and maintained by RAM. You can use
ram.Roleto create a new one.security_enhancement_strategy (pulumi.Input[str]) – The security enhancement strategy.
- Active: Enable security enhancement strategy, it only works on system images. - Deactive: Disable security enhancement strategy, it works on all images.
- Parameters
security_groups (pulumi.Input[list]) – A list of security group ids to associate with.
spot_price_limit (pulumi.Input[float]) – The hourly price threshold of a instance, and it takes effect only when parameter ‘spot_strategy’ is ‘SpotWithPriceLimit’. Three decimals is allowed at most.
spot_strategy (pulumi.Input[str]) – The spot strategy of a Pay-As-You-Go instance, and it takes effect only when parameter
instance_charge_typeis ‘PostPaid’. Value range:
- NoSpot: A regular Pay-As-You-Go instance. - SpotWithPriceLimit: A price threshold for a spot instance - SpotAsPriceGo: A price that is based on the highest Pay-As-You-Go instance
- Parameters
status (pulumi.Input[str]) – The instance status. Valid values: [“Running”, “Stopped”]. You can control the instance start and stop through this parameter. Default to
Running.system_disk_auto_snapshot_policy_id (pulumi.Input[str]) – The ID of the automatic snapshot policy applied to the system disk.
system_disk_category (pulumi.Input[str]) – Valid values are
ephemeral_ssd,cloud_efficiency,cloud_ssd,cloud_essd,cloud.cloudonly is used to some none I/O optimized instance. Default tocloud_efficiency.system_disk_size (pulumi.Input[float]) – Size of the system disk, measured in GiB. Value range: [20, 500]. The specified value must be equal to or greater than max{20, Imagesize}. Default value: max{40, ImageSize}.
tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string. - Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- Parameters
user_data (pulumi.Input[str]) – User-defined data to customize the startup behaviors of an ECS instance and to pass data into an ECS instance. From version 1.60.0, it can be update in-place. If updated, the instance will reboot to make the change take effect. Note: Not all of changes will take effect and it depends on cloud-init module type.
volume_tags (pulumi.Input[dict]) – A mapping of tags to assign to the devices created by the instance at launch time.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string. - Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- Parameters
vswitch_id (pulumi.Input[str]) – The virtual switch ID to launch in VPC. This parameter must be set unless you can create classic network instances. When it is changed, the instance will reboot to make the change take effect.
The data_disks object supports the following:
autoSnapshotPolicyId(pulumi.Input[str]) - The ID of the automatic snapshot policy applied to the system disk.category(pulumi.Input[str]) - The category of the disk:cloud: The general cloud disk.cloud_efficiency: The efficiency cloud disk.cloud_ssd: The SSD cloud disk.cloud_essd: The ESSD cloud disk.ephemeral_ssd: The local SSD disk. Default tocloud_efficiency.
delete_with_instance(pulumi.Input[bool]) - Delete this data disk when the instance is destroyed. It only works on cloud, cloud_efficiency, cloud_essd, cloud_ssd disk. If the category of this data disk was ephemeral_ssd, please don’t set this param.description(pulumi.Input[str]) - The description of the data disk.encrypted(pulumi.Input[bool]) - -(Optional, Bool, ForceNew) Encrypted the data in this disk.name(pulumi.Input[str]) - The name of the data disk.size(pulumi.Input[float]) - The size of the data disk.cloud:[5, 2000]
cloud_efficiency:[20, 32768]
cloud_ssd:[20, 32768]
cloud_essd:[20, 32768]
ephemeral_ssd: [5, 800]
snapshot_id(pulumi.Input[str]) - The snapshot ID used to initialize the data disk. If the size specified by snapshot is greater that the size of the disk, use the size specified by snapshot as the size of the data disk.
allocate_public_ip: pulumi.Output[bool] = None¶It has been deprecated from version “1.7.0”. Setting “internet_max_bandwidth_out” larger than 0 can allocate a public ip address for an instance.
auto_release_time: pulumi.Output[str] = None¶The automatic release time of the
PostPaidinstance. The time follows the ISO 8601 standard and is in UTC time. Format: yyyy-MM-ddTHH:mm:ssZ. It must be at least half an hour later than the current time and less than 3 years since the current time. Set it to null can cancel automatic release attribute and the ECS instance will not be released automatically.
auto_renew_period: pulumi.Output[float] = None¶Auto renewal period of an instance, in the unit of month. It is valid when
instance_charge_typeisPrePaid. Default to 1. Valid value:[1, 2, 3, 6, 12] when
period_unitin “Month”[1, 2, 3] when
period_unitin “Week”
availability_zone: pulumi.Output[str] = None¶The Zone to start the instance in. It is ignored and will be computed when set
vswitch_id.
credit_specification: pulumi.Output[str] = None¶Performance mode of the t5 burstable instance. Valid values: ‘Standard’, ‘Unlimited’.
data_disks: pulumi.Output[list] = None¶The list of data disks created with instance.
autoSnapshotPolicyId(str) - The ID of the automatic snapshot policy applied to the system disk.category(str) - The category of the disk:cloud: The general cloud disk.cloud_efficiency: The efficiency cloud disk.cloud_ssd: The SSD cloud disk.cloud_essd: The ESSD cloud disk.ephemeral_ssd: The local SSD disk. Default tocloud_efficiency.
delete_with_instance(bool) - Delete this data disk when the instance is destroyed. It only works on cloud, cloud_efficiency, cloud_essd, cloud_ssd disk. If the category of this data disk was ephemeral_ssd, please don’t set this param.description(str) - The description of the data disk.encrypted(bool) - -(Optional, Bool, ForceNew) Encrypted the data in this disk.name(str) - The name of the data disk.size(float) - The size of the data disk.cloud:[5, 2000]
cloud_efficiency:[20, 32768]
cloud_ssd:[20, 32768]
cloud_essd:[20, 32768]
ephemeral_ssd: [5, 800]
snapshot_id(str) - The snapshot ID used to initialize the data disk. If the size specified by snapshot is greater that the size of the disk, use the size specified by snapshot as the size of the data disk.
deletion_protection: pulumi.Output[bool] = None¶Whether enable the deletion protection or not.
true: Enable deletion protection.
false: Disable deletion protection.
description: pulumi.Output[str] = None¶The description of the data disk.
dry_run: pulumi.Output[bool] = None¶Specifies whether to send a dry-run request. Default to false.
true: Only a dry-run request is sent and no instance is created. The system checks whether the required parameters are set, and validates the request format, service permissions, and available ECS instances. If the validation fails, the corresponding error code is returned. If the validation succeeds, the
DryRunOperationerror code is returned.false: A request is sent. If the validation succeeds, the instance is created.
force_delete: pulumi.Output[bool] = None¶If it is true, the “PrePaid” instance will be change to “PostPaid” and then deleted forcibly. However, because of changing instance charge type has CPU core count quota limitation, so strongly recommand that “Don’t modify instance charge type frequentlly in one month”.
host_name: pulumi.Output[str] = None¶Host name of the ECS, which is a string of at least two characters. “hostname” cannot start or end with “.” or “-“. In addition, two or more consecutive “.” or “-“ symbols are not allowed. On Windows, the host name can contain a maximum of 15 characters, which can be a combination of uppercase/lowercase letters, numerals, and “-“. The host name cannot contain dots (“.”) or contain only numeric characters. When it is changed, the instance will reboot to make the change take effect. On other OSs such as Linux, the host name can contain a maximum of 64 characters, which can be segments separated by dots (“.”), where each segment can contain uppercase/lowercase letters, numerals, or “_“. When it is changed, the instance will reboot to make the change take effect.
image_id: pulumi.Output[str] = None¶The Image to use for the instance. ECS instance’s image can be replaced via changing ‘image_id’. When it is changed, the instance will reboot to make the change take effect.
include_data_disks: pulumi.Output[bool] = None¶Whether to change instance disks charge type when changing instance charge type.
instance_charge_type: pulumi.Output[str] = None¶Valid values are
PrePaid,PostPaid, The default isPostPaid.
instance_type: pulumi.Output[str] = None¶The type of instance to start. When it is changed, the instance will reboot to make the change take effect.
internet_charge_type: pulumi.Output[str] = None¶Internet charge type of the instance, Valid values are
PayByBandwidth,PayByTraffic. Default isPayByTraffic. At present, ‘PrePaid’ instance cannot change the value to “PayByBandwidth” from “PayByTraffic”.
internet_max_bandwidth_in: pulumi.Output[float] = None¶Maximum incoming bandwidth from the public network, measured in Mbps (Mega bit per second). Value range: [1, 200]. If this value is not specified, then automatically sets it to 200 Mbps.
internet_max_bandwidth_out: pulumi.Output[float] = None¶Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bit per second). Value range: [0, 100]. Default to 0 Mbps.
io_optimized: pulumi.Output[str] = None¶It has been deprecated on instance resource. All the launched alicloud instances will be I/O optimized.
is_outdated: pulumi.Output[bool] = None¶Whether to use outdated instance type. Default to false.
key_name: pulumi.Output[str] = None¶The name of key pair that can login ECS instance successfully without password. If it is specified, the password would be invalid.
kms_encrypted_password: pulumi.Output[str] = None¶An KMS encrypts password used to an instance. If the
passwordis filled in, this field will be ignored. When it is changed, the instance will reboot to make the change take effect.
kms_encryption_context: pulumi.Output[dict] = None¶An KMS encryption context used to decrypt
kms_encrypted_passwordbefore creating or updating an instance withkms_encrypted_password. See Encryption Context. It is valid whenkms_encrypted_passwordis set. When it is changed, the instance will reboot to make the change take effect.
password: pulumi.Output[str] = None¶Password to an instance is a string of 8 to 30 characters. It must contain uppercase/lowercase letters and numerals, but cannot contain special symbols. When it is changed, the instance will reboot to make the change take effect.
period: pulumi.Output[float] = None¶The duration that you will buy the resource, in month. It is valid when
instance_charge_typeisPrePaid. Default to 1. Valid values:[1-9, 12, 24, 36, 48, 60] when
period_unitin “Month”[1-3] when
period_unitin “Week”
period_unit: pulumi.Output[str] = None¶The duration unit that you will buy the resource. It is valid when
instance_charge_typeis ‘PrePaid’. Valid value: [“Week”, “Month”]. Default to “Month”.
private_ip: pulumi.Output[str] = None¶Instance private IP address can be specified when you creating new instance. It is valid when
vswitch_idis specified. When it is changed, the instance will reboot to make the change take effect.
public_ip: pulumi.Output[str] = None¶The instance public ip.
renewal_status: pulumi.Output[str] = None¶Whether to renew an ECS instance automatically or not. It is valid when
instance_charge_typeisPrePaid. Default to “Normal”. Valid values:AutoRenewal: Enable auto renewal.Normal: Disable auto renewal.NotRenewal: No renewal any longer. After you specify this value, Alibaba Cloud stop sending notification of instance expiry, and only gives a brief reminder on the third day before the instance expiry.
resource_group_id: pulumi.Output[str] = None¶The Id of resource group which the instance belongs.
role_name: pulumi.Output[str] = None¶Instance RAM role name. The name is provided and maintained by RAM. You can use
ram.Roleto create a new one.
security_enhancement_strategy: pulumi.Output[str] = None¶The security enhancement strategy.
Active: Enable security enhancement strategy, it only works on system images.
Deactive: Disable security enhancement strategy, it works on all images.
security_groups: pulumi.Output[list] = None¶A list of security group ids to associate with.
spot_price_limit: pulumi.Output[float] = None¶The hourly price threshold of a instance, and it takes effect only when parameter ‘spot_strategy’ is ‘SpotWithPriceLimit’. Three decimals is allowed at most.
spot_strategy: pulumi.Output[str] = None¶The spot strategy of a Pay-As-You-Go instance, and it takes effect only when parameter
instance_charge_typeis ‘PostPaid’. Value range:NoSpot: A regular Pay-As-You-Go instance.
SpotWithPriceLimit: A price threshold for a spot instance
SpotAsPriceGo: A price that is based on the highest Pay-As-You-Go instance
status: pulumi.Output[str] = None¶The instance status. Valid values: [“Running”, “Stopped”]. You can control the instance start and stop through this parameter. Default to
Running.
system_disk_auto_snapshot_policy_id: pulumi.Output[str] = None¶The ID of the automatic snapshot policy applied to the system disk.
system_disk_category: pulumi.Output[str] = None¶Valid values are
ephemeral_ssd,cloud_efficiency,cloud_ssd,cloud_essd,cloud.cloudonly is used to some none I/O optimized instance. Default tocloud_efficiency.
system_disk_size: pulumi.Output[float] = None¶Size of the system disk, measured in GiB. Value range: [20, 500]. The specified value must be equal to or greater than max{20, Imagesize}. Default value: max{40, ImageSize}.
A mapping of tags to assign to the resource.
user_data: pulumi.Output[str] = None¶User-defined data to customize the startup behaviors of an ECS instance and to pass data into an ECS instance. From version 1.60.0, it can be update in-place. If updated, the instance will reboot to make the change take effect. Note: Not all of changes will take effect and it depends on cloud-init module type.
A mapping of tags to assign to the devices created by the instance at launch time.
vswitch_id: pulumi.Output[str] = None¶The virtual switch ID to launch in VPC. This parameter must be set unless you can create classic network instances. When it is changed, the instance will reboot to make the change take effect.
- static
get(resource_name, id, opts=None, allocate_public_ip=None, auto_release_time=None, auto_renew_period=None, availability_zone=None, credit_specification=None, data_disks=None, deletion_protection=None, description=None, dry_run=None, force_delete=None, host_name=None, image_id=None, include_data_disks=None, instance_charge_type=None, instance_name=None, instance_type=None, internet_charge_type=None, internet_max_bandwidth_in=None, internet_max_bandwidth_out=None, io_optimized=None, is_outdated=None, key_name=None, kms_encrypted_password=None, kms_encryption_context=None, password=None, period=None, period_unit=None, private_ip=None, public_ip=None, renewal_status=None, resource_group_id=None, role_name=None, security_enhancement_strategy=None, security_groups=None, spot_price_limit=None, spot_strategy=None, status=None, subnet_id=None, system_disk_auto_snapshot_policy_id=None, system_disk_category=None, system_disk_size=None, tags=None, user_data=None, volume_tags=None, vswitch_id=None)¶ Get an existing Instance resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
allocate_public_ip (pulumi.Input[bool]) – It has been deprecated from version “1.7.0”. Setting “internet_max_bandwidth_out” larger than 0 can allocate a public ip address for an instance.
auto_release_time (pulumi.Input[str]) – The automatic release time of the
PostPaidinstance. The time follows the ISO 8601 standard and is in UTC time. Format: yyyy-MM-ddTHH:mm:ssZ. It must be at least half an hour later than the current time and less than 3 years since the current time. Set it to null can cancel automatic release attribute and the ECS instance will not be released automatically.auto_renew_period (pulumi.Input[float]) – Auto renewal period of an instance, in the unit of month. It is valid when
instance_charge_typeisPrePaid. Default to 1. Valid value:
- [1, 2, 3, 6, 12] when `period_unit` in "Month" - [1, 2, 3] when `period_unit` in "Week"
- Parameters
availability_zone (pulumi.Input[str]) – The Zone to start the instance in. It is ignored and will be computed when set
vswitch_id.credit_specification (pulumi.Input[str]) – Performance mode of the t5 burstable instance. Valid values: ‘Standard’, ‘Unlimited’.
data_disks (pulumi.Input[list]) – The list of data disks created with instance.
deletion_protection (pulumi.Input[bool]) – Whether enable the deletion protection or not.
- true: Enable deletion protection. - false: Disable deletion protection.
- Parameters
description (pulumi.Input[str]) – The description of the data disk.
dry_run (pulumi.Input[bool]) – Specifies whether to send a dry-run request. Default to false.
- true: Only a dry-run request is sent and no instance is created. The system checks whether the required parameters are set, and validates the request format, service permissions, and available ECS instances. If the validation fails, the corresponding error code is returned. If the validation succeeds, the `DryRunOperation` error code is returned. - false: A request is sent. If the validation succeeds, the instance is created.
- Parameters
force_delete (pulumi.Input[bool]) – If it is true, the “PrePaid” instance will be change to “PostPaid” and then deleted forcibly. However, because of changing instance charge type has CPU core count quota limitation, so strongly recommand that “Don’t modify instance charge type frequentlly in one month”.
host*name (pulumi.Input[str]) –
Host name of the ECS, which is a string of at least two characters. “hostname” cannot start or end with “.” or “-“. In addition, two or more consecutive “.” or “-“ symbols are not allowed. On Windows, the host name can contain a maximum of 15 characters, which can be a combination of uppercase/lowercase letters, numerals, and “-“. The host name cannot contain dots (“.”) or contain only numeric characters. When it is changed, the instance will reboot to make the change take effect. On other OSs such as Linux, the host name can contain a maximum of 64 characters, which can be segments separated by dots (“.”), where each segment can contain uppercase/lowercase letters, numerals, or “*“. When it is changed, the instance will reboot to make the change take effect.
image_id (pulumi.Input[str]) – The Image to use for the instance. ECS instance’s image can be replaced via changing ‘image_id’. When it is changed, the instance will reboot to make the change take effect.
include_data_disks (pulumi.Input[bool]) – Whether to change instance disks charge type when changing instance charge type.
instance_charge_type (pulumi.Input[str]) – Valid values are
PrePaid,PostPaid, The default isPostPaid.instance_type (pulumi.Input[str]) – The type of instance to start. When it is changed, the instance will reboot to make the change take effect.
internet_charge_type (pulumi.Input[str]) – Internet charge type of the instance, Valid values are
PayByBandwidth,PayByTraffic. Default isPayByTraffic. At present, ‘PrePaid’ instance cannot change the value to “PayByBandwidth” from “PayByTraffic”.internet_max_bandwidth_in (pulumi.Input[float]) – Maximum incoming bandwidth from the public network, measured in Mbps (Mega bit per second). Value range: [1, 200]. If this value is not specified, then automatically sets it to 200 Mbps.
internet_max_bandwidth_out (pulumi.Input[float]) – Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bit per second). Value range: [0, 100]. Default to 0 Mbps.
io_optimized (pulumi.Input[str]) – It has been deprecated on instance resource. All the launched alicloud instances will be I/O optimized.
is_outdated (pulumi.Input[bool]) – Whether to use outdated instance type. Default to false.
key_name (pulumi.Input[str]) – The name of key pair that can login ECS instance successfully without password. If it is specified, the password would be invalid.
kms_encrypted_password (pulumi.Input[str]) – An KMS encrypts password used to an instance. If the
passwordis filled in, this field will be ignored. When it is changed, the instance will reboot to make the change take effect.kms_encryption_context (pulumi.Input[dict]) –
An KMS encryption context used to decrypt
kms_encrypted_passwordbefore creating or updating an instance withkms_encrypted_password. See Encryption Context. It is valid whenkms_encrypted_passwordis set. When it is changed, the instance will reboot to make the change take effect.password (pulumi.Input[str]) – Password to an instance is a string of 8 to 30 characters. It must contain uppercase/lowercase letters and numerals, but cannot contain special symbols. When it is changed, the instance will reboot to make the change take effect.
period (pulumi.Input[float]) – The duration that you will buy the resource, in month. It is valid when
instance_charge_typeisPrePaid. Default to 1. Valid values:
- [1-9, 12, 24, 36, 48, 60] when `period_unit` in "Month" - [1-3] when `period_unit` in "Week"
- Parameters
period_unit (pulumi.Input[str]) – The duration unit that you will buy the resource. It is valid when
instance_charge_typeis ‘PrePaid’. Valid value: [“Week”, “Month”]. Default to “Month”.private_ip (pulumi.Input[str]) – Instance private IP address can be specified when you creating new instance. It is valid when
vswitch_idis specified. When it is changed, the instance will reboot to make the change take effect.public_ip (pulumi.Input[str]) – The instance public ip.
renewal_status (pulumi.Input[str]) – Whether to renew an ECS instance automatically or not. It is valid when
instance_charge_typeisPrePaid. Default to “Normal”. Valid values:
- `AutoRenewal`: Enable auto renewal. - `Normal`: Disable auto renewal. - `NotRenewal`: No renewal any longer. After you specify this value, Alibaba Cloud stop sending notification of instance expiry, and only gives a brief reminder on the third day before the instance expiry.
- Parameters
resource_group_id (pulumi.Input[str]) – The Id of resource group which the instance belongs.
role_name (pulumi.Input[str]) – Instance RAM role name. The name is provided and maintained by RAM. You can use
ram.Roleto create a new one.security_enhancement_strategy (pulumi.Input[str]) – The security enhancement strategy.
- Active: Enable security enhancement strategy, it only works on system images. - Deactive: Disable security enhancement strategy, it works on all images.
- Parameters
security_groups (pulumi.Input[list]) – A list of security group ids to associate with.
spot_price_limit (pulumi.Input[float]) – The hourly price threshold of a instance, and it takes effect only when parameter ‘spot_strategy’ is ‘SpotWithPriceLimit’. Three decimals is allowed at most.
spot_strategy (pulumi.Input[str]) – The spot strategy of a Pay-As-You-Go instance, and it takes effect only when parameter
instance_charge_typeis ‘PostPaid’. Value range:
- NoSpot: A regular Pay-As-You-Go instance. - SpotWithPriceLimit: A price threshold for a spot instance - SpotAsPriceGo: A price that is based on the highest Pay-As-You-Go instance
- Parameters
status (pulumi.Input[str]) – The instance status. Valid values: [“Running”, “Stopped”]. You can control the instance start and stop through this parameter. Default to
Running.system_disk_auto_snapshot_policy_id (pulumi.Input[str]) – The ID of the automatic snapshot policy applied to the system disk.
system_disk_category (pulumi.Input[str]) – Valid values are
ephemeral_ssd,cloud_efficiency,cloud_ssd,cloud_essd,cloud.cloudonly is used to some none I/O optimized instance. Default tocloud_efficiency.system_disk_size (pulumi.Input[float]) – Size of the system disk, measured in GiB. Value range: [20, 500]. The specified value must be equal to or greater than max{20, Imagesize}. Default value: max{40, ImageSize}.
tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string. - Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- Parameters
user_data (pulumi.Input[str]) –
User-defined data to customize the startup behaviors of an ECS instance and to pass data into an ECS instance. From version 1.60.0, it can be update in-place. If updated, the instance will reboot to make the change take effect. Note: Not all of changes will take effect and it depends on cloud-init module type.
volume_tags (pulumi.Input[dict]) – A mapping of tags to assign to the devices created by the instance at launch time.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string. - Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- Parameters
vswitch_id (pulumi.Input[str]) – The virtual switch ID to launch in VPC. This parameter must be set unless you can create classic network instances. When it is changed, the instance will reboot to make the change take effect.
The data_disks object supports the following:
autoSnapshotPolicyId(pulumi.Input[str]) - The ID of the automatic snapshot policy applied to the system disk.category(pulumi.Input[str]) - The category of the disk:cloud: The general cloud disk.cloud_efficiency: The efficiency cloud disk.cloud_ssd: The SSD cloud disk.cloud_essd: The ESSD cloud disk.ephemeral_ssd: The local SSD disk. Default tocloud_efficiency.
delete_with_instance(pulumi.Input[bool]) - Delete this data disk when the instance is destroyed. It only works on cloud, cloud_efficiency, cloud_essd, cloud_ssd disk. If the category of this data disk was ephemeral_ssd, please don’t set this param.description(pulumi.Input[str]) - The description of the data disk.encrypted(pulumi.Input[bool]) - -(Optional, Bool, ForceNew) Encrypted the data in this disk.name(pulumi.Input[str]) - The name of the data disk.size(pulumi.Input[float]) - The size of the data disk.cloud:[5, 2000]
cloud_efficiency:[20, 32768]
cloud_ssd:[20, 32768]
cloud_essd:[20, 32768]
ephemeral_ssd: [5, 800]
snapshot_id(pulumi.Input[str]) - The snapshot ID used to initialize the data disk. If the size specified by snapshot is greater that the size of the disk, use the size specified by snapshot as the size of the data disk.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_alicloud.ecs.KeyPair(resource_name, opts=None, key_file=None, key_name=None, key_name_prefix=None, public_key=None, resource_group_id=None, tags=None, __props__=None, __name__=None, __opts__=None)¶ Create a KeyPair resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] key_file: The name of file to save your new key pair’s private key. Strongly suggest you to specified it when you creating key pair, otherwise, you wouldn’t get its private key ever. :param pulumi.Input[str] key_name: The key pair’s name. It is the only in one Alicloud account. :param pulumi.Input[str] public_key: You can import an existing public key and using Alicloud key pair to manage it. :param pulumi.Input[str] resource_group_id: The Id of resource group which the key pair belongs.
key_file: pulumi.Output[str] = None¶The name of file to save your new key pair’s private key. Strongly suggest you to specified it when you creating key pair, otherwise, you wouldn’t get its private key ever.
key_name: pulumi.Output[str] = None¶The key pair’s name. It is the only in one Alicloud account.
public_key: pulumi.Output[str] = None¶You can import an existing public key and using Alicloud key pair to manage it.
resource_group_id: pulumi.Output[str] = None¶The Id of resource group which the key pair belongs.
- static
get(resource_name, id, opts=None, finger_print=None, key_file=None, key_name=None, key_name_prefix=None, public_key=None, resource_group_id=None, tags=None)¶ Get an existing KeyPair resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
key_file (pulumi.Input[str]) – The name of file to save your new key pair’s private key. Strongly suggest you to specified it when you creating key pair, otherwise, you wouldn’t get its private key ever.
key_name (pulumi.Input[str]) – The key pair’s name. It is the only in one Alicloud account.
public_key (pulumi.Input[str]) – You can import an existing public key and using Alicloud key pair to manage it.
resource_group_id (pulumi.Input[str]) – The Id of resource group which the key pair belongs.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_alicloud.ecs.KeyPairAttachment(resource_name, opts=None, force=None, instance_ids=None, key_name=None, __props__=None, __name__=None, __opts__=None)¶ Provides a key pair attachment resource to bind key pair for several ECS instances.
NOTE: After the key pair is attached with sone instances, there instances must be rebooted to make the key pair affect.
import pulumi import pulumi_alicloud as alicloud default = alicloud.get_zones(available_disk_category="cloud_ssd", available_resource_creation="VSwitch") type = alicloud.ecs.get_instance_types(availability_zone=default.zones[0]["id"], cpu_core_count=1, memory_size=2) images = alicloud.ecs.get_images(most_recent=True, name_regex="^ubuntu_18.*64", owners="system") config = pulumi.Config() name = config.get("name") if name is None: name = "keyPairAttachmentName" vpc = alicloud.vpc.Network("vpc", cidr_block="10.1.0.0/21") vswitch = alicloud.vpc.Switch("vswitch", availability_zone=default.zones[0]["id"], cidr_block="10.1.1.0/24", vpc_id=vpc.id) group = alicloud.ecs.SecurityGroup("group", description="New security group", vpc_id=vpc.id) instance = [] for range in [{"value": i} for i in range(0, 2)]: instance.append(alicloud.ecs.Instance(f"instance-{range['value']}", image_id=images.images[0]["id"], instance_charge_type="PostPaid", instance_name=f"{name}-{range['value'] + 1}", instance_type=type.instance_types[0]["id"], internet_charge_type="PayByTraffic", internet_max_bandwidth_out=5, password="Test12345", security_groups=[group.id], system_disk_category="cloud_ssd", vswitch_id=vswitch.id)) pair = alicloud.ecs.KeyPair("pair", key_name=name) attachment = alicloud.ecs.KeyPairAttachment("attachment", instance_ids=[__item.id for __item in instance], key_name=pair.id)
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
force (pulumi.Input[bool]) – Set it to true and it will reboot instances which attached with the key pair to make key pair affect immediately.
instance_ids (pulumi.Input[list]) – The list of ECS instance’s IDs.
key_name (pulumi.Input[str]) – The name of key pair used to bind.
force: pulumi.Output[bool] = None¶Set it to true and it will reboot instances which attached with the key pair to make key pair affect immediately.
instance_ids: pulumi.Output[list] = None¶The list of ECS instance’s IDs.
key_name: pulumi.Output[str] = None¶The name of key pair used to bind.
- static
get(resource_name, id, opts=None, force=None, instance_ids=None, key_name=None)¶ Get an existing KeyPairAttachment resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
force (pulumi.Input[bool]) – Set it to true and it will reboot instances which attached with the key pair to make key pair affect immediately.
instance_ids (pulumi.Input[list]) – The list of ECS instance’s IDs.
key_name (pulumi.Input[str]) – The name of key pair used to bind.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_alicloud.ecs.LaunchTemplate(resource_name, opts=None, auto_release_time=None, data_disks=None, description=None, host_name=None, image_id=None, image_owner_alias=None, instance_charge_type=None, instance_name=None, instance_type=None, internet_charge_type=None, internet_max_bandwidth_in=None, internet_max_bandwidth_out=None, io_optimized=None, key_pair_name=None, name=None, network_interfaces=None, network_type=None, ram_role_name=None, resource_group_id=None, security_enhancement_strategy=None, security_group_id=None, spot_price_limit=None, spot_strategy=None, system_disk_category=None, system_disk_description=None, system_disk_name=None, system_disk_size=None, tags=None, userdata=None, vpc_id=None, vswitch_id=None, zone_id=None, __props__=None, __name__=None, __opts__=None)¶ Provides an ECS Launch Template resource.
For information about Launch Template and how to use it, see Launch Template.
import pulumi import pulumi_alicloud as alicloud images = alicloud.ecs.get_images(owners="system") instances = alicloud.ecs.get_instances() template = alicloud.ecs.LaunchTemplate("template", data_disks=[ { "description": "test1", "name": "disk1", }, { "description": "test2", "name": "disk2", }, ], description="test1", host_name="tf-test-host", image_id=images.images[0]["id"], instance_charge_type="PrePaid", instance_name="tf-instance-name", instance_type=instances.instances[0]["instance_type"], internet_charge_type="PayByBandwidth", internet_max_bandwidth_in=5, internet_max_bandwidth_out=0, io_optimized="none", key_pair_name="test-key-pair", network_interfaces={ "description": "hello1", "name": "eth0", "primaryIp": "10.0.0.2", "security_group_id": "xxxx", "vswitch_id": "xxxxxxx", }, network_type="vpc", ram_role_name="xxxxx", resource_group_id="rg-zkdfjahg9zxncv0", security_enhancement_strategy="Active", security_group_id="sg-zxcvj0lasdf102350asdf9a", spot_price_limit=5, spot_strategy="SpotWithPriceLimit", system_disk_category="cloud_ssd", system_disk_description="test disk", system_disk_name="hello", system_disk_size=40, tags={ "tag1": "hello", "tag2": "world", }, userdata="xxxxxxxxxxxxxx", vpc_id="vpc-asdfnbg0as8dfk1nb2", vswitch_id="sw-ljkngaksdjfj0nnasdf", zone_id="beijing-a")
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
auto_release_time (pulumi.Input[str]) – Instance auto release time. The time is presented using the ISO8601 standard and in UTC time. The format is YYYY-MM-DDTHH:MM:SSZ.
data_disks (pulumi.Input[list]) – The list of data disks created with instance.
description (pulumi.Input[str]) – The description of the data disk.
host_name (pulumi.Input[str]) – Instance host name.It cannot start or end with a period (.) or a hyphen (-) and it cannot have two or more consecutive periods (.) or hyphens (-).For Windows: The host name can be [2, 15] characters in length. It can contain A-Z, a-z, numbers, periods (.), and hyphens (-). It cannot only contain numbers. For other operating systems: The host name can be [2, 64] characters in length. It can be segments separated by periods (.). It can contain A-Z, a-z, numbers, and hyphens (-).
image_id (pulumi.Input[str]) – Image ID.
instance_charge_type (pulumi.Input[str]) – Billing methods. Optional values:
- PrePaid: Monthly, or annual subscription. Make sure that your registered credit card is invalid or you have insufficient balance in your PayPal account. Otherwise, InvalidPayMethod error may occur. - PostPaid: Pay-As-You-Go.
- Parameters
instance*name (pulumi.Input[str]) –
The name of the instance. The name is a string of 2 to 128 characters. It must begin with an English or a Chinese character. It can contain A-Z, a-z, Chinese characters, numbers, periods (.), colons (:), underscores (*), and hyphens (-).
instance_type (pulumi.Input[str]) – Instance type. For more information, call resource_alicloud_instances to obtain the latest instance type list.
internet_charge_type (pulumi.Input[str]) – Internet bandwidth billing method. Optional values:
PayByTraffic|PayByBandwidth.internet_max_bandwidth_in (pulumi.Input[float]) – The maximum inbound bandwidth from the Internet network, measured in Mbit/s. Value range: [1, 200].
internet_max_bandwidth_out (pulumi.Input[float]) – Maximum outbound bandwidth from the Internet, its unit of measurement is Mbit/s. Value range: [0, 100].
io_optimized (pulumi.Input[str]) – Whether it is an I/O-optimized instance or not. Optional values:
- none - optimized
- Parameters
key_pair_name (pulumi.Input[str]) – The name of the key pair.
- Ignore this parameter for Windows instances. It is null by default. Even if you enter this parameter, only the Password content is used. - The password logon method for Linux instances is set to forbidden upon initialization.
- Parameters
name (pulumi.Input[str]) – The name of the data disk.
network_interfaces (pulumi.Input[dict]) – The list of network interfaces created with instance.
network_type (pulumi.Input[str]) – Network type of the instance. Value options:
classic|vpc.ram_role_name (pulumi.Input[str]) – The RAM role name of the instance. You can use the RAM API ListRoles to query instance RAM role names.
security_enhancement_strategy (pulumi.Input[str]) – Whether or not to activate the security enhancement feature and install network security software free of charge. Optional values: Active | Deactive.
security_group_id (pulumi.Input[str]) – The security group ID must be one in the same VPC.
spot_price_limit (pulumi.Input[float]) – -(Optional) Sets the maximum hourly instance price. Supports up to three decimal places.
spot_strategy (pulumi.Input[str]) – The spot strategy for a Pay-As-You-Go instance. This parameter is valid and required only when InstanceChargeType is set to PostPaid. Value range:
- NoSpot: Normal Pay-As-You-Go instance. - SpotWithPriceLimit: Sets the maximum price for a spot instance. - SpotAsPriceGo: The system automatically calculates the price. The maximum value is the Pay-As-You-Go price.
- Parameters
system_disk_category (pulumi.Input[str]) – The category of the system disk. System disk type. Optional values:
- cloud: Basic cloud disk. - cloud_efficiency: Ultra cloud disk. - cloud_ssd: SSD cloud Disks. - ephemeral_ssd: local SSD Disks - cloud_essd: ESSD cloud Disks.
- Parameters
system_disk_description (pulumi.Input[str]) – System disk description. It cannot begin with http:// or https://.
system_disk*name (pulumi.Input[str]) –
System disk name. The name is a string of 2 to 128 characters. It must begin with an English or a Chinese character. It can contain A-Z, a-z, Chinese characters, numbers, periods (.), colons (:), underscores (*), and hyphens (-).
system_disk_size (pulumi.Input[float]) – Size of the system disk, measured in GB. Value range: [20, 500].
tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string. - Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- Parameters
userdata (pulumi.Input[str]) – User data of the instance, which is Base64-encoded. Size of the raw data cannot exceed 16 KB.
vswitch_id (pulumi.Input[str]) – The VSwitch ID for ENI. The instance must be in the same zone of the same VPC network as the ENI, but they may belong to different VSwitches.
zone_id (pulumi.Input[str]) – The zone ID of the instance.
The data_disks object supports the following:
category(pulumi.Input[str]) - The category of the disk:cloud: Basic cloud disk.
cloud_efficiency: Ultra cloud disk.
cloud_ssd: SSD cloud Disks.
ephemeral_ssd: local SSD Disks
cloud_essd: ESSD cloud Disks.
delete_with_instance(pulumi.Input[bool]) - Delete this data disk when the instance is destroyed. It only works on cloud, cloud_efficiency, cloud_ssd and cloud_essd disk. If the category of this data disk was ephemeral_ssd, please don’t set this param.description(pulumi.Input[str]) - The description of the data disk.encrypted(pulumi.Input[bool]) - -(Optional, Bool) Encrypted the data in this disk.name(pulumi.Input[str]) - The name of the data disk.size(pulumi.Input[float]) - The size of the data disk.cloud:[5, 2000]
cloud_efficiency:[20, 32768]
cloud_ssd:[20, 32768]
cloud_essd:[20, 32768]
ephemeral_ssd: [5, 800]
snapshot_id(pulumi.Input[str]) - The snapshot ID used to initialize the data disk. If the size specified by snapshot is greater that the size of the disk, use the size specified by snapshot as the size of the data disk.
The network_interfaces object supports the following:
description(pulumi.Input[str]) - The description of the data disk.name(pulumi.Input[str]) - The name of the data disk.primaryIp(pulumi.Input[str]) - The primary private IP address of the ENI.security_group_id(pulumi.Input[str]) - The security group ID must be one in the same VPC.vswitch_id(pulumi.Input[str]) - The VSwitch ID for ENI. The instance must be in the same zone of the same VPC network as the ENI, but they may belong to different VSwitches.
auto_release_time: pulumi.Output[str] = None¶Instance auto release time. The time is presented using the ISO8601 standard and in UTC time. The format is YYYY-MM-DDTHH:MM:SSZ.
data_disks: pulumi.Output[list] = None¶The list of data disks created with instance.
category(str) - The category of the disk:cloud: Basic cloud disk.
cloud_efficiency: Ultra cloud disk.
cloud_ssd: SSD cloud Disks.
ephemeral_ssd: local SSD Disks
cloud_essd: ESSD cloud Disks.
delete_with_instance(bool) - Delete this data disk when the instance is destroyed. It only works on cloud, cloud_efficiency, cloud_ssd and cloud_essd disk. If the category of this data disk was ephemeral_ssd, please don’t set this param.description(str) - The description of the data disk.encrypted(bool) - -(Optional, Bool) Encrypted the data in this disk.name(str) - The name of the data disk.size(float) - The size of the data disk.cloud:[5, 2000]
cloud_efficiency:[20, 32768]
cloud_ssd:[20, 32768]
cloud_essd:[20, 32768]
ephemeral_ssd: [5, 800]
snapshot_id(str) - The snapshot ID used to initialize the data disk. If the size specified by snapshot is greater that the size of the disk, use the size specified by snapshot as the size of the data disk.
description: pulumi.Output[str] = None¶The description of the data disk.
host_name: pulumi.Output[str] = None¶Instance host name.It cannot start or end with a period (.) or a hyphen (-) and it cannot have two or more consecutive periods (.) or hyphens (-).For Windows: The host name can be [2, 15] characters in length. It can contain A-Z, a-z, numbers, periods (.), and hyphens (-). It cannot only contain numbers. For other operating systems: The host name can be [2, 64] characters in length. It can be segments separated by periods (.). It can contain A-Z, a-z, numbers, and hyphens (-).
image_id: pulumi.Output[str] = None¶Image ID.
instance_charge_type: pulumi.Output[str] = None¶Billing methods. Optional values:
PrePaid: Monthly, or annual subscription. Make sure that your registered credit card is invalid or you have insufficient balance in your PayPal account. Otherwise, InvalidPayMethod error may occur.
PostPaid: Pay-As-You-Go.
instance_name: pulumi.Output[str] = None¶The name of the instance. The name is a string of 2 to 128 characters. It must begin with an English or a Chinese character. It can contain A-Z, a-z, Chinese characters, numbers, periods (.), colons (:), underscores (_), and hyphens (-).
instance_type: pulumi.Output[str] = None¶Instance type. For more information, call resource_alicloud_instances to obtain the latest instance type list.
internet_charge_type: pulumi.Output[str] = None¶Internet bandwidth billing method. Optional values:
PayByTraffic|PayByBandwidth.
internet_max_bandwidth_in: pulumi.Output[float] = None¶The maximum inbound bandwidth from the Internet network, measured in Mbit/s. Value range: [1, 200].
internet_max_bandwidth_out: pulumi.Output[float] = None¶Maximum outbound bandwidth from the Internet, its unit of measurement is Mbit/s. Value range: [0, 100].
io_optimized: pulumi.Output[str] = None¶Whether it is an I/O-optimized instance or not. Optional values:
none
optimized
key_pair_name: pulumi.Output[str] = None¶The name of the key pair.
Ignore this parameter for Windows instances. It is null by default. Even if you enter this parameter, only the Password content is used.
The password logon method for Linux instances is set to forbidden upon initialization.
name: pulumi.Output[str] = None¶The name of the data disk.
network_interfaces: pulumi.Output[dict] = None¶The list of network interfaces created with instance.
description(str) - The description of the data disk.name(str) - The name of the data disk.primaryIp(str) - The primary private IP address of the ENI.security_group_id(str) - The security group ID must be one in the same VPC.vswitch_id(str) - The VSwitch ID for ENI. The instance must be in the same zone of the same VPC network as the ENI, but they may belong to different VSwitches.
network_type: pulumi.Output[str] = None¶Network type of the instance. Value options:
classic|vpc.
ram_role_name: pulumi.Output[str] = None¶The RAM role name of the instance. You can use the RAM API ListRoles to query instance RAM role names.
security_enhancement_strategy: pulumi.Output[str] = None¶Whether or not to activate the security enhancement feature and install network security software free of charge. Optional values: Active | Deactive.
security_group_id: pulumi.Output[str] = None¶The security group ID must be one in the same VPC.
spot_price_limit: pulumi.Output[float] = None¶-(Optional) Sets the maximum hourly instance price. Supports up to three decimal places.
spot_strategy: pulumi.Output[str] = None¶The spot strategy for a Pay-As-You-Go instance. This parameter is valid and required only when InstanceChargeType is set to PostPaid. Value range:
NoSpot: Normal Pay-As-You-Go instance.
SpotWithPriceLimit: Sets the maximum price for a spot instance.
SpotAsPriceGo: The system automatically calculates the price. The maximum value is the Pay-As-You-Go price.
system_disk_category: pulumi.Output[str] = None¶The category of the system disk. System disk type. Optional values:
cloud: Basic cloud disk.
cloud_efficiency: Ultra cloud disk.
cloud_ssd: SSD cloud Disks.
ephemeral_ssd: local SSD Disks
cloud_essd: ESSD cloud Disks.
system_disk_description: pulumi.Output[str] = None¶System disk description. It cannot begin with http:// or https://.
system_disk_name: pulumi.Output[str] = None¶System disk name. The name is a string of 2 to 128 characters. It must begin with an English or a Chinese character. It can contain A-Z, a-z, Chinese characters, numbers, periods (.), colons (:), underscores (_), and hyphens (-).
system_disk_size: pulumi.Output[float] = None¶Size of the system disk, measured in GB. Value range: [20, 500].
A mapping of tags to assign to the resource.
userdata: pulumi.Output[str] = None¶User data of the instance, which is Base64-encoded. Size of the raw data cannot exceed 16 KB.
vswitch_id: pulumi.Output[str] = None¶The VSwitch ID for ENI. The instance must be in the same zone of the same VPC network as the ENI, but they may belong to different VSwitches.
zone_id: pulumi.Output[str] = None¶The zone ID of the instance.
- static
get(resource_name, id, opts=None, auto_release_time=None, data_disks=None, description=None, host_name=None, image_id=None, image_owner_alias=None, instance_charge_type=None, instance_name=None, instance_type=None, internet_charge_type=None, internet_max_bandwidth_in=None, internet_max_bandwidth_out=None, io_optimized=None, key_pair_name=None, name=None, network_interfaces=None, network_type=None, ram_role_name=None, resource_group_id=None, security_enhancement_strategy=None, security_group_id=None, spot_price_limit=None, spot_strategy=None, system_disk_category=None, system_disk_description=None, system_disk_name=None, system_disk_size=None, tags=None, userdata=None, vpc_id=None, vswitch_id=None, zone_id=None)¶ Get an existing LaunchTemplate resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
auto_release_time (pulumi.Input[str]) – Instance auto release time. The time is presented using the ISO8601 standard and in UTC time. The format is YYYY-MM-DDTHH:MM:SSZ.
data_disks (pulumi.Input[list]) – The list of data disks created with instance.
description (pulumi.Input[str]) – The description of the data disk.
host_name (pulumi.Input[str]) – Instance host name.It cannot start or end with a period (.) or a hyphen (-) and it cannot have two or more consecutive periods (.) or hyphens (-).For Windows: The host name can be [2, 15] characters in length. It can contain A-Z, a-z, numbers, periods (.), and hyphens (-). It cannot only contain numbers. For other operating systems: The host name can be [2, 64] characters in length. It can be segments separated by periods (.). It can contain A-Z, a-z, numbers, and hyphens (-).
image_id (pulumi.Input[str]) – Image ID.
instance_charge_type (pulumi.Input[str]) – Billing methods. Optional values:
- PrePaid: Monthly, or annual subscription. Make sure that your registered credit card is invalid or you have insufficient balance in your PayPal account. Otherwise, InvalidPayMethod error may occur. - PostPaid: Pay-As-You-Go.
- Parameters
instance*name (pulumi.Input[str]) –
The name of the instance. The name is a string of 2 to 128 characters. It must begin with an English or a Chinese character. It can contain A-Z, a-z, Chinese characters, numbers, periods (.), colons (:), underscores (*), and hyphens (-).
instance_type (pulumi.Input[str]) – Instance type. For more information, call resource_alicloud_instances to obtain the latest instance type list.
internet_charge_type (pulumi.Input[str]) – Internet bandwidth billing method. Optional values:
PayByTraffic|PayByBandwidth.internet_max_bandwidth_in (pulumi.Input[float]) – The maximum inbound bandwidth from the Internet network, measured in Mbit/s. Value range: [1, 200].
internet_max_bandwidth_out (pulumi.Input[float]) – Maximum outbound bandwidth from the Internet, its unit of measurement is Mbit/s. Value range: [0, 100].
io_optimized (pulumi.Input[str]) – Whether it is an I/O-optimized instance or not. Optional values:
- none - optimized
- Parameters
key_pair_name (pulumi.Input[str]) – The name of the key pair.
- Ignore this parameter for Windows instances. It is null by default. Even if you enter this parameter, only the Password content is used. - The password logon method for Linux instances is set to forbidden upon initialization.
- Parameters
name (pulumi.Input[str]) – The name of the data disk.
network_interfaces (pulumi.Input[dict]) – The list of network interfaces created with instance.
network_type (pulumi.Input[str]) – Network type of the instance. Value options:
classic|vpc.ram_role_name (pulumi.Input[str]) – The RAM role name of the instance. You can use the RAM API ListRoles to query instance RAM role names.
security_enhancement_strategy (pulumi.Input[str]) – Whether or not to activate the security enhancement feature and install network security software free of charge. Optional values: Active | Deactive.
security_group_id (pulumi.Input[str]) – The security group ID must be one in the same VPC.
spot_price_limit (pulumi.Input[float]) – -(Optional) Sets the maximum hourly instance price. Supports up to three decimal places.
spot_strategy (pulumi.Input[str]) – The spot strategy for a Pay-As-You-Go instance. This parameter is valid and required only when InstanceChargeType is set to PostPaid. Value range:
- NoSpot: Normal Pay-As-You-Go instance. - SpotWithPriceLimit: Sets the maximum price for a spot instance. - SpotAsPriceGo: The system automatically calculates the price. The maximum value is the Pay-As-You-Go price.
- Parameters
system_disk_category (pulumi.Input[str]) – The category of the system disk. System disk type. Optional values:
- cloud: Basic cloud disk. - cloud_efficiency: Ultra cloud disk. - cloud_ssd: SSD cloud Disks. - ephemeral_ssd: local SSD Disks - cloud_essd: ESSD cloud Disks.
- Parameters
system_disk_description (pulumi.Input[str]) – System disk description. It cannot begin with http:// or https://.
system_disk*name (pulumi.Input[str]) –
System disk name. The name is a string of 2 to 128 characters. It must begin with an English or a Chinese character. It can contain A-Z, a-z, Chinese characters, numbers, periods (.), colons (:), underscores (*), and hyphens (-).
system_disk_size (pulumi.Input[float]) – Size of the system disk, measured in GB. Value range: [20, 500].
tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.
- Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It cannot be a null string. - Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "acs:", "http://", or "https://". It can be a null string.
- Parameters
userdata (pulumi.Input[str]) – User data of the instance, which is Base64-encoded. Size of the raw data cannot exceed 16 KB.
vswitch_id (pulumi.Input[str]) – The VSwitch ID for ENI. The instance must be in the same zone of the same VPC network as the ENI, but they may belong to different VSwitches.
zone_id (pulumi.Input[str]) – The zone ID of the instance.
The data_disks object supports the following:
category(pulumi.Input[str]) - The category of the disk:cloud: Basic cloud disk.
cloud_efficiency: Ultra cloud disk.
cloud_ssd: SSD cloud Disks.
ephemeral_ssd: local SSD Disks
cloud_essd: ESSD cloud Disks.
delete_with_instance(pulumi.Input[bool]) - Delete this data disk when the instance is destroyed. It only works on cloud, cloud_efficiency, cloud_ssd and cloud_essd disk. If the category of this data disk was ephemeral_ssd, please don’t set this param.description(pulumi.Input[str]) - The description of the data disk.encrypted(pulumi.Input[bool]) - -(Optional, Bool) Encrypted the data in this disk.name(pulumi.Input[str]) - The name of the data disk.size(pulumi.Input[float]) - The size of the data disk.cloud:[5, 2000]
cloud_efficiency:[20, 32768]
cloud_ssd:[20, 32768]
cloud_essd:[20, 32768]
ephemeral_ssd: [5, 800]
snapshot_id(pulumi.Input[str]) - The snapshot ID used to initialize the data disk. If the size specified by snapshot is greater that the size of the disk, use the size specified by snapshot as the size of the data disk.
The network_interfaces object supports the following:
description(pulumi.Input[str]) - The description of the data disk.name(pulumi.Input[str]) - The name of the data disk.primaryIp(pulumi.Input[str]) - The primary private IP address of the ENI.security_group_id(pulumi.Input[str]) - The security group ID must be one in the same VPC.vswitch_id(pulumi.Input[str]) - The VSwitch ID for ENI. The instance must be in the same zone of the same VPC network as the ENI, but they may belong to different VSwitches.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_alicloud.ecs.ReservedInstance(resource_name, opts=None, description=None, instance_amount=None, instance_type=None, name=None, offering_type=None, period=None, period_unit=None, platform=None, resource_group_id=None, scope=None, zone_id=None, __props__=None, __name__=None, __opts__=None)¶ Provides an Reserved Instance resource.
NOTE: Available in 1.65.0+
import pulumi import pulumi_alicloud as alicloud default = alicloud.ecs.ReservedInstance("default", instance_type="ecs.g6.large", instance_amount="1", period_unit="Year", offering_type="All Upfront", description="ReservedInstance", zone_id="cn-shanghai-g", scope="Zone", period="1")
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – Description of the RI. 2 to 256 English or Chinese characters. It cannot start with http:// or https://.
instance_amount (pulumi.Input[float]) – Number of instances allocated to an RI (An RI is a coupon that includes one or more allocated instances.).
instance*type (pulumi.Input[str]) –
Instance type of the RI. For more information, see Instance type families.
name (pulumi.Input[str]) – Name of the RI. The name must be a string of 2 to 128 characters in length and can contain letters, numbers, colons (:), underscores (*), and hyphens. It must start with a letter. It cannot start with http:// or https://.
offering_type (pulumi.Input[str]) – Payment type of the RI. Optional values: No Upfront: No upfront payment is required., Partial Upfront: A portion of upfront payment is required.
All Upfront: Full upfront payment is required.period_unit (pulumi.Input[str]) – Term unit. Optional value: Year.
platform (pulumi.Input[str]) – The operating system type of the image used by the instance. Optional values:
Windows,Linux. Default isLinux.resource_group_id (pulumi.Input[str]) – Resource group ID.
scope (pulumi.Input[str]) – Scope of the RI. Optional values: Region: region-level, Zone: zone-level. Default is
Region.zone_id (pulumi.Input[str]) – ID of the zone to which the RI belongs. When Scope is set to Zone, this parameter is required. For information about the zone list, see DescribeZones.
description: pulumi.Output[str] = None¶Description of the RI. 2 to 256 English or Chinese characters. It cannot start with http:// or https://.
instance_amount: pulumi.Output[float] = None¶Number of instances allocated to an RI (An RI is a coupon that includes one or more allocated instances.).
instance_type: pulumi.Output[str] = None¶Instance type of the RI. For more information, see Instance type families.
name: pulumi.Output[str] = None¶Name of the RI. The name must be a string of 2 to 128 characters in length and can contain letters, numbers, colons (:), underscores (_), and hyphens. It must start with a letter. It cannot start with http:// or https://.
offering_type: pulumi.Output[str] = None¶Payment type of the RI. Optional values: No Upfront: No upfront payment is required., Partial Upfront: A portion of upfront payment is required.
All Upfront: Full upfront payment is required.
period_unit: pulumi.Output[str] = None¶Term unit. Optional value: Year.
platform: pulumi.Output[str] = None¶The operating system type of the image used by the instance. Optional values:
Windows,Linux. Default isLinux.
resource_group_id: pulumi.Output[str] = None¶Resource group ID.
scope: pulumi.Output[str] = None¶Scope of the RI. Optional values: Region: region-level, Zone: zone-level. Default is
Region.
zone_id: pulumi.Output[str] = None¶ID of the zone to which the RI belongs. When Scope is set to Zone, this parameter is required. For information about the zone list, see DescribeZones.
- static
get(resource_name, id, opts=None, description=None, instance_amount=None, instance_type=None, name=None, offering_type=None, period=None, period_unit=None, platform=None, resource_group_id=None, scope=None, zone_id=None)¶ Get an existing ReservedInstance resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – Description of the RI. 2 to 256 English or Chinese characters. It cannot start with http:// or https://.
instance_amount (pulumi.Input[float]) – Number of instances allocated to an RI (An RI is a coupon that includes one or more allocated instances.).
instance*type (pulumi.Input[str]) –
Instance type of the RI. For more information, see Instance type families.
name (pulumi.Input[str]) – Name of the RI. The name must be a string of 2 to 128 characters in length and can contain letters, numbers, colons (:), underscores (*), and hyphens. It must start with a letter. It cannot start with http:// or https://.
offering_type (pulumi.Input[str]) – Payment type of the RI. Optional values: No Upfront: No upfront payment is required., Partial Upfront: A portion of upfront payment is required.
All Upfront: Full upfront payment is required.period_unit (pulumi.Input[str]) – Term unit. Optional value: Year.
platform (pulumi.Input[str]) – The operating system type of the image used by the instance. Optional values:
Windows,Linux. Default isLinux.resource_group_id (pulumi.Input[str]) – Resource group ID.
scope (pulumi.Input[str]) – Scope of the RI. Optional values: Region: region-level, Zone: zone-level. Default is
Region.zone_id (pulumi.Input[str]) –
ID of the zone to which the RI belongs. When Scope is set to Zone, this parameter is required. For information about the zone list, see DescribeZones.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_alicloud.ecs.SecurityGroup(resource_name, opts=None, description=None, inner_access=None, inner_access_policy=None, name=None, resource_group_id=None, security_group_type=None, tags=None, vpc_id=None, __props__=None, __name__=None, __opts__=None)¶ Create a SecurityGroup resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] description: The security group description. Defaults to null. :param pulumi.Input[bool] inner_access: Field ‘inner_access’ has been deprecated from provider version 1.55.3. Use ‘inner_access_policy’ replaces it. :param pulumi.Input[str] inner_access_policy: Whether to allow both machines to access each other on all ports in the same security group. Valid values: [“Accept”, “Drop”] :param pulumi.Input[str] name: The name of the security group. Defaults to null. :param pulumi.Input[str] resource_group_id: The Id of resource group which the security_group belongs. :param pulumi.Input[str] security_group_type: The type of the security group. Valid values:
normal: basic security group.enterprise: advanced security group For more information.- Parameters
tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.
vpc_id (pulumi.Input[str]) – The VPC ID.
description: pulumi.Output[str] = None¶The security group description. Defaults to null.
inner_access: pulumi.Output[bool] = None¶Field ‘inner_access’ has been deprecated from provider version 1.55.3. Use ‘inner_access_policy’ replaces it.
inner_access_policy: pulumi.Output[str] = None¶Whether to allow both machines to access each other on all ports in the same security group. Valid values: [“Accept”, “Drop”]
name: pulumi.Output[str] = None¶The name of the security group. Defaults to null.
resource_group_id: pulumi.Output[str] = None¶The Id of resource group which the security_group belongs.
security_group_type: pulumi.Output[str] = None¶The type of the security group. Valid values:
normal: basic security group.enterprise: advanced security group For more information.
A mapping of tags to assign to the resource.
vpc_id: pulumi.Output[str] = None¶The VPC ID.
- static
get(resource_name, id, opts=None, description=None, inner_access=None, inner_access_policy=None, name=None, resource_group_id=None, security_group_type=None, tags=None, vpc_id=None)¶ Get an existing SecurityGroup resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – The security group description. Defaults to null.
inner_access (pulumi.Input[bool]) – Field ‘inner_access’ has been deprecated from provider version 1.55.3. Use ‘inner_access_policy’ replaces it.
inner_access_policy (pulumi.Input[str]) – Whether to allow both machines to access each other on all ports in the same security group. Valid values: [“Accept”, “Drop”]
name (pulumi.Input[str]) – The name of the security group. Defaults to null.
resource_group_id (pulumi.Input[str]) – The Id of resource group which the security_group belongs.
security_group_type (pulumi.Input[str]) – The type of the security group. Valid values:
normal: basic security group.enterprise: advanced security group For more information.tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.
vpc_id (pulumi.Input[str]) – The VPC ID.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_alicloud.ecs.SecurityGroupRule(resource_name, opts=None, cidr_ip=None, description=None, ip_protocol=None, nic_type=None, policy=None, port_range=None, priority=None, security_group_id=None, source_group_owner_account=None, source_security_group_id=None, type=None, __props__=None, __name__=None, __opts__=None)¶ Create a SecurityGroupRule resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] cidr_ip: The target IP address range. The default value is 0.0.0.0/0 (which means no restriction will be applied). Other supported formats include 10.159.6.18/12. Only IPv4 is supported. :param pulumi.Input[str] description: The description of the security group rule. The description can be up to 1 to 512 characters in length. Defaults to null. :param pulumi.Input[str] ip_protocol: The protocol. Can be
tcp,udp,icmp,greorall. :param pulumi.Input[str] nic_type: Network type, can be eitherinternetorintranet, the default value isinternet. :param pulumi.Input[str] policy: Authorization policy, can be eitheracceptordrop, the default value isaccept. :param pulumi.Input[str] port_range: The range of port numbers relevant to the IP protocol. Default to “-1/-1”. When the protocol is tcp or udp, each side port number range from 1 to 65535 and ‘-1/-1’ will be invalid.For example,
1/200means that the range of the port numbers is 1-200. Other protocols’ ‘port_range’ can only be “-1/-1”, and other values will be invalid.- Parameters
priority (pulumi.Input[float]) – Authorization policy priority, with parameter values:
1-100, default value: 1.security_group_id (pulumi.Input[str]) – The security group to apply this rule to.
source_group_owner_account (pulumi.Input[str]) – The Alibaba Cloud user account Id of the target security group when security groups are authorized across accounts. This parameter is invalid if
cidr_iphas already been set.source_security_group_id (pulumi.Input[str]) – The target security group ID within the same region. If this field is specified, the
nic_typecan only selectintranet.type (pulumi.Input[str]) – The type of rule being created. Valid options are
ingress(inbound) oregress(outbound).
cidr_ip: pulumi.Output[str] = None¶The target IP address range. The default value is 0.0.0.0/0 (which means no restriction will be applied). Other supported formats include 10.159.6.18/12. Only IPv4 is supported.
description: pulumi.Output[str] = None¶The description of the security group rule. The description can be up to 1 to 512 characters in length. Defaults to null.
ip_protocol: pulumi.Output[str] = None¶The protocol. Can be
tcp,udp,icmp,greorall.
nic_type: pulumi.Output[str] = None¶Network type, can be either
internetorintranet, the default value isinternet.
policy: pulumi.Output[str] = None¶Authorization policy, can be either
acceptordrop, the default value isaccept.
port_range: pulumi.Output[str] = None¶The range of port numbers relevant to the IP protocol. Default to “-1/-1”. When the protocol is tcp or udp, each side port number range from 1 to 65535 and ‘-1/-1’ will be invalid. For example,
1/200means that the range of the port numbers is 1-200. Other protocols’ ‘port_range’ can only be “-1/-1”, and other values will be invalid.
priority: pulumi.Output[float] = None¶Authorization policy priority, with parameter values:
1-100, default value: 1.
security_group_id: pulumi.Output[str] = None¶The security group to apply this rule to.
source_group_owner_account: pulumi.Output[str] = None¶The Alibaba Cloud user account Id of the target security group when security groups are authorized across accounts. This parameter is invalid if
cidr_iphas already been set.
source_security_group_id: pulumi.Output[str] = None¶The target security group ID within the same region. If this field is specified, the
nic_typecan only selectintranet.
type: pulumi.Output[str] = None¶The type of rule being created. Valid options are
ingress(inbound) oregress(outbound).
- static
get(resource_name, id, opts=None, cidr_ip=None, description=None, ip_protocol=None, nic_type=None, policy=None, port_range=None, priority=None, security_group_id=None, source_group_owner_account=None, source_security_group_id=None, type=None)¶ Get an existing SecurityGroupRule resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
cidr_ip (pulumi.Input[str]) – The target IP address range. The default value is 0.0.0.0/0 (which means no restriction will be applied). Other supported formats include 10.159.6.18/12. Only IPv4 is supported.
description (pulumi.Input[str]) – The description of the security group rule. The description can be up to 1 to 512 characters in length. Defaults to null.
ip_protocol (pulumi.Input[str]) – The protocol. Can be
tcp,udp,icmp,greorall.nic_type (pulumi.Input[str]) – Network type, can be either
internetorintranet, the default value isinternet.policy (pulumi.Input[str]) – Authorization policy, can be either
acceptordrop, the default value isaccept.port_range (pulumi.Input[str]) – The range of port numbers relevant to the IP protocol. Default to “-1/-1”. When the protocol is tcp or udp, each side port number range from 1 to 65535 and ‘-1/-1’ will be invalid. For example,
1/200means that the range of the port numbers is 1-200. Other protocols’ ‘port_range’ can only be “-1/-1”, and other values will be invalid.priority (pulumi.Input[float]) – Authorization policy priority, with parameter values:
1-100, default value: 1.security_group_id (pulumi.Input[str]) – The security group to apply this rule to.
source_group_owner_account (pulumi.Input[str]) – The Alibaba Cloud user account Id of the target security group when security groups are authorized across accounts. This parameter is invalid if
cidr_iphas already been set.source_security_group_id (pulumi.Input[str]) – The target security group ID within the same region. If this field is specified, the
nic_typecan only selectintranet.type (pulumi.Input[str]) – The type of rule being created. Valid options are
ingress(inbound) oregress(outbound).
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_alicloud.ecs.Snapshot(resource_name, opts=None, description=None, disk_id=None, name=None, tags=None, __props__=None, __name__=None, __opts__=None)¶ Provides an ECS snapshot resource.
For information about snapshot and how to use it, see Snapshot.
import pulumi import pulumi_alicloud as alicloud snapshot = alicloud.ecs.Snapshot("snapshot", description="this snapshot is created for testing", disk_id=alicloud_disk_attachment["instance-attachment"]["disk_id"], tags={ "version": "1.2", })
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – Description of the snapshot. This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
disk*id (pulumi.Input[str]) –
The source disk ID.
name (pulumi.Input[str]) – Name of the snapshot. This name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as “-“, “.”, “*”, and must not begin or end with a hyphen, and must not begin with http:// or https://. Default value is null.
tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.
description: pulumi.Output[str] = None¶Description of the snapshot. This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
disk_id: pulumi.Output[str] = None¶The source disk ID.
name: pulumi.Output[str] = None¶Name of the snapshot. This name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as “-“, “.”, “_”, and must not begin or end with a hyphen, and must not begin with http:// or https://. Default value is null.
A mapping of tags to assign to the resource.
- static
get(resource_name, id, opts=None, description=None, disk_id=None, name=None, tags=None)¶ Get an existing Snapshot resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
description (pulumi.Input[str]) – Description of the snapshot. This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null.
disk*id (pulumi.Input[str]) –
The source disk ID.
name (pulumi.Input[str]) – Name of the snapshot. This name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as “-“, “.”, “*”, and must not begin or end with a hyphen, and must not begin with http:// or https://. Default value is null.
tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
- class
pulumi_alicloud.ecs.SnapshotPolicy(resource_name, opts=None, name=None, repeat_weekdays=None, retention_days=None, time_points=None, __props__=None, __name__=None, __opts__=None)¶ Provides an ECS snapshot policy resource.
For information about snapshot policy and how to use it, see Snapshot.
NOTE: Available in 1.42.0+.
import pulumi import pulumi_alicloud as alicloud sp = alicloud.ecs.SnapshotPolicy("sp", repeat_weekdays=[ "1", "2", "3", ], retention_days=-1, time_points=[ "1", "22", "23", ])
- Parameters
resource_name (str) – The name of the resource.
opts (pulumi.ResourceOptions) – Options for the resource.
name (pulumi.Input[str]) – The snapshot policy name.
repeat_weekdays (pulumi.Input[list]) – The automatic snapshot repetition dates. The unit of measurement is day and the repeating cycle is a week. Value range: [1, 7], which represents days starting from Monday to Sunday, for example 1 indicates Monday. When you want to schedule multiple automatic snapshot tasks for a disk in a week, you can set the RepeatWeekdays to an array.
- A maximum of seven time points can be selected. - The format is an JSON array of ["1", "2", … "7"] and the time points are separated by commas (,).
- Parameters
retention_days (pulumi.Input[float]) – The snapshot retention time, and the unit of measurement is day. Optional values:
- -1: The automatic snapshots are retained permanently. - [1, 65536]: The number of days retained.
- Parameters
time_points (pulumi.Input[list]) – The automatic snapshot creation schedule, and the unit of measurement is hour. Value range: [0, 23], which represents from 00:00 to 24:00, for example 1 indicates 01:00. When you want to schedule multiple automatic snapshot tasks for a disk in a day, you can set the TimePoints to an array.
- A maximum of 24 time points can be selected. - The format is an JSON array of ["0", "1", … "23"] and the time points are separated by commas (,).
name: pulumi.Output[str] = None¶The snapshot policy name.
repeat_weekdays: pulumi.Output[list] = None¶The automatic snapshot repetition dates. The unit of measurement is day and the repeating cycle is a week. Value range: [1, 7], which represents days starting from Monday to Sunday, for example 1 indicates Monday. When you want to schedule multiple automatic snapshot tasks for a disk in a week, you can set the RepeatWeekdays to an array.
A maximum of seven time points can be selected.
The format is an JSON array of [“1”, “2”, … “7”] and the time points are separated by commas (,).
retention_days: pulumi.Output[float] = None¶The snapshot retention time, and the unit of measurement is day. Optional values:
-1: The automatic snapshots are retained permanently.
[1, 65536]: The number of days retained.
time_points: pulumi.Output[list] = None¶The automatic snapshot creation schedule, and the unit of measurement is hour. Value range: [0, 23], which represents from 00:00 to 24:00, for example 1 indicates 01:00. When you want to schedule multiple automatic snapshot tasks for a disk in a day, you can set the TimePoints to an array.
A maximum of 24 time points can be selected.
The format is an JSON array of [“0”, “1”, … “23”] and the time points are separated by commas (,).
- static
get(resource_name, id, opts=None, name=None, repeat_weekdays=None, retention_days=None, time_points=None)¶ Get an existing SnapshotPolicy resource’s state with the given name, id, and optional extra properties used to qualify the lookup.
- Parameters
resource_name (str) – The unique name of the resulting resource.
id (str) – The unique provider ID of the resource to lookup.
opts (pulumi.ResourceOptions) – Options for the resource.
name (pulumi.Input[str]) – The snapshot policy name.
repeat_weekdays (pulumi.Input[list]) – The automatic snapshot repetition dates. The unit of measurement is day and the repeating cycle is a week. Value range: [1, 7], which represents days starting from Monday to Sunday, for example 1 indicates Monday. When you want to schedule multiple automatic snapshot tasks for a disk in a week, you can set the RepeatWeekdays to an array.
- A maximum of seven time points can be selected. - The format is an JSON array of ["1", "2", … "7"] and the time points are separated by commas (,).
- Parameters
retention_days (pulumi.Input[float]) – The snapshot retention time, and the unit of measurement is day. Optional values:
- -1: The automatic snapshots are retained permanently. - [1, 65536]: The number of days retained.
- Parameters
time_points (pulumi.Input[list]) – The automatic snapshot creation schedule, and the unit of measurement is hour. Value range: [0, 23], which represents from 00:00 to 24:00, for example 1 indicates 01:00. When you want to schedule multiple automatic snapshot tasks for a disk in a day, you can set the TimePoints to an array.
- A maximum of 24 time points can be selected. - The format is an JSON array of ["0", "1", … "23"] and the time points are separated by commas (,).
translate_output_property(prop)¶Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
translate_input_property(prop)¶Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.
- Parameters
prop (str) – A property name.
- Returns
A potentially transformed property name.
- Return type
str
pulumi_alicloud.ecs.get_disks(category=None, encrypted=None, ids=None, instance_id=None, name_regex=None, output_file=None, resource_group_id=None, tags=None, type=None, opts=None)¶This data source provides the disks of the current Alibaba Cloud user.
import pulumi import pulumi_alicloud as alicloud disks_ds = alicloud.ecs.get_disks(name_regex="sample_disk") pulumi.export("firstDiskId", disks_ds.disks[0]["id"])
- Parameters
category (str) – Disk category. Possible values:
cloud(basic cloud disk),cloud_efficiency(ultra cloud disk),ephemeral_ssd(local SSD cloud disk),cloud_ssd(SSD cloud disk), andcloud_essd(ESSD cloud disk).encrypted (str) – Indicate whether the disk is encrypted or not. Possible values:
onandoff.ids (list) – A list of disks IDs.
instance_id (str) – Filter the results by the specified ECS instance ID.
name_regex (str) – A regex string to filter results by disk name.
resource_group_id (str) – The Id of resource group which the disk belongs.
tags (dict) – A map of tags assigned to the disks. It must be in the format:
``` data "ecs.getDisks" "disks_ds" { tags = { tagKey1 = "tagValue1", tagKey2 = "tagValue2" } } ```- Parameters
type (str) – Disk type. Possible values:
systemanddata.
pulumi_alicloud.ecs.get_eips(ids=None, in_use=None, ip_addresses=None, output_file=None, resource_group_id=None, tags=None, opts=None)¶This data source provides a list of EIPs (Elastic IP address) owned by an Alibaba Cloud account.
import pulumi import pulumi_alicloud as alicloud eips_ds = alicloud.ecs.get_eips() pulumi.export("firstEipId", eips_ds.eips[0]["id"])
- Parameters
ids (list) – A list of EIP IDs.
in_use (bool) – Deprecated since the version 1.8.0 of this provider.
ip_addresses (list) – A list of EIP public IP addresses.
resource_group_id (str) – The Id of resource group which the eips belongs.
tags (dict) – A mapping of tags to assign to the resource.
pulumi_alicloud.ecs.get_images(most_recent=None, name_regex=None, output_file=None, owners=None, opts=None)¶This data source provides available image resources. It contains user’s private images, system images provided by Alibaba Cloud, other public images and the ones available on the image market.
import pulumi import pulumi_alicloud as alicloud images_ds = alicloud.ecs.get_images(name_regex="^centos_6", owners="system") pulumi.export("firstImageId", images_ds.images[0]["id"])
- Parameters
most_recent (bool) – If more than one result are returned, select the most recent one.
name_regex (str) – A regex string to filter resulting images by name.
owners (str) – Filter results by a specific image owner. Valid items are
system,self,others,marketplace.
pulumi_alicloud.ecs.get_instance_type_families(generation=None, instance_charge_type=None, output_file=None, spot_strategy=None, zone_id=None, opts=None)¶This data source provides the ECS instance type families of Alibaba Cloud.
NOTE: Available in 1.54.0+
import pulumi import pulumi_alicloud as alicloud default = alicloud.ecs.get_instance_type_families(instance_charge_type="PrePaid") pulumi.export("firstInstanceTypeFamilyId", default.families[0]["id"]) pulumi.export("instanceIds", default.ids)
- Parameters
generation (str) –
The generation of the instance type family, Valid values:
ecs-1,ecs-2,ecs-3andecs-4. For more information, see Instance type families.instance_charge_type (str) – Valid values are
PrePaid,PostPaid, Default toPostPaid.spot_strategy (str) – Filter the results by ECS spot type. Valid values:
NoSpot,SpotWithPriceLimitandSpotAsPriceGo. Default toNoSpot.zone_id (str) – The Zone to launch the instance.
pulumi_alicloud.ecs.get_instance_types(availability_zone=None, cpu_core_count=None, eni_amount=None, gpu_amount=None, gpu_spec=None, instance_charge_type=None, instance_type_family=None, is_outdated=None, kubernetes_node_role=None, memory_size=None, network_type=None, output_file=None, sorted_by=None, spot_strategy=None, opts=None)¶This data source provides the ECS instance types of Alibaba Cloud.
NOTE: By default, only the upgraded instance types are returned. If you want to get outdated instance types, you must set
is_outdatedto true.NOTE: If one instance type is sold out, it will not be exported.
import pulumi import pulumi_alicloud as alicloud types_ds = alicloud.ecs.get_instance_types(cpu_core_count=1, memory_size=2) instance = alicloud.ecs.Instance("instance", instance_type=types_ds.instance_types[0]["id"])
- Parameters
availability_zone (str) – The zone where instance types are supported.
cpu_core_count (float) – Filter the results to a specific number of cpu cores.
eni_amount (float) – Filter the result whose network interface number is no more than
eni_amount.gpu_amount (float) – The GPU amount of an instance type.
gpu_spec (str) – The GPU spec of an instance type.
instance_charge_type (str) – Filter the results by charge type. Valid values:
PrePaidandPostPaid. Default toPostPaid.instance_type_family (str) – Filter the results based on their family name. For example: ‘ecs.n4’.
is_outdated (bool) – If true, outdated instance types are included in the results. Default to false.
memory_size (float) – Filter the results to a specific memory size in GB.
network_type (str) – Filter the results by network type. Valid values:
ClassicandVpc.spot_strategy (str) – Filter the results by ECS spot type. Valid values:
NoSpot,SpotWithPriceLimitandSpotAsPriceGo. Default toNoSpot.
pulumi_alicloud.ecs.get_instances(availability_zone=None, ids=None, image_id=None, name_regex=None, output_file=None, ram_role_name=None, resource_group_id=None, status=None, tags=None, vpc_id=None, vswitch_id=None, opts=None)¶The Instances data source list ECS instance resources according to their ID, name regex, image id, status and other fields.
import pulumi import pulumi_alicloud as alicloud instances_ds = alicloud.ecs.get_instances(name_regex="web_server", status="Running") pulumi.export("firstInstanceId", instances_ds.instances[0]["id"]) pulumi.export("instanceIds", instances_ds.ids)
- Parameters
availability_zone (str) – Availability zone where instances are located.
ids (list) – A list of ECS instance IDs.
image_id (str) – The image ID of some ECS instance used.
name_regex (str) – A regex string to filter results by instance name.
ram_role_name (str) – The RAM role name which the instance attaches.
resource_group_id (str) – The Id of resource group which the instance belongs.
status (str) – Instance status. Valid values: “Creating”, “Starting”, “Running”, “Stopping” and “Stopped”. If undefined, all statuses are considered.
tags (dict) – A map of tags assigned to the ECS instances. It must be in the format:
``` data "ecs.getInstances" "taggedInstances" { tags = { tagKey1 = "tagValue1", tagKey2 = "tagValue2" } } ```- Parameters
vpc_id (str) – ID of the VPC linked to the instances.
vswitch_id (str) – ID of the VSwitch linked to the instances.
pulumi_alicloud.ecs.get_key_pairs(finger_print=None, ids=None, name_regex=None, output_file=None, resource_group_id=None, tags=None, opts=None)¶This data source provides a list of key pairs in an Alibaba Cloud account according to the specified filters.
import pulumi import pulumi_alicloud as alicloud # Declare the data source default_key_pair = alicloud.ecs.KeyPair("defaultKeyPair", key_name="keyPairDatasource") default_key_pairs = default_key_pair.key_name.apply(lambda key_name: alicloud.ecs.get_key_pairs(name_regex=key_name))
- Parameters
finger_print (str) – A finger print used to retrieve specified key pair.
ids (list) – A list of key pair IDs.
name_regex (str) – A regex string to apply to the resulting key pairs.
resource_group_id (str) – The Id of resource group which the key pair belongs.
tags (dict) – A mapping of tags to assign to the resource.
pulumi_alicloud.ecs.get_network_interfaces(ids=None, instance_id=None, name_regex=None, output_file=None, private_ip=None, resource_group_id=None, security_group_id=None, tags=None, type=None, vpc_id=None, vswitch_id=None, opts=None)¶Use this data source to get a list of elastic network interfaces according to the specified filters in an Alibaba Cloud account.
For information about elastic network interface and how to use it, see Elastic Network Interface
import pulumi import pulumi_alicloud as alicloud config = pulumi.Config() name = config.get("name") if name is None: name = "networkInterfacesName" vpc = alicloud.vpc.Network("vpc", cidr_block="192.168.0.0/24") default_zones = alicloud.get_zones(available_resource_creation="VSwitch") vswitch = alicloud.vpc.Switch("vswitch", availability_zone=default_zones.zones[0]["id"], cidr_block="192.168.0.0/24", vpc_id=vpc.id) group = alicloud.ecs.SecurityGroup("group", vpc_id=vpc.id) interface = alicloud.vpc.NetworkInterface("interface", description="Basic test", private_ip="192.168.0.2", security_groups=[group.id], tags={ "TF-VER": "0.11.3", }, vswitch_id=vswitch.id) instance = alicloud.ecs.Instance("instance", availability_zone=default_zones.zones[0]["id"], image_id="centos_7_04_64_20G_alibase_201701015.vhd", instance_name=name, instance_type="ecs.e3.xlarge", internet_max_bandwidth_out=10, security_groups=[group.id], system_disk_category="cloud_efficiency", vswitch_id=vswitch.id) attachment = alicloud.vpc.NetworkInterfaceAttachment("attachment", instance_id=instance.id, network_interface_id=interface.id) default_network_interfaces = pulumi.Output.all(attachment.network_interface_id, instance.id, group.id, vpc.id, vswitch.id).apply(lambda network_interface_id, instanceId, groupId, vpcId, vswitchId: alicloud.ecs.get_network_interfaces(ids=[network_interface_id], instance_id=instance_id, name_regex=name, private_ip="192.168.0.2", security_group_id=group_id, tags={ "TF-VER": "0.11.3", }, type="Secondary", vpc_id=vpc_id, vswitch_id=vswitch_id)) pulumi.export("eni0Name", default_network_interfaces.interfaces[0]["name"])
The following arguments are supported:
ids- (Optional) A list of ENI IDs.name_regex- (Optional) A regex string to filter results by ENI name.vpc_id- (Optional) The VPC ID linked to ENIs.vswitch_id- (Optional) The VSwitch ID linked to ENIs.private_ip- (Optional) The primary private IP address of the ENI.security_group_id- (Optional) The security group ID linked to ENIs.name- (Optional) The name of the ENIs.type- (Optional) The type of ENIs, Only support for “Primary” or “Secondary”.instance_id- (Optional) The ECS instance ID that the ENI is attached to.tags- (Optional) A map of tags assigned to ENIs.output_file- (Optional) The name of output file that saves the filter results.resource_group_id- (Optional, ForceNew, Available in 1.57.0+) The Id of resource group which the network interface belongs.
- Parameters
instance_id (str) – ID of the instance that the ENI is attached to.
private_ip (str) – Primary private IP of the ENI.
resource_group_id (str) – The Id of resource group.
tags (dict) – A map of tags assigned to the ENI.
vpc_id (str) – ID of the VPC that the ENI belongs to.
vswitch_id (str) – ID of the VSwitch that the ENI is linked to.
pulumi_alicloud.ecs.get_security_group_rules(direction=None, group_id=None, ip_protocol=None, nic_type=None, output_file=None, policy=None, opts=None)¶The
ecs.getSecurityGroupRulesdata source provides a collection of security permissions of a specific security group. Each collection item represents a singleingressoregresspermission rule. The ID of the security group can be provided via a variable or the result from the other data sourceecs.getSecurityGroups.import pulumi import pulumi_alicloud as alicloud config = pulumi.Config() security_group_id = config.require_object("securityGroupId") groups_ds = alicloud.ecs.get_security_groups(name_regex="api") ingress_rules_ds = alicloud.ecs.get_security_group_rules(direction="ingress", group_id=groups_ds.groups[0]["id"], ip_protocol="TCP", nic_type="internet") # Pass port_range to the backend service backend = alicloud.ecs.Instance("backend", user_data=f"config_service.sh --portrange={ingress_rules_ds.rules[0]['port_range']}")
- Parameters
direction (str) – Authorization direction. Valid values are:
ingressoregress.group_id (str) – The ID of the security group that owns the rules.
ip_protocol (str) – The IP protocol. Valid values are:
tcp,udp,icmp,greandall.nic_type (str) – Refers to the network type. Can be either
internetorintranet. The default value isinternet.policy (str) – Authorization policy. Can be either
acceptordrop. The default value isaccept.
pulumi_alicloud.ecs.get_security_groups(ids=None, name_regex=None, output_file=None, resource_group_id=None, tags=None, vpc_id=None, opts=None)¶This data source provides a list of Security Groups in an Alibaba Cloud account according to the specified filters.
import pulumi import pulumi_alicloud as alicloud sec_groups_ds = alicloud.ecs.get_security_groups(name_regex="^web-", output_file="web_access.json") # In conjunction with a VPC primary_vpc_ds = alicloud.vpc.Network("primaryVpcDs") primary_sec_groups_ds = primary_vpc_ds.id.apply(lambda id: alicloud.ecs.get_security_groups(vpc_id=id)) pulumi.export("firstGroupId", primary_sec_groups_ds.groups[0]["id"])
- Parameters
ids (list) – A list of Security Group IDs.
name_regex (str) – A regex string to filter the resulting security groups by their names.
resource_group_id (str) – The Id of resource group which the security_group belongs.
tags (dict) – A map of tags assigned to the ECS instances. It must be in the format:
``` data "ecs.getSecurityGroups" "taggedSecurityGroups" { tags = { tagKey1 = "tagValue1", tagKey2 = "tagValue2" } } ```- Parameters
vpc_id (str) – Used to retrieve security groups that belong to the specified VPC ID.
pulumi_alicloud.ecs.get_snapshots(disk_id=None, encrypted=None, ids=None, instance_id=None, name_regex=None, output_file=None, source_disk_type=None, status=None, tags=None, type=None, usage=None, opts=None)¶Use this data source to get a list of snapshot according to the specified filters in an Alibaba Cloud account.
For information about snapshot and how to use it, see Snapshot.
NOTE: Available in 1.40.0+.
import pulumi import pulumi_alicloud as alicloud snapshots = alicloud.ecs.get_snapshots(ids=["s-123456890abcdef"], name_regex="tf-testAcc-snapshot")
The following arguments are supported:
instance_id- (Optional) The specified instance ID.disk_id- (Optional) The specified disk ID.encrypted- (Optional) Queries the encrypted snapshots. Optional values:true: Encrypted snapshots.
false: No encryption attribute limit.
Default value: false.
ids- (Optional) A list of snapshot IDs.name_regex- (Optional) A regex string to filter results by snapshot name.status- (Optional) The specified snapshot status.The snapshot status. Optional values:
progressing: The snapshots are being created.
accomplished: The snapshots are ready to use.
failed: The snapshot creation failed.
all: All status.
Default value: all.
type- (Optional) The snapshot category. Optional values:auto: Auto snapshots.
user: Manual snapshots.
all: Auto and manual snapshots.
Default value: all.
source_disk_type- (Optional) The type of source disk:System: The snapshots are created for system disks.
Data: The snapshots are created for data disks.
usage- (Optional) The usage of the snapshot:image: The snapshots are used to create custom images.
disk: The snapshots are used to CreateDisk.
mage_disk: The snapshots are used to create custom images and data disks.
none: The snapshots are not used yet.
tags- (Optional) A map of tags assigned to snapshots.output_file- (Optional) The name of output file that saves the filter results.
- Parameters
encrypted (bool) – Whether the snapshot is encrypted or not.
ids (list) – A list of snapshot IDs.
source_disk_type (str) – Source disk attribute. Value range:
* System * Data
- Parameters
status (str) – The snapshot status. Value range:
* progressing * accomplished * failed
- Parameters
tags (dict) – A map of tags assigned to the snapshot.
usage (str) – Whether the snapshots are used to create resources or not. Value range:
* image * disk * image_disk * none