资源编排 ALIYUN::VPC::PeeringRouterInterfaceConnection

By | 2021年4月22日

ALIYUN::VPC::PeeringRouterInterfaceConnection类型用于发起路由器接口连接。

语法

{
  "Type": "ALIYUN::VPC::PeeringRouterInterfaceConnection",
  "Properties": {
    "OppositeInterfaceId": String,
    "RouterInterfaceId": String
  }
}

属性

属性名称 类型 必须 允许更新 描述 约束
OppositeInterfaceId String 接收端路由器接口的ID。
RouterInterfaceId String 发起端路由器接口的ID。

返回值

Fn::GetAtt

  • OppositeInterfaceId:接收端路由器接口的ID。
  • RouterInterfaceId:发起端路由器接口的ID。

示例

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "OppositeInterfaceId": {
      "Type": "String",
      "Description": "The Receiver RouterInterface ID to accept peer RouterInterface."
    },
    "RouterInterfaceId": {
      "Type": "String",
      "Description": "The Initiator RouterInterface ID to connect peer RouterInterface."
    }
  },
  "Resources": {
    "RouterInterfaceConnection": {
      "Type": "ALIYUN::VPC::PeeringRouterInterfaceConnection",
      "Properties": {
        "OppositeInterfaceId": {
          "Ref": "OppositeInterfaceId"
        },
        "RouterInterfaceId": {
          "Ref": "RouterInterfaceId"
        }
      }
    }
  },
  "Outputs": {
    "OppositeInterfaceId": {
      "Description": "The receiver RouterInterface ID.",
      "Value": {
        "Fn::GetAtt": [
          "RouterInterfaceConnection",
          "OppositeInterfaceId"
        ]
      }
    },
    "RouterInterfaceId": {
      "Description": "The initiator RouterInterface ID.",
      "Value": {
        "Fn::GetAtt": [
          "RouterInterfaceConnection",
          "RouterInterfaceId"
        ]
      }
    }
  }
}

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  OppositeInterfaceId:
    Type: String
    Description: The Receiver RouterInterface ID to accept peer RouterInterface.
  RouterInterfaceId:
    Type: String
    Description: The Initiator RouterInterface ID to connect peer RouterInterface.
Resources:
  RouterInterfaceConnection:
    Type: 'ALIYUN::VPC::PeeringRouterInterfaceConnection'
    Properties:
      OppositeInterfaceId:
        Ref: OppositeInterfaceId
      RouterInterfaceId:
        Ref: RouterInterfaceId
Outputs:
  OppositeInterfaceId:
    Description: The receiver RouterInterface ID.
    Value:
      'Fn::GetAtt':
        - RouterInterfaceConnection
        - OppositeInterfaceId
  RouterInterfaceId:
    Description: The initiator RouterInterface ID.
    Value:
      'Fn::GetAtt':
        - RouterInterfaceConnection
        - RouterInterfaceId

请关注公众号获取更多资料

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注