All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::MSE::Gateway

Last Updated:Jun 12, 2025

ALIYUN::MSE::Gateway is used to add a gateway.

Note

ALIYUN::MSE::Gateway can only be used to create a pay-as-you-go common instance. If you want to create an instance that uses a different billing method or a serverless gateway, use ALIYUN::MSE::Gateway2. For more information, visit ALIYUN::MSE::Gateway2.

Syntax

{
  "Type": "ALIYUN::MSE::Gateway",
  "Properties": {
    "BackupVSwitchId": String,
    "EnterpriseSecurityGroup": String,
    "VpcId": String,
    "VSwitchId": String,
    "SlbSpec": String,
    "Spec": String,
    "InternetSlbSpec": String,
    "Replica": Integer,
    "Name": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

BackupVSwitchId

String

No

No

The ID of the secondary vSwitch.

None.

EnterpriseSecurityGroup

String

No

No

Specifies whether the gateway belongs to an advanced security group.

Valid values:

  • true

  • false

VpcId

String

Yes

No

The ID of the virtual private cloud (VPC).

None.

VSwitchId

String

Yes

No

The ID of the primary vSwitch.

None.

SlbSpec

String

No

No

The instance specification of the internal-facing Server Load Balancer (SLB) instance.

None.

Spec

String

Yes

No

The specifications of the gateway node.

Valid values:

  • MSE_GTW_2_4_200_c

  • MSE_GTW_4_8_200_c

  • MSE_GTW_8_16_200_c

  • MSE_GTW_16_32_200_c

InternetSlbSpec

String

No

No

The instance specification of the Internet-facing SLB instance.

None.

Replica

Integer

Yes

No

The number of nodes.

Valid values: 1 to 30.

Note

We recommend that you use at least two nodes to ensure high availability of the gateway.

Name

String

No

No

The name of the gateway.

None.

Return values

Fn::GetAtt

  • GatewayUniqueId: the unique ID of the gateway.

  • BackupVSwitchId: the ID of the secondary vSwitch.

  • VpcId: the ID of the VPC.

  • VSwitchId: the ID of the primary vSwitch.

  • PaymentType: the billing method of resources.

  • Spec: the specifications of the gateway node.

  • Replica: the number of nodes.

Examples

  • YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      VSwitchZoneId:
        AssociationProperty: ALIYUN::ECS::Instance:ZoneId
        Type: String
      VpcId:
        Type: String
        AssociationProperty: ALIYUN::ECS::VPC::VPCId
        Description: VpcId
      VSwitchId:
        Type: String
        AssociationProperty: ALIYUN::ECS::VSwitch::VSwitchId
        AssociationPropertyMetadata:
          VpcId: VpcId
          ZoneId: VSwitchZoneId
    Resources:
      MSEGateway:
        Type: ALIYUN::MSE::Gateway
        Properties:
          VpcId:
            Ref: VpcId
          VSwitchId:
            Ref: VSwitchId
          Spec: MSE_GTW_2_4_200_c
          Replica: 2
    Outputs:
      GatewayUniqueId:
        Description: Gateway unique identification
        Value:
          Fn::GetAtt:
            - MSEGateway
            - GatewayUniqueId
      BackupVSwitchId:
        Description: VSwitchId For Backup
        Value:
          Fn::GetAtt:
            - MSEGateway
            - BackupVSwitchId
      VpcId:
        Description: VpcId
        Value:
          Fn::GetAtt:
            - MSEGateway
            - VpcId
      VSwitchId:
        Description: VSwitchId
        Value:
          Fn::GetAtt:
            - MSEGateway
            - VSwitchId
      PaymentType:
        Description: The payment type of the resource
        Value:
          Fn::GetAtt:
            - MSEGateway
            - PaymentType
  • JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "VSwitchZoneId": {
          "AssociationProperty": "ALIYUN::ECS::Instance:ZoneId",
          "Type": "String"
        },
        "VpcId": {
          "Type": "String",
          "AssociationProperty": "ALIYUN::ECS::VPC::VPCId",
          "Description": "VpcId"
        },
        "VSwitchId": {
          "Type": "String",
          "AssociationProperty": "ALIYUN::ECS::VSwitch::VSwitchId",
          "AssociationPropertyMetadata": {
            "VpcId": "VpcId",
            "ZoneId": "VSwitchZoneId"
          }
        }
      },
      "Resources": {
        "MSEGateway": {
          "Type": "ALIYUN::MSE::Gateway",
          "Properties": {
            "VpcId": {
              "Ref": "VpcId"
            },
            "VSwitchId": {
              "Ref": "VSwitchId"
            },
            "Spec": "MSE_GTW_2_4_200_c",
            "Replica": 2
          }
        }
      },
      "Outputs": {
        "GatewayUniqueId": {
          "Description": "Gateway unique identification",
          "Value": {
            "Fn::GetAtt": [
              "MSEGateway",
              "GatewayUniqueId"
            ]
          }
        },
        "BackupVSwitchId": {
          "Description": "VSwitchId For Backup",
          "Value": {
            "Fn::GetAtt": [
              "MSEGateway",
              "BackupVSwitchId"
            ]
          }
        },
        "VpcId": {
          "Description": "VpcId",
          "Value": {
            "Fn::GetAtt": [
              "MSEGateway",
              "VpcId"
            ]
          }
        },
        "VSwitchId": {
          "Description": "VSwitchId",
          "Value": {
            "Fn::GetAtt": [
              "MSEGateway",
              "VSwitchId"
            ]
          }
        },
        "PaymentType": {
          "Description": "The payment type of the resource",
          "Value": {
            "Fn::GetAtt": [
              "MSEGateway",
              "PaymentType"
            ]
          }
        }
      }
    }