Skip to content

Commit a6cc054

Browse files
author
awstools
committed
feat(client-cleanroomsml): This release introduces data access budgets to view how many times an input channel can be used for ML jobs in a collaboration.
1 parent 783dbc1 commit a6cc054

File tree

5 files changed

+447
-1
lines changed

5 files changed

+447
-1
lines changed

clients/client-cleanroomsml/src/commands/GetCollaborationMLInputChannelCommand.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,24 @@ export interface GetCollaborationMLInputChannelCommandOutput
6363
* // },
6464
* // retentionInDays: Number("int"), // required
6565
* // numberOfRecords: Number("long"),
66+
* // privacyBudgets: { // PrivacyBudgets Union: only one key present
67+
* // accessBudgets: [ // AccessBudgets
68+
* // { // AccessBudget
69+
* // resourceArn: "STRING_VALUE", // required
70+
* // details: [ // AccessBudgetDetailsList // required
71+
* // { // AccessBudgetDetails
72+
* // startTime: new Date("TIMESTAMP"), // required
73+
* // endTime: new Date("TIMESTAMP"),
74+
* // remainingBudget: Number("int"), // required
75+
* // budget: Number("int"), // required
76+
* // budgetType: "CALENDAR_DAY" || "CALENDAR_MONTH" || "CALENDAR_WEEK" || "LIFETIME", // required
77+
* // autoRefresh: "ENABLED" || "DISABLED",
78+
* // },
79+
* // ],
80+
* // aggregateRemainingBudget: Number("int"), // required
81+
* // },
82+
* // ],
83+
* // },
6684
* // description: "STRING_VALUE",
6785
* // createTime: new Date("TIMESTAMP"), // required
6886
* // updateTime: new Date("TIMESTAMP"), // required

clients/client-cleanroomsml/src/commands/GetMLInputChannelCommand.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,24 @@ export interface GetMLInputChannelCommandOutput extends GetMLInputChannelRespons
6262
* // },
6363
* // retentionInDays: Number("int"), // required
6464
* // numberOfRecords: Number("long"),
65+
* // privacyBudgets: { // PrivacyBudgets Union: only one key present
66+
* // accessBudgets: [ // AccessBudgets
67+
* // { // AccessBudget
68+
* // resourceArn: "STRING_VALUE", // required
69+
* // details: [ // AccessBudgetDetailsList // required
70+
* // { // AccessBudgetDetails
71+
* // startTime: new Date("TIMESTAMP"), // required
72+
* // endTime: new Date("TIMESTAMP"),
73+
* // remainingBudget: Number("int"), // required
74+
* // budget: Number("int"), // required
75+
* // budgetType: "CALENDAR_DAY" || "CALENDAR_MONTH" || "CALENDAR_WEEK" || "LIFETIME", // required
76+
* // autoRefresh: "ENABLED" || "DISABLED",
77+
* // },
78+
* // ],
79+
* // aggregateRemainingBudget: Number("int"), // required
80+
* // },
81+
* // ],
82+
* // },
6583
* // description: "STRING_VALUE",
6684
* // createTime: new Date("TIMESTAMP"), // required
6785
* // updateTime: new Date("TIMESTAMP"), // required

clients/client-cleanroomsml/src/models/models_0.ts

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,102 @@ import { ExceptionOptionType as __ExceptionOptionType, SENSITIVE_STRING } from "
33

44
import { CleanRoomsMLServiceException as __BaseException } from "./CleanRoomsMLServiceException";
55

