ALIYUN::ESA::Kv类型用于设置KV存储空间的单个键值对。
语法
{
"Type": "ALIYUN::ESA::Kv",
"Properties": {
"Key": String,
"Namespace": String,
"Value": String,
"ExpirationTtl": Integer,
"Expiration": Integer
}
}属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
Key | String | 是 | 否 | 需要设置的键名称。 | 最长不超过 512 个字符,不能包含空格、反斜杠(/)。 |
Namespace | String | 是 | 否 | KV 存储空间的名字。 | 无 |
Value | String | 是 | 是 | 键的内容, | 最大 2 MB(2*1000*1000)。 |
ExpirationTtl | Integer | 否 | 否 | 键的过期时间。 | 相对时间,单位:秒。同时设置 Expiration 和 ExpirationTtl 时,以 ExpirationTtl 为准。 |
Expiration | Integer | 否 | 否 | 键的过期时间。 | 秒级时间戳,不能小于当前时间。同时设置 Expiration 和 ExpirationTtl 时,以 ExpirationTtl 为准。 |
返回值
Fn::GetAtt
Value:键的内容,
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
Value:
Type: String
Description:
en: 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:
en: The name specified when calling [CreatevNamespace] https://help.aliyun.com/document_detail/2850317.html.
Required: true
Key:
Type: String
Description:
en: 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": {
"en": "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": {
"en": "The name specified when calling [CreatevNamespace] https://help.aliyun.com/document_detail/2850317.html."
},
"Required": true
},
"Key": {
"Type": "String",
"Description": {
"en": "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"
]
}
}
}
}
该文章对您有帮助吗?