Class CoreDevice

    • Method Detail

      • coreDeviceThingName

        public final String coreDeviceThingName()

        The name of the core device. This is also the name of the IoT thing.

        Returns:
        The name of the core device. This is also the name of the IoT thing.
      • status

        public final CoreDeviceStatus status()

        The status of the core device. Core devices can have the following statuses:

        • HEALTHY – The IoT Greengrass Core software and all components run on the core device without issue.

        • UNHEALTHY – The IoT Greengrass Core software or a component is in a failed state on the core device.

        If the service returns an enum value that is not available in the current SDK version, status will return CoreDeviceStatus.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from statusAsString().

        Returns:
        The status of the core device. Core devices can have the following statuses:

        • HEALTHY – The IoT Greengrass Core software and all components run on the core device without issue.

        • UNHEALTHY – The IoT Greengrass Core software or a component is in a failed state on the core device.

        See Also:
        CoreDeviceStatus
      • statusAsString

        public final String statusAsString()

        The status of the core device. Core devices can have the following statuses:

        • HEALTHY – The IoT Greengrass Core software and all components run on the core device without issue.

        • UNHEALTHY – The IoT Greengrass Core software or a component is in a failed state on the core device.

        If the service returns an enum value that is not available in the current SDK version, status will return CoreDeviceStatus.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from statusAsString().

        Returns:
        The status of the core device. Core devices can have the following statuses:

        • HEALTHY – The IoT Greengrass Core software and all components run on the core device without issue.

        • UNHEALTHY – The IoT Greengrass Core software or a component is in a failed state on the core device.

        See Also:
        CoreDeviceStatus
      • lastStatusUpdateTimestamp

        public final Instant lastStatusUpdateTimestamp()

        The time at which the core device's status last updated, expressed in ISO 8601 format.

        Returns:
        The time at which the core device's status last updated, expressed in ISO 8601 format.
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • toString

        public final String toString()
        Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
        Overrides:
        toString in class Object
      • getValueForField

        public final <T> Optional<T> getValueForField​(String fieldName,
                                                      Class<T> clazz)