Skip to content

list_domain_units_for_parent async

list_domain_units_for_parent(
    domain_identifier: DomainId,
    parent_domain_unit_identifier: DomainUnitId,
    *,
    config_overrides: Optional[AsyncDataZoneClientConfig] = None,
    max_results: Optional[MaxResultsForListDomains] = None,
    next_token: Optional[PaginationToken] = None,
) -> ListDomainUnitsForParentOutput

Lists child domain units for the specified parent domain unit.

Parameters:

  • domain_identifier (DomainId) –

    The ID of the domain in which you want to list domain units for a parent domain unit.

  • parent_domain_unit_identifier (DomainUnitId) –

    The ID of the parent domain unit.

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

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

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

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

Raises:

Source code in docs_src/capo_datazone/_services/async_data_zone.py
async def list_domain_units_for_parent(
    self,
    domain_identifier: "capo_datazone.types.domain_id.DomainId",
    parent_domain_unit_identifier: "capo_datazone.types.domain_unit_id.DomainUnitId",
    *,
    config_overrides: Optional[AsyncDataZoneClientConfig] = None,
    max_results: Optional[
        "capo_datazone.types.max_results_for_list_domains.MaxResultsForListDomains"
    ] = None,
    next_token: Optional[
        "capo_datazone.types.pagination_token.PaginationToken"
    ] = None,
) -> "capo_datazone.types.list_domain_units_for_parent_output.ListDomainUnitsForParentOutput":
    """<p>Lists child domain units for the specified parent domain unit.</p>

    Args:
        domain_identifier: <p>The ID of the domain in which you want to list domain units for a parent domain unit.</p>
        parent_domain_unit_identifier: <p>The ID of the parent domain unit.</p>
        max_results: <p>The maximum number of domain units to return in a single call to ListDomainUnitsForParent. When the number of domain units 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 ListDomainUnitsForParent to list the next set of domain units.</p>
        next_token: <p>When the number of domain units 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 domain units, the response includes a pagination token named NextToken. You can specify this NextToken value in a subsequent call to ListDomainUnitsForParent to list the next set of domain units.</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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_datazone.types.list_domain_units_for_parent_input.ListDomainUnitsForParentInput]",
    ) -> AsyncOperationResponse[
        "capo_datazone.types.list_domain_units_for_parent_output.ListDomainUnitsForParentOutput"
    ]:
        import capo_datazone._operations.data_zone.list_domain_units_for_parent

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListDomainUnitsForParent")
    )
    input_: capo_datazone.types.list_domain_units_for_parent_input.ListDomainUnitsForParentInput = {
        "domain_identifier": domain_identifier,
        "parent_domain_unit_identifier": parent_domain_unit_identifier,
    }
    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