|
| 1 | +// smithy-typescript generated code |
| 2 | +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; |
| 3 | +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; |
| 4 | +import { Command as $Command } from "@aws-sdk/smithy-client"; |
| 5 | +import { |
| 6 | + FinalizeHandlerArguments, |
| 7 | + Handler, |
| 8 | + HandlerExecutionContext, |
| 9 | + HttpHandlerOptions as __HttpHandlerOptions, |
| 10 | + MetadataBearer as __MetadataBearer, |
| 11 | + MiddlewareStack, |
| 12 | + SerdeContext as __SerdeContext, |
| 13 | +} from "@aws-sdk/types"; |
| 14 | + |
| 15 | +import { EC2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EC2Client"; |
| 16 | +import { |
| 17 | + ModifyLocalGatewayRouteRequest, |
| 18 | + ModifyLocalGatewayRouteRequestFilterSensitiveLog, |
| 19 | + ModifyLocalGatewayRouteResult, |
| 20 | + ModifyLocalGatewayRouteResultFilterSensitiveLog, |
| 21 | +} from "../models/models_5"; |
| 22 | +import { |
| 23 | + deserializeAws_ec2ModifyLocalGatewayRouteCommand, |
| 24 | + serializeAws_ec2ModifyLocalGatewayRouteCommand, |
| 25 | +} from "../protocols/Aws_ec2"; |
| 26 | + |
| 27 | +export interface ModifyLocalGatewayRouteCommandInput extends ModifyLocalGatewayRouteRequest {} |
| 28 | +export interface ModifyLocalGatewayRouteCommandOutput extends ModifyLocalGatewayRouteResult, __MetadataBearer {} |
| 29 | + |
| 30 | +/** |
| 31 | + * <p>Modifies the specified local gateway route.</p> |
| 32 | + * @example |
| 33 | + * Use a bare-bones client and the command you need to make an API call. |
| 34 | + * ```javascript |
| 35 | + * import { EC2Client, ModifyLocalGatewayRouteCommand } from "@aws-sdk/client-ec2"; // ES Modules import |
| 36 | + * // const { EC2Client, ModifyLocalGatewayRouteCommand } = require("@aws-sdk/client-ec2"); // CommonJS import |
| 37 | + * const client = new EC2Client(config); |
| 38 | + * const command = new ModifyLocalGatewayRouteCommand(input); |
| 39 | + * const response = await client.send(command); |
| 40 | + * ``` |
| 41 | + * |
| 42 | + * @see {@link ModifyLocalGatewayRouteCommandInput} for command's `input` shape. |
| 43 | + * @see {@link ModifyLocalGatewayRouteCommandOutput} for command's `response` shape. |
| 44 | + * @see {@link EC2ClientResolvedConfig | config} for EC2Client's `config` shape. |
| 45 | + * |
| 46 | + */ |
| 47 | +export class ModifyLocalGatewayRouteCommand extends $Command< |
| 48 | + ModifyLocalGatewayRouteCommandInput, |
| 49 | + ModifyLocalGatewayRouteCommandOutput, |
| 50 | + EC2ClientResolvedConfig |
| 51 | +> { |
| 52 | + // Start section: command_properties |
| 53 | + // End section: command_properties |
| 54 | + |
| 55 | + constructor(readonly input: ModifyLocalGatewayRouteCommandInput) { |
| 56 | + // Start section: command_constructor |
| 57 | + super(); |
| 58 | + // End section: command_constructor |
| 59 | + } |
| 60 | + |
| 61 | + /** |
| 62 | + * @internal |
| 63 | + */ |
| 64 | + resolveMiddleware( |
| 65 | + clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, |
| 66 | + configuration: EC2ClientResolvedConfig, |
| 67 | + options?: __HttpHandlerOptions |
| 68 | + ): Handler<ModifyLocalGatewayRouteCommandInput, ModifyLocalGatewayRouteCommandOutput> { |
| 69 | + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); |
| 70 | + |
| 71 | + const stack = clientStack.concat(this.middlewareStack); |
| 72 | + |
| 73 | + const { logger } = configuration; |
| 74 | + const clientName = "EC2Client"; |
| 75 | + const commandName = "ModifyLocalGatewayRouteCommand"; |
| 76 | + const handlerExecutionContext: HandlerExecutionContext = { |
| 77 | + logger, |
| 78 | + clientName, |
| 79 | + commandName, |
| 80 | + inputFilterSensitiveLog: ModifyLocalGatewayRouteRequestFilterSensitiveLog, |
| 81 | + outputFilterSensitiveLog: ModifyLocalGatewayRouteResultFilterSensitiveLog, |
| 82 | + }; |
| 83 | + const { requestHandler } = configuration; |
| 84 | + return stack.resolve( |
| 85 | + (request: FinalizeHandlerArguments<any>) => |
| 86 | + requestHandler.handle(request.request as __HttpRequest, options || {}), |
| 87 | + handlerExecutionContext |
| 88 | + ); |
| 89 | + } |
| 90 | + |
| 91 | + private serialize(input: ModifyLocalGatewayRouteCommandInput, context: __SerdeContext): Promise<__HttpRequest> { |
| 92 | + return serializeAws_ec2ModifyLocalGatewayRouteCommand(input, context); |
| 93 | + } |
| 94 | + |
| 95 | + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<ModifyLocalGatewayRouteCommandOutput> { |
| 96 | + return deserializeAws_ec2ModifyLocalGatewayRouteCommand(output, context); |
| 97 | + } |
| 98 | + |
| 99 | + // Start section: command_body_extra |
| 100 | + // End section: command_body_extra |
| 101 | +} |
0 commit comments