Skip to content

list_inbound_invitations async

list_inbound_invitations(
    *,
    config_overrides: Optional[AsyncAssuranceClientConfig] = None,
    status: Optional[InvitationStatus] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[PaginationToken] = None,
) -> ListInboundInvitationsOutput

Lists the invitations addressed to your account, across all environments. This operation returns only the invitations sent to you. You can optionally filter by status.

Parameters:

  • status (Optional[InvitationStatus], default: None ) –

    The lifecycle state to filter results by. When specified, the operation returns only invitations in this state.

  • max_results (Optional[MaxResults], default: None ) –

    The maximum number of records to return on one page. If you omit it, the operation uses its default page size. If more records are available, use the nextToken value from the response to get the next page.

  • next_token (Optional[PaginationToken], default: None ) –

    The pagination token returned by a previous request. Use it to retrieve the next page of results. If the value is null, there are no more results to return.

Raises:

Examples:

List invitations addressed to your account Lists pending invitations addressed to the payments team's member account across all governance environments.

>>> await client.list_inbound_invitations(status='PENDING')
Source code in docs_src/capo_assurance/_services/async_assurance.py
async def list_inbound_invitations(
    self,
    *,
    config_overrides: Optional[AsyncAssuranceClientConfig] = None,
    status: Optional[
        "capo_assurance.types.invitation_status.InvitationStatus"
    ] = None,
    max_results: Optional["capo_assurance.types.max_results.MaxResults"] = None,
    next_token: Optional[
        "capo_assurance.types.pagination_token.PaginationToken"
    ] = None,
) -> "capo_assurance.types.list_inbound_invitations_output.ListInboundInvitationsOutput":
    """<p>Lists the invitations addressed to your account, across all environments. This operation returns only the invitations sent to you. You can optionally filter by status.</p>

    Args:
        status: <p>The lifecycle state to filter results by. When specified, the operation returns only invitations in this state.</p>
        max_results: <p>The maximum number of records to return on one page. If you omit it, the operation uses its default page size. If more records are available, use the <code>nextToken</code> value from the response to get the next page.</p>
        next_token: <p>The pagination token returned by a previous request. Use it to retrieve the next page of results. If the value is null, there are no more results to return.</p>

    Raises:
        capo_assurance.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action. This error occurs when the request is unauthenticated, or is authenticated but lacks permission to invoke the operation.</p>
        capo_assurance.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred.</p>
        capo_assurance.errors.throttling_exception.ThrottlingException: <p>The request was throttled.</p>
        capo_assurance.errors.validation_exception.ValidationException: <p>The request failed validation.</p>
        capo_assurance.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        List invitations addressed to your account
        Lists pending invitations addressed to the payments team's member account across all governance environments.

        >>> await client.list_inbound_invitations(status='PENDING')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_assurance.types.list_inbound_invitations_input.ListInboundInvitationsInput]",
    ) -> AsyncOperationResponse[
        "capo_assurance.types.list_inbound_invitations_output.ListInboundInvitationsOutput"
    ]:
        import capo_assurance._operations.assurance.list_inbound_invitations

        (
            output,
            http_response,
        ) = await capo_assurance._operations.assurance.list_inbound_invitations.async_list_inbound_invitations(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListInboundInvitations")
    )
    input_: capo_assurance.types.list_inbound_invitations_input.ListInboundInvitationsInput = {}
    if status is not None:
        input_["status"] = status
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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