Skip to content

Commit

Permalink
feat(client-ec2): The DeleteKeyPair API has been updated to return th…
Browse files Browse the repository at this point in the history
…e keyPairId when an existing key pair is deleted.
  • Loading branch information
awstools committed Aug 21, 2023
1 parent 5df57f8 commit 5009701
Show file tree
Hide file tree
Showing 11 changed files with 187 additions and 122 deletions.
9 changes: 6 additions & 3 deletions clients/client-ec2/src/commands/DeleteKeyPairCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
} from "@smithy/types";

import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
import { DeleteKeyPairRequest } from "../models/models_2";
import { DeleteKeyPairRequest, DeleteKeyPairResult } from "../models/models_2";
import { de_DeleteKeyPairCommand, se_DeleteKeyPairCommand } from "../protocols/Aws_ec2";

/**
Expand All @@ -32,7 +32,7 @@ export interface DeleteKeyPairCommandInput extends DeleteKeyPairRequest {}
*
* The output of {@link DeleteKeyPairCommand}.
*/
export interface DeleteKeyPairCommandOutput extends __MetadataBearer {}
export interface DeleteKeyPairCommandOutput extends DeleteKeyPairResult, __MetadataBearer {}

/**
* @public
Expand All @@ -50,7 +50,10 @@ export interface DeleteKeyPairCommandOutput extends __MetadataBearer {}
* };
* const command = new DeleteKeyPairCommand(input);
* const response = await client.send(command);
* // {};
* // { // DeleteKeyPairResult
* // Return: true || false,
* // KeyPairId: "STRING_VALUE",
* // };
*
* ```
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ import {
} from "@smithy/types";

import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
import { DescribeVerifiedAccessInstanceLoggingConfigurationsRequest } from "../models/models_4";
import { DescribeVerifiedAccessInstanceLoggingConfigurationsResult } from "../models/models_5";
import {
DescribeVerifiedAccessInstanceLoggingConfigurationsRequest,
DescribeVerifiedAccessInstanceLoggingConfigurationsResult,
} from "../models/models_5";
import {
de_DescribeVerifiedAccessInstanceLoggingConfigurationsCommand,
se_DescribeVerifiedAccessInstanceLoggingConfigurationsCommand,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ import {
} from "@smithy/types";

import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client";
import { ImportClientVpnClientCertificateRevocationListRequest } from "../models/models_5";
import { ImportClientVpnClientCertificateRevocationListResult } from "../models/models_6";
import {
ImportClientVpnClientCertificateRevocationListRequest,
ImportClientVpnClientCertificateRevocationListResult,
} from "../models/models_6";
import {
de_ImportClientVpnClientCertificateRevocationListCommand,
se_ImportClientVpnClientCertificateRevocationListCommand,
Expand Down
33 changes: 17 additions & 16 deletions clients/client-ec2/src/models/models_2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7982,6 +7982,23 @@ export interface DeleteKeyPairRequest {
DryRun?: boolean;
}

/**
* @public
*/
export interface DeleteKeyPairResult {
/**
* @public
* <p>Is <code>true</code> if the request succeeds, and an error otherwise.</p>
*/
Return?: boolean;

/**
* @public
* <p>The ID of the key pair.</p>
*/
KeyPairId?: string;
}

/**
* @public
*/
Expand Down Expand Up @@ -8664,22 +8681,6 @@ export interface DeleteQueuedReservedInstancesRequest {
ReservedInstancesIds: string[] | undefined;
}

/**
* @public
* @enum
*/
export const DeleteQueuedReservedInstancesErrorCode = {
RESERVED_INSTANCES_ID_INVALID: "reserved-instances-id-invalid",
RESERVED_INSTANCES_NOT_IN_QUEUED_STATE: "reserved-instances-not-in-queued-state",
UNEXPECTED_ERROR: "unexpected-error",
} as const;

/**
* @public
*/
export type DeleteQueuedReservedInstancesErrorCode =
(typeof DeleteQueuedReservedInstancesErrorCode)[keyof typeof DeleteQueuedReservedInstancesErrorCode];

