Skip to content

Commit d377dfd

Browse files
author
awstools
committed
feat(client-ec2): Adds support for SubnetConfigurations to allow users to select their own IPv4 and IPv6 addresses for Interface VPC endpoints
1 parent 138b35b commit d377dfd

15 files changed

+313
-101
lines changed

clients/client-ec2/src/EC2Client.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2067,6 +2067,7 @@ import {
20672067
resolveClientEndpointParameters,
20682068
} from "./endpoint/EndpointParameters";
20692069
import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
2070+
import { resolveRuntimeExtensions, RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions";
20702071

20712072
export { __Client };
20722073

@@ -3386,6 +3387,11 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
33863387
*/
33873388
logger?: __Logger;
33883389

3390+
/**
3391+
* Optional extensions
3392+
*/
3393+
extensions?: RuntimeExtension[];
3394+
33893395
/**
33903396
* The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
33913397
*/
@@ -3416,6 +3422,7 @@ export interface EC2ClientConfig extends EC2ClientConfigType {}
34163422
*/
34173423
export type EC2ClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> &
34183424
Required<ClientDefaults> &
3425+
RuntimeExtensionsConfig &
34193426
RegionResolvedConfig &
34203427
EndpointResolvedConfig<EndpointParameters> &
34213428
RetryResolvedConfig &
@@ -3479,8 +3486,9 @@ export class EC2Client extends __Client<
34793486
const _config_5 = resolveHostHeaderConfig(_config_4);
34803487
const _config_6 = resolveAwsAuthConfig(_config_5);
34813488
const _config_7 = resolveUserAgentConfig(_config_6);
3482-
super(_config_7);
3483-
this.config = _config_7;
3489+
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
3490+
super(_config_8);
3491+
this.config = _config_8;
34843492
this.middlewareStack.use(getRetryPlugin(this.config));
34853493
this.middlewareStack.use(getContentLengthPlugin(this.config));
34863494
this.middlewareStack.use(getHostHeaderPlugin(this.config));
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// smithy-typescript generated code
2+
import { DefaultClientConfiguration } from "@smithy/types";
3+
4+
/**
5+
* @internal
6+
*/
7+
export interface EC2ClientConfiguration extends DefaultClientConfiguration {}

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,13 @@ export interface CreateVpcEndpointCommandOutput extends CreateVpcEndpointResult,
7979
* ],
8080
* },
8181
* ],
82+
* SubnetConfigurations: [ // SubnetConfigurationsList
83+
* { // SubnetConfiguration
84+
* SubnetId: "STRING_VALUE",
85+
* Ipv4: "STRING_VALUE",
86+
* Ipv6: "STRING_VALUE",
87+
* },
88+
* ],
8289
* };
8390
* const command = new CreateVpcEndpointCommand(input);
8491
* const response = await client.send(command);

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,8 @@ import {
1414
} from "@smithy/types";
1515

1616
import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
17-
import {
18-
ImportClientVpnClientCertificateRevocationListRequest,
19-
ImportClientVpnClientCertificateRevocationListResult,
20-
} from "../models/models_5";
17+
import { ImportClientVpnClientCertificateRevocationListRequest } from "../models/models_5";
18+
import { ImportClientVpnClientCertificateRevocationListResult } from "../models/models_6";
2119
import {
2220
de_ImportClientVpnClientCertificateRevocationListCommand,
2321
se_ImportClientVpnClientCertificateRevocationListCommand,

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,13 @@ export interface ModifyVpcEndpointCommandOutput extends ModifyVpcEndpointResult,
7575
* PrivateDnsOnlyForInboundResolverEndpoint: true || false,
7676
* },
7777
* PrivateDnsEnabled: true || false,
78+
* SubnetConfigurations: [ // SubnetConfigurationsList
79+
* { // SubnetConfiguration
80+
* SubnetId: "STRING_VALUE",
81+
* Ipv4: "STRING_VALUE",
82+
* Ipv6: "STRING_VALUE",
83+
* },
84+
* ],
7885
* };
7986
* const command = new ModifyVpcEndpointCommand(input);
8087
* const response = await client.send(command);

clients/client-ec2/src/models/models_2.ts

