Define um par chave-valor em um bucket KV.
Sintaxe
{
"Type": "ALIYUN::ESA::Kv",
"Properties": {
"Key": String,
"Namespace": String,
"Value": String,
"ExpirationTtl": Integer,
"Expiration": Integer
}
}
Propriedades
|
Nome da propriedade |
Tipo |
Obrigatório |
Atualizável |
Descrição |
Restrições |
|
Key |
String |
Sim |
Não |
Nome da chave. |
Até 512 caracteres. Não pode conter espaços ou barras invertidas (/). |
|
Namespace |
String |
Sim |
Não |
Nome do bucket KV. |
Nenhuma. |
|
Value |
String |
Sim |
Sim |
Valor da chave. |
Tamanho máximo: 2 MB (2 × 1000 × 1000 bytes). |
|
ExpirationTtl |
Integer |
Não |
Não |
Tempo de expiração da chave. |
Tempo de expiração da chave em segundos, relativo ao horário atual. Se Expiration e ExpirationTtl forem definidos, ExpirationTtl terá precedência. |
|
Expiration |
Integer |
Não |
Não |
Tempo de expiração da chave. |
Timestamp UNIX em segundos. O valor não pode ser anterior ao horário atual. Se Expiration e ExpirationTtl forem definidos, ExpirationTtl terá precedência. |
Valores de retorno
Fn::GetAtt
Value: o valor da chave.
Exemplos
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
Value:
Type: String
Description: The content of the key. If the content has more than 256 characters in length, the system displays the first 100 and the last 100 characters, and omits the middle part.
Required: true
Namespace:
Type: String
Description: The name specified when calling [CreatevNamespace] https://www.alibabacloud.com/help/document_detail/2850317.html.
Required: true
Key:
Type: String
Description: kv.
Required: true
Resources:
ExtensionResource:
Type: ALIYUN::ESA::Kv
Properties:
Value:
Ref: Value
Namespace:
Ref: Namespace
Key:
Ref: Key
Outputs:
Value:
Description: The content of the key. If the content has more than 256 characters in length, the system displays the first 100 and the last 100 characters, and omits the middle part.
Value:
Fn::GetAtt:
- ExtensionResource
- Value
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"Value": {
"Type": "String",
"Description": "The content of the key. If the content has more than 256 characters in length, the system displays the first 100 and the last 100 characters, and omits the middle part.",
"Required": true
},
"Namespace": {
"Type": "String",
"Description": "The name specified when calling [CreatevNamespace] https://www.alibabacloud.com/help/document_detail/2850317.html.",
"Required": true
},
"Key": {
"Type": "String",
"Description": "kv.",
"Required": true
}
},
"Resources": {
"ExtensionResource": {
"Type": "ALIYUN::ESA::Kv",
"Properties": {
"Value": {
"Ref": "Value"
},
"Namespace": {
"Ref": "Namespace"
},
"Key": {
"Ref": "Key"
}
}
}
},
"Outputs": {
"Value": {
"Description": "The content of the key. If the content has more than 256 characters in length, the system displays the first 100 and the last 100 characters, and omits the middle part.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Value"
]
}
}
}
}