6+
/**
7+
* @public
8+
* @enum
9+
*/
10+
export const AutoRefreshMode = {
11+
DISABLED: "DISABLED",
12+
ENABLED: "ENABLED",
13+
} as const;
14+
15+
/**
16+
* @public
17+
*/
18+
export type AutoRefreshMode = (typeof AutoRefreshMode)[keyof typeof AutoRefreshMode];
19+
20+
/**
21+
* @public
22+
* @enum
23+
*/
24+
export const AccessBudgetType = {
25+
CALENDAR_DAY: "CALENDAR_DAY",
26+
CALENDAR_MONTH: "CALENDAR_MONTH",
27+
CALENDAR_WEEK: "CALENDAR_WEEK",
28+
LIFETIME: "LIFETIME",
29+
} as const;
30+
31+
/**
32+
* @public
33+
*/
34+
export type AccessBudgetType = (typeof AccessBudgetType)[keyof typeof AccessBudgetType];
35+
36+
/**
37+
* <p>The detailed information for a specific budget period, including time boundaries and budget amounts.</p>
38+
* @public
39+
*/
40+
export interface AccessBudgetDetails {
41+
/**
42+
* <p>The start time of this budget period.</p>
43+
* @public
44+
*/
45+
startTime: Date | undefined;
46+
47+
/**
48+
* <p>The end time of this budget period. If not specified, the budget period continues indefinitely.</p>
49+
* @public
50+
*/
51+
endTime?: Date | undefined;
52+
53+
/**
54+
* <p>The amount of budget remaining in this period.</p>
55+
* @public
56+
*/
57+
remainingBudget: number | undefined;
58+
59+
/**
60+
* <p>The total budget amount allocated for this period.</p>
61+
* @public
62+
*/
63+
budget: number | undefined;
64+
65+
/**
66+
* <p>The type of budget period. Calendar-based types reset automatically at regular intervals, while LIFETIME budgets never reset.</p>
67+
* @public
68+
*/
69+
budgetType: AccessBudgetType | undefined;
70+
71+
/**
72+
* <p>Specifies whether this budget automatically refreshes when the current period ends.</p>
73+
* @public
74+
*/
75+
autoRefresh?: AutoRefreshMode | undefined;
76+
}
77+
78+
/**
79+
* <p>An access budget that defines consumption limits for a specific resource within defined time periods.</p>
80+
* @public
81+
*/
82+
export interface AccessBudget {
83+
/**
84+
* <p>The Amazon Resource Name (ARN) of the resource that this access budget applies to.</p>
85+
* @public
86+
*/
87+
resourceArn: string | undefined;
88+
89+
/**
90+
* <p>A list of budget details for this resource. Contains active budget periods that apply to the resource.</p>
91+
* @public
92+
*/
93+
details: AccessBudgetDetails[] | undefined;
94+
95+
/**
96+
* <p>The total remaining budget across all active budget periods for this resource.</p>
97+
* @public
98+
*/
99+
aggregateRemainingBudget: number | undefined;
100+
}
101+
6102
/**
7103
* <p>You do not have sufficient access to perform this action.</p>
8104
* @public
@@ -3622,6 +3718,44 @@ export interface GetCollaborationMLInputChannelRequest {
36223718
collaborationIdentifier: string | undefined;
36233719
}
36243720

3721+
/**
3722+
* <p>The privacy budget information that controls access to Clean Rooms ML input channels.</p>
3723+
* @public
3724+
*/
3725+
export type PrivacyBudgets = PrivacyBudgets.AccessBudgetsMember | PrivacyBudgets.$UnknownMember;
3726+
3727+
/**
3728+
* @public
3729+
*/
3730+
export namespace PrivacyBudgets {
3731+
/**
3732+
* <p>A list of access budgets that apply to resources associated with this Clean Rooms ML input channel.</p>
3733+
* @public
3734+
*/
3735+
export interface AccessBudgetsMember {
3736+
accessBudgets: AccessBudget[];
3737+
$unknown?: never;
3738+
}
3739+
3740+
/**
3741+
* @public
3742+
*/
3743+
export interface $UnknownMember {
3744+
accessBudgets?: never;
3745+
$unknown: [string, any];
3746+
}
3747+
3748+
export interface Visitor<T> {
3749+
accessBudgets: (value: AccessBudget[]) => T;
3750+
_: (name: string, value: any) => T;
3751+
}
3752+
3753+
export const visit = <T>(value: PrivacyBudgets, visitor: Visitor<T>): T => {
3754+
if (value.accessBudgets !== undefined) return visitor.accessBudgets(value.accessBudgets);
3755+
return visitor._(value.$unknown[0], value.$unknown[1]);
3756+
};
3757+
}
3758+
36253759
/**
36263760
* @public
36273761
*/
@@ -3680,6 +3814,12 @@ export interface GetCollaborationMLInputChannelResponse {
36803814
*/
36813815
numberOfRecords?: number | undefined;
36823816

3817+
/**
3818+
* <p>Returns the privacy budgets that control access to this Clean Rooms ML input channel. Use these budgets to monitor and limit resource consumption over specified time periods.</p>
3819+
* @public
3820+
*/
3821+
privacyBudgets?: PrivacyBudgets | undefined;
3822+
36833823
/**
36843824
* <p>The description of the ML input channel.</p>
36853825
* @public
@@ -3780,6 +3920,12 @@ export interface GetMLInputChannelResponse {
37803920
*/
37813921
numberOfRecords?: number | undefined;
37823922

3923+
/**
3924+
* <p>Returns the privacy budgets that control access to this Clean Rooms ML input channel. Use these budgets to monitor and limit resource consumption over specified time periods.</p>
3925+
* @public
3926+
*/
3927+
privacyBudgets?: PrivacyBudgets | undefined;
3928+
37833929
/**
37843930
* <p>The description of the ML input channel.</p>
37853931
* @public
@@ -5928,5 +6074,6 @@ export const CreateMLInputChannelRequestFilterSensitiveLog = (obj: CreateMLInput
59286074
*/
59296075
export const GetMLInputChannelResponseFilterSensitiveLog = (obj: GetMLInputChannelResponse): any => ({
59306076
...obj,
6077+
...(obj.privacyBudgets && { privacyBudgets: obj.privacyBudgets }),
59316078
...(obj.inputChannel && { inputChannel: InputChannelFilterSensitiveLog(obj.inputChannel) }),
59326079
});

clients/client-cleanroomsml/src/protocols/Aws_restJson1.ts

Lines changed: 72 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
// smithy-typescript generated code
2-
import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
2+
import {
3+
awsExpectUnion as __expectUnion,
4+
loadRestJsonErrorCode,
5+
parseJsonBody as parseBody,
6+
parseJsonErrorBody as parseErrorBody,
7+
} from "@aws-sdk/core";
38
import { requestBuilder as rb } from "@smithy/core";
49
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
510
import {
@@ -230,6 +235,8 @@ import {
230235
} from "../commands/UpdateConfiguredAudienceModelCommand";
231236
import { CleanRoomsMLServiceException as __BaseException } from "../models/CleanRoomsMLServiceException";
232237
import {
238+
AccessBudget,
239+
AccessBudgetDetails,
233240
AccessDeniedException,
234241
AudienceDestination,
235242
AudienceExportJobSummary,
@@ -277,6 +284,7 @@ import {
277284
MLOutputConfiguration,
278285
ModelInferenceDataSource,
279286
ModelTrainingDataChannel,
287+
PrivacyBudgets,
280288
PrivacyConfiguration,
281289
PrivacyConfigurationPolicies,
282290
ProtectedQueryInputParameters,
@@ -2014,6 +2022,7 @@ export const de_GetCollaborationMLInputChannelCommand = async (
20142022
mlInputChannelArn: __expectString,
20152023
name: __expectString,
20162024
numberOfRecords: __expectLong,
2025+
privacyBudgets: (_) => de_PrivacyBudgets(__expectUnion(_), context),
20172026
retentionInDays: __expectInt32,
20182027
status: __expectString,
20192028
statusDetails: _json,
@@ -2230,6 +2239,7 @@ export const de_GetMLInputChannelCommand = async (
22302239
name: __expectString,
22312240
numberOfFiles: __limitedParseDouble,
22322241
numberOfRecords: __expectLong,
2242+
privacyBudgets: (_) => de_PrivacyBudgets(__expectUnion(_), context),
22332243
protectedQueryIdentifier: __expectString,
22342244
retentionInDays: __expectInt32,
22352245
sizeInGb: __limitedParseDouble,
@@ -3288,6 +3298,55 @@ const se_TrainedModelsConfigurationPolicy = (input: TrainedModelsConfigurationPo
32883298

32893299
// se_WorkerComputeConfiguration omitted.
32903300

3301+
/**
3302+
* deserializeAws_restJson1AccessBudget
3303+
*/
3304+
const de_AccessBudget = (output: any, context: __SerdeContext): AccessBudget => {
3305+
return take(output, {
3306+
aggregateRemainingBudget: __expectInt32,
3307+
details: (_: any) => de_AccessBudgetDetailsList(_, context),
3308+
resourceArn: __expectString,
3309+
}) as any;
3310+
};
3311+
3312+
/**
3313+
* deserializeAws_restJson1AccessBudgetDetails
3314+
*/
3315+
const de_AccessBudgetDetails = (output: any, context: __SerdeContext): AccessBudgetDetails => {
3316+
return take(output, {
3317+
autoRefresh: __expectString,
3318+
budget: __expectInt32,
3319+
budgetType: __expectString,
3320+
endTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3321+
remainingBudget: __expectInt32,
3322+
startTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3323+
}) as any;
3324+
};
3325+
3326+
/**
3327+
* deserializeAws_restJson1AccessBudgetDetailsList
3328+
*/
3329+
const de_AccessBudgetDetailsList = (output: any, context: __SerdeContext): AccessBudgetDetails[] => {
3330+
const retVal = (output || [])
3331+
.filter((e: any) => e != null)
3332+
.map((entry: any) => {
3333+
return de_AccessBudgetDetails(entry, context);
3334+
});
3335+
return retVal;
3336+
};
3337+
3338+
/**
3339+
* deserializeAws_restJson1AccessBudgets
3340+
*/
3341+
const de_AccessBudgets = (output: any, context: __SerdeContext): AccessBudget[] => {
3342+
const retVal = (output || [])
3343+
.filter((e: any) => e != null)
3344+
.map((entry: any) => {
3345+
return de_AccessBudget(entry, context);
3346+
});
3347+
return retVal;
3348+
};
3349+
32913350
// de_AccountIdList omitted.
32923351

32933352
// de_AudienceDestination omitted.
@@ -3785,6 +3844,18 @@ const de_MLInputChannelSummary = (output: any, context: __SerdeContext): MLInput
37853844

37863845
// de_ParameterMap omitted.
37873846

3847+
/**
3848+
* deserializeAws_restJson1PrivacyBudgets
3849+
*/
3850+
const de_PrivacyBudgets = (output: any, context: __SerdeContext): PrivacyBudgets => {
3851+
if (output.accessBudgets != null) {
3852+
return {
3853+
accessBudgets: de_AccessBudgets(output.accessBudgets, context),
3854+
};
3855+
}
3856+
return { $unknown: Object.entries(output)[0] };
3857+
};
3858+
37883859
/**
37893860
* deserializeAws_restJson1PrivacyConfiguration
37903861
*/

0 commit comments

Comments
 (0)