Skip to content

Commit

Permalink
feat(client-ec2): Launching capability for customers to enable or dis…
Browse files Browse the repository at this point in the history
…able automatic assignment of public IPv4 addresses to their network interface
  • Loading branch information
awstools committed Apr 24, 2024
1 parent 349915b commit 6121a23
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export interface DescribeNetworkInterfaceAttributeCommandOutput
* // const { EC2Client, DescribeNetworkInterfaceAttributeCommand } = require("@aws-sdk/client-ec2"); // CommonJS import
* const client = new EC2Client(config);
* const input = { // DescribeNetworkInterfaceAttributeRequest
* Attribute: "description" || "groupSet" || "sourceDestCheck" || "attachment",
* Attribute: "description" || "groupSet" || "sourceDestCheck" || "attachment" || "associatePublicIpAddress",
* DryRun: true || false,
* NetworkInterfaceId: "STRING_VALUE", // required
* };
Expand Down Expand Up @@ -76,6 +76,7 @@ export interface DescribeNetworkInterfaceAttributeCommandOutput
* // SourceDestCheck: { // AttributeBooleanValue
* // Value: true || false,
* // },
* // AssociatePublicIpAddress: true || false,
* // };
*
* ```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export interface ModifyNetworkInterfaceAttributeCommandOutput extends __Metadata
* UdpStreamTimeout: Number("int"),
* UdpTimeout: Number("int"),
* },
* AssociatePublicIpAddress: true || false,
* };
* const command = new ModifyNetworkInterfaceAttributeCommand(input);
* const response = await client.send(command);
Expand Down
8 changes: 8 additions & 0 deletions clients/client-ec2/src/models/models_4.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7539,6 +7539,7 @@ export interface DescribeNetworkInsightsPathsResult {
* @enum
*/
export const NetworkInterfaceAttribute = {
associatePublicIpAddress: "associatePublicIpAddress",
attachment: "attachment",
description: "description",
groupSet: "groupSet",
Expand Down Expand Up @@ -7610,6 +7611,13 @@ export interface DescribeNetworkInterfaceAttributeResult {
* @public
*/
SourceDestCheck?: AttributeBooleanValue;

/**
* <p>Indicates whether to assign a public IPv4 address to a network interface.
* This option can be enabled for any network interface but will only apply to the primary network interface (eth0).</p>
* @public
*/
AssociatePublicIpAddress?: boolean;
}

/**
Expand Down
7 changes: 7 additions & 0 deletions clients/client-ec2/src/models/models_6.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6443,6 +6443,13 @@ export interface ModifyNetworkInterfaceAttributeRequest {
* @public
*/
ConnectionTrackingSpecification?: ConnectionTrackingSpecificationRequest;

/**
* <p>Indicates whether to assign a public IPv4 address to a network interface.
* This option can be enabled for any network interface but will only apply to the primary network interface (eth0).</p>
* @public
*/
AssociatePublicIpAddress?: boolean;
}

/**
Expand Down
6 changes: 6 additions & 0 deletions clients/client-ec2/src/protocols/Aws_ec2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47489,6 +47489,9 @@ const se_ModifyNetworkInterfaceAttributeRequest = (
entries[loc] = value;
});
}
if (input[_APIAs] != null) {
entries[_APIAs] = input[_APIAs];
}
return entries;
};

Expand Down Expand Up @@ -62722,6 +62725,9 @@ const de_DescribeNetworkInterfaceAttributeResult = (
if (output[_sDC] != null) {
contents[_SDC] = de_AttributeBooleanValue(output[_sDC], context);
}
if (output[_aPIA] != null) {
contents[_APIAs] = __parseBoolean(output[_aPIA]);
}
return contents;
};

Expand Down
20 changes: 20 additions & 0 deletions codegen/sdk-codegen/aws-models/ec2.json
Original file line number Diff line number Diff line change
Expand Up @@ -35162,6 +35162,14 @@
"smithy.api#documentation": "<p>Indicates whether source/destination checking is enabled.</p>",
"smithy.api#xmlName": "sourceDestCheck"
}
},
"AssociatePublicIpAddress": {
"target": "com.amazonaws.ec2#Boolean",
"traits": {
"aws.protocols#ec2QueryName": "AssociatePublicIpAddress",
"smithy.api#documentation": "<p>Indicates whether to assign a public IPv4 address to a network interface. \n This option can be enabled for any network interface but will only apply to the primary network interface (eth0).</p>",
"smithy.api#xmlName": "associatePublicIpAddress"
}
}
},
"traits": {
Expand Down Expand Up @@ -76259,6 +76267,12 @@
"traits": {
"smithy.api#documentation": "<p>A connection tracking specification.</p>"
}
},
"AssociatePublicIpAddress": {
"target": "com.amazonaws.ec2#Boolean",
"traits": {
"smithy.api#documentation": "<p>Indicates whether to assign a public IPv4 address to a network interface. \n This option can be enabled for any network interface but will only apply to the primary network interface (eth0).</p>"
}
}
},
"traits": {
Expand Down Expand Up @@ -81182,6 +81196,12 @@
"traits": {
"smithy.api#enumValue": "attachment"
}
},
"associatePublicIpAddress": {
"target": "smithy.api#Unit",
"traits": {
"smithy.api#enumValue": "associatePublicIpAddress"
}
}
}
},
Expand Down

0 comments on commit 6121a23

Please sign in to comment.