Skip to content

Commit 30e75ea

Browse files
author
awstools
committed
feat(client-cleanrooms): Feature: New schemaStatusDetails field to the existing Schema object that displays a status on Schema API responses to show whether a schema is queryable or not. New BatchGetSchemaAnalysisRule API to retrieve multiple schemaAnalysisRules using a single API call.
1 parent 36c6750 commit 30e75ea

File tree

10 files changed

+898
-20
lines changed

10 files changed

+898
-20
lines changed

clients/client-cleanrooms/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,14 @@ BatchGetSchema
226226

227227
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cleanrooms/command/BatchGetSchemaCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cleanrooms/Interface/BatchGetSchemaCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cleanrooms/Interface/BatchGetSchemaCommandOutput/)
228228

229+
</details>
230+
<details>
231+
<summary>
232+
BatchGetSchemaAnalysisRule
233+
</summary>
234+
235+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cleanrooms/command/BatchGetSchemaAnalysisRuleCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cleanrooms/Interface/BatchGetSchemaAnalysisRuleCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cleanrooms/Interface/BatchGetSchemaAnalysisRuleCommandOutput/)
236+
229237
</details>
230238
<details>
231239
<summary>

clients/client-cleanrooms/src/CleanRooms.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ import {
88
BatchGetCollaborationAnalysisTemplateCommandInput,
99
BatchGetCollaborationAnalysisTemplateCommandOutput,
1010
} from "./commands/BatchGetCollaborationAnalysisTemplateCommand";
11+
import {
12+
BatchGetSchemaAnalysisRuleCommand,
13+
BatchGetSchemaAnalysisRuleCommandInput,
14+
BatchGetSchemaAnalysisRuleCommandOutput,
15+
} from "./commands/BatchGetSchemaAnalysisRuleCommand";
1116
import {
1217
BatchGetSchemaCommand,
1318
BatchGetSchemaCommandInput,
@@ -301,6 +306,7 @@ import {
301306
const commands = {
302307
BatchGetCollaborationAnalysisTemplateCommand,
303308
BatchGetSchemaCommand,
309+
BatchGetSchemaAnalysisRuleCommand,
304310
CreateAnalysisTemplateCommand,
305311
CreateCollaborationCommand,
306312
CreateConfiguredAudienceModelAssociationCommand,
@@ -395,6 +401,23 @@ export interface CleanRooms {
395401
cb: (err: any, data?: BatchGetSchemaCommandOutput) => void
396402
): void;
397403

404+
/**
405+
* @see {@link BatchGetSchemaAnalysisRuleCommand}
406+
*/
407+
batchGetSchemaAnalysisRule(
408+
args: BatchGetSchemaAnalysisRuleCommandInput,
409+
options?: __HttpHandlerOptions
410+
): Promise<BatchGetSchemaAnalysisRuleCommandOutput>;
411+
batchGetSchemaAnalysisRule(
412+
args: BatchGetSchemaAnalysisRuleCommandInput,
413+
cb: (err: any, data?: BatchGetSchemaAnalysisRuleCommandOutput) => void
414+
): void;
415+
batchGetSchemaAnalysisRule(
416+
args: BatchGetSchemaAnalysisRuleCommandInput,
417+
options: __HttpHandlerOptions,
418+
cb: (err: any, data?: BatchGetSchemaAnalysisRuleCommandOutput) => void
419+
): void;
420+
398421
/**
399422
* @see {@link CreateAnalysisTemplateCommand}
400423
*/

clients/client-cleanrooms/src/CleanRoomsClient.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ import {
5757
BatchGetCollaborationAnalysisTemplateCommandInput,
5858
BatchGetCollaborationAnalysisTemplateCommandOutput,
5959
} from "./commands/BatchGetCollaborationAnalysisTemplateCommand";
60+
import {
61+
BatchGetSchemaAnalysisRuleCommandInput,
62+
BatchGetSchemaAnalysisRuleCommandOutput,
63+
} from "./commands/BatchGetSchemaAnalysisRuleCommand";
6064
import { BatchGetSchemaCommandInput, BatchGetSchemaCommandOutput } from "./commands/BatchGetSchemaCommand";
6165
import {
6266
CreateAnalysisTemplateCommandInput,
@@ -266,6 +270,7 @@ export { __Client };
266270
*/
267271
export type ServiceInputTypes =
268272
| BatchGetCollaborationAnalysisTemplateCommandInput
273+
| BatchGetSchemaAnalysisRuleCommandInput
269274
| BatchGetSchemaCommandInput
270275
| CreateAnalysisTemplateCommandInput
271276
| CreateCollaborationCommandInput
@@ -333,6 +338,7 @@ export type ServiceInputTypes =
333338
*/
334339
export type ServiceOutputTypes =
335340
| BatchGetCollaborationAnalysisTemplateCommandOutput
341+
| BatchGetSchemaAnalysisRuleCommandOutput
336342
| BatchGetSchemaCommandOutput
337343
| CreateAnalysisTemplateCommandOutput
338344
| CreateCollaborationCommandOutput
Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
// smithy-typescript generated code
2+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3+
import { getSerdePlugin } from "@smithy/middleware-serde";
4+
import { Command as $Command } from "@smithy/smithy-client";
5+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
6+
7+
import { CleanRoomsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CleanRoomsClient";
8+
import { commonParams } from "../endpoint/EndpointParameters";
9+
import { BatchGetSchemaAnalysisRuleInput, BatchGetSchemaAnalysisRuleOutput } from "../models/models_0";
10+
import { de_BatchGetSchemaAnalysisRuleCommand, se_BatchGetSchemaAnalysisRuleCommand } from "../protocols/Aws_restJson1";
11+
12+
/**
13+
* @public
14+
*/
15+
export { __MetadataBearer, $Command };
16+
/**
17+
* @public
18+
*
19+
* The input for {@link BatchGetSchemaAnalysisRuleCommand}.
20+
*/
21+
export interface BatchGetSchemaAnalysisRuleCommandInput extends BatchGetSchemaAnalysisRuleInput {}
22+
/**
23+
* @public
24+
*
25+
* The output of {@link BatchGetSchemaAnalysisRuleCommand}.
26+
*/
27+
export interface BatchGetSchemaAnalysisRuleCommandOutput extends BatchGetSchemaAnalysisRuleOutput, __MetadataBearer {}
28+
29+
/**
30+
* <p>Retrieves multiple analysis rule schemas.</p>
31+
* @example
32+
* Use a bare-bones client and the command you need to make an API call.
33+
* ```javascript
34+
* import { CleanRoomsClient, BatchGetSchemaAnalysisRuleCommand } from "@aws-sdk/client-cleanrooms"; // ES Modules import
35+
* // const { CleanRoomsClient, BatchGetSchemaAnalysisRuleCommand } = require("@aws-sdk/client-cleanrooms"); // CommonJS import
36+
* const client = new CleanRoomsClient(config);
37+
* const input = { // BatchGetSchemaAnalysisRuleInput
38+
* collaborationIdentifier: "STRING_VALUE", // required
39+
* schemaAnalysisRuleRequests: [ // SchemaAnalysisRuleRequestList // required
40+
* { // SchemaAnalysisRuleRequest
41+
* name: "STRING_VALUE", // required
42+
* type: "AGGREGATION" || "LIST" || "CUSTOM", // required
43+
* },
44+
* ],
45+
* };
46+
* const command = new BatchGetSchemaAnalysisRuleCommand(input);
47+
* const response = await client.send(command);
48+
* // { // BatchGetSchemaAnalysisRuleOutput
49+
* // analysisRules: [ // SchemaAnalysisRuleList // required
50+
* // { // AnalysisRule
51+
* // collaborationId: "STRING_VALUE", // required
52+
* // type: "AGGREGATION" || "LIST" || "CUSTOM", // required
53+
* // name: "STRING_VALUE", // required
54+
* // createTime: new Date("TIMESTAMP"), // required
55+
* // updateTime: new Date("TIMESTAMP"), // required
56+
* // policy: { // AnalysisRulePolicy Union: only one key present
57+
* // v1: { // AnalysisRulePolicyV1 Union: only one key present
58+
* // list: { // AnalysisRuleList
59+
* // joinColumns: [ // AnalysisRuleColumnList // required
60+
* // "STRING_VALUE",
61+
* // ],
62+
* // allowedJoinOperators: [ // JoinOperatorsList
63+
* // "STRING_VALUE",
64+
* // ],
65+
* // listColumns: [ // required
66+
* // "STRING_VALUE",
67+
* // ],
68+
* // },
69+
* // aggregation: { // AnalysisRuleAggregation
70+
* // aggregateColumns: [ // AggregateColumnList // required
71+
* // { // AggregateColumn
72+
* // columnNames: [ // AnalysisRuleColumnNameList // required
73+
* // "STRING_VALUE",
74+
* // ],
75+
* // function: "STRING_VALUE", // required
76+
* // },
77+
* // ],
78+
* // joinColumns: [ // required
79+
* // "STRING_VALUE",
80+
* // ],
81+
* // joinRequired: "STRING_VALUE",
82+
* // allowedJoinOperators: [
83+
* // "STRING_VALUE",
84+
* // ],
85+
* // dimensionColumns: [ // required
86+
* // "STRING_VALUE",
87+
* // ],
88+
* // scalarFunctions: [ // ScalarFunctionsList // required
89+
* // "STRING_VALUE",
90+
* // ],
91+
* // outputConstraints: [ // AggregationConstraints // required
92+
* // { // AggregationConstraint
93+
* // columnName: "STRING_VALUE", // required
94+
* // minimum: Number("int"), // required
95+
* // type: "STRING_VALUE", // required
96+
* // },
97+
* // ],
98+
* // },
99+
* // custom: { // AnalysisRuleCustom
100+
* // allowedAnalyses: [ // AllowedAnalysesList // required
101+
* // "STRING_VALUE",
102+
* // ],
103+
* // allowedAnalysisProviders: [ // AllowedAnalysisProviderList
104+
* // "STRING_VALUE",
105+
* // ],
106+
* // differentialPrivacy: { // DifferentialPrivacyConfiguration
107+
* // columns: [ // DifferentialPrivacyColumnList // required
108+
* // { // DifferentialPrivacyColumn
109+
* // name: "STRING_VALUE", // required
110+
* // },
111+
* // ],
112+
* // },
113+
* // },
114+
* // },
115+
* // },
116+
* // },
117+
* // ],
118+
* // errors: [ // BatchGetSchemaAnalysisRuleErrorList // required
119+
* // { // BatchGetSchemaAnalysisRuleError
120+
* // name: "STRING_VALUE", // required
121+
* // type: "AGGREGATION" || "LIST" || "CUSTOM", // required
122+
* // code: "STRING_VALUE", // required
123+
* // message: "STRING_VALUE", // required
124+
* // },
125+
* // ],
126+
* // };
127+
*
128+
* ```
129+
*
130+
* @param BatchGetSchemaAnalysisRuleCommandInput - {@link BatchGetSchemaAnalysisRuleCommandInput}
131+
* @returns {@link BatchGetSchemaAnalysisRuleCommandOutput}
132+
* @see {@link BatchGetSchemaAnalysisRuleCommandInput} for command's `input` shape.
133+
* @see {@link BatchGetSchemaAnalysisRuleCommandOutput} for command's `response` shape.
134+
* @see {@link CleanRoomsClientResolvedConfig | config} for CleanRoomsClient's `config` shape.
135+
*
136+
* @throws {@link AccessDeniedException} (client fault)
137+
* <p>Caller does not have sufficient access to perform this action.</p>
138+
*
139+
* @throws {@link InternalServerException} (server fault)
140+
* <p>Unexpected error during processing of request.</p>
141+
*
142+
* @throws {@link ResourceNotFoundException} (client fault)
143+
* <p>Request references a resource which does not exist.</p>
144+
*
145+
* @throws {@link ThrottlingException} (client fault)
146+
* <p>Request was denied due to request throttling.</p>
147+
*
148+
* @throws {@link ValidationException} (client fault)
149+
* <p>The input fails to satisfy the specified constraints.</p>
150+
*
151+
* @throws {@link CleanRoomsServiceException}
152+
* <p>Base exception class for all service exceptions from CleanRooms service.</p>
153+
*
154+
* @public
155+
*/
156+
export class BatchGetSchemaAnalysisRuleCommand extends $Command
157+
.classBuilder<
158+
BatchGetSchemaAnalysisRuleCommandInput,
159+
BatchGetSchemaAnalysisRuleCommandOutput,
160+
CleanRoomsClientResolvedConfig,
161+
ServiceInputTypes,
162+
ServiceOutputTypes
163+
>()
164+
.ep({
165+
...commonParams,
166+
})
167+
.m(function (this: any, Command: any, cs: any, config: CleanRoomsClientResolvedConfig, o: any) {
168+
return [
169+
getSerdePlugin(config, this.serialize, this.deserialize),
170+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
171+
];
172+
})
173+
.s("AWSBastionControlPlaneServiceLambda", "BatchGetSchemaAnalysisRule", {})
174+
.n("CleanRoomsClient", "BatchGetSchemaAnalysisRuleCommand")
175+
.f(void 0, void 0)
176+
.ser(se_BatchGetSchemaAnalysisRuleCommand)
177+
.de(de_BatchGetSchemaAnalysisRuleCommand)
178+
.build() {}

clients/client-cleanrooms/src/commands/BatchGetSchemaCommand.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,21 @@ export interface BatchGetSchemaCommandOutput extends BatchGetSchemaOutput, __Met
6969
* // createTime: new Date("TIMESTAMP"), // required
7070
* // updateTime: new Date("TIMESTAMP"), // required
7171
* // type: "TABLE", // required
72+
* // schemaStatusDetails: [ // SchemaStatusDetailList // required
73+
* // { // SchemaStatusDetail
74+
* // status: "READY" || "NOT_READY", // required
75+
* // reasons: [ // SchemaStatusReasonList
76+
* // { // SchemaStatusReason
77+
* // code: "ANALYSIS_RULE_MISSING" || "ANALYSIS_TEMPLATES_NOT_CONFIGURED" || "ANALYSIS_PROVIDERS_NOT_CONFIGURED" || "DIFFERENTIAL_PRIVACY_POLICY_NOT_CONFIGURED", // required
78+
* // message: "STRING_VALUE", // required
79+
* // },
80+
* // ],
81+
* // analysisRuleType: "AGGREGATION" || "LIST" || "CUSTOM",
82+
* // configurations: [ // SchemaConfigurationList
83+
* // "DIFFERENTIAL_PRIVACY",
84+
* // ],
85+
* // },
86+
* // ],
7287
* // },
7388
* // ],
7489
* // errors: [ // BatchGetSchemaErrorList // required

clients/client-cleanrooms/src/commands/GetSchemaCommand.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,21 @@ export interface GetSchemaCommandOutput extends GetSchemaOutput, __MetadataBeare
6666
* // createTime: new Date("TIMESTAMP"), // required
6767
* // updateTime: new Date("TIMESTAMP"), // required
6868
* // type: "TABLE", // required
69+
* // schemaStatusDetails: [ // SchemaStatusDetailList // required
70+
* // { // SchemaStatusDetail
71+
* // status: "READY" || "NOT_READY", // required
72+
* // reasons: [ // SchemaStatusReasonList
73+
* // { // SchemaStatusReason
74+
* // code: "ANALYSIS_RULE_MISSING" || "ANALYSIS_TEMPLATES_NOT_CONFIGURED" || "ANALYSIS_PROVIDERS_NOT_CONFIGURED" || "DIFFERENTIAL_PRIVACY_POLICY_NOT_CONFIGURED", // required
75+
* // message: "STRING_VALUE", // required
76+
* // },
77+
* // ],
78+
* // analysisRuleType: "AGGREGATION" || "LIST" || "CUSTOM",
79+
* // configurations: [ // SchemaConfigurationList
80+
* // "DIFFERENTIAL_PRIVACY",
81+
* // ],
82+
* // },
83+
* // ],
6984
* // },
7085
* // };
7186
*

clients/client-cleanrooms/src/commands/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// smithy-typescript generated code
22
export * from "./BatchGetCollaborationAnalysisTemplateCommand";
3+
export * from "./BatchGetSchemaAnalysisRuleCommand";
34
export * from "./BatchGetSchemaCommand";
45
export * from "./CreateAnalysisTemplateCommand";
56
export * from "./CreateCollaborationCommand";

0 commit comments

Comments
 (0)