Lines changed: 41 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5164,6 +5164,38 @@ export const IpAddressType = {
51645164
*/
51655165
export type IpAddressType = (typeof IpAddressType)[keyof typeof IpAddressType];
51665166

5167+
/**
5168+
* @public
5169+
* <p>Describes the configuration of a subnet for a VPC endpoint.</p>
5170+
*/
5171+
export interface SubnetConfiguration {
5172+
/**
5173+
* @public
5174+
* <p>The ID of the subnet.</p>
5175+
*/
5176+
SubnetId?: string;
5177+
5178+
/**
5179+
* @public
5180+
* <p>The IPv4 address to assign to the endpoint network interface in the subnet. You must provide
5181+
* an IPv4 address if the VPC endpoint supports IPv4.</p>
5182+
* <p>If you specify an IPv4 address when modifying a VPC endpoint, we replace the existing
5183+
* endpoint network interface with a new endpoint network interface with this IP address.
5184+
* This process temporarily disconnects the subnet and the VPC endpoint.</p>
5185+
*/
5186+
Ipv4?: string;
5187+
5188+
/**
5189+
* @public
5190+
* <p>The IPv6 address to assign to the endpoint network interface in the subnet. You must provide
5191+
* an IPv6 address if the VPC endpoint supports IPv6.</p>
5192+
* <p>If you specify an IPv6 address when modifying a VPC endpoint, we replace the existing
5193+
* endpoint network interface with a new endpoint network interface with this IP address.
5194+
* This process temporarily disconnects the subnet and the VPC endpoint.</p>
5195+
*/
5196+
Ipv6?: string;
5197+
}
5198+
51675199
/**
51685200
* @public
51695201
* @enum
@@ -5226,15 +5258,15 @@ export interface CreateVpcEndpointRequest {
52265258

52275259
/**
52285260
* @public
5229-
* <p>(Interface and Gateway Load Balancer endpoints) The IDs of the subnets in which to create an endpoint
5230-
* network interface. For a Gateway Load Balancer endpoint, you can specify only one subnet.</p>
5261+
* <p>(Interface and Gateway Load Balancer endpoints) The IDs of the subnets in which to create endpoint
5262+
* network interfaces. For a Gateway Load Balancer endpoint, you can specify only one subnet.</p>
52315263
*/
52325264
SubnetIds?: string[];
52335265

52345266
/**
52355267
* @public
52365268
* <p>(Interface endpoint) The IDs of the security groups to associate with the
5237-
* endpoint network interface. If this parameter is not specified, we use the default
5269+
* endpoint network interfaces. If this parameter is not specified, we use the default
52385270
* security group for the VPC.</p>
52395271
*/
52405272
SecurityGroupIds?: string[];
@@ -5282,6 +5314,12 @@ export interface CreateVpcEndpointRequest {
52825314
* <p>The tags to associate with the endpoint.</p>
52835315
*/
52845316
TagSpecifications?: TagSpecification[];
5317+
5318+
/**
5319+
* @public
5320+
* <p>The subnet configurations for the endpoint.</p>
5321+
*/
5322+
SubnetConfigurations?: SubnetConfiguration[];
52855323
}
52865324

52875325
/**
@@ -8642,24 +8680,6 @@ export const DeleteQueuedReservedInstancesErrorCode = {
86428680
export type DeleteQueuedReservedInstancesErrorCode =
86438681
(typeof DeleteQueuedReservedInstancesErrorCode)[keyof typeof DeleteQueuedReservedInstancesErrorCode];
86448682

8645-
/**
8646-
* @public
8647-
* <p>Describes the error for a Reserved Instance whose queued purchase could not be deleted.</p>
8648-
*/
8649-
export interface DeleteQueuedReservedInstancesError {
8650-
/**
8651-
* @public
8652-
* <p>The error code.</p>
8653-
*/
8654-
Code?: DeleteQueuedReservedInstancesErrorCode | string;
8655-
8656-
/**
8657-
* @public
8658-
* <p>The error message.</p>
8659-
*/
8660-
Message?: string;
8661-
}
8662-
86638683
/**
86648684
* @internal
86658685
*/

clients/client-ec2/src/models/models_3.ts

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ import {
7575
TransportProtocol,
7676
} from "./models_1";
7777
import {
78-
DeleteQueuedReservedInstancesError,
78+
DeleteQueuedReservedInstancesErrorCode,
7979
FleetStateCode,
8080
SubnetCidrReservation,
8181
TransitGateway,
@@ -91,6 +91,24 @@ import {
9191
VerifiedAccessGroup,
9292
} from "./models_2";
9393

94+
/**
95+
* @public
96+
* <p>Describes the error for a Reserved Instance whose queued purchase could not be deleted.</p>
97+
*/
98+
export interface DeleteQueuedReservedInstancesError {
99+
/**
100+
* @public
101+
* <p>The error code.</p>
102+
*/
103+
Code?: DeleteQueuedReservedInstancesErrorCode | string;
104+
105+
/**
106+
* @public
107+
* <p>The error message.</p>
108+
*/
109+
Message?: string;
110+
}
111+
94112
/**
95113
* @public
96114
* <p>Describes a Reserved Instance whose queued purchase was not deleted.</p>
@@ -10249,20 +10267,6 @@ export interface HibernationOptions {
1024910267
Configured?: boolean;
1025010268
}
1025110269

10252-
/**
10253-
* @public
10254-
* @enum
10255-
*/
10256-
export const InstanceLifecycleType = {
10257-
scheduled: "scheduled",
10258-
spot: "spot",
10259-
} as const;
10260-
10261-
/**
10262-
* @public
10263-
*/
10264-
export type InstanceLifecycleType = (typeof InstanceLifecycleType)[keyof typeof InstanceLifecycleType];
10265-
1026610270
/**
1026710271
* @internal
1026810272
*/

clients/client-ec2/src/models/models_4.ts

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,25 @@ import {
110110
IdFormat,
111111
InstanceBlockDeviceMapping,
112112
InstanceBootModeValues,
113-
InstanceLifecycleType,
114113
PermissionGroup,
115114
ProductCode,
116115
VirtualizationType,
117116
} from "./models_3";
118117

118+
/**
119+
* @public
120+
* @enum
121+
*/
122+
export const InstanceLifecycleType = {
123+
scheduled: "scheduled",
124+
spot: "spot",
125+
} as const;
126+
127+
/**
128+
* @public
129+
*/
130+
export type InstanceLifecycleType = (typeof InstanceLifecycleType)[keyof typeof InstanceLifecycleType];
131+
119132
/**
120133
* @public
121134
* <p>Describes a license configuration.</p>
@@ -12292,21 +12305,6 @@ export interface DescribeVerifiedAccessInstanceLoggingConfigurationsRequest {
1229212305
DryRun?: boolean;
1229312306
}
1229412307

12295-
/**
12296-
* @public
12297-
* @enum
12298-
*/
12299-
export const VerifiedAccessLogDeliveryStatusCode = {
12300-
FAILED: "failed",
12301-
SUCCESS: "success",
12302-
} as const;
12303-
12304-
/**
12305-
* @public
12306-
*/
12307-
export type VerifiedAccessLogDeliveryStatusCode =
12308-
(typeof VerifiedAccessLogDeliveryStatusCode)[keyof typeof VerifiedAccessLogDeliveryStatusCode];
12309-
1231012308
/**
1231112309
* @internal
1231212310
*/

clients/client-ec2/src/models/models_5.ts

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,22 @@ import {
7878
StatisticType,
7979
VirtualizationType,
8080
} from "./models_3";
81-
import { AnalysisStatus, ArchitectureType, VerifiedAccessLogDeliveryStatusCode } from "./models_4";
81+
import { AnalysisStatus, ArchitectureType } from "./models_4";
82+
83+
/**
84+
* @public
85+
* @enum
86+
*/
87+
export const VerifiedAccessLogDeliveryStatusCode = {
88+
FAILED: "failed",
89+
SUCCESS: "success",
90+
} as const;
91+
92+
/**
93+
* @public
94+
*/
95+
export type VerifiedAccessLogDeliveryStatusCode =
96+
(typeof VerifiedAccessLogDeliveryStatusCode)[keyof typeof VerifiedAccessLogDeliveryStatusCode];
8297

8398
/**
8499
* @public
@@ -8541,17 +8556,6 @@ export interface ImportClientVpnClientCertificateRevocationListRequest {
85418556
DryRun?: boolean;
85428557
}
85438558

8544-
/**
8545-
* @public
8546-
*/
8547-
export interface ImportClientVpnClientCertificateRevocationListResult {
8548-
/**
8549-
* @public
8550-
* <p>Returns <code>true</code> if the request succeeds; otherwise, it returns an error.</p>
8551-
*/
8552-
Return?: boolean;
8553-
}
8554-
85558559
/**
85568560
* @internal
85578561
*/

0 commit comments

Comments
 (0)