Skip to content

batch_get_invoice_profile async

batch_get_invoice_profile(
    account_ids: AccountIdList,
    *,
    config_overrides: Optional[AsyncInvoicingClientConfig] = None,
) -> BatchGetInvoiceProfileResponse

This gets the invoice profile associated with a set of accounts. The accounts must be linked accounts under the requester management account organization.

Parameters:

  • account_ids (AccountIdList) –

    Retrieves the corresponding invoice profile data for these account IDs.

Raises:

Examples:

BatchGetInvoiceProfile

>>> await client.batch_get_invoice_profile(account_ids=['111111111111'])
Source code in docs_src/capo_invoicing/_services/async_invoicing.py
async def batch_get_invoice_profile(
    self,
    account_ids: "capo_invoicing.types.account_id_list.AccountIdList",
    *,
    config_overrides: Optional[AsyncInvoicingClientConfig] = None,
) -> "capo_invoicing.types.batch_get_invoice_profile_response.BatchGetInvoiceProfileResponse":
    """<p>This gets the invoice profile associated with a set of accounts. The accounts must be linked accounts under the requester management account organization.</p>

    Args:
        account_ids: <p>Retrieves the corresponding invoice profile data for these account IDs. </p>

    Raises:
        capo_invoicing.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access to perform this action.</p>
        capo_invoicing.errors.internal_server_exception.InternalServerException: <p>The processing request failed because of an unknown error, exception, or failure. </p>
        capo_invoicing.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource could not be found. </p>
        capo_invoicing.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_invoicing.errors.validation_exception.ValidationException: <p> The input fails to satisfy the constraints specified by an Amazon Web Services service. </p>
        capo_invoicing.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        BatchGetInvoiceProfile

        >>> await client.batch_get_invoice_profile(account_ids=['111111111111'])
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_invoicing.types.batch_get_invoice_profile_request.BatchGetInvoiceProfileRequest]",
    ) -> AsyncOperationResponse[
        "capo_invoicing.types.batch_get_invoice_profile_response.BatchGetInvoiceProfileResponse"
    ]:
        import capo_invoicing._operations.invoicing.batch_get_invoice_profile

        (
            output,
            http_response,
        ) = await capo_invoicing._operations.invoicing.batch_get_invoice_profile.async_batch_get_invoice_profile(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_invoicing.types.batch_get_invoice_profile_response.BatchGetInvoiceProfileResponse",
    ) -> dict[str, Any]:
        import capo_invoicing.types.batch_get_invoice_profile_response

        return capo_invoicing.types.batch_get_invoice_profile_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("BatchGetInvoiceProfile", redact_output=_redact_output),
    )
    input_: capo_invoicing.types.batch_get_invoice_profile_request.BatchGetInvoiceProfileRequest = {
        "account_ids": account_ids
    }

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