BedrockAgentCore / Client / delete_payment_session
delete_payment_session¶
- BedrockAgentCore.Client.delete_payment_session(**kwargs)¶
Delete a payment manager session
Permanently removes a payment session record from the database. This is a hard delete operation that removes the session completely.
Deleting a non-existent or already-deleted session returns ResourceNotFoundException (404).
Authorization: The caller must own the session (accountId, userId, and paymentManagerId must match). If authorization fails, a 403 Forbidden error is returned.
Errors:
ResourceNotFoundException: The session does not exist or has already been deleted
AccessDeniedException: The caller is not authorized to delete this session
ValidationException: Required fields are missing or invalid
InternalServerException: An unexpected server error occurred
See also: AWS API Documentation
Request Syntax
response = client.delete_payment_session( userId='string', paymentManagerArn='string', paymentSessionId='string' )
- Parameters:
userId (string) – The user ID making the delete request. Must match the session’s userId.
paymentManagerArn (string) –
[REQUIRED]
The payment manager ARN. Must match the session’s paymentManagerArn.
paymentSessionId (string) –
[REQUIRED]
The payment session ID to delete.
- Return type:
dict
- Returns:
Response Syntax
{ 'status': 'ACTIVE'|'EXPIRED'|'DELETED' }
Response Structure
(dict) –
Response structure for deleting a payment session
Returns the deletion status with HTTP 200 status code on successful deletion.
status (string) –
The status of the deletion. Always DELETED for successful hard delete.
Exceptions
BedrockAgentCore.Client.exceptions.AccessDeniedExceptionBedrockAgentCore.Client.exceptions.ValidationExceptionBedrockAgentCore.Client.exceptions.ResourceNotFoundExceptionBedrockAgentCore.Client.exceptions.ThrottlingExceptionBedrockAgentCore.Client.exceptions.InternalServerException