ALIYUN::CEN::TransitRouterCidr

更新时间:
复制 MD 格式

The ALIYUN::CEN::TransitRouterCidr resource creates a CIDR block for a transit router.

Syntax

{
  "Type": "ALIYUN::CEN::TransitRouterCidr",
  "Properties": {
    "Cidr": String,
    "TransitRouterId": String,
    "Description": String,
    "PublishCidrRoute": Boolean,
    "TransitRouterCidrName": String
  }
}

Properties

Parameter

Type

Required

Update allowed

Description

Constraints

Cidr

String

Yes

Yes

The CIDR block of the transit router.

None

TransitRouterId

String

Yes

No

The ID of the transit router.

None

Description

String

No

Yes

The description of the CIDR block.

The description must be 1 to 256 characters long and cannot start with http:// or https://.

PublishCidrRoute

Boolean

No

Yes

Specifies whether to automatically add a route for this CIDR block to the transit router's route table.

If set to true, after you create a VPN connection on a private VPN gateway and enable route learning for it, the system automatically adds a blackhole route to the route table of the transit router that learns routes from the VPN connection. The destination of the blackhole route is this CIDR block. This route is advertised only to the route tables of virtual border routers (VBRs) that are connected to the transit router.

TransitRouterCidrName

String

No

Yes

The name of the CIDR block.

The name must be 1 to 128 characters long and cannot start with http:// or https://.

Return values

Fn::GetAtt

  • TransitRouterCidrName: The name of the CIDR block.

  • Description: The description of the CIDR block.

  • Cidr: The CIDR block.

  • TransitRouterCidrId: The ID of the CIDR block.

  • Family: The type of the CIDR block.

  • PublishCidrRoute: Indicates whether a route for the CIDR block is automatically added to the transit router's route table.

  • TransitRouterId: The ID of the transit router.

Examples

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  Cidr:
    Type: String
    Description: The CIDR block of the transit router.
    Required: true
  TransitRouterId:
    Type: String
    Description: The ID of the transit router.
    Required: true
Resources:
  ExtensionResource:
    Type: ALIYUN::CEN::TransitRouterCidr
    Properties:
      Cidr:
        Ref: Cidr
      TransitRouterId:
        Ref: TransitRouterId
Outputs:
  TransitRouterCidrName:
    Description: The name of the CIDR block.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - TransitRouterCidrName
  Description:
    Description: The description of the CIDR block.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Description
  Cidr:
    Description: The CIDR block.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Cidr
  TransitRouterCidrId:
    Description: The ID of the CIDR block.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - TransitRouterCidrId
  Family:
    Description: The type of the CIDR block.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Family
  PublishCidrRoute:
    Description: Indicates whether a route for the CIDR block is automatically added to the transit router's route table.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - PublishCidrRoute
  TransitRouterId:
    Description: The ID of the transit router.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - TransitRouterId
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "Cidr": {
      "Type": "String",
      "Description": "The CIDR block of the transit router.",
      "Required": true
    },
    "TransitRouterId": {
      "Type": "String",
      "Description": "The ID of the transit router.",
      "Required": true
    }
  },
  "Resources": {
    "ExtensionResource": {
      "Type": "ALIYUN::CEN::TransitRouterCidr",
      "Properties": {
        "Cidr": {
          "Ref": "Cidr"
        },
        "TransitRouterId": {
          "Ref": "TransitRouterId"
        }
      }
    }
  },
  "Outputs": {
    "TransitRouterCidrName": {
      "Description": "The name of the CIDR block.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "TransitRouterCidrName"
        ]
      }
    },
    "Description": {
      "Description": "The description of the CIDR block.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Description"
        ]
      }
    },
    "Cidr": {
      "Description": "The CIDR block.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Cidr"
        ]
      }
    },
    "TransitRouterCidrId": {
      "Description": "The ID of the CIDR block.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "TransitRouterCidrId"
        ]
      }
    },
    "Family": {
      "Description": "The type of the CIDR block.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Family"
        ]
      }
    },
    "PublishCidrRoute": {
      "Description": "Indicates whether a route for the CIDR block is automatically added to the transit router's route table.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "PublishCidrRoute"
        ]
      }
    },
    "TransitRouterId": {
      "Description": "The ID of the transit router.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "TransitRouterId"
        ]
      }
    }
  }
}