Skip to content

describe_groups async

describe_groups(
    search_query: SearchQueryType,
    *,
    config_overrides: Optional[AsyncWorkDocsClientConfig] = None,
    authentication_token: Optional[AuthenticationHeaderType] = None,
    organization_id: Optional[IdType] = None,
    marker: Optional[MarkerType] = None,
    limit: Optional[PositiveIntegerType] = None,
) -> DescribeGroupsResponse

Describes the groups specified by the query. Groups are defined by the underlying Active Directory.

Parameters:

  • authentication_token (Optional[AuthenticationHeaderType], default: None ) –

    Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.

  • search_query (SearchQueryType) –

    A query to describe groups by group name.

  • organization_id (Optional[IdType], default: None ) –

    The ID of the organization.

  • marker (Optional[MarkerType], default: None ) –

    The marker for the next set of results. (You received this marker from a previous call.)

  • limit (Optional[PositiveIntegerType], default: None ) –

    The maximum number of items to return with this call.

Raises:

Source code in docs_src/capo_workdocs/_services/async_work_docs.py
async def describe_groups(
    self,
    search_query: "capo_workdocs.types.search_query_type.SearchQueryType",
    *,
    config_overrides: Optional[AsyncWorkDocsClientConfig] = None,
    authentication_token: Optional[
        "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
    ] = None,
    organization_id: Optional["capo_workdocs.types.id_type.IdType"] = None,
    marker: Optional["capo_workdocs.types.marker_type.MarkerType"] = None,
    limit: Optional[
        "capo_workdocs.types.positive_integer_type.PositiveIntegerType"
    ] = None,
) -> "capo_workdocs.types.describe_groups_response.DescribeGroupsResponse":
    """<p>Describes the groups specified by the query. Groups are defined by the underlying Active Directory.</p>

    Args:
        authentication_token: <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
        search_query: <p>A query to describe groups by group name.</p>
        organization_id: <p>The ID of the organization.</p>
        marker: <p>The marker for the next set of results. (You received this marker from a previous call.)</p>
        limit: <p>The maximum number of items to return with this call.</p>

    Raises:
        capo_workdocs.errors.failed_dependency_exception.FailedDependencyException: <p>The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
        capo_workdocs.errors.service_unavailable_exception.ServiceUnavailableException: <p>One or more of the dependencies is unavailable.</p>
        capo_workdocs.errors.unauthorized_operation_exception.UnauthorizedOperationException: <p>The operation is not permitted.</p>
        capo_workdocs.errors.unauthorized_resource_access_exception.UnauthorizedResourceAccessException: <p>The caller does not have access to perform the action on the resource.</p>
        capo_workdocs.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_workdocs.types.describe_groups_request.DescribeGroupsRequest]",
    ) -> AsyncOperationResponse[
        "capo_workdocs.types.describe_groups_response.DescribeGroupsResponse"
    ]:
        import capo_workdocs._operations.aws_gorilla_boy_service.describe_groups

        (
            output,
            http_response,
        ) = await capo_workdocs._operations.aws_gorilla_boy_service.describe_groups.async_describe_groups(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_workdocs.types.describe_groups_request.DescribeGroupsRequest",
    ) -> dict[str, Any]:
        import capo_workdocs.types.describe_groups_request

        return capo_workdocs.types.describe_groups_request.redact_sensitive(input_)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("DescribeGroups", redact_input=_redact_input),
    )
    input_: capo_workdocs.types.describe_groups_request.DescribeGroupsRequest = {
        "search_query": search_query
    }
    if authentication_token is not None:
        input_["authentication_token"] = authentication_token
    if organization_id is not None:
        input_["organization_id"] = organization_id
    if marker is not None:
        input_["marker"] = marker
    if limit is not None:
        input_["limit"] = limit

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output