Todos os produtos
Search
Central de documentação

Resource Orchestration Service:ALIYUN::APIG::Gateway

Última atualização: Jun 27, 2026

Cria um API Gateway nativo da nuvem.

Sintaxe

{
  "Type": "ALIYUN::APIG::Gateway",
  "Properties": {
    "PaymentType": String,
    "Spec": String,
    "ZoneConfig": Map,
    "GatewayName": String,
    "LogConfig": Map,
    "NetworkAccessConfig": Map,
    "VSwitch": Map,
    "Vpc": Map,
    "Tags": List,
    "GatewayType": String,
    "ResourceGroupId": String,
    "Period": Integer,
    "PeriodUnit": String
  }
}

Propriedades

Nome da propriedade

Tipo

Obrigatório

Editável

Descrição

Restrição

GatewayName

String

Sim

Sim

Nome do gateway.

Nenhuma

PaymentType

String

Sim

Sim

Método de faturamento.

Valores válidos:

  • PayAsYouGo

  • Subscription

Spec

String

Sim

Não

Especificação do gateway.

Nenhuma

ZoneConfig

Map

Sim

Não

Configuração de zona.

Para mais informações, consulte a propriedade ZoneConfig.

GatewayType

String

Não

Não

Tipo do gateway.

Valores válidos:

  • API: API Gateway

  • AI: AI Gateway

LogConfig

Map

Não

Não

Configuração de log.

Para mais informações, consulte a propriedade LogConfig.

NetworkAccessConfig

Map

Sim

Não

Configuração de acesso à rede.

Para mais informações, consulte a propriedade NetworkAccessConfig.

ResourceGroupId

String

Não

Sim

ID do grupo de recursos.

Nenhuma

Period

Integer

Não

Sim

Período de compra para gateways com assinatura.

Se PeriodUnit for Month, o valor varia de 1 a 9.

Se PeriodUnit for Year, o valor pode ser 1, 2 ou 3.

Válido apenas ao alterar PaymentType de PayAsYouGo para Subscription.

PeriodUnit

String

Não

Sim

Unidade do período de compra para gateways com assinatura.

Valores válidos:

  • Month

  • Year

vSwitch

Map

Não

Não

Configuração do vSwitch.

Para mais informações, consulte as propriedades do vSwitch.

Vpc

Map

Não

Não

Configuração da VPC.

Para mais informações, consulte as propriedades da Vpc.

Tags

List

Não

Sim

Tags.

Especifique até 20 tags.

Para mais informações, consulte as propriedades das Tags.

Sintaxe de NetworkAccessConfig

"NetworkAccessConfig": {
  "Type": String
}

Propriedade NetworkAccessConfig

Nome da propriedade

Tipo

Obrigatório

Editável

Descrição

Restrição

Type

String

Sim

Não

Tipo de acesso à rede.

Valores válidos:

  • Internet

  • Intranet

  • InternetAndIntranet

Sintaxe de vSwitch

"VSwitch": {
  "VSwitchId": String,
  "Name": String
}

Propriedades do vSwitch

Nome da propriedade

Tipo

Obrigatório

Editável

Descrição

Restrição

VSwitchId

String

Sim

Não

ID do vSwitch.

Nenhuma

Name

String

Não

Não

Nome do vSwitch.

Nenhuma

Sintaxe de ZoneConfig

"ZoneConfig": {
  "SelectOption": String
}

Propriedade ZoneConfig

Nome da propriedade

Tipo

Obrigatório

Editável

Descrição

Restrição

SelectOption

String

Sim

Não

Opção de seleção de zona.

Valores válidos:

  • Auto

  • Manual

Sintaxe de Vpc

"Vpc": {
  "VpcId": String,
  "Name": String
}

Propriedades da Vpc

Nome da propriedade

Tipo

Obrigatório

Editável

Descrição

Restrição

VpcId

String

Sim

Não

ID da Virtual Private Cloud (VPC).

Nenhuma

Name

String

Não

Não

Nome do gateway VPC.

Nenhuma

Sintaxe de LogConfig

"LogConfig": {
  "Sls": Map
}

Propriedade LogConfig

Nome da propriedade

Tipo

Obrigatório

Editável

Descrição

Restrição

Sls

Map

Não

Não

Configuração do Simple Log Service (SLS).

Nenhuma

Sintaxe de Sls

"Sls": {
  "Enable": Boolean
}

Propriedade Sls

Nome da propriedade

Tipo

Obrigatório

Editável

Descrição

Restrição

Enable

Boolean

Não

Não

Indica se o SLS está ativado.

Nenhuma

Sintaxe de Tags

"Tags" : [
  {
    "Value" : String,
    "Key" : String
  }
]

Propriedades das Tags

Nome da propriedade

Tipo

Obrigatório

Editável

Descrição

Restrição

Key

String

Sim

Não

Chave da tag.

