Skip to content

describe_activities async

describe_activities(
    *,
    config_overrides: Optional[AsyncWorkDocsClientConfig] = None,
    authentication_token: Optional[AuthenticationHeaderType] = None,
    start_time: Optional[TimestampType] = None,
    end_time: Optional[TimestampType] = None,
    organization_id: Optional[IdType] = None,
    activity_types: Optional[ActivityNamesFilterType] = None,
    resource_id: Optional[IdType] = None,
    user_id: Optional[IdType] = None,
    include_indirect_activities: Optional[BooleanType] = None,
    limit: Optional[LimitType] = None,
    marker: Optional[SearchMarkerType] = None,
) -> DescribeActivitiesResponse

Describes the user activities in a specified time period.

Parameters:

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

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

  • start_time (Optional[TimestampType], default: None ) –

    The timestamp that determines the starting time of the activities. The response includes the activities performed after the specified timestamp.

  • end_time (Optional[TimestampType], default: None ) –

    The timestamp that determines the end time of the activities. The response includes the activities performed before the specified timestamp.

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

    The ID of the organization. This is a mandatory parameter when using administrative API (SigV4) requests.

  • activity_types (Optional[ActivityNamesFilterType], default: None ) –

    Specifies which activity types to include in the response. If this field is left empty, all activity types are returned.

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

    The document or folder ID for which to describe activity types.

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

    The ID of the user who performed the action. The response includes activities pertaining to this user. This is an optional parameter and is only applicable for administrative API (SigV4) requests.

  • include_indirect_activities (Optional[BooleanType], default: None ) –

    Includes indirect activities. An indirect activity results from a direct activity performed on a parent resource. For example, sharing a parent folder (the direct activity) shares all of the subfolders and documents within the parent folder (the indirect activity).

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

    The maximum number of items to return.

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

    The marker for the next set of results.

Raises:

Source code in docs_src/capo_workdocs/_services/async_work_docs.py
async def describe_activities(
    self,
    *,
    config_overrides: Optional[AsyncWorkDocsClientConfig] = None,
    authentication_token: Optional[
        "capo_workdocs.types.authentication_header_type.AuthenticationHeaderType"
    ] = None,
    start_time: Optional["capo_workdocs.types.timestamp_type.TimestampType"] = None,
    end_time: Optional["capo_workdocs.types.timestamp_type.TimestampType"] = None,
    organization_id: Optional["capo_workdocs.types.id_type.IdType"] = None,
    activity_types: Optional[
        "capo_workdocs.types.activity_names_filter_type.ActivityNamesFilterType"
    ] = None,
    resource_id: Optional["capo_workdocs.types.id_type.IdType"] = None,
    user_id: Optional["capo_workdocs.types.id_type.IdType"] = None,
    include_indirect_activities: Optional[
        "capo_workdocs.types.boolean_type.BooleanType"
    ] = None,
    limit: Optional["capo_workdocs.types.limit_type.LimitType"] = None,
    marker: Optional[
        "capo_workdocs.types.search_marker_type.SearchMarkerType"
    ] = None,
) -> "capo_workdocs.types.describe_activities_response.DescribeActivitiesResponse":
    """<p>Describes the user activities in a specified time period.</p>

    Args:
        authentication_token: <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
        start_time: <p>The timestamp that determines the starting time of the activities. The response includes the activities performed after the specified timestamp.</p>
        end_time: <p>The timestamp that determines the end time of the activities. The response includes the activities performed before the specified timestamp.</p>
        organization_id: <p>The ID of the organization. This is a mandatory parameter when using administrative API (SigV4) requests.</p>
        activity_types: <p>Specifies which activity types to include in the response. If this field is left empty, all activity types are returned.</p>
        resource_id: <p>The document or folder ID for which to describe activity types.</p>
        user_id: <p>The ID of the user who performed the action. The response includes activities pertaining to this user. This is an optional parameter and is only applicable for administrative API (SigV4) requests.</p>
        include_indirect_activities: <p>Includes indirect activities. An indirect activity results from a direct activity performed on a parent resource. For example, sharing a parent folder (the direct activity) shares all of the subfolders and documents within the parent folder (the indirect activity).</p>
        limit: <p>The maximum number of items to return.</p>
        marker: <p>The marker for the next set of results.</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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_workdocs.types.describe_activities_request.DescribeActivitiesRequest]",
    ) -> AsyncOperationResponse[
        "capo_workdocs.types.describe_activities_response.DescribeActivitiesResponse"
    ]:
        import capo_workdocs._operations.aws_gorilla_boy_service.describe_activities

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

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

        return capo_workdocs.types.describe_activities_request.redact_sensitive(
            input_
        )

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

        return capo_workdocs.types.describe_activities_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "DescribeActivities",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_workdocs.types.describe_activities_request.DescribeActivitiesRequest = {}
    if authentication_token is not None:
        input_["authentication_token"] = authentication_token
    if start_time is not None:
        input_["start_time"] = start_time
    if end_time is not None:
        input_["end_time"] = end_time
    if organization_id is not None:
        input_["organization_id"] = organization_id
    if activity_types is not None:
        input_["activity_types"] = activity_types
    if resource_id is not None:
        input_["resource_id"] = resource_id
    if user_id is not None:
        input_["user_id"] = user_id
    if include_indirect_activities is not None:
        input_["include_indirect_activities"] = include_indirect_activities
    if limit is not None:
        input_["limit"] = limit
    if marker is not None:
        input_["marker"] = marker

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