Deleting static access keys
Written by
Updated at October 17, 2024
Management console
CLI
API
- Go to the folder that the service account belongs to.
- At the top of the screen, go to the Service accounts tab.
- Choose a service account and click the row with its name.
- Under Access keys, click
next to the key to be deleted 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
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. Instead of
<ID>
, specify the static 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.