Skip to content

list_connections async

list_connections(
    *,
    config_overrides: Optional[AsyncCodeStarconnectionsClientConfig] = None,
    provider_type_filter: Optional[ProviderType] = None,
    host_arn_filter: Optional[HostArn] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> ListConnectionsOutput

Lists the connections associated with your account.

Parameters:

  • provider_type_filter (Optional[ProviderType], default: None ) –

    Filters the list of connections to those associated with a specified provider, such as Bitbucket.

  • host_arn_filter (Optional[HostArn], default: None ) –

    Filters the list of connections to those associated with a specified host.

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

    The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned nextToken value.

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

    The token that was returned from the previous ListConnections call, which can be used to return the next set of connections in the list.

Raises:

Source code in docs_src/capo_codestar_connections/_services/async_code_starconnections.py
async def list_connections(
    self,
    *,
    config_overrides: Optional[AsyncCodeStarconnectionsClientConfig] = None,
    provider_type_filter: Optional[
        "capo_codestar_connections.types.provider_type.ProviderType"
    ] = None,
    host_arn_filter: Optional[
        "capo_codestar_connections.types.host_arn.HostArn"
    ] = None,
    max_results: Optional[
        "capo_codestar_connections.types.max_results.MaxResults"
    ] = None,
    next_token: Optional[
        "capo_codestar_connections.types.next_token.NextToken"
    ] = None,
) -> (
    "capo_codestar_connections.types.list_connections_output.ListConnectionsOutput"
):
    """<p>Lists the connections associated with your account.</p>

    Args:
        provider_type_filter: <p>Filters the list of connections to those associated with a specified provider, such as Bitbucket.</p>
        host_arn_filter: <p>Filters the list of connections to those associated with a specified host.</p>
        max_results: <p>The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
        next_token: <p>The token that was returned from the previous <code>ListConnections</code> call, which can be used to return the next set of connections in the list.</p>

    Raises:
        capo_codestar_connections.errors.resource_not_found_exception.ResourceNotFoundException: <p>Resource not found. Verify the connection resource ARN and try again.</p>
        capo_codestar_connections.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_codestar_connections.types.list_connections_input.ListConnectionsInput]",
    ) -> AsyncOperationResponse[
        "capo_codestar_connections.types.list_connections_output.ListConnectionsOutput"
    ]:
        import capo_codestar_connections._operations.code_star_connections_20191201.list_connections

        (
            output,
            http_response,
        ) = await capo_codestar_connections._operations.code_star_connections_20191201.list_connections.async_list_connections(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListConnections")
    )
    input_: capo_codestar_connections.types.list_connections_input.ListConnectionsInput = {}
    if provider_type_filter is not None:
        input_["provider_type_filter"] = provider_type_filter
    if host_arn_filter is not None:
        input_["host_arn_filter"] = host_arn_filter
    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