Skip to content

list_channel_handshakes async

list_channel_handshakes(
    handshake_type: HandshakeType,
    catalog: Catalog,
    participant_type: ParticipantType,
    *,
    config_overrides: Optional[AsyncPartnerCentralChannelClientConfig] = None,
    max_results: Optional[int] = None,
    statuses: Optional[HandshakeStatusList] = None,
    associated_resource_identifiers: Optional[AssociatedResourceIdentifierList] = None,
    handshake_type_filters: Optional[ListChannelHandshakesTypeFilters] = None,
    handshake_type_sort: Optional[ListChannelHandshakesTypeSort] = None,
    next_token: Optional[NextToken] = None,
) -> ListChannelHandshakesResponse

Lists channel handshakes based on specified criteria.

Parameters:

Raises:

Examples:

Example for ListChannelHandshakes - START_SERVICE_PERIOD

>>> await client.list_channel_handshakes(handshake_type='START_SERVICE_PERIOD', catalog='AWS', participant_type='SENDER', statuses=['ACCEPTED'], associated_resource_identifiers=['rs-123abc456def7'], handshake_type_filters={'startServicePeriodTypeFilters': {'servicePeriodTypes': ['FIXED_COMMITMENT_PERIOD']}}, handshake_type_sort={'startServicePeriodTypeSort': {'sortBy': 'UpdatedAt', 'sortOrder': 'Descending'}})
Example for ListChannelHandshakes - REVOKE_SERVICE_PERIOD
>>> await client.list_channel_handshakes(handshake_type='REVOKE_SERVICE_PERIOD', catalog='AWS', participant_type='SENDER', statuses=['ACCEPTED'], associated_resource_identifiers=['rs-123abc456def7'], handshake_type_filters={'revokeServicePeriodTypeFilters': {'servicePeriodTypes': ['MINIMUM_NOTICE_PERIOD']}}, handshake_type_sort={'revokeServicePeriodTypeSort': {'sortBy': 'UpdatedAt', 'sortOrder': 'Descending'}})
Example for ListChannelHandshakes - PROGRAM_MANAGEMENT_ACCOUNT
>>> await client.list_channel_handshakes(handshake_type='PROGRAM_MANAGEMENT_ACCOUNT', catalog='AWS', participant_type='SENDER', statuses=['ACCEPTED'], associated_resource_identifiers=['pma-123abc456def7'], handshake_type_filters={'programManagementAccountTypeFilters': {'programs': ['SOLUTION_PROVIDER']}}, handshake_type_sort={'programManagementAccountTypeSort': {'sortBy': 'UpdatedAt', 'sortOrder': 'Descending'}}, max_results=20, next_token='nextToken')
Source code in docs_src/capo_partnercentral_channel/_services/async_partner_central_channel.py
async def list_channel_handshakes(
    self,
    handshake_type: "capo_partnercentral_channel.types.handshake_type.HandshakeType",
    catalog: "capo_partnercentral_channel.types.catalog.Catalog",
    participant_type: "capo_partnercentral_channel.types.participant_type.ParticipantType",
    *,
    config_overrides: Optional[AsyncPartnerCentralChannelClientConfig] = None,
    max_results: Optional[int] = None,
    statuses: Optional[
        "capo_partnercentral_channel.types.handshake_status_list.HandshakeStatusList"
    ] = None,
    associated_resource_identifiers: Optional[
        "capo_partnercentral_channel.types.associated_resource_identifier_list.AssociatedResourceIdentifierList"
    ] = None,
    handshake_type_filters: Optional[
        "capo_partnercentral_channel.types.list_channel_handshakes_type_filters.ListChannelHandshakesTypeFilters"
    ] = None,
    handshake_type_sort: Optional[
        "capo_partnercentral_channel.types.list_channel_handshakes_type_sort.ListChannelHandshakesTypeSort"
    ] = None,
    next_token: Optional[
        "capo_partnercentral_channel.types.next_token.NextToken"
    ] = None,
) -> "capo_partnercentral_channel.types.list_channel_handshakes_response.ListChannelHandshakesResponse":
    """<p>Lists channel handshakes based on specified criteria.</p>

    Args:
        handshake_type: <p>Filter results by handshake type.</p>
        catalog: <p>The catalog identifier to filter handshakes.</p>
        participant_type: <p>Filter by participant type (sender or receiver).</p>
        max_results: <p>The maximum number of results to return in a single call.</p>
        statuses: <p>Filter results by handshake status.</p>
        associated_resource_identifiers: <p>Filter by associated resource identifiers.</p>
        handshake_type_filters: <p>Type-specific filters for handshakes.</p>
        handshake_type_sort: <p>Type-specific sorting options for handshakes.</p>
        next_token: <p>Token for retrieving the next page of results.</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.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Example for ListChannelHandshakes - START_SERVICE_PERIOD

        >>> await client.list_channel_handshakes(handshake_type='START_SERVICE_PERIOD', catalog='AWS', participant_type='SENDER', statuses=['ACCEPTED'], associated_resource_identifiers=['rs-123abc456def7'], handshake_type_filters={'startServicePeriodTypeFilters': {'servicePeriodTypes': ['FIXED_COMMITMENT_PERIOD']}}, handshake_type_sort={'startServicePeriodTypeSort': {'sortBy': 'UpdatedAt', 'sortOrder': 'Descending'}})
        Example for ListChannelHandshakes - REVOKE_SERVICE_PERIOD

        >>> await client.list_channel_handshakes(handshake_type='REVOKE_SERVICE_PERIOD', catalog='AWS', participant_type='SENDER', statuses=['ACCEPTED'], associated_resource_identifiers=['rs-123abc456def7'], handshake_type_filters={'revokeServicePeriodTypeFilters': {'servicePeriodTypes': ['MINIMUM_NOTICE_PERIOD']}}, handshake_type_sort={'revokeServicePeriodTypeSort': {'sortBy': 'UpdatedAt', 'sortOrder': 'Descending'}})
        Example for ListChannelHandshakes - PROGRAM_MANAGEMENT_ACCOUNT

        >>> await client.list_channel_handshakes(handshake_type='PROGRAM_MANAGEMENT_ACCOUNT', catalog='AWS', participant_type='SENDER', statuses=['ACCEPTED'], associated_resource_identifiers=['pma-123abc456def7'], handshake_type_filters={'programManagementAccountTypeFilters': {'programs': ['SOLUTION_PROVIDER']}}, handshake_type_sort={'programManagementAccountTypeSort': {'sortBy': 'UpdatedAt', 'sortOrder': 'Descending'}}, max_results=20, next_token='nextToken')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_partnercentral_channel.types.list_channel_handshakes_request.ListChannelHandshakesRequest]",
    ) -> AsyncOperationResponse[
        "capo_partnercentral_channel.types.list_channel_handshakes_response.ListChannelHandshakesResponse"
    ]:
        import capo_partnercentral_channel._operations.partner_central_channel.list_channel_handshakes

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListChannelHandshakes")
    )
    input_: capo_partnercentral_channel.types.list_channel_handshakes_request.ListChannelHandshakesRequest = {
        "handshake_type": handshake_type,
        "catalog": catalog,
        "participant_type": participant_type,
    }
    if max_results is not None:
        input_["max_results"] = max_results
    if statuses is not None:
        input_["statuses"] = statuses
    if associated_resource_identifiers is not None:
        input_["associated_resource_identifiers"] = associated_resource_identifiers
    if handshake_type_filters is not None:
        input_["handshake_type_filters"] = handshake_type_filters
    if handshake_type_sort is not None:
        input_["handshake_type_sort"] = handshake_type_sort
    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