Show / Hide Table of Contents

Class Instance

Inheritance
System.Object
Resource
CustomResource
Instance
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.AliCloud.Ecs
Assembly: Pulumi.AliCloud.dll
Syntax
public class Instance : CustomResource

Constructors

View Source

Instance(String, InstanceArgs, CustomResourceOptions)

Create a Instance resource with the given unique name, arguments, and options.

Declaration
public Instance(string name, InstanceArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

InstanceArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

AllocatePublicIp

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.

Declaration
public Output<bool?> AllocatePublicIp { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

AutoReleaseTime

The automatic release time of the PostPaid instance. 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.

Declaration
public Output<string> AutoReleaseTime { get; }
Property Value
Type Description
Output<System.String>
View Source

AutoRenewPeriod

Auto renewal period of an instance, in the unit of month. It is valid when instance_charge_type is PrePaid. Default to 1. Valid value:

  • [1, 2, 3, 6, 12] when period_unit in "Month"
  • [1, 2, 3] when period_unit in "Week"
Declaration
public Output<int?> AutoRenewPeriod { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

AvailabilityZone

The Zone to start the instance in. It is ignored and will be computed when set vswitch_id.

Declaration
public Output<string> AvailabilityZone { get; }
Property Value
Type Description
Output<System.String>
View Source

CreditSpecification

Performance mode of the t5 burstable instance. Valid values: 'Standard', 'Unlimited'.

Declaration
public Output<string> CreditSpecification { get; }
Property Value
Type Description
Output<System.String>
View Source

DataDisks

The list of data disks created with instance.

Declaration
public Output<ImmutableArray<InstanceDataDisk>> DataDisks { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<InstanceDataDisk>>
View Source

DeletionProtection

Whether enable the deletion protection or not.

  • true: Enable deletion protection.
  • false: Disable deletion protection.
Declaration
public Output<bool?> DeletionProtection { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

Description

The description of the data disk.

Declaration
public Output<string> Description { get; }
Property Value
Type Description
Output<System.String>
View Source

DryRun

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.
Declaration
public Output<bool?> DryRun { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

ForceDelete

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".

Declaration
public Output<bool?> ForceDelete { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

HostName

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.

Declaration
public Output<string> HostName { get; }
Property Value
Type Description
Output<System.String>
View Source

ImageId

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.

Declaration
public Output<string> ImageId { get; }
Property Value
Type Description
Output<System.String>
View Source

IncludeDataDisks

Whether to change instance disks charge type when changing instance charge type.

Declaration
public Output<bool?> IncludeDataDisks { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

InstanceChargeType

Valid values are PrePaid, PostPaid, The default is PostPaid.

Declaration
public Output<string> InstanceChargeType { get; }
Property Value
Type Description
Output<System.String>
View Source

InstanceName

Declaration
public Output<string> InstanceName { get; }
Property Value
Type Description
Output<System.String>
View Source

InstanceType

The type of instance to start. When it is changed, the instance will reboot to make the change take effect.

Declaration
public Output<string> InstanceType { get; }
Property Value
Type Description
Output<System.String>
View Source

InternetChargeType

Internet charge type of the instance, Valid values are PayByBandwidth, PayByTraffic. Default is PayByTraffic. At present, 'PrePaid' instance cannot change the value to "PayByBandwidth" from "PayByTraffic".

Declaration
public Output<string> InternetChargeType { get; }
Property Value
Type Description
Output<System.String>
View Source

InternetMaxBandwidthIn

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.

Declaration
public Output<int> InternetMaxBandwidthIn { get; }
Property Value
Type Description
Output<System.Int32>
View Source

InternetMaxBandwidthOut

Maximum outgoing bandwidth to the public network, measured in Mbps (Mega bit per second). Value range: [0, 100]. Default to 0 Mbps.

Declaration
public Output<int?> InternetMaxBandwidthOut { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

IoOptimized

It has been deprecated on instance resource. All the launched alicloud instances will be I/O optimized.

Declaration
public Output<string> IoOptimized { get; }
Property Value
Type Description
Output<System.String>
View Source

IsOutdated

Whether to use outdated instance type. Default to false.

Declaration
public Output<bool?> IsOutdated { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

KeyName

The name of key pair that can login ECS instance successfully without password. If it is specified, the password would be invalid.

Declaration
public Output<string> KeyName { get; }
Property Value
Type Description
Output<System.String>
View Source

KmsEncryptedPassword

An KMS encrypts password used to an instance. If the password is filled in, this field will be ignored. When it is changed, the instance will reboot to make the change take effect.

Declaration
public Output<string> KmsEncryptedPassword { get; }
Property Value
Type Description
Output<System.String>
View Source

KmsEncryptionContext

An KMS encryption context used to decrypt kms_encrypted_password before creating or updating an instance with kms_encrypted_password. See Encryption Context. It is valid when kms_encrypted_password is set. When it is changed, the instance will reboot to make the change take effect.

Declaration
public Output<ImmutableDictionary<string, object>> KmsEncryptionContext { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>>
View Source

Password

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.

Declaration
public Output<string> Password { get; }
Property Value
Type Description
Output<System.String>
View Source

Period

The duration that you will buy the resource, in month. It is valid when instance_charge_type is PrePaid. Default to 1. Valid values:

  • [1-9, 12, 24, 36, 48, 60] when period_unit in "Month"
  • [1-3] when period_unit in "Week"
Declaration
public Output<int?> Period { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

PeriodUnit

The duration unit that you will buy the resource. It is valid when instance_charge_type is 'PrePaid'. Valid value: ["Week", "Month"]. Default to "Month".

Declaration
public Output<string> PeriodUnit { get; }
Property Value
Type Description
Output<System.String>
View Source

PrivateIp

Instance private IP address can be specified when you creating new instance. It is valid when vswitch_id is specified. When it is changed, the instance will reboot to make the change take effect.

Declaration
public Output<string> PrivateIp { get; }
Property Value
Type Description
Output<System.String>
View Source

PublicIp

The instance public ip.

Declaration
public Output<string> PublicIp { get; }
Property Value
Type Description
Output<System.String>
View Source

RenewalStatus

Whether to renew an ECS instance automatically or not. It is valid when instance_charge_type is PrePaid. 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.
Declaration
public Output<string> RenewalStatus { get; }
Property Value
Type Description
Output<System.String>
View Source

ResourceGroupId

The Id of resource group which the instance belongs.

Declaration
public Output<string> ResourceGroupId { get; }
Property Value
Type Description
Output<System.String>
View Source

RoleName

Instance RAM role name. The name is provided and maintained by RAM. You can use alicloud.ram.Role to create a new one.

Declaration
public Output<string> RoleName { get; }
Property Value
Type Description
Output<System.String>
View Source

SecurityEnhancementStrategy

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.
Declaration
public Output<string> SecurityEnhancementStrategy { get; }
Property Value
Type Description
Output<System.String>
View Source

SecurityGroups

A list of security group ids to associate with.

Declaration
public Output<ImmutableArray<string>> SecurityGroups { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

SpotPriceLimit

The hourly price threshold of a instance, and it takes effect only when parameter 'spot_strategy' is 'SpotWithPriceLimit'. Three decimals is allowed at most.

Declaration
public Output<double?> SpotPriceLimit { get; }
Property Value
Type Description
Output<System.Nullable<System.Double>>
View Source

SpotStrategy

The spot strategy of a Pay-As-You-Go instance, and it takes effect only when parameter instance_charge_type is '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
Declaration
public Output<string> SpotStrategy { get; }
Property Value
Type Description
Output<System.String>
View Source

Status

The instance status.

Declaration
public Output<string> Status { get; }
Property Value
Type Description
Output<System.String>
View Source

SubnetId

Declaration
public Output<string> SubnetId { get; }
Property Value
Type Description
Output<System.String>
View Source

SystemDiskAutoSnapshotPolicyId

The ID of the automatic snapshot policy applied to the system disk.

Declaration
public Output<string> SystemDiskAutoSnapshotPolicyId { get; }
Property Value
Type Description
Output<System.String>
View Source

SystemDiskCategory

Valid values are ephemeral_ssd, cloud_efficiency, cloud_ssd, cloud_essd, cloud. cloud only is used to some none I/O optimized instance. Default to cloud_efficiency.

Declaration
public Output<string> SystemDiskCategory { get; }
Property Value
Type Description
Output<System.String>
View Source

SystemDiskSize

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}. ECS instance's system disk can be reset when replacing system disk. When it is changed, the instance will reboot to make the change take effect.

Declaration
public Output<int?> SystemDiskSize { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

Tags

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.
Declaration
public Output<ImmutableDictionary<string, string>> Tags { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.String>>
View Source

UserData

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.

Declaration
public Output<string> UserData { get; }
Property Value
Type Description
Output<System.String>
View Source

VolumeTags

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.
Declaration
public Output<ImmutableDictionary<string, object>> VolumeTags { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>>
View Source

VswitchId

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.

Declaration
public Output<string> VswitchId { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, InstanceState, CustomResourceOptions)

Get an existing Instance resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static Instance Get(string name, Input<string> id, InstanceState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

InstanceState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
Instance
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.