La ressource ALIYUN::SLB::Certificate permet de charger un certificat sur une instance Server Load Balancer (SLB). Elle prend en charge les certificats serveur et les certificats d'autorité de certification (CA).
Si vous définissez
CertificateTypesurCA, vous ne pouvez charger qu'un seul certificat CA à la fois.Si vous définissez
CertificateTypesurServer, vous ne pouvez charger qu'un seul certificat serveur et sa clé privée associée à la fois.
Syntaxe
{
"Type": "ALIYUN::SLB::Certificate",
"Properties": {
"CertificateName": String,
"Certificate": String,
"AliCloudCertificateName": String,
"PrivateKey": String,
"ResourceGroupId": String,
"CertificateType": String,
"AliCloudCertificateId": String,
"AliCloudCertificateRegionId": String,
"Tags": List
}
}
Propriétés
Propriété | Type | Obligatoire | Modifiable | Description | Contrainte |
ResourceGroupId | String | Non | Oui | ID du groupe de ressources. | Aucune. |
CertificateName | String | Non | Oui | Nom du certificat. | Aucune. |
Certificate | String | Non | Non | Contenu du certificat à charger. | Aucune. |
AliCloudCertificateName | String | Non | Non | Nom du certificat fourni par le service Certificate Management Service. | Aucune. |
PrivateKey | String | Non | Non | Clé privée à charger. | Aucune. |
AliCloudCertificateId | String | Non | Non | ID du certificat fourni par le service Certificate Management Service. | Cette propriété est obligatoire lors de l'utilisation d'un certificat fourni par Certificate Management Service. |
AliCloudCertificateRegionId | String | Non | Non | ID de la région du certificat émis par Alibaba Cloud. | Remarque Vous devez spécifier cette propriété lorsque vous utilisez un certificat émis par Alibaba Cloud. |
CertificateType | String | Non | Non | Type de certificat. | Valeurs valides :
|
Tags | List | Non | Oui | Étiquettes. | Ajoutez jusqu'à 20 étiquettes. Pour plus d'informations, consultez la section Propriétés des étiquettes. |
Syntaxe des étiquettes
"Tags": [
{
"Key": String,
"Value": String
}
]
Propriétés des étiquettes
|
Propriété |
Type |
Obligatoire |
Modifiable |
Description |
Contrainte |
|
Key |
String |
Oui |
Non |
Clé de l'étiquette. |
La clé doit comporter entre 1 et 128 caractères et ne peut pas contenir |
|
Value |
String |
Non |
Non |
Valeur de l'étiquette. |
La valeur peut comporter jusqu'à 128 caractères et ne peut pas contenir |
Valeurs de retour
Fn::GetAtt
CertificateId : ID du certificat.
Fingerprint : empreinte numérique du certificat.
Arn : nom de ressource Alibaba Cloud (ARN).
Exemples
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"
]
}
}
}
}