Skip to content

Commit e9aa7ce

Browse files
author
AWS
committed
Amazon Elastic Compute Cloud Update: Added support for ModifyInstanceMetadataDefaults and GetInstanceMetadataDefaults to set Instance Metadata Service account defaults
1 parent 64ec0f0 commit e9aa7ce

File tree

2 files changed

+138
-7
lines changed

2 files changed

+138
-7
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"type": "feature",
3+
"category": "Amazon Elastic Compute Cloud",
4+
"contributor": "",
5+
"description": "Added support for ModifyInstanceMetadataDefaults and GetInstanceMetadataDefaults to set Instance Metadata Service account defaults"
6+
}

services/ec2/src/main/resources/codegen-resources/service-2.json

Lines changed: 132 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4377,6 +4377,16 @@
43774377
"output":{"shape":"GetImageBlockPublicAccessStateResult"},
43784378
"documentation":"<p>Gets the current state of <i>block public access for AMIs</i> at the account level in the specified Amazon Web Services Region.</p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/sharingamis-intro.html#block-public-access-to-amis\">Block public access to your AMIs</a> in the <i>Amazon EC2 User Guide</i>.</p>"
43794379
},
4380+
"GetInstanceMetadataDefaults":{
4381+
"name":"GetInstanceMetadataDefaults",
4382+
"http":{
4383+
"method":"POST",
4384+
"requestUri":"/"
4385+
},
4386+
"input":{"shape":"GetInstanceMetadataDefaultsRequest"},
4387+
"output":{"shape":"GetInstanceMetadataDefaultsResult"},
4388+
"documentation":"<p>Gets the default instance metadata service (IMDS) settings that are set at the account level in the specified Amazon Web Services&#x2028; Region.</p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-options.html#instance-metadata-options-order-of-precedence\">Order of precedence for instance metadata options</a> in the <i>Amazon EC2 User Guide</i>.</p>"
4389+
},
43804390
"GetInstanceTypesFromInstanceRequirements":{
43814391
"name":"GetInstanceTypesFromInstanceRequirements",
43824392
"http":{
@@ -4983,6 +4993,16 @@
49834993
"output":{"shape":"ModifyInstanceMaintenanceOptionsResult"},
49844994
"documentation":"<p>Modifies the recovery behavior of your instance to disable simplified automatic recovery or set the recovery behavior to default. The default configuration will not enable simplified automatic recovery for an unsupported instance type. For more information, see <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-recover.html#instance-configuration-recovery\">Simplified automatic recovery</a>.</p>"
49854995
},
4996+
"ModifyInstanceMetadataDefaults":{
4997+
"name":"ModifyInstanceMetadataDefaults",
4998+
"http":{
4999+
"method":"POST",
5000+
"requestUri":"/"
5001+
},
5002+
"input":{"shape":"ModifyInstanceMetadataDefaultsRequest"},
5003+
"output":{"shape":"ModifyInstanceMetadataDefaultsResult"},
5004+
"documentation":"<p>Modifies the default instance metadata service (IMDS) settings at the account level in the specified Amazon Web Services&#x2028; Region.</p> <note> <p>To remove a parameter's account-level default setting, specify <code>no-preference</code>. At instance launch, the value will come from the AMI, or from the launch parameter if specified. For more information, see <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-options.html#instance-metadata-options-order-of-precedence\">Order of precedence for instance metadata options</a> in the <i>Amazon EC2 User Guide</i>.</p> </note>"
5005+
},
49865006
"ModifyInstanceMetadataOptions":{
49875007
"name":"ModifyInstanceMetadataOptions",
49885008
"http":{
@@ -9432,6 +9452,7 @@
94329452
]
94339453
},
94349454
"BoxedDouble":{"type":"double"},
9455+
"BoxedInteger":{"type":"integer"},
94359456
"BundleId":{"type":"string"},
94369457
"BundleIdStringList":{
94379458
"type":"list",
@@ -16502,6 +16523,22 @@
1650216523
"locationName":"item"
1650316524
}
1650416525
},
16526+
"DefaultInstanceMetadataEndpointState":{
16527+
"type":"string",
16528+
"enum":[
16529+
"disabled",
16530+
"enabled",
16531+
"no-preference"
16532+
]
16533+
},
16534+
"DefaultInstanceMetadataTagsState":{
16535+
"type":"string",
16536+
"enum":[
16537+
"disabled",
16538+
"enabled",
16539+
"no-preference"
16540+
]
16541+
},
1650516542
"DefaultNetworkCardIndex":{"type":"integer"},
1650616543
"DefaultRouteTableAssociationValue":{
1650716544
"type":"string",
@@ -30705,6 +30742,25 @@
3070530742
}
3070630743
}
3070730744
},
30745+
"GetInstanceMetadataDefaultsRequest":{
30746+
"type":"structure",
30747+
"members":{
30748+
"DryRun":{
30749+
"shape":"Boolean",
30750+
"documentation":"<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"
30751+
}
30752+
}
30753+
},
30754+
"GetInstanceMetadataDefaultsResult":{
30755+
"type":"structure",
30756+
"members":{
30757+
"AccountLevel":{
30758+
"shape":"InstanceMetadataDefaultsResponse",
30759+
"documentation":"<p>The account-level default IMDS settings.</p>",
30760+
"locationName":"accountLevel"
30761+
}
30762+
}
30763+
},
3070830764
"GetInstanceTypesFromInstanceRequirementsRequest":{
3070930765
"type":"structure",
3071030766
"required":[
@@ -32916,7 +32972,7 @@
3291632972
},
3291732973
"ImageOwnerAlias":{
3291832974
"shape":"String",
32919-
"documentation":"<p>The Amazon Web Services account alias (for example, <code>amazon</code>, <code>self</code>) or the Amazon Web Services account ID of the AMI owner.</p>",
32975+
"documentation":"<p>The owner alias (<code>amazon</code> | <code>aws-marketplace</code>).</p>",
3292032976
"locationName":"imageOwnerAlias"
3292132977
},
3292232978
"Name":{
@@ -35055,6 +35111,32 @@
3505535111
"targeted"
3505635112
]
3505735113
},
35114+
"InstanceMetadataDefaultsResponse":{
35115+
"type":"structure",
35116+
"members":{
35117+
"HttpTokens":{
35118+
"shape":"HttpTokensState",
35119+
"documentation":"<p>Indicates whether IMDSv2 is required.</p> <ul> <li> <p> <code>optional</code> – IMDSv2 is optional, which means that you can use either IMDSv2 or IMDSv1.</p> </li> <li> <p> <code>required</code> – IMDSv2 is required, which means that IMDSv1 is disabled, and you must use IMDSv2.</p> </li> </ul>",
35120+
"locationName":"httpTokens"
35121+
},
35122+
"HttpPutResponseHopLimit":{
35123+
"shape":"BoxedInteger",
35124+
"documentation":"<p>The maximum number of hops that the metadata token can travel.</p>",
35125+
"locationName":"httpPutResponseHopLimit"
35126+
},
35127+
"HttpEndpoint":{
35128+
"shape":"InstanceMetadataEndpointState",
35129+
"documentation":"<p>Indicates whether the IMDS endpoint for an instance is enabled or disabled. When disabled, the instance metadata can't be accessed.</p>",
35130+
"locationName":"httpEndpoint"
35131+
},
35132+
"InstanceMetadataTags":{
35133+
"shape":"InstanceMetadataTagsState",
35134+
"documentation":"<p>Indicates whether access to instance tags from the instance metadata is enabled or disabled. For more information, see <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#work-with-tags-in-IMDS\">Work with instance tags using the instance metadata</a> in the <i>Amazon EC2 User Guide</i>.</p>",
35135+
"locationName":"instanceMetadataTags"
35136+
}
35137+
},
35138+
"documentation":"<p>The default instance metadata service (IMDS) settings that were set at the account level in the specified Amazon Web Services&#x2028; Region.</p>"
35139+
},
3505835140
"InstanceMetadataEndpointState":{
3505935141
"type":"string",
3506035142
"enum":[
@@ -35067,11 +35149,11 @@
3506735149
"members":{
3506835150
"HttpTokens":{
3506935151
"shape":"HttpTokensState",
35070-
"documentation":"<p>Indicates whether IMDSv2 is required.</p> <ul> <li> <p> <code>optional</code> - IMDSv2 is optional. You can choose whether to send a session token in your instance metadata retrieval requests. If you retrieve IAM role credentials without a session token, you receive the IMDSv1 role credentials. If you retrieve IAM role credentials using a valid session token, you receive the IMDSv2 role credentials.</p> </li> <li> <p> <code>required</code> - IMDSv2 is required. You must send a session token in your instance metadata retrieval requests. With this option, retrieving the IAM role credentials always returns IMDSv2 credentials; IMDSv1 credentials are not available.</p> </li> </ul> <p>Default: If the value of <code>ImdsSupport</code> for the Amazon Machine Image (AMI) for your instance is <code>v2.0</code>, the default is <code>required</code>.</p>"
35152+
"documentation":"<p>Indicates whether IMDSv2 is required.</p> <ul> <li> <p> <code>optional</code> - IMDSv2 is optional, which means that you can use either IMDSv2 or IMDSv1.</p> </li> <li> <p> <code>required</code> - IMDSv2 is required, which means that IMDSv1 is disabled, and you must use IMDSv2.</p> </li> </ul> <p>Default:</p> <ul> <li> <p>If the value of <code>ImdsSupport</code> for the Amazon Machine Image (AMI) for your instance is <code>v2.0</code> and the account level default is set to <code>no-preference</code>, the default is <code>required</code>.</p> </li> <li> <p>If the value of <code>ImdsSupport</code> for the Amazon Machine Image (AMI) for your instance is <code>v2.0</code>, but the account level default is set to <code>V1 or V2</code>, the default is <code>optional</code>.</p> </li> </ul> <p>The default value can also be affected by other combinations of parameters. For more information, see <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-options.html#instance-metadata-options-order-of-precedence\">Order of precedence for instance metadata options</a> in the <i>Amazon EC2 User Guide</i>.</p>"
3507135153
},
3507235154
"HttpPutResponseHopLimit":{
3507335155
"shape":"Integer",
35074-
"documentation":"<p>The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.</p> <p>Default: 1</p> <p>Possible values: Integers from 1 to 64</p>"
35156+
"documentation":"<p>The maximum number of hops that the metadata token can travel.</p> <p>Possible values: Integers from 1 to 64</p>"
3507535157
},
3507635158
"HttpEndpoint":{
3507735159
"shape":"InstanceMetadataEndpointState",
@@ -35098,12 +35180,12 @@
3509835180
},
3509935181
"HttpTokens":{
3510035182
"shape":"HttpTokensState",
35101-
"documentation":"<p>Indicates whether IMDSv2 is required.</p> <ul> <li> <p> <code>optional</code> - IMDSv2 is optional. You can choose whether to send a session token in your instance metadata retrieval requests. If you retrieve IAM role credentials without a session token, you receive the IMDSv1 role credentials. If you retrieve IAM role credentials using a valid session token, you receive the IMDSv2 role credentials.</p> </li> <li> <p> <code>required</code> - IMDSv2 is required. You must send a session token in your instance metadata retrieval requests. With this option, retrieving the IAM role credentials always returns IMDSv2 credentials; IMDSv1 credentials are not available.</p> </li> </ul>",
35183+
"documentation":"<p>Indicates whether IMDSv2 is required.</p> <ul> <li> <p> <code>optional</code> - IMDSv2 is optional, which means that you can use either IMDSv2 or IMDSv1.</p> </li> <li> <p> <code>required</code> - IMDSv2 is required, which means that IMDSv1 is disabled, and you must use IMDSv2.</p> </li> </ul>",
3510235184
"locationName":"httpTokens"
3510335185
},
3510435186
"HttpPutResponseHopLimit":{
3510535187
"shape":"Integer",
35106-
"documentation":"<p>The desired HTTP PUT response hop limit for instance metadata requests. The larger the number, the further instance metadata requests can travel.</p> <p>Default: <code>1</code> </p> <p>Possible values: Integers from <code>1</code> to <code>64</code> </p>",
35188+
"documentation":"<p>The maximum number of hops that the metadata token can travel.</p> <p>Possible values: Integers from <code>1</code> to <code>64</code> </p>",
3510735189
"locationName":"httpPutResponseHopLimit"
3510835190
},
3510935191
"HttpEndpoint":{
@@ -41542,6 +41624,14 @@
4154241624
"documentation":"<p>The minimum and maximum amount of memory, in MiB.</p>"
4154341625
},
4154441626
"MemorySize":{"type":"long"},
41627+
"MetadataDefaultHttpTokensState":{
41628+
"type":"string",
41629+
"enum":[
41630+
"optional",
41631+
"required",
41632+
"no-preference"
41633+
]
41634+
},
4154541635
"MetricPoint":{
4154641636
"type":"structure",
4154741637
"members":{
@@ -42367,6 +42457,41 @@
4236742457
}
4236842458
}
4236942459
},
42460+
"ModifyInstanceMetadataDefaultsRequest":{
42461+
"type":"structure",
42462+
"members":{
42463+
"HttpTokens":{
42464+
"shape":"MetadataDefaultHttpTokensState",
42465+
"documentation":"<p>Indicates whether IMDSv2 is required.</p> <ul> <li> <p> <code>optional</code> – IMDSv2 is optional, which means that you can use either IMDSv2 or IMDSv1.</p> </li> <li> <p> <code>required</code> – IMDSv2 is required, which means that IMDSv1 is disabled, and you must use IMDSv2.</p> </li> </ul>"
42466+
},
42467+
"HttpPutResponseHopLimit":{
42468+
"shape":"BoxedInteger",
42469+
"documentation":"<p>The maximum number of hops that the metadata token can travel.</p> <p>Minimum: <code>1</code> </p> <p>Maximum: <code>64</code> </p>"
42470+
},
42471+
"HttpEndpoint":{
42472+
"shape":"DefaultInstanceMetadataEndpointState",
42473+
"documentation":"<p>Enables or disables the IMDS endpoint on an instance. When disabled, the instance metadata can't be accessed.</p>"
42474+
},
42475+
"InstanceMetadataTags":{
42476+
"shape":"DefaultInstanceMetadataTagsState",
42477+
"documentation":"<p>Enables or disables access to an instance's tags from the instance metadata. For more information, see <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#work-with-tags-in-IMDS\">Work with instance tags using the instance metadata</a> in the <i>Amazon EC2 User Guide</i>.</p>"
42478+
},
42479+
"DryRun":{
42480+
"shape":"Boolean",
42481+
"documentation":"<p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>"
42482+
}
42483+
}
42484+
},
42485+
"ModifyInstanceMetadataDefaultsResult":{
42486+
"type":"structure",
42487+
"members":{
42488+
"Return":{
42489+
"shape":"Boolean",
42490+
"documentation":"<p>If the request succeeds, the response returns <code>true</code>. If the request fails, no response is returned, and instead an error message is returned.</p>",
42491+
"locationName":"return"
42492+
}
42493+
}
42494+
},
4237042495
"ModifyInstanceMetadataOptionsRequest":{
4237142496
"type":"structure",
4237242497
"required":["InstanceId"],
@@ -42377,7 +42502,7 @@
4237742502
},
4237842503
"HttpTokens":{
4237942504
"shape":"HttpTokensState",
42380-
"documentation":"<p>Indicates whether IMDSv2 is required.</p> <ul> <li> <p> <code>optional</code> - IMDSv2 is optional. You can choose whether to send a session token in your instance metadata retrieval requests. If you retrieve IAM role credentials without a session token, you receive the IMDSv1 role credentials. If you retrieve IAM role credentials using a valid session token, you receive the IMDSv2 role credentials.</p> </li> <li> <p> <code>required</code> - IMDSv2 is required. You must send a session token in your instance metadata retrieval requests. With this option, retrieving the IAM role credentials always returns IMDSv2 credentials; IMDSv1 credentials are not available.</p> </li> </ul> <p>Default: If the value of <code>ImdsSupport</code> for the Amazon Machine Image (AMI) for your instance is <code>v2.0</code>, the default is <code>required</code>.</p>"
42505+
"documentation":"<p>Indicates whether IMDSv2 is required.</p> <ul> <li> <p> <code>optional</code> - IMDSv2 is optional. You can choose whether to send a session token in your instance metadata retrieval requests. If you retrieve IAM role credentials without a session token, you receive the IMDSv1 role credentials. If you retrieve IAM role credentials using a valid session token, you receive the IMDSv2 role credentials.</p> </li> <li> <p> <code>required</code> - IMDSv2 is required. You must send a session token in your instance metadata retrieval requests. With this option, retrieving the IAM role credentials always returns IMDSv2 credentials; IMDSv1 credentials are not available.</p> </li> </ul> <p>Default:</p> <ul> <li> <p>If the value of <code>ImdsSupport</code> for the Amazon Machine Image (AMI) for your instance is <code>v2.0</code> and the account level default is set to <code>no-preference</code>, the default is <code>required</code>.</p> </li> <li> <p>If the value of <code>ImdsSupport</code> for the Amazon Machine Image (AMI) for your instance is <code>v2.0</code>, but the account level default is set to <code>V1 or V2</code>, the default is <code>optional</code>.</p> </li> </ul> <p>The default value can also be affected by other combinations of parameters. For more information, see <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-options.html#instance-metadata-options-order-of-precedence\">Order of precedence for instance metadata options</a> in the <i>Amazon EC2 User Guide</i>.</p>"
4238142506
},
4238242507
"HttpPutResponseHopLimit":{
4238342508
"shape":"Integer",
@@ -52356,7 +52481,7 @@
5235652481
},
5235752482
"MaxResults":{
5235852483
"shape":"TransitGatewayMaxResults",
52359-
"documentation":"<p>The maximum number of routes to return.</p>"
52484+
"documentation":"<p>The maximum number of routes to return. If a value is not provided, the default is 1000.</p>"
5236052485
},
5236152486
"DryRun":{
5236252487
"shape":"Boolean",

0 commit comments

Comments
 (0)