O recurso ALIYUN::CloudPhone::KeyPair importa a chave pública de um par de chaves com criptografia RSA gerado por ferramenta de terceiros.
Sintaxe
{
"Type": "ALIYUN::CloudPhone::KeyPair",
"Properties": {
"KeyPairName": String,
"PublicKeyBody": String
}
}
Propriedades
|
Propriedade |
Tipo |
Obrigatória |
Editável |
Descrição |
Restrição |
|
KeyPairName |
String |
Sim |
Não |
Nome do par de chaves. |
O nome deve ser globalmente único e ter de 2 a 128 caracteres. Deve começar com uma letra e não pode iniciar com |
|
PublicKeyBody |
String |
Sim |
Não |
Chave pública do par de chaves. |
Nenhuma. |
Valores de retorno
Fn::GetAtt
KeyPairFingerPrint: impressão digital do par de chaves. Usa o hash MD5 conforme o formato de impressão digital de chave pública definido na RFC 4716.
KeyPairName: nome do par de chaves.
CreateTime: data e hora de criação do par de chaves.
Exemplos
Formato YAML
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
KeyPairName:
Description:
en: The name of the key pair. The name must be globally unique. The name must
be 2 to 128 characters in length. The name must start with a letter but cannot
start with http:// or https://. The name can contain letters, digits, colons
(:), underscores (_), and hyphens (-).
Required: true
Type: String
PublicKeyBody:
Description:
en: The public key content of the key pair.
Required: true
Type: String
Resources:
ExtensionResource:
Properties:
KeyPairName:
Ref: KeyPairName
PublicKeyBody:
Ref: PublicKeyBody
Type: ALIYUN::CloudPhone::KeyPair
Outputs:
CreateTime:
Description: The creation time of the resource.
Value:
Fn::GetAtt:
- ExtensionResource
- CreateTime
KeyPairFingerPrint:
Description: The fingerprint of the key pair. The message-digest algorithm 5 (MD5)
is used based on the public key fingerprint format defined in RFC 4716.
Value:
Fn::GetAtt:
- ExtensionResource
- KeyPairFingerPrint
KeyPairName:
Description: The name of the key pair.
Value:
Fn::GetAtt:
- ExtensionResource
- KeyPairName
Formato JSON
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"KeyPairName": {
"Type": "String",
"Description": {
"en": "The name of the key pair. The name must be globally unique. The name must be 2 to 128 characters in length. The name must start with a letter but cannot start with http:// or https://. The name can contain letters, digits, colons (:), underscores (_), and hyphens (-)."
},
"Required": true
},
"PublicKeyBody": {
"Type": "String",
"Description": {
"en": "The public key content of the key pair."
},
"Required": true
}
},
"Resources": {
"ExtensionResource": {
"Type": "ALIYUN::CloudPhone::KeyPair",
"Properties": {
"KeyPairName": {
"Ref": "KeyPairName"
},
"PublicKeyBody": {
"Ref": "PublicKeyBody"
}
}
}
},
"Outputs": {
"KeyPairFingerPrint": {
"Description": "The fingerprint of the key pair. The message-digest algorithm 5 (MD5) is used based on the public key fingerprint format defined in RFC 4716.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"KeyPairFingerPrint"
]
}
},
"KeyPairName": {
"Description": "The name of the key pair.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"KeyPairName"
]
}
},
"CreateTime": {
"Description": "The creation time of the resource.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"CreateTime"
]
}
}
}
}