All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::ENS::Network

Last Updated:Apr 10, 2024

ALIYUN::ENS::Network is used to create a virtual private cloud (VPC).

Syntax

{
  "Type": "ALIYUN::ENS::Network",
  "Properties": {
    "NetworkName": String,
    "Description": String,
    "CidrBlock": String,
    "EnsRegionId": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

NetworkName

String

No

Yes

The VPC name.

The name must meet the following requirements:

  • The name must be 2 to 128 characters in length.

  • It must start with a letter and cannot start with http:// or https://.

  • It can contain letters, digits, colons (:), underscores (_), and hyphens (-).

Description

String

No

Yes

The description.

The description must be 2 to 256 characters in length. It must start with a letter and cannot start with http:// or https://.

CidrBlock

String

Yes

No

The CIDR block of the VPC.

You can set the CIDR block of the VPC to one of the following CIDR blocks or their subnets:

  • 10.0.0.0/8 (default)

  • 172.16.0.0/12

  • 192.168.0.0/16

EnsRegionId

String

Yes

No

The ID of the Edge Node Service (ENS) node.

None.

Return values

Fn::GetAtt

NetworkId: the VPC ID.

Examples

  • YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      CidrBlock:
        Description:
          en: 'The CIDR block of the network. You can use one of the following CIDR blocks
            or their subnets as the CIDR block of the network:
    
            10.0.0.0/8 (default)
    
            172.16.0.0/12
    
            192.168.0.0/16'
        Required: true
        Type: String
      Description:
        AssociationProperty: TextArea
        Description:
          en: 'The description of the network.
    
            The description must be 2 to 256 characters in length. It must start with
            a letter but cannot start with http:// or https://.'
        Required: false
        Type: String
      EnsRegionId:
        Description:
          en: The ID of the edge node.
        Required: true
        Type: String
      NetworkName:
        Description:
          en: 'The name of the network. The name must meet the following requirements:
    
            The name must be 2 to 128 characters in length.
    
            The name must start with a letter but cannot start with http:// or https://.
    
            The name can contain letters, digits, colons (:), underscores (_), and hyphens
            (-).'
        Required: false
        Type: String
    Resources:
      Network:
        Properties:
          CidrBlock:
            Ref: CidrBlock
          Description:
            Ref: Description
          EnsRegionId:
            Ref: EnsRegionId
          NetworkName:
            Ref: NetworkName
        Type: ALIYUN::ENS::Network
    Outputs:
      NetworkId:
        Description: The ID of the network.
        Value:
          Fn::GetAtt:
          - Network
          - NetworkId
                            
  • JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "NetworkName": {
          "Type": "String",
          "Description": {
            "en": "The name of the network. The name must meet the following requirements:\nThe name must be 2 to 128 characters in length.\nThe name must start with a letter but cannot start with http:// or https://.\nThe name can contain letters, digits, colons (:), underscores (_), and hyphens (-)."
          },
          "Required": false
        },
        "Description": {
          "AssociationProperty": "TextArea",
          "Type": "String",
          "Description": {
            "en": "The description of the network.\nThe description must be 2 to 256 characters in length. It must start with a letter but cannot start with http:// or https://."
          },
          "Required": false
        },
        "CidrBlock": {
          "Type": "String",
          "Description": {
            "en": "The CIDR block of the network. You can use one of the following CIDR blocks or their subnets as the CIDR block of the network:\n10.0.0.0/8 (default)\n172.16.0.0/12\n192.168.0.0/16"
          },
          "Required": true
        },
        "EnsRegionId": {
          "Type": "String",
          "Description": {
            "en": "The ID of the edge node."
          },
          "Required": true
        }
      },
      "Resources": {
        "Network": {
          "Type": "ALIYUN::ENS::Network",
          "Properties": {
            "NetworkName": {
              "Ref": "NetworkName"
            },
            "Description": {
              "Ref": "Description"
            },
            "CidrBlock": {
              "Ref": "CidrBlock"
            },
            "EnsRegionId": {
              "Ref": "EnsRegionId"
            }
          }
        }
      },
      "Outputs": {
        "NetworkId": {
          "Description": "The ID of the network.",
          "Value": {
            "Fn::GetAtt": [
              "Network",
              "NetworkId"
            ]
          }
        }
      }
    }