文档

ALIYUN::ApiGateway::Group

更新时间:

ALIYUN::ApiGateway::Group类型用于创建API分组。

语法

{
  "Type": "ALIYUN::ApiGateway::Group",
  "Properties": {
    "GroupName": String,
    "Description": String,
    "InstanceId": String,
    "PassthroughHeaders": String,
    "InternetEnable": Boolean,
    "VpcIntranetEnable": Boolean,
    "Tags": List,
    "BasePath": String
  }
}   

属性

属性名称

类型

必须

允许更新

描述

约束

GroupName

String

API分组名称。

名称必须唯一。

长度为4~50个字符。必须以英文字母或汉字开头。可包含英文字母、汉字、数字和下划线(_)。

BasePath

String

API根路径。

示例:/qqq

Description

String

API分组描述。

长度不超过180个字符。

InstanceId

String

API网关实例类型。

取值:

  • api-shared-vpc-001:专有网络。

  • api-shared-classic-001:经典网络。

InternetEnable

Boolean

是否启用公网子域名。

取值:

  • true:启用公网子域名。

  • false:不启用公网子域名。

PassthroughHeaders

String

配置透传。

取值:host。

Tags

List

标签。

最多可以设置20个标签。

更多信息,请参见Tags属性

VpcIntranetEnable

Boolean

是否启用私网子域名。

取值:

  • true:启用私网子域名。

  • false:不启用私网子域名。

Tags语法

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

Tags属性

属性名称

类型

必须

允许更新

描述

约束

Key

String

标签键。

长度为1~128个字符,不能以aliyunacs:开头,不能包含http://https://

Value

String

标签值。

长度为0~128个字符,不能以aliyunacs:开头,不能包含http://https://

返回值

Fn::GetAtt

  • SubDomain:系统给API分组绑定的二级域名,用于测试API调用情况。

  • GroupId:API分组ID。通过系统生成,全局唯一。

  • Tags:标签。

示例

说明

请您根据实际情况更改脱敏的参数取值,例如InstanceId。

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Parameters: {}
Resources:
  Group:
    Type: ALIYUN::ApiGateway::Group
    Properties:
      InternetEnable: false
      GroupName: TestGroup
      InstanceId: api-shared-vpc-***
      VpcIntranetEnable: false
      PassthroughHeaders: host
Outputs: {}

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
  },
  "Resources": {
    "Group": {
      "Type": "ALIYUN::ApiGateway::Group",
      "Properties": {
        "InternetEnable": false,
        "GroupName": "TestGroup",
        "InstanceId": "api-shared-vpc-***",
        "VpcIntranetEnable": false,
        "PassthroughHeaders": "host"
      }
    }
  },
  "Outputs": {
  }
}