From 9c56b9681765258c5449d119a9797acd7a720a64 Mon Sep 17 00:00:00 2001 From: awstools Date: Wed, 20 Nov 2024 19:12:55 +0000 Subject: [PATCH] feat(client-auto-scaling): With this release, customers can prioritize launching instances into ODCRs using targets from ASGs or Launch Templates. Customers can express their baseline instances' CPU-performance in attribute-based Instance Requirements configuration by referencing an instance family that meets their needs. --- .../commands/CreateAutoScalingGroupCommand.ts | 20 + .../DescribeAutoScalingGroupsCommand.ts | 20 + .../DescribeInstanceRefreshesCommand.ts | 9 + .../commands/StartInstanceRefreshCommand.ts | 9 + .../commands/UpdateAutoScalingGroupCommand.ts | 20 + .../src/models/models_0.ts | 224 ++++++++++++ .../src/protocols/Aws_query.ts | 343 +++++++++++++++++- .../sdk-codegen/aws-models/auto-scaling.json | 162 ++++++++- 8 files changed, 787 insertions(+), 20 deletions(-) diff --git a/clients/client-auto-scaling/src/commands/CreateAutoScalingGroupCommand.ts b/clients/client-auto-scaling/src/commands/CreateAutoScalingGroupCommand.ts index 76d7130a106e..0eaaaf52eb03 100644 --- a/clients/client-auto-scaling/src/commands/CreateAutoScalingGroupCommand.ts +++ b/clients/client-auto-scaling/src/commands/CreateAutoScalingGroupCommand.ts @@ -137,6 +137,15 @@ export interface CreateAutoScalingGroupCommandOutput extends __MetadataBearer {} * AllowedInstanceTypes: [ // AllowedInstanceTypes * "STRING_VALUE", * ], + * BaselinePerformanceFactors: { // BaselinePerformanceFactorsRequest + * Cpu: { // CpuPerformanceFactorRequest + * References: [ // PerformanceFactorReferenceSetRequest + * { // PerformanceFactorReferenceRequest + * InstanceFamily: "STRING_VALUE", + * }, + * ], + * }, + * }, * }, * }, * ], @@ -216,6 +225,17 @@ export interface CreateAutoScalingGroupCommandOutput extends __MetadataBearer {} * ImpairedZoneHealthCheckBehavior: "ReplaceUnhealthy" || "IgnoreUnhealthy", * }, * SkipZonalShiftValidation: true || false, + * CapacityReservationSpecification: { // CapacityReservationSpecification + * CapacityReservationPreference: "capacity-reservations-only" || "capacity-reservations-first" || "none" || "default", + * CapacityReservationTarget: { // CapacityReservationTarget + * CapacityReservationIds: [ // CapacityReservationIds + * "STRING_VALUE", + * ], + * CapacityReservationResourceGroupArns: [ // CapacityReservationResourceGroupArns + * "STRING_VALUE", + * ], + * }, + * }, * }; * const command = new CreateAutoScalingGroupCommand(input); * const response = await client.send(command); diff --git a/clients/client-auto-scaling/src/commands/DescribeAutoScalingGroupsCommand.ts b/clients/client-auto-scaling/src/commands/DescribeAutoScalingGroupsCommand.ts index 706d439beb8c..bde484834420 100644 --- a/clients/client-auto-scaling/src/commands/DescribeAutoScalingGroupsCommand.ts +++ b/clients/client-auto-scaling/src/commands/DescribeAutoScalingGroupsCommand.ts @@ -150,6 +150,15 @@ export interface DescribeAutoScalingGroupsCommandOutput extends AutoScalingGroup * // AllowedInstanceTypes: [ // AllowedInstanceTypes * // "STRING_VALUE", * // ], + * // BaselinePerformanceFactors: { // BaselinePerformanceFactorsRequest + * // Cpu: { // CpuPerformanceFactorRequest + * // References: [ // PerformanceFactorReferenceSetRequest + * // { // PerformanceFactorReferenceRequest + * // InstanceFamily: "STRING_VALUE", + * // }, + * // ], + * // }, + * // }, * // }, * // }, * // ], @@ -254,6 +263,17 @@ export interface DescribeAutoScalingGroupsCommandOutput extends AutoScalingGroup * // ZonalShiftEnabled: true || false, * // ImpairedZoneHealthCheckBehavior: "ReplaceUnhealthy" || "IgnoreUnhealthy", * // }, + * // CapacityReservationSpecification: { // CapacityReservationSpecification + * // CapacityReservationPreference: "capacity-reservations-only" || "capacity-reservations-first" || "none" || "default", + * // CapacityReservationTarget: { // CapacityReservationTarget + * // CapacityReservationIds: [ // CapacityReservationIds + * // "STRING_VALUE", + * // ], + * // CapacityReservationResourceGroupArns: [ // CapacityReservationResourceGroupArns + * // "STRING_VALUE", + * // ], + * // }, + * // }, * // }, * // ], * // NextToken: "STRING_VALUE", diff --git a/clients/client-auto-scaling/src/commands/DescribeInstanceRefreshesCommand.ts b/clients/client-auto-scaling/src/commands/DescribeInstanceRefreshesCommand.ts index a6b87279f06a..f143550b5a41 100644 --- a/clients/client-auto-scaling/src/commands/DescribeInstanceRefreshesCommand.ts +++ b/clients/client-auto-scaling/src/commands/DescribeInstanceRefreshesCommand.ts @@ -181,6 +181,15 @@ export interface DescribeInstanceRefreshesCommandOutput extends DescribeInstance * // AllowedInstanceTypes: [ // AllowedInstanceTypes * // "STRING_VALUE", * // ], + * // BaselinePerformanceFactors: { // BaselinePerformanceFactorsRequest + * // Cpu: { // CpuPerformanceFactorRequest + * // References: [ // PerformanceFactorReferenceSetRequest + * // { // PerformanceFactorReferenceRequest + * // InstanceFamily: "STRING_VALUE", + * // }, + * // ], + * // }, + * // }, * // }, * // }, * // ], diff --git a/clients/client-auto-scaling/src/commands/StartInstanceRefreshCommand.ts b/clients/client-auto-scaling/src/commands/StartInstanceRefreshCommand.ts index 8378227bd35d..c9114af86e4a 100644 --- a/clients/client-auto-scaling/src/commands/StartInstanceRefreshCommand.ts +++ b/clients/client-auto-scaling/src/commands/StartInstanceRefreshCommand.ts @@ -146,6 +146,15 @@ export interface StartInstanceRefreshCommandOutput extends StartInstanceRefreshA * AllowedInstanceTypes: [ // AllowedInstanceTypes * "STRING_VALUE", * ], + * BaselinePerformanceFactors: { // BaselinePerformanceFactorsRequest + * Cpu: { // CpuPerformanceFactorRequest + * References: [ // PerformanceFactorReferenceSetRequest + * { // PerformanceFactorReferenceRequest + * InstanceFamily: "STRING_VALUE", + * }, + * ], + * }, + * }, * }, * }, * ], diff --git a/clients/client-auto-scaling/src/commands/UpdateAutoScalingGroupCommand.ts b/clients/client-auto-scaling/src/commands/UpdateAutoScalingGroupCommand.ts index d03cfd5f49f3..27aed3d70574 100644 --- a/clients/client-auto-scaling/src/commands/UpdateAutoScalingGroupCommand.ts +++ b/clients/client-auto-scaling/src/commands/UpdateAutoScalingGroupCommand.ts @@ -166,6 +166,15 @@ export interface UpdateAutoScalingGroupCommandOutput extends __MetadataBearer {} * AllowedInstanceTypes: [ // AllowedInstanceTypes * "STRING_VALUE", * ], + * BaselinePerformanceFactors: { // BaselinePerformanceFactorsRequest + * Cpu: { // CpuPerformanceFactorRequest + * References: [ // PerformanceFactorReferenceSetRequest + * { // PerformanceFactorReferenceRequest + * InstanceFamily: "STRING_VALUE", + * }, + * ], + * }, + * }, * }, * }, * ], @@ -212,6 +221,17 @@ export interface UpdateAutoScalingGroupCommandOutput extends __MetadataBearer {} * ImpairedZoneHealthCheckBehavior: "ReplaceUnhealthy" || "IgnoreUnhealthy", * }, * SkipZonalShiftValidation: true || false, + * CapacityReservationSpecification: { // CapacityReservationSpecification + * CapacityReservationPreference: "capacity-reservations-only" || "capacity-reservations-first" || "none" || "default", + * CapacityReservationTarget: { // CapacityReservationTarget + * CapacityReservationIds: [ // CapacityReservationIds + * "STRING_VALUE", + * ], + * CapacityReservationResourceGroupArns: [ // CapacityReservationResourceGroupArns + * "STRING_VALUE", + * ], + * }, + * }, * }; * const command = new UpdateAutoScalingGroupCommand(input); * const response = await client.send(command); diff --git a/clients/client-auto-scaling/src/models/models_0.ts b/clients/client-auto-scaling/src/models/models_0.ts index ff46f6947f8c..dc79bd35cb7e 100644 --- a/clients/client-auto-scaling/src/models/models_0.ts +++ b/clients/client-auto-scaling/src/models/models_0.ts @@ -835,6 +835,89 @@ export interface AvailabilityZoneImpairmentPolicy { ImpairedZoneHealthCheckBehavior?: ImpairedZoneHealthCheckBehavior | undefined; } +/** + * @public + * @enum + */ +export const CapacityReservationPreference = { + CapacityReservationsFirst: "capacity-reservations-first", + CapacityReservationsOnly: "capacity-reservations-only", + Default: "default", + None: "none", +} as const; + +/** + * @public + */ +export type CapacityReservationPreference = + (typeof CapacityReservationPreference)[keyof typeof CapacityReservationPreference]; + +/** + *

