Skip to content

describe_folder_contents

describe_folder_contents(
    folder_id: ResourceIdType,
    *,
    config_overrides: Optional[WorkDocsClientConfig] = None,
    authentication_token: Optional[AuthenticationHeaderType] = None,
    sort: Optional[ResourceSortType] = None,
    order: Optional[OrderType] = None,
    limit: Optional[LimitType] = None,
    marker: Optional[PageMarkerType] = None,
    type: Optional[FolderContentType] = None,
    include: Optional[FieldNamesType] = None,
) -> DescribeFolderContentsResponse

Describes the contents of the specified folder, including its documents and subfolders.

By default, Amazon WorkDocs returns the first 100 active document and folder metadata items. If there are more results, the response includes a marker that you can use to request the next set of results. You can also request initialized documents.

Parameters:

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

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

  • folder_id (ResourceIdType) –

    The ID of the folder.

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

    The sorting criteria.

  • order (Optional[OrderType], default: None ) –

    The order for the contents of the folder.

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

    The maximum number of items to return with this call.

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

    The marker for the next set of results. This marker was received from a previous call.

  • type (Optional[FolderContentType], default: None ) –

    The type of items.

  • include (Optional[FieldNamesType], default: None ) –

    The contents to include. Specify "INITIALIZED" to include initialized documents.

Raises:

Source code in docs_src/capo_workdocs/_services/work_docs.py
def describe_folder_contents(
    self,
    folder_id: "capo_workdocs.types.resource_id_type.ResourceIdType",
    *,
    config_overrides: Optional[WorkDocsClientConfig] = None,
    authentication_token: Optional[
        "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
    ] = None,
    sort: Optional[
        "capo_workdocs.types.resource_sort_type.ResourceSortType"
    ] = None,
    order: Optional["capo_workdocs.types.order_type.OrderType"] = None,
    limit: Optional["capo_workdocs.types.limit_type.LimitType"] = None,
    marker: Optional["capo_workdocs.types.page_marker_type.PageMarkerType"] = None,
    type: Optional[
        "capo_workdocs.types.folder_content_type.FolderContentType"
    ] = None,
    include: Optional["capo_workdocs.types.field_names_type.FieldNamesType"] = None,
) -> "capo_workdocs.types.describe_folder_contents_response.DescribeFolderContentsResponse":
    """<p>Describes the contents of the specified folder, including its documents and subfolders.</p> <p>By default, Amazon WorkDocs returns the first 100 active document and folder metadata items. If there are more results, the response includes a marker that you can use to request the next set of results. You can also request initialized documents.</p>

    Args:
        authentication_token: <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
        folder_id: <p>The ID of the folder.</p>
        sort: <p>The sorting criteria.</p>
        order: <p>The order for the contents of the folder.</p>
        limit: <p>The maximum number of items to return with this call.</p>
        marker: <p>The marker for the next set of results. This marker was received from a previous call.</p>
        type: <p>The type of items.</p>
        include: <p>The contents to include. Specify "INITIALIZED" to include initialized documents.</p>

    Raises:
        capo_workdocs.errors.entity_not_exists_exception.EntityNotExistsException: <p>The resource does not exist.</p>
        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.prohibited_state_exception.ProhibitedStateException: <p>The specified document version is not in the INITIALIZED state.</p>
        capo_workdocs.errors.service_unavailable_exception.ServiceUnavailableException: <p>One or more of the dependencies is unavailable.</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_folder_contents_request.DescribeFolderContentsRequest]",
    ) -> OperationResponse[
        "capo_workdocs.types.describe_folder_contents_response.DescribeFolderContentsResponse"
    ]:
        import capo_workdocs._operations.aws_gorilla_boy_service.describe_folder_contents

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

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

        return (
            capo_workdocs.types.describe_folder_contents_request.redact_sensitive(
                input_
            )
        )

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

        return (
            capo_workdocs.types.describe_folder_contents_response.redact_sensitive(
                output
            )
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "DescribeFolderContents",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_workdocs.types.describe_folder_contents_request.DescribeFolderContentsRequest = {
        "folder_id": folder_id
    }
    if authentication_token is not None:
        input_["authentication_token"] = authentication_token
    if sort is not None:
        input_["sort"] = sort
    if order is not None:
        input_["order"] = order
    if limit is not None:
        input_["limit"] = limit
    if marker is not None:
        input_["marker"] = marker
    if type is not None:
        input_["type"] = type
    if include is not None:
        input_["include"] = include

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