|
| 1 | +// smithy-typescript generated code |
| 2 | +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; |
| 3 | +import { getSerdePlugin } from "@smithy/middleware-serde"; |
| 4 | +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; |
| 5 | +import { Command as $Command } from "@smithy/smithy-client"; |
| 6 | +import { |
| 7 | + FinalizeHandlerArguments, |
| 8 | + Handler, |
| 9 | + HandlerExecutionContext, |
| 10 | + HttpHandlerOptions as __HttpHandlerOptions, |
| 11 | + MetadataBearer as __MetadataBearer, |
| 12 | + MiddlewareStack, |
| 13 | + SerdeContext as __SerdeContext, |
| 14 | + SMITHY_CONTEXT_KEY, |
| 15 | +} from "@smithy/types"; |
| 16 | + |
| 17 | +import { AppIntegrationsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AppIntegrationsClient"; |
| 18 | +import { DeleteApplicationRequest, DeleteApplicationResponse } from "../models/models_0"; |
| 19 | +import { de_DeleteApplicationCommand, se_DeleteApplicationCommand } from "../protocols/Aws_restJson1"; |
| 20 | + |
| 21 | +/** |
| 22 | + * @public |
| 23 | + */ |
| 24 | +export { __MetadataBearer, $Command }; |
| 25 | +/** |
| 26 | + * @public |
| 27 | + * |
| 28 | + * The input for {@link DeleteApplicationCommand}. |
| 29 | + */ |
| 30 | +export interface DeleteApplicationCommandInput extends DeleteApplicationRequest {} |
| 31 | +/** |
| 32 | + * @public |
| 33 | + * |
| 34 | + * The output of {@link DeleteApplicationCommand}. |
| 35 | + */ |
| 36 | +export interface DeleteApplicationCommandOutput extends DeleteApplicationResponse, __MetadataBearer {} |
| 37 | + |
| 38 | +/** |
| 39 | + * @public |
| 40 | + * <p>Deletes the Application. Only Applications that don't have any Application Associations can be deleted.</p> |
| 41 | + * @example |
| 42 | + * Use a bare-bones client and the command you need to make an API call. |
| 43 | + * ```javascript |
| 44 | + * import { AppIntegrationsClient, DeleteApplicationCommand } from "@aws-sdk/client-appintegrations"; // ES Modules import |
| 45 | + * // const { AppIntegrationsClient, DeleteApplicationCommand } = require("@aws-sdk/client-appintegrations"); // CommonJS import |
| 46 | + * const client = new AppIntegrationsClient(config); |
| 47 | + * const input = { // DeleteApplicationRequest |
| 48 | + * Arn: "STRING_VALUE", // required |
| 49 | + * }; |
| 50 | + * const command = new DeleteApplicationCommand(input); |
| 51 | + * const response = await client.send(command); |
| 52 | + * // {}; |
| 53 | + * |
| 54 | + * ``` |
| 55 | + * |
| 56 | + * @param DeleteApplicationCommandInput - {@link DeleteApplicationCommandInput} |
| 57 | + * @returns {@link DeleteApplicationCommandOutput} |
| 58 | + * @see {@link DeleteApplicationCommandInput} for command's `input` shape. |
| 59 | + * @see {@link DeleteApplicationCommandOutput} for command's `response` shape. |
| 60 | + * @see {@link AppIntegrationsClientResolvedConfig | config} for AppIntegrationsClient's `config` shape. |
| 61 | + * |
| 62 | + * @throws {@link AccessDeniedException} (client fault) |
| 63 | + * <p>You do not have sufficient access to perform this action.</p> |
| 64 | + * |
| 65 | + * @throws {@link InternalServiceError} (server fault) |
| 66 | + * <p>Request processing failed due to an error or failure with the service.</p> |
| 67 | + * |
| 68 | + * @throws {@link InvalidRequestException} (client fault) |
| 69 | + * <p>The request is not valid. </p> |
| 70 | + * |
| 71 | + * @throws {@link ResourceNotFoundException} (client fault) |
| 72 | + * <p>The specified resource was not found.</p> |
| 73 | + * |
| 74 | + * @throws {@link ThrottlingException} (client fault) |
| 75 | + * <p>The throttling limit has been exceeded.</p> |
| 76 | + * |
| 77 | + * @throws {@link AppIntegrationsServiceException} |
| 78 | + * <p>Base exception class for all service exceptions from AppIntegrations service.</p> |
| 79 | + * |
| 80 | + */ |
| 81 | +export class DeleteApplicationCommand extends $Command< |
| 82 | + DeleteApplicationCommandInput, |
| 83 | + DeleteApplicationCommandOutput, |
| 84 | + AppIntegrationsClientResolvedConfig |
| 85 | +> { |
| 86 | + public static getEndpointParameterInstructions(): EndpointParameterInstructions { |
| 87 | + return { |
| 88 | + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, |
| 89 | + Endpoint: { type: "builtInParams", name: "endpoint" }, |
| 90 | + Region: { type: "builtInParams", name: "region" }, |
| 91 | + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, |
| 92 | + }; |
| 93 | + } |
| 94 | + |
| 95 | + /** |
| 96 | + * @public |
| 97 | + */ |
| 98 | + constructor(readonly input: DeleteApplicationCommandInput) { |
| 99 | + super(); |
| 100 | + } |
| 101 | + |
| 102 | + /** |
| 103 | + * @internal |
| 104 | + */ |
| 105 | + resolveMiddleware( |
| 106 | + clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, |
| 107 | + configuration: AppIntegrationsClientResolvedConfig, |
| 108 | + options?: __HttpHandlerOptions |
| 109 | + ): Handler<DeleteApplicationCommandInput, DeleteApplicationCommandOutput> { |
| 110 | + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); |
| 111 | + this.middlewareStack.use( |
| 112 | + getEndpointPlugin(configuration, DeleteApplicationCommand.getEndpointParameterInstructions()) |
| 113 | + ); |
| 114 | + |
| 115 | + const stack = clientStack.concat(this.middlewareStack); |
| 116 | + |
| 117 | + const { logger } = configuration; |
| 118 | + const clientName = "AppIntegrationsClient"; |
| 119 | + const commandName = "DeleteApplicationCommand"; |
| 120 | + const handlerExecutionContext: HandlerExecutionContext = { |
| 121 | + logger, |
| 122 | + clientName, |
| 123 | + commandName, |
| 124 | + inputFilterSensitiveLog: (_: any) => _, |
| 125 | + outputFilterSensitiveLog: (_: any) => _, |
| 126 | + [SMITHY_CONTEXT_KEY]: { |
| 127 | + service: "AmazonAppIntegrationService", |
| 128 | + operation: "DeleteApplication", |
| 129 | + }, |
| 130 | + }; |
| 131 | + const { requestHandler } = configuration; |
| 132 | + return stack.resolve( |
| 133 | + (request: FinalizeHandlerArguments<any>) => |
| 134 | + requestHandler.handle(request.request as __HttpRequest, options || {}), |
| 135 | + handlerExecutionContext |
| 136 | + ); |
| 137 | + } |
| 138 | + |
| 139 | + /** |
| 140 | + * @internal |
| 141 | + */ |
| 142 | + private serialize(input: DeleteApplicationCommandInput, context: __SerdeContext): Promise<__HttpRequest> { |
| 143 | + return se_DeleteApplicationCommand(input, context); |
| 144 | + } |
| 145 | + |
| 146 | + /** |
| 147 | + * @internal |
| 148 | + */ |
| 149 | + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<DeleteApplicationCommandOutput> { |
| 150 | + return de_DeleteApplicationCommand(output, context); |
| 151 | + } |
| 152 | +} |
0 commit comments