Class GetGuardrailResponse

    • Method Detail

      • name

        public final String name()

        The name of the guardrail.

        Returns:
        The name of the guardrail.
      • description

        public final String description()

        The description of the guardrail.

        Returns:
        The description of the guardrail.
      • guardrailId

        public final String guardrailId()

        The unique identifier of the guardrail.

        Returns:
        The unique identifier of the guardrail.
      • guardrailArn

        public final String guardrailArn()

        The ARN of the guardrail.

        Returns:
        The ARN of the guardrail.
      • version

        public final String version()

        The version of the guardrail.

        Returns:
        The version of the guardrail.
      • topicPolicy

        public final GuardrailTopicPolicy topicPolicy()

        The topic policy that was configured for the guardrail.

        Returns:
        The topic policy that was configured for the guardrail.
      • contentPolicy

        public final GuardrailContentPolicy contentPolicy()

        The content policy that was configured for the guardrail.

        Returns:
        The content policy that was configured for the guardrail.
      • wordPolicy

        public final GuardrailWordPolicy wordPolicy()

        The word policy that was configured for the guardrail.

        Returns:
        The word policy that was configured for the guardrail.
      • sensitiveInformationPolicy

        public final GuardrailSensitiveInformationPolicy sensitiveInformationPolicy()

        The sensitive information policy that was configured for the guardrail.

        Returns:
        The sensitive information policy that was configured for the guardrail.
      • contextualGroundingPolicy

        public final GuardrailContextualGroundingPolicy contextualGroundingPolicy()

        The contextual grounding policy used in the guardrail.

        Returns:
        The contextual grounding policy used in the guardrail.
      • createdAt

        public final Instant createdAt()

        The date and time at which the guardrail was created.

        Returns:
        The date and time at which the guardrail was created.
      • updatedAt

        public final Instant updatedAt()

        The date and time at which the guardrail was updated.

        Returns:
        The date and time at which the guardrail was updated.
      • hasStatusReasons

        public final boolean hasStatusReasons()
        For responses, this returns true if the service returned a value for the StatusReasons property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
      • statusReasons

        public final List<String> statusReasons()

        Appears if the status is FAILED. A list of reasons for why the guardrail failed to be created, updated, versioned, or deleted.

        Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

        This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasStatusReasons() method.

        Returns:
        Appears if the status is FAILED. A list of reasons for why the guardrail failed to be created, updated, versioned, or deleted.
      • hasFailureRecommendations

        public final boolean hasFailureRecommendations()
        For responses, this returns true if the service returned a value for the FailureRecommendations property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
      • failureRecommendations

        public final List<String> failureRecommendations()

        Appears if the status of the guardrail is FAILED. A list of recommendations to carry out before retrying the request.

        Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

        This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasFailureRecommendations() method.

        Returns:
        Appears if the status of the guardrail is FAILED. A list of recommendations to carry out before retrying the request.
      • blockedInputMessaging

        public final String blockedInputMessaging()

        The message that the guardrail returns when it blocks a prompt.

        Returns:
        The message that the guardrail returns when it blocks a prompt.
      • blockedOutputsMessaging

        public final String blockedOutputsMessaging()

        The message that the guardrail returns when it blocks a model response.

        Returns:
        The message that the guardrail returns when it blocks a model response.
      • kmsKeyArn

        public final String kmsKeyArn()

        The ARN of the KMS key that encrypts the guardrail.

        Returns:
        The ARN of the KMS key that encrypts the guardrail.
      • 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