+ * The target for the Capacity Reservation. Specify Capacity Reservations IDs or Capacity Reservation resource group ARNs. + *

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

+ * The Capacity Reservation IDs to launch instances into. + *

+ * @public + */ + CapacityReservationIds?: string[] | undefined; + + /** + *

+ * The resource group ARNs of the Capacity Reservation to launch instances into. + *

+ * @public + */ + CapacityReservationResourceGroupArns?: string[] | undefined; +} + +/** + *

+ * Describes the Capacity Reservation preference and targeting options. If you specify open or none for CapacityReservationPreference, do not specify a CapacityReservationTarget. + *

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

+ * The capacity reservation preference. The following options are available: + *

+ * + * @public + */ + CapacityReservationPreference?: CapacityReservationPreference | undefined; + + /** + *

+ * Describes a target Capacity Reservation or Capacity Reservation resource group. + *

+ * @public + */ + CapacityReservationTarget?: CapacityReservationTarget | undefined; +} + /** *

Describes an instance maintenance policy.

*

For more information, see Set instance maintenance policy in the @@ -1139,6 +1222,115 @@ export interface BaselineEbsBandwidthMbpsRequest { Max?: number | undefined; } +/** + *

+ * Specify an instance family to use as the baseline reference for CPU performance. All instance types that All instance types that match your specified attributes will be compared against the CPU performance of the + * referenced instance family, regardless of CPU manufacturer or architecture differences. + *

+ * + *

Currently only one instance family can be specified in the list.

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

+ * The instance family to use as a baseline reference. + *

+ * + *

Make sure that you specify the correct value for the instance family. The instance family is everything before the period (.) in the instance type name. For example, in the instance c6i.large, the + * instance family is c6i, not c6. For more information, see Amazon EC2 instance type naming conventions in + * Amazon EC2 Instance Types.

+ *
+ *

The following instance types are not supported for performance protection.

+ * + *

If you performance protection by specifying a supported instance family, the returned instance types will exclude the preceding unsupported instance families.

+ *

If you specify an unsupported instance family as a value for baseline performance, the API returns an empty response.

+ * @public + */ + InstanceFamily?: string | undefined; +} + +/** + *

+ * The CPU performance to consider, using an instance family as the baseline reference. + *

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

+ * Specify an instance family to use as the baseline reference for CPU performance. All instance types that match your specified attributes will be compared against the CPU performance of the + * referenced instance family, regardless of CPU manufacturer or architecture differences. + *

+ * + *

Currently only one instance family can be specified in the list.

+ *
+ * @public + */ + References?: PerformanceFactorReferenceRequest[] | undefined; +} + +/** + *

+ * The baseline performance to consider, using an instance family as a baseline reference. The instance family establishes the lowest acceptable level of performance. Auto Scaling uses + * this baseline to guide instance type selection, but there is no guarantee that the selected instance types will always exceed the baseline for every application. + *

+ *

Currently, this parameter only supports CPU performance as a baseline performance factor. For example, specifying c6i uses the CPU performance of the c6i + * family as the baseline reference.

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

+ * The CPU performance to consider, using an instance family as the baseline reference. + *

+ * @public + */ + Cpu?: CpuPerformanceFactorRequest | undefined; +} + /** * @public * @enum @@ -1718,6 +1910,14 @@ export interface InstanceRequirements { * @public */ AllowedInstanceTypes?: string[] | undefined; + + /** + *

+ * The baseline performance factors for the instance requirements. + *

+ * @public + */ + BaselinePerformanceFactors?: BaselinePerformanceFactorsRequest | undefined; } /** @@ -2217,6 +2417,14 @@ export interface CreateAutoScalingGroupType { * @public */ SkipZonalShiftValidation?: boolean | undefined; + + /** + *

+ * The capacity reservation specification for the Auto Scaling group. + *

+ * @public + */ + CapacityReservationSpecification?: CapacityReservationSpecification | undefined; } /** @@ -3611,6 +3819,14 @@ export interface AutoScalingGroup { * @public */ AvailabilityZoneImpairmentPolicy?: AvailabilityZoneImpairmentPolicy | undefined; + + /** + *

+ * The capacity reservation specification. + *

+ * @public + */ + CapacityReservationSpecification?: CapacityReservationSpecification | undefined; } /** @@ -8396,4 +8612,12 @@ export interface UpdateAutoScalingGroupType { * @public */ SkipZonalShiftValidation?: boolean | undefined; + + /** + *

+ * The capacity reservation specification for the Auto Scaling group. + *

+ * @public + */ + CapacityReservationSpecification?: CapacityReservationSpecification | undefined; } diff --git a/clients/client-auto-scaling/src/protocols/Aws_query.ts b/clients/client-auto-scaling/src/protocols/Aws_query.ts index c41b97d6ac32..6b8a9341b6fd 100644 --- a/clients/client-auto-scaling/src/protocols/Aws_query.ts +++ b/clients/client-auto-scaling/src/protocols/Aws_query.ts @@ -256,6 +256,7 @@ import { AvailabilityZoneDistribution, AvailabilityZoneImpairmentPolicy, BaselineEbsBandwidthMbpsRequest, + BaselinePerformanceFactorsRequest, BatchDeleteScheduledActionAnswer, BatchDeleteScheduledActionType, BatchPutScheduledUpdateGroupActionAnswer, @@ -264,9 +265,12 @@ import { CancelInstanceRefreshAnswer, CancelInstanceRefreshType, CapacityForecast, + CapacityReservationSpecification, + CapacityReservationTarget, CompleteLifecycleActionAnswer, CompleteLifecycleActionType, CpuManufacturer, + CpuPerformanceFactorRequest, CreateAutoScalingGroupType, CreateLaunchConfigurationType, CreateOrUpdateTagsType, @@ -368,6 +372,7 @@ import { NetworkBandwidthGbpsRequest, NetworkInterfaceCountRequest, NotificationConfiguration, + PerformanceFactorReferenceRequest, PoliciesType, PolicyARNType, PredefinedMetricSpecification, @@ -3308,6 +3313,24 @@ const se_BaselineEbsBandwidthMbpsRequest = (input: BaselineEbsBandwidthMbpsReque return entries; }; +/** + * serializeAws_queryBaselinePerformanceFactorsRequest + */ +const se_BaselinePerformanceFactorsRequest = ( + input: BaselinePerformanceFactorsRequest, + context: __SerdeContext +): any => { + const entries: any = {}; + if (input[_C] != null) { + const memberEntries = se_CpuPerformanceFactorRequest(input[_C], context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Cpu.${key}`; + entries[loc] = value; + }); + } + return entries; +}; + /** * serializeAws_queryBatchDeleteScheduledActionType */ @@ -3407,6 +3430,84 @@ const se_CancelInstanceRefreshType = (input: CancelInstanceRefreshType, context: return entries; }; +/** + * serializeAws_queryCapacityReservationIds + */ +const se_CapacityReservationIds = (input: string[], context: __SerdeContext): any => { + const entries: any = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; + } + entries[`member.${counter}`] = entry; + counter++; + } + return entries; +}; + +/** + * serializeAws_queryCapacityReservationResourceGroupArns + */ +const se_CapacityReservationResourceGroupArns = (input: string[], context: __SerdeContext): any => { + const entries: any = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; + } + entries[`member.${counter}`] = entry; + counter++; + } + return entries; +}; + +/** + * serializeAws_queryCapacityReservationSpecification + */ +const se_CapacityReservationSpecification = (input: CapacityReservationSpecification, context: __SerdeContext): any => { + const entries: any = {}; + if (input[_CRP] != null) { + entries[_CRP] = input[_CRP]; + } + if (input[_CRT] != null) { + const memberEntries = se_CapacityReservationTarget(input[_CRT], context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `CapacityReservationTarget.${key}`; + entries[loc] = value; + }); + } + return entries; +}; + +/** + * serializeAws_queryCapacityReservationTarget + */ +const se_CapacityReservationTarget = (input: CapacityReservationTarget, context: __SerdeContext): any => { + const entries: any = {}; + if (input[_CRI] != null) { + const memberEntries = se_CapacityReservationIds(input[_CRI], context); + if (input[_CRI]?.length === 0) { + entries.CapacityReservationIds = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `CapacityReservationIds.${key}`; + entries[loc] = value; + }); + } + if (input[_CRRGA] != null) { + const memberEntries = se_CapacityReservationResourceGroupArns(input[_CRRGA], context); + if (input[_CRRGA]?.length === 0) { + entries.CapacityReservationResourceGroupArns = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `CapacityReservationResourceGroupArns.${key}`; + entries[loc] = value; + }); + } + return entries; +}; + /** * serializeAws_queryCheckpointPercentages */ @@ -3478,6 +3579,24 @@ const se_CpuManufacturers = (input: CpuManufacturer[], context: __SerdeContext): return entries; }; +/** + * serializeAws_queryCpuPerformanceFactorRequest + */ +const se_CpuPerformanceFactorRequest = (input: CpuPerformanceFactorRequest, context: __SerdeContext): any => { + const entries: any = {}; + if (input[_R] != null) { + const memberEntries = se_PerformanceFactorReferenceSetRequest(input[_R], context); + if (input[_R]?.length === 0) { + entries.Reference = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Reference.${key}`; + entries[loc] = value; + }); + } + return entries; +}; + /** * serializeAws_queryCreateAutoScalingGroupType */ @@ -3602,8 +3721,8 @@ const se_CreateAutoScalingGroupType = (input: CreateAutoScalingGroupType, contex if (input[_MIL] != null) { entries[_MIL] = input[_MIL]; } - if (input[_C] != null) { - entries[_C] = input[_C]; + if (input[_Co] != null) { + entries[_Co] = input[_Co]; } if (input[_DCT] != null) { entries[_DCT] = input[_DCT]; @@ -3645,6 +3764,13 @@ const se_CreateAutoScalingGroupType = (input: CreateAutoScalingGroupType, contex if (input[_SZSV] != null) { entries[_SZSV] = input[_SZSV]; } + if (input[_CRS] != null) { + const memberEntries = se_CapacityReservationSpecification(input[_CRS], context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `CapacityReservationSpecification.${key}`; + entries[loc] = value; + }); + } return entries; }; @@ -4791,6 +4917,13 @@ const se_InstanceRequirements = (input: InstanceRequirements, context: __SerdeCo entries[loc] = value; }); } + if (input[_BPF] != null) { + const memberEntries = se_BaselinePerformanceFactorsRequest(input[_BPF], context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `BaselinePerformanceFactors.${key}`; + entries[loc] = value; + }); + } return entries; }; @@ -5285,6 +5418,42 @@ const se_Overrides = (input: LaunchTemplateOverrides[], context: __SerdeContext) return entries; }; +/** + * serializeAws_queryPerformanceFactorReferenceRequest + */ +const se_PerformanceFactorReferenceRequest = ( + input: PerformanceFactorReferenceRequest, + context: __SerdeContext +): any => { + const entries: any = {}; + if (input[_IF] != null) { + entries[_IF] = input[_IF]; + } + return entries; +}; + +/** + * serializeAws_queryPerformanceFactorReferenceSetRequest + */ +const se_PerformanceFactorReferenceSetRequest = ( + input: PerformanceFactorReferenceRequest[], + context: __SerdeContext +): any => { + const entries: any = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; + } + const memberEntries = se_PerformanceFactorReferenceRequest(entry, context); + Object.entries(memberEntries).forEach(([key, value]) => { + entries[`item.${counter}.${key}`] = value; + }); + counter++; + } + return entries; +}; + /** * serializeAws_queryPolicyNames */ @@ -5651,8 +5820,8 @@ const se_PutScalingPolicyType = (input: PutScalingPolicyType, context: __SerdeCo if (input[_SA] != null) { entries[_SA] = input[_SA]; } - if (input[_Co] != null) { - entries[_Co] = input[_Co]; + if (input[_Coo] != null) { + entries[_Coo] = input[_Coo]; } if (input[_MAT] != null) { entries[_MAT] = input[_MAT]; @@ -5713,8 +5882,8 @@ const se_PutScheduledUpdateGroupActionType = ( if (input[_ET] != null) { entries[_ET] = __serializeDateTime(input[_ET]); } - if (input[_R] != null) { - entries[_R] = input[_R]; + if (input[_Re] != null) { + entries[_Re] = input[_Re]; } if (input[_MS] != null) { entries[_MS] = input[_MS]; @@ -5898,8 +6067,8 @@ const se_ScheduledUpdateGroupActionRequest = ( if (input[_ET] != null) { entries[_ET] = __serializeDateTime(input[_ET]); } - if (input[_R] != null) { - entries[_R] = input[_R]; + if (input[_Re] != null) { + entries[_Re] = input[_Re]; } if (input[_MS] != null) { entries[_MS] = input[_MS]; @@ -6390,8 +6559,8 @@ const se_UpdateAutoScalingGroupType = (input: UpdateAutoScalingGroupType, contex if (input[_CR] != null) { entries[_CR] = input[_CR]; } - if (input[_C] != null) { - entries[_C] = input[_C]; + if (input[_Co] != null) { + entries[_Co] = input[_Co]; } if (input[_DCT] != null) { entries[_DCT] = input[_DCT]; @@ -6423,6 +6592,13 @@ const se_UpdateAutoScalingGroupType = (input: UpdateAutoScalingGroupType, contex if (input[_SZSV] != null) { entries[_SZSV] = input[_SZSV]; } + if (input[_CRS] != null) { + const memberEntries = se_CapacityReservationSpecification(input[_CRS], context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `CapacityReservationSpecification.${key}`; + entries[loc] = value; + }); + } return entries; }; @@ -6847,8 +7023,8 @@ const de_AutoScalingGroup = (output: any, context: __SerdeContext): AutoScalingG if (output[_WPS] != null) { contents[_WPS] = __strictParseInt32(output[_WPS]) as number; } - if (output[_C] != null) { - contents[_C] = __expectString(output[_C]); + if (output[_Co] != null) { + contents[_Co] = __expectString(output[_Co]); } if (output[_DCT] != null) { contents[_DCT] = __expectString(output[_DCT]); @@ -6870,6 +7046,9 @@ const de_AutoScalingGroup = (output: any, context: __SerdeContext): AutoScalingG if (output[_AZIP] != null) { contents[_AZIP] = de_AvailabilityZoneImpairmentPolicy(output[_AZIP], context); } + if (output[_CRS] != null) { + contents[_CRS] = de_CapacityReservationSpecification(output[_CRS], context); + } return contents; }; @@ -7029,6 +7208,20 @@ const de_BaselineEbsBandwidthMbpsRequest = (output: any, context: __SerdeContext return contents; }; +/** + * deserializeAws_queryBaselinePerformanceFactorsRequest + */ +const de_BaselinePerformanceFactorsRequest = ( + output: any, + context: __SerdeContext +): BaselinePerformanceFactorsRequest => { + const contents: any = {}; + if (output[_C] != null) { + contents[_C] = de_CpuPerformanceFactorRequest(output[_C], context); + } + return contents; +}; + /** * deserializeAws_queryBatchDeleteScheduledActionAnswer */ @@ -7124,6 +7317,63 @@ const de_CapacityForecast = (output: any, context: __SerdeContext): CapacityFore return contents; }; +/** + * deserializeAws_queryCapacityReservationIds + */ +const de_CapacityReservationIds = (output: any, context: __SerdeContext): string[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return __expectString(entry) as any; + }); +}; + +/** + * deserializeAws_queryCapacityReservationResourceGroupArns + */ +const de_CapacityReservationResourceGroupArns = (output: any, context: __SerdeContext): string[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return __expectString(entry) as any; + }); +}; + +/** + * deserializeAws_queryCapacityReservationSpecification + */ +const de_CapacityReservationSpecification = ( + output: any, + context: __SerdeContext +): CapacityReservationSpecification => { + const contents: any = {}; + if (output[_CRP] != null) { + contents[_CRP] = __expectString(output[_CRP]); + } + if (output[_CRT] != null) { + contents[_CRT] = de_CapacityReservationTarget(output[_CRT], context); + } + return contents; +}; + +/** + * deserializeAws_queryCapacityReservationTarget + */ +const de_CapacityReservationTarget = (output: any, context: __SerdeContext): CapacityReservationTarget => { + const contents: any = {}; + if (output.CapacityReservationIds === "") { + contents[_CRI] = []; + } else if (output[_CRI] != null && output[_CRI][_me] != null) { + contents[_CRI] = de_CapacityReservationIds(__getArrayIfSingleItem(output[_CRI][_me]), context); + } + if (output.CapacityReservationResourceGroupArns === "") { + contents[_CRRGA] = []; + } else if (output[_CRRGA] != null && output[_CRRGA][_me] != null) { + contents[_CRRGA] = de_CapacityReservationResourceGroupArns(__getArrayIfSingleItem(output[_CRRGA][_me]), context); + } + return contents; +}; + /** * deserializeAws_queryCheckpointPercentages */ @@ -7165,6 +7415,19 @@ const de_CpuManufacturers = (output: any, context: __SerdeContext): CpuManufactu }); }; +/** + * deserializeAws_queryCpuPerformanceFactorRequest + */ +const de_CpuPerformanceFactorRequest = (output: any, context: __SerdeContext): CpuPerformanceFactorRequest => { + const contents: any = {}; + if (output.Reference === "") { + contents[_R] = []; + } else if (output[_Ref] != null && output[_Ref][_i] != null) { + contents[_R] = de_PerformanceFactorReferenceSetRequest(__getArrayIfSingleItem(output[_Ref][_i]), context); + } + return contents; +}; + /** * deserializeAws_queryCustomizedMetricSpecification */ @@ -7921,6 +8184,9 @@ const de_InstanceRequirements = (output: any, context: __SerdeContext): Instance } else if (output[_AIT] != null && output[_AIT][_me] != null) { contents[_AIT] = de_AllowedInstanceTypes(__getArrayIfSingleItem(output[_AIT][_me]), context); } + if (output[_BPF] != null) { + contents[_BPF] = de_BaselinePerformanceFactorsRequest(output[_BPF], context); + } return contents; }; @@ -8560,6 +8826,34 @@ const de_Overrides = (output: any, context: __SerdeContext): LaunchTemplateOverr }); }; +/** + * deserializeAws_queryPerformanceFactorReferenceRequest + */ +const de_PerformanceFactorReferenceRequest = ( + output: any, + context: __SerdeContext +): PerformanceFactorReferenceRequest => { + const contents: any = {}; + if (output[_IF] != null) { + contents[_IF] = __expectString(output[_IF]); + } + return contents; +}; + +/** + * deserializeAws_queryPerformanceFactorReferenceSetRequest + */ +const de_PerformanceFactorReferenceSetRequest = ( + output: any, + context: __SerdeContext +): PerformanceFactorReferenceRequest[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_PerformanceFactorReferenceRequest(entry, context); + }); +}; + /** * deserializeAws_queryPoliciesType */ @@ -9010,8 +9304,8 @@ const de_ScalingPolicy = (output: any, context: __SerdeContext): ScalingPolicy = if (output[_SA] != null) { contents[_SA] = __strictParseInt32(output[_SA]) as number; } - if (output[_Co] != null) { - contents[_Co] = __strictParseInt32(output[_Co]) as number; + if (output[_Coo] != null) { + contents[_Coo] = __strictParseInt32(output[_Coo]) as number; } if (output.StepAdjustments === "") { contents[_SAt] = []; @@ -9080,8 +9374,8 @@ const de_ScheduledUpdateGroupAction = (output: any, context: __SerdeContext): Sc if (output[_ET] != null) { contents[_ET] = __expectNonNull(__parseRfc3339DateTimeWithOffset(output[_ET])); } - if (output[_R] != null) { - contents[_R] = __expectString(output[_R]); + if (output[_Re] != null) { + contents[_Re] = __expectString(output[_Re]); } if (output[_MS] != null) { contents[_MS] = __strictParseInt32(output[_MS]) as number; @@ -9534,10 +9828,11 @@ const _BDSA = "BatchDeleteScheduledAction"; const _BEBM = "BaselineEbsBandwidthMbps"; const _BM = "BareMetal"; const _BP = "BurstablePerformance"; +const _BPF = "BaselinePerformanceFactors"; const _BPSUGA = "BatchPutScheduledUpdateGroupAction"; const _BT = "BreachThreshold"; const _BTa = "BakeTime"; -const _C = "Context"; +const _C = "Cpu"; const _CASG = "CreateAutoScalingGroup"; const _CCMS = "CustomizedCapacityMetricSpecification"; const _CD = "CheckpointDelay"; @@ -9554,10 +9849,16 @@ const _CMS = "CustomizedMetricSpecification"; const _COUT = "CreateOrUpdateTags"; const _CP = "CheckpointPercentages"; const _CR = "CapacityRebalance"; +const _CRI = "CapacityReservationIds"; +const _CRP = "CapacityReservationPreference"; +const _CRRGA = "CapacityReservationResourceGroupArns"; +const _CRS = "CapacityReservationSpecification"; +const _CRT = "CapacityReservationTarget"; const _CSMS = "CustomizedScalingMetricSpecification"; const _CT = "CreatedTime"; const _Ca = "Cause"; -const _Co = "Cooldown"; +const _Co = "Context"; +const _Coo = "Cooldown"; const _D = "Dimensions"; const _DAL = "DescribeAccountLimits"; const _DASG = "DeleteAutoScalingGroup"; @@ -9638,6 +9939,7 @@ const _HTe = "HeartbeatTimeout"; const _I = "Iops"; const _ID = "InstancesDistribution"; const _IDG = "IncludeDeletedGroups"; +const _IF = "InstanceFamily"; const _IG = "InstanceGenerations"; const _II = "InstanceIds"; const _IIP = "IamInstanceProfile"; @@ -9769,7 +10071,7 @@ const _PTol = "PolicyType"; const _PWP = "PutWarmPool"; const _Pr = "Progress"; const _Pro = "Processes"; -const _R = "Recurrence"; +const _R = "References"; const _RARN = "RoleARN"; const _RD = "ReturnData"; const _RDo = "RollbackDetails"; @@ -9784,6 +10086,8 @@ const _RP = "ResumeProcesses"; const _RR = "RollbackReason"; const _RST = "RollbackStartTime"; const _RT = "ResourceType"; +const _Re = "Recurrence"; +const _Ref = "Reference"; const _S = "Statistic"; const _SA = "ScalingAdjustment"; const _SAARN = "ScheduledActionARN"; @@ -9857,6 +10161,7 @@ const _WPC = "WarmPoolConfiguration"; const _WPP = "WarmPoolProgress"; const _WPS = "WarmPoolSize"; const _ZSE = "ZonalShiftEnabled"; +const _i = "item"; const _m = "message"; const _me = "member"; diff --git a/codegen/sdk-codegen/aws-models/auto-scaling.json b/codegen/sdk-codegen/aws-models/auto-scaling.json index 1846802744ef..ddba8bb121ec 100644 --- a/codegen/sdk-codegen/aws-models/auto-scaling.json +++ b/codegen/sdk-codegen/aws-models/auto-scaling.json @@ -936,6 +936,12 @@ "traits": { "smithy.api#documentation": "

\n The Availability Zone impairment policy.\n

" } + }, + "CapacityReservationSpecification": { + "target": "com.amazonaws.autoscaling#CapacityReservationSpecification", + "traits": { + "smithy.api#documentation": "

\n The capacity reservation specification. \n

" + } } }, "traits": { @@ -2409,6 +2415,20 @@ "smithy.api#documentation": "

Specifies the minimum and maximum for the BaselineEbsBandwidthMbps object\n when you specify InstanceRequirements for an Auto Scaling group.

" } }, + "com.amazonaws.autoscaling#BaselinePerformanceFactorsRequest": { + "type": "structure", + "members": { + "Cpu": { + "target": "com.amazonaws.autoscaling#CpuPerformanceFactorRequest", + "traits": { + "smithy.api#documentation": "

\n The CPU performance to consider, using an instance family as the baseline reference.\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

\n The baseline performance to consider, using an instance family as a baseline reference. The instance family establishes the lowest acceptable level of performance. Auto Scaling uses\n this baseline to guide instance type selection, but there is no guarantee that the selected instance types will always exceed the baseline for every application.\n

\n

Currently, this parameter only supports CPU performance as a baseline performance factor. For example, specifying c6i uses the CPU performance of the c6i\n family as the baseline reference.

" + } + }, "com.amazonaws.autoscaling#BatchDeleteScheduledAction": { "type": "operation", "input": { @@ -2721,6 +2741,87 @@ "com.amazonaws.autoscaling#CapacityRebalanceEnabled": { "type": "boolean" }, + "com.amazonaws.autoscaling#CapacityReservationIds": { + "type": "list", + "member": { + "target": "com.amazonaws.autoscaling#AsciiStringMaxLen255" + } + }, + "com.amazonaws.autoscaling#CapacityReservationPreference": { + "type": "enum", + "members": { + "CapacityReservationsOnly": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "capacity-reservations-only" + } + }, + "CapacityReservationsFirst": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "capacity-reservations-first" + } + }, + "None": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "none" + } + }, + "Default": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "default" + } + } + } + }, + "com.amazonaws.autoscaling#CapacityReservationResourceGroupArns": { + "type": "list", + "member": { + "target": "com.amazonaws.autoscaling#ResourceName" + } + }, + "com.amazonaws.autoscaling#CapacityReservationSpecification": { + "type": "structure", + "members": { + "CapacityReservationPreference": { + "target": "com.amazonaws.autoscaling#CapacityReservationPreference", + "traits": { + "smithy.api#documentation": "

\n The capacity reservation preference. The following options are available:\n

\n " + } + }, + "CapacityReservationTarget": { + "target": "com.amazonaws.autoscaling#CapacityReservationTarget", + "traits": { + "smithy.api#documentation": "

\n Describes a target Capacity Reservation or Capacity Reservation resource group.\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

\n Describes the Capacity Reservation preference and targeting options. If you specify open or none for CapacityReservationPreference, do not specify a CapacityReservationTarget.\n

" + } + }, + "com.amazonaws.autoscaling#CapacityReservationTarget": { + "type": "structure", + "members": { + "CapacityReservationIds": { + "target": "com.amazonaws.autoscaling#CapacityReservationIds", + "traits": { + "smithy.api#documentation": "

\n The Capacity Reservation IDs to launch instances into.\n

" + } + }, + "CapacityReservationResourceGroupArns": { + "target": "com.amazonaws.autoscaling#CapacityReservationResourceGroupArns", + "traits": { + "smithy.api#documentation": "

\n The resource group ARNs of the Capacity Reservation to launch instances into.\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

\n The target for the Capacity Reservation. Specify Capacity Reservations IDs or Capacity Reservation resource group ARNs. \n

" + } + }, "com.amazonaws.autoscaling#CheckpointDelay": { "type": "integer", "traits": { @@ -2851,6 +2952,21 @@ "target": "com.amazonaws.autoscaling#CpuManufacturer" } }, + "com.amazonaws.autoscaling#CpuPerformanceFactorRequest": { + "type": "structure", + "members": { + "References": { + "target": "com.amazonaws.autoscaling#PerformanceFactorReferenceSetRequest", + "traits": { + "smithy.api#documentation": "

\n Specify an instance family to use as the baseline reference for CPU performance. All instance types that match your specified attributes will be compared against the CPU performance of the\n referenced instance family, regardless of CPU manufacturer or architecture differences.\n

\n \n

Currently only one instance family can be specified in the list.

\n
", + "smithy.api#xmlName": "Reference" + } + } + }, + "traits": { + "smithy.api#documentation": "

\n The CPU performance to consider, using an instance family as the baseline reference.\n

" + } + }, "com.amazonaws.autoscaling#CreateAutoScalingGroup": { "type": "operation", "input": { @@ -3185,6 +3301,12 @@ "traits": { "smithy.api#documentation": "

\n If you enable zonal shift with cross-zone disabled load balancers, capacity could become imbalanced across Availability Zones. To skip the validation, specify true. For more information, see\n Auto Scaling group zonal shift in the Amazon EC2 Auto Scaling User Guide.\n

" } + }, + "CapacityReservationSpecification": { + "target": "com.amazonaws.autoscaling#CapacityReservationSpecification", + "traits": { + "smithy.api#documentation": "

\n The capacity reservation specification for the Auto Scaling group. \n

" + } } } }, @@ -6888,6 +7010,12 @@ "traits": { "smithy.api#documentation": "

The instance types to apply your specified attributes against. All other instance\n types are ignored, even if they match your specified attributes.

\n

You can use strings with one or more wild cards, represented by an asterisk\n (*), to allow an instance type, size, or generation. The following are\n examples: m5.8xlarge, c5*.*, m5a.*,\n r*, *3*.

\n

For example, if you specify c5*, Amazon EC2 Auto Scaling will allow the entire C5\n instance family, which includes all C5a and C5n instance types. If you specify\n m5a.*, Amazon EC2 Auto Scaling will allow all the M5a instance types, but not the M5n\n instance types.

\n \n

If you specify AllowedInstanceTypes, you can't specify\n ExcludedInstanceTypes.

\n
\n

Default: All instance types

" } + }, + "BaselinePerformanceFactors": { + "target": "com.amazonaws.autoscaling#BaselinePerformanceFactorsRequest", + "traits": { + "smithy.api#documentation": "

\n The baseline performance factors for the instance requirements.\n

" + } } }, "traits": { @@ -8288,6 +8416,29 @@ "target": "com.amazonaws.autoscaling#LaunchTemplateOverrides" } }, + "com.amazonaws.autoscaling#PerformanceFactorReferenceRequest": { + "type": "structure", + "members": { + "InstanceFamily": { + "target": "com.amazonaws.autoscaling#String", + "traits": { + "smithy.api#documentation": "

\n The instance family to use as a baseline reference.\n

\n \n

Make sure that you specify the correct value for the instance family. The instance family is everything before the period (.) in the instance type name. For example, in the instance c6i.large, the\n instance family is c6i, not c6. For more information, see Amazon EC2 instance type naming conventions in \n Amazon EC2 Instance Types.

\n
\n

The following instance types are not supported for performance protection.

\n \n

If you performance protection by specifying a supported instance family, the returned instance types will exclude the preceding unsupported instance families.

\n

If you specify an unsupported instance family as a value for baseline performance, the API returns an empty response.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

\n Specify an instance family to use as the baseline reference for CPU performance. All instance types that All instance types that match your specified attributes will be compared against the CPU performance of the\n referenced instance family, regardless of CPU manufacturer or architecture differences.\n

\n \n

Currently only one instance family can be specified in the list.

\n
" + } + }, + "com.amazonaws.autoscaling#PerformanceFactorReferenceSetRequest": { + "type": "list", + "member": { + "target": "com.amazonaws.autoscaling#PerformanceFactorReferenceRequest", + "traits": { + "smithy.api#xmlName": "item" + } + } + }, "com.amazonaws.autoscaling#PoliciesType": { "type": "structure", "members": { @@ -10396,6 +10547,9 @@ "target": "com.amazonaws.autoscaling#StepAdjustment" } }, + "com.amazonaws.autoscaling#String": { + "type": "string" + }, "com.amazonaws.autoscaling#SuspendProcesses": { "type": "operation", "input": { @@ -11035,7 +11189,13 @@ "SkipZonalShiftValidation": { "target": "com.amazonaws.autoscaling#SkipZonalShiftValidation", "traits": { - "smithy.api#documentation": "

\n If you enable zonal shift with cross-zone disabled load balancers, capacity could become imbalanced across Availability Zones. To skip the validation, specify true. For more information, see \n Auto Scaling group zonal shift in the Amazon EC2 Auto Scaling User Guide.\n

" + "smithy.api#documentation": "

\n If you enable zonal shift with cross-zone disabled load balancers, capacity could become imbalanced across Availability Zones. To skip the validation, specify true. For more information, see\n Auto Scaling group zonal shift in the Amazon EC2 Auto Scaling User Guide.\n

" + } + }, + "CapacityReservationSpecification": { + "target": "com.amazonaws.autoscaling#CapacityReservationSpecification", + "traits": { + "smithy.api#documentation": "

\n The capacity reservation specification for the Auto Scaling group. \n

" } } }