ALIYUN::ApiGateway::CustomDomain is used to bind a custom domain name and upload an SSL certificate to a specified API group.

Syntax

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

Properties

Name Type Required Editable Description
CertificateBody String Yes Yes The content of the certificate.
CertificateName String Yes Yes The name of the certificate.
GroupId String Yes No The ID of the API group. This ID is a globally unique identifier generated by the system.
CertificatePrivateKey String Yes Yes The private key of the certificate.
DomainName String Yes No The custom domain name.

Response parameters

Fn::GetAtt

CertificateId: the ID of the certificate.

Examples

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "GroupId": {
      "Type": "String",
      "Description": "API group ID"
    },
    "CertificateBody": {
      "Type": "String"
    },
    "CertificatePrivateKey": {
      "Type": "String"
    },
  },
  "Resources": {
    "CustomDomain": {
      "Type": "ALIYUN::ApiGateway::CustomDomain",
      "Properties": {
        "GroupId": {
          "Ref": "GroupId"
        },
        "DomainName": "mytest.api.domain",
        "CertificateName": "demo_cert",
        "CertificateBody": {
          "Ref": "CertificateBody"
        },
        "CertificatePrivateKey": {
          "Ref": "CertificatePrivateKey"
        }
      }
    }
  }
}