Skip to content

Commit a660c50

Browse files
author
awstools
committed
feat(client-workspaces-instances): Added billing configuration support for WorkSpaces Instances with monthly and hourly billing modes, including new filtering capabilities for instance type searches.
1 parent f906d76 commit a660c50

10 files changed

Lines changed: 396 additions & 14 deletions

File tree

clients/client-workspaces-instances/src/commands/CreateWorkspaceInstanceCommand.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,9 @@ export interface CreateWorkspaceInstanceCommandOutput extends CreateWorkspaceIns
225225
* ],
226226
* UserData: "STRING_VALUE",
227227
* },
228+
* BillingConfiguration: { // BillingConfiguration
229+
* BillingMode: "MONTHLY" || "HOURLY", // required
230+
* },
228231
* };
229232
* const command = new CreateWorkspaceInstanceCommand(input);
230233
* const response = await client.send(command);

clients/client-workspaces-instances/src/commands/DeleteWorkspaceInstanceCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export interface DeleteWorkspaceInstanceCommandInput extends DeleteWorkspaceInst
3131
export interface DeleteWorkspaceInstanceCommandOutput extends DeleteWorkspaceInstanceResponse, __MetadataBearer {}
3232

3333
/**
34-
* <p>Deletes the specified WorkSpace</p>
34+
* <p>Deletes the specified WorkSpace</p> <important> <p>Usage of this API will result in deletion of the resource in question.</p> </important>
3535
* @example
3636
* Use a bare-bones client and the command you need to make an API call.
3737
* ```javascript

clients/client-workspaces-instances/src/commands/GetWorkspaceInstanceCommand.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ export interface GetWorkspaceInstanceCommandOutput extends GetWorkspaceInstanceR
6464
* // EC2ManagedInstance: { // EC2ManagedInstance
6565
* // InstanceId: "STRING_VALUE",
6666
* // },
67+
* // BillingConfiguration: { // BillingConfiguration
68+
* // BillingMode: "MONTHLY" || "HOURLY", // required
69+
* // },
6770
* // };
6871
*
6972
* ```

clients/client-workspaces-instances/src/commands/ListInstanceTypesCommand.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,25 @@ export interface ListInstanceTypesCommandOutput extends ListInstanceTypesRespons
4343
* const input = { // ListInstanceTypesRequest
4444
* MaxResults: Number("int"),
4545
* NextToken: "STRING_VALUE",
46+
* InstanceConfigurationFilter: { // InstanceConfigurationFilter
47+
* BillingMode: "MONTHLY" || "HOURLY", // required
48+
* PlatformType: "Windows" || "Windows BYOL" || "Linux/UNIX" || "Ubuntu Pro Linux" || "Red Hat Enterprise Linux" || "Red Hat BYOL Linux" || "SUSE Linux", // required
49+
* Tenancy: "SHARED" || "DEDICATED", // required
50+
* },
4651
* };
4752
* const command = new ListInstanceTypesCommand(input);
4853
* const response = await client.send(command);
4954
* // { // ListInstanceTypesResponse
5055
* // InstanceTypes: [ // InstanceTypes // required
5156
* // { // InstanceTypeInfo
5257
* // InstanceType: "STRING_VALUE",
58+
* // SupportedInstanceConfigurations: [ // SupportedInstanceConfigurations
59+
* // { // SupportedInstanceConfiguration
60+
* // BillingMode: "MONTHLY" || "HOURLY",
61+
* // PlatformType: "Windows" || "Windows BYOL" || "Linux/UNIX" || "Ubuntu Pro Linux" || "Red Hat Enterprise Linux" || "Red Hat BYOL Linux" || "SUSE Linux",
62+
* // Tenancy: "SHARED" || "DEDICATED",
63+
* // },
64+
* // ],
5365
* // },
5466
* // ],
5567
* // NextToken: "STRING_VALUE",

clients/client-workspaces-instances/src/models/enums.ts

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,19 @@ export const BandwidthWeightingEnum = {
5656
*/
5757
export type BandwidthWeightingEnum = (typeof BandwidthWeightingEnum)[keyof typeof BandwidthWeightingEnum];
5858

