Skip to content

get_property_value_history async

get_property_value_history(
    workspace_id: Id,
    selected_properties: SelectedPropertyList,
    *,
    config_overrides: Optional[AsyncIoTTwinMakerClientConfig] = None,
    entity_id: Optional[EntityId] = None,
    component_name: Optional[Name] = None,
    component_path: Optional[ComponentPath] = None,
    component_type_id: Optional[ComponentTypeId] = None,
    property_filters: Optional[PropertyFilters] = None,
    start_date_time: Optional[Timestamp] = None,
    end_date_time: Optional[Timestamp] = None,
    interpolation: Optional[InterpolationParameters] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
    order_by_time: Optional[OrderByTime] = None,
    start_time: Optional[Time] = None,
    end_time: Optional[Time] = None,
) -> GetPropertyValueHistoryResponse

Retrieves information about the history of a time series property value for a component, component type, entity, or workspace.

You must specify a value for workspaceId. For entity-specific queries, specify values for componentName and entityId. For cross-entity quries, specify a value for componentTypeId.

Parameters:

  • workspace_id (Id) –

    The ID of the workspace.

  • entity_id (Optional[EntityId], default: None ) –

    The ID of the entity.

  • component_name (Optional[Name], default: None ) –

    The name of the component.

  • component_path (Optional[ComponentPath], default: None ) –

    This string specifies the path to the composite component, starting from the top-level component.

  • component_type_id (Optional[ComponentTypeId], default: None ) –

    The ID of the component type.

  • selected_properties (SelectedPropertyList) –

    A list of properties whose value histories the request retrieves.

  • property_filters (Optional[PropertyFilters], default: None ) –

    A list of objects that filter the property value history request.

  • start_date_time (Optional[Timestamp], default: None ) –

    The date and time of the earliest property value to return.

  • end_date_time (Optional[Timestamp], default: None ) –

    The date and time of the latest property value to return.

  • interpolation (Optional[InterpolationParameters], default: None ) –

    An object that specifies the interpolation type and the interval over which to interpolate data.

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

    The string that specifies the next page of results.

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

    The maximum number of results to return at one time. The default is 25.

    Valid Range: Minimum value of 1. Maximum value of 250.

  • order_by_time (Optional[OrderByTime], default: None ) –

    The time direction to use in the result order.

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

    The ISO8601 DateTime of the earliest property value to return.

    For more information about the ISO8601 DateTime format, see the data type PropertyValue.

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

    The ISO8601 DateTime of the latest property value to return.

    For more information about the ISO8601 DateTime format, see the data type PropertyValue.

Raises:

