ALIYUN::CEN::CenRouteService类型用于设置访问云服务。

关于云服务的更多信息,请参见使用说明

语法

{
  "Type": "ALIYUN::CEN::CenRouteService",
  "Properties": {
    "Description": String,
    "HostRegionId": String,
    "CenId": String,
    "AccessRegionId": String,
    "Host": String,
    "HostVpcId": String
  }
}

属性

属性名称 类型 必须 允许更新 描述 约束
Description String 云服务的描述信息。 长度为2~256个字符,必须以汉字或者英文字母开头,不能以http://https://开头。可包含汉字、英文字母、数字、短划线(-)、半角句号(.)和下划线(_)。
HostRegionId String 云服务所在的地域ID。
CenId String 云企业网实例ID。 您可以通过调用CreateCen获取云企业网实例ID。
AccessRegionId String 访问云服务的地域ID。 您可以通过调用DescribeChildInstanceRegions查询地域ID。
Host String 云服务IP地址或地址段。

通常云服务会使用多个地址或地址段,建议您重复调用本接口,添加该云服务所有地址或地址段。

HostVpcId String 云服务关联的VPC实例ID。

返回值

Fn::GetAtt

Id:云服务的ID。格式为{CenId}/{HostRegionId}/{Host}/{AccessRegionId}

示例

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "HostRegionId": {
      "Type": "String",
      "Description": "The region where the cloud service is deployed.\nYou can call the DescribeRegions operation to query region IDs.\nNote The HostRegionId and AccessRegionIds.N must be set to the same value.",
      "Default": "cn-hangzhou"
    },
    "CenId": {
      "Type": "String",
      "Description": "The ID of the Cloud Enterprise Network (CEN) instance.",
      "Default": "cen-2****"
    },
    "AccessRegionId": {
      "Type": "String",
      "Description": "The region where the cloud service is deployed.",
      "Default": "cn-hangzhou"
    },
    "Host": {
      "Type": "String",
      "Description": "The domain or IP address of the cloud service.",
      "Default": "100.118.28.0/24"
    },
    "HostVpcId": {
      "Type": "String",
      "Description": "The virtual private cloud (VPC) that is associated with the cloud service.",
      "Default": "vpc-2****"
    }
  },
  "Resources": {
    "CenRouteService": {
      "Type": "ALIYUN::CEN::CenRouteService",
      "Properties": {
        "Description": {
          "Ref": "Description"
        },
        "HostRegionId": {
          "Ref": "HostRegionId"
        },
        "CenId": {
          "Ref": "CenId"
        },
        "AccessRegionId": {
          "Ref": "AccessRegionId"
        },
        "Host": {
          "Ref": "Host"
        },
        "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"
        ]
      }
    }
  }
}