A chave da tag deve ter de 1 a 128 caracteres e não pode começar com aliyun ou acs:. Não pode conter http:// ou https://.

Value

String

Não

Não

Valor da tag.

O valor da tag deve ter de 0 a 128 caracteres e não pode começar com aliyun ou acs:. Não pode conter http:// ou https://.

Valor de retorno

Fn::GetAtt

  • CreateTime: timestamp de criação em milissegundos.

  • Vpc: VPC da instância.

  • LoadBalancers: endereços IP de entrada da instância.

  • SecurityGroup: grupo de segurança da instância.

  • GatewayId: ID da instância.

  • Zones: configurações de zona da instância.

  • vSwitch: configurações de vSwitch da instância.

  • Version: versão da instância.

  • UpdateTime: timestamp de atualização em milissegundos.

  • PaymentType: método de faturamento.

  • GatewayName: nome da instância.

  • ExpireTime: timestamp de expiração da assinatura em milissegundos.

  • Spec: tipo da instância.

  • Environments: ambientes onde a API foi publicada.

  • ResourceGroupId: ID do grupo de recursos.

  • GatewayType: tipo da instância.

  • Tags: tags.

Exemplos

ROSTemplateFormatVersion: '2015-09-01'
Metadata:
  ALIYUN::ROS::Interface:
    ParameterGroups:
      - Parameters:
          - Vpc
          - ZoneConfig
          - VSwitch
        Label:
          default:
            en: Network Configuration
      - Parameters:
          - PaymentType
          - Spec
        Label:
          default:
            en: Gateway Configuration
Parameters:
  VSwitch:
    AssociationPropertyMetadata:
      Parameters:
        VSwitchId:
          AssociationPropertyMetadata:
            VpcId: ${Vpc.VpcId}
          AssociationProperty: ALIYUN::VPC::VSwitch::VSwitchId
          Type: String
          Description:
            en: The ID of the VSwitch.
          Required: true
        Name:
          Type: String
          Description:
            en: The name of the VSwitch.
          Required: false
    Type: Json
    Description:
      en: The virtual switch associated with the Gateway.
    Required: false
  ZoneConfig:
    AssociationPropertyMetadata:
      Parameters:
        SelectOption:
          Type: String
          Description:
            en: |-
              Availability Zone Options. Valid values:
              * Auto
              * Manual
          AllowedValues:
            - Auto
            - Manual
          Required: true
    Type: Json
    Description:
      en: Availability Zone Configuration.
    Required: true
  Vpc:
    AssociationPropertyMetadata:
      Parameters:
        VpcId:
          AssociationProperty: ALIYUN::ECS::VPC::VPCId
          Type: String
          Description:
            en: The VPC network ID.
          Required: true
        Name:
          Type: String
          Description:
            en: The name of the VPC gateway.
          Required: false
    Type: Json
    Description:
      en: The VPC associated with the Gateway.
    Required: false
  PaymentType:
    AssociationProperty: InstanceChargeType
    Type: String
    Description:
      en: |-
        The payment type of the gateway. Valid values:
        * PayAsYouGo
        * Subscription
    AllowedValues:
      - PayAsYouGo
      - Subscription
    Required: true
    Default: PayAsYouGo
  Spec:
    Type: String
    Description:
      en: Gateway instance specifications.
    Required: true
    Default: apigw.small.x1
Resources:
  ExtensionResource:
    Type: ALIYUN::APIG::Gateway
    Properties:
      VSwitch:
        Ref: VSwitch
      ZoneConfig:
        Ref: ZoneConfig
      Vpc:
        Ref: Vpc
      PaymentType:
        Ref: PaymentType
      Spec:
        Ref: Spec
