Associates an additional certificate with an HTTPS listener.
Description
- You can associate additional certificates with only HTTPS listeners.
- AssociateAdditionalCertificatesWithListener is an asynchronous operation. After you send a request, the system returns a request
ID, but the operation is still being performed in the system background. You can call
the DescribeListener operation to query the state of the listener with which you attempt to associate
an additional certificate.
- If the listener is in the updating state, it indicates that the additional certificate is being associated. In this case, you can perform only query operations.
- If the listener is in the active state, it indicates that the additional certificate is associated.
- The AssociateAdditionalCertificatesWithListener operation cannot be called repeatedly for the same Global Accelerator (GA) instance within a specific period of time.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | AssociateAdditionalCertificatesWithListener |
The operation that you want to perform. Set the value to AssociateAdditionalCertificatesWithListener. |
RegionId | String | Yes | cn-hangzhou |
The ID of the region where the GA instance is deployed. Set the value to cn-hangzhou. |
ClientToken | String | No | 123e4567-e89b-12d3-a456-426655440000 |
The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must make sure that it is unique among different requests. ClientToken can contain only ASCII characters. Note If you do not set this parameter, ClientToken is set to the value of RequestId. The value of RequestId may be different for each API request.
|
AcceleratorId | String | Yes | ga-bp1odcab8tmno0hdq**** |
The ID of the GA instance. |
ListenerId | String | Yes | lsr-bp1bpn0kn908w4nbw**** |
The ID of the listener. Only HTTPS listeners are supported. |
Certificates.N.Id | String | Yes | 6092**-cn-hangzhou |
The ID of the certificate. Only server certificates are supported. You can specify up to 10 certificate IDs in each request. |
Certificates.N.Domain | String | Yes | example.com |
The domain name specified by the certificate. You can associate each domain name with only a single additional certificate. You can specify up to 10 domain names in each request. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 6FEA0CF3-D3B9-43E5-A304-D217037876A8 |
The ID of the request. |
ListenerId | String | lsr-bp1bpn0kn908w4nbw**** |
The ID of the listener. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=AssociateAdditionalCertificatesWithListener
&RegionId=cn-hangzhou
&ClientToken=123e4567-e89b-12d3-a456-426655440000
&AcceleratorId=ga-bp1odcab8tmno0hdq****
&ListenerId=lsr-bp1bpn0kn908w4nbw****
&Certificates=[{"Id":"6092**-cn-hangzhou","Domain":"example.com"}]
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<AssociateAdditionalCertificatesWithListenerResponse>
<RequestId>6FEA0CF3-D3B9-43E5-A304-D217037876A8</RequestId>
<ListenerId>lsr-bp1bpn0kn908w4nbw****</ListenerId>
</AssociateAdditionalCertificatesWithListenerResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "6FEA0CF3-D3B9-43E5-A304-D217037876A8",
"ListenerId" : "lsr-bp1bpn0kn908w4nbw****"
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | ProtocalIllegal.Listener | The specified listener protocol is invalid. | The error message returned because the listener protocol is invalid. |
400 | NotExist.Accelerator | The accelerated instance does not exist. | The error message returned because the specified GA instance does not exist. |
400 | QuotaExceeded.Listener | The maximum number of listeners is exceeded. | The error message returned because the number of listeners has reached the upper limit. |
400 | PortRangeIllegal.Listener | The specified listener port range is invalid. | The error message returned because the listener port range is invalid. |
400 | PortConflict.Listener | The listener port configuration is in conflict. | The error message returned because the configuration of the specified listener port conflicts with that of another listener port. |
400 | QuotaExceeded.ListenerPort | The maximum number of listener ports is exceeded. | The error message returned because the number of listener ports has reached the upper limit. |
400 | PortRangeIllegal.ExceedGaAbility | The listener port range is invalid. For each accelerator instance, you can only create a listener with port range over 300 for each protocol (TCP and UDP). | The error message returned because the listener port range is invalid. For each GA instance, you can create only one TCP listener and one UDP listener with a range of more than 300 consecutive ports. |
400 | PortRangeIllegal.UDP | UDP ports 250, 4789, and 4790 are system reserved ports. | The error message returned because ports 250, 4789, and 4790 cannot be specified for UDP listeners. These ports are reserved by the system. |
400 | SystemPort.Listener | Ports 65500-65535 are system reserved ports. | The error message returned because ports 65500 to 65535 are reserved by the system. |
400 | PortRanges.MustOne | The portRanges must be one for HTTPS and HTTP type listener. | The error message returned because an HTTP or HTTPS listener supports only one port. |
For a list of error codes, visit the API Error Center.