Queries one or more ECS key pairs.
Syntax
{
"Type": "DATASOURCE::ECS::KeyPairs",
"Properties": {
"KeyPairFingerPrint": String,
"KeyPairName": String,
"ResourceGroupId": String,
"Tags": List,
"RefreshOptions": String
}
}
Properties
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
KeyPairFingerPrint |
String |
No |
Yes |
The fingerprint of the key pair. |
MD5 is used based on the public key fingerprint format defined in RFC 4716. For more information, see RFC 4716. |
|
KeyPairName |
String |
No |
Yes |
The name of the key pair. |
Supports the wildcard character (
|
|
ResourceGroupId |
String |
No |
Yes |
The ID of the resource group to which the key pair belongs. |
None. |
|
Tags |
List |
No |
Yes |
The tags of the key pair. |
You can add up to 20 tags. For more information, see Tags properties. |
|
RefreshOptions |
String |
No |
Yes |
The refresh policy for data source resources when the stack is updated. |
Valid values:
|
Tags syntax
"Tags": [
{
"Value": String,
"Key": String
}
]
Tags properties
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
Value |
String |
No |
No |
The tag value of the key pair. |
The tag value can be up to 128 characters in length and cannot contain |
|
Key |
String |
Yes |
No |
The tag key of the key pair. |
The tag key must be 1 to 128 characters in length and cannot contain |
Return values (Fn::GetAtt)
-
KeyPairNames: the names of the key pairs.
-
KeyPairs: details of the key pairs.
|
Property |
Type |
Description |
Constraint |
|
KeyPairNames |
List |
The names of the key pairs. |
None. |
|
KeyPairs |
List |
Details of the key pairs. |
None. |
|
KeyPairName |
String |
The name of the key pair. |
Example: testKeyPairName. |
|
KeyPairFingerPrint |
String |
The fingerprint of the key pair. |
Example: ABC1234567. |
|
ResourceGroupId |
String |
The ID of the resource group. |
Example: rg-amnhr7u7c7hj****. |
|
Tags |
List |
The tags of the key pair. |
None. |
Examples
JSON format
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"KeyPairName": {
"Type": "String",
"Description": "The name of the key pair. You can use the asterisk (*) symbol as a wildcard in regular expressions to query key pairs by performing a fuzzy search. Sample patterns:\n*SshKey: queries key pairs whose names end with SshKey, including the key pair named SshKey.\nSshKey*: 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.\nSshKey: queries the key pair named SshKey."
}
},
"Resources": {
"KeyPairs": {
"Type": "DATASOURCE::ECS::KeyPairs",
"Properties": {
"KeyPairName": {
"Ref": "KeyPairName"
}
}
}
},
"Outputs": {
"KeyPairs": {
"Value": {
"Fn::GetAtt": [
"KeyPairs",
"KeyPairs"
]
}
},
"KeyPairNames": {
"Value": {
"Fn::GetAtt": [
"KeyPairs",
"KeyPairNames"
]
}
}
}
}