The ALIYUN::GA::CertificatesListenerAssociation type is used to associate additional certificates with an HTTPS listener.
Syntax
{
"Type": "ALIYUN::GA::CertificatesListenerAssociation",
"Properties": {
"AcceleratorId": String,
"Certificates": List,
"ListenerId": String
}
}
Properties
|
Property |
Type |
Required |
Editable |
Description |
Constraints |
|
AcceleratorId |
String |
Yes |
No |
The ID of the Global Accelerator instance. |
None |
|
Certificates |
List |
Yes |
Yes |
Additional certificates associated with the HTTPS listener. |
Up to 10 certificates can be specified at a time. For more information, see Certificates Properties. |
|
ListenerId |
String |
Yes |
No |
The ID of the HTTPS listener. |
None |
Certificates syntax
"Certificates": [
{
"Id": String,
"Domain": String
}
]
Certificates properties
|
Property |
Type |
Required |
Editable |
Description |
Constraints |
|
Domain |
String |
Yes |
Yes |
The domain name for which the additional certificate takes effect. |
None |
|
Id |
String |
Yes |
Yes |
The ID of the additional certificate. |
None |
Return values
Fn::GetAtt
-
Certificates: Additional certificates.
-
ListenerId: The ID of the listener.
Examples
Scenario 1: Associate one additional SSL certificate with a Global Accelerator HTTPS listener (single-domain SNI).
ROSTemplateFormatVersion: '2015-09-01'
Description:
en: Associate one additional SSL certificate (single-domain SNI) with a Global Accelerator HTTPS listener for multi-domain HTTPS acceleration.
Parameters:
AcceleratorId:
Type: String
Label: Global Accelerator Instance ID
Description: The ID of an existing Global Accelerator instance.
ListenerId:
Type: String
Label: HTTPS Listener ID
Description: The ID of an existing HTTPS listener.
CertificateId:
Type: String
Label: Additional Certificate ID
Description: The ID of the additional SSL certificate (from Certificate Management Service, CAS). Must be different from the default certificate of the listener.
Domain:
Type: String
Label: Additional Certificate Domain
Description: The domain name for which the additional certificate takes effect, for example, www.example.com.
Default: www.example.com
Resources:
CertListenerAssociation:
Type: ALIYUN::GA::CertificatesListenerAssociation
Properties:
AcceleratorId:
Ref: AcceleratorId
ListenerId:
Ref: ListenerId
Certificates:
- Id:
Ref: CertificateId
Domain:
Ref: Domain
Outputs:
ListenerId:
Description: The ID of the HTTPS listener to which the additional certificate is associated.
Value:
Fn::GetAtt:
- CertListenerAssociation
- ListenerId
Certificates:
Description: The list of additional certificates associated with the listener.
Value:
Fn::GetAtt:
- CertListenerAssociation
- Certificates{
"ROSTemplateFormatVersion": "2015-09-01",
"Description": {
"en": "Associate one additional SSL certificate (single-domain SNI) with a Global Accelerator HTTPS listener for multi-domain HTTPS acceleration."
},
"Parameters": {
"AcceleratorId": {
"Type": "String",
"Label": "Global Accelerator Instance ID",
"Description": "The ID of an existing Global Accelerator instance."
},
"ListenerId": {
"Type": "String",
"Label": "HTTPS Listener ID",
"Description": "The ID of an existing HTTPS listener."
},
"CertificateId": {
"Type": "String",
"Label": "Additional Certificate ID",
"Description": "The ID of the additional SSL certificate (from Certificate Management Service, CAS). Must be different from the default certificate of the listener."
},
"Domain": {
"Type": "String",
"Label": "Additional Certificate Domain",
"Description": "The domain name for which the additional certificate takes effect, for example, www.example.com.",
"Default": "www.example.com"
}
},
"Resources": {
"CertListenerAssociation": {
"Type": "ALIYUN::GA::CertificatesListenerAssociation",
"Properties": {
"AcceleratorId": { "Ref": "AcceleratorId" },
"ListenerId": { "Ref": "ListenerId" },
"Certificates": [
{ "Id": { "Ref": "CertificateId" }, "Domain": { "Ref": "Domain" } }
]
}
}
},
"Outputs": {
"ListenerId": {
"Description": "The ID of the HTTPS listener to which the additional certificate is associated.",
"Value": { "Fn::GetAtt": ["CertListenerAssociation", "ListenerId"] }
},
"Certificates": {
"Description": "The list of additional certificates associated with the listener.",
"Value": { "Fn::GetAtt": ["CertListenerAssociation", "Certificates"] }
}
}
}Scenario 2: Associate multiple additional SSL certificates with a Global Accelerator HTTPS listener (multi-domain SNI).
ROSTemplateFormatVersion: '2015-09-01'
Description:
en: Associate multiple additional SSL certificates (multi-domain SNI) with a Global Accelerator HTTPS listener for multi-domain HTTPS acceleration.
Parameters:
AcceleratorId:
Type: String
Label: Global Accelerator Instance ID
Description: The ID of an existing Global Accelerator instance.
ListenerId:
Type: String
Label: HTTPS Listener ID
Description: The ID of an existing HTTPS listener.
Certificates:
Type: Json
Label: Additional Certificate List
Description: >-
A list of additional SSL certificates in JSON array format. Each element contains Id (certificate ID from
Certificate Management Service, CAS) and Domain (domain for the certificate). Maximum 10 certificates. Example:
[{"Id":"12345-cert-id","Domain":"www.example.com"},{"Id":"67890-cert-id","Domain":"api.example.com"}].
Default: '[{"Id":"cert-id-a","Domain":"www.example.com"},{"Id":"cert-id-b","Domain":"api.example.com"}]'
Resources:
CertListenerAssociation:
Type: ALIYUN::GA::CertificatesListenerAssociation
Properties:
AcceleratorId:
Ref: AcceleratorId
ListenerId:
Ref: ListenerId
Certificates:
Ref: Certificates
Outputs:
ListenerId:
Description: The ID of the HTTPS listener to which the additional certificates are associated.
Value:
Fn::GetAtt:
- CertListenerAssociation
- ListenerId
Certificates:
Description: The list of additional certificates associated with the listener.
Value:
Fn::GetAtt:
- CertListenerAssociation
- Certificates{
"ROSTemplateFormatVersion": "2015-09-01",
"Description": {
"en": "Associate multiple additional SSL certificates (multi-domain SNI) with a Global Accelerator HTTPS listener for multi-domain HTTPS acceleration."
},
"Parameters": {
"AcceleratorId": {
"Type": "String",
"Label": "Global Accelerator Instance ID",
"Description": "The ID of an existing Global Accelerator instance."
},
"ListenerId": {
"Type": "String",
"Label": "HTTPS Listener ID",
"Description": "The ID of an existing HTTPS listener."
},
"Certificates": {
"Type": "Json",
"Label": "Additional Certificate List",
"Description": "A list of additional SSL certificates in JSON array format. Each element contains Id (certificate ID from Certificate Management Service, CAS) and Domain (domain for the certificate). Maximum 10 certificates. Example: [{\"Id\":\"12345-cert-id\",\"Domain\":\"www.example.com\"},{\"Id\":\"67890-cert-id\",\"Domain\":\"api.example.com\"}].",
"Default": "[{\"Id\":\"cert-id-a\",\"Domain\":\"www.example.com\"},{\"Id\":\"cert-id-b\",\"Domain\":\"api.example.com\"}]"
}
},
"Resources": {
"CertListenerAssociation": {
"Type": "ALIYUN::GA::CertificatesListenerAssociation",
"Properties": {
"AcceleratorId": { "Ref": "AcceleratorId" },
"ListenerId": { "Ref": "ListenerId" },
"Certificates": { "Ref": "Certificates" }
}
}
},
"Outputs": {
"ListenerId": {
"Description": "The ID of the HTTPS listener to which the additional certificates are associated.",
"Value": { "Fn::GetAtt": ["CertListenerAssociation", "ListenerId"] }
},
"Certificates": {
"Description": "The list of additional certificates associated with the listener.",
"Value": { "Fn::GetAtt": ["CertListenerAssociation", "Certificates"] }
}
}
}Scenario 3: Create a Global Accelerator HTTPS acceleration chain, upload certificates, and associate additional certificates.
ROSTemplateFormatVersion: '2015-09-01'
Description:
en: Create a Global Accelerator HTTPS acceleration chain, upload default and additional SSL certificates and associate them with the listener, and configure an endpoint group to forward traffic to the backend origin server.
Parameters:
AcceleratorName:
Type: String
Label: Global Accelerator Instance Name
Description: The name of the Global Accelerator instance.
Default: ga-https-demo
Spec:
Type: String
Label: Instance Specification
Description: The specification of the Global Accelerator instance, for example, Small_1, Small_2, or Middle_1.
Default: Small_1
Bandwidth:
Type: Number
Label: Bandwidth Package Bandwidth
Description: The bandwidth provided by the bandwidth package, in Mbps.
Default: 10
AccelerateRegionId:
Type: String
Label: Acceleration Region
Description: The region ID to be accelerated (the source region from which users access), for example, cn-beijing.
Default: cn-beijing
BackendRegion:
Type: String
Label: Endpoint Group Region
Description: The region ID where the endpoint group (backend origin server) is located, for example, cn-hangzhou.
Default: cn-hangzhou
BackendEndpoint:
Type: String
Label: Backend Origin Server Address
Description: The public IP address or domain name of the backend origin server.
Default: 47.111.111.111
BackendPort:
Type: Number
Label: Backend Origin Server Port
Description: The listening port of the backend origin server. Listener port 443 will be forwarded to this port.
Default: 80
EndpointType:
Type: String
Label: Endpoint Type
Description: The endpoint type. PublicIp: public IP address. Domain: custom domain name. Ip: custom IP address.
AllowedValues:
- PublicIp
- Domain
- Ip
Default: PublicIp
DefaultDomain:
Type: String
Label: Default Certificate Domain
Description: The domain name corresponding to the default certificate of the listener, for example, www.example.com.
Default: www.example.com
DefaultCert:
Type: String
Label: Default Certificate Content
Description: The content of the default SSL certificate for the listener (PEM format).
DefaultKey:
Type: String
Label: Default Certificate Private Key
Description: The private key content of the default SSL certificate for the listener (PEM format).
NoEcho: true
AdditionalDomain:
Type: String
Label: Additional Certificate Domain
Description: The domain name corresponding to the additional certificate, for example, api.example.com.
Default: api.example.com
AdditionalCert:
Type: String
Label: Additional Certificate Content
Description: The content of the additional SSL certificate (PEM format). Must be different from the default certificate.
AdditionalKey:
Type: String
Label: Additional Certificate Private Key
Description: The private key content of the additional SSL certificate (PEM format).
NoEcho: true
Resources:
Accelerator:
Type: ALIYUN::GA::Accelerator
Properties:
AcceleratorName:
Ref: AcceleratorName
Spec:
Ref: Spec
InstanceChargeType: PostPaid
BandwidthPackage:
Type: ALIYUN::GA::BandwidthPackage
Properties:
Type: Basic
Bandwidth:
Ref: Bandwidth
BandwidthAddition:
Type: ALIYUN::GA::BandwidthPackageAcceleratorAddition
Properties:
BandwidthPackageId:
Fn::GetAtt:
- BandwidthPackage
- BandwidthPackageId
AcceleratorId:
Fn::GetAtt:
- Accelerator
- AcceleratorId
DependsOn:
- Accelerator
- BandwidthPackage
IpSets:
Type: ALIYUN::GA::IpSets
Properties:
AcceleratorId:
Fn::GetAtt:
- Accelerator
- AcceleratorId
AccelerateRegion:
- AccelerateRegionId:
Ref: AccelerateRegionId
Bandwidth: 2
IpVersion: IPv4
DependsOn: Accelerator
CasCertDefault:
Type: ALIYUN::CAS::Certificate
Properties:
Cert:
Ref: DefaultCert
Key:
Ref: DefaultKey
Name: ga-default-cert
CasCertAdditional:
Type: ALIYUN::CAS::Certificate
Properties:
Cert:
Ref: AdditionalCert
Key:
Ref: AdditionalKey
Name: ga-additional-cert
Listener:
Type: ALIYUN::GA::Listener
Properties:
AcceleratorId:
Fn::GetAtt:
- Accelerator
- AcceleratorId
Protocol: https
PortRanges:
- FromPort: 443
ToPort: 443
Certificates:
- Id:
Fn::GetAtt:
- CasCertDefault
- CertId
Name: ga-https-listener
DependsOn:
- Accelerator
- CasCertDefault
CertListenerAssociation:
Type: ALIYUN::GA::CertificatesListenerAssociation
Properties:
AcceleratorId:
Fn::GetAtt:
- Accelerator
- AcceleratorId
ListenerId:
Fn::GetAtt:
- Listener
- ListenerId
Certificates:
- Id:
Fn::GetAtt:
- CasCertAdditional
- CertId
Domain:
Ref: AdditionalDomain
DependsOn:
- Listener
- CasCertAdditional
EndpointGroup:
Type: ALIYUN::GA::EndpointGroup
Properties:
AcceleratorId:
Fn::GetAtt:
- Accelerator
- AcceleratorId
ListenerId:
Fn::GetAtt:
- Listener
- ListenerId
EndpointGroupRegion:
Ref: BackendRegion
EndpointRequestProtocol: HTTP
EndpointConfigurations:
- Type:
Ref: EndpointType
Endpoint:
Ref: BackendEndpoint
Weight: 100
HealthCheckEnabled: true
HealthCheckProtocol: tcp
PortOverrides:
- ListenerPort: 443
EndpointPort:
Ref: BackendPort
DependsOn: Listener
Outputs:
AcceleratorId:
Description: The ID of the Global Accelerator instance.
Value:
Fn::GetAtt:
- Accelerator
- AcceleratorId
AcceleratorCname:
Description: The CNAME acceleration domain name of the Global Accelerator instance.
Value:
Fn::GetAtt:
- Accelerator
- DnsName
ListenerId:
Description: The ID of the HTTPS listener.
Value:
Fn::GetAtt:
- Listener
- ListenerId
EndpointGroupId:
Description: The ID of the endpoint group.
Value:
Fn::GetAtt:
- EndpointGroup
- EndpointGroupId
Certificates:
Description: The list of additional certificates associated with the listener.
Value:
Fn::GetAtt:
- CertListenerAssociation
- Certificates{
"ROSTemplateFormatVersion": "2015-09-01",
"Description": {
"en": "Create a Global Accelerator HTTPS acceleration chain, upload default and additional SSL certificates and associate them with the listener, and configure an endpoint group to forward traffic to the backend origin server."
},
"Parameters": {
"AcceleratorName": {
"Type": "String",
"Label": "Global Accelerator Instance Name",
"Description": "The name of the Global Accelerator instance.",
"Default": "ga-https-demo"
},
"Spec": {
"Type": "String",
"Label": "Instance Specification",
"Description": "The specification of the Global Accelerator instance, for example, Small_1, Small_2, or Middle_1.",
"Default": "Small_1"
},
"Bandwidth": {
"Type": "Number",
"Label": "Bandwidth Package Bandwidth",
"Description": "The bandwidth provided by the bandwidth package, in Mbps.",
"Default": 10
},
"AccelerateRegionId": {
"Type": "String",
"Label": "Acceleration Region",
"Description": "The region ID to be accelerated (the source region from which users access), for example, cn-beijing.",
"Default": "cn-beijing"
},
"BackendRegion": {
"Type": "String",
"Label": "Endpoint Group Region",
"Description": "The region ID where the endpoint group (backend origin server) is located, for example, cn-hangzhou.",
"Default": "cn-hangzhou"
},
"BackendEndpoint": {
"Type": "String",
"Label": "Backend Origin Server Address",
"Description": "The public IP address or domain name of the backend origin server.",
"Default": "47.111.111.111"
},
"BackendPort": {
"Type": "Number",
"Label": "Backend Origin Server Port",
"Description": "The listening port of the backend origin server. Listener port 443 will be forwarded to this port.",
"Default": 80
},
"EndpointType": {
"Type": "String",
"Label": "Endpoint Type",
"Description": "The endpoint type. PublicIp: public IP address. Domain: custom domain name. Ip: custom IP address.",
"AllowedValues": ["PublicIp", "Domain", "Ip"],
"Default": "PublicIp"
},
"DefaultDomain": {
"Type": "String",
"Label": "Default Certificate Domain",
"Description": "The domain name corresponding to the default certificate of the listener, for example, www.example.com.",
"Default": "www.example.com"
},
"DefaultCert": {
"Type": "String",
"Label": "Default Certificate Content",
"Description": "The content of the default SSL certificate for the listener (PEM format)."
},
"DefaultKey": {
"Type": "String",
"Label": "Default Certificate Private Key",
"Description": "The private key content of the default SSL certificate for the listener (PEM format).",
"NoEcho": true
},
"AdditionalDomain": {
"Type": "String",
"Label": "Additional Certificate Domain",
"Description": "The domain name corresponding to the additional certificate, for example, api.example.com.",
"Default": "api.example.com"
},
"AdditionalCert": {
"Type": "String",
"Label": "Additional Certificate Content",
"Description": "The content of the additional SSL certificate (PEM format). Must be different from the default certificate."
},
"AdditionalKey": {
"Type": "String",
"Label": "Additional Certificate Private Key",
"Description": "The private key content of the additional SSL certificate (PEM format).",
"NoEcho": true
}
},
"Resources": {
"Accelerator": {
"Type": "ALIYUN::GA::Accelerator",
"Properties": {
"AcceleratorName": { "Ref": "AcceleratorName" },
"Spec": { "Ref": "Spec" },
"InstanceChargeType": "PostPaid"
}
},
"BandwidthPackage": {
"Type": "ALIYUN::GA::BandwidthPackage",
"Properties": {
"Type": "Basic",
"Bandwidth": { "Ref": "Bandwidth" }
}
},
"BandwidthAddition": {
"Type": "ALIYUN::GA::BandwidthPackageAcceleratorAddition",
"Properties": {
"BandwidthPackageId": { "Fn::GetAtt": ["BandwidthPackage", "BandwidthPackageId"] },
"AcceleratorId": { "Fn::GetAtt": ["Accelerator", "AcceleratorId"] }
},
"DependsOn": ["Accelerator", "BandwidthPackage"]
},
"IpSets": {
"Type": "ALIYUN::GA::IpSets",
"Properties": {
"AcceleratorId": { "Fn::GetAtt": ["Accelerator", "AcceleratorId"] },
"AccelerateRegion": [
{
"AccelerateRegionId": { "Ref": "AccelerateRegionId" },
"Bandwidth": 2,
"IpVersion": "IPv4"
}
]
},
"DependsOn": "Accelerator"
},
"CasCertDefault": {
"Type": "ALIYUN::CAS::Certificate",
"Properties": {
"Cert": { "Ref": "DefaultCert" },
"Key": { "Ref": "DefaultKey" },
"Name": "ga-default-cert"
}
},
"CasCertAdditional": {
"Type": "ALIYUN::CAS::Certificate",
"Properties": {
"Cert": { "Ref": "AdditionalCert" },
"Key": { "Ref": "AdditionalKey" },
"Name": "ga-additional-cert"
}
},
"Listener": {
"Type": "ALIYUN::GA::Listener",
"Properties": {
"AcceleratorId": { "Fn::GetAtt": ["Accelerator", "AcceleratorId"] },
"Protocol": "https",
"PortRanges": [{ "FromPort": 443, "ToPort": 443 }],
"Certificates": [{ "Id": { "Fn::GetAtt": ["CasCertDefault", "CertId"] } }],
"Name": "ga-https-listener"
},
"DependsOn": ["Accelerator", "CasCertDefault"]
},
"CertListenerAssociation": {
"Type": "ALIYUN::GA::CertificatesListenerAssociation",
"Properties": {
"AcceleratorId": { "Fn::GetAtt": ["Accelerator", "AcceleratorId"] },
"ListenerId": { "Fn::GetAtt": ["Listener", "ListenerId"] },
"Certificates": [
{ "Id": { "Fn::GetAtt": ["CasCertAdditional", "CertId"] }, "Domain": { "Ref": "AdditionalDomain" } }
]
},
"DependsOn": ["Listener", "CasCertAdditional"]
},
"EndpointGroup": {
"Type": "ALIYUN::GA::EndpointGroup",
"Properties": {
"AcceleratorId": { "Fn::GetAtt": ["Accelerator", "AcceleratorId"] },
"ListenerId": { "Fn::GetAtt": ["Listener", "ListenerId"] },
"EndpointGroupRegion": { "Ref": "BackendRegion" },
"EndpointRequestProtocol": "HTTP",
"EndpointConfigurations": [
{ "Type": { "Ref": "EndpointType" }, "Endpoint": { "Ref": "BackendEndpoint" }, "Weight": 100 }
],
"HealthCheckEnabled": true,
"HealthCheckProtocol": "tcp",
"PortOverrides": [{ "ListenerPort": 443, "EndpointPort": { "Ref": "BackendPort" } }]
},
"DependsOn": "Listener"
}
},
"Outputs": {
"AcceleratorId": {
"Description": "The ID of the Global Accelerator instance.",
"Value": { "Fn::GetAtt": ["Accelerator", "AcceleratorId"] }
},
"AcceleratorCname": {
"Description": "The CNAME acceleration domain name of the Global Accelerator instance.",
"Value": { "Fn::GetAtt": ["Accelerator", "DnsName"] }
},
"ListenerId": {
"Description": "The ID of the HTTPS listener.",
"Value": { "Fn::GetAtt": ["Listener", "ListenerId"] }
},
"EndpointGroupId": {
"Description": "The ID of the endpoint group.",
"Value": { "Fn::GetAtt": ["EndpointGroup", "EndpointGroupId"] }
},
"Certificates": {
"Description": "The list of additional certificates associated with the listener.",
"Value": { "Fn::GetAtt": ["CertListenerAssociation", "Certificates"] }
}
}
}