ALIYUN::CEN::CenRouteService configures access to an Alibaba Cloud service through a Cloud Enterprise Network (CEN) instance.
For more information, see ResolveAndRouteServiceInCen.
Syntax
{
"Type": "ALIYUN::CEN::CenRouteService",
"Properties": {
"Description": String,
"HostRegionId": String,
"CenId": String,
"AccessRegionId": String,
"Host": String,
"HostVpcId": String,
"ConflictIgnore": Boolean
}
}
Properties
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
AccessRegionId |
String |
Yes |
No |
The region ID from which the service is accessed. |
You can call the DescribeChildInstanceRegions operation to query the most recent region list. |
|
CenId |
String |
Yes |
No |
The ID of the Cloud Enterprise Network (CEN) instance. |
You can call the CreateCen operation to query the ID of the CEN instance. |
|
Host |
String |
Yes |
No |
The IP address or CIDR block of the cloud service. |
A cloud service typically uses multiple IP addresses or CIDR blocks. To add all of them, specify Host in separate ALIYUN::CEN::CenRouteService resources. |
|
HostRegionId |
String |
Yes |
No |
The region ID where the cloud service is deployed. |
None. |
|
HostVpcId |
String |
Yes |
No |
The ID of the virtual private cloud (VPC) that is associated with the service. |
None. |
|
ConflictIgnore |
Boolean |
No |
No |
Specifies whether to ignore a conflict when accessing the cloud service from the CEN instance. |
Valid values:
|
|
Description |
String |
No |
No |
The description of the cloud service. |
The description must be 2 to 256 characters in length. It must start with a letter and cannot start with |
Return values
Fn::GetAtt
Id: the ID of the service. The ID is in the {CenId}/{HostRegionId}/{Host}/{AccessRegionId} format.
Examples
Replace the masked property values in the template with actual values based on your requirements.
YAML format
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
CenId:
Type: String
Description: The ID of the Cloud Enterprise Network (CEN) instance.
Default: cen-2****
HostVpcId:
Type: String
AssociationProperty: ALIYUN::ECS::VPC::VPCId
Resources:
CenRouteService:
Type: ALIYUN::CEN::CenRouteService
Properties:
HostRegionId: cn-beijing
CenId:
Ref: CenId
AccessRegionId: cn-hangzhou
Host: 100.118.28.0/24
HostVpcId:
Ref: HostVpcId
Outputs:
Id:
Description: The ID of the cloud service. It is formatted to {CenId}/{HostRegionId}/{Host}/{AccessRegionId}
Value:
Fn::GetAtt:
- CenRouteService
- Id
JSON format
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"CenId": {
"Type": "String",
"Description": "The ID of the Cloud Enterprise Network (CEN) instance.",
"Default": "cen-2****"
},
"HostVpcId": {
"Type": "String",
"AssociationProperty": "ALIYUN::ECS::VPC::VPCId"
}
},
"Resources": {
"CenRouteService": {
"Type": "ALIYUN::CEN::CenRouteService",
"Properties": {
"HostRegionId": "cn-beijing",
"CenId": {
"Ref": "CenId"
},
"AccessRegionId": "cn-hangzhou",
"Host": "100.118.28.0/24",
"HostVpcId": {
"Ref": "HostVpcId"
}
}
}
},
"Outputs": {
"Id": {
"Description": "The ID of the cloud service. It is formatted to {CenId}/{HostRegionId}/{Host}/{AccessRegionId}",
"Value": {
"Fn::GetAtt": [
"CenRouteService",
"Id"
]
}
}
}
}