Class Annotation

    • Method Detail

      • annotationName

        public final String annotationName()

        An identifier for the evaluation logic that was used when invoking the Hook. For Control Tower, this is the control ID. For Guard, this is the rule ID. For Lambda and custom Hooks, this is a user-defined identifier.

        Returns:
        An identifier for the evaluation logic that was used when invoking the Hook. For Control Tower, this is the control ID. For Guard, this is the rule ID. For Lambda and custom Hooks, this is a user-defined identifier.
      • statusAsString

        public final String statusAsString()

        The status of the Hook invocation from the downstream service.

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

        Returns:
        The status of the Hook invocation from the downstream service.
        See Also:
        AnnotationStatus
      • statusMessage

        public final String statusMessage()

        The explanation for the specific status assigned to this Hook invocation. For example, "Bucket does not block public access".

        Returns:
        The explanation for the specific status assigned to this Hook invocation. For example, "Bucket does not block public access".
      • remediationMessage

        public final String remediationMessage()

        Suggests what to change if your Hook returns a FAILED status. For example, "Block public access to the bucket".

        Returns:
        Suggests what to change if your Hook returns a FAILED status. For example, "Block public access to the bucket".
      • remediationLink

        public final String remediationLink()

        A URL that you can access for additional remediation guidance.

        Returns:
        A URL that you can access for additional remediation guidance.
      • 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)