Skip to content

update_payment_connector async

update_payment_connector(
    payment_manager_id: PaymentManagerId,
    payment_connector_id: PaymentConnectorId,
    *,
    config_overrides: Optional[AsyncBedrockAgentCoreControlClientConfig] = None,
    description: Optional[PaymentsDescription] = None,
    type: Optional[PaymentConnectorType] = None,
    credential_provider_configurations: Optional[
        CredentialsProviderConfigurations
    ] = None,
    client_token: Optional[ClientToken] = None,
) -> UpdatePaymentConnectorResponse

Updates an existing payment connector. This operation uses PATCH semantics, so you only need to specify the fields you want to change.

Parameters:

  • payment_manager_id (PaymentManagerId) –

    The unique identifier of the parent payment manager.

  • payment_connector_id (PaymentConnectorId) –

    The unique identifier of the payment connector to update.

  • description (Optional[PaymentsDescription], default: None ) –

    The updated description of the payment connector.

  • type (Optional[PaymentConnectorType], default: None ) –

    The updated type of the payment connector.

  • credential_provider_configurations (Optional[CredentialsProviderConfigurations], default: None ) –

    The updated credential provider configurations for the payment connector.

  • client_token (Optional[ClientToken], default: None ) –

    A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If you don't specify this field, a value is randomly generated for you. If this token matches a previous request, the service ignores the request, but doesn't return an error. For more information, see Ensuring idempotency.

Raises:

  • AccessDeniedException –

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

  • ConflictException –

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

  • InternalServerException –

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

  • ResourceNotFoundException –

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

  • ServiceQuotaExceededException –

    This exception is thrown when a request is made beyond the service quota

  • SubscriptionRequiredException –

    The request failed because it requires an active Amazon Web Services Marketplace subscription that is not present. Subscribe to the required product in Amazon Web Services Marketplace and try again.

  • ThrottlingException –

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

  • ValidationException –

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

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_bedrock_agentcore_control/_services/async_bedrock_agent_core_control.py
async def update_payment_connector(
    self,
    payment_manager_id: "capo_bedrock_agentcore_control.types.payment_manager_id.PaymentManagerId",
    payment_connector_id: "capo_bedrock_agentcore_control.types.payment_connector_id.PaymentConnectorId",
    *,
    config_overrides: Optional[AsyncBedrockAgentCoreControlClientConfig] = None,
    description: Optional[
        "capo_bedrock_agentcore_control.types.payments_description.PaymentsDescription"
    ] = None,
    type: Optional[
        "capo_bedrock_agentcore_control.types.payment_connector_type.PaymentConnectorType"
    ] = None,
    credential_provider_configurations: Optional[
        "capo_bedrock_agentcore_control.types.credentials_provider_configurations.CredentialsProviderConfigurations"
    ] = None,
    client_token: Optional[
        "capo_bedrock_agentcore_control.types.client_token.ClientToken"
    ] = None,
) -> "capo_bedrock_agentcore_control.types.update_payment_connector_response.UpdatePaymentConnectorResponse":
    """<p>Updates an existing payment connector. This operation uses PATCH semantics, so you only need to specify the fields you want to change.</p>

    Args:
        payment_manager_id: <p>The unique identifier of the parent payment manager.</p>
        payment_connector_id: <p>The unique identifier of the payment connector to update.</p>
        description: <p>The updated description of the payment connector.</p>
        type: <p>The updated type of the payment connector.</p>
        credential_provider_configurations: <p>The updated credential provider configurations for the payment connector.</p>
        client_token: <p>A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If you don't specify this field, a value is randomly generated for you. If this token matches a previous request, the service ignores the request, but doesn't return an error. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring idempotency</a>.</p>

    Raises:
        capo_bedrock_agentcore_control.errors.access_denied_exception.AccessDeniedException: <p>This exception is thrown when a request is denied per access permissions</p>
        capo_bedrock_agentcore_control.errors.conflict_exception.ConflictException: <p>This exception is thrown when there is a conflict performing an operation</p>
        capo_bedrock_agentcore_control.errors.internal_server_exception.InternalServerException: <p>This exception is thrown if there was an unexpected error during processing of request</p>
        capo_bedrock_agentcore_control.errors.resource_not_found_exception.ResourceNotFoundException: <p>This exception is thrown when a resource referenced by the operation does not exist</p>
        capo_bedrock_agentcore_control.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>This exception is thrown when a request is made beyond the service quota</p>
        capo_bedrock_agentcore_control.errors.subscription_required_exception.SubscriptionRequiredException: <p>The request failed because it requires an active Amazon Web Services Marketplace subscription that is not present. Subscribe to the required product in Amazon Web Services Marketplace and try again.</p>
        capo_bedrock_agentcore_control.errors.throttling_exception.ThrottlingException: <p>This exception is thrown when the number of requests exceeds the limit</p>
        capo_bedrock_agentcore_control.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
        capo_bedrock_agentcore_control.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_bedrock_agentcore_control.types.update_payment_connector_request.UpdatePaymentConnectorRequest]",
    ) -> AsyncOperationResponse[
        "capo_bedrock_agentcore_control.types.update_payment_connector_response.UpdatePaymentConnectorResponse"
    ]:
        import capo_bedrock_agentcore_control._operations.amazon_bedrock_agent_core_control.update_payment_connector

        (
            output,
            http_response,
        ) = await capo_bedrock_agentcore_control._operations.amazon_bedrock_agent_core_control.update_payment_connector.async_update_payment_connector(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdatePaymentConnector")
    )
    input_: capo_bedrock_agentcore_control.types.update_payment_connector_request.UpdatePaymentConnectorRequest = {
        "payment_manager_id": payment_manager_id,
        "payment_connector_id": payment_connector_id,
    }
    if description is not None:
        input_["description"] = description
    if type is not None:
        input_["type"] = type
    if credential_provider_configurations is not None:
        input_["credential_provider_configurations"] = (
            credential_provider_configurations
        )
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output