Class InstanceMetadataDefaultsResponse

    • Method Detail

      • httpTokens

        public final HttpTokensState httpTokens()

        Indicates whether IMDSv2 is required.

        • optional – IMDSv2 is optional, which means that you can use either IMDSv2 or IMDSv1.

        • required – IMDSv2 is required, which means that IMDSv1 is disabled, and you must use IMDSv2.

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

        Returns:
        Indicates whether IMDSv2 is required.

        • optional – IMDSv2 is optional, which means that you can use either IMDSv2 or IMDSv1.

        • required – IMDSv2 is required, which means that IMDSv1 is disabled, and you must use IMDSv2.

        See Also:
        HttpTokensState
      • httpTokensAsString

        public final String httpTokensAsString()

        Indicates whether IMDSv2 is required.

        • optional – IMDSv2 is optional, which means that you can use either IMDSv2 or IMDSv1.

        • required – IMDSv2 is required, which means that IMDSv1 is disabled, and you must use IMDSv2.

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

        Returns:
        Indicates whether IMDSv2 is required.

        • optional – IMDSv2 is optional, which means that you can use either IMDSv2 or IMDSv1.

        • required – IMDSv2 is required, which means that IMDSv1 is disabled, and you must use IMDSv2.

        See Also:
        HttpTokensState
      • httpPutResponseHopLimit

        public final Integer httpPutResponseHopLimit()

        The maximum number of hops that the metadata token can travel.

        Returns:
        The maximum number of hops that the metadata token can travel.
      • httpEndpointAsString

        public final String httpEndpointAsString()

        Indicates whether the IMDS endpoint for an instance is enabled or disabled. When disabled, the instance metadata can't be accessed.

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

        Returns:
        Indicates whether the IMDS endpoint for an instance is enabled or disabled. When disabled, the instance metadata can't be accessed.
        See Also:
        InstanceMetadataEndpointState
      • managedBy

        public final ManagedBy managedBy()

        The entity that manages the IMDS default settings. Possible values include:

        • account - The IMDS default settings are managed by the account.

        • declarative-policy - The IMDS default settings are managed by a declarative policy and can't be modified by the account.

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

        Returns:
        The entity that manages the IMDS default settings. Possible values include:

        • account - The IMDS default settings are managed by the account.

        • declarative-policy - The IMDS default settings are managed by a declarative policy and can't be modified by the account.

        See Also:
        ManagedBy
      • managedByAsString

        public final String managedByAsString()

        The entity that manages the IMDS default settings. Possible values include:

        • account - The IMDS default settings are managed by the account.

        • declarative-policy - The IMDS default settings are managed by a declarative policy and can't be modified by the account.

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

        Returns:
        The entity that manages the IMDS default settings. Possible values include:

        • account - The IMDS default settings are managed by the account.

        • declarative-policy - The IMDS default settings are managed by a declarative policy and can't be modified by the account.

        See Also:
        ManagedBy
      • managedExceptionMessage

        public final String managedExceptionMessage()

        The customized exception message that is specified in the declarative policy.

        Returns:
        The customized exception message that is specified in the declarative policy.
      • 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)