create_payment_session
async
¶
create_payment_session(
payment_manager_arn: PaymentManagerArn,
expiry_time_in_minutes: int,
*,
config_overrides: Optional[AsyncBedrockAgentCoreClientConfig] = None,
user_id: Optional[UserId] = None,
agent_name: Optional[PaymentAgentName] = None,
limits: Optional[SessionLimits] = None,
client_token: Optional[ClientToken] = None,
) -> CreatePaymentSessionResponse
Create a new payment session.
Parameters:
-
user_id(Optional[UserId], default:None) –The user ID associated with this payment session.
-
agent_name(Optional[PaymentAgentName], default:None) –The agent name associated with this request, used for observability.
-
payment_manager_arn(PaymentManagerArn) –The ARN of the payment manager that owns this session.
-
limits(Optional[SessionLimits], default:None) –The spending limits for this payment session.
-
expiry_time_in_minutes(int) –The session expiry time in minutes. Must be between 15 and 480 minutes.
-
client_token(Optional[ClientToken], default:None) –A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
Raises:
-
AccessDeniedException–The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
-
ConflictException–The exception that occurs when the request conflicts with the current state of the resource. This can happen when trying to modify a resource that is currently being modified by another request, or when trying to create a resource that already exists.
-
InternalServerException–The exception that occurs when the service encounters an unexpected internal error. This is a temporary condition that will resolve itself with retries. We recommend implementing exponential backoff retry logic in your application.
-
ServiceQuotaExceededException–The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
-
SubscriptionRequiredException–Returned when you attempt a wallet operation against a Coinbase Marketplace connector whose account does not hold an active Marketplace subscription and is not within the legacy exception period. Subscribe to the Marketplace listing before you retry the operation.
-
ThrottlingException–The exception that occurs when the request was denied due to request throttling. This happens when you exceed the allowed request rate for an operation. Reduce the frequency of requests or implement exponential backoff retry logic in your application.
-
ValidationException–The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_bedrock_agentcore/_services/async_bedrock_agent_core.py
5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 | |