ALIYUN::ApiGateway::CustomDomain

更新时间:2024-06-14 05:30:43

ALIYUN::ApiGateway::CustomDomain类型用于给指定分组绑定自定义域名和上传SSL证书。

说明
  • SSL证书必须与自定义域名匹配。

  • 绑定SSL证书后,可提供基于HTTPSAPI服务。

语法

{
  "Type": "ALIYUN::ApiGateway::CustomDomain",
  "Properties": {
    "CertificateBody": String,
    "CertificateName": String,
    "GroupId": String,
    "CertificatePrivateKey": String,
    "DomainName": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

属性名称

类型

必须

允许更新

描述

约束

DomainName

String

自定义域名

域名绑定失败时,请排查原因并重新绑定域名。

更多信息,请参见分组的域名绑定

GroupId

String

API分组ID

CertificateBody

String

证书内容

证书内容需要写到一行内,通过换行符\n进行换行。

CertificateName

String

SSL证书名称

CertificatePrivateKey

String

证书私钥

返回值

Fn::GetAtt

CertificateId:证书ID。

示例

说明

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

YAML格式
JSON格式
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  GroupId:
    Type: String
    Description: 操作的分组
  CertificateBody:
    Type: String
  CertificatePrivateKey:
    Type: String
Resources:
  CustomDomain:
    Type: 'ALIYUN::ApiGateway::CustomDomain'
    Properties:
      GroupId:
        Ref: GroupId
      DomainName: ****.api.domain
      CertificateName: demo_cert
      CertificateBody:
        Ref: CertificateBody
      CertificatePrivateKey:
        Ref: CertificatePrivateKey
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "GroupId": {
      "Type": "String",
      "Description": "操作的分组"
    },
    "CertificateBody": {
      "Type": "String"
    },
    "CertificatePrivateKey": {
      "Type": "String"
    }
  },
  "Resources": {
    "CustomDomain": {
      "Type": "ALIYUN::ApiGateway::CustomDomain",
      "Properties": {
        "GroupId": {
          "Ref": "GroupId"
        },
        "DomainName": "****.api.domain",
        "CertificateName": "demo_cert",
        "CertificateBody": {
          "Ref": "CertificateBody"
        },
        "CertificatePrivateKey": {
          "Ref": "CertificatePrivateKey"
        }
      }
    }
  }
}
  • 本页导读 (1)
  • 语法
  • 属性
  • 返回值
  • 示例
AI助理

点击开启售前

在线咨询服务

你好,我是AI助理

可以解答问题、推荐解决方案等