Source code in docs_src/capo_iottwinmaker/_services/async_io_t_twin_maker.py
async def get_property_value_history(
    self,
    workspace_id: "capo_iottwinmaker.types.id.Id",
    selected_properties: "capo_iottwinmaker.types.selected_property_list.SelectedPropertyList",
    *,
    config_overrides: Optional[AsyncIoTTwinMakerClientConfig] = None,
    entity_id: Optional["capo_iottwinmaker.types.entity_id.EntityId"] = None,
    component_name: Optional["capo_iottwinmaker.types.name.Name"] = None,
    component_path: Optional[
        "capo_iottwinmaker.types.component_path.ComponentPath"
    ] = None,
    component_type_id: Optional[
        "capo_iottwinmaker.types.component_type_id.ComponentTypeId"
    ] = None,
    property_filters: Optional[
        "capo_iottwinmaker.types.property_filters.PropertyFilters"
    ] = None,
    start_date_time: Optional["capo_iottwinmaker.types.timestamp.Timestamp"] = None,
    end_date_time: Optional["capo_iottwinmaker.types.timestamp.Timestamp"] = None,
    interpolation: Optional[
        "capo_iottwinmaker.types.interpolation_parameters.InterpolationParameters"
    ] = None,
    next_token: Optional["capo_iottwinmaker.types.next_token.NextToken"] = None,
    max_results: Optional["capo_iottwinmaker.types.max_results.MaxResults"] = None,
    order_by_time: Optional[
        "capo_iottwinmaker.types.order_by_time.OrderByTime"
    ] = None,
    start_time: Optional["capo_iottwinmaker.types.time.Time"] = None,
    end_time: Optional["capo_iottwinmaker.types.time.Time"] = None,
) -> "capo_iottwinmaker.types.get_property_value_history_response.GetPropertyValueHistoryResponse":
    """<p>Retrieves information about the history of a time series property value for a component, component type, entity, or workspace.</p> <p>You must specify a value for <code>workspaceId</code>. For entity-specific queries, specify values for <code>componentName</code> and <code>entityId</code>. For cross-entity quries, specify a value for <code>componentTypeId</code>.</p>

    Args:
        workspace_id: <p>The ID of the workspace.</p>
        entity_id: <p>The ID of the entity.</p>
        component_name: <p>The name of the component.</p>
        component_path: <p>This string specifies the path to the composite component, starting from the top-level component.</p>
        component_type_id: <p>The ID of the component type.</p>
        selected_properties: <p>A list of properties whose value histories the request retrieves.</p>
        property_filters: <p>A list of objects that filter the property value history request.</p>
        start_date_time: <p>The date and time of the earliest property value to return.</p>
        end_date_time: <p>The date and time of the latest property value to return.</p>
        interpolation: <p>An object that specifies the interpolation type and the interval over which to interpolate data.</p>
        next_token: <p>The string that specifies the next page of results.</p>
        max_results: <p>The maximum number of results to return at one time. The default is 25.</p> <p>Valid Range: Minimum value of 1. Maximum value of 250.</p>
        order_by_time: <p>The time direction to use in the result order.</p>
        start_time: <p>The ISO8601 DateTime of the earliest property value to return.</p> <p>For more information about the ISO8601 DateTime format, see the data type <a href="https://docs.aws.amazon.com/iot-twinmaker/latest/apireference/API_PropertyValue.html">PropertyValue</a>.</p>
        end_time: <p>The ISO8601 DateTime of the latest property value to return.</p> <p>For more information about the ISO8601 DateTime format, see the data type <a href="https://docs.aws.amazon.com/iot-twinmaker/latest/apireference/API_PropertyValue.html">PropertyValue</a>.</p>

    Raises:
        capo_iottwinmaker.errors.access_denied_exception.AccessDeniedException: <p>Access is denied.</p>
        capo_iottwinmaker.errors.connector_failure_exception.ConnectorFailureException: <p>The connector failed.</p>
        capo_iottwinmaker.errors.connector_timeout_exception.ConnectorTimeoutException: <p>The connector timed out.</p>
        capo_iottwinmaker.errors.internal_server_exception.InternalServerException: <p>An unexpected error has occurred.</p>
        capo_iottwinmaker.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource wasn't found.</p>
        capo_iottwinmaker.errors.throttling_exception.ThrottlingException: <p>The rate exceeds the limit.</p>
        capo_iottwinmaker.errors.validation_exception.ValidationException: <p>Failed</p>
        capo_iottwinmaker.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_iottwinmaker.types.get_property_value_history_request.GetPropertyValueHistoryRequest]",
    ) -> AsyncOperationResponse[
        "capo_iottwinmaker.types.get_property_value_history_response.GetPropertyValueHistoryResponse"
    ]:
        import capo_iottwinmaker._operations.aws_io_t_twin_maker.get_property_value_history

        (
            output,
            http_response,
        ) = await capo_iottwinmaker._operations.aws_io_t_twin_maker.get_property_value_history.async_get_property_value_history(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetPropertyValueHistory")
    )
    input_: capo_iottwinmaker.types.get_property_value_history_request.GetPropertyValueHistoryRequest = {
        "workspace_id": workspace_id,
        "selected_properties": selected_properties,
    }
    if entity_id is not None:
        input_["entity_id"] = entity_id
    if component_name is not None:
        input_["component_name"] = component_name
    if component_path is not None:
        input_["component_path"] = component_path
    if component_type_id is not None:
        input_["component_type_id"] = component_type_id
    if property_filters is not None:
        input_["property_filters"] = property_filters
    if start_date_time is not None:
        input_["start_date_time"] = start_date_time
    if end_date_time is not None:
        input_["end_date_time"] = end_date_time
    if interpolation is not None:
        input_["interpolation"] = interpolation
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results
    if order_by_time is not None:
        input_["order_by_time"] = order_by_time
    if start_time is not None:
        input_["start_time"] = start_time
    if end_time is not None:
        input_["end_time"] = end_time

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