Skip to content

Commit b9f691a

Browse files
author
awstools
committed
feat(client-ec2): Release of Dualstack and Ipv6-only EC2 Public DNS hostnames
1 parent ed51782 commit b9f691a

22 files changed

+793
-258
lines changed

clients/client-ec2/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4789,6 +4789,14 @@ ModifyPrivateDnsNameOptions
47894789

47904790
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/ec2/command/ModifyPrivateDnsNameOptionsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ec2/Interface/ModifyPrivateDnsNameOptionsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ec2/Interface/ModifyPrivateDnsNameOptionsCommandOutput/)
47914791

4792+
</details>
4793+
<details>
4794+
<summary>
4795+
ModifyPublicIpDnsNameOptions
4796+
</summary>
4797+
4798+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/ec2/command/ModifyPublicIpDnsNameOptionsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ec2/Interface/ModifyPublicIpDnsNameOptionsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-ec2/Interface/ModifyPublicIpDnsNameOptionsCommandOutput/)
4799+
47924800
</details>
47934801
<details>
47944802
<summary>

clients/client-ec2/src/EC2.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2799,6 +2799,11 @@ import {
27992799
ModifyPrivateDnsNameOptionsCommandInput,
28002800
ModifyPrivateDnsNameOptionsCommandOutput,
28012801
} from "./commands/ModifyPrivateDnsNameOptionsCommand";
2802+
import {
2803+
ModifyPublicIpDnsNameOptionsCommand,
2804+
ModifyPublicIpDnsNameOptionsCommandInput,
2805+
ModifyPublicIpDnsNameOptionsCommandOutput,
2806+
} from "./commands/ModifyPublicIpDnsNameOptionsCommand";
28022807
import {
28032808
ModifyReservedInstancesCommand,
28042809
ModifyReservedInstancesCommandInput,
@@ -3930,6 +3935,7 @@ const commands = {
39303935
ModifyManagedPrefixListCommand,
39313936
ModifyNetworkInterfaceAttributeCommand,
39323937
ModifyPrivateDnsNameOptionsCommand,
3938+
ModifyPublicIpDnsNameOptionsCommand,
39333939
ModifyReservedInstancesCommand,
39343940
ModifyRouteServerCommand,
39353941
ModifySecurityGroupRulesCommand,
@@ -13669,6 +13675,23 @@ export interface EC2 {
1366913675
cb: (err: any, data?: ModifyPrivateDnsNameOptionsCommandOutput) => void
1367013676
): void;
1367113677

13678+
/**
13679+
* @see {@link ModifyPublicIpDnsNameOptionsCommand}
13680+
*/
13681+
modifyPublicIpDnsNameOptions(
13682+
args: ModifyPublicIpDnsNameOptionsCommandInput,
13683+
options?: __HttpHandlerOptions
13684+
): Promise<ModifyPublicIpDnsNameOptionsCommandOutput>;
13685+
modifyPublicIpDnsNameOptions(
13686+
args: ModifyPublicIpDnsNameOptionsCommandInput,
13687+
cb: (err: any, data?: ModifyPublicIpDnsNameOptionsCommandOutput) => void
13688+
): void;
13689+
modifyPublicIpDnsNameOptions(
13690+
args: ModifyPublicIpDnsNameOptionsCommandInput,
13691+
options: __HttpHandlerOptions,
13692+
cb: (err: any, data?: ModifyPublicIpDnsNameOptionsCommandOutput) => void
13693+
): void;
13694+
1367213695
/**
1367313696
* @see {@link ModifyReservedInstancesCommand}
1367413697
*/

clients/client-ec2/src/EC2Client.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2021,6 +2021,10 @@ import {
20212021
ModifyPrivateDnsNameOptionsCommandInput,
20222022
ModifyPrivateDnsNameOptionsCommandOutput,
20232023
} from "./commands/ModifyPrivateDnsNameOptionsCommand";
2024+
import {
2025+
ModifyPublicIpDnsNameOptionsCommandInput,
2026+
ModifyPublicIpDnsNameOptionsCommandOutput,
2027+
} from "./commands/ModifyPublicIpDnsNameOptionsCommand";
20242028
import {
20252029
ModifyReservedInstancesCommandInput,
20262030
ModifyReservedInstancesCommandOutput,
@@ -2984,6 +2988,7 @@ export type ServiceInputTypes =
29842988
| ModifyManagedPrefixListCommandInput
29852989
| ModifyNetworkInterfaceAttributeCommandInput
29862990
| ModifyPrivateDnsNameOptionsCommandInput
2991+
| ModifyPublicIpDnsNameOptionsCommandInput
29872992
| ModifyReservedInstancesCommandInput
29882993
| ModifyRouteServerCommandInput
29892994
| ModifySecurityGroupRulesCommandInput
@@ -3673,6 +3678,7 @@ export type ServiceOutputTypes =
36733678
| ModifyManagedPrefixListCommandOutput
36743679
| ModifyNetworkInterfaceAttributeCommandOutput
36753680
| ModifyPrivateDnsNameOptionsCommandOutput
3681+
| ModifyPublicIpDnsNameOptionsCommandOutput
36763682
| ModifyReservedInstancesCommandOutput
36773683
| ModifyRouteServerCommandOutput
36783684
| ModifySecurityGroupRulesCommandOutput

clients/client-ec2/src/commands/CreateNetworkInterfaceCommand.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ export interface CreateNetworkInterfaceCommandOutput extends CreateNetworkInterf
143143
* // Ipv6Addresses: [ // NetworkInterfaceIpv6AddressesList
144144
* // { // NetworkInterfaceIpv6Address
145145
* // Ipv6Address: "STRING_VALUE",
146+
* // PublicIpv6DnsName: "STRING_VALUE",
146147
* // IsPrimaryIpv6: true || false,
147148
* // },
148149
* // ],
@@ -151,6 +152,13 @@ export interface CreateNetworkInterfaceCommandOutput extends CreateNetworkInterf
151152
* // OutpostArn: "STRING_VALUE",
152153
* // OwnerId: "STRING_VALUE",
153154
* // PrivateDnsName: "STRING_VALUE",
155+
* // PublicDnsName: "STRING_VALUE",
156+
* // PublicIpDnsNameOptions: { // PublicIpDnsNameOptions
157+
* // DnsHostnameType: "STRING_VALUE",
158+
* // PublicIpv4DnsName: "STRING_VALUE",
159+
* // PublicIpv6DnsName: "STRING_VALUE",
160+
* // PublicDualStackDnsName: "STRING_VALUE",
161+
* // },
154162
* // PrivateIpAddress: "STRING_VALUE",
155163
* // PrivateIpAddresses: [ // NetworkInterfacePrivateIpAddressList
156164
* // { // NetworkInterfacePrivateIpAddress

clients/client-ec2/src/commands/DescribeLaunchTemplatesCommand.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
66

77
import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
88
import { commonParams } from "../endpoint/EndpointParameters";
9-
import { DescribeLaunchTemplatesRequest, DescribeLaunchTemplatesResult } from "../models/models_4";
9+
import { DescribeLaunchTemplatesRequest } from "../models/models_4";
10+
import { DescribeLaunchTemplatesResult } from "../models/models_5";
1011
import { de_DescribeLaunchTemplatesCommand, se_DescribeLaunchTemplatesCommand } from "../protocols/Aws_ec2";
1112

1213
/**

clients/client-ec2/src/commands/DescribeNetworkInterfacesCommand.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ export interface DescribeNetworkInterfacesCommandOutput extends DescribeNetworkI
108108
* // Ipv6Addresses: [ // NetworkInterfaceIpv6AddressesList
109109
* // { // NetworkInterfaceIpv6Address
110110
* // Ipv6Address: "STRING_VALUE",
111+
* // PublicIpv6DnsName: "STRING_VALUE",
111112
* // IsPrimaryIpv6: true || false,
112113
* // },
113114
* // ],
@@ -116,6 +117,13 @@ export interface DescribeNetworkInterfacesCommandOutput extends DescribeNetworkI
116117
* // OutpostArn: "STRING_VALUE",
117118
* // OwnerId: "STRING_VALUE",
118119
* // PrivateDnsName: "STRING_VALUE",
120+
* // PublicDnsName: "STRING_VALUE",
121+
* // PublicIpDnsNameOptions: { // PublicIpDnsNameOptions
122+
* // DnsHostnameType: "STRING_VALUE",
123+
* // PublicIpv4DnsName: "STRING_VALUE",
124+
* // PublicIpv6DnsName: "STRING_VALUE",
125+
* // PublicDualStackDnsName: "STRING_VALUE",
126+
* // },
119127
* // PrivateIpAddress: "STRING_VALUE",
120128
* // PrivateIpAddresses: [ // NetworkInterfacePrivateIpAddressList
121129
* // { // NetworkInterfacePrivateIpAddress

clients/client-ec2/src/commands/DescribeVpnGatewaysCommand.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
66

77
import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
88
import { commonParams } from "../endpoint/EndpointParameters";
9-
import { DescribeVpnGatewaysRequest } from "../models/models_5";
10-
import { DescribeVpnGatewaysResult } from "../models/models_6";
9+
import { DescribeVpnGatewaysRequest, DescribeVpnGatewaysResult } from "../models/models_6";
1110
import { de_DescribeVpnGatewaysCommand, se_DescribeVpnGatewaysCommand } from "../protocols/Aws_ec2";
1211

1312
/**

clients/client-ec2/src/commands/DisassociateAddressCommand.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,18 @@ export interface DisassociateAddressCommandOutput extends __MetadataBearer {}
3030
/**
3131
* <p>Disassociates an Elastic IP address from the instance or network interface it's associated with.</p>
3232
* <p>This is an idempotent operation. If you perform the operation more than once, Amazon EC2 doesn't return an error.</p>
33+
* <p>An address cannot be disassociated if the all of the following conditions are met:</p>
34+
* <ul>
35+
* <li>
36+
* <p>Network interface has a <code>publicDualStackDnsName</code> publicDnsName</p>
37+
* </li>
38+
* <li>
39+
* <p>Public IPv4 address is the primary public IPv4 address</p>
40+
* </li>
41+
* <li>
42+
* <p>Network interface only has one remaining public IPv4 address</p>
43+
* </li>
44+
* </ul>
3345
* @example
3446
* Use a bare-bones client and the command you need to make an API call.
3547
* ```javascript
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
// smithy-typescript generated code
2+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3+
import { getSerdePlugin } from "@smithy/middleware-serde";
4+
import { Command as $Command } from "@smithy/smithy-client";
5+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
6+
7+
import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
8+
import { commonParams } from "../endpoint/EndpointParameters";
9+
import { ModifyPublicIpDnsNameOptionsRequest, ModifyPublicIpDnsNameOptionsResult } from "../models/models_7";
10+
import { de_ModifyPublicIpDnsNameOptionsCommand, se_ModifyPublicIpDnsNameOptionsCommand } from "../protocols/Aws_ec2";
11+
12+
/**
13+
* @public
14+
*/
15+
export type { __MetadataBearer };
16+
export { $Command };
17+
/**
18+
* @public
19+
*
20+
* The input for {@link ModifyPublicIpDnsNameOptionsCommand}.
21+
*/
22+
export interface ModifyPublicIpDnsNameOptionsCommandInput extends ModifyPublicIpDnsNameOptionsRequest {}
23+
/**
24+
* @public
25+
*
26+
* The output of {@link ModifyPublicIpDnsNameOptionsCommand}.
27+
*/
28+
export interface ModifyPublicIpDnsNameOptionsCommandOutput
29+
extends ModifyPublicIpDnsNameOptionsResult,
30+
__MetadataBearer {}
31+
32+
/**
33+
* <p>Modify public hostname options for a network interface. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-naming.html">EC2 instance hostnames, DNS names, and domains</a> in the <i>Amazon EC2 User Guide</i>.</p>
34+
* @example
35+
* Use a bare-bones client and the command you need to make an API call.
36+
* ```javascript
37+
* import { EC2Client, ModifyPublicIpDnsNameOptionsCommand } from "@aws-sdk/client-ec2"; // ES Modules import
38+
* // const { EC2Client, ModifyPublicIpDnsNameOptionsCommand } = require("@aws-sdk/client-ec2"); // CommonJS import
39+
* const client = new EC2Client(config);
40+
* const input = { // ModifyPublicIpDnsNameOptionsRequest
41+
* NetworkInterfaceId: "STRING_VALUE", // required
42+
* HostnameType: "public-dual-stack-dns-name" || "public-ipv4-dns-name" || "public-ipv6-dns-name", // required
43+
* DryRun: true || false,
44+
* };
45+
* const command = new ModifyPublicIpDnsNameOptionsCommand(input);
46+
* const response = await client.send(command);
47+
* // { // ModifyPublicIpDnsNameOptionsResult
48+
* // Successful: true || false,
49+
* // };
50+
*
51+
* ```
52+
*
53+
* @param ModifyPublicIpDnsNameOptionsCommandInput - {@link ModifyPublicIpDnsNameOptionsCommandInput}
54+
* @returns {@link ModifyPublicIpDnsNameOptionsCommandOutput}
55+
* @see {@link ModifyPublicIpDnsNameOptionsCommandInput} for command's `input` shape.
56+
* @see {@link ModifyPublicIpDnsNameOptionsCommandOutput} for command's `response` shape.
57+
* @see {@link EC2ClientResolvedConfig | config} for EC2Client's `config` shape.
58+
*
59+
* @throws {@link EC2ServiceException}
60+
* <p>Base exception class for all service exceptions from EC2 service.</p>
61+
*
62+
*
63+
* @public
64+
*/
65+
export class ModifyPublicIpDnsNameOptionsCommand extends $Command
66+
.classBuilder<
67+
ModifyPublicIpDnsNameOptionsCommandInput,
68+
ModifyPublicIpDnsNameOptionsCommandOutput,
69+
EC2ClientResolvedConfig,
70+
ServiceInputTypes,
71+
ServiceOutputTypes
72+
>()
73+
.ep(commonParams)
74+
.m(function (this: any, Command: any, cs: any, config: EC2ClientResolvedConfig, o: any) {
75+
return [
76+
getSerdePlugin(config, this.serialize, this.deserialize),
77+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
78+
];
79+
})
80+
.s("AmazonEC2", "ModifyPublicIpDnsNameOptions", {})
81+
.n("EC2Client", "ModifyPublicIpDnsNameOptionsCommand")
82+
.f(void 0, void 0)
83+
.ser(se_ModifyPublicIpDnsNameOptionsCommand)
84+
.de(de_ModifyPublicIpDnsNameOptionsCommand)
85+
.build() {
86+
/** @internal type navigation helper, not in runtime. */
87+
protected declare static __types: {
88+
api: {
89+
input: ModifyPublicIpDnsNameOptionsRequest;
90+
output: ModifyPublicIpDnsNameOptionsResult;
91+
};
92+
sdk: {
93+
input: ModifyPublicIpDnsNameOptionsCommandInput;
94+
output: ModifyPublicIpDnsNameOptionsCommandOutput;
95+
};
96+
};
97+
}

clients/client-ec2/src/commands/ReplaceIamInstanceProfileAssociationCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { commonParams } from "../endpoint/EndpointParameters";
99
import {
1010
ReplaceIamInstanceProfileAssociationRequest,
1111
ReplaceIamInstanceProfileAssociationResult,
12-
} from "../models/models_7";
12+
} from "../models/models_8";
1313
import {
1414
de_ReplaceIamInstanceProfileAssociationCommand,
1515
se_ReplaceIamInstanceProfileAssociationCommand,

clients/client-ec2/src/commands/ReplaceImageCriteriaInAllowedImagesSettingsCommand.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
66

77
import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
88
import { commonParams } from "../endpoint/EndpointParameters";
9-
import { ReplaceImageCriteriaInAllowedImagesSettingsRequest } from "../models/models_7";
10-
import { ReplaceImageCriteriaInAllowedImagesSettingsResult } from "../models/models_8";
9+
import {
10+
ReplaceImageCriteriaInAllowedImagesSettingsRequest,
11+
ReplaceImageCriteriaInAllowedImagesSettingsResult,
12+
} from "../models/models_8";
1113
import {
1214
de_ReplaceImageCriteriaInAllowedImagesSettingsCommand,
1315
se_ReplaceImageCriteriaInAllowedImagesSettingsCommand,

clients/client-ec2/src/commands/TerminateInstancesCommand.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,10 @@ export interface TerminateInstancesCommandOutput extends TerminateInstancesResul
8484
* devices attached to the instance persist. When you terminate an instance, any attached
8585
* EBS volumes with the <code>DeleteOnTermination</code> block device mapping parameter set
8686
* to <code>true</code> are automatically deleted. For more information about the
87-
* differences between stopping and terminating instances, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html">Amazon EC2
88-
* instance state changes</a> in the <i>Amazon EC2 User Guide</i>.</p>
89-
* <p>For information about troubleshooting, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesShuttingDown.html">Troubleshooting terminating your instance</a> in the
90-
* <i>Amazon EC2 User Guide</i>.</p>
87+
* differences between stopping and terminating instances, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html">Instance lifecycle</a>
88+
* in the <i>Amazon EC2 User Guide</i>.</p>
89+
* <p>For more information about troubleshooting, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesShuttingDown.html">Troubleshooting terminating your instance</a> in the
90+
* <i>Amazon EC2 User Guide</i>.</p>
9191
* @example
9292
* Use a bare-bones client and the command you need to make an API call.
9393
* ```javascript

clients/client-ec2/src/commands/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,7 @@ export * from "./ModifyLocalGatewayRouteCommand";
572572
export * from "./ModifyManagedPrefixListCommand";
573573
export * from "./ModifyNetworkInterfaceAttributeCommand";
574574
export * from "./ModifyPrivateDnsNameOptionsCommand";
575+
export * from "./ModifyPublicIpDnsNameOptionsCommand";
575576
export * from "./ModifyReservedInstancesCommand";
576577
export * from "./ModifyRouteServerCommand";
577578
export * from "./ModifySecurityGroupRulesCommand";

0 commit comments

Comments
 (0)