59+
/**
60+
* @public
61+
* @enum
62+
*/
63+
export const BillingMode = {
64+
HOURLY: "HOURLY",
65+
MONTHLY: "MONTHLY",
66+
} as const;
67+
/**
68+
* @public
69+
*/
70+
export type BillingMode = (typeof BillingMode)[keyof typeof BillingMode];
71+
5972
/**
6073
* @public
6174
* @enum
@@ -279,3 +292,35 @@ export const ProvisionStateEnum = {
279292
* @public
280293
*/
281294
export type ProvisionStateEnum = (typeof ProvisionStateEnum)[keyof typeof ProvisionStateEnum];
295+
296+
/**
297+
* @public
298+
* @enum
299+
*/
300+
export const PlatformTypeEnum = {
301+
LINUX_BYOL: "Red Hat BYOL Linux",
302+
LINUX_UNIX: "Linux/UNIX",
303+
RHEL: "Red Hat Enterprise Linux",
304+
SUSE: "SUSE Linux",
305+
UBUNTU_PRO: "Ubuntu Pro Linux",
306+
WINDOWS: "Windows",
307+
WINDOWS_BYOL: "Windows BYOL",
308+
} as const;
309+
/**
310+
* @public
311+
*/
312+
export type PlatformTypeEnum = (typeof PlatformTypeEnum)[keyof typeof PlatformTypeEnum];
313+
314+
/**
315+
* @public
316+
* @enum
317+
*/
318+
export const InstanceConfigurationTenancyEnum = {
319+
DEDICATED: "DEDICATED",
320+
SHARED: "SHARED",
321+
} as const;
322+
/**
323+
* @public
324+
*/
325+
export type InstanceConfigurationTenancyEnum =
326+
(typeof InstanceConfigurationTenancyEnum)[keyof typeof InstanceConfigurationTenancyEnum];

clients/client-workspaces-instances/src/models/models_0.ts

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,20 @@ import {
33
AmdSevSnpEnum,
44
AutoRecoveryEnum,
55
BandwidthWeightingEnum,
6+
BillingMode,
67
CapacityReservationPreferenceEnum,
78
CpuCreditsEnum,
89
DisassociateModeEnum,
910
HostnameTypeEnum,
1011
HttpEndpointEnum,
1112
HttpProtocolIpv6Enum,
1213
HttpTokensEnum,
14+
InstanceConfigurationTenancyEnum,
1315
InstanceInterruptionBehaviorEnum,
1416
InstanceMetadataTagsEnum,
1517
InterfaceTypeEnum,
1618
MarketTypeEnum,
19+
PlatformTypeEnum,
1720
ProvisionStateEnum,
1821
ResourceTypeEnum,
1922
SpotInstanceTypeEnum,
@@ -75,6 +78,18 @@ export interface ValidationExceptionField {
7578
Message: string | undefined;
7679
}
7780

81+
/**
82+
* <p>Defines billing configuration settings for WorkSpace Instances, containing the billing mode selection.</p>
83+
* @public
84+
*/
85+
export interface BillingConfiguration {
86+
/**
87+
* <p>Specifies the billing mode for WorkSpace Instances. MONTHLY provides fixed monthly rates for predictable budgeting, while HOURLY enables pay-per-second billing for actual usage.</p>
88+
* @public
89+
*/
90+
BillingMode: BillingMode | undefined;
91+
}
92+
7893
/**
7994
* <p>Defines configuration for an Elastic Block Store volume.</p>
8095
* @public
@@ -1057,6 +1072,12 @@ export interface CreateWorkspaceInstanceRequest {
10571072
* @public
10581073
*/
10591074
ManagedInstance: ManagedInstanceRequest | undefined;
1075+
1076+
/**
1077+
* <p>Optional billing configuration for the WorkSpace Instance. Allows customers to specify their preferred billing mode when creating a new instance. Defaults to hourly billing if not specified.</p>
1078+
* @public
1079+
*/
1080+
BillingConfiguration?: BillingConfiguration | undefined;
10601081
}
10611082

10621083
/**
@@ -1243,6 +1264,36 @@ export interface GetWorkspaceInstanceResponse {
12431264
* @public
12441265
*/
12451266
EC2ManagedInstance?: EC2ManagedInstance | undefined;
1267+
1268+
/**
1269+
* <p>Returns the current billing configuration for the WorkSpace Instance, indicating the active billing mode.</p>
1270+
* @public
1271+
*/
1272+
BillingConfiguration?: BillingConfiguration | undefined;
1273+
}
1274+
1275+
/**
1276+
* <p>Defines filtering criteria for WorkSpace Instance type searches. Combines multiple filter conditions including billing mode, platform type, and tenancy to help customers find instance types that meet their specific requirements.</p>
1277+
* @public
1278+
*/
1279+
export interface InstanceConfigurationFilter {
1280+
/**
1281+
* <p>Filters WorkSpace Instance types based on supported billing modes. Allows customers to search for instance types that support their preferred billing model, such as HOURLY or MONTHLY billing.</p>
1282+
* @public
1283+
*/
1284+
BillingMode: BillingMode | undefined;
1285+
1286+
/**
1287+
* <p>Filters WorkSpace Instance types by operating system platform. Allows customers to find instances that support their desired OS, such as Windows, Linux/UNIX, Ubuntu Pro, RHEL, or SUSE.</p>
1288+
* @public
1289+
*/
1290+
PlatformType: PlatformTypeEnum | undefined;
1291+
1292+
/**
1293+
* <p>Filters WorkSpace Instance types by tenancy model. Allows customers to find instances that match their tenancy requirements, such as SHARED or DEDICATED.</p>
1294+
* @public
1295+
*/
1296+
Tenancy: InstanceConfigurationTenancyEnum | undefined;
12461297
}
12471298

