Deleting static access keys
Written by
Updated at November 14, 2024
Management console
CLI
API
- Go to the folder that the service account belongs to.
- In the list of services, select Identity and Access Management.
- In the left-hand panel, select
Service accounts and select the required service account. - Under Access keys, click
in the line with the key to delete, and select Delete. - In the window that opens, click Delete.
If you do not have the Yandex Cloud command line interface yet, install and initialize it.
-
Get a list of static key IDs (
ID
) for a specific service account. Specify the service account name in the--service-account-name
parameter:yc iam access-key list --service-account-name <service_account_name>
Result:
+----------------------+----------------------+----------------------+ | ID | SERVICE ACCOUNT ID | KEY ID | +----------------------+----------------------+----------------------+ | aje8bdtqec6l******** | ajeedllrkjma******** | R9JK04o1Dfaf******** | | ajegqpa91bta******** | ajeedllrkjma******** | cWXGkDoBRho5******** | +----------------------+----------------------+----------------------+
-
Delete the old static key. Replace
<ID>
with your API key ID:yc iam access-key delete <ID>
To delete a static key, use the delete REST API method for the AccessKey REST API resource or the AccessKeyService/Delete gRPC API call.