Skip to content

Commit 5009701

Browse files
author
awstools
committed
feat(client-ec2): The DeleteKeyPair API has been updated to return the keyPairId when an existing key pair is deleted.
1 parent 5df57f8 commit 5009701

File tree

11 files changed

+187
-122
lines changed

11 files changed

+187
-122
lines changed

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
} from "@smithy/types";
1515

1616
import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
17-
import { DeleteKeyPairRequest } from "../models/models_2";
17+
import { DeleteKeyPairRequest, DeleteKeyPairResult } from "../models/models_2";
1818
import { de_DeleteKeyPairCommand, se_DeleteKeyPairCommand } from "../protocols/Aws_ec2";
1919

2020
/**
@@ -32,7 +32,7 @@ export interface DeleteKeyPairCommandInput extends DeleteKeyPairRequest {}
3232
*
3333
* The output of {@link DeleteKeyPairCommand}.
3434
*/
35-
export interface DeleteKeyPairCommandOutput extends __MetadataBearer {}
35+
export interface DeleteKeyPairCommandOutput extends DeleteKeyPairResult, __MetadataBearer {}
3636

3737
/**
3838
* @public
@@ -50,7 +50,10 @@ export interface DeleteKeyPairCommandOutput extends __MetadataBearer {}
5050
* };
5151
* const command = new DeleteKeyPairCommand(input);
5252
* const response = await client.send(command);
53-
* // {};
53+
* // { // DeleteKeyPairResult
54+
* // Return: true || false,
55+
* // KeyPairId: "STRING_VALUE",
56+
* // };
5457
*
5558
* ```
5659
*

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

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

1616
import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
17-
import { DescribeVerifiedAccessInstanceLoggingConfigurationsRequest } from "../models/models_4";
18-
import { DescribeVerifiedAccessInstanceLoggingConfigurationsResult } from "../models/models_5";
17+
import {
18+
DescribeVerifiedAccessInstanceLoggingConfigurationsRequest,
19+
DescribeVerifiedAccessInstanceLoggingConfigurationsResult,
20+
} from "../models/models_5";
1921
import {
2022
de_DescribeVerifiedAccessInstanceLoggingConfigurationsCommand,
2123
se_DescribeVerifiedAccessInstanceLoggingConfigurationsCommand,

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

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

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

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

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7982,6 +7982,23 @@ export interface DeleteKeyPairRequest {
79827982
DryRun?: boolean;
79837983
}
79847984

7985+
/**
7986+
* @public
7987+
*/
7988+
export interface DeleteKeyPairResult {
7989+
/**
7990+
* @public
7991+
* <p>Is <code>true</code> if the request succeeds, and an error otherwise.</p>
7992+
*/
7993+
Return?: boolean;
7994+
7995+
/**
7996+
* @public
7997+
* <p>The ID of the key pair.</p>
7998+
*/
7999+
KeyPairId?: string;
8000+
}
8001+
79858002
/**
79868003
* @public
79878004
*/
@@ -8664,22 +8681,6 @@ export interface DeleteQueuedReservedInstancesRequest {
86648681
ReservedInstancesIds: string[] | undefined;
86658682
}
86668683

