Skip to main content

Get

Returns the specified access key.

To get the list of available access keys, make a List request.

import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";

const GetAccessKeyRequest =
cloudApi.iam.awscompatibility_access_key_service.GetAccessKeyRequest;

(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.AccessKeyServiceClient);

const result = await client.get(
GetAccessKeyRequest.fromPartial({
accessKeyId: "accessKeyId",
})
);
console.log(result);
})();

GetAccessKeyRequest

accessKeyId : string

ID of the AccessKey resource to return. To get the access key ID, use a AccessKeyService.List request.

AccessKey

An access key. For more information, see AWS-compatible access keys.

id : string

ID of the AccessKey resource. It is used to manage secret credentials: an access key ID and a secret access key.

serviceAccountId : string

ID of the service account that the access key belongs to.

createdAt : google.protobuf.Timestamp

Creation timestamp.

description : string

Description of the access key. 0-256 characters long.

keyId : string

ID of the access key. The key is AWS compatible.

lastUsedAt : google.protobuf.Timestamp

Timestamp for the last authentication using this Access key.