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 "github.com/alibabacloud-go/ros-cdk/alicloudroscdkens"
alicloudroscdkens.NewInstance(scope Construct, id *string, props InstanceProps, enableResourcePropertyConstraint *bool) Instance
Name Type Description
scope github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.Construct No description.
id *string No description.
props InstanceProps No description.
enableResourcePropertyConstraint *bool No description.

scopeRequired

  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.Construct

idRequired

  • Type: *string

propsRequired


enableResourcePropertyConstraintOptional

  • Type: *bool

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

func ToString() *string

Returns a string representation of this construct.

Synthesize

func Synthesize(session ISynthesisSession)

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: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.ISynthesisSession

The synthesis session.


AddCondition

func AddCondition(condition RosCondition)

conditionRequired

  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.RosCondition

AddCount

func AddCount(count interface{})

countRequired

  • Type: interface{}

AddDependency

func AddDependency(resource Resource)

resourceRequired

  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.Resource

AddResourceDesc

func AddResourceDesc(desc *string)

descRequired

  • Type: *string

ApplyRemovalPolicy

func ApplyRemovalPolicy(policy RemovalPolicy)

policyRequired

  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.RemovalPolicy

FetchCondition

func FetchCondition() RosCondition

FetchDependency

func FetchDependency() *[]*string

FetchResourceDesc

func FetchResourceDesc() *string

GetAtt

func GetAtt(name *string) IResolvable

nameRequired

  • Type: *string

SetMetadata

func SetMetadata(key *string, value interface{})

keyRequired

  • Type: *string

valueRequired

  • Type: interface{}

Static Functions

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

IsConstruct

import "github.com/alibabacloud-go/ros-cdk/alicloudroscdkens"
alicloudroscdkens.Instance_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct.

xRequired

  • Type: interface{}

Properties

Name Type Description
Node github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.ConstructNode The construct tree node associated with this construct.
Env github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.IResourceEnvironment The environment this resource belongs to.
Ref *string No description.
Stack github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.Stack The stack in which this resource is defined.
Resource github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.RosResource No description.
AttrAutoRenew interface{} Attribute AutoRenew: Whether renew the fee automatically?it could be True,FalseDefault value is False.
AttrAutoRenewPeriod interface{} Attribute AutoRenewPeriod: The time period of auto renew.
AttrDataDiskSize interface{} Attribute DataDiskSize: Disk size of the system disk, range from 20 to 500 GB.
AttrEnsRegionId interface{} Attribute EnsRegionId: ENS Region Id.
AttrHostName interface{} Attribute HostName: The hostname of the instance.
AttrImageId interface{} Attribute ImageId: Image ID to create ens instance.
AttrInstanceId interface{} Attribute InstanceId: InstanceId.
AttrInstanceName interface{} Attribute InstanceName: Instance name.
AttrInstanceType interface{} Attribute InstanceType: ENS instance supported instance type, make sure it should be correct.
AttrInternetChargeType interface{} Attribute InternetChargeType: Instance Charge type.it could be 95BandwidthByMonth, PayByBandwidth4thMonth.
AttrIpType interface{} Attribute IpType: ip type, It could be ipv4Andipv6,ipv4,ipv6.default value isi pv4.
AttrKeyPairName interface{} Attribute KeyPairName: SSH key pair name.
AttrPaymentType interface{} Attribute PaymentType: Payment Type.only support value Subscription.
AttrPeriod interface{} Attribute Period: Prepaid time period.
AttrPrivateIpAddress interface{} Attribute PrivateIpAddress: Private IP for the instance created.
AttrPrivateIps interface{} Attribute PrivateIps: Private IP.
AttrPublicIps interface{} Attribute PublicIps: Public IP.
AttrQuantity interface{} Attribute Quantity: number of instances to create.
AttrSystemDiskSize interface{} Attribute SystemDiskSize: Disk size of the system disk.
AttrUniqueSuffix interface{} 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 interface{} Attribute UserData: User data to pass to instance.
AttrVSwitchId interface{} Attribute VSwitchId: The vSwitch Id to create ens instance.
Props InstanceProps No description.

NodeRequired

func Node() ConstructNode
  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.ConstructNode

The construct tree node associated with this construct.


EnvRequired

func Env() IResourceEnvironment
  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.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

func Ref() *string
  • Type: *string

StackRequired

func Stack() Stack
  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.Stack

The stack in which this resource is defined.


ResourceOptional

func Resource() RosResource
  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.RosResource

AttrAutoRenewRequired

func AttrAutoRenew() interface{}
  • Type: interface{}

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


AttrAutoRenewPeriodRequired

func AttrAutoRenewPeriod() interface{}
  • Type: interface{}

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

func AttrDataDiskSize() interface{}
  • Type: interface{}

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

func AttrEnsRegionId() interface{}
  • Type: interface{}

Attribute EnsRegionId: ENS Region Id.


AttrHostNameRequired

func AttrHostName() interface{}
  • Type: interface{}

Attribute HostName: The hostname of the instance.


AttrImageIdRequired

func AttrImageId() interface{}
  • Type: interface{}

Attribute ImageId: Image ID to create ens instance.


AttrInstanceIdRequired

func AttrInstanceId() interface{}
  • Type: interface{}

Attribute InstanceId: InstanceId.


AttrInstanceNameRequired

func AttrInstanceName() interface{}
  • Type: interface{}

Attribute InstanceName: Instance name.


AttrInstanceTypeRequired

func AttrInstanceType() interface{}
  • Type: interface{}

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


AttrInternetChargeTypeRequired

func AttrInternetChargeType() interface{}
  • Type: interface{}

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


AttrIpTypeRequired

func AttrIpType() interface{}
  • Type: interface{}

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


AttrKeyPairNameRequired

func AttrKeyPairName() interface{}
  • Type: interface{}

Attribute KeyPairName: SSH key pair name.


AttrPaymentTypeRequired

func AttrPaymentType() interface{}
  • Type: interface{}

Attribute PaymentType: Payment Type.only support value Subscription.


AttrPeriodRequired

func AttrPeriod() interface{}
  • Type: interface{}

Attribute Period: Prepaid time period.

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


AttrPrivateIpAddressRequired

func AttrPrivateIpAddress() interface{}
  • Type: interface{}

Attribute PrivateIpAddress: Private IP for the instance created.


AttrPrivateIpsRequired

func AttrPrivateIps() interface{}
  • Type: interface{}

Attribute PrivateIps: Private IP.


AttrPublicIpsRequired

func AttrPublicIps() interface{}
  • Type: interface{}

Attribute PublicIps: Public IP.


AttrQuantityRequired

func AttrQuantity() interface{}
  • Type: interface{}

Attribute Quantity: number of instances to create.


AttrSystemDiskSizeRequired

func AttrSystemDiskSize() interface{}
  • Type: interface{}

Attribute SystemDiskSize: Disk size of the system disk.


AttrUniqueSuffixRequired

func AttrUniqueSuffix() interface{}
  • Type: interface{}

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

func AttrUserData() interface{}
  • Type: interface{}

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

func AttrVSwitchId() interface{}
  • Type: interface{}

Attribute VSwitchId: The vSwitch Id to create ens instance.


PropsRequired

func Props() InstanceProps