Skip to content

create_program_management_account async

create_program_management_account(
    catalog: Catalog,
    program: Program,
    display_name: ProgramManagementAccountDisplayName,
    account_id: AccountId,
    *,
    config_overrides: Optional[AsyncPartnerCentralChannelClientConfig] = None,
    client_token: Optional[ClientToken] = None,
    tags: Optional[TagList] = None,
) -> CreateProgramManagementAccountResponse

Creates a new program management account for managing partner relationships.

Parameters:

  • catalog (Catalog) –

    The catalog identifier for the program management account.

  • program (Program) –

    The program type for the management account.

  • display_name (ProgramManagementAccountDisplayName) –

    A human-readable name for the program management account.

  • account_id (AccountId) –

    The AWS account ID to associate with the program management account.

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

    A unique, case-sensitive identifier to ensure idempotency of the request.

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

    Key-value pairs to associate with the program management account.

Raises:

Examples:

Example for CreateProgramManagementAccount

>>> await client.create_program_management_account(catalog='AWS', program='SOLUTION_PROVIDER', display_name='TestDisplayName', account_id='111122223333', client_token='clientToken')
Source code in docs_src/capo_partnercentral_channel/_services/async_partner_central_channel.py
async def create_program_management_account(
    self,
    catalog: "capo_partnercentral_channel.types.catalog.Catalog",
    program: "capo_partnercentral_channel.types.program.Program",
    display_name: "capo_partnercentral_channel.types.program_management_account_display_name.ProgramManagementAccountDisplayName",
    account_id: "capo_partnercentral_channel.types.account_id.AccountId",
    *,
    config_overrides: Optional[AsyncPartnerCentralChannelClientConfig] = None,
    client_token: Optional[
        "capo_partnercentral_channel.types.client_token.ClientToken"
    ] = None,
    tags: Optional["capo_partnercentral_channel.types.tag_list.TagList"] = None,
) -> "capo_partnercentral_channel.types.create_program_management_account_response.CreateProgramManagementAccountResponse":
    """<p>Creates a new program management account for managing partner relationships.</p>

    Args:
        catalog: <p>The catalog identifier for the program management account.</p>
        program: <p>The program type for the management account.</p>
        display_name: <p>A human-readable name for the program management account.</p>
        account_id: <p>The AWS account ID to associate with the program management account.</p>
        client_token: <p>A unique, case-sensitive identifier to ensure idempotency of the request.</p>
        tags: <p>Key-value pairs to associate with the program management account.</p>

    Raises:
        capo_partnercentral_channel.errors.access_denied_exception.AccessDeniedException: <p>The request was denied due to insufficient permissions.</p>
        capo_partnercentral_channel.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred while processing the request.</p>
        capo_partnercentral_channel.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
        capo_partnercentral_channel.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests being sent in a short period.</p>
        capo_partnercentral_channel.errors.validation_exception.ValidationException: <p>The request failed validation due to invalid input parameters.</p>
        capo_partnercentral_channel.errors.conflict_exception.ConflictException: <p>The request could not be completed due to a conflict with the current state of the resource.</p>
        capo_partnercentral_channel.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request would exceed a service quota limit.</p>
        capo_partnercentral_channel.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Example for CreateProgramManagementAccount

        >>> await client.create_program_management_account(catalog='AWS', program='SOLUTION_PROVIDER', display_name='TestDisplayName', account_id='111122223333', client_token='clientToken')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_partnercentral_channel.types.create_program_management_account_request.CreateProgramManagementAccountRequest]",
    ) -> AsyncOperationResponse[
        "capo_partnercentral_channel.types.create_program_management_account_response.CreateProgramManagementAccountResponse"
    ]:
        import capo_partnercentral_channel._operations.partner_central_channel.create_program_management_account

        (
            output,
            http_response,
        ) = await capo_partnercentral_channel._operations.partner_central_channel.create_program_management_account.async_create_program_management_account(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateProgramManagementAccount")
    )
    input_: capo_partnercentral_channel.types.create_program_management_account_request.CreateProgramManagementAccountRequest = {
        "catalog": catalog,
        "program": program,
        "display_name": display_name,
        "account_id": account_id,
    }
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if tags is not None:
        input_["tags"] = tags

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