Skip to content

Commit

Permalink
feat(client-appintegrations): The Amazon AppIntegrations service adds…
Browse files Browse the repository at this point in the history
… DeleteApplication API for deleting applications, and updates APIs to support third party applications reacting to workspace events and make data requests to Amazon Connect for agent and contact events.
  • Loading branch information
awstools committed Dec 21, 2023
1 parent b7416af commit 83dc3ef
Show file tree
Hide file tree
Showing 14 changed files with 1,066 additions and 5 deletions.
16 changes: 16 additions & 0 deletions clients/client-appintegrations/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,14 @@ CreateEventIntegration

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/appintegrations/command/CreateEventIntegrationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-appintegrations/Interface/CreateEventIntegrationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-appintegrations/Interface/CreateEventIntegrationCommandOutput/)

</details>
<details>
<summary>
DeleteApplication
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/appintegrations/command/DeleteApplicationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-appintegrations/Interface/DeleteApplicationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-appintegrations/Interface/DeleteApplicationCommandOutput/)

</details>
<details>
<summary>
Expand Down Expand Up @@ -272,6 +280,14 @@ GetEventIntegration

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/appintegrations/command/GetEventIntegrationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-appintegrations/Interface/GetEventIntegrationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-appintegrations/Interface/GetEventIntegrationCommandOutput/)

</details>
<details>
<summary>
ListApplicationAssociations
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/appintegrations/command/ListApplicationAssociationsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-appintegrations/Interface/ListApplicationAssociationsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-appintegrations/Interface/ListApplicationAssociationsCommandOutput/)