12481299
/**
@@ -1261,6 +1312,36 @@ export interface ListInstanceTypesRequest {
12611312
* @public
12621313
*/
12631314
NextToken?: string | undefined;
1315+
1316+
/**
1317+
* <p>Optional filter to narrow instance type results based on configuration requirements. Only returns instance types that support the specified combination of tenancy, platform type, and billing mode.</p>
1318+
* @public
1319+
*/
1320+
InstanceConfigurationFilter?: InstanceConfigurationFilter | undefined;
1321+
}
1322+
1323+
/**
1324+
* <p>Represents a single valid configuration combination that an instance type supports, combining tenancy, platform type, and billing mode into one complete configuration specification.</p>
1325+
* @public
1326+
*/
1327+
export interface SupportedInstanceConfiguration {
1328+
/**
1329+
* <p>Specifies the billing mode supported in this configuration combination.</p>
1330+
* @public
1331+
*/
1332+
BillingMode?: BillingMode | undefined;
1333+
1334+
/**
1335+
* <p>Specifies the operating system platform supported in this configuration combination.</p>
1336+
* @public
1337+
*/
1338+
PlatformType?: PlatformTypeEnum | undefined;
1339+
1340+
/**
1341+
* <p>Specifies the tenancy model supported in this configuration combination.</p>
1342+
* @public
1343+
*/
1344+
Tenancy?: InstanceConfigurationTenancyEnum | undefined;
12641345
}
12651346

12661347
/**
@@ -1273,6 +1354,12 @@ export interface InstanceTypeInfo {
12731354
* @public
12741355
*/
12751356
InstanceType?: string | undefined;
1357+
1358+
/**
1359+
* <p>Lists all valid combinations of tenancy, platform type, and billing mode supported for the specific WorkSpace Instance type. Contains the complete set of configuration options available for this instance type.</p>
1360+
* @public
1361+
*/
1362+
SupportedInstanceConfigurations?: SupportedInstanceConfiguration[] | undefined;
12761363
}
12771364

