Identity and Access Management API, REST: Key.get
Returns the specified Key resource.
To get the list of available Key resources, make a list request.
HTTP request
GET https://iam.api.cloud.yandex.net/iam/v1/keys/{keyId}
Path parameters
Parameter | Description |
---|---|
keyId | Required. ID of the Key resource to return. To get the ID use a list request. The maximum string length in characters is 50. |
Query parameters
Parameter | Description |
---|---|
format | Output format of the key.
|
Response
HTTP Code: 200 - OK
{
"id": "string",
"createdAt": "string",
"description": "string",
"keyAlgorithm": "string",
"publicKey": "string",
"lastUsedAt": "string",
// includes only one of the fields `userAccountId`, `serviceAccountId`
"userAccountId": "string",
"serviceAccountId": "string",
// end of the list of possible fields
}
A Key resource. For more information, see Authorized keys.
Field | Description |
---|---|
id | string ID of the Key resource. |
createdAt | string (date-time) Creation timestamp. String in RFC3339 text format. The range of possible values is from To work with values in this field, use the APIs described in the Protocol Buffers reference. In some languages, built-in datetime utilities do not support nanosecond precision (9 digits). |
description | string Description of the Key resource. 0-256 characters long. |
keyAlgorithm | string An algorithm used to generate a key pair of the Key resource.
|
publicKey | string A public key of the Key resource. |
lastUsedAt | string (date-time) Timestamp for the last use of this key. String in RFC3339 text format. The range of possible values is from To work with values in this field, use the APIs described in the Protocol Buffers reference. In some languages, built-in datetime utilities do not support nanosecond precision (9 digits). |
userAccountId | string includes only one of the fields userAccountId , serviceAccountId ID of the user account that the Key resource belongs to. |
serviceAccountId | string includes only one of the fields userAccountId , serviceAccountId ID of the service account that the Key resource belongs to. |