全部产品
Search
文档中心

资源编排:CEN资源

更新时间:Mar 16, 2026

AssociationProperty取值

说明

对应的AssociationPropertyMetadata

ALIYUN::CEN::Instance::CenId

查询当前阿里云账号下的云企业网实例信息。

  • ResourceGroupId:云企业网实例所属的资源组ID。

示例代码

JSON示例:

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "ResourceGroupId": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::ECS::ResourceGroup::ResourceGroupId"
    },
    "CenId": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::CEN::Instance::CenId",
      "AssociationPropertyMetadata": {
        "ResourceGroupId": "${ResourceGroupId}"
      }
    }
  }
}

YAML示例:

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  ResourceGroupId:
    Type: String
    AssociationProperty: ALIYUN::ECS::ResourceGroup::ResourceGroupId
  CenId:
    Type: String
    AssociationProperty: ALIYUN::CEN::Instance::CenId
    AssociationPropertyMetadata:
      ResourceGroupId: ${ResourceGroupId}

ALIYUN::CEN::TransitRouter::TransitRouterId

查询云企业网实例下转发路由器实例的信息。

  • RegionId:地域ID(默认为资源栈所属地域)。

  • CenId:云企业网实例ID。

示例代码

JSON示例:

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "RegionId": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::ECS::RegionId"
    },
    "ResourceGroupId": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::ECS::ResourceGroup::ResourceGroupId"
    },
    "CenId": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::CEN::Instance::CenId",
      "AssociationPropertyMetadata": {
        "ResourceGroupId": "${ResourceGroupId}"
      }
    },
    "TransitRouterId": {
      "Type": "String",
      "AssociationProperty": "ALIYUN::CEN::TransitRouter::TransitRouterId",
      "AssociationPropertyMetadata": {
        "RegionId": "${RegionId}",
        "CenId": "${CenId}"
      }
    }
  }
}

YAML示例:

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  RegionId:
    Type: String
    AssociationProperty: ALIYUN::ECS::RegionId
  ResourceGroupId:
    Type: String
    AssociationProperty: ALIYUN::ECS::ResourceGroup::ResourceGroupId
  CenId:
    Type: String
    AssociationProperty: ALIYUN::CEN::Instance::CenId
    AssociationPropertyMetadata:
      ResourceGroupId: ${ResourceGroupId}
  TransitRouterId:
    Type: String
    AssociationProperty: ALIYUN::CEN::TransitRouter::TransitRouterId
    AssociationPropertyMetadata:
      RegionId: ${RegionId}
      CenId: ${CenId}