Amazon EC2 Image Builder · JSON Structure

Ec2 Image Builder Instance Metadata Options Structure

The instance metadata options that apply to the HTTP requests that pipeline builds use to launch EC2 build and test instances. For more information about instance metadata options, see Configure the instance metadata options in the Amazon EC2 User Guide for Linux instances, or Configure the instance metadata options in the Amazon EC2 Windows Guide for Windows instances.

Type: object Properties: 2
Amazon Web ServicesAutomationContainer ImagesEC2Image BuildingVirtual Machine Images

InstanceMetadataOptions is a JSON Structure definition published by Amazon EC2 Image Builder, describing 2 properties. It conforms to the https://json-structure.org/meta/core/v0/# meta-schema.

Properties

httpTokens httpPutResponseHopLimit

Meta-schema: https://json-structure.org/meta/core/v0/#

JSON Structure

Raw ↑
{
  "$schema": "https://json-structure.org/meta/core/v0/#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/amazon-ec2-image-builder/refs/heads/main/json-structure/ec2-image-builder-instance-metadata-options-structure.json",
  "name": "InstanceMetadataOptions",
  "description": "The instance metadata options that apply to the HTTP requests that pipeline builds use to launch EC2 build and test instances. For more information about instance metadata options, see <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-options.html\">Configure the instance metadata options</a> in the <i> <i>Amazon EC2 User Guide</i> </i> for Linux instances, or <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/configuring-instance-metadata-options.html\">Configure the instance metadata options</a> in the <i> <i>Amazon EC2 Windows Guide</i> </i> for Windows instances.",
  "type": "object",
  "properties": {
    "httpTokens": {
      "allOf": [
        {
          "$ref": "#/components/schemas/HttpTokens"
        },
        {
          "description": "<p>Indicates whether a signed token header is required for instance metadata retrieval requests. The values affect the response as follows:</p> <ul> <li> <p> <b>required</b> \u2013 When you retrieve the IAM role credentials, version 2.0 credentials are returned in all cases.</p> </li> <li> <p> <b>optional</b> \u2013 You can include a signed token header in your request to retrieve instance metadata, or you can leave it out. If you include it, version 2.0 credentials are returned for the IAM role. Otherwise, version 1.0 credentials are returned.</p> </li> </ul> <p>The default setting is <b>optional</b>.</p>"
        }
      ]
    },
    "httpPutResponseHopLimit": {
      "allOf": [
        {
          "$ref": "#/components/schemas/HttpPutResponseHopLimit"
        },
        {
          "description": "Limit the number of hops that an instance metadata request can traverse to reach its destination. The default is one hop. However, if HTTP tokens are required, container image builds need a minimum of two hops."
        }
      ]
    }
  }
}