Skip to content

Commit

Permalink
feat(client-cleanrooms): Feature: New schemaStatusDetails field to th…
Browse files Browse the repository at this point in the history
…e 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.
  • Loading branch information
awstools committed Apr 4, 2024
1 parent 36c6750 commit 30e75ea
Show file tree
Hide file tree
Showing 10 changed files with 898 additions and 20 deletions.
8 changes: 8 additions & 0 deletions clients/client-cleanrooms/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,14 @@ BatchGetSchema

[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/)

</details>
<details>
<summary>
BatchGetSchemaAnalysisRule
</summary>

[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/)

</details>
<details>
<summary>
Expand Down
23 changes: 23 additions & 0 deletions clients/client-cleanrooms/src/CleanRooms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ import {
BatchGetCollaborationAnalysisTemplateCommandInput,
BatchGetCollaborationAnalysisTemplateCommandOutput,
} from "./commands/BatchGetCollaborationAnalysisTemplateCommand";
import {
BatchGetSchemaAnalysisRuleCommand,
BatchGetSchemaAnalysisRuleCommandInput,
BatchGetSchemaAnalysisRuleCommandOutput,
} from "./commands/BatchGetSchemaAnalysisRuleCommand";
import {
BatchGetSchemaCommand,
BatchGetSchemaCommandInput,
Expand Down Expand Up @@ -301,6 +306,7 @@ import {
const commands = {
BatchGetCollaborationAnalysisTemplateCommand,
BatchGetSchemaCommand,
BatchGetSchemaAnalysisRuleCommand,
CreateAnalysisTemplateCommand,
CreateCollaborationCommand,
CreateConfiguredAudienceModelAssociationCommand,
Expand Down Expand Up @@ -395,6 +401,23 @@ export interface CleanRooms {
cb: (err: any, data?: BatchGetSchemaCommandOutput) => void
): void;

/**
* @see {@link BatchGetSchemaAnalysisRuleCommand}
*/
batchGetSchemaAnalysisRule(
args: BatchGetSchemaAnalysisRuleCommandInput,
options?: __HttpHandlerOptions
): Promise<BatchGetSchemaAnalysisRuleCommandOutput>;
batchGetSchemaAnalysisRule(
args: BatchGetSchemaAnalysisRuleCommandInput,
cb: (err: any, data?: BatchGetSchemaAnalysisRuleCommandOutput) => void
): void;
batchGetSchemaAnalysisRule(
args: BatchGetSchemaAnalysisRuleCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: BatchGetSchemaAnalysisRuleCommandOutput) => void
): void;

/**
* @see {@link CreateAnalysisTemplateCommand}
*/
Expand Down
6 changes: 6 additions & 0 deletions clients/client-cleanrooms/src/CleanRoomsClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ import {
BatchGetCollaborationAnalysisTemplateCommandInput,
BatchGetCollaborationAnalysisTemplateCommandOutput,
} from "./commands/BatchGetCollaborationAnalysisTemplateCommand";
import {
BatchGetSchemaAnalysisRuleCommandInput,
BatchGetSchemaAnalysisRuleCommandOutput,
} from "./commands/BatchGetSchemaAnalysisRuleCommand";
import { BatchGetSchemaCommandInput, BatchGetSchemaCommandOutput } from "./commands/BatchGetSchemaCommand";
import {
CreateAnalysisTemplateCommandInput,
Expand Down Expand Up @@ -266,6 +270,7 @@ export { __Client };
*/
export type ServiceInputTypes =
| BatchGetCollaborationAnalysisTemplateCommandInput
| BatchGetSchemaAnalysisRuleCommandInput
| BatchGetSchemaCommandInput
| CreateAnalysisTemplateCommandInput
| CreateCollaborationCommandInput
Expand Down Expand Up @@ -333,6 +338,7 @@ export type ServiceInputTypes =
*/
export type ServiceOutputTypes =
| BatchGetCollaborationAnalysisTemplateCommandOutput
| BatchGetSchemaAnalysisRuleCommandOutput
| BatchGetSchemaCommandOutput
| CreateAnalysisTemplateCommandOutput
| CreateCollaborationCommandOutput
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
// smithy-typescript generated code
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { getSerdePlugin } from "@smithy/middleware-serde";
import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { CleanRoomsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CleanRoomsClient";
import { commonParams } from "../endpoint/EndpointParameters";
import { BatchGetSchemaAnalysisRuleInput, BatchGetSchemaAnalysisRuleOutput } from "../models/models_0";
import { de_BatchGetSchemaAnalysisRuleCommand, se_BatchGetSchemaAnalysisRuleCommand } from "../protocols/Aws_restJson1";

/**
* @public
*/
export { __MetadataBearer, $Command };
/**
* @public
*
* The input for {@link BatchGetSchemaAnalysisRuleCommand}.
*/
export interface BatchGetSchemaAnalysisRuleCommandInput extends BatchGetSchemaAnalysisRuleInput {}
/**
* @public
*
* The output of {@link BatchGetSchemaAnalysisRuleCommand}.
*/
export interface BatchGetSchemaAnalysisRuleCommandOutput extends BatchGetSchemaAnalysisRuleOutput, __MetadataBearer {}

/**
* <p>Retrieves multiple analysis rule schemas.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { CleanRoomsClient, BatchGetSchemaAnalysisRuleCommand } from "@aws-sdk/client-cleanrooms"; // ES Modules import
* // const { CleanRoomsClient, BatchGetSchemaAnalysisRuleCommand } = require("@aws-sdk/client-cleanrooms"); // CommonJS import
* const client = new CleanRoomsClient(config);
* const input = { // BatchGetSchemaAnalysisRuleInput
* collaborationIdentifier: "STRING_VALUE", // required
* schemaAnalysisRuleRequests: [ // SchemaAnalysisRuleRequestList // required
* { // SchemaAnalysisRuleRequest
* name: "STRING_VALUE", // required
* type: "AGGREGATION" || "LIST" || "CUSTOM", // required
* },
* ],
* };
* const command = new BatchGetSchemaAnalysisRuleCommand(input);
* const response = await client.send(command);
* // { // BatchGetSchemaAnalysisRuleOutput
* // analysisRules: [ // SchemaAnalysisRuleList // required
* // { // AnalysisRule
* // collaborationId: "STRING_VALUE", // required
* // type: "AGGREGATION" || "LIST" || "CUSTOM", // required
* // name: "STRING_VALUE", // required
* // createTime: new Date("TIMESTAMP"), // required
* // updateTime: new Date("TIMESTAMP"), // required
* // policy: { // AnalysisRulePolicy Union: only one key present
* // v1: { // AnalysisRulePolicyV1 Union: only one key present
* // list: { // AnalysisRuleList
* // joinColumns: [ // AnalysisRuleColumnList // required
* // "STRING_VALUE",
* // ],
* // allowedJoinOperators: [ // JoinOperatorsList
* // "STRING_VALUE",
* // ],
* // listColumns: [ // required
* // "STRING_VALUE",
* // ],
* // },
* // aggregation: { // AnalysisRuleAggregation
* // aggregateColumns: [ // AggregateColumnList // required
* // { // AggregateColumn
* // columnNames: [ // AnalysisRuleColumnNameList // required
* // "STRING_VALUE",
* // ],
* // function: "STRING_VALUE", // required
* // },
* // ],
* // joinColumns: [ // required
* // "STRING_VALUE",
* // ],
* // joinRequired: "STRING_VALUE",
* // allowedJoinOperators: [
* // "STRING_VALUE",
* // ],
* // dimensionColumns: [ // required
* // "STRING_VALUE",
* // ],
* // scalarFunctions: [ // ScalarFunctionsList // required
* // "STRING_VALUE",
* // ],
* // outputConstraints: [ // AggregationConstraints // required
* // { // AggregationConstraint
* // columnName: "STRING_VALUE", // required
* // minimum: Number("int"), // required
* // type: "STRING_VALUE", // required
* // },
* // ],
* // },
* // custom: { // AnalysisRuleCustom
* // allowedAnalyses: [ // AllowedAnalysesList // required
* // "STRING_VALUE",
* // ],
* // allowedAnalysisProviders: [ // AllowedAnalysisProviderList
* // "STRING_VALUE",
* // ],
* // differentialPrivacy: { // DifferentialPrivacyConfiguration
* // columns: [ // DifferentialPrivacyColumnList // required
* // { // DifferentialPrivacyColumn
* // name: "STRING_VALUE", // required
* // },
* // ],
* // },
* // },
* // },
* // },
* // },
* // ],
* // errors: [ // BatchGetSchemaAnalysisRuleErrorList // required
* // { // BatchGetSchemaAnalysisRuleError
* // name: "STRING_VALUE", // required
* // type: "AGGREGATION" || "LIST" || "CUSTOM", // required
* // code: "STRING_VALUE", // required
* // message: "STRING_VALUE", // required
* // },
* // ],
* // };
*
* ```
*
* @param BatchGetSchemaAnalysisRuleCommandInput - {@link BatchGetSchemaAnalysisRuleCommandInput}
* @returns {@link BatchGetSchemaAnalysisRuleCommandOutput}
* @see {@link BatchGetSchemaAnalysisRuleCommandInput} for command's `input` shape.
* @see {@link BatchGetSchemaAnalysisRuleCommandOutput} for command's `response` shape.
* @see {@link CleanRoomsClientResolvedConfig | config} for CleanRoomsClient's `config` shape.
*
* @throws {@link AccessDeniedException} (client fault)
* <p>Caller does not have sufficient access to perform this action.</p>
*
* @throws {@link InternalServerException} (server fault)
* <p>Unexpected error during processing of request.</p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* <p>Request references a resource which does not exist.</p>
*
* @throws {@link ThrottlingException} (client fault)
* <p>Request was denied due to request throttling.</p>
*
* @throws {@link ValidationException} (client fault)
* <p>The input fails to satisfy the specified constraints.</p>
*
* @throws {@link CleanRoomsServiceException}
* <p>Base exception class for all service exceptions from CleanRooms service.</p>
*
* @public
*/
export class BatchGetSchemaAnalysisRuleCommand extends $Command
.classBuilder<
BatchGetSchemaAnalysisRuleCommandInput,
BatchGetSchemaAnalysisRuleCommandOutput,
CleanRoomsClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes
>()
.ep({
...commonParams,
})
.m(function (this: any, Command: any, cs: any, config: CleanRoomsClientResolvedConfig, o: any) {
return [
getSerdePlugin(config, this.serialize, this.deserialize),
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
];
})
.s("AWSBastionControlPlaneServiceLambda", "BatchGetSchemaAnalysisRule", {})
.n("CleanRoomsClient", "BatchGetSchemaAnalysisRuleCommand")
.f(void 0, void 0)
.ser(se_BatchGetSchemaAnalysisRuleCommand)
.de(de_BatchGetSchemaAnalysisRuleCommand)
.build() {}
15 changes: 15 additions & 0 deletions clients/client-cleanrooms/src/commands/BatchGetSchemaCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,21 @@ export interface BatchGetSchemaCommandOutput extends BatchGetSchemaOutput, __Met
* // createTime: new Date("TIMESTAMP"), // required
* // updateTime: new Date("TIMESTAMP"), // required
* // type: "TABLE", // required
* // schemaStatusDetails: [ // SchemaStatusDetailList // required
* // { // SchemaStatusDetail
* // status: "READY" || "NOT_READY", // required
* // reasons: [ // SchemaStatusReasonList
* // { // SchemaStatusReason
* // code: "ANALYSIS_RULE_MISSING" || "ANALYSIS_TEMPLATES_NOT_CONFIGURED" || "ANALYSIS_PROVIDERS_NOT_CONFIGURED" || "DIFFERENTIAL_PRIVACY_POLICY_NOT_CONFIGURED", // required
* // message: "STRING_VALUE", // required
* // },
* // ],
* // analysisRuleType: "AGGREGATION" || "LIST" || "CUSTOM",
* // configurations: [ // SchemaConfigurationList
* // "DIFFERENTIAL_PRIVACY",
* // ],
* // },
* // ],
* // },
* // ],
* // errors: [ // BatchGetSchemaErrorList // required
Expand Down
15 changes: 15 additions & 0 deletions clients/client-cleanrooms/src/commands/GetSchemaCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,21 @@ export interface GetSchemaCommandOutput extends GetSchemaOutput, __MetadataBeare
* // createTime: new Date("TIMESTAMP"), // required
* // updateTime: new Date("TIMESTAMP"), // required
* // type: "TABLE", // required
* // schemaStatusDetails: [ // SchemaStatusDetailList // required
* // { // SchemaStatusDetail
* // status: "READY" || "NOT_READY", // required
* // reasons: [ // SchemaStatusReasonList
* // { // SchemaStatusReason
* // code: "ANALYSIS_RULE_MISSING" || "ANALYSIS_TEMPLATES_NOT_CONFIGURED" || "ANALYSIS_PROVIDERS_NOT_CONFIGURED" || "DIFFERENTIAL_PRIVACY_POLICY_NOT_CONFIGURED", // required
* // message: "STRING_VALUE", // required
* // },
* // ],
* // analysisRuleType: "AGGREGATION" || "LIST" || "CUSTOM",
* // configurations: [ // SchemaConfigurationList
* // "DIFFERENTIAL_PRIVACY",
* // ],
* // },
* // ],
* // },
* // };
*
Expand Down
1 change: 1 addition & 0 deletions clients/client-cleanrooms/src/commands/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// smithy-typescript generated code
export * from "./BatchGetCollaborationAnalysisTemplateCommand";
export * from "./BatchGetSchemaAnalysisRuleCommand";
export * from "./BatchGetSchemaCommand";
export * from "./CreateAnalysisTemplateCommand";
export * from "./CreateCollaborationCommand";
Expand Down
Loading

0 comments on commit 30e75ea

Please sign in to comment.