DATASOURCE::ECS::KeyPair类型用于查询一个密钥对详情。
语法
{
"Type": "DATASOURCE::ECS::KeyPair",
"Properties": {
"KeyPairName": String,
"RefreshOptions": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
KeyPairName | String | 是 | 是 | 密钥对名称。 | 无 |
RefreshOptions | String | 否 | 是 | 当资源栈更新时,数据源资源的刷新策略。 | 有效值:
|
返回值
Fn::GetAtt
KeyPairName:密钥对名称。
ResourceGroupId:资源组ID。
CreateTime:密钥对创建时间。
FingerPrint:密钥对的指纹。
Tags:密钥对绑定的标签。
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
KeyPairName:
Type: String
Description:
en: |-
The name of the key pair. You can use the asterisk (*) symbol as a wildcard in regular expressions to perform a fuzzy search for key pairs. Sample patterns:
- *SshKey: queries key pairs whose names end with SshKey, including the key pair named SshKey.
- SshKey*: queries key pairs whose names start with SshKey, including the key pair named SshKey.
- *SshKey*: queries key pairs whose names include SshKey, including the key pair named SshKey.
- SshKey: queries the key pair named SshKey.
Required: true
AssociationProperty: ALIYUN::ECS::KeyPair::KeyPairName
Resources:
ExtensionDataSource:
Type: DATASOURCE::ECS::KeyPair
Properties:
KeyPairName:
Ref: KeyPairName
Outputs:
KeyPairName:
Description: The name of the key pair.
Value:
Fn::GetAtt:
- ExtensionDataSource
- KeyPairName
ResourceGroupId:
Description: The ID of the resource group.
Value:
Fn::GetAtt:
- ExtensionDataSource
- ResourceGroupId
CreateTime:
Description: The time when the key pair was created.
Value:
Fn::GetAtt:
- ExtensionDataSource
- CreateTime
FingerPrint:
Description: The fingerprint of the key pair.
Value:
Fn::GetAtt:
- ExtensionDataSource
- FingerPrint
Tags:
Description: The tags of the key pair.
Value:
Fn::GetAtt:
- ExtensionDataSource
- Tags
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"KeyPairName": {
"Type": "String",
"Description": {
"en": "The name of the key pair. You can use the asterisk (*) symbol as a wildcard in regular expressions to perform a fuzzy search for key pairs. Sample patterns:\n- *SshKey: queries key pairs whose names end with SshKey, including the key pair named SshKey.\n- SshKey*: queries key pairs whose names start with SshKey, including the key pair named SshKey.\n- *SshKey*: queries key pairs whose names include SshKey, including the key pair named SshKey.\n- SshKey: queries the key pair named SshKey."
},
"Required": true,
"AssociationProperty": "ALIYUN::ECS::KeyPair::KeyPairName"
}
},
"Resources": {
"ExtensionDataSource": {
"Type": "DATASOURCE::ECS::KeyPair",
"Properties": {
"KeyPairName": {
"Ref": "KeyPairName"
}
}
}
},
"Outputs": {
"KeyPairName": {
"Description": "The name of the key pair.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"KeyPairName"
]
}
},
"ResourceGroupId": {
"Description": "The ID of the resource group.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"ResourceGroupId"
]
}
},
"CreateTime": {
"Description": "The time when the key pair was created.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"CreateTime"
]
}
},
"FingerPrint": {
"Description": "The fingerprint of the key pair.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"FingerPrint"
]
}
},
"Tags": {
"Description": "The tags of the key pair.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"Tags"
]
}
}
}
}
文档内容是否对您有帮助?