8667-
/**
8668-
* @public
8669-
* @enum
8670-
*/
8671-
export const DeleteQueuedReservedInstancesErrorCode = {
8672-
RESERVED_INSTANCES_ID_INVALID: "reserved-instances-id-invalid",
8673-
RESERVED_INSTANCES_NOT_IN_QUEUED_STATE: "reserved-instances-not-in-queued-state",
8674-
UNEXPECTED_ERROR: "unexpected-error",
8675-
} as const;
8676-
8677-
/**
8678-
* @public
8679-
*/
8680-
export type DeleteQueuedReservedInstancesErrorCode =
8681-
(typeof DeleteQueuedReservedInstancesErrorCode)[keyof typeof DeleteQueuedReservedInstancesErrorCode];
8682-
86838684
/**
86848685
* @internal
86858686
*/

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

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ import {
7575
TransportProtocol,
7676
} from "./models_1";
7777
import {
78-
DeleteQueuedReservedInstancesErrorCode,
7978
FleetStateCode,
8079
SubnetCidrReservation,
8180
TransitGateway,
@@ -91,6 +90,22 @@ import {
9190
VerifiedAccessGroup,
9291
} from "./models_2";
9392

93+
/**
94+
* @public
95+
* @enum
96+
*/
97+
export const DeleteQueuedReservedInstancesErrorCode = {
98+
RESERVED_INSTANCES_ID_INVALID: "reserved-instances-id-invalid",
99+
RESERVED_INSTANCES_NOT_IN_QUEUED_STATE: "reserved-instances-not-in-queued-state",
100+
UNEXPECTED_ERROR: "unexpected-error",
101+
} as const;
102+
103+
/**
104+
* @public
105+
*/
106+
export type DeleteQueuedReservedInstancesErrorCode =
107+
(typeof DeleteQueuedReservedInstancesErrorCode)[keyof typeof DeleteQueuedReservedInstancesErrorCode];
108+
94109
/**
95110
* @public
96111
* <p>Describes the error for a Reserved Instance whose queued purchase could not be deleted.</p>
@@ -10251,22 +10266,6 @@ export interface ElasticInferenceAcceleratorAssociation {
1025110266
ElasticInferenceAcceleratorAssociationTime?: Date;
1025210267
}
1025310268

10254-
/**
10255-
* @public
10256-
* <p>Indicates whether your instance is configured for hibernation. This parameter is valid
10257-
* only if the instance meets the <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/hibernating-prerequisites.html">hibernation
10258-
* prerequisites</a>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html">Hibernate your instance</a> in the
10259-
* <i>Amazon EC2 User Guide</i>.</p>
10260-
*/
10261-
export interface HibernationOptions {
10262-
/**
10263-
* @public
10264-
* <p>If <code>true</code>, your instance is enabled for hibernation; otherwise, it is not
10265-
* enabled for hibernation.</p>
10266-
*/
10267-
Configured?: boolean;
10268-
}
10269-
1027010269
/**
1027110270
* @internal
1027210271
*/

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

Lines changed: 16 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ import {
105105
EnclaveOptions,
106106
EventInformation,
107107
Filter,
108-
HibernationOptions,
109108
HypervisorType,
110109
IdFormat,
111110
InstanceBlockDeviceMapping,
@@ -115,6 +114,22 @@ import {
115114
VirtualizationType,
116115
} from "./models_3";
117116

117+
/**
118+
* @public
119+
* <p>Indicates whether your instance is configured for hibernation. This parameter is valid
120+
* only if the instance meets the <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/hibernating-prerequisites.html">hibernation
121+
* prerequisites</a>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html">Hibernate your instance</a> in the
122+
* <i>Amazon EC2 User Guide</i>.</p>
123+
*/
124+
export interface HibernationOptions {
125+
/**
126+
* @public
127+
* <p>If <code>true</code>, your instance is enabled for hibernation; otherwise, it is not
128+
* enabled for hibernation.</p>
129+
*/
130+
Configured?: boolean;
131+
}
132+
118133
/**
119134
* @public
120135
* @enum
@@ -12267,44 +12282,6 @@ export interface DescribeVerifiedAccessGroupsResult {
1226712282
NextToken?: string;
1226812283
}
1226912284

12270-
/**
12271-
* @public
12272-
*/
12273-
export interface DescribeVerifiedAccessInstanceLoggingConfigurationsRequest {
12274-
/**
12275-
* @public
12276-
* <p>The IDs of the Verified Access instances.</p>
12277-
*/
12278-
VerifiedAccessInstanceIds?: string[];
12279-
12280-
/**
12281-
* @public
12282-
* <p>The maximum number of results to return with a single call.
12283-
* To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
12284-
*/
12285-
MaxResults?: number;
12286-
12287-
/**
12288-
* @public
12289-
* <p>The token for the next page of results.</p>
12290-
*/
12291-
NextToken?: string;
12292-
12293-
/**
12294-
* @public
12295-
* <p>One or more filters. Filter names and values are case-sensitive.</p>
12296-
*/
12297-
Filters?: Filter[];
12298-
12299-
/**
12300-
* @public
12301-
* <p>Checks whether you have the required permissions for the action, without actually making the request,
12302-
* and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>.
12303-
* Otherwise, it is <code>UnauthorizedOperation</code>.</p>
12304-
*/
12305-
DryRun?: boolean;
12306-
}
12307-
1230812285
/**
1230912286
* @internal
1231012287
*/

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

Lines changed: 38 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,44 @@ import {
8080
} from "./models_3";
8181
import { AnalysisStatus, ArchitectureType } from "./models_4";
8282

83+
/**
84+
* @public
85+
*/
86+
export interface DescribeVerifiedAccessInstanceLoggingConfigurationsRequest {
87+
/**
88+
* @public
89+
* <p>The IDs of the Verified Access instances.</p>
90+
*/
91+
VerifiedAccessInstanceIds?: string[];
92+
93+
/**
94+
* @public
95+
* <p>The maximum number of results to return with a single call.
96+
* To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
97+
*/
98+
MaxResults?: number;
99+
100+
/**
101+
* @public
102+
* <p>The token for the next page of results.</p>
103+
*/
104+
NextToken?: string;
105+
106+
/**
107+
* @public
108+
* <p>One or more filters. Filter names and values are case-sensitive.</p>
109+
*/
110+
Filters?: Filter[];
111+
112+
/**
113+
* @public
114+
* <p>Checks whether you have the required permissions for the action, without actually making the request,
115+
* and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>.
116+
* Otherwise, it is <code>UnauthorizedOperation</code>.</p>
117+
*/
118+
DryRun?: boolean;
119+
}
120+
83121
/**
84122
* @public
85123
* @enum
@@ -8532,30 +8570,6 @@ export interface GetVpnTunnelReplacementStatusResult {
85328570
MaintenanceDetails?: MaintenanceDetails;
85338571
}
85348572

8535-
/**
8536-
* @public
8537-
*/
8538-
export interface ImportClientVpnClientCertificateRevocationListRequest {
8539-
/**
8540-
* @public
8541-
* <p>The ID of the Client VPN endpoint to which the client certificate revocation list applies.</p>
8542-
*/
8543-
ClientVpnEndpointId: string | undefined;
8544-
8545-
/**
8546-
* @public
8547-
* <p>The client certificate revocation list file. For more information, see <a href="https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/cvpn-working-certificates.html#cvpn-working-certificates-generate">Generate a Client Certificate Revocation List</a> in the
8548-
* <i>Client VPN Administrator Guide</i>.</p>
8549-
*/
8550-
CertificateRevocationList: string | undefined;
8551-
8552-
/**
8553-
* @public
8554-
* <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
8555-
*/
8556-
DryRun?: boolean;
8557-
}
8558-
85598573
/**
85608574
* @internal
85618575
*/

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

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,30 @@ import {
162162
VolumeModification,
163163
} from "./models_5";
164164

165+
/**
166+
* @public
167+
*/
168+
export interface ImportClientVpnClientCertificateRevocationListRequest {
169+
/**
170+
* @public
171+
* <p>The ID of the Client VPN endpoint to which the client certificate revocation list applies.</p>
172+
*/
173+
ClientVpnEndpointId: string | undefined;
174+
175+
/**
176+
* @public
177+
* <p>The client certificate revocation list file. For more information, see <a href="https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/cvpn-working-certificates.html#cvpn-working-certificates-generate">Generate a Client Certificate Revocation List</a> in the
178+
* <i>Client VPN Administrator Guide</i>.</p>
179+
*/
180+
CertificateRevocationList: string | undefined;
181+
182+
/**
183+
* @public
184+
* <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
185+
*/
186+
DryRun?: boolean;
187+
}
188+
165189
/**
166190
* @public
167191
*/
@@ -9606,18 +9630,6 @@ export interface ScheduledInstancesMonitoring {
96069630
Enabled?: boolean;
96079631
}
96089632

9609-
/**
9610-
* @public
9611-
* <p>Describes an IPv6 address.</p>
9612-
*/
9613-
export interface ScheduledInstancesIpv6Address {
9614-
/**
9615-
* @public
9616-
* <p>The IPv6 address.</p>
9617-
*/
9618-
Ipv6Address?: string;
9619-
}
9620-
96219633
/**
96229634
* @internal
96239635
*/

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

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,21 @@ import {
1616
InstanceMonitoring,
1717
ScheduledInstancesBlockDeviceMapping,
1818
ScheduledInstancesIamInstanceProfile,
19-
ScheduledInstancesIpv6Address,
2019
ScheduledInstancesMonitoring,
2120
} from "./models_6";
2221

22+
/**
23+
* @public
24+
* <p>Describes an IPv6 address.</p>
25+
*/
26+
export interface ScheduledInstancesIpv6Address {
27+
/**
28+
* @public
29+
* <p>The IPv6 address.</p>
30+
*/
31+
Ipv6Address?: string;
32+
}
33+
2334
/**
2435
* @public
2536
* <p>Describes a private IPv4 address for a Scheduled Instance.</p>

0 commit comments

Comments
 (0)