全部产品
Search
文档中心

资源编排:ALIYUN::ApiGateway::Group

更新时间:Jul 12, 2023

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个字符。必须以英文字母或汉字开头。可包含英文字母、汉字、数字和下划线(_)。

Description

String

API分组描述。

长度不超过180个字符。

InstanceId

String

API网关实例类型。

取值:

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

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

InternetEnable

Boolean

是否启用公网子域名。

取值:

  • true:启用公网子域名。

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

VpcIntranetEnable

Boolean

是否启用私网子域名。

取值:

  • true:启用私网子域名。

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

PassthroughHeaders

String

配置透传。

取值:host。

Tags

List

标签。

最多可以设置20个标签。

更多信息,请参见Tags属性

BasePath

String

API根路径。

示例:/qqq

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:标签。

示例

  • YAML格式

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters: {}
    Resources:
      Group:
        Type: ALIYUN::ApiGateway::Group
        Properties:
          InternetEnable: false
          GroupName: TestGroup
          InstanceId: api-shared-vpc-001
          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-001",
            "VpcIntranetEnable": false,
            "PassthroughHeaders": "host"
          }
        }
      },
      "Outputs": {
      }
    }