Class InstanceMetadataOptions


  • public final class InstanceMetadataOptions
    extends java.lang.Object
    • Method Detail

      • httpEndpoint

        public java.util.Optional<java.lang.String> httpEndpoint()
        Returns:
        Whether the metadata service is available. Valid values include `enabled` or `disabled`. Defaults to `enabled`.
      • httpProtocolIpv6

        public java.util.Optional<java.lang.String> httpProtocolIpv6()
        Returns:
        Whether the IPv6 endpoint for the instance metadata service is enabled. Defaults to `disabled`.
      • httpPutResponseHopLimit

        public java.util.Optional<java.lang.Integer> httpPutResponseHopLimit()
        Returns:
        Desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel. Valid values are integer from `1` to `64`. Defaults to `1`.
      • httpTokens

        public java.util.Optional<java.lang.String> httpTokens()
        Returns:
        Whether or not the metadata service requires session tokens, also referred to as _Instance Metadata Service Version 2 (IMDSv2)_. Valid values include `optional` or `required`.
      • instanceMetadataTags

        public java.util.Optional<java.lang.String> instanceMetadataTags()
        Returns:
        Enables or disables access to instance tags from the instance metadata service. Valid values include `enabled` or `disabled`. Defaults to `disabled`. For more information, see the documentation on the [Instance Metadata Service](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html).