create_payment_instrument
¶
create_payment_instrument(
payment_manager_arn: PaymentManagerArn,
payment_connector_id: PaymentConnectorId,
payment_instrument_type: PaymentInstrumentType,
payment_instrument_details: PaymentInstrumentDetails,
*,
config_overrides: Optional[BedrockAgentCoreClientConfig] = None,
user_id: Optional[UserId] = None,
agent_name: Optional[PaymentAgentName] = None,
client_token: Optional[ClientToken] = None,
) -> CreatePaymentInstrumentResponse
Create a new payment instrument for a connector.
Parameters:
-
user_id(Optional[UserId], default:None) –The user ID associated with this payment instrument.
-
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 payment instrument.
-
payment_connector_id(PaymentConnectorId) –The ID of the payment connector to use for this instrument.
-
payment_instrument_type(PaymentInstrumentType) –The type of payment instrument being created.
-
payment_instrument_details(PaymentInstrumentDetails) –The details of the payment instrument.
-
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.
-
ResourceNotFoundException–The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
-
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/bedrock_agent_core.py
4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 | |