O recurso ALIYUN::SLB::Certificate permite fazer upload de um certificado para uma instância do Server Load Balancer (SLB). Há suporte para certificados de servidor e certificados de autoridade certificadora (CA).
Se você definir CertificateType como CA, será possível fazer upload de apenas um certificado CA por vez.
Caso defina CertificateType como Server, o upload fica limitado a um certificado de servidor e sua chave privada correspondente por vez.
Sintaxe
{
"Type": "ALIYUN::SLB::Certificate",
"Properties": {
"CertificateName": String,
"Certificate": String,
"AliCloudCertificateName": String,
"PrivateKey": String,
"ResourceGroupId": String,
"CertificateType": String,
"AliCloudCertificateId": String,
"AliCloudCertificateRegionId": String,
"Tags": List
}
}
Propriedades
Propriedade | Tipo | Obrigatória | Editável | Descrição | Restrição |
ResourceGroupId | String | Não | Sim | ID do grupo de recursos. | Nenhuma. |
CertificateName | String | Não | Sim | Nome do certificado. | Nenhuma. |
Certificate | String | Não | Não | Certificado a ser enviado. | Nenhuma. |
AliCloudCertificateName | String | Não | Não | Nome do certificado fornecido pelo Certificate Management Service. | Nenhuma. |
PrivateKey | String | Não | Não | Chave privada a ser enviada. | Nenhuma. |
AliCloudCertificateId | String | Não | Não | ID do certificado fornecido pelo Certificate Management Service. | Especifique esta propriedade ao utilizar um certificado emitido pelo Certificate Management Service. |
AliCloudCertificateRegionId | String | Não | Não | ID da região do certificado emitido pela Alibaba Cloud. | Nota É obrigatório especificar esta propriedade quando se utiliza um certificado emitido pela Alibaba Cloud. |
CertificateType | String | Não | Não | Tipo do certificado. | Valores válidos:
|
Tags | List | Não | Sim | As tags. | Limite de até 20 tags. Para mais informações, consulte Propriedades de Tags. |
Sintaxe de Tags
"Tags": [
{
"Key": String,
"Value": String
}
]
Propriedades de Tags
|
Propriedade |
Tipo |
Obrigatória |
Editável |
Descrição |
Restrição |
|
Key |
String |
Sim |
Não |
Chave da tag. |
Deve ter entre 1 e 128 caracteres e não pode conter |
|
Value |
String |
Não |
Não |
Valor da tag. |
Pode ter até 128 caracteres e não deve incluir |
Valores de retorno
Fn::GetAtt
CertificateId: ID do certificado.
Fingerprint: impressão digital do certificado.
Arn: Alibaba Cloud Resource Name (ARN).
Exemplos
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
AliCloudCertificateId:
Description: The ID of the Alibaba Cloud certificate.
Type: String
AliCloudCertificateName:
Description: The name of the Alibaba Cloud certificate.
Type: String
Certificate:
Description: The content of the certificate public key.
Type: String
CertificateName:
Description: The name of the certificate.
Type: String
CertificateType:
AllowedValues:
- Server
- CA
Default: Server
Description: The type of the certificate.
Type: String
PrivateKey:
Description: The private key.
Type: String
ResourceGroupId:
Description: Resource group id.
Type: String
Tags:
Description: Tags to attach to instance. Max support 20 tags to add during create
instance. Each tag with two properties Key and Value, and Key is required.
MaxLength: 20
Type: Json
Resources:
SLBCertificate:
Properties:
AliCloudCertificateId:
Ref: AliCloudCertificateId
AliCloudCertificateName:
Ref: AliCloudCertificateName
Certificate:
Ref: Certificate
CertificateName:
Ref: CertificateName
CertificateType:
Ref: CertificateType
PrivateKey:
Ref: PrivateKey
ResourceGroupId:
Ref: ResourceGroupId
Tags:
Ref: Tags
Type: ALIYUN::SLB::Certificate
Outputs:
CertificateId:
Description: The ID of the certificate.
Value:
Fn::GetAtt:
- SLBCertificate
- CertificateId
Fingerprint:
Description: The fingerprint of the certificate.
Value:
Fn::GetAtt:
- SLBCertificate
- Fingerprint
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"CertificateType": {
"Type": "String",
"Description": "The type of the certificate.",
"AllowedValues": [
"Server",
"CA"
],
"Default": "Server"
},
"AliCloudCertificateName": {
"Type": "String",
"Description": "The name of the Alibaba Cloud certificate."
},
"PrivateKey": {
"Type": "String",
"Description": "The private key."
},
"ResourceGroupId": {
"Type": "String",
"Description": "Resource group id."
},
"CertificateName": {
"Type": "String",
"Description": "The name of the certificate."
},
"Tags": {
"Type": "Json",
"Description": "Tags to attach to instance. Max support 20 tags to add during create instance. Each tag with two properties Key and Value, and Key is required.",
"MaxLength": 20
},
"Certificate": {
"Type": "String",
"Description": "The content of the certificate public key."
},
"AliCloudCertificateId": {
"Type": "String",
"Description": "The ID of the Alibaba Cloud certificate."
}
},
"Resources": {
"SLBCertificate": {
"Type": "ALIYUN::SLB::Certificate",
"Properties": {
"CertificateType": {
"Ref": "CertificateType"
},
"AliCloudCertificateName": {
"Ref": "AliCloudCertificateName"
},
"PrivateKey": {
"Ref": "PrivateKey"
},
"ResourceGroupId": {
"Ref": "ResourceGroupId"
},
"CertificateName": {
"Ref": "CertificateName"
},
"Tags": {
"Ref": "Tags"
},
"Certificate": {
"Ref": "Certificate"
},
"AliCloudCertificateId": {
"Ref": "AliCloudCertificateId"
}
}
}
},
"Outputs": {
"Fingerprint": {
"Description": "The fingerprint of the certificate.",
"Value": {
"Fn::GetAtt": [
"SLBCertificate",
"Fingerprint"
]
}
},
"CertificateId": {
"Description": "The ID of the certificate.",
"Value": {
"Fn::GetAtt": [
"SLBCertificate",
"CertificateId"
]
}
}
}
}