Skip to content

RosInstance

This class is a base encapsulation around the ROS resource type ALIYUN::ECS::Instance, which is used to create an Elastic Compute Service (ECS) instance.

Initializers

using AlibabaCloud.SDK.ROS.CDK.Ecs;
new RosInstance(Construct Scope, string Id, RosInstanceProps Props, bool EnableResourcePropertyConstraint);
Name Type Description
Scope AlibabaCloud.SDK.ROS.CDK.Core.Construct - scope in which this resource is defined.
Id string - scoped id of the resource.
Props RosInstanceProps - resource properties.
EnableResourcePropertyConstraint bool No description.

ScopeRequired

  • Type: AlibabaCloud.SDK.ROS.CDK.Core.Construct

scope in which this resource is defined.


IdRequired

  • Type: string

scoped id of the resource.


PropsRequired

resource properties.


EnableResourcePropertyConstraintRequired

  • 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.
OverrideLogicalId Overrides the auto-generated logical ID with a specific ID.
AddCondition No description.
AddCount No description.
AddDeletionOverride Syntactic sugar for addOverride(path, undefined).
AddDependsOn Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
AddDesc No description.
AddMetaData No description.
AddOverride Adds an override to the synthesized ROS resource.
AddPropertyDeletionOverride Adds an override that deletes the value of a property from the resource definition.
AddPropertyOverride Adds an override to a resource property.
AddRosDependency No description.
ApplyRemovalPolicy Sets the deletion policy of the resource based on the removal policy specified.
GetAtt Returns a token for an runtime attribute of this resource.

ToString

private string ToString()

Returns a string representation of this construct.

Synthesize

private void Synthesize(ISynthesisSession Session)

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: AlibabaCloud.SDK.ROS.CDK.Core.ISynthesisSession

The synthesis session.


OverrideLogicalId

private void OverrideLogicalId(string NewLogicalId)

Overrides the auto-generated logical ID with a specific ID.

NewLogicalIdRequired

  • Type: string

The new logical ID to use for this stack element.


AddCondition

private void AddCondition(RosCondition Con)

ConRequired

  • Type: AlibabaCloud.SDK.ROS.CDK.Core.RosCondition

AddCount

private void AddCount(object Count)

CountRequired

  • Type: object

AddDeletionOverride

private void AddDeletionOverride(string Path)

Syntactic sugar for addOverride(path, undefined).

PathRequired

  • Type: string

The path of the value to delete.


AddDependsOn

private void AddDependsOn(RosResource Target)

Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

TargetRequired

  • Type: AlibabaCloud.SDK.ROS.CDK.Core.RosResource

AddDesc

private void AddDesc(string Desc)

DescRequired

  • Type: string

AddMetaData

private void AddMetaData(string Key, object Value)

KeyRequired

  • Type: string

ValueRequired

  • Type: object

AddOverride

private void AddOverride(string Path, object Value)

Adds an override to the synthesized ROS resource.

To add a property override, either use addPropertyOverride or prefix path with "Properties." (i.e. Properties.TopicName).

If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.

For example,

addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute'])
addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE')

would add the overrides

"Properties": {
   "GlobalSecondaryIndexes": [
     {
       "Projection": {
         "NonKeyAttributes": [ "myattribute" ]
         ...
       }
       ...
     },
     {
       "ProjectionType": "INCLUDE"
       ...
     },
   ]
   ...
}

PathRequired

  • Type: string

The path of the property, you can use dot notation to override values in complex types.

Any intermdediate keys will be created as needed.


ValueRequired

  • Type: object

The value.

Could be primitive or complex.


AddPropertyDeletionOverride

private void AddPropertyDeletionOverride(string PropertyPath)

Adds an override that deletes the value of a property from the resource definition.

PropertyPathRequired

  • Type: string

The path to the property.


AddPropertyOverride

private void AddPropertyOverride(string PropertyPath, object Value)

Adds an override to a resource property.

Syntactic sugar for addOverride("Properties.<...>", value).

PropertyPathRequired

  • Type: string

The path of the property.


