Skip to content

list_connections

list_connections(
    domain_identifier: DomainId,
    *,
    config_overrides: Optional[DataZoneClientConfig] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[PaginationToken] = None,
    sort_by: Optional[SortFieldConnection] = None,
    sort_order: Optional[SortOrder] = None,
    name: Optional[ConnectionName] = None,
    environment_identifier: Optional[EnvironmentId] = None,
    project_identifier: Optional[ProjectId] = None,
    type: Optional[ConnectionType] = None,
    scope: Optional[ConnectionScope] = None,
) -> ListConnectionsOutput

Lists connections. In Amazon DataZone, a connection enables you to connect your resources (domains, projects, and environments) to external resources and services.

Parameters:

  • domain_identifier (DomainId) –

    The ID of the domain where you want to list connections.

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

    The maximum number of connections to return in a single call to ListConnections. When the number of connections to be listed is greater than the value of MaxResults, the response contains a NextToken value that you can use in a subsequent call to ListConnections to list the next set of connections.

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

    When the number of connections is greater than the default value for the MaxResults parameter, or if you explicitly specify a value for MaxResults that is less than the number of connections, the response includes a pagination token named NextToken. You can specify this NextToken value in a subsequent call to ListConnections to list the next set of connections.

  • sort_by (Optional[SortFieldConnection], default: None ) –

    Specifies how you want to sort the listed connections.

  • sort_order (Optional[SortOrder], default: None ) –

    Specifies the sort order for the listed connections.

  • name (Optional[ConnectionName], default: None ) –

    The name of the connection.

  • environment_identifier (Optional[EnvironmentId], default: None ) –

    The ID of the environment where you want to list connections.

  • project_identifier (Optional[ProjectId], default: None ) –

    The ID of the project where you want to list connections.

  • type (Optional[ConnectionType], default: None ) –

    The type of connection.

  • scope (Optional[ConnectionScope], default: None ) –

    The scope of the connection.

Raises:

Source code in docs_src/capo_datazone/_services/data_zone.py
def list_connections(
    self,
    domain_identifier: "capo_datazone.types.domain_id.DomainId",
    *,
    config_overrides: Optional[DataZoneClientConfig] = None,
    max_results: Optional["capo_datazone.types.max_results.MaxResults"] = None,
    next_token: Optional[
        "capo_datazone.types.pagination_token.PaginationToken"
    ] = None,
    sort_by: Optional[
        "capo_datazone.types.sort_field_connection.SortFieldConnection"
    ] = None,
    sort_order: Optional["capo_datazone.types.sort_order.SortOrder"] = None,
    name: Optional["capo_datazone.types.connection_name.ConnectionName"] = None,
    environment_identifier: Optional[
        "capo_datazone.types.environment_id.EnvironmentId"
    ] = None,
    project_identifier: Optional["capo_datazone.types.project_id.ProjectId"] = None,
    type: Optional["capo_datazone.types.connection_type.ConnectionType"] = None,
    scope: Optional["capo_datazone.types.connection_scope.ConnectionScope"] = None,
) -> "capo_datazone.types.list_connections_output.ListConnectionsOutput":
    """<p>Lists connections. In Amazon DataZone, a connection enables you to connect your resources (domains, projects, and environments) to external resources and services.</p>

    Args:
        domain_identifier: <p>The ID of the domain where you want to list connections.</p>
        max_results: <p>The maximum number of connections to return in a single call to ListConnections. When the number of connections to be listed is greater than the value of MaxResults, the response contains a NextToken value that you can use in a subsequent call to ListConnections to list the next set of connections.</p>
        next_token: <p>When the number of connections is greater than the default value for the MaxResults parameter, or if you explicitly specify a value for MaxResults that is less than the number of connections, the response includes a pagination token named NextToken. You can specify this NextToken value in a subsequent call to ListConnections to list the next set of connections.</p>
        sort_by: <p>Specifies how you want to sort the listed connections.</p>
        sort_order: <p>Specifies the sort order for the listed connections.</p>
        name: <p>The name of the connection.</p>
        environment_identifier: <p>The ID of the environment where you want to list connections.</p>
        project_identifier: <p>The ID of the project where you want to list connections.</p>
        type: <p>The type of connection.</p>
        scope: <p>The scope of the connection.</p>

    Raises:
        capo_datazone.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_datazone.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_datazone.errors.unauthorized_exception.UnauthorizedException: <p>You do not have permission to perform this action.</p>
        capo_datazone.errors.internal_server_exception.InternalServerException: <p>The request has failed because of an unknown error, exception or failure.</p>
        capo_datazone.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the Amazon Web Services service.</p>
        capo_datazone.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_datazone.types.list_connections_input.ListConnectionsInput]",
    ) -> OperationResponse[
        "capo_datazone.types.list_connections_output.ListConnectionsOutput"
    ]:
        import capo_datazone._operations.data_zone.list_connections

        output, http_response = (
            capo_datazone._operations.data_zone.list_connections.list_connections(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_datazone.types.list_connections_output.ListConnectionsOutput",
    ) -> dict[str, Any]:
        import capo_datazone.types.list_connections_output

        return capo_datazone.types.list_connections_output.redact_sensitive(output)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("ListConnections", redact_output=_redact_output),
    )
    input_: capo_datazone.types.list_connections_input.ListConnectionsInput = {
        "domain_identifier": domain_identifier
    }
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if sort_by is not None:
        input_["sort_by"] = sort_by
    if sort_order is not None:
        input_["sort_order"] = sort_order
    if name is not None:
        input_["name"] = name
    if environment_identifier is not None:
        input_["environment_identifier"] = environment_identifier
    if project_identifier is not None:
        input_["project_identifier"] = project_identifier
    if type is not None:
        input_["type"] = type
    if scope is not None:
        input_["scope"] = scope

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output