</details>
<details>
<summary>
Expand Down
46 changes: 46 additions & 0 deletions clients/client-appintegrations/src/AppIntegrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ import {
CreateEventIntegrationCommandInput,
CreateEventIntegrationCommandOutput,
} from "./commands/CreateEventIntegrationCommand";
import {
DeleteApplicationCommand,
DeleteApplicationCommandInput,
DeleteApplicationCommandOutput,
} from "./commands/DeleteApplicationCommand";
import {
DeleteDataIntegrationCommand,
DeleteDataIntegrationCommandInput,
Expand All @@ -43,6 +48,11 @@ import {
GetEventIntegrationCommandInput,
GetEventIntegrationCommandOutput,
} from "./commands/GetEventIntegrationCommand";
import {
ListApplicationAssociationsCommand,
ListApplicationAssociationsCommandInput,
ListApplicationAssociationsCommandOutput,
} from "./commands/ListApplicationAssociationsCommand";
import {
ListApplicationsCommand,
ListApplicationsCommandInput,
Expand Down Expand Up @@ -99,11 +109,13 @@ const commands = {
CreateApplicationCommand,
CreateDataIntegrationCommand,
CreateEventIntegrationCommand,
DeleteApplicationCommand,
DeleteDataIntegrationCommand,
DeleteEventIntegrationCommand,
GetApplicationCommand,
GetDataIntegrationCommand,
GetEventIntegrationCommand,
ListApplicationAssociationsCommand,
ListApplicationsCommand,
ListDataIntegrationAssociationsCommand,
ListDataIntegrationsCommand,
Expand Down Expand Up @@ -169,6 +181,23 @@ export interface AppIntegrations {
cb: (err: any, data?: CreateEventIntegrationCommandOutput) => void
): void;

/**
* @see {@link DeleteApplicationCommand}
*/
deleteApplication(
args: DeleteApplicationCommandInput,
options?: __HttpHandlerOptions
): Promise<DeleteApplicationCommandOutput>;
deleteApplication(
args: DeleteApplicationCommandInput,
cb: (err: any, data?: DeleteApplicationCommandOutput) => void
): void;
deleteApplication(
args: DeleteApplicationCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: DeleteApplicationCommandOutput) => void
): void;

/**
* @see {@link DeleteDataIntegrationCommand}
*/
Expand Down Expand Up @@ -251,6 +280,23 @@ export interface AppIntegrations {
cb: (err: any, data?: GetEventIntegrationCommandOutput) => void
): void;

/**
* @see {@link ListApplicationAssociationsCommand}
*/
listApplicationAssociations(
args: ListApplicationAssociationsCommandInput,
options?: __HttpHandlerOptions
): Promise<ListApplicationAssociationsCommandOutput>;
listApplicationAssociations(
args: ListApplicationAssociationsCommandInput,
cb: (err: any, data?: ListApplicationAssociationsCommandOutput) => void
): void;
listApplicationAssociations(
args: ListApplicationAssociationsCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: ListApplicationAssociationsCommandOutput) => void
): void;

/**
* @see {@link ListApplicationsCommand}
*/
Expand Down
9 changes: 9 additions & 0 deletions clients/client-appintegrations/src/AppIntegrationsClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ import {
CreateEventIntegrationCommandInput,
CreateEventIntegrationCommandOutput,
} from "./commands/CreateEventIntegrationCommand";
import { DeleteApplicationCommandInput, DeleteApplicationCommandOutput } from "./commands/DeleteApplicationCommand";
import {
DeleteDataIntegrationCommandInput,
DeleteDataIntegrationCommandOutput,
Expand All @@ -71,6 +72,10 @@ import {
GetEventIntegrationCommandInput,
GetEventIntegrationCommandOutput,
} from "./commands/GetEventIntegrationCommand";
import {
ListApplicationAssociationsCommandInput,
ListApplicationAssociationsCommandOutput,
} from "./commands/ListApplicationAssociationsCommand";
import { ListApplicationsCommandInput, ListApplicationsCommandOutput } from "./commands/ListApplicationsCommand";
import {
ListDataIntegrationAssociationsCommandInput,
Expand Down Expand Up @@ -121,11 +126,13 @@ export type ServiceInputTypes =
| CreateApplicationCommandInput
| CreateDataIntegrationCommandInput
| CreateEventIntegrationCommandInput
| DeleteApplicationCommandInput
| DeleteDataIntegrationCommandInput
| DeleteEventIntegrationCommandInput
| GetApplicationCommandInput
| GetDataIntegrationCommandInput
| GetEventIntegrationCommandInput
| ListApplicationAssociationsCommandInput
| ListApplicationsCommandInput
| ListDataIntegrationAssociationsCommandInput
| ListDataIntegrationsCommandInput
Expand All @@ -145,11 +152,13 @@ export type ServiceOutputTypes =
| CreateApplicationCommandOutput
| CreateDataIntegrationCommandOutput
| CreateEventIntegrationCommandOutput
| DeleteApplicationCommandOutput
| DeleteDataIntegrationCommandOutput
| DeleteEventIntegrationCommandOutput
| GetApplicationCommandOutput
| GetDataIntegrationCommandOutput
| GetEventIntegrationCommandOutput
| ListApplicationAssociationsCommandOutput
| ListApplicationsCommandOutput
| ListDataIntegrationAssociationsCommandOutput
| ListDataIntegrationsCommandOutput
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ export interface CreateApplicationCommandOutput extends CreateApplicationRespons
* Tags: { // TagMap
* "<keys>": "STRING_VALUE",
* },
* Permissions: [ // PermissionList
* "STRING_VALUE",
* ],
* };
* const command = new CreateApplicationCommand(input);
* const response = await client.send(command);
Expand Down Expand Up @@ -108,6 +111,9 @@ export interface CreateApplicationCommandOutput extends CreateApplicationRespons
* @throws {@link ThrottlingException} (client fault)
* <p>The throttling limit has been exceeded.</p>
*
* @throws {@link UnsupportedOperationException} (client fault)
* <p>The operation is not supported.</p>
*
* @throws {@link AppIntegrationsServiceException}
* <p>Base exception class for all service exceptions from AppIntegrations service.</p>
*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
// smithy-typescript generated code
import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint";
import { getSerdePlugin } from "@smithy/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
import { Command as $Command } from "@smithy/smithy-client";
import {
FinalizeHandlerArguments,
Handler,
HandlerExecutionContext,
HttpHandlerOptions as __HttpHandlerOptions,
MetadataBearer as __MetadataBearer,
MiddlewareStack,
SerdeContext as __SerdeContext,
SMITHY_CONTEXT_KEY,
} from "@smithy/types";

import { AppIntegrationsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AppIntegrationsClient";
import { DeleteApplicationRequest, DeleteApplicationResponse } from "../models/models_0";
import { de_DeleteApplicationCommand, se_DeleteApplicationCommand } from "../protocols/Aws_restJson1";

/**
* @public
*/
export { __MetadataBearer, $Command };
/**
* @public
*
* The input for {@link DeleteApplicationCommand}.
*/
export interface DeleteApplicationCommandInput extends DeleteApplicationRequest {}
/**
* @public
*
* The output of {@link DeleteApplicationCommand}.
*/
export interface DeleteApplicationCommandOutput extends DeleteApplicationResponse, __MetadataBearer {}

/**
* @public
* <p>Deletes the Application. Only Applications that don't have any Application Associations can be deleted.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { AppIntegrationsClient, DeleteApplicationCommand } from "@aws-sdk/client-appintegrations"; // ES Modules import
* // const { AppIntegrationsClient, DeleteApplicationCommand } = require("@aws-sdk/client-appintegrations"); // CommonJS import
* const client = new AppIntegrationsClient(config);
* const input = { // DeleteApplicationRequest
* Arn: "STRING_VALUE", // required
* };
* const command = new DeleteApplicationCommand(input);
* const response = await client.send(command);
* // {};
*
* ```
*
* @param DeleteApplicationCommandInput - {@link DeleteApplicationCommandInput}
* @returns {@link DeleteApplicationCommandOutput}
* @see {@link DeleteApplicationCommandInput} for command's `input` shape.
* @see {@link DeleteApplicationCommandOutput} for command's `response` shape.
* @see {@link AppIntegrationsClientResolvedConfig | config} for AppIntegrationsClient's `config` shape.
*
* @throws {@link AccessDeniedException} (client fault)
* <p>You do not have sufficient access to perform this action.</p>
*
* @throws {@link InternalServiceError} (server fault)
* <p>Request processing failed due to an error or failure with the service.</p>
*
* @throws {@link InvalidRequestException} (client fault)
* <p>The request is not valid. </p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* <p>The specified resource was not found.</p>
*
* @throws {@link ThrottlingException} (client fault)
* <p>The throttling limit has been exceeded.</p>
*
* @throws {@link AppIntegrationsServiceException}
* <p>Base exception class for all service exceptions from AppIntegrations service.</p>
*
*/
export class DeleteApplicationCommand extends $Command<
DeleteApplicationCommandInput,
DeleteApplicationCommandOutput,
AppIntegrationsClientResolvedConfig
> {
public static getEndpointParameterInstructions(): EndpointParameterInstructions {
return {
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
Endpoint: { type: "builtInParams", name: "endpoint" },
Region: { type: "builtInParams", name: "region" },
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
};
}

/**
* @public
*/
constructor(readonly input: DeleteApplicationCommandInput) {
super();
}

/**
* @internal
*/
resolveMiddleware(
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
configuration: AppIntegrationsClientResolvedConfig,
options?: __HttpHandlerOptions
): Handler<DeleteApplicationCommandInput, DeleteApplicationCommandOutput> {
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
this.middlewareStack.use(
getEndpointPlugin(configuration, DeleteApplicationCommand.getEndpointParameterInstructions())
);

const stack = clientStack.concat(this.middlewareStack);

const { logger } = configuration;
const clientName = "AppIntegrationsClient";
const commandName = "DeleteApplicationCommand";
const handlerExecutionContext: HandlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: (_: any) => _,
outputFilterSensitiveLog: (_: any) => _,
[SMITHY_CONTEXT_KEY]: {
service: "AmazonAppIntegrationService",
operation: "DeleteApplication",
},
};
const { requestHandler } = configuration;
return stack.resolve(
(request: FinalizeHandlerArguments<any>) =>
requestHandler.handle(request.request as __HttpRequest, options || {}),
handlerExecutionContext
);
}

/**
* @internal
*/
private serialize(input: DeleteApplicationCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
return se_DeleteApplicationCommand(input, context);
}

/**
* @internal
*/
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<DeleteApplicationCommandOutput> {
return de_DeleteApplicationCommand(output, context);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ export interface GetApplicationCommandOutput extends GetApplicationResponse, __M
* // Tags: { // TagMap
* // "<keys>": "STRING_VALUE",
* // },
* // Permissions: [ // PermissionList
* // "STRING_VALUE",
* // ],
* // };
*
* ```
Expand Down
Loading

0 comments on commit 83dc3ef

Please sign in to comment.