Skip to content

list_partnerships async

list_partnerships(
    *,
    config_overrides: Optional[Asyncb2biClientConfig] = None,
    profile_id: Optional[ProfileId] = None,
    next_token: Optional[PageToken] = None,
    max_results: Optional[MaxResults] = None,
) -> ListPartnershipsResponse

Lists the partnerships associated with your Amazon Web Services account for your current or specified region. A partnership represents the connection between you and your trading partner. It ties together a profile and one or more trading capabilities.

Parameters:

  • profile_id (Optional[ProfileId], default: None ) –

    Specifies the unique, system-generated identifier for the profile connected to this partnership.

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

    When additional results are obtained from the command, a NextToken parameter is returned in the output. You can then pass the NextToken parameter in a subsequent command to continue listing additional resources.

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

    Specifies the maximum number of capabilities to return.

Raises:

  • AccessDeniedException –

    You do not have sufficient access to perform this action.

  • InternalServerException –

    This exception is thrown when an error occurs in the Amazon Web Services B2B Data Interchange service.

  • ResourceNotFoundException –

    Occurs when the requested resource does not exist, or cannot be found. In some cases, the resource exists in a region other than the region specified in the API call.

  • ThrottlingException –

    The request was denied due to throttling: the data speed and rendering may be limited depending on various parameters and conditions.

  • ValidationException –

    Occurs when a B2BI object cannot be validated against a request from another object. This exception can be thrown during standard EDI validation or when custom validation rules fail, such as when element length constraints are violated, invalid codes are used in code list validations, or required elements are missing based on configured element requirement rules.

  • UnknownServiceError –

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

Examples:

Sample ListPartnerships call

>>> await client.list_partnerships(max_results=50, next_token='foo', profile_id='p-60fbc37c87f04fce9')
Source code in docs_src/capo_b2bi/_services/async_b2bi.py
async def list_partnerships(
    self,
    *,
    config_overrides: Optional[Asyncb2biClientConfig] = None,
    profile_id: Optional["capo_b2bi.types.profile_id.ProfileId"] = None,
    next_token: Optional["capo_b2bi.types.page_token.PageToken"] = None,
    max_results: Optional["capo_b2bi.types.max_results.MaxResults"] = None,
) -> "capo_b2bi.types.list_partnerships_response.ListPartnershipsResponse":
    """<p>Lists the partnerships associated with your Amazon Web Services account for your current or specified region. A partnership represents the connection between you and your trading partner. It ties together a profile and one or more trading capabilities.</p>

    Args:
        profile_id: <p>Specifies the unique, system-generated identifier for the profile connected to this partnership.</p>
        next_token: <p>When additional results are obtained from the command, a <code>NextToken</code> parameter is returned in the output. You can then pass the <code>NextToken</code> parameter in a subsequent command to continue listing additional resources.</p>
        max_results: <p>Specifies the maximum number of capabilities to return.</p>

    Raises:
        capo_b2bi.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_b2bi.errors.internal_server_exception.InternalServerException: <p>This exception is thrown when an error occurs in the Amazon Web Services B2B Data Interchange service.</p>
        capo_b2bi.errors.resource_not_found_exception.ResourceNotFoundException: <p>Occurs when the requested resource does not exist, or cannot be found. In some cases, the resource exists in a region other than the region specified in the API call.</p>
        capo_b2bi.errors.throttling_exception.ThrottlingException: <p>The request was denied due to throttling: the data speed and rendering may be limited depending on various parameters and conditions.</p>
        capo_b2bi.errors.validation_exception.ValidationException: <p>Occurs when a B2BI object cannot be validated against a request from another object. This exception can be thrown during standard EDI validation or when custom validation rules fail, such as when element length constraints are violated, invalid codes are used in code list validations, or required elements are missing based on configured element requirement rules.</p>
        capo_b2bi.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Sample ListPartnerships call

        >>> await client.list_partnerships(max_results=50, next_token='foo', profile_id='p-60fbc37c87f04fce9')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_b2bi.types.list_partnerships_request.ListPartnershipsRequest]",
    ) -> AsyncOperationResponse[
        "capo_b2bi.types.list_partnerships_response.ListPartnershipsResponse"
    ]:
        import capo_b2bi._operations.b2_bi.list_partnerships

        (
            output,
            http_response,
        ) = await capo_b2bi._operations.b2_bi.list_partnerships.async_list_partnerships(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListPartnerships")
    )
    input_: capo_b2bi.types.list_partnerships_request.ListPartnershipsRequest = {}
    if profile_id is not None:
        input_["profile_id"] = profile_id
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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