Skip to content

search_types

search_types(
    domain_identifier: DomainId,
    search_scope: TypesSearchScope,
    managed: bool,
    *,
    config_overrides: Optional[DataZoneClientConfig] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[PaginationToken] = None,
    search_text: Optional[SearchText] = None,
    search_in: Optional[SearchInList] = None,
    filters: Optional[FilterClause] = None,
    sort: Optional[SearchSort] = None,
) -> SearchTypesOutput

Searches for types in Amazon DataZone.

Prerequisites:

  • The --domain-identifier must refer to an existing Amazon DataZone domain.

  • --search-scope must be one of the valid values including: ASSET_TYPE, GLOSSARY_TERM_TYPE, DATA_PRODUCT_TYPE.

  • The --managed flag must be present without a value.

  • The user must have permissions for form or asset types in the domain.

  • If using --filters, ensure that the JSON is valid.

  • Filters contain correct structure (attribute, value, operator).

Parameters:

  • domain_identifier (DomainId) –

    The identifier of the Amazon DataZone domain in which to invoke the SearchTypes action.

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

    The maximum number of results to return in a single call to SearchTypes. When the number of results 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 SearchTypes to list the next set of results.

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

    When the number of results 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 results, the response includes a pagination token named NextToken. You can specify this NextToken value in a subsequent call to SearchTypes to list the next set of results.

  • search_scope (TypesSearchScope) –

    Specifies the scope of the search for types.

  • search_text (Optional[SearchText], default: None ) –

    Specifies the text for which to search.

  • search_in (Optional[SearchInList], default: None ) –

    The details of the search.

  • filters (Optional[FilterClause], default: None ) –

    The filters for the SearchTypes action.

  • sort (Optional[SearchSort], default: None ) –

    The specifies the way to sort the SearchTypes results.

  • managed (bool) –

    Specifies whether the search is managed.

Raises:

Source code in docs_src/capo_datazone/_services/data_zone.py
def search_types(
    self,
    domain_identifier: "capo_datazone.types.domain_id.DomainId",
    search_scope: "capo_datazone.types.types_search_scope.TypesSearchScope",
    managed: bool,
    *,
    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,
    search_text: Optional["capo_datazone.types.search_text.SearchText"] = None,
    search_in: Optional["capo_datazone.types.search_in_list.SearchInList"] = None,
    filters: Optional["capo_datazone.types.filter_clause.FilterClause"] = None,
    sort: Optional["capo_datazone.types.search_sort.SearchSort"] = None,
) -> "capo_datazone.types.search_types_output.SearchTypesOutput":
    """<p>Searches for types in Amazon DataZone.</p> <p>Prerequisites:</p> <ul> <li> <p>The --domain-identifier must refer to an existing Amazon DataZone domain. </p> </li> <li> <p>--search-scope must be one of the valid values including: ASSET_TYPE, GLOSSARY_TERM_TYPE, DATA_PRODUCT_TYPE.</p> </li> <li> <p>The --managed flag must be present without a value.</p> </li> <li> <p>The user must have permissions for form or asset types in the domain.</p> </li> <li> <p>If using --filters, ensure that the JSON is valid.</p> </li> <li> <p>Filters contain correct structure (attribute, value, operator).</p> </li> </ul>

    Args:
        domain_identifier: <p>The identifier of the Amazon DataZone domain in which to invoke the <code>SearchTypes</code> action.</p>
        max_results: <p>The maximum number of results to return in a single call to <code>SearchTypes</code>. When the number of results to be listed is greater than the value of <code>MaxResults</code>, the response contains a <code>NextToken</code> value that you can use in a subsequent call to <code>SearchTypes</code> to list the next set of results. </p>
        next_token: <p>When the number of results is greater than the default value for the <code>MaxResults</code> parameter, or if you explicitly specify a value for <code>MaxResults</code> that is less than the number of results, the response includes a pagination token named <code>NextToken</code>. You can specify this <code>NextToken</code> value in a subsequent call to <code>SearchTypes</code> to list the next set of results.</p>
        search_scope: <p>Specifies the scope of the search for types.</p>
        search_text: <p>Specifies the text for which to search.</p>
        search_in: <p>The details of the search.</p>
        filters: <p>The filters for the <code>SearchTypes</code> action.</p>
        sort: <p>The specifies the way to sort the <code>SearchTypes</code> results.</p>
        managed: <p>Specifies whether the search is managed.</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.search_types_input.SearchTypesInput]",
    ) -> OperationResponse[
        "capo_datazone.types.search_types_output.SearchTypesOutput"
    ]:
        import capo_datazone._operations.data_zone.search_types

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

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

        return capo_datazone.types.search_types_output.redact_sensitive(output)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("SearchTypes", redact_output=_redact_output),
    )
    input_: capo_datazone.types.search_types_input.SearchTypesInput = {
        "domain_identifier": domain_identifier,
        "search_scope": search_scope,
        "managed": managed,
    }
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if search_text is not None:
        input_["search_text"] = search_text
    if search_in is not None:
        input_["search_in"] = search_in
    if filters is not None:
        input_["filters"] = filters
    if sort is not None:
        input_["sort"] = sort

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