Skip to content

Instance

This class encapsulates and extends the ROS resource type ALIYUN::ENS::Instance, which is used to create Edge Node Service (ENS) instances.

Initializers

import { Instance } from '@alicloud/ros-cdk-ens'
new Instance(scope: Construct, id: string, props: InstanceProps, enableResourcePropertyConstraint?: boolean)
Name Type Description
scope @alicloud/ros-cdk-core.Construct No description.
id string No description.
props InstanceProps No description.
enableResourcePropertyConstraint boolean No description.

scopeRequired

  • Type: @alicloud/ros-cdk-core.Construct

idRequired

  • Type: string

propsRequired


enableResourcePropertyConstraintOptional

  • Type: boolean

Methods

Name Description
toString Returns a string representation of this construct.
synthesize Allows this construct to emit artifacts into the cloud assembly during synthesis.
addCondition No description.
addCount No description.
addDependency No description.
addResourceDesc No description.
applyRemovalPolicy No description.
fetchCondition No description.
fetchDependency No description.
fetchResourceDesc No description.
getAtt No description.
setMetadata No description.

toString

public toString(): string

Returns a string representation of this construct.

synthesize

public synthesize(session: ISynthesisSession): void

Allows this construct to emit artifacts into the cloud assembly during synthesis.

This method is usually implemented by framework-level constructs such as Stack and Asset as they participate in synthesizing the cloud assembly.

sessionRequired

  • Type: @alicloud/ros-cdk-core.ISynthesisSession

The synthesis session.


addCondition

public addCondition(condition: RosCondition): void

conditionRequired

  • Type: @alicloud/ros-cdk-core.RosCondition

addCount

public addCount(count: number | IResolvable): void

countRequired

  • Type: number | @alicloud/ros-cdk-core.IResolvable

addDependency

public addDependency(resource: Resource): void

resourceRequired

  • Type: @alicloud/ros-cdk-core.Resource

addResourceDesc

public addResourceDesc(desc: string): void

descRequired

  • Type: string

applyRemovalPolicy

public applyRemovalPolicy(policy: RemovalPolicy): void

policyRequired

  • Type: @alicloud/ros-cdk-core.RemovalPolicy

fetchCondition

public fetchCondition(): RosCondition

fetchDependency

public fetchDependency(): string[]

fetchResourceDesc

public fetchResourceDesc(): string

getAtt

public getAtt(name: string): IResolvable

nameRequired

  • Type: string

setMetadata

public setMetadata(key: string, value: any): void

keyRequired

  • Type: string

valueRequired

  • Type: any

Static Functions

Name Description
isConstruct Return whether the given object is a Construct.

isConstruct

import { Instance } from '@alicloud/ros-cdk-ens'
Instance.isConstruct(x: any)

Return whether the given object is a Construct.

xRequired

  • Type: any

Properties

Name Type Description
node @alicloud/ros-cdk-core.ConstructNode The construct tree node associated with this construct.
env @alicloud/ros-cdk-core.IResourceEnvironment The environment this resource belongs to.
ref string No description.
stack @alicloud/ros-cdk-core.Stack The stack in which this resource is defined.
resource @alicloud/ros-cdk-core.RosResource No description.
attrAutoRenew string | @alicloud/ros-cdk-core.IResolvable Attribute AutoRenew: Whether renew the fee automatically?it could be True,FalseDefault value is False.
attrAutoRenewPeriod string | @alicloud/ros-cdk-core.IResolvable Attribute AutoRenewPeriod: The time period of auto renew.
attrDataDiskSize string | @alicloud/ros-cdk-core.IResolvable Attribute DataDiskSize: Disk size of the system disk, range from 20 to 500 GB.
attrEnsRegionId string | @alicloud/ros-cdk-core.IResolvable Attribute EnsRegionId: ENS Region Id.
attrHostName string | @alicloud/ros-cdk-core.IResolvable Attribute HostName: The hostname of the instance.
attrImageId string | @alicloud/ros-cdk-core.IResolvable Attribute ImageId: Image ID to create ens instance.
attrInstanceId string | @alicloud/ros-cdk-core.IResolvable Attribute InstanceId: InstanceId.
attrInstanceName string | @alicloud/ros-cdk-core.IResolvable Attribute InstanceName: Instance name.
attrInstanceType string | @alicloud/ros-cdk-core.IResolvable Attribute InstanceType: ENS instance supported instance type, make sure it should be correct.
attrInternetChargeType string | @alicloud/ros-cdk-core.IResolvable Attribute InternetChargeType: Instance Charge type.it could be 95BandwidthByMonth, PayByBandwidth4thMonth.
attrIpType string | @alicloud/ros-cdk-core.IResolvable Attribute IpType: ip type, It could be ipv4Andipv6,ipv4,ipv6.default value isi pv4.
attrKeyPairName string | @alicloud/ros-cdk-core.IResolvable Attribute KeyPairName: SSH key pair name.
attrPaymentType string | @alicloud/ros-cdk-core.IResolvable Attribute PaymentType: Payment Type.only support value Subscription.
attrPeriod string | @alicloud/ros-cdk-core.IResolvable Attribute Period: Prepaid time period.
attrPrivateIpAddress string | @alicloud/ros-cdk-core.IResolvable Attribute PrivateIpAddress: Private IP for the instance created.
attrPrivateIps string | @alicloud/ros-cdk-core.IResolvable Attribute PrivateIps: Private IP.
attrPublicIps string | @alicloud/ros-cdk-core.IResolvable Attribute PublicIps: Public IP.
attrQuantity string | @alicloud/ros-cdk-core.IResolvable Attribute Quantity: number of instances to create.
attrSystemDiskSize string | @alicloud/ros-cdk-core.IResolvable Attribute SystemDiskSize: Disk size of the system disk.
attrUniqueSuffix string | @alicloud/ros-cdk-core.IResolvable Attribute UniqueSuffix: Specifies whether to automatically append sequential suffixes to the hostnames specified by the HostName parameter and instance names specified by the InstanceName parameter when you create multiple instances at a time.
attrUserData string | @alicloud/ros-cdk-core.IResolvable Attribute UserData: User data to pass to instance.
attrVSwitchId string | @alicloud/ros-cdk-core.IResolvable Attribute VSwitchId: The vSwitch Id to create ens instance.
props InstanceProps No description.

