Skip to content

Commit 65a1927

Browse files
author
awstools
committed
feat(client-ec2): Introduced a new clientToken request parameter on CreateNetworkAcl and CreateRouteTable APIs. The clientToken parameter allows idempotent operations on the APIs.
1 parent e500830 commit 65a1927

15 files changed

+120
-10
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export interface CreateDefaultSubnetCommandOutput extends CreateDefaultSubnetRes
5656
* // MapPublicIpOnLaunch: true || false,
5757
* // MapCustomerOwnedIpOnLaunch: true || false,
5858
* // CustomerOwnedIpv4Pool: "STRING_VALUE",
59-
* // State: "pending" || "available",
59+
* // State: "pending" || "available" || "unavailable",
6060
* // SubnetId: "STRING_VALUE",
6161
* // VpcId: "STRING_VALUE",
6262
* // OwnerId: "STRING_VALUE",

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ export interface CreateNetworkAclCommandOutput extends CreateNetworkAclResult, _
5151
* ],
5252
* },
5353
* ],
54+
* ClientToken: "STRING_VALUE",
5455
* };
5556
* const command = new CreateNetworkAclCommand(input);
5657
* const response = await client.send(command);
@@ -92,6 +93,7 @@ export interface CreateNetworkAclCommandOutput extends CreateNetworkAclResult, _
9293
* // VpcId: "STRING_VALUE",
9394
* // OwnerId: "STRING_VALUE",
9495
* // },
96+
* // ClientToken: "STRING_VALUE",
9597
* // };
9698
*
9799
* ```

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ export interface CreateRouteTableCommandOutput extends CreateRouteTableResult, _
5151
* ],
5252
* },
5353
* ],
54+
* ClientToken: "STRING_VALUE",
5455
* };
5556
* const command = new CreateRouteTableCommand(input);
5657
* const response = await client.send(command);
@@ -104,6 +105,7 @@ export interface CreateRouteTableCommandOutput extends CreateRouteTableResult, _
104105
* // VpcId: "STRING_VALUE",
105106
* // OwnerId: "STRING_VALUE",
106107
* // },
108+
* // ClientToken: "STRING_VALUE",
107109
* // };
108110
*
109111
* ```

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export interface CreateSubnetCommandOutput extends CreateSubnetResult, __Metadat
8989
* // MapPublicIpOnLaunch: true || false,
9090
* // MapCustomerOwnedIpOnLaunch: true || false,
9191
* // CustomerOwnedIpv4Pool: "STRING_VALUE",
92-
* // State: "pending" || "available",
92+
* // State: "pending" || "available" || "unavailable",
9393
* // SubnetId: "STRING_VALUE",
9494
* // VpcId: "STRING_VALUE",
9595
* // OwnerId: "STRING_VALUE",

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export interface DescribeAvailabilityZonesCommandOutput extends DescribeAvailabi
6363
* // { // DescribeAvailabilityZonesResult
6464
* // AvailabilityZones: [ // AvailabilityZoneList
6565
* // { // AvailabilityZone
66-
* // State: "available" || "information" || "impaired" || "unavailable",
66+
* // State: "available" || "information" || "impaired" || "unavailable" || "constrained",
6767
* // OptInStatus: "opt-in-not-required" || "opted-in" || "not-opted-in",
6868
* // Messages: [ // AvailabilityZoneMessageList
6969
* // { // AvailabilityZoneMessage

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export interface DescribeSubnetsCommandOutput extends DescribeSubnetsResult, __M
6868
* // MapPublicIpOnLaunch: true || false,
6969
* // MapCustomerOwnedIpOnLaunch: true || false,
7070
* // CustomerOwnedIpv4Pool: "STRING_VALUE",
71-
* // State: "pending" || "available",
71+
* // State: "pending" || "available" || "unavailable",
7272
* // SubnetId: "STRING_VALUE",
7373
* // VpcId: "STRING_VALUE",
7474
* // OwnerId: "STRING_VALUE",

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

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,6 +1014,7 @@ export interface PrivateDnsNameOptionsOnLaunch {
10141014
export const SubnetState = {
10151015
available: "available",
10161016
pending: "pending",
1017+
unavailable: "unavailable",
10171018
} as const;
10181019

10191020
/**
@@ -1415,8 +1416,7 @@ export interface CreateEgressOnlyInternetGatewayRequest {
14151416
/**
14161417
* @public
14171418
* <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the
1418-
* request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html">How to ensure
1419-
* idempotency</a>.</p>
1419+
* request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html">Ensuring idempotency</a>.</p>
14201420
*/
14211421
ClientToken?: string;
14221422

@@ -9676,8 +9676,7 @@ export interface CreateNatGatewayRequest {
96769676
/**
96779677
* @public
96789678
* <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the
9679-
* request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">How to ensure
9680-
* idempotency</a>.</p>
9679+
* request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring idempotency</a>.</p>
96819680
* <p>Constraint: Maximum 64 ASCII characters.</p>
96829681
*/
96839682
ClientToken?: string;
@@ -9959,6 +9958,13 @@ export interface CreateNetworkAclRequest {
99599958
* <p>The tags to assign to the network ACL.</p>
99609959
*/
99619960
TagSpecifications?: TagSpecification[];
9961+
9962+
/**
9963+
* @public
9964+
* <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the
9965+
* request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html">Ensuring idempotency</a>.</p>
9966+
*/
9967+
ClientToken?: string;
99629968
}
99639969

99649970
/**
@@ -10128,6 +10134,12 @@ export interface CreateNetworkAclResult {
1012810134
* <p>Information about the network ACL.</p>
1012910135
*/
1013010136
NetworkAcl?: NetworkAcl;
10137+
10138+
/**
10139+
* @public
10140+
* <p>Unique, case-sensitive identifier to ensure the idempotency of the request. Only returned if a client token was provided in the request.</p>
10141+
*/
10142+
ClientToken?: string;
1013110143
}
1013210144

1013310145
/**

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import {
3030
VpcAttachment,
3131
VpcPeeringConnection,
3232
} from "./models_0";
33+
3334
import {
3435
CarrierGateway,
3536
ClientVpnEndpointStatus,
@@ -1121,6 +1122,13 @@ export interface CreateRouteTableRequest {
11211122
* <p>The tags to assign to the route table.</p>
11221123
*/
11231124
TagSpecifications?: TagSpecification[];
1125+
1126+
/**
1127+
* @public
1128+
* <p>Unique, case-sensitive identifier that you provide to ensure the idempotency of the
1129+
* request. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html">Ensuring idempotency</a>.</p>
1130+
*/
1131+
ClientToken?: string;
11241132
}
11251133