ValueRequired

  • Type: object

The value.


AddRosDependency

private void AddRosDependency(string Target)

TargetRequired

  • Type: string

ApplyRemovalPolicy

private void ApplyRemovalPolicy(RemovalPolicy Policy = null, RemovalPolicyOptions Options = null)

Sets the deletion policy of the resource based on the removal policy specified.

PolicyOptional

  • Type: AlibabaCloud.SDK.ROS.CDK.Core.RemovalPolicy

OptionsOptional

  • Type: AlibabaCloud.SDK.ROS.CDK.Core.RemovalPolicyOptions

GetAtt

private Reference GetAtt(string AttributeName)

Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.

AttributeNameRequired

  • Type: string

The name of the attribute.


Static Functions

Name Description
IsConstruct Return whether the given object is a Construct.
IsRosElement Returns true if a construct is a stack element (i.e. part of the synthesized template).
IsRosResource Check whether the given construct is a RosResource.

IsConstruct

using AlibabaCloud.SDK.ROS.CDK.Ecs;
RosInstance.IsConstruct(object X);

Return whether the given object is a Construct.

XRequired

  • Type: object

IsRosElement

using AlibabaCloud.SDK.ROS.CDK.Ecs;
RosInstance.IsRosElement(object X);

Returns true if a construct is a stack element (i.e. part of the synthesized template).

Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.

XRequired

  • Type: object

IsRosResource

using AlibabaCloud.SDK.ROS.CDK.Ecs;
RosInstance.IsRosResource(IConstruct Construct);

Check whether the given construct is a RosResource.

ConstructRequired

  • Type: AlibabaCloud.SDK.ROS.CDK.Core.IConstruct

Properties

Name Type Description
Node AlibabaCloud.SDK.ROS.CDK.Core.ConstructNode The construct tree node associated with this construct.
CreationStack string[] No description.
LogicalId string The logical ID for this stack element.
Stack AlibabaCloud.SDK.ROS.CDK.Core.Stack The stack in which this element is defined.
Ref string Return a string that will be resolved to a RosTemplate { Ref } for this element.
RosOptions AlibabaCloud.SDK.ROS.CDK.Core.IRosResourceOptions Options for this resource, such as condition, update policy etc.
RosResourceType string ROS resource type.
AttrHostName AlibabaCloud.SDK.ROS.CDK.Core.IResolvable No description.
AttrInnerIp AlibabaCloud.SDK.ROS.CDK.Core.IResolvable No description.
AttrInstanceId AlibabaCloud.SDK.ROS.CDK.Core.IResolvable No description.
AttrPrimaryNetworkInterfaceId AlibabaCloud.SDK.ROS.CDK.Core.IResolvable No description.
AttrPrivateIp AlibabaCloud.SDK.ROS.CDK.Core.IResolvable No description.
AttrPublicIp AlibabaCloud.SDK.ROS.CDK.Core.IResolvable No description.
AttrSecurityGroupIds AlibabaCloud.SDK.ROS.CDK.Core.IResolvable No description.
AttrZoneId AlibabaCloud.SDK.ROS.CDK.Core.IResolvable No description.
EnableResourcePropertyConstraint bool No description.
InstanceType object No description.
Affinity object No description.
AllocatePublicIp object No description.
AutoRenew object No description.
AutoRenewPeriod object No description.
CreditSpecification object No description.
DedicatedHostId object No description.
DeletionProtection object No description.
DeploymentSetGroupNo object No description.
DeploymentSetId object No description.
Description object No description.
DiskMappings object No description.
HostName object No description.
HpcClusterId object No description.
HttpEndpoint object No description.
HttpTokens object No description.
ImageFamily object No description.
ImageId object No description.
InstanceChargeType object No description.
InstanceName object No description.
InternetChargeType object No description.
InternetMaxBandwidthOut object No description.
IoOptimized object No description.
KeyPairName object No description.
Password object No description.
PasswordInherit object No description.
Period object No description.
PeriodUnit object No description.
PrivateIpAddress object No description.
PrivatePoolOptions object No description.
RamRoleName object No description.
ResourceGroupId object No description.
SecurityEnhancementStrategy object No description.
SecurityGroupId object No description.
SecurityGroupIds object No description.
SpotDuration object No description.
SpotInterruptionBehavior object No description.
SpotPriceLimit object No description.
SpotStrategy object No description.
StorageSetId object No description.
StorageSetPartitionNumber object No description.
SystemDiskCategory object No description.
SystemDiskDescription object No description.
SystemDiskDiskName object No description.
SystemDiskPerformanceLevel object No description.
SystemDiskSize object No description.
Tags TagsProperty[] No description.
Tenancy object No description.
UseAdditionalService object No description.
UserData object No description.
VpcId object No description.
VSwitchId object No description.
ZoneId object No description.
ZoneIds object No description.

