Deleting an Access Key

You can delete one or more access keys associated with your account if you no longer need them.

Deleting an Access Key Using Cockpit v2

  1. In the top right corner, click the IconProfil icon.
    A drop-down menu appears.

  2. Click IconUserKey Access Keys.
    The list of your access keys appears.

  3. Select the access key you want to delete.
    The access key is selected.

  4. Click IconTerminate Delete.
    A confirmation dialog box appears.

  5. Click Delete.
    The access key is deleted.

Deleting an Access Key Using OSC CLI

The DeleteAccessKey command deletes the specified access key of either your root account or an EIM user.

The access key of an EIM user must be in the INACTIVE state to be deleted.

Request sample: Deleting one of your own access keys (if you are the root account or an EIM user)
$ osc-cli api DeleteAccessKey --profile "default" \
    --AccessKeyId "ABCDEFGHIJ0123456789"
Request sample: Deleting the access key of a specific EIM user
$ osc-cli api DeleteAccessKey --profile "default" \
    --AccessKeyId "ABCDEFGHIJ0123456789" \
    --UserName "example-user"
Request sample: Example with login/password authentication
$ osc-cli api DeleteAccessKey --profile "default" --authentication-method "password" --login "$OSC_EMAIL" --password "$OSC_PASSWORD" \
    --AccessKeyId "ABCDEFGHIJ0123456789" \
    --UserName "example-user"

This command contains the following attributes that you need to specify:

  • AccessKeyId: The ID of the access key you want to delete.

  • DryRun: (optional) If true, checks whether you have the required permissions to perform the action.

  • UserName: (optional) The name of the EIM user the access key you want to delete is associated with. By default, the user who sends the request (which can be the root account).

The DeleteAccessKey command returns the following elements:

  • ResponseContext: Information about the context of the response.

    • RequestId: The ID of the request.

Result sample
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

Deleting an Access Key Using oapi-cli

The DeleteAccessKey command deletes the specified access key of either your root account or an EIM user.

The access key of an EIM user must be in the INACTIVE state to be deleted.

Request sample: Deleting one of your own access keys (if you are the root account or an EIM user)
$ oapi-cli --profile "default" DeleteAccessKey \
    --AccessKeyId "ABCDEFGHIJ0123456789"
Request sample: Deleting the access key of a specific EIM user
$ oapi-cli --profile "default" DeleteAccessKey \
    --AccessKeyId "ABCDEFGHIJ0123456789" \
    --UserName "example-user"
Request sample: Example with login/password authentication
$ oapi-cli --profile "default" --login "$OSC_EMAIL" --password "$OSC_PASSWORD" DeleteAccessKey \
    --AccessKeyId "ABCDEFGHIJ0123456789" \
    --UserName "example-user"

This command contains the following attributes that you need to specify:

  • AccessKeyId: The ID of the access key you want to delete.

  • DryRun: (optional) If true, checks whether you have the required permissions to perform the action.

  • UserName: (optional) The name of the EIM user the access key you want to delete is associated with. By default, the user who sends the request (which can be the root account).

The DeleteAccessKey command returns the following elements:

  • ResponseContext: Information about the context of the response.

    • RequestId: The ID of the request.

Result sample
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

Related Pages

Corresponding API Methods