Skip to content

list_designations async

list_designations(
    domain_identifier: DomainId,
    *,
    config_overrides: Optional[AsyncDataZoneClientConfig] = None,
    next_token: Optional[PaginationToken] = None,
    max_results: Optional[ListDesignationsMaxResults] = None,
) -> ListDesignationsOutput

Lists the designations in a domain. The response returns system-managed designations first, followed by user-created designations in alphabetical order by name. Results are paginated. Use nextToken to retrieve additional pages of results.

Parameters:

  • domain_identifier (DomainId) –

    The identifier of the Amazon DataZone domain that contains the designations to list.

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

    If the results exceed the value of MaxResults, the previous call returns a pagination token. Specify this token in a subsequent call to ListDesignations to retrieve the next set of results. If not specified, the operation returns the first page of results.

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

    The maximum number of designations to return in a single call to ListDesignations. If the number of designations exceeds MaxResults, the response includes a NextToken value. Use that token in a subsequent call to ListDesignations to retrieve the next set of designations. The default value is 20.

Raises:

Source code in docs_src/capo_datazone/_services/async_data_zone.py
async def list_designations(
    self,
    domain_identifier: "capo_datazone.types.domain_id.DomainId",
    *,
    config_overrides: Optional[AsyncDataZoneClientConfig] = None,
    next_token: Optional[
        "capo_datazone.types.pagination_token.PaginationToken"
    ] = None,
    max_results: Optional[
        "capo_datazone.types.list_designations_max_results.ListDesignationsMaxResults"
    ] = None,
) -> "capo_datazone.types.list_designations_output.ListDesignationsOutput":
    """<p>Lists the designations in a domain. The response returns system-managed designations first, followed by user-created designations in alphabetical order by name. Results are paginated. Use <code>nextToken</code> to retrieve additional pages of results.</p>

    Args:
        domain_identifier: <p>The identifier of the Amazon DataZone domain that contains the designations to list.</p>
        next_token: <p>If the results exceed the value of <code>MaxResults</code>, the previous call returns a pagination token. Specify this token in a subsequent call to <code>ListDesignations</code> to retrieve the next set of results. If not specified, the operation returns the first page of results.</p>
        max_results: <p>The maximum number of designations to return in a single call to <code>ListDesignations</code>. If the number of designations exceeds <code>MaxResults</code>, the response includes a <code>NextToken</code> value. Use that token in a subsequent call to <code>ListDesignations</code> to retrieve the next set of designations. The default value is 20.</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.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource cannot be found.</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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_datazone.types.list_designations_input.ListDesignationsInput]",
    ) -> AsyncOperationResponse[
        "capo_datazone.types.list_designations_output.ListDesignationsOutput"
    ]:
        import capo_datazone._operations.data_zone.list_designations

        (
            output,
            http_response,
        ) = await capo_datazone._operations.data_zone.list_designations.async_list_designations(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

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

        return capo_datazone.types.list_designations_output.redact_sensitive(output)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("ListDesignations", redact_output=_redact_output),
    )
    input_: capo_datazone.types.list_designations_input.ListDesignationsInput = {
        "domain_identifier": domain_identifier
    }
    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