/**
* @internal
*/
Expand Down
33 changes: 16 additions & 17 deletions clients/client-ec2/src/models/models_3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ import {
TransportProtocol,
} from "./models_1";
import {
DeleteQueuedReservedInstancesErrorCode,
FleetStateCode,
SubnetCidrReservation,
TransitGateway,
Expand All @@ -91,6 +90,22 @@ import {
VerifiedAccessGroup,
} from "./models_2";

/**
* @public
* @enum
*/
export const DeleteQueuedReservedInstancesErrorCode = {
RESERVED_INSTANCES_ID_INVALID: "reserved-instances-id-invalid",
RESERVED_INSTANCES_NOT_IN_QUEUED_STATE: "reserved-instances-not-in-queued-state",
UNEXPECTED_ERROR: "unexpected-error",
} as const;

/**
* @public
*/
export type DeleteQueuedReservedInstancesErrorCode =
(typeof DeleteQueuedReservedInstancesErrorCode)[keyof typeof DeleteQueuedReservedInstancesErrorCode];

/**
* @public
* <p>Describes the error for a Reserved Instance whose queued purchase could not be deleted.</p>
Expand Down Expand Up @@ -10251,22 +10266,6 @@ export interface ElasticInferenceAcceleratorAssociation {
ElasticInferenceAcceleratorAssociationTime?: Date;
}

/**
* @public
* <p>Indicates whether your instance is configured for hibernation. This parameter is valid
* only if the instance meets the <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/hibernating-prerequisites.html">hibernation
* prerequisites</a>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html">Hibernate your instance</a> in the
* <i>Amazon EC2 User Guide</i>.</p>
*/
export interface HibernationOptions {
/**
* @public
* <p>If <code>true</code>, your instance is enabled for hibernation; otherwise, it is not
* enabled for hibernation.</p>
*/
Configured?: boolean;
}

/**
* @internal
*/
Expand Down
55 changes: 16 additions & 39 deletions clients/client-ec2/src/models/models_4.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ import {
EnclaveOptions,
EventInformation,
Filter,
HibernationOptions,
HypervisorType,
IdFormat,
InstanceBlockDeviceMapping,
Expand All @@ -115,6 +114,22 @@ import {
VirtualizationType,
} from "./models_3";

/**
* @public
* <p>Indicates whether your instance is configured for hibernation. This parameter is valid
* only if the instance meets the <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/hibernating-prerequisites.html">hibernation
* prerequisites</a>. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html">Hibernate your instance</a> in the
* <i>Amazon EC2 User Guide</i>.</p>
*/
export interface HibernationOptions {
/**
* @public
* <p>If <code>true</code>, your instance is enabled for hibernation; otherwise, it is not
* enabled for hibernation.</p>
*/
Configured?: boolean;
}

/**
* @public
* @enum
Expand Down Expand Up @@ -12267,44 +12282,6 @@ export interface DescribeVerifiedAccessGroupsResult {
NextToken?: string;
}

/**
* @public
*/
export interface DescribeVerifiedAccessInstanceLoggingConfigurationsRequest {
/**
* @public
* <p>The IDs of the Verified Access instances.</p>
*/
VerifiedAccessInstanceIds?: string[];

/**
* @public
* <p>The maximum number of results to return with a single call.
* To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
*/
MaxResults?: number;

/**
* @public
* <p>The token for the next page of results.</p>
*/
NextToken?: string;

/**
* @public
* <p>One or more filters. Filter names and values are case-sensitive.</p>
*/
Filters?: Filter[];

/**
* @public
* <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>
*/
DryRun?: boolean;
}

/**
* @internal
*/
Expand Down
62 changes: 38 additions & 24 deletions clients/client-ec2/src/models/models_5.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,44 @@ import {
} from "./models_3";
import { AnalysisStatus, ArchitectureType } from "./models_4";

/**
* @public
*/
export interface DescribeVerifiedAccessInstanceLoggingConfigurationsRequest {
/**
* @public
* <p>The IDs of the Verified Access instances.</p>
*/
VerifiedAccessInstanceIds?: string[];

/**
* @public
* <p>The maximum number of results to return with a single call.
* To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
*/
MaxResults?: number;

/**
* @public
* <p>The token for the next page of results.</p>
*/
NextToken?: string;

/**
* @public
* <p>One or more filters. Filter names and values are case-sensitive.</p>
*/
Filters?: Filter[];

/**
* @public
* <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>
*/
DryRun?: boolean;
}

/**
* @public
* @enum
Expand Down Expand Up @@ -8532,30 +8570,6 @@ export interface GetVpnTunnelReplacementStatusResult {
MaintenanceDetails?: MaintenanceDetails;
}

/**
* @public
*/
export interface ImportClientVpnClientCertificateRevocationListRequest {
/**
* @public
* <p>The ID of the Client VPN endpoint to which the client certificate revocation list applies.</p>
*/
ClientVpnEndpointId: string | undefined;

/**
* @public
* <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
* <i>Client VPN Administrator Guide</i>.</p>
*/
CertificateRevocationList: string | undefined;

/**
* @public
* <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>
*/
DryRun?: boolean;
}

/**
* @internal
*/
Expand Down
36 changes: 24 additions & 12 deletions clients/client-ec2/src/models/models_6.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,30 @@ import {
VolumeModification,
} from "./models_5";

/**
* @public
*/
export interface ImportClientVpnClientCertificateRevocationListRequest {
/**
* @public
* <p>The ID of the Client VPN endpoint to which the client certificate revocation list applies.</p>
*/
ClientVpnEndpointId: string | undefined;

/**
* @public
* <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
* <i>Client VPN Administrator Guide</i>.</p>
*/
CertificateRevocationList: string | undefined;

/**
* @public
* <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>
*/
DryRun?: boolean;
}

/**
* @public
*/
Expand Down Expand Up @@ -9606,18 +9630,6 @@ export interface ScheduledInstancesMonitoring {
Enabled?: boolean;
}

/**
* @public
* <p>Describes an IPv6 address.</p>
*/
export interface ScheduledInstancesIpv6Address {
/**
* @public
* <p>The IPv6 address.</p>
*/
Ipv6Address?: string;
}

/**
* @internal
*/
Expand Down
13 changes: 12 additions & 1 deletion clients/client-ec2/src/models/models_7.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,21 @@ import {
InstanceMonitoring,
ScheduledInstancesBlockDeviceMapping,
ScheduledInstancesIamInstanceProfile,
ScheduledInstancesIpv6Address,
ScheduledInstancesMonitoring,
} from "./models_6";

/**
* @public
* <p>Describes an IPv6 address.</p>
*/
export interface ScheduledInstancesIpv6Address {
/**
* @public
* <p>The IPv6 address.</p>
*/
Ipv6Address?: string;
}

/**
* @public
* <p>Describes a private IPv4 address for a Scheduled Instance.</p>
Expand Down
Loading

0 comments on commit 5009701

Please sign in to comment.