Outputs:
  CreateTime:
    Description: 'The creation timestamp. Unit: milliseconds.'
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - CreateTime
  Vpc:
    Description: The VPC associated with the Gateway.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Vpc
  LoadBalancers:
    Description: The list of Gateway ingress addresses.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - LoadBalancers
  SecurityGroup:
    Description: The Security Group of the Gateway.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - SecurityGroup
  GatewayId:
    Description: The ID of the Gateway.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - GatewayId
  Zones:
    Description: The List of zones associated with the Gateway.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Zones
  VSwitch:
    Description: The virtual switch associated with the Gateway.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - VSwitch
  Version:
    Description: The gateway version.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Version
  UpdateTime:
    Description: 'Update the timestamp. Unit: milliseconds.'
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - UpdateTime
  PaymentType:
    Description: The payment type of the gateway.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - PaymentType
  GatewayName:
    Description: The name of the resource.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - GatewayName
  ExpireTime:
    Description: 'Package year and package month expiration timestamp. Unit: milliseconds.'
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ExpireTime
  Spec:
    Description: Gateway instance specifications.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Spec
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Metadata": {
    "ALIYUN::ROS::Interface": {
      "ParameterGroups": [
        {
          "Parameters": [
            "Vpc",
            "ZoneConfig",
            "VSwitch"
          ],
          "Label": {
            "default": {
              "en": "Network Configuration"
            }
          }
        },
        {
          "Parameters": [
            "PaymentType",
            "Spec"
          ],
          "Label": {
            "default": {
              "en": "Gateway Configuration"
            }
          }
        }
      ]
    }
  },
  "Parameters": {
    "VSwitch": {
      "AssociationPropertyMetadata": {
        "Parameters": {
          "VSwitchId": {
            "AssociationPropertyMetadata": {
              "VpcId": "${Vpc.VpcId}"
            },
            "AssociationProperty": "ALIYUN::VPC::VSwitch::VSwitchId",
            "Type": "String",
            "Description": {
              "en": "The ID of the VSwitch."
            },
            "Required": true
          },
          "Name": {
            "Type": "String",
            "Description": {
              "en": "The name of the VSwitch."
            },
            "Required": false
          }
        }
      },
      "Type": "Json",
      "Description": {
        "en": "The virtual switch associated with the Gateway."
      },
      "Required": false
    },
    "ZoneConfig": {
      "AssociationPropertyMetadata": {
        "Parameters": {
          "SelectOption": {
            "Type": "String",
            "Description": {
              "en": "Availability Zone Options. Valid values:\n* Auto\n* Manual"
            },
            "AllowedValues": [
              "Auto",
              "Manual"
            ],
            "Required": true
          }
        }
      },
      "Type": "Json",
      "Description": {
        "en": "Availability Zone Configuration."
      },
      "Required": true
    },
    "Vpc": {
      "AssociationPropertyMetadata": {
        "Parameters": {
          "VpcId": {
            "AssociationProperty": "ALIYUN::ECS::VPC::VPCId",
            "Type": "String",
            "Description": {
              "en": "The VPC network ID."
            },
            "Required": true
          },
          "Name": {
            "Type": "String",
            "Description": {
              "en": "The name of the VPC gateway."
            },
            "Required": false
          }
        }
      },
      "Type": "Json",
      "Description": {
        "en": "The VPC associated with the Gateway."
      },
      "Required": false
    },
    "PaymentType": {
      "AssociationProperty": "InstanceChargeType",
      "Type": "String",
      "Description": {
        "en": "The payment type of the gateway. Valid values:\n* PayAsYouGo\n* Subscription"
      },
      "AllowedValues": [
        "PayAsYouGo",
        "Subscription"
      ],
      "Required": true,
      "Default": "PayAsYouGo"
    },
    "Spec": {
      "Type": "String",
      "Description": {
        "en": "Gateway instance specifications."
      },
      "Required": true,
      "Default":"apigw.small.x1"
    }
  },
  "Resources": {
    "ExtensionResource": {
      "Type": "ALIYUN::APIG::Gateway",
      "Properties": {
        "VSwitch": {
          "Ref": "VSwitch"
        },
        "ZoneConfig": {
          "Ref": "ZoneConfig"
        },
        "Vpc": {
          "Ref": "Vpc"
        },
        "PaymentType": {
          "Ref": "PaymentType"
        },
        "Spec": {
          "Ref": "Spec"
        }
      }
    }
  },
  "Outputs": {
    "CreateTime": {
      "Description": "The creation timestamp. Unit: milliseconds.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "CreateTime"
        ]
      }
    },
    "Vpc": {
      "Description": "The VPC associated with the Gateway.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Vpc"
        ]
      }
    },
    "LoadBalancers": {
      "Description": "The list of Gateway ingress addresses.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "LoadBalancers"
        ]
      }
    },
    "SecurityGroup": {
      "Description": "The Security Group of the Gateway.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "SecurityGroup"
        ]
      }
    },
    "GatewayId": {
      "Description": "The ID of the Gateway.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "GatewayId"
        ]
      }
    },
    "Zones": {
      "Description": "The List of zones associated with the Gateway.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Zones"
        ]
      }
    },
    "VSwitch": {
      "Description": "The virtual switch associated with the Gateway.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "VSwitch"
        ]
      }
    },
    "Version": {
      "Description": "The gateway version.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Version"
        ]
      }
    },
    "UpdateTime": {
      "Description": "Update the timestamp. Unit: milliseconds.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "UpdateTime"
        ]
      }
    },
    "PaymentType": {
      "Description": "The payment type of the gateway.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "PaymentType"
        ]
      }
    },
    "GatewayName": {
      "Description": "The name of the resource.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "GatewayName"
        ]
      }
    },
    "ExpireTime": {
      "Description": "Package year and package month expiration timestamp. Unit: milliseconds.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ExpireTime"
        ]
      }
    },
    "Spec": {
      "Description": "Gateway instance specifications.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Spec"
        ]
      }
    }
  }
}