ALIYUN::FC::CustomDomain is used to create a custom domain name.

Syntax

{
  "Type": "ALIYUN::FC::CustomDomain",
  "Properties": {
    "ApiVersion": String,
    "Protocol": String,
    "RouteConfig": Map,
    "CertConfig": Map,
    "DomainName": String
  }
}

Properties

Name Type Required Editable Description Validity
ApiVersion String No Yes The API version to be used. None
Protocol String Yes Yes The protocol type supported by the custom domain name. Valid values: HTTP and HTTP,HTTPS. None
RouteConfig Map No Yes The routing table that maps paths to functions when the functions are invoked with the custom domain name. None
CertConfig Map No Yes The HTTPS certificate information. None
DomainName String Yes No The custom domain name. None

RouteConfig syntax

"RouteConfig": {
  "Routes": List
}

RouteConfig properties

Name Type Required Editable Description Validity
Routes List Yes Yes An array of routes. None

CertConfig syntax

"CertConfig": {
  "CertName": String,
  "PrivateKey": String,
  "Certificate": String
}

CertConfig properties

Name Type Required Editable Description Validity
CertName String Yes Yes The name of the certificate. None
PrivateKey String Yes Yes The private key of the certificate. None
Certificate String Yes Yes The certificate. None

Response parameters

Fn::GetAtt

DomainName: the domain name.

Examples

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Resources": {
    "CustomDomain": {
      "Type": "ALIYUN::FC::CustomDomain",
      "Properties": {
        "CertConfig": {
          "Ref": "CertConfig"
        },
        "Protocol": {
          "Ref": "Protocol"
        },
        "RouteConfig": {
          "Ref": "RouteConfig"
        },
        "ApiVersion": {
          "Ref": "ApiVersion"
        },
        "DomainName": {
          "Ref": "DomainName"
        }
      }
    }
  },
  "Parameters": {
    "CertConfig": {
      "Type": "Json",
      "Description": "Certificate information"
    },
    "Protocol": {
      "Type": "String",
      "Description": "Valid values: HTTP and HTTP,HTTPS"
    },
    "RouteConfig": {
      "Type": "Json",
      "Description": "The routing table that maps paths to functions when the functions are invoked with the custom domain name."
    },
    "ApiVersion": {
      "Type": "String",
      "Description": "API version"
    },
    "DomainName": {
      "Type": "String",
      "Description": "Domain name"
    }
  },
  "Outputs": {
    "DomainName": {
      "Description": "Domain name",
      "Value": {
        "Fn::GetAtt": [
          "CustomDomain",
          "DomainName"
        ]
      }
    }
  }
}