Skip to content

Commit

Permalink
feat(client-entityresolution): Support Batch Unique IDs Deletion.
Browse files Browse the repository at this point in the history
  • Loading branch information
awstools committed Apr 24, 2024
1 parent 6844bc3 commit 87c90f1
Show file tree
Hide file tree
Showing 8 changed files with 531 additions and 2 deletions.
8 changes: 8 additions & 0 deletions clients/client-entityresolution/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,14 @@ AddPolicyStatement

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/entityresolution/command/AddPolicyStatementCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-entityresolution/Interface/AddPolicyStatementCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-entityresolution/Interface/AddPolicyStatementCommandOutput/)

</details>
<details>
<summary>
BatchDeleteUniqueId
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/entityresolution/command/BatchDeleteUniqueIdCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-entityresolution/Interface/BatchDeleteUniqueIdCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-entityresolution/Interface/BatchDeleteUniqueIdCommandOutput/)

</details>
<details>
<summary>
Expand Down
23 changes: 23 additions & 0 deletions clients/client-entityresolution/src/EntityResolution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ import {
AddPolicyStatementCommandInput,
AddPolicyStatementCommandOutput,
} from "./commands/AddPolicyStatementCommand";
import {
BatchDeleteUniqueIdCommand,
BatchDeleteUniqueIdCommandInput,
BatchDeleteUniqueIdCommandOutput,
} from "./commands/BatchDeleteUniqueIdCommand";
import {
CreateIdMappingWorkflowCommand,
CreateIdMappingWorkflowCommandInput,
Expand Down Expand Up @@ -170,6 +175,7 @@ import { EntityResolutionClient, EntityResolutionClientConfig } from "./EntityRe

const commands = {
AddPolicyStatementCommand,
BatchDeleteUniqueIdCommand,
CreateIdMappingWorkflowCommand,
CreateIdNamespaceCommand,
CreateMatchingWorkflowCommand,
Expand Down Expand Up @@ -225,6 +231,23 @@ export interface EntityResolution {
cb: (err: any, data?: AddPolicyStatementCommandOutput) => void
): void;

/**
* @see {@link BatchDeleteUniqueIdCommand}
*/
batchDeleteUniqueId(
args: BatchDeleteUniqueIdCommandInput,
options?: __HttpHandlerOptions
): Promise<BatchDeleteUniqueIdCommandOutput>;
batchDeleteUniqueId(
args: BatchDeleteUniqueIdCommandInput,
cb: (err: any, data?: BatchDeleteUniqueIdCommandOutput) => void
): void;
batchDeleteUniqueId(
args: BatchDeleteUniqueIdCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: BatchDeleteUniqueIdCommandOutput) => void
): void;

/**
* @see {@link CreateIdMappingWorkflowCommand}
*/
Expand Down
6 changes: 6 additions & 0 deletions clients/client-entityresolution/src/EntityResolutionClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ import {
resolveHttpAuthSchemeConfig,
} from "./auth/httpAuthSchemeProvider";
import { AddPolicyStatementCommandInput, AddPolicyStatementCommandOutput } from "./commands/AddPolicyStatementCommand";
import {
BatchDeleteUniqueIdCommandInput,
BatchDeleteUniqueIdCommandOutput,
} from "./commands/BatchDeleteUniqueIdCommand";
import {
CreateIdMappingWorkflowCommandInput,
CreateIdMappingWorkflowCommandOutput,
Expand Down Expand Up @@ -153,6 +157,7 @@ export { __Client };
*/
export type ServiceInputTypes =
| AddPolicyStatementCommandInput
| BatchDeleteUniqueIdCommandInput
| CreateIdMappingWorkflowCommandInput
| CreateIdNamespaceCommandInput
| CreateMatchingWorkflowCommandInput
Expand Down Expand Up @@ -194,6 +199,7 @@ export type ServiceInputTypes =
*/
export type ServiceOutputTypes =
| AddPolicyStatementCommandOutput
| BatchDeleteUniqueIdCommandOutput
| CreateIdMappingWorkflowCommandOutput
| CreateIdNamespaceCommandOutput
| CreateMatchingWorkflowCommandOutput
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
// 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 { commonParams } from "../endpoint/EndpointParameters";
import { EntityResolutionClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EntityResolutionClient";
import { BatchDeleteUniqueIdInput, BatchDeleteUniqueIdOutput } from "../models/models_0";
import { de_BatchDeleteUniqueIdCommand, se_BatchDeleteUniqueIdCommand } from "../protocols/Aws_restJson1";

/**
* @public
*/
export { __MetadataBearer, $Command };
/**
* @public
*
* The input for {@link BatchDeleteUniqueIdCommand}.
*/
export interface BatchDeleteUniqueIdCommandInput extends BatchDeleteUniqueIdInput {}
/**
* @public
*
* The output of {@link BatchDeleteUniqueIdCommand}.
*/
export interface BatchDeleteUniqueIdCommandOutput extends BatchDeleteUniqueIdOutput, __MetadataBearer {}

/**
* <p>Deletes multiple unique IDs in a matching workflow.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { EntityResolutionClient, BatchDeleteUniqueIdCommand } from "@aws-sdk/client-entityresolution"; // ES Modules import
* // const { EntityResolutionClient, BatchDeleteUniqueIdCommand } = require("@aws-sdk/client-entityresolution"); // CommonJS import
* const client = new EntityResolutionClient(config);
* const input = { // BatchDeleteUniqueIdInput
* workflowName: "STRING_VALUE", // required
* inputSource: "STRING_VALUE",
* uniqueIds: [ // UniqueIdList // required
* "STRING_VALUE",
* ],
* };
* const command = new BatchDeleteUniqueIdCommand(input);
* const response = await client.send(command);
* // { // BatchDeleteUniqueIdOutput
* // status: "COMPLETED" || "ACCEPTED", // required
* // errors: [ // DeleteUniqueIdErrorsList // required
* // { // DeleteUniqueIdError
* // uniqueId: "STRING_VALUE", // required
* // errorType: "SERVICE_ERROR" || "VALIDATION_ERROR", // required
* // },
* // ],
* // deleted: [ // DeletedUniqueIdList // required
* // { // DeletedUniqueId
* // uniqueId: "STRING_VALUE", // required
* // },
* // ],
* // disconnectedUniqueIds: [ // DisconnectedUniqueIdsList // required
* // "STRING_VALUE",
* // ],
* // };
*
* ```
*
* @param BatchDeleteUniqueIdCommandInput - {@link BatchDeleteUniqueIdCommandInput}
* @returns {@link BatchDeleteUniqueIdCommandOutput}
* @see {@link BatchDeleteUniqueIdCommandInput} for command's `input` shape.
* @see {@link BatchDeleteUniqueIdCommandOutput} for command's `response` shape.
* @see {@link EntityResolutionClientResolvedConfig | config} for EntityResolutionClient's `config` shape.
*
* @throws {@link InternalServerException} (server fault)
* <p>This exception occurs when there is an internal failure in the Entity Resolution
* service. <code>HTTP Status Code: 500</code>
* </p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* <p>The resource could not be found. <code>HTTP Status Code: 404</code>
* </p>
*
* @throws {@link ValidationException} (client fault)
* <p>The input fails to satisfy the constraints specified by Entity Resolution. <code>HTTP
* Status Code: 400</code>
* </p>
*
* @throws {@link EntityResolutionServiceException}
* <p>Base exception class for all service exceptions from EntityResolution service.</p>
*
* @public
*/
export class BatchDeleteUniqueIdCommand extends $Command
.classBuilder<
BatchDeleteUniqueIdCommandInput,
BatchDeleteUniqueIdCommandOutput,
EntityResolutionClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes
>()
.ep({
...commonParams,
})
.m(function (this: any, Command: any, cs: any, config: EntityResolutionClientResolvedConfig, o: any) {
return [
getSerdePlugin(config, this.serialize, this.deserialize),
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
];
})
.s("AWSVeniceService", "BatchDeleteUniqueId", {})
.n("EntityResolutionClient", "BatchDeleteUniqueIdCommand")
.f(void 0, void 0)
.ser(se_BatchDeleteUniqueIdCommand)
.de(de_BatchDeleteUniqueIdCommand)
.build() {}
1 change: 1 addition & 0 deletions clients/client-entityresolution/src/commands/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// smithy-typescript generated code
export * from "./AddPolicyStatementCommand";
export * from "./BatchDeleteUniqueIdCommand";
export * from "./CreateIdMappingWorkflowCommand";
export * from "./CreateIdNamespaceCommand";
export * from "./CreateMatchingWorkflowCommand";
Expand Down
110 changes: 110 additions & 0 deletions clients/client-entityresolution/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,116 @@ export const AttributeMatchingModel = {
*/
export type AttributeMatchingModel = (typeof AttributeMatchingModel)[keyof typeof AttributeMatchingModel];

/**
* @public
*/
export interface BatchDeleteUniqueIdInput {
/**
* <p>The name of the workflow.</p>
* @public
*/
workflowName: string | undefined;

/**
* <p>The input source for the batch delete unique ID operation.</p>
* @public
*/
inputSource?: string;

/**
* <p>The unique IDs to delete.</p>
* @public
*/
uniqueIds: string[] | undefined;
}

/**
* <p>The deleted unique ID.</p>
* @public
*/
export interface DeletedUniqueId {
/**
* <p> The unique ID of the deleted item.</p>
* @public
*/
uniqueId: string | undefined;
}

/**
* @public
* @enum
*/
export const DeleteUniqueIdErrorType = {
SERVICE_ERROR: "SERVICE_ERROR",
VALIDATION_ERROR: "VALIDATION_ERROR",
} as const;

/**
* @public
*/
export type DeleteUniqueIdErrorType = (typeof DeleteUniqueIdErrorType)[keyof typeof DeleteUniqueIdErrorType];

/**
* <p>The Delete Unique Id error.</p>
* @public
*/
export interface DeleteUniqueIdError {
/**
* <p>The unique ID that could not be deleted.</p>
* @public
*/
uniqueId: string | undefined;

/**
* <p> The error type for the batch delete unique ID operation.</p>
* @public
*/
errorType: DeleteUniqueIdErrorType | undefined;
}

/**
* @public
* @enum
*/
export const DeleteUniqueIdStatus = {
ACCEPTED: "ACCEPTED",
COMPLETED: "COMPLETED",
} as const;

/**
* @public
*/
export type DeleteUniqueIdStatus = (typeof DeleteUniqueIdStatus)[keyof typeof DeleteUniqueIdStatus];

/**
* @public
*/
export interface BatchDeleteUniqueIdOutput {
/**
* <p>The status of the batch delete unique ID operation.</p>
* @public
*/
status: DeleteUniqueIdStatus | undefined;

/**
* <p> The errors from deleting multiple unique IDs.</p>
* @public
*/
errors: DeleteUniqueIdError[] | undefined;

/**
* <p>The unique IDs that were deleted.</p>
* @public
*/
deleted: DeletedUniqueId[] | undefined;

/**
* <p>The unique IDs that were disconnected.</p>
* @public
*/
disconnectedUniqueIds: string[] | undefined;
}

/**
* @public
* @enum
Expand Down
Loading

0 comments on commit 87c90f1

Please sign in to comment.