ALIYUN::FC::CustomDomain

更新时间:
复制 MD 格式

The ALIYUN::FC::CustomDomain resource creates a custom domain name.

Syntax

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

Properties

PropertyTypeRequiredUpdate allowedDescriptionConstraints
ApiVersionStringNoYesThe API edition.None
ProtocolStringYesYesProtocol TypeValid values:
  • HTTP
  • HTTPS
RouteConfigMapNoYesThe route table configuration.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

Property NameTypeRequiredUpdate allowedDescriptionConstraints
RoutesListYesYesThe list of routes. For more information, see Routes properties.

Routes syntax

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

Routes properties

PropertyTypeRequiredUpdate allowedDescriptionConstraints
PathStringYesYesThe request path of the custom domain name. For example: /login/*.None
QualifierStringNoNoThe alias.None
FunctionNameStringYesYesThe function that corresponds to the request path.None
ServiceNameStringYesYesThe service to which the function belongs.None

CertConfig syntax

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

CertConfig properties

Property NameTypeRequiredUpdate allowedDescriptionConstraints
CertNameStringYesYesThe custom name of the certificate.None
PrivateKeyStringYesYesThe private key.Use the line feed character \n to format the key as a single line.
CertificateStringYesYesThe certificate content.Written on a single line, where the line feed character \n denotes line breaks.

Return values

Fn::GetAtt

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

Examples

  • YAML format

    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
  • JSON format

    {
      "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"
            ]
          }
        }
      }
    }