Method 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.
  • PEM_FILE: Privacy-Enhanced Mail (PEM) format. Default value.

Response

HTTP Code: 200 - OK

{
  "id": "string",
  "createdAt": "string",
  "description": "string",
  "keyAlgorithm": "string",
  "publicKey": "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.

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.
  • RSA_2048: RSA with a 2048-bit key size. Default value.
  • RSA_4096: RSA with a 4096-bit key size.
publicKey string

A public key of the Key resource.

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.