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

PropertyTypeRequiredEditableDescriptionConstraint
ApiVersionStringNoYesThe version of the API.None
ProtocolStringYesYesThe protocol type.Valid values:
  • HTTP
  • HTTPS
RouteConfigMapNoYesThe configuration of the route table.For more information, see RouteConfig properties.
CertConfigMapNoYesThe certificate information.For more information, see CertConfig properties.
DomainNameStringYesNoThe domain name.None

RouteConfig syntax

"RouteConfig": {
  "Routes": List
}

RouteConfig properties

PropertyTypeRequiredEditableDescriptionConstraint
RoutesListYesYesThe list of routes. For more information, see Routes properties.

Routes syntax

"Routes": [
  {
    "Path": String,
    "FunctionName": String,
    "ServiceName": String,
    "Qualifier": String
  }
]  

Routes properties

PropertyTypeRequiredEditableDescriptionConstraint
PathStringYesYesThe request path of the custom domain name. Example: /login/*.None
QualifierStringNoNoThe alias of the request path.None
FunctionNameStringYesYesThe function corresponding to the request path.None
ServiceNameStringYesYesThe service to which the function belongs.None

CertConfig syntax

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

CertConfig properties

PropertyTypeRequiredEditableDescriptionConstraint
CertNameStringYesYesThe custom name of the certificate.None
PrivateKeyStringYesYesThe private key.Specify this parameter in one line by using line breaks (\n).
CertificateStringYesYesThe content of the certificate.Specify this parameter in one line by using line breaks (\n).

Response parameters

Fn::GetAtt

  • DomainName: the domain name.
  • Domain: the protocol and the domain name.

Examples

  • YAMLformat

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters: {}
    Resources:
      CustomDomain:
        Type: ALIYUN::FC::CustomDomain
        Properties:
          Protocol: HTTP
          DomainName: TestDomain
    Outputs:
      DomainName:
        Description: The domain name
        Value:
          Fn::GetAtt:
            - CustomDomain
            - DomainName
      Domain:
        Description: The domain with protocol.
        Value:
          Fn::GetAtt:
            - CustomDomain
            - Domain
  • JSONformat

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
      },
      "Resources": {
        "CustomDomain": {
          "Type": "ALIYUN::FC::CustomDomain",
          "Properties": {
            "Protocol": "HTTP",
            "DomainName": "TestDomain"
          }
        }
      },
      "Outputs": {
        "DomainName": {
          "Description": "The domain name",
          "Value": {
            "Fn::GetAtt": [
              "CustomDomain",
              "DomainName"
            ]
          }
        },
        "Domain": {
          "Description": "The domain with protocol.",
          "Value": {
            "Fn::GetAtt": [
              "CustomDomain",
              "Domain"
            ]
          }
        }
      }
    }