View a markdown version of this page

ResetTokenVaultKeyMaterial - Amazon Bedrock AgentCore Control Plane

ResetTokenVaultKeyMaterial

Resets the key material for a token vault whose customer managed AWS KMS key has been deleted, and re-encrypts the token vault with an AWS managed key so that you can use the token vault again.

Important

This operation can't be undone. The reset permanently deletes the OAuth2 access tokens and refresh tokens stored in the token vault, including tokens obtained through all supported flows. After the reset, your agents must complete these flows again to get new tokens, and for user-delegated flows your users must authorize access again. The reset doesn't delete your credential providers or their configuration.

You can reset a token vault only if its customer managed key has been deleted. If the key still exists, including when it's disabled or scheduled for deletion, this operation returns a ValidationException. To use the token vault again, enable the key or cancel its scheduled deletion in AWS KMS. To switch to a different key, use SetTokenVaultCMK.

Request Syntax

POST /identities/reset-token-vault-key-material HTTP/1.1 Content-type: application/json { "tokenVaultId": "string" }

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

tokenVaultId

The unique identifier of the token vault to reset. To reset your account's default token vault, specify default.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [a-zA-Z0-9\-_]+

Required: Yes

Response Syntax

HTTP/1.1 200 Content-type: application/json { "kmsConfiguration": { "keyType": "string", "kmsKeyArn": "string" }, "lastModifiedDate": number, "tokenVaultId": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

kmsConfiguration

The AWS KMS configuration for the token vault after the reset. The token vault uses an AWS managed key.

Type: KmsConfiguration object

lastModifiedDate

The timestamp when the token vault was last modified.

Type: Timestamp

tokenVaultId

The ID of the token vault.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [a-zA-Z0-9\-_]+

Errors

For information about the errors that are common to all actions, see Common Error Types.

AccessDeniedException

This exception is thrown when a request is denied per access permissions

HTTP Status Code: 403

ConflictException

This exception is thrown when there is a conflict performing an operation

HTTP Status Code: 409

InternalServerException

This exception is thrown if there was an unexpected error during processing of request

HTTP Status Code: 500

ResourceNotFoundException

This exception is thrown when a resource referenced by the operation does not exist

HTTP Status Code: 404

ThrottlingException

This exception is thrown when the number of requests exceeds the limit

HTTP Status Code: 429

UnauthorizedException

This exception is thrown when the JWT bearer token is invalid or not found for OAuth bearer token based access

HTTP Status Code: 401

ValidationException

The input fails to satisfy the constraints specified by the service.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: