DATASOURCE::ENS::Instance is used to query the information about an Edge Node Service (ENS) instance.
Syntax
{
"Type": "DATASOURCE::ENS::Instance",
"Properties": {
"InstanceId": String,
"RefreshOptions": String
}
}Properties
Property | Type | Required | Editable | Description | Constraint |
InstanceId | String | Yes | Yes | The ID of the instance. | None. |
RefreshOptions | String | No | Yes | The refresh policy for data source resources when the stack is updated. | Valid values:
|
Return values
Fn::GetAtt
PrivateIpAddress: the private network information about the instance.
InstanceId: the ID of the instance.
VSwitchId: the ID of the vSwitch.
NetworkId: the ID of the network.
SystemDisk: the disk information.
InstanceName: the name of the instance.
DataDisk: the data disk information.
InternetMaxBandwidthOut: the maximum upstream bandwidth. Unit: Mbit/s.
ImageId: the ID of the image.
SecurityId: the ID of the security group.
PaymentType: the billing method.
EnsRegionId: the region ID of the instance.
InstanceType: the instance type.
HostName: the hostname of the instance.
Examples
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
InstanceId:
Type: String
Description:
en: The ID of the instance.
Required: true
Resources:
ExtensionDataSource:
Type: DATASOURCE::ENS::Instance
Properties:
InstanceId:
Ref: InstanceId
Outputs:
PrivateIpAddress:
Description: The private IP address. Can only be used for node-level scheduling. If a private IP address is specified, the number of instances can only be one, and both the private IP address and the vSwitch ID are not empty, the private IP address takes effect.
Value:
Fn::GetAtt:
- ExtensionDataSource
- PrivateIpAddress
InstanceId:
Description: The ID of the instance.
Value:
Fn::GetAtt:
- ExtensionDataSource
- InstanceId
VSwitchId:
Description: The ID of the vSwitch to which the instance belongs.
Value:
Fn::GetAtt:
- ExtensionDataSource
- VSwitchId
NetworkId:
Description: The ID of the network.
Value:
Fn::GetAtt:
- ExtensionDataSource
- NetworkId
SystemDisk:
Description: System Disk Specification. SystemDisk is a non-required parameter when InstanceType is x86_pm,x86_bmi,x86_bm,pc_bmi, or arm_bmi. SystemDisk is a required parameter when instanceType is other specification families.
Value:
Fn::GetAtt:
- ExtensionDataSource
- SystemDisk
InstanceName:
Description: 'The instance name. Example value: test-InstanceName. It must be 2 to 128 characters in length and must start with an uppercase or lowercase letter or a Chinese character. It cannot start with http:// or https. Can contain Chinese, English, numbers, half-width colons (:), underscores (_), periods (.'
Value:
Fn::GetAtt:
- ExtensionDataSource
- InstanceName
DataDisk:
Description: Data disk specifications.
Value:
Fn::GetAtt:
- ExtensionDataSource
- DataDisk
InternetMaxBandwidthOut:
Description: Maximum public network bandwidth. The field type is Long, and the precision may be lost during serialization/deserialization.
Value:
Fn::GetAtt:
- ExtensionDataSource
- InternetMaxBandwidthOut
ImageId:
Description: The ID of the image.
Value:
Fn::GetAtt:
- ExtensionDataSource
- ImageId
SecurityId:
Description: ID of the security group to which the instance belongs.
Value:
Fn::GetAtt:
- ExtensionDataSource
- SecurityId
PaymentType:
Description: Instance payment method.
Value:
Fn::GetAtt:
- ExtensionDataSource
- PaymentType
EnsRegionId:
Description: The node ID. When ScheduleAreaLevel is Region, EnsRegionId is required. When ScheduleAreaLevel is Big,Middle,Small, EnsRegionId is invalid.
Value:
Fn::GetAtt:
- ExtensionDataSource
- EnsRegionId
InstanceType:
Description: 'The specification of the instance. Example value: ens.sn1.'
Value:
Fn::GetAtt:
- ExtensionDataSource
- InstanceType
HostName:
Description: The hostname of the instance.
Value:
Fn::GetAtt:
- ExtensionDataSource
- HostName
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"InstanceId": {
"Type": "String",
"Description": {
"en": "The ID of the instance."
},
"Required": true
}
},
"Resources": {
"ExtensionDataSource": {
"Type": "DATASOURCE::ENS::Instance",
"Properties": {
"InstanceId": {
"Ref": "InstanceId"
}
}
}
},
"Outputs": {
"PrivateIpAddress": {
"Description": "The private IP address. Can only be used for node-level scheduling. If a private IP address is specified, the number of instances can only be one, and both the private IP address and the vSwitch ID are not empty, the private IP address takes effect.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"PrivateIpAddress"
]
}
},
"InstanceId": {
"Description": "The ID of the instance.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"InstanceId"
]
}
},
"VSwitchId": {
"Description": "The ID of the vSwitch to which the instance belongs.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"VSwitchId"
]
}
},
"NetworkId": {
"Description": "The ID of the network.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"NetworkId"
]
}
},
"SystemDisk": {
"Description": "System Disk Specification. SystemDisk is a non-required parameter when InstanceType is x86_pm,x86_bmi,x86_bm,pc_bmi, or arm_bmi. SystemDisk is a required parameter when instanceType is other specification families.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"SystemDisk"
]
}
},
"InstanceName": {
"Description": "The instance name. Example value: test-InstanceName. It must be 2 to 128 characters in length and must start with an uppercase or lowercase letter or a Chinese character. It cannot start with http:// or https. Can contain Chinese, English, numbers, half-width colons (:), underscores (_), periods (.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"InstanceName"
]
}
},
"DataDisk": {
"Description": "Data disk specifications.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"DataDisk"
]
}
},
"InternetMaxBandwidthOut": {
"Description": "Maximum public network bandwidth. The field type is Long, and the precision may be lost during serialization/deserialization.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"InternetMaxBandwidthOut"
]
}
},
"ImageId": {
"Description": "The ID of the image.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"ImageId"
]
}
},
"SecurityId": {
"Description": "ID of the security group to which the instance belongs.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"SecurityId"
]
}
},
"PaymentType": {
"Description": "Instance payment method.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"PaymentType"
]
}
},
"EnsRegionId": {
"Description": "The node ID. When ScheduleAreaLevel is Region, EnsRegionId is required. When ScheduleAreaLevel is Big,Middle,Small, EnsRegionId is invalid.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"EnsRegionId"
]
}
},
"InstanceType": {
"Description": "The specification of the instance. Example value: ens.sn1.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"InstanceType"
]
}
},
"HostName": {
"Description": "The hostname of the instance.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"HostName"
]
}
}
}
}