edit-icon download-icon

ALIYUN::ECS::VPC

Last Updated: Jun 13, 2018

Description

Creates a VPC.

Syntax

  1. {
  2. "Type" : "ALIYUN::ECS::VPC",
  3. "Properties" : {
  4. "CidrBlock" : String,
  5. "VpcName" : String,
  6. "Description" : String
  7. }
  8. }

Properties

Name Type Required Description Constraints
VpcName String No VPC name. It can contain 2 to 128 characters. It must start with an uppercase or lowercase letter or can contain English letters, numbers, underscores (_), and hyphens (-). It cannot start with http:// or https://.
CidrBlock String No VPC CIDR block. Valid values: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, and their subnets.
Description String No VPC description. It can contain 2 to 256 characters. It cannot start with http:// or https://.

Return values

Fn::GetAtt

  • VpcId: VPC ID allocated by the system.

  • VRouterId: Router ID.

  • RouteTableId: Route table ID.

Example

  1. {
  2. "ROSTemplateFormatVersion" : "2015-09-01",
  3. "Resources" : {
  4. "EcsVpc": {
  5. "Type": "ALIYUN::ECS::VPC",
  6. "Properties": {
  7. "CidrBlock": "172.16.0.0/12",
  8. "VpcName": "vpc-test-del",
  9. }
  10. }
  11. },
  12. "Outputs": {
  13. "VpcId": {
  14. "Value" : {"Fn::GetAtt": ["EcsVpc","VpcId"]}
  15. },
  16. "VRouterId": {
  17. "Value" : {"Fn::GetAtt": ["EcsVpc","VRouterId"]}
  18. },
  19. "RouteTableId": {
  20. "Value" : {"Fn::GetAtt": ["EcsVpc","RouteTableId"]}
  21. }
  22. }
  23. }
Thank you! We've received your feedback.