NodeRequired

public ConstructNode Node { get; }
  • Type: AlibabaCloud.SDK.ROS.CDK.Core.ConstructNode

The construct tree node associated with this construct.


CreationStackRequired

public string[] CreationStack { get; }
  • Type: string[]

LogicalIdRequired

public string LogicalId { get; }
  • Type: string

The logical ID for this stack element.

The logical ID of the element is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).


StackRequired

public Stack Stack { get; }
  • Type: AlibabaCloud.SDK.ROS.CDK.Core.Stack

The stack in which this element is defined.

RosElements must be defined within a stack scope (directly or indirectly).


RefRequired

public string Ref { get; }
  • Type: string

Return a string that will be resolved to a RosTemplate { Ref } for this element.

If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).


RosOptionsRequired

public IRosResourceOptions RosOptions { get; }
  • Type: AlibabaCloud.SDK.ROS.CDK.Core.IRosResourceOptions

Options for this resource, such as condition, update policy etc.


RosResourceTypeRequired

public string RosResourceType { get; }
  • Type: string

ROS resource type.


AttrHostNameRequired

public IResolvable AttrHostName { get; }
  • Type: AlibabaCloud.SDK.ROS.CDK.Core.IResolvable

AttrInnerIpRequired

public IResolvable AttrInnerIp { get; }
  • Type: AlibabaCloud.SDK.ROS.CDK.Core.IResolvable

AttrInstanceIdRequired

public IResolvable AttrInstanceId { get; }
  • Type: AlibabaCloud.SDK.ROS.CDK.Core.IResolvable

AttrPrimaryNetworkInterfaceIdRequired

public IResolvable AttrPrimaryNetworkInterfaceId { get; }
  • Type: AlibabaCloud.SDK.ROS.CDK.Core.IResolvable

AttrPrivateIpRequired

public IResolvable AttrPrivateIp { get; }
  • Type: AlibabaCloud.SDK.ROS.CDK.Core.IResolvable

AttrPublicIpRequired

public IResolvable AttrPublicIp { get; }
  • Type: AlibabaCloud.SDK.ROS.CDK.Core.IResolvable

AttrSecurityGroupIdsRequired

public IResolvable AttrSecurityGroupIds { get; }
  • Type: AlibabaCloud.SDK.ROS.CDK.Core.IResolvable

AttrZoneIdRequired

public IResolvable AttrZoneId { get; }
  • Type: AlibabaCloud.SDK.ROS.CDK.Core.IResolvable

EnableResourcePropertyConstraintRequired

public bool EnableResourcePropertyConstraint { get; }
  • Type: bool

InstanceTypeRequired

public object InstanceType { get; }
  • Type: object

AffinityOptional

public object Affinity { get; }
  • Type: object

AllocatePublicIpOptional

public object AllocatePublicIp { get; }
  • Type: object

AutoRenewOptional

public object AutoRenew { get; }
  • Type: object

AutoRenewPeriodOptional

public object AutoRenewPeriod { get; }
  • Type: object

CreditSpecificationOptional

public object CreditSpecification { get; }
  • Type: object

DedicatedHostIdOptional

public object DedicatedHostId { get; }
  • Type: object

DeletionProtectionOptional

public object DeletionProtection { get; }
  • Type: object

