@aws-sdk/client-ec2 3.540.0 → 3.541.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/README.md +16 -0
  2. package/dist-cjs/index.js +182 -15
  3. package/dist-es/EC2.js +4 -0
  4. package/dist-es/commands/GetInstanceMetadataDefaultsCommand.js +24 -0
  5. package/dist-es/commands/ModifyInstanceMetadataDefaultsCommand.js +24 -0
  6. package/dist-es/commands/index.js +2 -0
  7. package/dist-es/models/models_5.js +0 -11
  8. package/dist-es/models/models_6.js +26 -0
  9. package/dist-es/protocols/Aws_ec2.js +109 -3
  10. package/dist-types/EC2.d.ts +16 -0
  11. package/dist-types/EC2Client.d.ts +4 -2
  12. package/dist-types/commands/GetInstanceMetadataDefaultsCommand.d.ts +68 -0
  13. package/dist-types/commands/ModifyInstanceMetadataDefaultsCommand.d.ts +71 -0
  14. package/dist-types/commands/PurchaseHostReservationCommand.d.ts +2 -1
  15. package/dist-types/commands/PurchaseReservedInstancesOfferingCommand.d.ts +1 -1
  16. package/dist-types/commands/PurchaseScheduledInstancesCommand.d.ts +1 -1
  17. package/dist-types/commands/RebootInstancesCommand.d.ts +1 -1
  18. package/dist-types/commands/index.d.ts +2 -0
  19. package/dist-types/models/models_3.d.ts +1 -2
  20. package/dist-types/models/models_4.d.ts +5 -13
  21. package/dist-types/models/models_5.d.ts +67 -52
  22. package/dist-types/models/models_6.d.ts +171 -167
  23. package/dist-types/models/models_7.d.ts +189 -17
  24. package/dist-types/protocols/Aws_ec2.d.ts +18 -0
  25. package/dist-types/ts3.4/EC2.d.ts +36 -0
  26. package/dist-types/ts3.4/EC2Client.d.ts +12 -0
  27. package/dist-types/ts3.4/commands/GetInstanceMetadataDefaultsCommand.d.ts +39 -0
  28. package/dist-types/ts3.4/commands/ModifyInstanceMetadataDefaultsCommand.d.ts +39 -0
  29. package/dist-types/ts3.4/commands/PurchaseHostReservationCommand.d.ts +2 -4
  30. package/dist-types/ts3.4/commands/PurchaseReservedInstancesOfferingCommand.d.ts +1 -1
  31. package/dist-types/ts3.4/commands/PurchaseScheduledInstancesCommand.d.ts +1 -1
  32. package/dist-types/ts3.4/commands/RebootInstancesCommand.d.ts +1 -1
  33. package/dist-types/ts3.4/commands/index.d.ts +2 -0
  34. package/dist-types/ts3.4/models/models_5.d.ts +15 -21
  35. package/dist-types/ts3.4/models/models_6.d.ts +52 -42
  36. package/dist-types/ts3.4/models/models_7.d.ts +40 -0
  37. package/dist-types/ts3.4/protocols/Aws_ec2.d.ts +24 -0
  38. package/package.json +1 -1
