Skip to content

create_payment_manager async

create_payment_manager(
    name: PaymentManagerName,
    authorizer_type: PaymentsAuthorizerType,
    role_arn: RoleArn,
    *,
    config_overrides: Optional[AsyncBedrockAgentCoreControlClientConfig] = None,
    description: Optional[PaymentsDescription] = None,
    authorizer_configuration: Optional[AuthorizerConfiguration] = None,
    client_token: Optional[ClientToken] = None,
    tags: Optional[TagsMap] = None,
    kms_key_arn: Optional[KmsKeyArn] = None,
) -> CreatePaymentManagerResponse

Creates a new payment manager in your Amazon Web Services account. A payment manager serves as the top-level resource for managing payment processing capabilities, including payment connectors that integrate with supported payment providers.

If you specify CUSTOM_JWT as the authorizerType, you must provide an authorizerConfiguration.

Parameters:

  • name (PaymentManagerName) –

    The name of the payment manager.

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

    A description of the payment manager.

  • authorizer_type (PaymentsAuthorizerType) –

    The type of authorizer to use for the payment manager.

    • CUSTOM_JWT - Authorize with a bearer token.

    • AWS_IAM - Authorize with your Amazon Web Services IAM credentials.

  • authorizer_configuration (Optional[AuthorizerConfiguration], default: None ) –

    The authorizer configuration for the payment manager.

  • role_arn (RoleArn) –

    The Amazon Resource Name (ARN) of the IAM role that the payment manager assumes to access resources on your behalf.

  • 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.

  • tags (Optional[TagsMap], default: None ) –

    A map of tag keys and values to assign to the payment manager.

  • kms_key_arn (Optional[KmsKeyArn], default: None ) –

    The Amazon Resource Name (ARN) of the customer managed KMS key to use for encrypting sensitive payment manager data at rest. If you don't specify a key, the data is encrypted with an Amazon Web Services owned key.

Raises:

Source code in docs_src/capo_bedrock_agentcore_control/_services/async_bedrock_agent_core_control.py
async def create_payment_manager(
    self,
    name: "capo_bedrock_agentcore_control.types.payment_manager_name.PaymentManagerName",
    authorizer_type: "capo_bedrock_agentcore_control.types.payments_authorizer_type.PaymentsAuthorizerType",
    role_arn: "capo_bedrock_agentcore_control.types.role_arn.RoleArn",
    *,
    config_overrides: Optional[AsyncBedrockAgentCoreControlClientConfig] = None,
    description: Optional[
        "capo_bedrock_agentcore_control.types.payments_description.PaymentsDescription"
    ] = None,
    authorizer_configuration: Optional[
        "capo_bedrock_agentcore_control.types.authorizer_configuration.AuthorizerConfiguration"
    ] = None,
    client_token: Optional[
        "capo_bedrock_agentcore_control.types.client_token.ClientToken"
    ] = None,
    tags: Optional["capo_bedrock_agentcore_control.types.tags_map.TagsMap"] = None,
    kms_key_arn: Optional[
        "capo_bedrock_agentcore_control.types.kms_key_arn.KmsKeyArn"
    ] = None,
) -> "capo_bedrock_agentcore_control.types.create_payment_manager_response.CreatePaymentManagerResponse":
    """<p>Creates a new payment manager in your Amazon Web Services account. A payment manager serves as the top-level resource for managing payment processing capabilities, including payment connectors that integrate with supported payment providers.</p> <p>If you specify <code>CUSTOM_JWT</code> as the <code>authorizerType</code>, you must provide an <code>authorizerConfiguration</code>.</p>

    Args:
        name: <p>The name of the payment manager.</p>
        description: <p>A description of the payment manager.</p>
        authorizer_type: <p>The type of authorizer to use for the payment manager.</p> <ul> <li> <p> <code>CUSTOM_JWT</code> - Authorize with a bearer token.</p> </li> <li> <p> <code>AWS_IAM</code> - Authorize with your Amazon Web Services IAM credentials.</p> </li> </ul>
        authorizer_configuration: <p>The authorizer configuration for the payment manager.</p>
        role_arn: <p>The Amazon Resource Name (ARN) of the IAM role that the payment manager assumes to access resources on your behalf.</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>
        tags: <p>A map of tag keys and values to assign to the payment manager.</p>
        kms_key_arn: <p>The Amazon Resource Name (ARN) of the customer managed KMS key to use for encrypting sensitive payment manager data at rest. If you don't specify a key, the data is encrypted with an Amazon Web Services owned key.</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.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.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.create_payment_manager_request.CreatePaymentManagerRequest]",
    ) -> AsyncOperationResponse[
        "capo_bedrock_agentcore_control.types.create_payment_manager_response.CreatePaymentManagerResponse"
    ]:
        import capo_bedrock_agentcore_control._operations.amazon_bedrock_agent_core_control.create_payment_manager

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreatePaymentManager")
    )
    input_: capo_bedrock_agentcore_control.types.create_payment_manager_request.CreatePaymentManagerRequest = {
        "name": name,
        "authorizer_type": authorizer_type,
        "role_arn": role_arn,
    }
    if description is not None:
        input_["description"] = description
    if authorizer_configuration is not None:
        input_["authorizer_configuration"] = authorizer_configuration
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if tags is not None:
        input_["tags"] = tags
    if kms_key_arn is not None:
        input_["kms_key_arn"] = kms_key_arn

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