Skip to content

list_entity_events async

list_entity_events(
    entity: Attributes,
    start_time: datetime,
    end_time: datetime,
    *,
    config_overrides: Optional[AsyncApplicationSignalsClientConfig] = None,
    max_results: Optional[ListEntityEventsMaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> ListEntityEventsOutput

Returns a list of change events for a specific entity, such as deployments, configuration changes, or other state-changing activities. This operation helps track the history of changes that may have affected service performance.

Parameters:

  • entity (Attributes) –

    The entity for which to retrieve change events. This specifies the service, resource, or other entity whose event history you want to examine.

    This is a string-to-string map. It can include the following fields.

    • Type designates the type of object this is.

    • ResourceType specifies the type of the resource. This field is used only when the value of the Type field is Resource or AWS::Resource.

    • Name specifies the name of the object. This is used only if the value of the Type field is Service, RemoteService, or AWS::Service.

    • Identifier identifies the resource objects of this resource. This is used only if the value of the Type field is Resource or AWS::Resource.

    • Environment specifies the location where this object is hosted, or what it belongs to.

    • AwsAccountId specifies the account where this object is in.

    Below is an example of a service.

    { "Type": "Service", "Name": "visits-service", "Environment": "petclinic-test" }

    Below is an example of a resource.

    { "Type": "AWS::Resource", "ResourceType": "AWS::DynamoDB::Table", "Identifier": "Customers" }

  • start_time (datetime) –

    The start of the time period to retrieve change events for. When used in a raw HTTP Query API, it is formatted as epoch time in seconds. For example: 1698778057

  • end_time (datetime) –

    The end of the time period to retrieve change events for. When used in a raw HTTP Query API, it is formatted as epoch time in seconds. For example: 1698778057

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

    The maximum number of change events to return in one operation. If you omit this parameter, the default of 50 is used.

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

    Include this value, if it was returned by the previous operation, to get the next set of change events.

Raises:

Source code in docs_src/capo_application_signals/_services/async_application_signals.py
async def list_entity_events(
    self,
    entity: "capo_application_signals.types.attributes.Attributes",
    start_time: datetime.datetime,
    end_time: datetime.datetime,
    *,
    config_overrides: Optional[AsyncApplicationSignalsClientConfig] = None,
    max_results: Optional[
        "capo_application_signals.types.list_entity_events_max_results.ListEntityEventsMaxResults"
    ] = None,
    next_token: Optional[
        "capo_application_signals.types.next_token.NextToken"
    ] = None,
) -> "capo_application_signals.types.list_entity_events_output.ListEntityEventsOutput":
    """<p>Returns a list of change events for a specific entity, such as deployments, configuration changes, or other state-changing activities. This operation helps track the history of changes that may have affected service performance.</p>

    Args:
        entity: <p>The entity for which to retrieve change events. This specifies the service, resource, or other entity whose event history you want to examine.</p> <p>This is a string-to-string map. It can include the following fields.</p> <ul> <li> <p> <code>Type</code> designates the type of object this is.</p> </li> <li> <p> <code>ResourceType</code> specifies the type of the resource. This field is used only when the value of the <code>Type</code> field is <code>Resource</code> or <code>AWS::Resource</code>.</p> </li> <li> <p> <code>Name</code> specifies the name of the object. This is used only if the value of the <code>Type</code> field is <code>Service</code>, <code>RemoteService</code>, or <code>AWS::Service</code>.</p> </li> <li> <p> <code>Identifier</code> identifies the resource objects of this resource. This is used only if the value of the <code>Type</code> field is <code>Resource</code> or <code>AWS::Resource</code>.</p> </li> <li> <p> <code>Environment</code> specifies the location where this object is hosted, or what it belongs to.</p> </li> <li> <p> <code>AwsAccountId</code> specifies the account where this object is in.</p> </li> </ul> <p>Below is an example of a service.</p> <p> <code>{ "Type": "Service", "Name": "visits-service", "Environment": "petclinic-test" }</code> </p> <p>Below is an example of a resource.</p> <p> <code>{ "Type": "AWS::Resource", "ResourceType": "AWS::DynamoDB::Table", "Identifier": "Customers" }</code> </p>
        start_time: <p>The start of the time period to retrieve change events for. When used in a raw HTTP Query API, it is formatted as epoch time in seconds. For example: <code>1698778057</code> </p>
        end_time: <p>The end of the time period to retrieve change events for. When used in a raw HTTP Query API, it is formatted as epoch time in seconds. For example: <code>1698778057</code> </p>
        max_results: <p>The maximum number of change events to return in one operation. If you omit this parameter, the default of 50 is used.</p>
        next_token: <p>Include this value, if it was returned by the previous operation, to get the next set of change events.</p>

    Raises:
        capo_application_signals.errors.throttling_exception.ThrottlingException: <p>The request was throttled because of quota limits.</p>
        capo_application_signals.errors.validation_exception.ValidationException: <p>The resource is not valid.</p>
        capo_application_signals.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_application_signals.types.list_entity_events_input.ListEntityEventsInput]",
    ) -> AsyncOperationResponse[
        "capo_application_signals.types.list_entity_events_output.ListEntityEventsOutput"
    ]:
        import capo_application_signals._operations.application_signals.list_entity_events

        (
            output,
            http_response,
        ) = await capo_application_signals._operations.application_signals.list_entity_events.async_list_entity_events(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListEntityEvents")
    )
    input_: capo_application_signals.types.list_entity_events_input.ListEntityEventsInput = {
        "entity": entity,
        "start_time": start_time,
        "end_time": end_time,
    }
    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