@@ -0,0 +1,71 @@
1
+ import { Command as $Command } from "@smithy/smithy-client";
2
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
+ import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
4
+ import { ModifyInstanceMetadataDefaultsRequest, ModifyInstanceMetadataDefaultsResult } from "../models/models_6";
5
+ /**
6
+ * @public
7
+ */
8
+ export { __MetadataBearer, $Command };
9
+ /**
10
+ * @public
11
+ *
12
+ * The input for {@link ModifyInstanceMetadataDefaultsCommand}.
13
+ */
14
+ export interface ModifyInstanceMetadataDefaultsCommandInput extends ModifyInstanceMetadataDefaultsRequest {
15
+ }
16
+ /**
17
+ * @public
18
+ *
19
+ * The output of {@link ModifyInstanceMetadataDefaultsCommand}.
20
+ */
21
+ export interface ModifyInstanceMetadataDefaultsCommandOutput extends ModifyInstanceMetadataDefaultsResult, __MetadataBearer {
22
+ }
23
+ declare const ModifyInstanceMetadataDefaultsCommand_base: {
24
+ new (input: ModifyInstanceMetadataDefaultsCommandInput): import("@smithy/smithy-client").CommandImpl<ModifyInstanceMetadataDefaultsCommandInput, ModifyInstanceMetadataDefaultsCommandOutput, EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
25
+ new (...[input]: [] | [ModifyInstanceMetadataDefaultsCommandInput]): import("@smithy/smithy-client").CommandImpl<ModifyInstanceMetadataDefaultsCommandInput, ModifyInstanceMetadataDefaultsCommandOutput, EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
27
+ };
28
+ /**
29
+ * <p>Modifies the default instance metadata service (IMDS) settings at the account level in
30
+ * the specified Amazon Web Services
31
+ Region.</p>
32
+ * <note>
33
+ * <p>To remove a parameter's account-level default setting, specify
34
+ * <code>no-preference</code>. At instance launch, the value will come from the
35
+ * 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
36
+ * <i>Amazon EC2 User Guide</i>.</p>
37
+ * </note>
38
+ * @example
39
+ * Use a bare-bones client and the command you need to make an API call.
40
+ * ```javascript
41
+ * import { EC2Client, ModifyInstanceMetadataDefaultsCommand } from "@aws-sdk/client-ec2"; // ES Modules import
42
+ * // const { EC2Client, ModifyInstanceMetadataDefaultsCommand } = require("@aws-sdk/client-ec2"); // CommonJS import
43
+ * const client = new EC2Client(config);
44
+ * const input = { // ModifyInstanceMetadataDefaultsRequest
45
+ * HttpTokens: "optional" || "required" || "no-preference",
46
+ * HttpPutResponseHopLimit: Number("int"),
47
+ * HttpEndpoint: "disabled" || "enabled" || "no-preference",
48
+ * InstanceMetadataTags: "disabled" || "enabled" || "no-preference",
49
+ * DryRun: true || false,
50
+ * };
51
+ * const command = new ModifyInstanceMetadataDefaultsCommand(input);
52
+ * const response = await client.send(command);
53
+ * // { // ModifyInstanceMetadataDefaultsResult
54
+ * // Return: true || false,
55
+ * // };
56
+ *
57
+ * ```
58
+ *
59
+ * @param ModifyInstanceMetadataDefaultsCommandInput - {@link ModifyInstanceMetadataDefaultsCommandInput}
60
+ * @returns {@link ModifyInstanceMetadataDefaultsCommandOutput}
61
+ * @see {@link ModifyInstanceMetadataDefaultsCommandInput} for command's `input` shape.
62
+ * @see {@link ModifyInstanceMetadataDefaultsCommandOutput} for command's `response` shape.
63
+ * @see {@link EC2ClientResolvedConfig | config} for EC2Client's `config` shape.
64
+ *
65
+ * @throws {@link EC2ServiceException}
66
+ * <p>Base exception class for all service exceptions from EC2 service.</p>
67
+ *
68
+ * @public
69
+ */
70
+ export declare class ModifyInstanceMetadataDefaultsCommand extends ModifyInstanceMetadataDefaultsCommand_base {
71
+ }
@@ -1,7 +1,8 @@
1
1
  import { Command as $Command } from "@smithy/smithy-client";