DeploymentSetGroupNoOptional

public object DeploymentSetGroupNo { get; }
  • Type: object

DeploymentSetIdOptional

public object DeploymentSetId { get; }
  • Type: object

DescriptionOptional

public object Description { get; }
  • Type: object

DiskMappingsOptional

public object DiskMappings { get; }
  • Type: object

HostNameOptional

public object HostName { get; }
  • Type: object

HpcClusterIdOptional

public object HpcClusterId { get; }
  • Type: object

HttpEndpointOptional

public object HttpEndpoint { get; }
  • Type: object

HttpTokensOptional

public object HttpTokens { get; }
  • Type: object

ImageFamilyOptional

public object ImageFamily { get; }
  • Type: object

ImageIdOptional

public object ImageId { get; }
  • Type: object

InstanceChargeTypeOptional

public object InstanceChargeType { get; }
  • Type: object

InstanceNameOptional

public object InstanceName { get; }
  • Type: object

InternetChargeTypeOptional

public object InternetChargeType { get; }
  • Type: object

InternetMaxBandwidthOutOptional

public object InternetMaxBandwidthOut { get; }
  • Type: object

IoOptimizedOptional

public object IoOptimized { get; }
  • Type: object

KeyPairNameOptional

public object KeyPairName { get; }
  • Type: object

PasswordOptional

public object Password { get; }
  • Type: object

PasswordInheritOptional

public object PasswordInherit { get; }
  • Type: object

PeriodOptional

public object Period { get; }
  • Type: object

PeriodUnitOptional

public object PeriodUnit { get; }
  • Type: object

PrivateIpAddressOptional

public object PrivateIpAddress { get; }
  • Type: object

PrivatePoolOptionsOptional

public object PrivatePoolOptions { get; }
  • Type: object

RamRoleNameOptional

public object RamRoleName { get; }
  • Type: object

ResourceGroupIdOptional

public object ResourceGroupId { get; }
  • Type: object

SecurityEnhancementStrategyOptional

public object SecurityEnhancementStrategy { get; }
  • Type: object

SecurityGroupIdOptional

public object SecurityGroupId { get; }
  • Type: object

SecurityGroupIdsOptional

public object SecurityGroupIds { get; }
  • Type: object

SpotDurationOptional

public object SpotDuration { get; }
  • Type: object

SpotInterruptionBehaviorOptional

public object SpotInterruptionBehavior { get; }
  • Type: object

SpotPriceLimitOptional

public object SpotPriceLimit { get; }
  • Type: object

SpotStrategyOptional

public object SpotStrategy { get; }
  • Type: object

StorageSetIdOptional

public object StorageSetId { get; }
  • Type: object

StorageSetPartitionNumberOptional

public object StorageSetPartitionNumber { get; }
  • Type: object

SystemDiskCategoryOptional

public object SystemDiskCategory { get; }
  • Type: object

SystemDiskDescriptionOptional

public object SystemDiskDescription { get; }
  • Type: object

SystemDiskDiskNameOptional

public object SystemDiskDiskName { get; }
  • Type: object

SystemDiskPerformanceLevelOptional

public object SystemDiskPerformanceLevel { get; }
  • Type: object

SystemDiskSizeOptional

public object SystemDiskSize { get; }
  • Type: object

TagsOptional

public TagsProperty[] Tags { get; }

TenancyOptional

public object Tenancy { get; }
  • Type: object

UseAdditionalServiceOptional

public object UseAdditionalService { get; }
  • Type: object

UserDataOptional

public object UserData { get; }
  • Type: object

VpcIdOptional

public object VpcId { get; }
  • Type: object

VSwitchIdOptional

public object VSwitchId { get; }
  • Type: object

ZoneIdOptional

public object ZoneId { get; }
  • Type: object

ZoneIdsOptional

public object ZoneIds { get; }
  • Type: object

Constants

Name Type Description
RosResourceTypeName string The resource type name for this resource class.

RosResourceTypeNameRequired

public string RosResourceTypeName { get; }
  • Type: string

The resource type name for this resource class.