edit-icon download-icon

ALIYUN::ApiGateway::CustomDomain

Last Updated: Jun 13, 2018

ALIYUN::ApiGateway::CustomDomain can be used to bind a custom domain name and upload the SSL certificate for the specified API group.

Syntax

  1. {
  2. "Type" : "ALIYUN::ApiGateway::CustomDomain",
  3. "Properties" : {
  4. "CertificateBody" : String,
  5. "CertificateName" : String,
  6. "GroupId" : String,
  7. "CertificatePrivateKey" : String,
  8. "DomainName" : String
  9. }
  10. }

Attribute

Attribute name Type Required Update allowed Description
CertificateBody string Yes Yes Certificate body
CertificateName string Yes Yes SSL certificate name
GroupId string Yes No API group ID, unique and generated by the system
CertificatePrivateKey string Yes Yes The private key of the certificate
DomainName string Yes No Custom domain name

Return value

Fn::GetAtt

CertificateId: certificate ID

Example

  1. {
  2. "ROSTemplateFormatVersion": "2015-09-01",
  3. "Parameters": {
  4. "GroupId": {
  5. "Type": "String",
  6. "Description": "API group ID"
  7. },
  8. "CertificateBody": {
  9. "Type": "String"
  10. },
  11. "CertificatePrivateKey": {
  12. "Type": "String"
  13. },
  14. },
  15. "Resources": {
  16. "CustomDomain": {
  17. "Type": "ALIYUN::ApiGateway::CustomDomain",
  18. "Properties": {
  19. "GroupId": {
  20. "Ref": "GroupId"
  21. },
  22. "DomainName": "mytest.api.domain",
  23. "CertificateName": "demo_cert",
  24. "CertificateBody": {
  25. "Ref": "CertificateBody"
  26. },
  27. "CertificatePrivateKey": {
  28. "Ref": "CertificatePrivateKey"
  29. }
  30. }
  31. }
  32. }
  33. }
Thank you! We've received your feedback.