2
2
  import { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
3
  import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
4
- import { PurchaseHostReservationRequest, PurchaseHostReservationResult } from "../models/models_6";
4
+ import { PurchaseHostReservationRequest } from "../models/models_6";
5
+ import { PurchaseHostReservationResult } from "../models/models_7";
5
6
  /**
6
7
  * @public
7
8
  */
@@ -1,7 +1,7 @@
1
1
  import { Command as $Command } from "@smithy/smithy-client";
2
2
  import { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
3
  import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
4
- import { PurchaseReservedInstancesOfferingRequest, PurchaseReservedInstancesOfferingResult } from "../models/models_6";
4
+ import { PurchaseReservedInstancesOfferingRequest, PurchaseReservedInstancesOfferingResult } from "../models/models_7";
5
5
  /**
6
6
  * @public
7
7
  */
@@ -1,7 +1,7 @@
1
1
  import { Command as $Command } from "@smithy/smithy-client";
2
2
  import { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
3
  import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
4
- import { PurchaseScheduledInstancesRequest, PurchaseScheduledInstancesResult } from "../models/models_6";
4
+ import { PurchaseScheduledInstancesRequest, PurchaseScheduledInstancesResult } from "../models/models_7";
5
5
  /**
6
6
  * @public
7
7
  */
@@ -1,7 +1,7 @@
1
1
  import { Command as $Command } from "@smithy/smithy-client";
2
2
  import { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
3
  import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
4
- import { RebootInstancesRequest } from "../models/models_6";
4
+ import { RebootInstancesRequest } from "../models/models_7";
5
5
  /**
6
6
  * @public
7
7
  */
@@ -438,6 +438,7 @@ export * from "./GetFlowLogsIntegrationTemplateCommand";
438
438
  export * from "./GetGroupsForCapacityReservationCommand";
439
439
  export * from "./GetHostReservationPurchasePreviewCommand";
440
440
  export * from "./GetImageBlockPublicAccessStateCommand";
441
+ export * from "./GetInstanceMetadataDefaultsCommand";
441
442
  export * from "./GetInstanceTypesFromInstanceRequirementsCommand";
442
443
  export * from "./GetInstanceUefiDataCommand";
443
444
  export * from "./GetIpamAddressHistoryCommand";
@@ -499,6 +500,7 @@ export * from "./ModifyInstanceCreditSpecificationCommand";
499
500
  export * from "./ModifyInstanceEventStartTimeCommand";
500
501
  export * from "./ModifyInstanceEventWindowCommand";
501
502
  export * from "./ModifyInstanceMaintenanceOptionsCommand";
503
+ export * from "./ModifyInstanceMetadataDefaultsCommand";
502
504
  export * from "./ModifyInstanceMetadataOptionsCommand";
503
505
  export * from "./ModifyInstancePlacementCommand";
504
506
  export * from "./ModifyIpamCommand";
@@ -7950,8 +7950,7 @@ export interface Image {
7950
7950
  */
7951
7951
  Hypervisor?: HypervisorType;
7952
7952
  /**
7953
- * <p>The Amazon Web Services account alias (for example, <code>amazon</code>, <code>self</code>) or
7954
- * the Amazon Web Services account ID of the AMI owner.</p>
7953
+ * <p>The owner alias (<code>amazon</code> | <code>aws-marketplace</code>).</p>
7955
7954
  * @public
7956
7955
  */
7957
7956
  ImageOwnerAlias?: string;
@@ -1656,28 +1656,20 @@ export interface InstanceMetadataOptionsResponse {
1656
1656
  * <ul>
1657
1657
  * <li>
1658
1658
  * <p>
1659
- * <code>optional</code> - IMDSv2 is optional. You can choose whether to send a
1660
- * session token in your instance metadata retrieval requests. If you retrieve
1661
- * IAM role credentials without a session token, you receive the IMDSv1 role
1662
- * credentials. If you retrieve IAM role credentials using a valid session token,
1663
- * you receive the IMDSv2 role credentials.</p>
1659
+ * <code>optional</code> - IMDSv2 is optional, which means that you can use
1660
+ * either IMDSv2 or IMDSv1.</p>
1664
1661
  * </li>
1665
1662
  * <li>
1666
1663
  * <p>
1667
- * <code>required</code> - IMDSv2 is required. You must send a session token
1668
- * in your instance metadata retrieval requests. With this option, retrieving the
1669
- * IAM role credentials always returns IMDSv2 credentials; IMDSv1 credentials are
1670
- * not available.</p>
1664
+ * <code>required</code> - IMDSv2 is required, which means that IMDSv1 is
1665
+ * disabled, and you must use IMDSv2.</p>
1671
1666
  * </li>
1672
1667
  * </ul>
1673
1668
  * @public
1674
1669
  */
1675
1670
  HttpTokens?: HttpTokensState;
1676
1671
  /**
1677
- * <p>The desired HTTP PUT response hop limit for instance metadata requests. The larger the
1678
- * number, the further instance metadata requests can travel.</p>
1679
- * <p>Default: <code>1</code>
1680
- * </p>
1672
+ * <p>The maximum number of hops that the metadata token can travel.</p>
1681
1673
  * <p>Possible values: Integers from <code>1</code> to <code>64</code>
1682
1674
  * </p>
1683
1675
  * @public
@@ -2,7 +2,7 @@ import { _InstanceType, AddressTransfer, AllowedPrincipal, AsnAssociation, Assoc
2
2
  import { DiskImageFormat, InstanceRequirementsRequest, Subnet, VolumeType, Vpc } from "./models_1";
3
3
  import { ConnectionNotification, DnsEntry, DnsNameState, IpAddressType, PayerResponsibility, ServiceConfiguration, ServiceConnectivityType, ServiceTypeDetail, SSEType, State, TrafficMirrorFilter, TrafficMirrorSession, TrafficMirrorTarget, TransitGateway, TransitGatewayConnect, TransitGatewayConnectPeer, TransitGatewayMulticastDomain, TransitGatewayPolicyTable, TransitGatewayRouteTable, TransitGatewayRouteTableAnnouncement, VerifiedAccessEndpoint, VerifiedAccessGroup, Volume, VpcEndpoint, VpnConnection, VpnGateway } from "./models_2";
4
4
  import { ExportTaskS3Location, FastLaunchLaunchTemplateSpecificationResponse, FastLaunchResourceType, FastLaunchSnapshotConfigurationResponse, FastLaunchStateCode, FastSnapshotRestoreStateCode, Filter, MetricType, PaymentOption, PeriodType, ProductCode, StatisticType, VirtualizationType } from "./models_3";
5
- import { ArchitectureType, AttributeBooleanValue, RIProductDescription } from "./models_4";
5
+ import { ArchitectureType, AttributeBooleanValue, HttpTokensState, InstanceMetadataEndpointState, InstanceMetadataTagsState, RIProductDescription } from "./models_4";
6
6
  /**
7
7
  * <p>The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend
8
8
  * using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.</p>
@@ -7221,6 +7221,72 @@ export interface GetImageBlockPublicAccessStateResult {
7221
7221
  */
7222
7222
  ImageBlockPublicAccessState?: string;
7223
7223
  }
7224
+ /**
7225
+ * @public
7226
+ */
7227
+ export interface GetInstanceMetadataDefaultsRequest {
7228
+ /**
7229
+ * <p>Checks whether you have the required permissions for the action, without actually making the request,
7230
+ * and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>.
7231
+ * Otherwise, it is <code>UnauthorizedOperation</code>.</p>
7232
+ * @public
7233
+ */
7234
+ DryRun?: boolean;
7235
+ }
7236
+ /**
7237
+ * <p>The default instance metadata service (IMDS) settings that were set at the account
7238
+ * level in the specified Amazon Web Services
7239
+ Region.</p>
7240
+ * @public
7241
+ */
7242
+ export interface InstanceMetadataDefaultsResponse {
7243
+ /**
7244
+ * <p>Indicates whether IMDSv2 is required.</p>
7245
+ * <ul>
7246
+ * <li>
7247
+ * <p>
7248
+ * <code>optional</code> – IMDSv2 is optional, which means that you can
7249
+ * use either IMDSv2 or IMDSv1.</p>
7250
+ * </li>
7251
+ * <li>
7252
+ * <p>
7253
+ * <code>required</code> – IMDSv2 is required, which means that IMDSv1 is
7254
+ * disabled, and you must use IMDSv2.</p>
7255
+ * </li>
7256
+ * </ul>
7257
+ * @public
7258
+ */
7259
+ HttpTokens?: HttpTokensState;
7260
+ /**
7261
+ * <p>The maximum number of hops that the metadata token can travel.</p>
7262
+ * @public
7263
+ */
7264
+ HttpPutResponseHopLimit?: number;
7265
+ /**
7266
+ * <p>Indicates whether the IMDS endpoint for an instance is enabled or disabled. When disabled, the instance
7267
+ * metadata can't be accessed.</p>
7268
+ * @public
7269
+ */
7270
+ HttpEndpoint?: InstanceMetadataEndpointState;
7271
+ /**
7272
+ * <p>Indicates whether access to instance tags from the instance metadata is enabled or
7273
+ * 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
7274
+ * instance tags using the instance metadata</a> in the
7275
+ * <i>Amazon EC2 User Guide</i>.</p>
7276
+ * @public
7277
+ */
7278
+ InstanceMetadataTags?: InstanceMetadataTagsState;
7279
+ }
7280
+ /**
7281
+ * @public
7282
+ */
7283
+ export interface GetInstanceMetadataDefaultsResult {
7284
+ /**
7285
+ * <p>The account-level default IMDS settings.</p>
7286
+ * @public
7287
+ */
7288
+ AccountLevel?: InstanceMetadataDefaultsResponse;
7289
+ }
7224
7290
  /**
7225
7291
  * @public
7226
7292
  */
@@ -7688,57 +7754,6 @@ export declare const IpamPublicAddressAssociationStatus: {
7688
7754
  * @public
7689
7755
  */
7690
7756
  export type IpamPublicAddressAssociationStatus = (typeof IpamPublicAddressAssociationStatus)[keyof typeof IpamPublicAddressAssociationStatus];
7691
- /**
7692
- * <p>The security group that the resource with the public IP address is in.</p>
7693
- * @public
7694
- */
7695
- export interface IpamPublicAddressSecurityGroup {
7696
- /**
7697
- * <p>The security group's name.</p>
7698
- * @public
7699
- */
7700
- GroupName?: string;
7701
- /**
7702
- * <p>The security group's ID.</p>
7703
- * @public
7704
- */
7705
- GroupId?: string;
7706
- }
7707
- /**
7708
- * @public
7709
- * @enum
7710
- */
7711
- export declare const IpamPublicAddressAwsService: {
7712
- readonly AGA: "global-accelerator";
7713
- readonly DMS: "database-migration-service";
7714
- readonly EC2_LB: "load-balancer";
7715
- readonly ECS: "elastic-container-service";
7716
- readonly NAT_GATEWAY: "nat-gateway";
7717
- readonly OTHER: "other";
7718
- readonly RDS: "relational-database-service";
7719
- readonly REDSHIFT: "redshift";
7720
- readonly S2S_VPN: "site-to-site-vpn";
7721
- };
7722
- /**
7723
- * @public
7724
- */
7725
- export type IpamPublicAddressAwsService = (typeof IpamPublicAddressAwsService)[keyof typeof IpamPublicAddressAwsService];
7726
- /**
7727
- * <p>A tag for a public IP address discovered by IPAM.</p>
7728
- * @public
7729
- */
7730
- export interface IpamPublicAddressTag {
7731
- /**
7732
- * <p>The tag's key.</p>
7733
- * @public
7734
- */
7735
- Key?: string;
7736
- /**
7737
- * <p>The tag's value.</p>
7738
- * @public
7739
- */
7740
- Value?: string;
7741
- }
7742
7757
  /**
7743
7758
  * @internal
7744
7759
  */