From 711a8ff4e4db701bc19faa32cf84fb4857679717 Mon Sep 17 00:00:00 2001 From: awstools Date: Wed, 8 May 2024 18:17:01 +0000 Subject: [PATCH] feat(client-ec2): Adding Precision Hardware Clock (PHC) to public API DescribeInstanceTypes --- .../commands/DescribeInstanceTypesCommand.ts | 1 + .../DescribeSpotPriceHistoryCommand.ts | 3 +- .../commands/GetIpamAddressHistoryCommand.ts | 3 +- .../commands/ProvisionIpamByoasnCommand.ts | 3 +- clients/client-ec2/src/models/models_4.ts | 125 +++--------------- clients/client-ec2/src/models/models_5.ts | 121 ++++++++++++++--- clients/client-ec2/src/models/models_6.ts | 30 +++-- clients/client-ec2/src/models/models_7.ts | 12 ++ clients/client-ec2/src/protocols/Aws_ec2.ts | 11 +- codegen/sdk-codegen/aws-models/ec2.json | 25 ++++ 10 files changed, 194 insertions(+), 140 deletions(-) diff --git a/clients/client-ec2/src/commands/DescribeInstanceTypesCommand.ts b/clients/client-ec2/src/commands/DescribeInstanceTypesCommand.ts index e76fb4264442..8dd784e38def 100644 --- a/clients/client-ec2/src/commands/DescribeInstanceTypesCommand.ts +++ b/clients/client-ec2/src/commands/DescribeInstanceTypesCommand.ts @@ -232,6 +232,7 @@ export interface DescribeInstanceTypesCommandOutput extends DescribeInstanceType * // ], * // TotalNeuronDeviceMemoryInMiB: Number("int"), * // }, + * // PhcSupport: "unsupported" || "supported", * // }, * // ], * // NextToken: "STRING_VALUE", diff --git a/clients/client-ec2/src/commands/DescribeSpotPriceHistoryCommand.ts b/clients/client-ec2/src/commands/DescribeSpotPriceHistoryCommand.ts index 1e37cae16308..d11afc52602c 100644 --- a/clients/client-ec2/src/commands/DescribeSpotPriceHistoryCommand.ts +++ b/clients/client-ec2/src/commands/DescribeSpotPriceHistoryCommand.ts @@ -6,8 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client"; import { commonParams } from "../endpoint/EndpointParameters"; -import { DescribeSpotPriceHistoryRequest } from "../models/models_4"; -import { DescribeSpotPriceHistoryResult } from "../models/models_5"; +import { DescribeSpotPriceHistoryRequest, DescribeSpotPriceHistoryResult } from "../models/models_5"; import { de_DescribeSpotPriceHistoryCommand, se_DescribeSpotPriceHistoryCommand } from "../protocols/Aws_ec2"; /** diff --git a/clients/client-ec2/src/commands/GetIpamAddressHistoryCommand.ts b/clients/client-ec2/src/commands/GetIpamAddressHistoryCommand.ts index 930f6ff078bb..41da46041e80 100644 --- a/clients/client-ec2/src/commands/GetIpamAddressHistoryCommand.ts +++ b/clients/client-ec2/src/commands/GetIpamAddressHistoryCommand.ts @@ -6,7 +6,8 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client"; import { commonParams } from "../endpoint/EndpointParameters"; -import { GetIpamAddressHistoryRequest, GetIpamAddressHistoryResult } from "../models/models_5"; +import { GetIpamAddressHistoryRequest } from "../models/models_5"; +import { GetIpamAddressHistoryResult } from "../models/models_6"; import { de_GetIpamAddressHistoryCommand, se_GetIpamAddressHistoryCommand } from "../protocols/Aws_ec2"; /** diff --git a/clients/client-ec2/src/commands/ProvisionIpamByoasnCommand.ts b/clients/client-ec2/src/commands/ProvisionIpamByoasnCommand.ts index 6fd76fa635c1..5227a1fb3cba 100644 --- a/clients/client-ec2/src/commands/ProvisionIpamByoasnCommand.ts +++ b/clients/client-ec2/src/commands/ProvisionIpamByoasnCommand.ts @@ -6,7 +6,8 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client"; import { commonParams } from "../endpoint/EndpointParameters"; -import { ProvisionIpamByoasnRequest, ProvisionIpamByoasnResult } from "../models/models_6"; +import { ProvisionIpamByoasnRequest } from "../models/models_6"; +import { ProvisionIpamByoasnResult } from "../models/models_7"; import { de_ProvisionIpamByoasnCommand, se_ProvisionIpamByoasnCommand } from "../protocols/Aws_ec2"; /** diff --git a/clients/client-ec2/src/models/models_4.ts b/clients/client-ec2/src/models/models_4.ts index 33e13f533ca1..1ad5c2a991bb 100644 --- a/clients/client-ec2/src/models/models_4.ts +++ b/clients/client-ec2/src/models/models_4.ts @@ -4475,6 +4475,20 @@ export const NitroTpmSupport = { */ export type NitroTpmSupport = (typeof NitroTpmSupport)[keyof typeof NitroTpmSupport]; +/** + * @public + * @enum + */ +export const PhcSupport = { + SUPPORTED: "supported", + UNSUPPORTED: "unsupported", +} as const; + +/** + * @public + */ +export type PhcSupport = (typeof PhcSupport)[keyof typeof PhcSupport]; + /** * @public * @enum @@ -4826,6 +4840,13 @@ export interface InstanceTypeInfo { * @public */ NeuronInfo?: NeuronInfo; + + /** + *

