Configura se o recurso de certificado deve ser ativado para um site e atualiza as informações do certificado.
Experimente agora
Testar
Autorização RAM
|
Ação |
Nível de acesso |
Tipo de recurso |
Chave de condição |
Ação dependente |
|
esa:SetCertificate |
none |
*All Resource
|
Nenhuma | Nenhuma |
Parâmetros da solicitação
|
Parâmetro |
Tipo |
Obrigatório |
Descrição |
Exemplo |
| SiteId |
integer |
Sim |
O ID do site. Você pode chamar a operação ListSites para obter o ID do site. |
1234567890123 |
| Name |
string |
Não |
O nome do certificado. Este parâmetro é obrigatório quando Type é definido como upload. |
yourCertName |
| CasId |
integer |
Não |
O ID do certificado em nuvem. Este parâmetro é obrigatório quando Type é definido como cas. |
30000478 |
| Type |
string |
Sim |
O tipo de certificado. Valores válidos:
Valores válidos:
|
cas |
| Certificate |
string |
Não |
O conteúdo do certificado. Este parâmetro é obrigatório quando Type é definido como upload. |
-----BEGIN CERTIFICATE----- |
| PrivateKey |
string |
Não |
A chave privada do certificado. Este parâmetro é obrigatório quando Type é definido como upload. |
-----BEGIN PRIVATE KEY----- |
| Region |
string |
Não |
A região. Este parâmetro é obrigatório quando Type é definido como cas. Valores válidos:
|
cn-hangzhou |
| Id |
string |
Não |
O ID do certificado. Certificados do tipo gratuito (criados chamando a operação ApplyCertificate) não são suportados. Certificados dos tipos cas e upload são suportados. |
babae7c40fef412d887688b91c9e**** |
| KeyServerId |
string |
Não |
O ID do servidor sem chave. Este parâmetro só entra em vigor quando Type é definido como keyless. |
1233112**** |
Elementos de resposta
|
Elemento |
Tipo |
Descrição |
Exemplo |
|
object |
Esquema da resposta. |
||
| RequestId |
string |
O ID da solicitação. |
A666D44F-19D6-490E-97CF-1A64AB962C57 |
| Id |
string |
O ID do certificado. |
babae7c40fef412d887688b91c9e**** |
Exemplos
Resposta de sucesso
JSON formato
{
"RequestId": "A666D44F-19D6-490E-97CF-1A64AB962C57",
"Id": "babae7c40fef412d887688b91c9e****"
}
Códigos de erro
|
Código de status HTTP |
Código de erro |
Mensagem de erro |
Descrição |
|---|---|---|---|
| 400 | Certificate.StatusError | The status of the certificate is invalid. | The specified certificate status is invalid. |
| 400 | Certificate.Duplicated | The certificate name already exists. | The certificate is duplicated. |
| 400 | InvalidParameter | The specified parameter is invalid. | The specified parameter is invalid. |
| 400 | InvalidCertificate.NotFound | The specified certificate does not match the website. Check the validity of the certificate and try again. | The specified certificate does not match the website. Check the validity of the certificate and try again. |
| 400 | InvalidSSLPub | The specified Certificate is invalid. | The value specified for the Certificate parameter is invalid. |
| 400 | InvalidSSLPri | The specified PrivateKey is invalid. | The value specified for the PrivateKey parameter is invalid. |
| 400 | CasId.MissingParameter | The CasId parameter is required. | The CasId parameter is missing. |
| 400 | PrivateKey.MissingParameter | The PrivateKey parameter is required. | Missing PrivateKey parameter. |
| 400 | Certificate.MissingParameter | The Certificate parameter is required. | Missing Certificate parameter. |
| 400 | InvalidParameter.SiteId | Failed to query the website based on the SiteID you specified. Check parameter SiteId and try again. | Failed to query the website based on the SiteID you specified. Check parameter SiteId and try again. |
| 400 | InternalException | Failed to call the service. Try again later or contact technical support. | Failed to call the service. Try again later or contact technical support. |
| 400 | UpdateFreeCertificate.NotSupport | The free certificate does not support the update operation. | The free certificate does not support the update operation. |
| 400 | CertificateDomainNotMatchSite | The domain name in the specified certificate does not match the site. | The domain name in the certificate does not match the current site. |
| 400 | CertificateNotMatchPrivateKey | The specified certificate does not match the private key. | The specified certificate and private key do not match. |
| 400 | CertQuotaCheckFailed | The custom certificate quota verification failed. The number of uploaded certificates exceeds the upper limit allowed for the plan. | The custom certificate quota verification failed. The number of uploaded certificates exceeds the upper limit allowed for the plan. |
| 404 | Certificate.NotFound | The specified certificate does not exist. | The specified certificate does not exist. |
Consulte Códigos de Erro para uma lista completa.
Notas de versão
Consulte Notas de Versão para uma lista completa.