-
Notifications
You must be signed in to change notification settings - Fork 588
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(client-rds): This release adds support for using RDS Data API wi…
…th Aurora PostgreSQL Serverless v2 and provisioned DB clusters.
- Loading branch information
awstools
committed
Dec 21, 2023
1 parent
9a1b1c8
commit ee4406c
Showing
10 changed files
with
843 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
152 changes: 152 additions & 0 deletions
152
clients/client-rds/src/commands/DisableHttpEndpointCommand.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { DisableHttpEndpointRequest, DisableHttpEndpointResponse } from "../models/models_1"; | ||
import { de_DisableHttpEndpointCommand, se_DisableHttpEndpointCommand } from "../protocols/Aws_query"; | ||
import { RDSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RDSClient"; | ||
|
||
/** | ||
* @public | ||
*/ | ||
export { __MetadataBearer, $Command }; | ||
/** | ||
* @public | ||
* | ||
* The input for {@link DisableHttpEndpointCommand}. | ||
*/ | ||
export interface DisableHttpEndpointCommandInput extends DisableHttpEndpointRequest {} | ||
/** | ||
* @public | ||
* | ||
* The output of {@link DisableHttpEndpointCommand}. | ||
*/ | ||
export interface DisableHttpEndpointCommandOutput extends DisableHttpEndpointResponse, __MetadataBearer {} | ||
|
||
/** | ||
* @public | ||
* <p>Disables the HTTP endpoint for the specified DB cluster. Disabling this endpoint disables RDS Data API.</p> | ||
* <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html">Using RDS Data API</a> in the | ||
* <i>Amazon Aurora User Guide</i>.</p> | ||
* <note> | ||
* <p>This operation applies only to Aurora PostgreSQL Serverless v2 and provisioned DB clusters. To disable the HTTP endpoint for Aurora Serverless v1 DB clusters, | ||
* use the <code>EnableHttpEndpoint</code> parameter of the <code>ModifyDBCluster</code> operation.</p> | ||
* </note> | ||
* @example | ||
* Use a bare-bones client and the command you need to make an API call. | ||
* ```javascript | ||
* import { RDSClient, DisableHttpEndpointCommand } from "@aws-sdk/client-rds"; // ES Modules import | ||
* // const { RDSClient, DisableHttpEndpointCommand } = require("@aws-sdk/client-rds"); // CommonJS import | ||
* const client = new RDSClient(config); | ||
* const input = { // DisableHttpEndpointRequest | ||
* ResourceArn: "STRING_VALUE", // required | ||
* }; | ||
* const command = new DisableHttpEndpointCommand(input); | ||
* const response = await client.send(command); | ||
* // { // DisableHttpEndpointResponse | ||
* // ResourceArn: "STRING_VALUE", | ||
* // HttpEndpointEnabled: true || false, | ||
* // }; | ||
* | ||
* ``` | ||
* | ||
* @param DisableHttpEndpointCommandInput - {@link DisableHttpEndpointCommandInput} | ||
* @returns {@link DisableHttpEndpointCommandOutput} | ||
* @see {@link DisableHttpEndpointCommandInput} for command's `input` shape. | ||
* @see {@link DisableHttpEndpointCommandOutput} for command's `response` shape. | ||
* @see {@link RDSClientResolvedConfig | config} for RDSClient's `config` shape. | ||
* | ||
* @throws {@link InvalidResourceStateFault} (client fault) | ||
* <p>The operation can't be performed because another operation is in progress.</p> | ||
* | ||
* @throws {@link ResourceNotFoundFault} (client fault) | ||
* <p>The specified resource ID was not found.</p> | ||
* | ||
* @throws {@link RDSServiceException} | ||
* <p>Base exception class for all service exceptions from RDS service.</p> | ||
* | ||
*/ | ||
export class DisableHttpEndpointCommand extends $Command< | ||
DisableHttpEndpointCommandInput, | ||
DisableHttpEndpointCommandOutput, | ||
RDSClientResolvedConfig | ||
> { | ||
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: DisableHttpEndpointCommandInput) { | ||
super(); | ||
} | ||
|
||
/** | ||
* @internal | ||
*/ | ||
resolveMiddleware( | ||
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, | ||
configuration: RDSClientResolvedConfig, | ||
options?: __HttpHandlerOptions | ||
): Handler<DisableHttpEndpointCommandInput, DisableHttpEndpointCommandOutput> { | ||
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); | ||
this.middlewareStack.use( | ||
getEndpointPlugin(configuration, DisableHttpEndpointCommand.getEndpointParameterInstructions()) | ||
); | ||
|
||
const stack = clientStack.concat(this.middlewareStack); | ||
|
||
const { logger } = configuration; | ||
const clientName = "RDSClient"; | ||
const commandName = "DisableHttpEndpointCommand"; | ||
const handlerExecutionContext: HandlerExecutionContext = { | ||
logger, | ||
clientName, | ||
commandName, | ||
inputFilterSensitiveLog: (_: any) => _, | ||
outputFilterSensitiveLog: (_: any) => _, | ||
[SMITHY_CONTEXT_KEY]: { | ||
service: "AmazonRDSv19", | ||
operation: "DisableHttpEndpoint", | ||
}, | ||
}; | ||
const { requestHandler } = configuration; | ||
return stack.resolve( | ||
(request: FinalizeHandlerArguments<any>) => | ||
requestHandler.handle(request.request as __HttpRequest, options || {}), | ||
handlerExecutionContext | ||
); | ||
} | ||
|
||
/** | ||
* @internal | ||
*/ | ||
private serialize(input: DisableHttpEndpointCommandInput, context: __SerdeContext): Promise<__HttpRequest> { | ||
return se_DisableHttpEndpointCommand(input, context); | ||
} | ||
|
||
/** | ||
* @internal | ||
*/ | ||
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<DisableHttpEndpointCommandOutput> { | ||
return de_DisableHttpEndpointCommand(output, context); | ||
} | ||
} |
Oops, something went wrong.