11261134
/**
@@ -1381,6 +1389,12 @@ export interface CreateRouteTableResult {
13811389
* <p>Information about the route table.</p>
13821390
*/
13831391
RouteTable?: RouteTable;
1392+
1393+
/**
1394+
* @public
1395+
* <p>Unique, case-sensitive identifier to ensure the idempotency of the request. Only returned if a client token was provided in the request.</p>
1396+
*/
1397+
ClientToken?: string;
13841398
}
13851399

13861400
/**

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import {
3636
VerifiedAccessTrustProvider,
3737
VerifiedAccessTrustProviderFilterSensitiveLog,
3838
} from "./models_0";
39+
3940
import {
4041
AttributeValue,
4142
BlockDeviceMapping,
@@ -70,6 +71,7 @@ import {
7071
TrafficType,
7172
TransportProtocol,
7273
} from "./models_1";
74+
7375
import {
7476
FleetStateCode,
7577
SubnetCidrReservation,
@@ -2453,6 +2455,7 @@ export type AvailabilityZoneOptInStatus =
24532455
*/
24542456
export const AvailabilityZoneState = {
24552457
available: "available",
2458+
constrained: "constrained",
24562459
impaired: "impaired",
24572460
information: "information",
24582461
unavailable: "unavailable",

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import {
2424
TagSpecification,
2525
UserIdGroupPair,
2626
} from "./models_0";
27+
2728
import {
2829
AmdSevSnpSpecification,
2930
AttributeValue,
@@ -68,6 +69,7 @@ import {
6869
TargetCapacityUnitType,
6970
Tenancy,
7071
} from "./models_1";
72+
7173
import {
7274
NetworkInterface,
7375
NetworkInterfacePermission,
@@ -81,6 +83,7 @@ import {
8183
SpotInstanceStateFault,
8284
StorageTier,
8385
} from "./models_2";
86+
8487
import {
8588
ArchitectureValues,
8689
BootModeValues,

0 commit comments

Comments
 (0)