12781365
/**

clients/client-workspaces-instances/src/schemas/schemas_0.ts

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ const _AVR = "AssociateVolumeRequest";
99
const _AVRs = "AssociateVolumeResponse";
1010
const _AZ = "AvailabilityZone";
1111
const _Af = "Affinity";
12+
const _BC = "BillingConfiguration";
1213
const _BDM = "BlockDeviceMappings";
1314
const _BDMR = "BlockDeviceMappingRequest";
1415
const _BDMl = "BlockDurationMinutes";
16+
const _BM = "BillingMode";
1517
const _BW = "BandwidthWeighting";
1618
const _C = "Configured";
1719
const _CC = "CoreCount";
@@ -95,6 +97,7 @@ const _IA = "Ipv4Address";
9597
const _IAC = "Ipv6AddressCount";
9698
const _IAp = "Ipv6Address";
9799
const _IApv = "Ipv6Addresses";
100+
const _ICF = "InstanceConfigurationFilter";
98101
const _II = "InstanceId";
99102
const _IIA = "InstanceIpv6Address";
100103
const _IIB = "InstanceInterruptionBehavior";
@@ -167,6 +170,7 @@ const _PIAr = "PrivateIpAddresses";
167170
const _PN = "PartitionNumber";
168171
const _PS = "ProvisionState";
169172
const _PSr = "ProvisionStates";
173+
const _PT = "PlatformType";
170174
const _Pr = "Primary";
171175
const _QC = "QuotaCode";
172176
const _R = "Regions";
@@ -185,6 +189,8 @@ const _SC = "ServiceCode";
185189
const _SG = "SecurityGroups";
186190
const _SGI = "SecurityGroupIds";
187191
const _SI = "SnapshotId";
192+
const _SIC = "SupportedInstanceConfigurations";
193+
const _SICu = "SupportedInstanceConfiguration";
188194
const _SIGB = "SizeInGB";
189195
const _SIT = "SpotInstanceType";
190196
const _SIu = "SubnetId";
@@ -278,6 +284,11 @@ export var AssociateVolumeResponse$: StaticStructureSchema = [3, n0, _AVRs,
278284
[],
279285
[]
280286
];
287+
export var BillingConfiguration$: StaticStructureSchema = [3, n0, _BC,
288+
0,
289+
[_BM],
290+
[0], 1
291+
];
281292
export var BlockDeviceMappingRequest$: StaticStructureSchema = [3, n0, _BDMR,
282293
0,
283294
[_DN, _E, _ND, _VN],
@@ -321,8 +332,8 @@ export var CreateVolumeResponse$: StaticStructureSchema = [3, n0, _CVRr,
321332
];
322333
export var CreateWorkspaceInstanceRequest$: StaticStructureSchema = [3, n0, _CWIR,
323334
0,
324-
[_MI, _CT, _Ta],
325-
[[() => ManagedInstanceRequest$, 0], [() => ClientToken, 4], () => TagList], 1
335+
[_MI, _CT, _Ta, _BC],
336+
[[() => ManagedInstanceRequest$, 0], [() => ClientToken, 4], () => TagList, () => BillingConfiguration$], 1
326337
];
327338
export var CreateWorkspaceInstanceResponse$: StaticStructureSchema = [3, n0, _CWIRr,
328339
0,
@@ -401,8 +412,8 @@ export var GetWorkspaceInstanceRequest$: StaticStructureSchema = [3, n0, _GWIR,
401412
];
402413
export var GetWorkspaceInstanceResponse$: StaticStructureSchema = [3, n0, _GWIRe,
403414
0,
404-
[_WIE, _ECIEn, _PS, _WII, _ECMI],
405-
[() => WorkspaceInstanceErrors, () => EC2InstanceErrors, 0, 0, () => EC2ManagedInstance$]
415+
[_WIE, _ECIEn, _PS, _WII, _ECMI, _BC],
416+
[() => WorkspaceInstanceErrors, () => EC2InstanceErrors, 0, 0, () => EC2ManagedInstance$, () => BillingConfiguration$]
406417
];
407418
export var HibernationOptionsRequest$: StaticStructureSchema = [3, n0, _HOR,
408419
0,
@@ -414,6 +425,11 @@ export var IamInstanceProfileSpecification$: StaticStructureSchema = [3, n0, _II
414425
[_A, _N],
415426
[0, 0]
416427
];
428+
export var InstanceConfigurationFilter$: StaticStructureSchema = [3, n0, _ICF,
429+
0,
430+
[_BM, _PT, _Te],
431+
[0, 0, 0], 3
432+
];
417433
export var InstanceIpv6Address$: StaticStructureSchema = [3, n0, _IIA,
418434
0,
419435
[_IAp, _IPI],
@@ -446,8 +462,8 @@ export var InstanceNetworkPerformanceOptionsRequest$: StaticStructureSchema = [3
446462
];
447463
export var InstanceTypeInfo$: StaticStructureSchema = [3, n0, _ITI,
448464
0,
449-
[_ITn],
450-
[0]
465+
[_ITn, _SIC],
466+
[0, () => SupportedInstanceConfigurations]
451467
];
452468
export var InternalServerException$: StaticErrorSchema = [-3, n0, _ISE,
453469
{ [_e]: _s, [_hE]: 500 },
@@ -472,8 +488,8 @@ export var LicenseConfigurationRequest$: StaticStructureSchema = [3, n0, _LCR,
472488
];
473489
export var ListInstanceTypesRequest$: StaticStructureSchema = [3, n0, _LITR,
474490
0,
475-
[_MR, _NT],
476-
[1, [() => NextToken, 0]]
491+
[_MR, _NT, _ICF],
492+
[1, [() => NextToken, 0], () => InstanceConfigurationFilter$]
477493
];
478494
export var ListInstanceTypesResponse$: StaticStructureSchema = [3, n0, _LITRi,
479495
0,
@@ -557,6 +573,11 @@ export var SpotMarketOptions$: StaticStructureSchema = [3, n0, _SMO,
557573
[_BDMl, _IIB, _MP, _SIT, _VUU],
558574
[1, 0, 0, 0, 4]
559575
];
576+
export var SupportedInstanceConfiguration$: StaticStructureSchema = [3, n0, _SICu,
577+
0,
578+
[_BM, _PT, _Te],
579+
[0, 0, 0]
580+
];
560581
export var Tag$: StaticStructureSchema = [3, n0, _Tag,
561582
0,
562583
[_K, _V],
@@ -653,6 +674,9 @@ var RegionList: StaticListSchema = [1, n0, _RL,
653674
];
654675
var SecurityGroupIds = 64 | 0;
655676
var SecurityGroupNames = 64 | 0;
677+
var SupportedInstanceConfigurations: StaticListSchema = [1, n0, _SIC,
678+
0, () => SupportedInstanceConfiguration$
679+
];
656680
var TagKeyList = 64 | 0;
657681
var TagList: StaticListSchema = [1, n0, _TL,
658682
0, () => Tag$

0 commit comments

Comments
 (0)