BedrockAgentCore / Client / get_payment_session
get_payment_session¶
- BedrockAgentCore.Client.get_payment_session(**kwargs)¶
Get a payment session
See also: AWS API Documentation
Request Syntax
response = client.get_payment_session( userId='string', agentName='string', paymentManagerArn='string', paymentSessionId='string' )
- Parameters:
userId (string) – The user ID associated with this payment session.
agentName (string) – The agent name associated with this request, used for observability.
paymentManagerArn (string) –
[REQUIRED]
The ARN of the payment manager that owns this session.
paymentSessionId (string) –
[REQUIRED]
The ID of the payment session to retrieve.
- Return type:
dict
- Returns:
Response Syntax
{ 'paymentSession': { 'paymentSessionId': 'string', 'paymentManagerArn': 'string', 'limits': { 'maxSpendAmount': { 'value': 'string', 'currency': 'USD' } }, 'userId': 'string', 'expiryTimeInMinutes': 123, 'createdAt': datetime(2015, 1, 1), 'availableLimits': { 'availableSpendAmount': { 'value': 'string', 'currency': 'USD' }, 'updatedAt': datetime(2015, 1, 1) }, 'updatedAt': datetime(2015, 1, 1) } }
Response Structure
(dict) –
Response structure for getting a payment session
paymentSession (dict) –
Payment manager session
paymentSessionId (string) –
The unique identifier for this payment session.
paymentManagerArn (string) –
The ARN of the payment manager that owns this session.
limits (dict) –
The spending limits for this session.
maxSpendAmount (dict) –
The maximum amount that can be spent in this session.
value (string) –
The numeric value of the amount.
currency (string) –
The currency code for this amount.
userId (string) –
The user ID associated with this payment session.
expiryTimeInMinutes (integer) –
The session expiry time in minutes.
createdAt (datetime) –
The timestamp when this payment session was created.
availableLimits (dict) –
The available limits for this session after accounting for processed payments.
availableSpendAmount (dict) –
The available spend amount for this session.
value (string) –
The numeric value of the amount.
currency (string) –
The currency code for this amount.
updatedAt (datetime) –
The timestamp when the available limits were last updated.
updatedAt (datetime) –
The timestamp when this payment session was last updated.
Exceptions
BedrockAgentCore.Client.exceptions.AccessDeniedExceptionBedrockAgentCore.Client.exceptions.ValidationExceptionBedrockAgentCore.Client.exceptions.ResourceNotFoundExceptionBedrockAgentCore.Client.exceptions.ThrottlingExceptionBedrockAgentCore.Client.exceptions.InternalServerException