Skip to content

describe_root_folders

describe_root_folders(
    authentication_token: AuthenticationHeaderType,
    *,
    config_overrides: Optional[WorkDocsClientConfig] = None,
    limit: Optional[LimitType] = None,
    marker: Optional[PageMarkerType] = None,
) -> DescribeRootFoldersResponse

Describes the current user's special folders; the RootFolder and the RecycleBin. RootFolder is the root of user's files and folders and RecycleBin is the root of recycled items. This is not a valid action for SigV4 (administrative API) clients.

This action requires an authentication token. To get an authentication token, register an application with Amazon WorkDocs. For more information, see Authentication and Access Control for User Applications in the Amazon WorkDocs Developer Guide.

Parameters:

  • authentication_token (AuthenticationHeaderType) –

    Amazon WorkDocs authentication token.

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

    The maximum number of items to return.

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

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

Raises:

Source code in docs_src/capo_workdocs/_services/work_docs.py
def describe_root_folders(
    self,
    authentication_token: "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType",
    *,
    config_overrides: Optional[WorkDocsClientConfig] = None,
    limit: Optional["capo_workdocs.types.limit_type.LimitType"] = None,
    marker: Optional["capo_workdocs.types.page_marker_type.PageMarkerType"] = None,
) -> (
    "capo_workdocs.types.describe_root_folders_response.DescribeRootFoldersResponse"
):
    """<p>Describes the current user's special folders; the <code>RootFolder</code> and the <code>RecycleBin</code>. <code>RootFolder</code> is the root of user's files and folders and <code>RecycleBin</code> is the root of recycled items. This is not a valid action for SigV4 (administrative API) clients.</p> <p>This action requires an authentication token. To get an authentication token, register an application with Amazon WorkDocs. For more information, see <a href="https://docs.aws.amazon.com/workdocs/latest/developerguide/wd-auth-user.html">Authentication and Access Control for User Applications</a> in the <i>Amazon WorkDocs Developer Guide</i>.</p>

    Args:
        authentication_token: <p>Amazon WorkDocs authentication token.</p>
        limit: <p>The maximum number of items to return.</p>
        marker: <p>The marker for the next set of results. (You received this marker from a previous 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.invalid_argument_exception.InvalidArgumentException: <p>The pagination marker or limit fields are not valid.</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.
    """

    def _handler(
        req: "OperationRequest[capo_workdocs.types.describe_root_folders_request.DescribeRootFoldersRequest]",
    ) -> OperationResponse[
        "capo_workdocs.types.describe_root_folders_response.DescribeRootFoldersResponse"
    ]:
        import capo_workdocs._operations.aws_gorilla_boy_service.describe_root_folders

        output, http_response = (
            capo_workdocs._operations.aws_gorilla_boy_service.describe_root_folders.describe_root_folders(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

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

        return capo_workdocs.types.describe_root_folders_request.redact_sensitive(
            input_
        )

    def _redact_output(
        output: "capo_workdocs.types.describe_root_folders_response.DescribeRootFoldersResponse",
    ) -> dict[str, Any]:
        import capo_workdocs.types.describe_root_folders_response

        return capo_workdocs.types.describe_root_folders_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "DescribeRootFolders",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_workdocs.types.describe_root_folders_request.DescribeRootFoldersRequest = {
        "authentication_token": authentication_token
    }
    if limit is not None:
        input_["limit"] = limit
    if marker is not None:
        input_["marker"] = marker

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