nodeRequired

public readonly node: ConstructNode;
  • Type: @alicloud/ros-cdk-core.ConstructNode

The construct tree node associated with this construct.


envRequired

public readonly env: IResourceEnvironment;
  • Type: @alicloud/ros-cdk-core.IResourceEnvironment

The environment this resource belongs to.

For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.


refRequired

public readonly ref: string;
  • Type: string

stackRequired

public readonly stack: Stack;
  • Type: @alicloud/ros-cdk-core.Stack

The stack in which this resource is defined.


resourceOptional

public readonly resource: RosResource;
  • Type: @alicloud/ros-cdk-core.RosResource

attrAutoRenewRequired

public readonly attrAutoRenew: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Attribute AutoRenew: Whether renew the fee automatically?it could be True,FalseDefault value is False.


attrAutoRenewPeriodRequired

public readonly attrAutoRenewPeriod: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Attribute AutoRenewPeriod: The time period of auto renew.

it will take effect.It could be 1, 2, 3, 6, 12. Default value is 1.


attrDataDiskSizeRequired

public readonly attrDataDiskSize: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Attribute DataDiskSize: Disk size of the system disk, range from 20 to 500 GB.

If you specify with your own image, make sure the system disk size bigger than image size.


attrEnsRegionIdRequired

public readonly attrEnsRegionId: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Attribute EnsRegionId: ENS Region Id.


attrHostNameRequired

public readonly attrHostName: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Attribute HostName: The hostname of the instance.


attrImageIdRequired

public readonly attrImageId: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Attribute ImageId: Image ID to create ens instance.


attrInstanceIdRequired

public readonly attrInstanceId: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Attribute InstanceId: InstanceId.


attrInstanceNameRequired

public readonly attrInstanceName: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Attribute InstanceName: Instance name.


attrInstanceTypeRequired

public readonly attrInstanceType: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Attribute InstanceType: ENS instance supported instance type, make sure it should be correct.


attrInternetChargeTypeRequired

public readonly attrInternetChargeType: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Attribute InternetChargeType: Instance Charge type.it could be 95BandwidthByMonth, PayByBandwidth4thMonth.


attrIpTypeRequired

public readonly attrIpType: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Attribute IpType: ip type, It could be ipv4Andipv6,ipv4,ipv6.default value isi pv4.


attrKeyPairNameRequired

public readonly attrKeyPairName: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Attribute KeyPairName: SSH key pair name.


attrPaymentTypeRequired

public readonly attrPaymentType: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Attribute PaymentType: Payment Type.only support value Subscription.


attrPeriodRequired

public readonly attrPeriod: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Attribute Period: Prepaid time period.

Unit is month, it could be from 1 to 9 or 12. Default value is 1.


attrPrivateIpAddressRequired

public readonly attrPrivateIpAddress: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Attribute PrivateIpAddress: Private IP for the instance created.


attrPrivateIpsRequired

public readonly attrPrivateIps: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Attribute PrivateIps: Private IP.


attrPublicIpsRequired

public readonly attrPublicIps: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Attribute PublicIps: Public IP.


attrQuantityRequired

public readonly attrQuantity: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Attribute Quantity: number of instances to create.


attrSystemDiskSizeRequired

public readonly attrSystemDiskSize: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Attribute SystemDiskSize: Disk size of the system disk.


attrUniqueSuffixRequired

public readonly attrUniqueSuffix: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Attribute UniqueSuffix: Specifies whether to automatically append sequential suffixes to the hostnames specified by the HostName parameter and instance names specified by the InstanceName parameter when you create multiple instances at a time.

The sequential suffix ranges from 001 to 999. Valid values: true false Default value: false.


attrUserDataRequired

public readonly attrUserData: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Attribute UserData: User data to pass to instance.

[1, 16KB] characters.User data should not be base64 encoded. If you want to pass base64 encoded string to the property, use function Fn::Base64Decode to decode the base64 string first.


attrVSwitchIdRequired

public readonly attrVSwitchId: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Attribute VSwitchId: The vSwitch Id to create ens instance.


propsRequired

public readonly props: InstanceProps;