Indicates whether a local Precision Time Protocol (PTP) hardware clock (PHC) is + * supported.

+ * @public + */ + PhcSupport?: PhcSupport; } /** @@ -12638,110 +12659,6 @@ export interface DescribeSpotInstanceRequestsResult { NextToken?: string; } -/** - *

Contains the parameters for DescribeSpotPriceHistory.

- * @public - */ -export interface DescribeSpotPriceHistoryRequest { - /** - *

The filters.

- * - * @public - */ - Filters?: Filter[]; - - /** - *

Filters the results by the specified Availability Zone.

- * @public - */ - AvailabilityZone?: string; - - /** - *

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 DryRunOperation. Otherwise, it is - * UnauthorizedOperation.

- * @public - */ - DryRun?: boolean; - - /** - *

The date and time, up to the current date, from which to stop retrieving the price - * history data, in UTC format (for example, - * YYYY-MM-DDTHH:MM:SSZ).

- * @public - */ - EndTime?: Date; - - /** - *

Filters the results by the specified instance types.

- * @public - */ - InstanceTypes?: _InstanceType[]; - - /** - *

The maximum number of items to return for this request. - * To get the next page of items, make another request with the token returned in the output. - * For more information, see Pagination.

- * @public - */ - MaxResults?: number; - - /** - *

The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.

- * @public - */ - NextToken?: string; - - /** - *

Filters the results by the specified basic product descriptions.

- * @public - */ - ProductDescriptions?: string[]; - - /** - *

The date and time, up to the past 90 days, from which to start retrieving the price - * history data, in UTC format (for example, - * YYYY-MM-DDTHH:MM:SSZ).

- * @public - */ - StartTime?: Date; -} - /** * @internal */ diff --git a/clients/client-ec2/src/models/models_5.ts b/clients/client-ec2/src/models/models_5.ts index 4c9d49ad8f6f..7a2c3ba213bb 100644 --- a/clients/client-ec2/src/models/models_5.ts +++ b/clients/client-ec2/src/models/models_5.ts @@ -92,6 +92,110 @@ import { RIProductDescription, } from "./models_4"; +/** + *

Contains the parameters for DescribeSpotPriceHistory.

+ * @public + */ +export interface DescribeSpotPriceHistoryRequest { + /** + *

The filters.

+ * + * @public + */ + Filters?: Filter[]; + + /** + *

Filters the results by the specified Availability Zone.

+ * @public + */ + AvailabilityZone?: string; + + /** + *

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 DryRunOperation. Otherwise, it is + * UnauthorizedOperation.

+ * @public + */ + DryRun?: boolean; + + /** + *

The date and time, up to the current date, from which to stop retrieving the price + * history data, in UTC format (for example, + * YYYY-MM-DDTHH:MM:SSZ).

+ * @public + */ + EndTime?: Date; + + /** + *

Filters the results by the specified instance types.

+ * @public + */ + InstanceTypes?: _InstanceType[]; + + /** + *

The maximum number of items to return for this request. + * To get the next page of items, make another request with the token returned in the output. + * For more information, see Pagination.

+ * @public + */ + MaxResults?: number; + + /** + *

The token returned from a previous paginated request. Pagination continues from the end of the items returned by the previous request.

+ * @public + */ + NextToken?: string; + + /** + *

Filters the results by the specified basic product descriptions.

+ * @public + */ + ProductDescriptions?: string[]; + + /** + *

The date and time, up to the past 90 days, from which to start retrieving the price + * history data, in UTC format (for example, + * YYYY-MM-DDTHH:MM:SSZ).

+ * @public + */ + StartTime?: Date; +} + /** *

The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend * using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.

@@ -8676,23 +8780,6 @@ export interface IpamAddressHistoryRecord { SampledEndTime?: Date; } -/** - * @public - */ -export interface GetIpamAddressHistoryResult { - /** - *

A historical record for a CIDR within an IPAM scope. If the CIDR is associated with an EC2 instance, you will see an object in the response for the instance and one for the network interface.

- * @public - */ - HistoryRecords?: IpamAddressHistoryRecord[]; - - /** - *

The token to use to retrieve the next page of results. This value is null when there are no more results to return.

- * @public - */ - NextToken?: string; -} - /** * @internal */ diff --git a/clients/client-ec2/src/models/models_6.ts b/clients/client-ec2/src/models/models_6.ts index ad5a44aee9f0..b9be04da6c7a 100644 --- a/clients/client-ec2/src/models/models_6.ts +++ b/clients/client-ec2/src/models/models_6.ts @@ -110,7 +110,6 @@ import { import { ArchitectureValues, BootModeValues, - Byoasn, ConversionTask, ConversionTaskFilterSensitiveLog, Filter, @@ -150,6 +149,7 @@ import { import { InstanceFamilyCreditSpecification, + IpamAddressHistoryRecord, IpamComplianceStatus, IpamOverlapStatus, SnapshotBlockPublicAccessState, @@ -159,6 +159,23 @@ import { VolumeModification, } from "./models_5"; +/** + * @public + */ +export interface GetIpamAddressHistoryResult { + /** + *

A historical record for a CIDR within an IPAM scope. If the CIDR is associated with an EC2 instance, you will see an object in the response for the instance and one for the network interface.

+ * @public + */ + HistoryRecords?: IpamAddressHistoryRecord[]; + + /** + *

The token to use to retrieve the next page of results. This value is null when there are no more results to return.

+ * @public + */ + NextToken?: string; +} + /** * @public */ @@ -9556,17 +9573,6 @@ export interface ProvisionIpamByoasnRequest { AsnAuthorizationContext: AsnAuthorizationContext | undefined; } -/** - * @public - */ -export interface ProvisionIpamByoasnResult { - /** - *

An ASN and BYOIP CIDR association.

- * @public - */ - Byoasn?: Byoasn; -} - /** * @internal */ diff --git a/clients/client-ec2/src/models/models_7.ts b/clients/client-ec2/src/models/models_7.ts index 3fa55e8181b7..7afbd3dbc3d9 100644 --- a/clients/client-ec2/src/models/models_7.ts +++ b/clients/client-ec2/src/models/models_7.ts @@ -47,6 +47,7 @@ import { SnapshotState, SSEType, TransitGatewayRoute } from "./models_2"; import { ArchitectureValues, BootModeValues, + Byoasn, ClientVpnConnectionStatus, Filter, ImdsSupportValues, @@ -81,6 +82,17 @@ import { Purchase } from "./models_5"; import { CapacityReservationSpecification, InstanceMonitoring, Status } from "./models_6"; +/** + * @public + */ +export interface ProvisionIpamByoasnResult { + /** + *

An ASN and BYOIP CIDR association.

+ * @public + */ + Byoasn?: Byoasn; +} + /** *

A signed document that proves that you are authorized to bring the specified IP address range to Amazon using BYOIP.

* @public diff --git a/clients/client-ec2/src/protocols/Aws_ec2.ts b/clients/client-ec2/src/protocols/Aws_ec2.ts index d3bf2b1e20c6..4ffecf27c4db 100644 --- a/clients/client-ec2/src/protocols/Aws_ec2.ts +++ b/clients/client-ec2/src/protocols/Aws_ec2.ts @@ -3245,7 +3245,6 @@ import { DescribeSpotFleetRequestsResponse, DescribeSpotInstanceRequestsRequest, DescribeSpotInstanceRequestsResult, - DescribeSpotPriceHistoryRequest, DiskInfo, EbsInfo, EbsInstanceBlockDevice, @@ -3373,6 +3372,7 @@ import { CoipAddressUsage, DataQuery, DataResponse, + DescribeSpotPriceHistoryRequest, DescribeSpotPriceHistoryResult, DescribeStaleSecurityGroupsRequest, DescribeStaleSecurityGroupsResult, @@ -3611,7 +3611,6 @@ import { GetInstanceUefiDataRequest, GetInstanceUefiDataResult, GetIpamAddressHistoryRequest, - GetIpamAddressHistoryResult, InstanceEventWindowDisassociationRequest, InstanceFamilyCreditSpecification, InstanceMetadataDefaultsResponse, @@ -3659,6 +3658,7 @@ import { DiskImageDetail, DnsServersOptionsModifyStructure, EbsInstanceBlockDeviceSpecification, + GetIpamAddressHistoryResult, GetIpamDiscoveredAccountsRequest, GetIpamDiscoveredAccountsResult, GetIpamDiscoveredPublicAddressesRequest, @@ -3899,7 +3899,6 @@ import { ProvisionByoipCidrRequest, ProvisionByoipCidrResult, ProvisionIpamByoasnRequest, - ProvisionIpamByoasnResult, RemoveIpamOperatingRegion, RemovePrefixListEntry, ReservationValue, @@ -3946,6 +3945,7 @@ import { LaunchTemplateSpecification, LicenseConfigurationRequest, PrivateDnsNameOptionsRequest, + ProvisionIpamByoasnResult, ProvisionIpamPoolCidrRequest, ProvisionIpamPoolCidrResult, ProvisionPublicIpv4PoolCidrRequest, @@ -70280,6 +70280,9 @@ const de_InstanceTypeInfo = (output: any, context: __SerdeContext): InstanceType if (output[_nIeu] != null) { contents[_NIeu] = de_NeuronInfo(output[_nIeu], context); } + if (output[_pSh] != null) { + contents[_PSh] = __expectString(output[_pSh]); + } return contents; }; @@ -85620,6 +85623,7 @@ const _PSK = "PreSharedKey"; const _PSKU = "PublicSigningKeyUrl"; const _PSe = "PeeringStatus"; const _PSer = "PermissionState"; +const _PSh = "PhcSupport"; const _PSr = "PreviousState"; const _PSre = "PreviousStatus"; const _PT = "PurchaseToken"; @@ -87408,6 +87412,7 @@ const _pSK = "preSharedKey"; const _pSKU = "publicSigningKeyUrl"; const _pSe = "permissionState"; const _pSee = "peeringStatus"; +const _pSh = "phcSupport"; const _pSr = "principalSet"; const _pSre = "previousStatus"; const _pSri = "priceSchedules"; diff --git a/codegen/sdk-codegen/aws-models/ec2.json b/codegen/sdk-codegen/aws-models/ec2.json index 1a9b61da4c24..29facfc600b6 100644 --- a/codegen/sdk-codegen/aws-models/ec2.json +++ b/codegen/sdk-codegen/aws-models/ec2.json @@ -66166,6 +66166,14 @@ "smithy.api#documentation": "

Describes the Neuron accelerator settings for the instance type.

", "smithy.api#xmlName": "neuronInfo" } + }, + "PhcSupport": { + "target": "com.amazonaws.ec2#PhcSupport", + "traits": { + "aws.protocols#ec2QueryName": "PhcSupport", + "smithy.api#documentation": "

Indicates whether a local Precision Time Protocol (PTP) hardware clock (PHC) is\n supported.

", + "smithy.api#xmlName": "phcSupport" + } } }, "traits": { @@ -83314,6 +83322,23 @@ "smithy.api#documentation": "

Specifies the integrity algorithm for the VPN tunnel for phase 2 IKE\n negotiations.

" } }, + "com.amazonaws.ec2#PhcSupport": { + "type": "enum", + "members": { + "UNSUPPORTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "unsupported" + } + }, + "SUPPORTED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "supported" + } + } + } + }, "com.amazonaws.ec2#Placement": { "type": "structure", "members": {