From a85e9d6ed68a47bb0c9faf320bcccdfb83af04c4 Mon Sep 17 00:00:00 2001 From: awstools Date: Tue, 15 Aug 2023 18:16:29 +0000 Subject: [PATCH] feat(client-pi): AWS Performance Insights for Amazon RDS is launching Performance Analysis On Demand, a new feature that allows you to analyze database performance metrics and find out the performance issues. You can now use SDK to create, list, get, delete, and manage tags of performance analysis reports. --- clients/client-pi/README.md | 70 +- clients/client-pi/src/PI.ts | 145 ++ clients/client-pi/src/PIClient.ts | 40 +- .../CreatePerformanceAnalysisReportCommand.ts | 172 ++ .../DeletePerformanceAnalysisReportCommand.ts | 162 ++ .../GetPerformanceAnalysisReportCommand.ts | 261 +++ .../ListPerformanceAnalysisReportsCommand.ts | 181 ++ .../commands/ListTagsForResourceCommand.ts | 157 ++ .../src/commands/TagResourceCommand.ts | 154 ++ .../src/commands/UntagResourceCommand.ts | 151 ++ clients/client-pi/src/commands/index.ts | 7 + clients/client-pi/src/endpoint/ruleset.ts | 2 +- clients/client-pi/src/models/models_0.ts | 889 ++++++++-- ...ListPerformanceAnalysisReportsPaginator.ts | 50 + clients/client-pi/src/pagination/index.ts | 1 + .../client-pi/src/protocols/Aws_json1_1.ts | 677 ++++++++ codegen/sdk-codegen/aws-models/pi.json | 1540 ++++++++++++++--- 17 files changed, 4271 insertions(+), 388 deletions(-) create mode 100644 clients/client-pi/src/commands/CreatePerformanceAnalysisReportCommand.ts create mode 100644 clients/client-pi/src/commands/DeletePerformanceAnalysisReportCommand.ts create mode 100644 clients/client-pi/src/commands/GetPerformanceAnalysisReportCommand.ts create mode 100644 clients/client-pi/src/commands/ListPerformanceAnalysisReportsCommand.ts create mode 100644 clients/client-pi/src/commands/ListTagsForResourceCommand.ts create mode 100644 clients/client-pi/src/commands/TagResourceCommand.ts create mode 100644 clients/client-pi/src/commands/UntagResourceCommand.ts create mode 100644 clients/client-pi/src/pagination/ListPerformanceAnalysisReportsPaginator.ts diff --git a/clients/client-pi/README.md b/clients/client-pi/README.md index 1ac9902a8bfd..0f71f2ae7618 100644 --- a/clients/client-pi/README.md +++ b/clients/client-pi/README.md @@ -48,16 +48,16 @@ using your favorite package manager: The AWS SDK is modulized by clients and commands. To send a request, you only need to import the `PIClient` and -the commands you need, for example `DescribeDimensionKeysCommand`: +the commands you need, for example `CreatePerformanceAnalysisReportCommand`: ```js // ES5 example -const { PIClient, DescribeDimensionKeysCommand } = require("@aws-sdk/client-pi"); +const { PIClient, CreatePerformanceAnalysisReportCommand } = require("@aws-sdk/client-pi"); ``` ```ts // ES6+ example -import { PIClient, DescribeDimensionKeysCommand } from "@aws-sdk/client-pi"; +import { PIClient, CreatePerformanceAnalysisReportCommand } from "@aws-sdk/client-pi"; ``` ### Usage @@ -76,7 +76,7 @@ const client = new PIClient({ region: "REGION" }); const params = { /** input parameters */ }; -const command = new DescribeDimensionKeysCommand(params); +const command = new CreatePerformanceAnalysisReportCommand(params); ``` #### Async/await @@ -155,7 +155,7 @@ const client = new AWS.PI({ region: "REGION" }); // async/await. try { - const data = await client.describeDimensionKeys(params); + const data = await client.createPerformanceAnalysisReport(params); // process data. } catch (error) { // error handling. @@ -163,7 +163,7 @@ try { // Promises. client - .describeDimensionKeys(params) + .createPerformanceAnalysisReport(params) .then((data) => { // process data. }) @@ -172,7 +172,7 @@ client }); // callbacks. -client.describeDimensionKeys(params, (err, data) => { +client.createPerformanceAnalysisReport(params, (err, data) => { // process err and data. }); ``` @@ -228,6 +228,22 @@ see LICENSE for more information. ## Client Commands (Operations List) +
+ +CreatePerformanceAnalysisReport + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-pi/classes/createperformanceanalysisreportcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-pi/interfaces/createperformanceanalysisreportcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-pi/interfaces/createperformanceanalysisreportcommandoutput.html) + +
+
+ +DeletePerformanceAnalysisReport + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-pi/classes/deleteperformanceanalysisreportcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-pi/interfaces/deleteperformanceanalysisreportcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-pi/interfaces/deleteperformanceanalysisreportcommandoutput.html) + +
DescribeDimensionKeys @@ -243,6 +259,14 @@ GetDimensionKeyDetails [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-pi/classes/getdimensionkeydetailscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-pi/interfaces/getdimensionkeydetailscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-pi/interfaces/getdimensionkeydetailscommandoutput.html) +
+
+ +GetPerformanceAnalysisReport + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-pi/classes/getperformanceanalysisreportcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-pi/interfaces/getperformanceanalysisreportcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-pi/interfaces/getperformanceanalysisreportcommandoutput.html) +
@@ -276,3 +300,35 @@ ListAvailableResourceMetrics [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-pi/classes/listavailableresourcemetricscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-pi/interfaces/listavailableresourcemetricscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-pi/interfaces/listavailableresourcemetricscommandoutput.html)
+
+ +ListPerformanceAnalysisReports + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-pi/classes/listperformanceanalysisreportscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-pi/interfaces/listperformanceanalysisreportscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-pi/interfaces/listperformanceanalysisreportscommandoutput.html) + +
+
+ +ListTagsForResource + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-pi/classes/listtagsforresourcecommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-pi/interfaces/listtagsforresourcecommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-pi/interfaces/listtagsforresourcecommandoutput.html) + +
+
+ +TagResource + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-pi/classes/tagresourcecommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-pi/interfaces/tagresourcecommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-pi/interfaces/tagresourcecommandoutput.html) + +
+
+ +UntagResource + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-pi/classes/untagresourcecommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-pi/interfaces/untagresourcecommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-pi/interfaces/untagresourcecommandoutput.html) + +
diff --git a/clients/client-pi/src/PI.ts b/clients/client-pi/src/PI.ts index 02105c925933..916e643cf586 100644 --- a/clients/client-pi/src/PI.ts +++ b/clients/client-pi/src/PI.ts @@ -2,6 +2,16 @@ import { createAggregatedClient } from "@smithy/smithy-client"; import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types"; +import { + CreatePerformanceAnalysisReportCommand, + CreatePerformanceAnalysisReportCommandInput, + CreatePerformanceAnalysisReportCommandOutput, +} from "./commands/CreatePerformanceAnalysisReportCommand"; +import { + DeletePerformanceAnalysisReportCommand, + DeletePerformanceAnalysisReportCommandInput, + DeletePerformanceAnalysisReportCommandOutput, +} from "./commands/DeletePerformanceAnalysisReportCommand"; import { DescribeDimensionKeysCommand, DescribeDimensionKeysCommandInput, @@ -12,6 +22,11 @@ import { GetDimensionKeyDetailsCommandInput, GetDimensionKeyDetailsCommandOutput, } from "./commands/GetDimensionKeyDetailsCommand"; +import { + GetPerformanceAnalysisReportCommand, + GetPerformanceAnalysisReportCommandInput, + GetPerformanceAnalysisReportCommandOutput, +} from "./commands/GetPerformanceAnalysisReportCommand"; import { GetResourceMetadataCommand, GetResourceMetadataCommandInput, @@ -32,18 +47,75 @@ import { ListAvailableResourceMetricsCommandInput, ListAvailableResourceMetricsCommandOutput, } from "./commands/ListAvailableResourceMetricsCommand"; +import { + ListPerformanceAnalysisReportsCommand, + ListPerformanceAnalysisReportsCommandInput, + ListPerformanceAnalysisReportsCommandOutput, +} from "./commands/ListPerformanceAnalysisReportsCommand"; +import { + ListTagsForResourceCommand, + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, +} from "./commands/ListTagsForResourceCommand"; +import { TagResourceCommand, TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand"; +import { + UntagResourceCommand, + UntagResourceCommandInput, + UntagResourceCommandOutput, +} from "./commands/UntagResourceCommand"; import { PIClient, PIClientConfig } from "./PIClient"; const commands = { + CreatePerformanceAnalysisReportCommand, + DeletePerformanceAnalysisReportCommand, DescribeDimensionKeysCommand, GetDimensionKeyDetailsCommand, + GetPerformanceAnalysisReportCommand, GetResourceMetadataCommand, GetResourceMetricsCommand, ListAvailableResourceDimensionsCommand, ListAvailableResourceMetricsCommand, + ListPerformanceAnalysisReportsCommand, + ListTagsForResourceCommand, + TagResourceCommand, + UntagResourceCommand, }; export interface PI { + /** + * @see {@link CreatePerformanceAnalysisReportCommand} + */ + createPerformanceAnalysisReport( + args: CreatePerformanceAnalysisReportCommandInput, + options?: __HttpHandlerOptions + ): Promise; + createPerformanceAnalysisReport( + args: CreatePerformanceAnalysisReportCommandInput, + cb: (err: any, data?: CreatePerformanceAnalysisReportCommandOutput) => void + ): void; + createPerformanceAnalysisReport( + args: CreatePerformanceAnalysisReportCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreatePerformanceAnalysisReportCommandOutput) => void + ): void; + + /** + * @see {@link DeletePerformanceAnalysisReportCommand} + */ + deletePerformanceAnalysisReport( + args: DeletePerformanceAnalysisReportCommandInput, + options?: __HttpHandlerOptions + ): Promise; + deletePerformanceAnalysisReport( + args: DeletePerformanceAnalysisReportCommandInput, + cb: (err: any, data?: DeletePerformanceAnalysisReportCommandOutput) => void + ): void; + deletePerformanceAnalysisReport( + args: DeletePerformanceAnalysisReportCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeletePerformanceAnalysisReportCommandOutput) => void + ): void; + /** * @see {@link DescribeDimensionKeysCommand} */ @@ -78,6 +150,23 @@ export interface PI { cb: (err: any, data?: GetDimensionKeyDetailsCommandOutput) => void ): void; + /** + * @see {@link GetPerformanceAnalysisReportCommand} + */ + getPerformanceAnalysisReport( + args: GetPerformanceAnalysisReportCommandInput, + options?: __HttpHandlerOptions + ): Promise; + getPerformanceAnalysisReport( + args: GetPerformanceAnalysisReportCommandInput, + cb: (err: any, data?: GetPerformanceAnalysisReportCommandOutput) => void + ): void; + getPerformanceAnalysisReport( + args: GetPerformanceAnalysisReportCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetPerformanceAnalysisReportCommandOutput) => void + ): void; + /** * @see {@link GetResourceMetadataCommand} */ @@ -145,6 +234,62 @@ export interface PI { options: __HttpHandlerOptions, cb: (err: any, data?: ListAvailableResourceMetricsCommandOutput) => void ): void; + + /** + * @see {@link ListPerformanceAnalysisReportsCommand} + */ + listPerformanceAnalysisReports( + args: ListPerformanceAnalysisReportsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + listPerformanceAnalysisReports( + args: ListPerformanceAnalysisReportsCommandInput, + cb: (err: any, data?: ListPerformanceAnalysisReportsCommandOutput) => void + ): void; + listPerformanceAnalysisReports( + args: ListPerformanceAnalysisReportsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListPerformanceAnalysisReportsCommandOutput) => void + ): void; + + /** + * @see {@link ListTagsForResourceCommand} + */ + listTagsForResource( + args: ListTagsForResourceCommandInput, + options?: __HttpHandlerOptions + ): Promise; + listTagsForResource( + args: ListTagsForResourceCommandInput, + cb: (err: any, data?: ListTagsForResourceCommandOutput) => void + ): void; + listTagsForResource( + args: ListTagsForResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListTagsForResourceCommandOutput) => void + ): void; + + /** + * @see {@link TagResourceCommand} + */ + tagResource(args: TagResourceCommandInput, options?: __HttpHandlerOptions): Promise; + tagResource(args: TagResourceCommandInput, cb: (err: any, data?: TagResourceCommandOutput) => void): void; + tagResource( + args: TagResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: TagResourceCommandOutput) => void + ): void; + + /** + * @see {@link UntagResourceCommand} + */ + untagResource(args: UntagResourceCommandInput, options?: __HttpHandlerOptions): Promise; + untagResource(args: UntagResourceCommandInput, cb: (err: any, data?: UntagResourceCommandOutput) => void): void; + untagResource( + args: UntagResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UntagResourceCommandOutput) => void + ): void; } /** diff --git a/clients/client-pi/src/PIClient.ts b/clients/client-pi/src/PIClient.ts index 22f5b8b0b339..7fc21965f833 100644 --- a/clients/client-pi/src/PIClient.ts +++ b/clients/client-pi/src/PIClient.ts @@ -50,6 +50,14 @@ import { UserAgent as __UserAgent, } from "@smithy/types"; +import { + CreatePerformanceAnalysisReportCommandInput, + CreatePerformanceAnalysisReportCommandOutput, +} from "./commands/CreatePerformanceAnalysisReportCommand"; +import { + DeletePerformanceAnalysisReportCommandInput, + DeletePerformanceAnalysisReportCommandOutput, +} from "./commands/DeletePerformanceAnalysisReportCommand"; import { DescribeDimensionKeysCommandInput, DescribeDimensionKeysCommandOutput, @@ -58,6 +66,10 @@ import { GetDimensionKeyDetailsCommandInput, GetDimensionKeyDetailsCommandOutput, } from "./commands/GetDimensionKeyDetailsCommand"; +import { + GetPerformanceAnalysisReportCommandInput, + GetPerformanceAnalysisReportCommandOutput, +} from "./commands/GetPerformanceAnalysisReportCommand"; import { GetResourceMetadataCommandInput, GetResourceMetadataCommandOutput, @@ -71,6 +83,16 @@ import { ListAvailableResourceMetricsCommandInput, ListAvailableResourceMetricsCommandOutput, } from "./commands/ListAvailableResourceMetricsCommand"; +import { + ListPerformanceAnalysisReportsCommandInput, + ListPerformanceAnalysisReportsCommandOutput, +} from "./commands/ListPerformanceAnalysisReportsCommand"; +import { + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, +} from "./commands/ListTagsForResourceCommand"; +import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand"; +import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand"; import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, @@ -85,23 +107,37 @@ export { __Client }; * @public */ export type ServiceInputTypes = + | CreatePerformanceAnalysisReportCommandInput + | DeletePerformanceAnalysisReportCommandInput | DescribeDimensionKeysCommandInput | GetDimensionKeyDetailsCommandInput + | GetPerformanceAnalysisReportCommandInput | GetResourceMetadataCommandInput | GetResourceMetricsCommandInput | ListAvailableResourceDimensionsCommandInput - | ListAvailableResourceMetricsCommandInput; + | ListAvailableResourceMetricsCommandInput + | ListPerformanceAnalysisReportsCommandInput + | ListTagsForResourceCommandInput + | TagResourceCommandInput + | UntagResourceCommandInput; /** * @public */ export type ServiceOutputTypes = + | CreatePerformanceAnalysisReportCommandOutput + | DeletePerformanceAnalysisReportCommandOutput | DescribeDimensionKeysCommandOutput | GetDimensionKeyDetailsCommandOutput + | GetPerformanceAnalysisReportCommandOutput | GetResourceMetadataCommandOutput | GetResourceMetricsCommandOutput | ListAvailableResourceDimensionsCommandOutput - | ListAvailableResourceMetricsCommandOutput; + | ListAvailableResourceMetricsCommandOutput + | ListPerformanceAnalysisReportsCommandOutput + | ListTagsForResourceCommandOutput + | TagResourceCommandOutput + | UntagResourceCommandOutput; /** * @public diff --git a/clients/client-pi/src/commands/CreatePerformanceAnalysisReportCommand.ts b/clients/client-pi/src/commands/CreatePerformanceAnalysisReportCommand.ts new file mode 100644 index 000000000000..80d855c743a0 --- /dev/null +++ b/clients/client-pi/src/commands/CreatePerformanceAnalysisReportCommand.ts @@ -0,0 +1,172 @@ +// 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, +} from "@smithy/types"; + +import { CreatePerformanceAnalysisReportRequest, CreatePerformanceAnalysisReportResponse } from "../models/models_0"; +import { PIClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../PIClient"; +import { + de_CreatePerformanceAnalysisReportCommand, + se_CreatePerformanceAnalysisReportCommand, +} from "../protocols/Aws_json1_1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link CreatePerformanceAnalysisReportCommand}. + */ +export interface CreatePerformanceAnalysisReportCommandInput extends CreatePerformanceAnalysisReportRequest {} +/** + * @public + * + * The output of {@link CreatePerformanceAnalysisReportCommand}. + */ +export interface CreatePerformanceAnalysisReportCommandOutput + extends CreatePerformanceAnalysisReportResponse, + __MetadataBearer {} + +/** + * @public + *

Creates a new performance analysis report for a specific time period for the + * DB instance.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { PIClient, CreatePerformanceAnalysisReportCommand } from "@aws-sdk/client-pi"; // ES Modules import + * // const { PIClient, CreatePerformanceAnalysisReportCommand } = require("@aws-sdk/client-pi"); // CommonJS import + * const client = new PIClient(config); + * const input = { // CreatePerformanceAnalysisReportRequest + * ServiceType: "RDS" || "DOCDB", // required + * Identifier: "STRING_VALUE", // required + * StartTime: new Date("TIMESTAMP"), // required + * EndTime: new Date("TIMESTAMP"), // required + * Tags: [ // TagList + * { // Tag + * Key: "STRING_VALUE", // required + * Value: "STRING_VALUE", // required + * }, + * ], + * }; + * const command = new CreatePerformanceAnalysisReportCommand(input); + * const response = await client.send(command); + * // { // CreatePerformanceAnalysisReportResponse + * // AnalysisReportId: "STRING_VALUE", + * // }; + * + * ``` + * + * @param CreatePerformanceAnalysisReportCommandInput - {@link CreatePerformanceAnalysisReportCommandInput} + * @returns {@link CreatePerformanceAnalysisReportCommandOutput} + * @see {@link CreatePerformanceAnalysisReportCommandInput} for command's `input` shape. + * @see {@link CreatePerformanceAnalysisReportCommandOutput} for command's `response` shape. + * @see {@link PIClientResolvedConfig | config} for PIClient's `config` shape. + * + * @throws {@link InternalServiceError} (server fault) + *

The request failed due to an unknown error.

+ * + * @throws {@link InvalidArgumentException} (client fault) + *

One of the arguments provided is invalid for this request.

+ * + * @throws {@link NotAuthorizedException} (client fault) + *

The user is not authorized to perform this request.

+ * + * @throws {@link PIServiceException} + *

Base exception class for all service exceptions from PI service.

+ * + */ +export class CreatePerformanceAnalysisReportCommand extends $Command< + CreatePerformanceAnalysisReportCommandInput, + CreatePerformanceAnalysisReportCommandOutput, + PIClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + 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: CreatePerformanceAnalysisReportCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: PIClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, CreatePerformanceAnalysisReportCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "PIClient"; + const commandName = "CreatePerformanceAnalysisReportCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize( + input: CreatePerformanceAnalysisReportCommandInput, + context: __SerdeContext + ): Promise<__HttpRequest> { + return se_CreatePerformanceAnalysisReportCommand(input, context); + } + + /** + * @internal + */ + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return de_CreatePerformanceAnalysisReportCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-pi/src/commands/DeletePerformanceAnalysisReportCommand.ts b/clients/client-pi/src/commands/DeletePerformanceAnalysisReportCommand.ts new file mode 100644 index 000000000000..e232a16f7803 --- /dev/null +++ b/clients/client-pi/src/commands/DeletePerformanceAnalysisReportCommand.ts @@ -0,0 +1,162 @@ +// 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, +} from "@smithy/types"; + +import { DeletePerformanceAnalysisReportRequest, DeletePerformanceAnalysisReportResponse } from "../models/models_0"; +import { PIClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../PIClient"; +import { + de_DeletePerformanceAnalysisReportCommand, + se_DeletePerformanceAnalysisReportCommand, +} from "../protocols/Aws_json1_1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link DeletePerformanceAnalysisReportCommand}. + */ +export interface DeletePerformanceAnalysisReportCommandInput extends DeletePerformanceAnalysisReportRequest {} +/** + * @public + * + * The output of {@link DeletePerformanceAnalysisReportCommand}. + */ +export interface DeletePerformanceAnalysisReportCommandOutput + extends DeletePerformanceAnalysisReportResponse, + __MetadataBearer {} + +/** + * @public + *

Deletes a performance analysis report.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { PIClient, DeletePerformanceAnalysisReportCommand } from "@aws-sdk/client-pi"; // ES Modules import + * // const { PIClient, DeletePerformanceAnalysisReportCommand } = require("@aws-sdk/client-pi"); // CommonJS import + * const client = new PIClient(config); + * const input = { // DeletePerformanceAnalysisReportRequest + * ServiceType: "RDS" || "DOCDB", // required + * Identifier: "STRING_VALUE", // required + * AnalysisReportId: "STRING_VALUE", // required + * }; + * const command = new DeletePerformanceAnalysisReportCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param DeletePerformanceAnalysisReportCommandInput - {@link DeletePerformanceAnalysisReportCommandInput} + * @returns {@link DeletePerformanceAnalysisReportCommandOutput} + * @see {@link DeletePerformanceAnalysisReportCommandInput} for command's `input` shape. + * @see {@link DeletePerformanceAnalysisReportCommandOutput} for command's `response` shape. + * @see {@link PIClientResolvedConfig | config} for PIClient's `config` shape. + * + * @throws {@link InternalServiceError} (server fault) + *

The request failed due to an unknown error.

+ * + * @throws {@link InvalidArgumentException} (client fault) + *

One of the arguments provided is invalid for this request.

+ * + * @throws {@link NotAuthorizedException} (client fault) + *

The user is not authorized to perform this request.

+ * + * @throws {@link PIServiceException} + *

Base exception class for all service exceptions from PI service.

+ * + */ +export class DeletePerformanceAnalysisReportCommand extends $Command< + DeletePerformanceAnalysisReportCommandInput, + DeletePerformanceAnalysisReportCommandOutput, + PIClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + 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: DeletePerformanceAnalysisReportCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: PIClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, DeletePerformanceAnalysisReportCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "PIClient"; + const commandName = "DeletePerformanceAnalysisReportCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize( + input: DeletePerformanceAnalysisReportCommandInput, + context: __SerdeContext + ): Promise<__HttpRequest> { + return se_DeletePerformanceAnalysisReportCommand(input, context); + } + + /** + * @internal + */ + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return de_DeletePerformanceAnalysisReportCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-pi/src/commands/GetPerformanceAnalysisReportCommand.ts b/clients/client-pi/src/commands/GetPerformanceAnalysisReportCommand.ts new file mode 100644 index 000000000000..cbe5fa9ebba3 --- /dev/null +++ b/clients/client-pi/src/commands/GetPerformanceAnalysisReportCommand.ts @@ -0,0 +1,261 @@ +// 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, +} from "@smithy/types"; + +import { + GetPerformanceAnalysisReportRequest, + GetPerformanceAnalysisReportResponse, + GetPerformanceAnalysisReportResponseFilterSensitiveLog, +} from "../models/models_0"; +import { PIClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../PIClient"; +import { + de_GetPerformanceAnalysisReportCommand, + se_GetPerformanceAnalysisReportCommand, +} from "../protocols/Aws_json1_1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link GetPerformanceAnalysisReportCommand}. + */ +export interface GetPerformanceAnalysisReportCommandInput extends GetPerformanceAnalysisReportRequest {} +/** + * @public + * + * The output of {@link GetPerformanceAnalysisReportCommand}. + */ +export interface GetPerformanceAnalysisReportCommandOutput + extends GetPerformanceAnalysisReportResponse, + __MetadataBearer {} + +/** + * @public + *

Retrieves the report including the report ID, status, time details, and the insights + * with recommendations. The report status can be RUNNING, + * SUCCEEDED, or FAILED. The insights include the + * description and recommendation fields.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { PIClient, GetPerformanceAnalysisReportCommand } from "@aws-sdk/client-pi"; // ES Modules import + * // const { PIClient, GetPerformanceAnalysisReportCommand } = require("@aws-sdk/client-pi"); // CommonJS import + * const client = new PIClient(config); + * const input = { // GetPerformanceAnalysisReportRequest + * ServiceType: "RDS" || "DOCDB", // required + * Identifier: "STRING_VALUE", // required + * AnalysisReportId: "STRING_VALUE", // required + * TextFormat: "PLAIN_TEXT" || "MARKDOWN", + * AcceptLanguage: "EN_US", + * }; + * const command = new GetPerformanceAnalysisReportCommand(input); + * const response = await client.send(command); + * // { // GetPerformanceAnalysisReportResponse + * // AnalysisReport: { // AnalysisReport + * // AnalysisReportId: "STRING_VALUE", // required + * // Identifier: "STRING_VALUE", + * // ServiceType: "RDS" || "DOCDB", + * // CreateTime: new Date("TIMESTAMP"), + * // StartTime: new Date("TIMESTAMP"), + * // EndTime: new Date("TIMESTAMP"), + * // Status: "RUNNING" || "SUCCEEDED" || "FAILED", + * // Insights: [ // InsightList + * // { // Insight + * // InsightId: "STRING_VALUE", // required + * // InsightType: "STRING_VALUE", + * // Context: "CAUSAL" || "CONTEXTUAL", + * // StartTime: new Date("TIMESTAMP"), + * // EndTime: new Date("TIMESTAMP"), + * // Severity: "LOW" || "MEDIUM" || "HIGH", + * // SupportingInsights: [ + * // { + * // InsightId: "STRING_VALUE", // required + * // InsightType: "STRING_VALUE", + * // Context: "CAUSAL" || "CONTEXTUAL", + * // StartTime: new Date("TIMESTAMP"), + * // EndTime: new Date("TIMESTAMP"), + * // Severity: "LOW" || "MEDIUM" || "HIGH", + * // SupportingInsights: "", + * // Description: "STRING_VALUE", + * // Recommendations: [ // RecommendationList + * // { // Recommendation + * // RecommendationId: "STRING_VALUE", + * // RecommendationDescription: "STRING_VALUE", + * // }, + * // ], + * // InsightData: [ // DataList + * // { // Data + * // PerformanceInsightsMetric: { // PerformanceInsightsMetric + * // Metric: "STRING_VALUE", + * // DisplayName: "STRING_VALUE", + * // Dimensions: { // DescriptiveMap + * // "": "STRING_VALUE", + * // }, + * // Value: Number("double"), + * // }, + * // }, + * // ], + * // BaselineData: [ + * // { + * // PerformanceInsightsMetric: { + * // Metric: "STRING_VALUE", + * // DisplayName: "STRING_VALUE", + * // Dimensions: { + * // "": "STRING_VALUE", + * // }, + * // Value: Number("double"), + * // }, + * // }, + * // ], + * // }, + * // ], + * // Description: "STRING_VALUE", + * // Recommendations: [ + * // { + * // RecommendationId: "STRING_VALUE", + * // RecommendationDescription: "STRING_VALUE", + * // }, + * // ], + * // InsightData: [ + * // { + * // PerformanceInsightsMetric: { + * // Metric: "STRING_VALUE", + * // DisplayName: "STRING_VALUE", + * // Dimensions: { + * // "": "STRING_VALUE", + * // }, + * // Value: Number("double"), + * // }, + * // }, + * // ], + * // BaselineData: [ + * // { + * // PerformanceInsightsMetric: { + * // Metric: "STRING_VALUE", + * // DisplayName: "STRING_VALUE", + * // Dimensions: { + * // "": "STRING_VALUE", + * // }, + * // Value: Number("double"), + * // }, + * // }, + * // ], + * // }, + * // ], + * // }, + * // }; + * + * ``` + * + * @param GetPerformanceAnalysisReportCommandInput - {@link GetPerformanceAnalysisReportCommandInput} + * @returns {@link GetPerformanceAnalysisReportCommandOutput} + * @see {@link GetPerformanceAnalysisReportCommandInput} for command's `input` shape. + * @see {@link GetPerformanceAnalysisReportCommandOutput} for command's `response` shape. + * @see {@link PIClientResolvedConfig | config} for PIClient's `config` shape. + * + * @throws {@link InternalServiceError} (server fault) + *

The request failed due to an unknown error.

+ * + * @throws {@link InvalidArgumentException} (client fault) + *

One of the arguments provided is invalid for this request.

+ * + * @throws {@link NotAuthorizedException} (client fault) + *

The user is not authorized to perform this request.

+ * + * @throws {@link PIServiceException} + *

Base exception class for all service exceptions from PI service.

+ * + */ +export class GetPerformanceAnalysisReportCommand extends $Command< + GetPerformanceAnalysisReportCommandInput, + GetPerformanceAnalysisReportCommandOutput, + PIClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + 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: GetPerformanceAnalysisReportCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: PIClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, GetPerformanceAnalysisReportCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "PIClient"; + const commandName = "GetPerformanceAnalysisReportCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: GetPerformanceAnalysisReportResponseFilterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: GetPerformanceAnalysisReportCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_GetPerformanceAnalysisReportCommand(input, context); + } + + /** + * @internal + */ + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return de_GetPerformanceAnalysisReportCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-pi/src/commands/ListPerformanceAnalysisReportsCommand.ts b/clients/client-pi/src/commands/ListPerformanceAnalysisReportsCommand.ts new file mode 100644 index 000000000000..1f487982482a --- /dev/null +++ b/clients/client-pi/src/commands/ListPerformanceAnalysisReportsCommand.ts @@ -0,0 +1,181 @@ +// 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, +} from "@smithy/types"; + +import { ListPerformanceAnalysisReportsRequest, ListPerformanceAnalysisReportsResponse } from "../models/models_0"; +import { PIClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../PIClient"; +import { + de_ListPerformanceAnalysisReportsCommand, + se_ListPerformanceAnalysisReportsCommand, +} from "../protocols/Aws_json1_1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ListPerformanceAnalysisReportsCommand}. + */ +export interface ListPerformanceAnalysisReportsCommandInput extends ListPerformanceAnalysisReportsRequest {} +/** + * @public + * + * The output of {@link ListPerformanceAnalysisReportsCommand}. + */ +export interface ListPerformanceAnalysisReportsCommandOutput + extends ListPerformanceAnalysisReportsResponse, + __MetadataBearer {} + +/** + * @public + *

Lists all the analysis reports created for the DB instance. The reports are sorted based on the start time of each report.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { PIClient, ListPerformanceAnalysisReportsCommand } from "@aws-sdk/client-pi"; // ES Modules import + * // const { PIClient, ListPerformanceAnalysisReportsCommand } = require("@aws-sdk/client-pi"); // CommonJS import + * const client = new PIClient(config); + * const input = { // ListPerformanceAnalysisReportsRequest + * ServiceType: "RDS" || "DOCDB", // required + * Identifier: "STRING_VALUE", // required + * NextToken: "STRING_VALUE", + * MaxResults: Number("int"), + * ListTags: true || false, + * }; + * const command = new ListPerformanceAnalysisReportsCommand(input); + * const response = await client.send(command); + * // { // ListPerformanceAnalysisReportsResponse + * // AnalysisReports: [ // AnalysisReportSummaryList + * // { // AnalysisReportSummary + * // AnalysisReportId: "STRING_VALUE", + * // CreateTime: new Date("TIMESTAMP"), + * // StartTime: new Date("TIMESTAMP"), + * // EndTime: new Date("TIMESTAMP"), + * // Status: "RUNNING" || "SUCCEEDED" || "FAILED", + * // Tags: [ // TagList + * // { // Tag + * // Key: "STRING_VALUE", // required + * // Value: "STRING_VALUE", // required + * // }, + * // ], + * // }, + * // ], + * // NextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param ListPerformanceAnalysisReportsCommandInput - {@link ListPerformanceAnalysisReportsCommandInput} + * @returns {@link ListPerformanceAnalysisReportsCommandOutput} + * @see {@link ListPerformanceAnalysisReportsCommandInput} for command's `input` shape. + * @see {@link ListPerformanceAnalysisReportsCommandOutput} for command's `response` shape. + * @see {@link PIClientResolvedConfig | config} for PIClient's `config` shape. + * + * @throws {@link InternalServiceError} (server fault) + *

The request failed due to an unknown error.

+ * + * @throws {@link InvalidArgumentException} (client fault) + *

One of the arguments provided is invalid for this request.

+ * + * @throws {@link NotAuthorizedException} (client fault) + *

The user is not authorized to perform this request.

+ * + * @throws {@link PIServiceException} + *

Base exception class for all service exceptions from PI service.

+ * + */ +export class ListPerformanceAnalysisReportsCommand extends $Command< + ListPerformanceAnalysisReportsCommandInput, + ListPerformanceAnalysisReportsCommandOutput, + PIClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + 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: ListPerformanceAnalysisReportsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: PIClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, ListPerformanceAnalysisReportsCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "PIClient"; + const commandName = "ListPerformanceAnalysisReportsCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize( + input: ListPerformanceAnalysisReportsCommandInput, + context: __SerdeContext + ): Promise<__HttpRequest> { + return se_ListPerformanceAnalysisReportsCommand(input, context); + } + + /** + * @internal + */ + private deserialize( + output: __HttpResponse, + context: __SerdeContext + ): Promise { + return de_ListPerformanceAnalysisReportsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-pi/src/commands/ListTagsForResourceCommand.ts b/clients/client-pi/src/commands/ListTagsForResourceCommand.ts new file mode 100644 index 000000000000..228ee8e7b698 --- /dev/null +++ b/clients/client-pi/src/commands/ListTagsForResourceCommand.ts @@ -0,0 +1,157 @@ +// 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, +} from "@smithy/types"; + +import { ListTagsForResourceRequest, ListTagsForResourceResponse } from "../models/models_0"; +import { PIClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../PIClient"; +import { de_ListTagsForResourceCommand, se_ListTagsForResourceCommand } from "../protocols/Aws_json1_1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ListTagsForResourceCommand}. + */ +export interface ListTagsForResourceCommandInput extends ListTagsForResourceRequest {} +/** + * @public + * + * The output of {@link ListTagsForResourceCommand}. + */ +export interface ListTagsForResourceCommandOutput extends ListTagsForResourceResponse, __MetadataBearer {} + +/** + * @public + *

Retrieves all the metadata tags associated with Amazon RDS Performance Insights resource.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { PIClient, ListTagsForResourceCommand } from "@aws-sdk/client-pi"; // ES Modules import + * // const { PIClient, ListTagsForResourceCommand } = require("@aws-sdk/client-pi"); // CommonJS import + * const client = new PIClient(config); + * const input = { // ListTagsForResourceRequest + * ServiceType: "RDS" || "DOCDB", // required + * ResourceARN: "STRING_VALUE", // required + * }; + * const command = new ListTagsForResourceCommand(input); + * const response = await client.send(command); + * // { // ListTagsForResourceResponse + * // Tags: [ // TagList + * // { // Tag + * // Key: "STRING_VALUE", // required + * // Value: "STRING_VALUE", // required + * // }, + * // ], + * // }; + * + * ``` + * + * @param ListTagsForResourceCommandInput - {@link ListTagsForResourceCommandInput} + * @returns {@link ListTagsForResourceCommandOutput} + * @see {@link ListTagsForResourceCommandInput} for command's `input` shape. + * @see {@link ListTagsForResourceCommandOutput} for command's `response` shape. + * @see {@link PIClientResolvedConfig | config} for PIClient's `config` shape. + * + * @throws {@link InternalServiceError} (server fault) + *

The request failed due to an unknown error.

+ * + * @throws {@link InvalidArgumentException} (client fault) + *

One of the arguments provided is invalid for this request.

+ * + * @throws {@link NotAuthorizedException} (client fault) + *

The user is not authorized to perform this request.

+ * + * @throws {@link PIServiceException} + *

Base exception class for all service exceptions from PI service.

+ * + */ +export class ListTagsForResourceCommand extends $Command< + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, + PIClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + 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: ListTagsForResourceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: PIClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, ListTagsForResourceCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "PIClient"; + const commandName = "ListTagsForResourceCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: ListTagsForResourceCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_ListTagsForResourceCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_ListTagsForResourceCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-pi/src/commands/TagResourceCommand.ts b/clients/client-pi/src/commands/TagResourceCommand.ts new file mode 100644 index 000000000000..8031ff18a018 --- /dev/null +++ b/clients/client-pi/src/commands/TagResourceCommand.ts @@ -0,0 +1,154 @@ +// 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, +} from "@smithy/types"; + +import { TagResourceRequest, TagResourceResponse } from "../models/models_0"; +import { PIClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../PIClient"; +import { de_TagResourceCommand, se_TagResourceCommand } from "../protocols/Aws_json1_1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link TagResourceCommand}. + */ +export interface TagResourceCommandInput extends TagResourceRequest {} +/** + * @public + * + * The output of {@link TagResourceCommand}. + */ +export interface TagResourceCommandOutput extends TagResourceResponse, __MetadataBearer {} + +/** + * @public + *

Adds metadata tags to the Amazon RDS Performance Insights resource.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { PIClient, TagResourceCommand } from "@aws-sdk/client-pi"; // ES Modules import + * // const { PIClient, TagResourceCommand } = require("@aws-sdk/client-pi"); // CommonJS import + * const client = new PIClient(config); + * const input = { // TagResourceRequest + * ServiceType: "RDS" || "DOCDB", // required + * ResourceARN: "STRING_VALUE", // required + * Tags: [ // TagList // required + * { // Tag + * Key: "STRING_VALUE", // required + * Value: "STRING_VALUE", // required + * }, + * ], + * }; + * const command = new TagResourceCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param TagResourceCommandInput - {@link TagResourceCommandInput} + * @returns {@link TagResourceCommandOutput} + * @see {@link TagResourceCommandInput} for command's `input` shape. + * @see {@link TagResourceCommandOutput} for command's `response` shape. + * @see {@link PIClientResolvedConfig | config} for PIClient's `config` shape. + * + * @throws {@link InternalServiceError} (server fault) + *

The request failed due to an unknown error.

+ * + * @throws {@link InvalidArgumentException} (client fault) + *

One of the arguments provided is invalid for this request.

+ * + * @throws {@link NotAuthorizedException} (client fault) + *

The user is not authorized to perform this request.

+ * + * @throws {@link PIServiceException} + *

Base exception class for all service exceptions from PI service.

+ * + */ +export class TagResourceCommand extends $Command< + TagResourceCommandInput, + TagResourceCommandOutput, + PIClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + 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: TagResourceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: PIClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, TagResourceCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "PIClient"; + const commandName = "TagResourceCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: TagResourceCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_TagResourceCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_TagResourceCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-pi/src/commands/UntagResourceCommand.ts b/clients/client-pi/src/commands/UntagResourceCommand.ts new file mode 100644 index 000000000000..508fa8118882 --- /dev/null +++ b/clients/client-pi/src/commands/UntagResourceCommand.ts @@ -0,0 +1,151 @@ +// 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, +} from "@smithy/types"; + +import { UntagResourceRequest, UntagResourceResponse } from "../models/models_0"; +import { PIClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../PIClient"; +import { de_UntagResourceCommand, se_UntagResourceCommand } from "../protocols/Aws_json1_1"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link UntagResourceCommand}. + */ +export interface UntagResourceCommandInput extends UntagResourceRequest {} +/** + * @public + * + * The output of {@link UntagResourceCommand}. + */ +export interface UntagResourceCommandOutput extends UntagResourceResponse, __MetadataBearer {} + +/** + * @public + *

Deletes the metadata tags from the Amazon RDS Performance Insights resource.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { PIClient, UntagResourceCommand } from "@aws-sdk/client-pi"; // ES Modules import + * // const { PIClient, UntagResourceCommand } = require("@aws-sdk/client-pi"); // CommonJS import + * const client = new PIClient(config); + * const input = { // UntagResourceRequest + * ServiceType: "RDS" || "DOCDB", // required + * ResourceARN: "STRING_VALUE", // required + * TagKeys: [ // TagKeyList // required + * "STRING_VALUE", + * ], + * }; + * const command = new UntagResourceCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param UntagResourceCommandInput - {@link UntagResourceCommandInput} + * @returns {@link UntagResourceCommandOutput} + * @see {@link UntagResourceCommandInput} for command's `input` shape. + * @see {@link UntagResourceCommandOutput} for command's `response` shape. + * @see {@link PIClientResolvedConfig | config} for PIClient's `config` shape. + * + * @throws {@link InternalServiceError} (server fault) + *

The request failed due to an unknown error.

+ * + * @throws {@link InvalidArgumentException} (client fault) + *

One of the arguments provided is invalid for this request.

+ * + * @throws {@link NotAuthorizedException} (client fault) + *

The user is not authorized to perform this request.

+ * + * @throws {@link PIServiceException} + *

Base exception class for all service exceptions from PI service.

+ * + */ +export class UntagResourceCommand extends $Command< + UntagResourceCommandInput, + UntagResourceCommandOutput, + PIClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + 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: UntagResourceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: PIClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, UntagResourceCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "PIClient"; + const commandName = "UntagResourceCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: UntagResourceCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_UntagResourceCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_UntagResourceCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-pi/src/commands/index.ts b/clients/client-pi/src/commands/index.ts index b77ce2beef01..35e85c5061e2 100644 --- a/clients/client-pi/src/commands/index.ts +++ b/clients/client-pi/src/commands/index.ts @@ -1,7 +1,14 @@ // smithy-typescript generated code +export * from "./CreatePerformanceAnalysisReportCommand"; +export * from "./DeletePerformanceAnalysisReportCommand"; export * from "./DescribeDimensionKeysCommand"; export * from "./GetDimensionKeyDetailsCommand"; +export * from "./GetPerformanceAnalysisReportCommand"; export * from "./GetResourceMetadataCommand"; export * from "./GetResourceMetricsCommand"; export * from "./ListAvailableResourceDimensionsCommand"; export * from "./ListAvailableResourceMetricsCommand"; +export * from "./ListPerformanceAnalysisReportsCommand"; +export * from "./ListTagsForResourceCommand"; +export * from "./TagResourceCommand"; +export * from "./UntagResourceCommand"; diff --git a/clients/client-pi/src/endpoint/ruleset.ts b/clients/client-pi/src/endpoint/ruleset.ts index 1ff5c90f0d74..778f26bc3861 100644 --- a/clients/client-pi/src/endpoint/ruleset.ts +++ b/clients/client-pi/src/endpoint/ruleset.ts @@ -26,5 +26,5 @@ m={[r]:"booleanEquals",[s]:[true,{[r]:"getAttr",[s]:[{[t]:e},"supportsDualStack" n=[i], o=[j], p=[{[t]:"Region"}]; -const _data={version:"1.0",parameters:{Region:f,UseDualStack:g,UseFIPS:g,Endpoint:f},rules:[{conditions:[{[r]:a,[s]:[h]}],type:b,rules:[{conditions:n,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:c},{type:b,rules:[{conditions:o,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:c},{endpoint:{url:h,properties:k,headers:k},type:d}]}]},{type:b,rules:[{conditions:[{[r]:a,[s]:p}],type:b,rules:[{conditions:[{[r]:"aws.partition",[s]:p,assign:e}],type:b,rules:[{conditions:[i,j],type:b,rules:[{conditions:[l,m],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://pi-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:c}]},{conditions:n,type:b,rules:[{conditions:[l],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://pi-fips.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"FIPS is enabled but this partition does not support FIPS",type:c}]},{conditions:o,type:b,rules:[{conditions:[m],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://pi.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"DualStack is enabled but this partition does not support DualStack",type:c}]},{type:b,rules:[{endpoint:{url:"https://pi.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]}]}]},{error:"Invalid Configuration: Missing Region",type:c}]}]}; +const _data={version:"1.0",parameters:{Region:f,UseDualStack:g,UseFIPS:g,Endpoint:f},rules:[{conditions:[{[r]:a,[s]:[h]}],type:b,rules:[{conditions:n,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:c},{conditions:o,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:c},{endpoint:{url:h,properties:k,headers:k},type:d}]},{conditions:[{[r]:a,[s]:p}],type:b,rules:[{conditions:[{[r]:"aws.partition",[s]:p,assign:e}],type:b,rules:[{conditions:[i,j],type:b,rules:[{conditions:[l,m],type:b,rules:[{endpoint:{url:"https://pi-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},type:d}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:c}]},{conditions:n,type:b,rules:[{conditions:[l],type:b,rules:[{endpoint:{url:"https://pi-fips.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]},{error:"FIPS is enabled but this partition does not support FIPS",type:c}]},{conditions:o,type:b,rules:[{conditions:[m],type:b,rules:[{endpoint:{url:"https://pi.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},type:d}]},{error:"DualStack is enabled but this partition does not support DualStack",type:c}]},{endpoint:{url:"https://pi.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"Invalid Configuration: Missing Region",type:c}]}; export const ruleSet: RuleSetObject = _data; diff --git a/clients/client-pi/src/models/models_0.ts b/clients/client-pi/src/models/models_0.ts index 9fb4ce196987..9e4658d90353 100644 --- a/clients/client-pi/src/models/models_0.ts +++ b/clients/client-pi/src/models/models_0.ts @@ -1,8 +1,328 @@ // smithy-typescript generated code -import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client"; +import { ExceptionOptionType as __ExceptionOptionType, SENSITIVE_STRING } from "@smithy/smithy-client"; import { PIServiceException as __BaseException } from "./PIServiceException"; +/** + * @public + * @enum + */ +export const AcceptLanguage = { + EN_US: "EN_US", +} as const; + +/** + * @public + */ +export type AcceptLanguage = (typeof AcceptLanguage)[keyof typeof AcceptLanguage]; + +/** + * @public + *

This data type helps to determine Performance Insights metric to render for the insight.

+ */ +export interface PerformanceInsightsMetric { + /** + * @public + *

The Performance Insights metric.

+ */ + Metric?: string; + + /** + * @public + *

The Performance Insights metric name.

+ */ + DisplayName?: string; + + /** + * @public + *

A dimension map that contains the dimensions for this partition.

+ */ + Dimensions?: Record; + + /** + * @public + *

The value of the metric. For example, 9 for db.load.avg.

+ */ + Value?: number; +} + +/** + * @public + *

List of data objects which provide details about source metrics. + * This field can be used to determine the PI metric to render + * for the insight. This data type also includes static values + * for the metrics for the Insight that were calculated and included + * in text and annotations on the DB load chart.

+ */ +export interface Data { + /** + * @public + *

This field determines the Performance Insights metric to render + * for the insight. The name field refers to a Performance Insights metric. + *

+ */ + PerformanceInsightsMetric?: PerformanceInsightsMetric; +} + +/** + * @public + * @enum + */ +export const ContextType = { + CAUSAL: "CAUSAL", + CONTEXTUAL: "CONTEXTUAL", +} as const; + +/** + * @public + */ +export type ContextType = (typeof ContextType)[keyof typeof ContextType]; + +/** + * @public + *

The list of recommendations for the insight.

+ */ +export interface Recommendation { + /** + * @public + *

The unique identifier for the recommendation.

+ */ + RecommendationId?: string; + + /** + * @public + *

The recommendation details to help resolve the performance issue. For example, + * Investigate the following SQLs that contributed to 100% of the total DBLoad during that time period: sql-id + *

+ */ + RecommendationDescription?: string; +} + +/** + * @public + * @enum + */ +export const Severity = { + HIGH: "HIGH", + LOW: "LOW", + MEDIUM: "MEDIUM", +} as const; + +/** + * @public + */ +export type Severity = (typeof Severity)[keyof typeof Severity]; + +/** + * @public + * @enum + */ +export const ServiceType = { + DOCDB: "DOCDB", + RDS: "RDS", +} as const; + +/** + * @public + */ +export type ServiceType = (typeof ServiceType)[keyof typeof ServiceType]; + +/** + * @public + * @enum + */ +export const AnalysisStatus = { + FAILED: "FAILED", + RUNNING: "RUNNING", + SUCCEEDED: "SUCCEEDED", +} as const; + +/** + * @public + */ +export type AnalysisStatus = (typeof AnalysisStatus)[keyof typeof AnalysisStatus]; + +/** + * @public + *

Metadata assigned to an Amazon RDS resource consisting of a key-value pair.

+ */ +export interface Tag { + /** + * @public + *

A key is the required name of the tag. The string value can be from 1 to 128 Unicode + * characters in length and can't be prefixed with aws: or rds:. + * The string can only contain only the set of Unicode letters, digits, + * white-space, '_', '.', ':', '/', '=', '+', '-', '@' (Java regex: "^([\\p\{L\}\\p\{Z\}\\p\{N\}_.:/=+\\-@]*)$").

+ */ + Key: string | undefined; + + /** + * @public + *

A value is the optional value of the tag. The string value can be from 1 to 256 + * Unicode characters in length and can't be prefixed with aws: or rds:. + * The string can only contain only the set of Unicode letters, digits, + * white-space, '_', '.', ':', '/', '=', '+', '-', '@' (Java regex: "^([\\p\{L\}\\p\{Z\}\\p\{N\}_.:/=+\\-@]*)$").

+ */ + Value: string | undefined; +} + +/** + * @public + *

Retrieves the details of the performance analysis report.

+ */ +export interface AnalysisReportSummary { + /** + * @public + *

The name of the analysis report.

+ */ + AnalysisReportId?: string; + + /** + * @public + *

The time you created the analysis report.

+ */ + CreateTime?: Date; + + /** + * @public + *

The start time of the analysis in the report.

+ */ + StartTime?: Date; + + /** + * @public + *

The end time of the analysis in the report.

+ */ + EndTime?: Date; + + /** + * @public + *

The status of the analysis report.

+ */ + Status?: AnalysisStatus | string; + + /** + * @public + *

List of all the tags added to the analysis report.

+ */ + Tags?: Tag[]; +} + +/** + * @public + */ +export interface CreatePerformanceAnalysisReportRequest { + /** + * @public + *

The Amazon Web Services service for which Performance Insights will return metrics. Valid value is RDS.

+ */ + ServiceType: ServiceType | string | undefined; + + /** + * @public + *

An immutable, Amazon Web Services Region-unique identifier for a data source. Performance Insights gathers metrics from + * this data source.

+ *

To use an Amazon RDS instance as a data source, you specify its DbiResourceId value. + * For example, specify db-ADECBTYHKTSAUMUZQYPDS2GW4A.

+ */ + Identifier: string | undefined; + + /** + * @public + *

The start time defined for the analysis report.

+ */ + StartTime: Date | undefined; + + /** + * @public + *

The end time defined for the analysis report.

+ */ + EndTime: Date | undefined; + + /** + * @public + *

The metadata assigned to the analysis report consisting of a key-value pair.

+ */ + Tags?: Tag[]; +} + +/** + * @public + */ +export interface CreatePerformanceAnalysisReportResponse { + /** + * @public + *

A unique identifier for the created analysis report.

+ */ + AnalysisReportId?: string; +} + +/** + * @public + *

The request failed due to an unknown error.

+ */ +export class InternalServiceError extends __BaseException { + readonly name: "InternalServiceError" = "InternalServiceError"; + readonly $fault: "server" = "server"; + Message?: string; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "InternalServiceError", + $fault: "server", + ...opts, + }); + Object.setPrototypeOf(this, InternalServiceError.prototype); + this.Message = opts.Message; + } +} + +/** + * @public + *

One of the arguments provided is invalid for this request.

+ */ +export class InvalidArgumentException extends __BaseException { + readonly name: "InvalidArgumentException" = "InvalidArgumentException"; + readonly $fault: "client" = "client"; + Message?: string; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "InvalidArgumentException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, InvalidArgumentException.prototype); + this.Message = opts.Message; + } +} + +/** + * @public + *

The user is not authorized to perform this request.

+ */ +export class NotAuthorizedException extends __BaseException { + readonly name: "NotAuthorizedException" = "NotAuthorizedException"; + readonly $fault: "client" = "client"; + Message?: string; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "NotAuthorizedException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, NotAuthorizedException.prototype); + this.Message = opts.Message; + } +} + /** * @public *

A timestamp, and a single numerical value, which together represent a measurement at a particular point in time.

@@ -21,6 +341,38 @@ export interface DataPoint { Value: number | undefined; } +/** + * @public + */ +export interface DeletePerformanceAnalysisReportRequest { + /** + * @public + *

The Amazon Web Services service for which Performance Insights will return metrics. Valid value is RDS.

+ */ + ServiceType: ServiceType | string | undefined; + + /** + * @public + *

An immutable identifier for a data source that is unique for an Amazon Web Services Region. Performance Insights gathers metrics from this data source. + * In the console, the identifier is shown as ResourceID. When you + * call DescribeDBInstances, the identifier is returned as DbiResourceId.

+ *

To use a DB instance as a data source, specify its DbiResourceId value. For example, specify + * db-ABCDEFGHIJKLMNOPQRSTU1VW2X.

+ */ + Identifier: string | undefined; + + /** + * @public + *

The unique identifier of the analysis report for deletion.

+ */ + AnalysisReportId: string | undefined; +} + +/** + * @public + */ +export interface DeletePerformanceAnalysisReportResponse {} + /** * @public *

A logical grouping of Performance Insights metrics for a related subject area. For example, the @@ -297,20 +649,6 @@ export interface DimensionGroup { Limit?: number; } -/** - * @public - * @enum - */ -export const ServiceType = { - DOCDB: "DOCDB", - RDS: "RDS", -} as const; - -/** - * @public - */ -export type ServiceType = (typeof ServiceType)[keyof typeof ServiceType]; - /** * @public */ @@ -558,72 +896,6 @@ export interface DescribeDimensionKeysResponse { NextToken?: string; } -/** - * @public - *

The request failed due to an unknown error.

- */ -export class InternalServiceError extends __BaseException { - readonly name: "InternalServiceError" = "InternalServiceError"; - readonly $fault: "server" = "server"; - Message?: string; - /** - * @internal - */ - constructor(opts: __ExceptionOptionType) { - super({ - name: "InternalServiceError", - $fault: "server", - ...opts, - }); - Object.setPrototypeOf(this, InternalServiceError.prototype); - this.Message = opts.Message; - } -} - -/** - * @public - *

One of the arguments provided is invalid for this request.

- */ -export class InvalidArgumentException extends __BaseException { - readonly name: "InvalidArgumentException" = "InvalidArgumentException"; - readonly $fault: "client" = "client"; - Message?: string; - /** - * @internal - */ - constructor(opts: __ExceptionOptionType) { - super({ - name: "InvalidArgumentException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, InvalidArgumentException.prototype); - this.Message = opts.Message; - } -} - -/** - * @public - *

The user is not authorized to perform this request.

- */ -export class NotAuthorizedException extends __BaseException { - readonly name: "NotAuthorizedException" = "NotAuthorizedException"; - readonly $fault: "client" = "client"; - Message?: string; - /** - * @internal - */ - constructor(opts: __ExceptionOptionType) { - super({ - name: "NotAuthorizedException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, NotAuthorizedException.prototype); - this.Message = opts.Message; - } -} - /** * @public * @enum @@ -837,37 +1109,96 @@ export interface GetDimensionKeyDetailsRequest { * * */ - GroupIdentifier: string | undefined; + GroupIdentifier: string | undefined; + + /** + * @public + *

A list of dimensions to retrieve the detail data for within the given dimension group. If you don't specify this parameter, Performance Insights returns + * all dimension data within the specified dimension group. Specify dimension names for the following dimension groups:

+ *
    + *
  • + *

    + * db.sql - Specify either the full dimension name db.sql.statement or the short dimension name + * statement (Aurora and RDS only).

    + *
  • + *
  • + *

    + * db.query - Specify either the full dimension name db.query.statement or the short dimension name + * statement (DocumentDB only).

    + *
  • + *
+ */ + RequestedDimensions?: string[]; +} + +/** + * @public + */ +export interface GetDimensionKeyDetailsResponse { + /** + * @public + *

The details for the requested dimensions.

+ */ + Dimensions?: DimensionKeyDetail[]; +} + +/** + * @public + * @enum + */ +export const TextFormat = { + MARKDOWN: "MARKDOWN", + PLAIN_TEXT: "PLAIN_TEXT", +} as const; + +/** + * @public + */ +export type TextFormat = (typeof TextFormat)[keyof typeof TextFormat]; + +/** + * @public + */ +export interface GetPerformanceAnalysisReportRequest { + /** + * @public + *

The Amazon Web Services service for which Performance Insights will return metrics. Valid value is + * RDS.

+ */ + ServiceType: ServiceType | string | undefined; + + /** + * @public + *

An immutable identifier for a data source that is unique for an Amazon Web Services Region. Performance Insights gathers + * metrics from this data source. In the console, the identifier is shown as + * ResourceID. When you call DescribeDBInstances, the identifier is + * returned as DbiResourceId.

+ *

To use a DB instance as a data source, specify its DbiResourceId value. For example, specify + * db-ABCDEFGHIJKLMNOPQRSTU1VW2X.

+ */ + Identifier: string | undefined; /** * @public - *

A list of dimensions to retrieve the detail data for within the given dimension group. If you don't specify this parameter, Performance Insights returns - * all dimension data within the specified dimension group. Specify dimension names for the following dimension groups:

- *
    - *
  • - *

    - * db.sql - Specify either the full dimension name db.sql.statement or the short dimension name - * statement (Aurora and RDS only).

    - *
  • - *
  • - *

    - * db.query - Specify either the full dimension name db.query.statement or the short dimension name - * statement (DocumentDB only).

    - *
  • - *
+ *

A unique identifier of the created analysis report. For example, + * report-12345678901234567 + *

*/ - RequestedDimensions?: string[]; -} + AnalysisReportId: string | undefined; -/** - * @public - */ -export interface GetDimensionKeyDetailsResponse { /** * @public - *

The details for the requested dimensions.

+ *

Indicates the text format in the report. The options are PLAIN_TEXT or MARKDOWN. The default + * value is plain text.

*/ - Dimensions?: DimensionKeyDetail[]; + TextFormat?: TextFormat | string; + + /** + * @public + *

The text language in the report. The default language is EN_US (English). + *

+ */ + AcceptLanguage?: AcceptLanguage | string; } /** @@ -1374,3 +1705,353 @@ export interface ListAvailableResourceMetricsResponse { */ NextToken?: string; } + +/** + * @public + */ +export interface ListPerformanceAnalysisReportsRequest { + /** + * @public + *

The Amazon Web Services service for which Performance Insights returns metrics. Valid value is + * RDS.

+ */ + ServiceType: ServiceType | string | undefined; + + /** + * @public + *

An immutable identifier for a data source that is unique for an Amazon Web Services Region. Performance Insights gathers metrics from this data source. In the + * console, the identifier is shown as ResourceID. When you call DescribeDBInstances, the identifier is + * returned as DbiResourceId.

+ *

To use a DB instance as a data source, specify its DbiResourceId value. For example, specify + * db-ABCDEFGHIJKLMNOPQRSTU1VW2X.

+ */ + Identifier: string | undefined; + + /** + * @public + *

An optional pagination token provided by a previous request. + * If this parameter is specified, the response includes only records beyond + * the token, up to the value specified by MaxResults.

+ */ + NextToken?: string; + + /** + * @public + *

The maximum number of items to return in the response. If more items exist than the specified MaxResults value, a + * pagination token is included in the response so that the remaining results can be retrieved.

+ */ + MaxResults?: number; + + /** + * @public + *

Specifies whether or not to include the list of tags in the response.

+ */ + ListTags?: boolean; +} + +/** + * @public + */ +export interface ListPerformanceAnalysisReportsResponse { + /** + * @public + *

List of reports including the report identifier, start and end time, creation time, + * and status.

+ */ + AnalysisReports?: AnalysisReportSummary[]; + + /** + * @public + *

An optional pagination token provided by a previous request. + * If this parameter is specified, the response includes only records beyond the token, + * up to the value specified by MaxResults.

+ */ + NextToken?: string; +} + +/** + * @public + */ +export interface ListTagsForResourceRequest { + /** + * @public + *

List the tags for the Amazon Web Services service for which Performance Insights returns metrics. Valid value is RDS.

+ */ + ServiceType: ServiceType | string | undefined; + + /** + * @public + *

Lists all the tags for the Amazon RDS Performance Insights resource. This value is an + * Amazon Resource Name (ARN). For information about creating an ARN, + * see + * Constructing an RDS Amazon Resource Name (ARN).

+ */ + ResourceARN: string | undefined; +} + +/** + * @public + */ +export interface ListTagsForResourceResponse { + /** + * @public + *

The metadata assigned to an Amazon RDS resource consisting of a key-value pair.

+ */ + Tags?: Tag[]; +} + +/** + * @public + */ +export interface TagResourceRequest { + /** + * @public + *

The Amazon Web Services service for which Performance Insights returns metrics. Valid value is RDS.

+ */ + ServiceType: ServiceType | string | undefined; + + /** + * @public + *

The Amazon RDS Performance Insights resource that the tags are added to. This value is an Amazon Resource Name (ARN). For information about + * creating an ARN, see + * Constructing an RDS Amazon Resource Name (ARN).

+ */ + ResourceARN: string | undefined; + + /** + * @public + *

The metadata assigned to an Amazon RDS resource consisting of a key-value pair.

+ */ + Tags: Tag[] | undefined; +} + +/** + * @public + */ +export interface TagResourceResponse {} + +/** + * @public + */ +export interface UntagResourceRequest { + /** + * @public + *

List the tags for the Amazon Web Services service for which Performance Insights returns metrics. Valid value is RDS.

+ */ + ServiceType: ServiceType | string | undefined; + + /** + * @public + *

The Amazon RDS Performance Insights resource that the tags are added to. This value is an Amazon Resource Name (ARN). For information about + * creating an ARN, see + * Constructing an RDS Amazon Resource Name (ARN).

+ */ + ResourceARN: string | undefined; + + /** + * @public + *

The metadata assigned to an Amazon RDS Performance Insights resource consisting of a key-value pair.

+ */ + TagKeys: string[] | undefined; +} + +/** + * @public + */ +export interface UntagResourceResponse {} + +/** + * @public + *

Retrieves the list of performance issues which are identified.

+ */ +export interface Insight { + /** + * @public + *

The unique identifier for the insight. For example, insight-12345678901234567.

+ */ + InsightId: string | undefined; + + /** + * @public + *

The type of insight. For example, HighDBLoad, HighCPU, or DominatingSQLs.

+ */ + InsightType?: string; + + /** + * @public + *

Indicates if the insight is causal or correlated insight.

+ */ + Context?: ContextType | string; + + /** + * @public + *

The start time of the insight. For example, 2018-10-30T00:00:00Z.

+ */ + StartTime?: Date; + + /** + * @public + *

The end time of the insight. For example, 2018-10-30T00:00:00Z.

+ */ + EndTime?: Date; + + /** + * @public + *

The severity of the insight. The values are: Low, Medium, or High.

+ */ + Severity?: Severity | string; + + /** + * @public + *

List of supporting insights that provide additional factors for the insight.

+ */ + SupportingInsights?: Insight[]; + + /** + * @public + *

Description of the insight. For example: + * A high severity Insight found between 02:00 to 02:30, + * where there was an unusually high DB load 600x above baseline. + * Likely performance impact.

+ */ + Description?: string; + + /** + * @public + *

List of recommendations for the insight. + * For example, Investigate the following SQLs that contributed + * to 100% of the total DBLoad during that time period: sql-id.

+ */ + Recommendations?: Recommendation[]; + + /** + * @public + *

List of data objects containing metrics and references from the time range while generating the insight.

+ */ + InsightData?: Data[]; + + /** + * @public + *

+ * Metric names and values from the timeframe + * used as baseline to generate the insight.

+ */ + BaselineData?: Data[]; +} + +/** + * @public + *

Retrieves the summary of the performance analysis report created for a time period.

+ */ +export interface AnalysisReport { + /** + * @public + *

The name of the analysis report.

+ */ + AnalysisReportId: string | undefined; + + /** + * @public + *

The unique identifier of the analysis report.

+ */ + Identifier?: string; + + /** + * @public + *

List the tags for the Amazon Web Services service for which Performance Insights returns metrics. Valid values are as follows:

+ *
    + *
  • + *

    + * RDS + *

    + *
  • + *
  • + *

    + * DOCDB + *

    + *
  • + *
+ */ + ServiceType?: ServiceType | string; + + /** + * @public + *

The time you created the analysis report.

+ */ + CreateTime?: Date; + + /** + * @public + *

The analysis start time in the report.

+ */ + StartTime?: Date; + + /** + * @public + *

The analysis end time in the report.

+ */ + EndTime?: Date; + + /** + * @public + *

The status of the created analysis report.

+ */ + Status?: AnalysisStatus | string; + + /** + * @public + *

The list of identified insights in the analysis report.

+ */ + Insights?: Insight[]; +} + +/** + * @public + */ +export interface GetPerformanceAnalysisReportResponse { + /** + * @public + *

The summary of the performance analysis report created for a time period.

+ */ + AnalysisReport?: AnalysisReport; +} + +/** + * @internal + */ +export const RecommendationFilterSensitiveLog = (obj: Recommendation): any => ({ + ...obj, + ...(obj.RecommendationDescription && { RecommendationDescription: SENSITIVE_STRING }), +}); + +/** + * @internal + */ +export const InsightFilterSensitiveLog = (obj: Insight): any => ({ + ...obj, + ...(obj.SupportingInsights && { + SupportingInsights: obj.SupportingInsights.map((item) => InsightFilterSensitiveLog(item)), + }), + ...(obj.Description && { Description: SENSITIVE_STRING }), + ...(obj.Recommendations && { + Recommendations: obj.Recommendations.map((item) => RecommendationFilterSensitiveLog(item)), + }), +}); + +/** + * @internal + */ +export const AnalysisReportFilterSensitiveLog = (obj: AnalysisReport): any => ({ + ...obj, + ...(obj.Insights && { Insights: obj.Insights.map((item) => InsightFilterSensitiveLog(item)) }), +}); + +/** + * @internal + */ +export const GetPerformanceAnalysisReportResponseFilterSensitiveLog = ( + obj: GetPerformanceAnalysisReportResponse +): any => ({ + ...obj, + ...(obj.AnalysisReport && { AnalysisReport: AnalysisReportFilterSensitiveLog(obj.AnalysisReport) }), +}); diff --git a/clients/client-pi/src/pagination/ListPerformanceAnalysisReportsPaginator.ts b/clients/client-pi/src/pagination/ListPerformanceAnalysisReportsPaginator.ts new file mode 100644 index 000000000000..0dcd479952ce --- /dev/null +++ b/clients/client-pi/src/pagination/ListPerformanceAnalysisReportsPaginator.ts @@ -0,0 +1,50 @@ +// smithy-typescript generated code +import { Paginator } from "@smithy/types"; + +import { + ListPerformanceAnalysisReportsCommand, + ListPerformanceAnalysisReportsCommandInput, + ListPerformanceAnalysisReportsCommandOutput, +} from "../commands/ListPerformanceAnalysisReportsCommand"; +import { PIClient } from "../PIClient"; +import { PIPaginationConfiguration } from "./Interfaces"; + +/** + * @internal + */ +const makePagedClientRequest = async ( + client: PIClient, + input: ListPerformanceAnalysisReportsCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListPerformanceAnalysisReportsCommand(input), ...args); +}; +/** + * @public + */ +export async function* paginateListPerformanceAnalysisReports( + config: PIPaginationConfiguration, + input: ListPerformanceAnalysisReportsCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.NextToken + let token: typeof input.NextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListPerformanceAnalysisReportsCommandOutput; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof PIClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected PI | PIClient"); + } + yield page; + const prevToken = token; + token = page.NextToken; + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-pi/src/pagination/index.ts b/clients/client-pi/src/pagination/index.ts index 957b4b0f379b..9375f9668738 100644 --- a/clients/client-pi/src/pagination/index.ts +++ b/clients/client-pi/src/pagination/index.ts @@ -5,3 +5,4 @@ export * from "./GetResourceMetricsPaginator"; export * from "./Interfaces"; export * from "./ListAvailableResourceDimensionsPaginator"; export * from "./ListAvailableResourceMetricsPaginator"; +export * from "./ListPerformanceAnalysisReportsPaginator"; diff --git a/clients/client-pi/src/protocols/Aws_json1_1.ts b/clients/client-pi/src/protocols/Aws_json1_1.ts index ec28ab11ddb5..78857d102496 100644 --- a/clients/client-pi/src/protocols/Aws_json1_1.ts +++ b/clients/client-pi/src/protocols/Aws_json1_1.ts @@ -19,6 +19,14 @@ import { SerdeContext as __SerdeContext, } from "@smithy/types"; +import { + CreatePerformanceAnalysisReportCommandInput, + CreatePerformanceAnalysisReportCommandOutput, +} from "../commands/CreatePerformanceAnalysisReportCommand"; +import { + DeletePerformanceAnalysisReportCommandInput, + DeletePerformanceAnalysisReportCommandOutput, +} from "../commands/DeletePerformanceAnalysisReportCommand"; import { DescribeDimensionKeysCommandInput, DescribeDimensionKeysCommandOutput, @@ -27,6 +35,10 @@ import { GetDimensionKeyDetailsCommandInput, GetDimensionKeyDetailsCommandOutput, } from "../commands/GetDimensionKeyDetailsCommand"; +import { + GetPerformanceAnalysisReportCommandInput, + GetPerformanceAnalysisReportCommandOutput, +} from "../commands/GetPerformanceAnalysisReportCommand"; import { GetResourceMetadataCommandInput, GetResourceMetadataCommandOutput, @@ -41,25 +53,76 @@ import { ListAvailableResourceMetricsCommandOutput, } from "../commands/ListAvailableResourceMetricsCommand"; import { + ListPerformanceAnalysisReportsCommandInput, + ListPerformanceAnalysisReportsCommandOutput, +} from "../commands/ListPerformanceAnalysisReportsCommand"; +import { + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, +} from "../commands/ListTagsForResourceCommand"; +import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand"; +import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand"; +import { + AnalysisReport, + AnalysisReportSummary, + CreatePerformanceAnalysisReportRequest, + Data, DataPoint, + DeletePerformanceAnalysisReportRequest, DescribeDimensionKeysRequest, DescribeDimensionKeysResponse, DimensionGroup, DimensionKeyDescription, GetDimensionKeyDetailsRequest, + GetPerformanceAnalysisReportRequest, + GetPerformanceAnalysisReportResponse, GetResourceMetadataRequest, GetResourceMetricsRequest, GetResourceMetricsResponse, + Insight, InternalServiceError, InvalidArgumentException, ListAvailableResourceDimensionsRequest, ListAvailableResourceMetricsRequest, + ListPerformanceAnalysisReportsRequest, + ListPerformanceAnalysisReportsResponse, + ListTagsForResourceRequest, MetricKeyDataPoints, MetricQuery, NotAuthorizedException, + PerformanceInsightsMetric, + Tag, + TagResourceRequest, + UntagResourceRequest, } from "../models/models_0"; import { PIServiceException as __BaseException } from "../models/PIServiceException"; +/** + * serializeAws_json1_1CreatePerformanceAnalysisReportCommand + */ +export const se_CreatePerformanceAnalysisReportCommand = async ( + input: CreatePerformanceAnalysisReportCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("CreatePerformanceAnalysisReport"); + let body: any; + body = JSON.stringify(se_CreatePerformanceAnalysisReportRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_1DeletePerformanceAnalysisReportCommand + */ +export const se_DeletePerformanceAnalysisReportCommand = async ( + input: DeletePerformanceAnalysisReportCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("DeletePerformanceAnalysisReport"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + /** * serializeAws_json1_1DescribeDimensionKeysCommand */ @@ -86,6 +149,19 @@ export const se_GetDimensionKeyDetailsCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +/** + * serializeAws_json1_1GetPerformanceAnalysisReportCommand + */ +export const se_GetPerformanceAnalysisReportCommand = async ( + input: GetPerformanceAnalysisReportCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("GetPerformanceAnalysisReport"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + /** * serializeAws_json1_1GetResourceMetadataCommand */ @@ -138,6 +214,162 @@ export const se_ListAvailableResourceMetricsCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +/** + * serializeAws_json1_1ListPerformanceAnalysisReportsCommand + */ +export const se_ListPerformanceAnalysisReportsCommand = async ( + input: ListPerformanceAnalysisReportsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("ListPerformanceAnalysisReports"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_1ListTagsForResourceCommand + */ +export const se_ListTagsForResourceCommand = async ( + input: ListTagsForResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("ListTagsForResource"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_1TagResourceCommand + */ +export const se_TagResourceCommand = async ( + input: TagResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("TagResource"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_1UntagResourceCommand + */ +export const se_UntagResourceCommand = async ( + input: UntagResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("UntagResource"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * deserializeAws_json1_1CreatePerformanceAnalysisReportCommand + */ +export const de_CreatePerformanceAnalysisReportCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CreatePerformanceAnalysisReportCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: CreatePerformanceAnalysisReportCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1CreatePerformanceAnalysisReportCommandError + */ +const de_CreatePerformanceAnalysisReportCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServiceError": + case "com.amazonaws.pi#InternalServiceError": + throw await de_InternalServiceErrorRes(parsedOutput, context); + case "InvalidArgumentException": + case "com.amazonaws.pi#InvalidArgumentException": + throw await de_InvalidArgumentExceptionRes(parsedOutput, context); + case "NotAuthorizedException": + case "com.amazonaws.pi#NotAuthorizedException": + throw await de_NotAuthorizedExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_json1_1DeletePerformanceAnalysisReportCommand + */ +export const de_DeletePerformanceAnalysisReportCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_DeletePerformanceAnalysisReportCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: DeletePerformanceAnalysisReportCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1DeletePerformanceAnalysisReportCommandError + */ +const de_DeletePerformanceAnalysisReportCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServiceError": + case "com.amazonaws.pi#InternalServiceError": + throw await de_InternalServiceErrorRes(parsedOutput, context); + case "InvalidArgumentException": + case "com.amazonaws.pi#InvalidArgumentException": + throw await de_InvalidArgumentExceptionRes(parsedOutput, context); + case "NotAuthorizedException": + case "com.amazonaws.pi#NotAuthorizedException": + throw await de_NotAuthorizedExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + /** * deserializeAws_json1_1DescribeDimensionKeysCommand */ @@ -242,6 +474,58 @@ const de_GetDimensionKeyDetailsCommandError = async ( } }; +/** + * deserializeAws_json1_1GetPerformanceAnalysisReportCommand + */ +export const de_GetPerformanceAnalysisReportCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_GetPerformanceAnalysisReportCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_GetPerformanceAnalysisReportResponse(data, context); + const response: GetPerformanceAnalysisReportCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1GetPerformanceAnalysisReportCommandError + */ +const de_GetPerformanceAnalysisReportCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServiceError": + case "com.amazonaws.pi#InternalServiceError": + throw await de_InternalServiceErrorRes(parsedOutput, context); + case "InvalidArgumentException": + case "com.amazonaws.pi#InvalidArgumentException": + throw await de_InvalidArgumentExceptionRes(parsedOutput, context); + case "NotAuthorizedException": + case "com.amazonaws.pi#NotAuthorizedException": + throw await de_NotAuthorizedExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + /** * deserializeAws_json1_1GetResourceMetadataCommand */ @@ -450,6 +734,214 @@ const de_ListAvailableResourceMetricsCommandError = async ( } }; +/** + * deserializeAws_json1_1ListPerformanceAnalysisReportsCommand + */ +export const de_ListPerformanceAnalysisReportsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_ListPerformanceAnalysisReportsCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_ListPerformanceAnalysisReportsResponse(data, context); + const response: ListPerformanceAnalysisReportsCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1ListPerformanceAnalysisReportsCommandError + */ +const de_ListPerformanceAnalysisReportsCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServiceError": + case "com.amazonaws.pi#InternalServiceError": + throw await de_InternalServiceErrorRes(parsedOutput, context); + case "InvalidArgumentException": + case "com.amazonaws.pi#InvalidArgumentException": + throw await de_InvalidArgumentExceptionRes(parsedOutput, context); + case "NotAuthorizedException": + case "com.amazonaws.pi#NotAuthorizedException": + throw await de_NotAuthorizedExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_json1_1ListTagsForResourceCommand + */ +export const de_ListTagsForResourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_ListTagsForResourceCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: ListTagsForResourceCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1ListTagsForResourceCommandError + */ +const de_ListTagsForResourceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServiceError": + case "com.amazonaws.pi#InternalServiceError": + throw await de_InternalServiceErrorRes(parsedOutput, context); + case "InvalidArgumentException": + case "com.amazonaws.pi#InvalidArgumentException": + throw await de_InvalidArgumentExceptionRes(parsedOutput, context); + case "NotAuthorizedException": + case "com.amazonaws.pi#NotAuthorizedException": + throw await de_NotAuthorizedExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_json1_1TagResourceCommand + */ +export const de_TagResourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_TagResourceCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: TagResourceCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1TagResourceCommandError + */ +const de_TagResourceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServiceError": + case "com.amazonaws.pi#InternalServiceError": + throw await de_InternalServiceErrorRes(parsedOutput, context); + case "InvalidArgumentException": + case "com.amazonaws.pi#InvalidArgumentException": + throw await de_InvalidArgumentExceptionRes(parsedOutput, context); + case "NotAuthorizedException": + case "com.amazonaws.pi#NotAuthorizedException": + throw await de_NotAuthorizedExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_json1_1UntagResourceCommand + */ +export const de_UntagResourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_UntagResourceCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: UntagResourceCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1UntagResourceCommandError + */ +const de_UntagResourceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServiceError": + case "com.amazonaws.pi#InternalServiceError": + throw await de_InternalServiceErrorRes(parsedOutput, context); + case "InvalidArgumentException": + case "com.amazonaws.pi#InvalidArgumentException": + throw await de_InvalidArgumentExceptionRes(parsedOutput, context); + case "NotAuthorizedException": + case "com.amazonaws.pi#NotAuthorizedException": + throw await de_NotAuthorizedExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + /** * deserializeAws_json1_1InternalServiceErrorRes */ @@ -500,6 +992,24 @@ const de_NotAuthorizedExceptionRes = async ( // se_AdditionalMetricsList omitted. +/** + * serializeAws_json1_1CreatePerformanceAnalysisReportRequest + */ +const se_CreatePerformanceAnalysisReportRequest = ( + input: CreatePerformanceAnalysisReportRequest, + context: __SerdeContext +): any => { + return take(input, { + EndTime: (_) => Math.round(_.getTime() / 1000), + Identifier: [], + ServiceType: [], + StartTime: (_) => Math.round(_.getTime() / 1000), + Tags: _json, + }); +}; + +// se_DeletePerformanceAnalysisReportRequest omitted. + /** * serializeAws_json1_1DescribeDimensionKeysRequest */ @@ -526,6 +1036,8 @@ const se_DescribeDimensionKeysRequest = (input: DescribeDimensionKeysRequest, co // se_GetDimensionKeyDetailsRequest omitted. +// se_GetPerformanceAnalysisReportRequest omitted. + // se_GetResourceMetadataRequest omitted. /** @@ -549,6 +1061,10 @@ const se_GetResourceMetricsRequest = (input: GetResourceMetricsRequest, context: // se_ListAvailableResourceMetricsRequest omitted. +// se_ListPerformanceAnalysisReportsRequest omitted. + +// se_ListTagsForResourceRequest omitted. + // se_MetricQuery omitted. // se_MetricQueryFilterMap omitted. @@ -561,6 +1077,16 @@ const se_GetResourceMetricsRequest = (input: GetResourceMetricsRequest, context: // se_RequestStringList omitted. +// se_Tag omitted. + +// se_TagKeyList omitted. + +// se_TagList omitted. + +// se_TagResourceRequest omitted. + +// se_UntagResourceRequest omitted. + /** * deserializeAws_json1_1AdditionalMetricsMap */ @@ -574,6 +1100,71 @@ const de_AdditionalMetricsMap = (output: any, context: __SerdeContext): Record { + return take(output, { + AnalysisReportId: __expectString, + CreateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Identifier: __expectString, + Insights: (_: any) => de_InsightList(_, context), + ServiceType: __expectString, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + }) as any; +}; + +/** + * deserializeAws_json1_1AnalysisReportSummary + */ +const de_AnalysisReportSummary = (output: any, context: __SerdeContext): AnalysisReportSummary => { + return take(output, { + AnalysisReportId: __expectString, + CreateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Status: __expectString, + Tags: _json, + }) as any; +}; + +/** + * deserializeAws_json1_1AnalysisReportSummaryList + */ +const de_AnalysisReportSummaryList = (output: any, context: __SerdeContext): AnalysisReportSummary[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_AnalysisReportSummary(entry, context); + }); + return retVal; +}; + +// de_CreatePerformanceAnalysisReportResponse omitted. + +/** + * deserializeAws_json1_1Data + */ +const de_Data = (output: any, context: __SerdeContext): Data => { + return take(output, { + PerformanceInsightsMetric: (_: any) => de_PerformanceInsightsMetric(_, context), + }) as any; +}; + +/** + * deserializeAws_json1_1DataList + */ +const de_DataList = (output: any, context: __SerdeContext): Data[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_Data(entry, context); + }); + return retVal; +}; + /** * deserializeAws_json1_1DataPoint */ @@ -596,6 +1187,8 @@ const de_DataPointsList = (output: any, context: __SerdeContext): DataPoint[] => return retVal; }; +// de_DeletePerformanceAnalysisReportResponse omitted. + /** * deserializeAws_json1_1DescribeDimensionKeysResponse */ @@ -609,6 +1202,8 @@ const de_DescribeDimensionKeysResponse = (output: any, context: __SerdeContext): }) as any; }; +// de_DescriptiveMap omitted. + // de_DimensionDetail omitted. // de_DimensionDetailList omitted. @@ -653,6 +1248,18 @@ const de_DimensionKeyDescriptionList = (output: any, context: __SerdeContext): D // de_GetDimensionKeyDetailsResponse omitted. +/** + * deserializeAws_json1_1GetPerformanceAnalysisReportResponse + */ +const de_GetPerformanceAnalysisReportResponse = ( + output: any, + context: __SerdeContext +): GetPerformanceAnalysisReportResponse => { + return take(output, { + AnalysisReport: (_: any) => de_AnalysisReport(_, context), + }) as any; +}; + // de_GetResourceMetadataResponse omitted. /** @@ -668,6 +1275,37 @@ const de_GetResourceMetricsResponse = (output: any, context: __SerdeContext): Ge }) as any; }; +/** + * deserializeAws_json1_1Insight + */ +const de_Insight = (output: any, context: __SerdeContext): Insight => { + return take(output, { + BaselineData: (_: any) => de_DataList(_, context), + Context: __expectString, + Description: __expectString, + EndTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + InsightData: (_: any) => de_DataList(_, context), + InsightId: __expectString, + InsightType: __expectString, + Recommendations: _json, + Severity: __expectString, + StartTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + SupportingInsights: (_: any) => de_InsightList(_, context), + }) as any; +}; + +/** + * deserializeAws_json1_1InsightList + */ +const de_InsightList = (output: any, context: __SerdeContext): Insight[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_Insight(entry, context); + }); + return retVal; +}; + // de_InternalServiceError omitted. // de_InvalidArgumentException omitted. @@ -676,6 +1314,21 @@ const de_GetResourceMetricsResponse = (output: any, context: __SerdeContext): Ge // de_ListAvailableResourceMetricsResponse omitted. +/** + * deserializeAws_json1_1ListPerformanceAnalysisReportsResponse + */ +const de_ListPerformanceAnalysisReportsResponse = ( + output: any, + context: __SerdeContext +): ListPerformanceAnalysisReportsResponse => { + return take(output, { + AnalysisReports: (_: any) => de_AnalysisReportSummaryList(_, context), + NextToken: __expectString, + }) as any; +}; + +// de_ListTagsForResourceResponse omitted. + // de_MetricDimensionGroups omitted. // de_MetricDimensionsList omitted. @@ -716,6 +1369,22 @@ const de_MetricValuesList = (output: any, context: __SerdeContext): number[] => // de_NotAuthorizedException omitted. +/** + * deserializeAws_json1_1PerformanceInsightsMetric + */ +const de_PerformanceInsightsMetric = (output: any, context: __SerdeContext): PerformanceInsightsMetric => { + return take(output, { + Dimensions: _json, + DisplayName: __expectString, + Metric: __expectString, + Value: __limitedParseDouble, + }) as any; +}; + +// de_Recommendation omitted. + +// de_RecommendationList omitted. + // de_ResponsePartitionKey omitted. // de_ResponsePartitionKeyList omitted. @@ -726,6 +1395,14 @@ const de_MetricValuesList = (output: any, context: __SerdeContext): number[] => // de_ResponseResourceMetricList omitted. +// de_Tag omitted. + +// de_TagList omitted. + +// de_TagResourceResponse omitted. + +// de_UntagResourceResponse omitted. + const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, requestId: diff --git a/codegen/sdk-codegen/aws-models/pi.json b/codegen/sdk-codegen/aws-models/pi.json index e7ff1df2c38c..81c5c6e91844 100644 --- a/codegen/sdk-codegen/aws-models/pi.json +++ b/codegen/sdk-codegen/aws-models/pi.json @@ -29,6 +29,17 @@ ] }, "shapes": { + "com.amazonaws.pi#AcceptLanguage": { + "type": "enum", + "members": { + "EN_US": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EN_US" + } + } + } + }, "com.amazonaws.pi#AdditionalMetricsList": { "type": "list", "member": { @@ -50,6 +61,275 @@ "target": "com.amazonaws.pi#Double" } }, + "com.amazonaws.pi#AmazonResourceName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1011 + }, + "smithy.api#pattern": "^arn:.*:pi:.*$" + } + }, + "com.amazonaws.pi#AnalysisReport": { + "type": "structure", + "members": { + "AnalysisReportId": { + "target": "com.amazonaws.pi#AnalysisReportId", + "traits": { + "smithy.api#documentation": "

The name of the analysis report.

", + "smithy.api#required": {} + } + }, + "Identifier": { + "target": "com.amazonaws.pi#IdentifierString", + "traits": { + "smithy.api#documentation": "

The unique identifier of the analysis report.

" + } + }, + "ServiceType": { + "target": "com.amazonaws.pi#ServiceType", + "traits": { + "smithy.api#documentation": "

List the tags for the Amazon Web Services service for which Performance Insights returns metrics. Valid values are as follows:

\n
    \n
  • \n

    \n RDS\n

    \n
  • \n
  • \n

    \n DOCDB\n

    \n
  • \n
" + } + }, + "CreateTime": { + "target": "com.amazonaws.pi#ISOTimestamp", + "traits": { + "smithy.api#documentation": "

The time you created the analysis report.

" + } + }, + "StartTime": { + "target": "com.amazonaws.pi#ISOTimestamp", + "traits": { + "smithy.api#documentation": "

The analysis start time in the report.

" + } + }, + "EndTime": { + "target": "com.amazonaws.pi#ISOTimestamp", + "traits": { + "smithy.api#documentation": "

The analysis end time in the report.

" + } + }, + "Status": { + "target": "com.amazonaws.pi#AnalysisStatus", + "traits": { + "smithy.api#documentation": "

The status of the created analysis report.

" + } + }, + "Insights": { + "target": "com.amazonaws.pi#InsightList", + "traits": { + "smithy.api#documentation": "

The list of identified insights in the analysis report.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Retrieves the summary of the performance analysis report created for a time period.

" + } + }, + "com.amazonaws.pi#AnalysisReportId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 100 + }, + "smithy.api#pattern": "^report-[0-9a-f]{17}$" + } + }, + "com.amazonaws.pi#AnalysisReportSummary": { + "type": "structure", + "members": { + "AnalysisReportId": { + "target": "com.amazonaws.pi#String", + "traits": { + "smithy.api#documentation": "

The name of the analysis report.

" + } + }, + "CreateTime": { + "target": "com.amazonaws.pi#ISOTimestamp", + "traits": { + "smithy.api#documentation": "

The time you created the analysis report.

" + } + }, + "StartTime": { + "target": "com.amazonaws.pi#ISOTimestamp", + "traits": { + "smithy.api#documentation": "

The start time of the analysis in the report.

" + } + }, + "EndTime": { + "target": "com.amazonaws.pi#ISOTimestamp", + "traits": { + "smithy.api#documentation": "

The end time of the analysis in the report.

" + } + }, + "Status": { + "target": "com.amazonaws.pi#AnalysisStatus", + "traits": { + "smithy.api#documentation": "

The status of the analysis report.

" + } + }, + "Tags": { + "target": "com.amazonaws.pi#TagList", + "traits": { + "smithy.api#documentation": "

List of all the tags added to the analysis report.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Retrieves the details of the performance analysis report.

" + } + }, + "com.amazonaws.pi#AnalysisReportSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.pi#AnalysisReportSummary" + } + }, + "com.amazonaws.pi#AnalysisStatus": { + "type": "enum", + "members": { + "RUNNING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RUNNING" + } + }, + "SUCCEEDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SUCCEEDED" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + } + } + }, + "com.amazonaws.pi#Boolean": { + "type": "boolean" + }, + "com.amazonaws.pi#ContextType": { + "type": "enum", + "members": { + "CAUSAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CAUSAL" + } + }, + "CONTEXTUAL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CONTEXTUAL" + } + } + } + }, + "com.amazonaws.pi#CreatePerformanceAnalysisReport": { + "type": "operation", + "input": { + "target": "com.amazonaws.pi#CreatePerformanceAnalysisReportRequest" + }, + "output": { + "target": "com.amazonaws.pi#CreatePerformanceAnalysisReportResponse" + }, + "errors": [ + { + "target": "com.amazonaws.pi#InternalServiceError" + }, + { + "target": "com.amazonaws.pi#InvalidArgumentException" + }, + { + "target": "com.amazonaws.pi#NotAuthorizedException" + } + ], + "traits": { + "smithy.api#documentation": "

Creates a new performance analysis report for a specific time period for the\n DB instance.

" + } + }, + "com.amazonaws.pi#CreatePerformanceAnalysisReportRequest": { + "type": "structure", + "members": { + "ServiceType": { + "target": "com.amazonaws.pi#ServiceType", + "traits": { + "smithy.api#documentation": "

The Amazon Web Services service for which Performance Insights will return metrics. Valid value is RDS.

", + "smithy.api#required": {} + } + }, + "Identifier": { + "target": "com.amazonaws.pi#IdentifierString", + "traits": { + "smithy.api#documentation": "

An immutable, Amazon Web Services Region-unique identifier for a data source. Performance Insights gathers metrics from\n this data source.

\n

To use an Amazon RDS instance as a data source, you specify its DbiResourceId value. \n For example, specify db-ADECBTYHKTSAUMUZQYPDS2GW4A.

", + "smithy.api#required": {} + } + }, + "StartTime": { + "target": "com.amazonaws.pi#ISOTimestamp", + "traits": { + "smithy.api#documentation": "

The start time defined for the analysis report.

", + "smithy.api#required": {} + } + }, + "EndTime": { + "target": "com.amazonaws.pi#ISOTimestamp", + "traits": { + "smithy.api#documentation": "

The end time defined for the analysis report.

", + "smithy.api#required": {} + } + }, + "Tags": { + "target": "com.amazonaws.pi#TagList", + "traits": { + "smithy.api#documentation": "

The metadata assigned to the analysis report consisting of a key-value pair.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.pi#CreatePerformanceAnalysisReportResponse": { + "type": "structure", + "members": { + "AnalysisReportId": { + "target": "com.amazonaws.pi#AnalysisReportId", + "traits": { + "smithy.api#documentation": "

A unique identifier for the created analysis report.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.pi#Data": { + "type": "structure", + "members": { + "PerformanceInsightsMetric": { + "target": "com.amazonaws.pi#PerformanceInsightsMetric", + "traits": { + "smithy.api#documentation": "

This field determines the Performance Insights metric to render \n for the insight. The name field refers to a Performance Insights metric. \n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

List of data objects which provide details about source metrics. \n This field can be used to determine the PI metric to render\n for the insight. This data type also includes static values \n for the metrics for the Insight that were calculated and included \n in text and annotations on the DB load chart.

" + } + }, + "com.amazonaws.pi#DataList": { + "type": "list", + "member": { + "target": "com.amazonaws.pi#Data" + } + }, "com.amazonaws.pi#DataPoint": { "type": "structure", "members": { @@ -78,6 +358,65 @@ "target": "com.amazonaws.pi#DataPoint" } }, + "com.amazonaws.pi#DeletePerformanceAnalysisReport": { + "type": "operation", + "input": { + "target": "com.amazonaws.pi#DeletePerformanceAnalysisReportRequest" + }, + "output": { + "target": "com.amazonaws.pi#DeletePerformanceAnalysisReportResponse" + }, + "errors": [ + { + "target": "com.amazonaws.pi#InternalServiceError" + }, + { + "target": "com.amazonaws.pi#InvalidArgumentException" + }, + { + "target": "com.amazonaws.pi#NotAuthorizedException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes a performance analysis report.

" + } + }, + "com.amazonaws.pi#DeletePerformanceAnalysisReportRequest": { + "type": "structure", + "members": { + "ServiceType": { + "target": "com.amazonaws.pi#ServiceType", + "traits": { + "smithy.api#documentation": "

The Amazon Web Services service for which Performance Insights will return metrics. Valid value is RDS.

", + "smithy.api#required": {} + } + }, + "Identifier": { + "target": "com.amazonaws.pi#IdentifierString", + "traits": { + "smithy.api#documentation": "

An immutable identifier for a data source that is unique for an Amazon Web Services Region. Performance Insights gathers metrics from this data source. \n In the console, the identifier is shown as ResourceID. When you \n call DescribeDBInstances, the identifier is returned as DbiResourceId.

\n

To use a DB instance as a data source, specify its DbiResourceId value. For example, specify\n db-ABCDEFGHIJKLMNOPQRSTU1VW2X.

", + "smithy.api#required": {} + } + }, + "AnalysisReportId": { + "target": "com.amazonaws.pi#AnalysisReportId", + "traits": { + "smithy.api#documentation": "

The unique identifier of the analysis report for deletion.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.pi#DeletePerformanceAnalysisReportResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.pi#DescribeDimensionKeys": { "type": "operation", "input": { @@ -117,7 +456,7 @@ } }, "Identifier": { - "target": "com.amazonaws.pi#RequestString", + "target": "com.amazonaws.pi#IdentifierString", "traits": { "smithy.api#documentation": "

An immutable, Amazon Web Services Region-unique identifier for a data source. Performance Insights gathers metrics from\n this data source.

\n

To use an Amazon RDS instance as a data source, you specify its DbiResourceId value. \n For example, specify db-FAIHNTYBKTGAUSUZQYPDS2GW4A.\n

", "smithy.api#required": {} @@ -239,6 +578,25 @@ } } }, + "com.amazonaws.pi#DescriptiveMap": { + "type": "map", + "key": { + "target": "com.amazonaws.pi#DescriptiveString" + }, + "value": { + "target": "com.amazonaws.pi#DescriptiveString" + } + }, + "com.amazonaws.pi#DescriptiveString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2000 + }, + "smithy.api#pattern": "^.*$" + } + }, "com.amazonaws.pi#DetailStatus": { "type": "enum", "members": { @@ -491,18 +849,97 @@ "UNKNOWN": { "target": "smithy.api#Unit", "traits": { - "smithy.api#enumValue": "UNKNOWN" + "smithy.api#enumValue": "UNKNOWN" + } + } + } + }, + "com.amazonaws.pi#GetDimensionKeyDetails": { + "type": "operation", + "input": { + "target": "com.amazonaws.pi#GetDimensionKeyDetailsRequest" + }, + "output": { + "target": "com.amazonaws.pi#GetDimensionKeyDetailsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.pi#InternalServiceError" + }, + { + "target": "com.amazonaws.pi#InvalidArgumentException" + }, + { + "target": "com.amazonaws.pi#NotAuthorizedException" + } + ], + "traits": { + "smithy.api#documentation": "

Get the attributes of the specified dimension group for a DB instance or data source. For example, if you specify a SQL ID,\n GetDimensionKeyDetails retrieves the full text of the dimension db.sql.statement associated with this ID.\n This operation is useful because GetResourceMetrics and DescribeDimensionKeys don't support retrieval of large\n SQL statement text.

" + } + }, + "com.amazonaws.pi#GetDimensionKeyDetailsRequest": { + "type": "structure", + "members": { + "ServiceType": { + "target": "com.amazonaws.pi#ServiceType", + "traits": { + "smithy.api#documentation": "

The Amazon Web Services service for which Performance Insights returns data. The only valid value is RDS.

", + "smithy.api#required": {} + } + }, + "Identifier": { + "target": "com.amazonaws.pi#IdentifierString", + "traits": { + "smithy.api#documentation": "

The ID for a data source from which to gather dimension data. This ID must be immutable and \n unique within an Amazon Web Services Region. When a DB instance is the data source, specify its \n DbiResourceId value. For example, specify db-ABCDEFGHIJKLMNOPQRSTU1VW2X.\n

", + "smithy.api#required": {} + } + }, + "Group": { + "target": "com.amazonaws.pi#RequestString", + "traits": { + "smithy.api#documentation": "

The name of the dimension group. Performance Insights searches the specified group for the dimension group ID. The following group name values are\n valid:

\n
    \n
  • \n

    \n db.query (Amazon DocumentDB only)

    \n
  • \n
  • \n

    \n db.sql (Amazon RDS and Aurora only)

    \n
  • \n
", + "smithy.api#required": {} + } + }, + "GroupIdentifier": { + "target": "com.amazonaws.pi#RequestString", + "traits": { + "smithy.api#documentation": "

The ID of the dimension group from which to retrieve dimension details. For dimension group db.sql, the group ID is\n db.sql.id. The following group ID values are valid:

\n
    \n
  • \n

    \n db.sql.id for dimension group db.sql (Aurora and RDS only)

    \n
  • \n
  • \n

    \n db.query.id for dimension group db.query (DocumentDB only)

    \n
  • \n
", + "smithy.api#required": {} + } + }, + "RequestedDimensions": { + "target": "com.amazonaws.pi#RequestedDimensionList", + "traits": { + "smithy.api#documentation": "

A list of dimensions to retrieve the detail data for within the given dimension group. If you don't specify this parameter, Performance Insights returns\n all dimension data within the specified dimension group. Specify dimension names for the following dimension groups:

\n
    \n
  • \n

    \n db.sql - Specify either the full dimension name db.sql.statement or the short dimension name\n statement (Aurora and RDS only).

    \n
  • \n
  • \n

    \n db.query - Specify either the full dimension name db.query.statement or the short dimension name\n statement (DocumentDB only).

    \n
  • \n
" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.pi#GetDimensionKeyDetailsResponse": { + "type": "structure", + "members": { + "Dimensions": { + "target": "com.amazonaws.pi#DimensionKeyDetailList", + "traits": { + "smithy.api#documentation": "

The details for the requested dimensions.

" } } + }, + "traits": { + "smithy.api#output": {} } }, - "com.amazonaws.pi#GetDimensionKeyDetails": { + "com.amazonaws.pi#GetPerformanceAnalysisReport": { "type": "operation", "input": { - "target": "com.amazonaws.pi#GetDimensionKeyDetailsRequest" + "target": "com.amazonaws.pi#GetPerformanceAnalysisReportRequest" }, "output": { - "target": "com.amazonaws.pi#GetDimensionKeyDetailsResponse" + "target": "com.amazonaws.pi#GetPerformanceAnalysisReportResponse" }, "errors": [ { @@ -516,44 +953,43 @@ } ], "traits": { - "smithy.api#documentation": "

Get the attributes of the specified dimension group for a DB instance or data source. For example, if you specify a SQL ID,\n GetDimensionKeyDetails retrieves the full text of the dimension db.sql.statement associated with this ID.\n This operation is useful because GetResourceMetrics and DescribeDimensionKeys don't support retrieval of large\n SQL statement text.

" + "smithy.api#documentation": "

Retrieves the report including the report ID, status, time details, and the insights\n with recommendations. The report status can be RUNNING,\n SUCCEEDED, or FAILED. The insights include the\n description and recommendation fields.

" } }, - "com.amazonaws.pi#GetDimensionKeyDetailsRequest": { + "com.amazonaws.pi#GetPerformanceAnalysisReportRequest": { "type": "structure", "members": { "ServiceType": { "target": "com.amazonaws.pi#ServiceType", "traits": { - "smithy.api#documentation": "

The Amazon Web Services service for which Performance Insights returns data. The only valid value is RDS.

", + "smithy.api#documentation": "

The Amazon Web Services service for which Performance Insights will return metrics. Valid value is\n RDS.

", "smithy.api#required": {} } }, "Identifier": { "target": "com.amazonaws.pi#IdentifierString", "traits": { - "smithy.api#documentation": "

The ID for a data source from which to gather dimension data. This ID must be immutable and \n unique within an Amazon Web Services Region. When a DB instance is the data source, specify its \n DbiResourceId value. For example, specify db-ABCDEFGHIJKLMNOPQRSTU1VW2X.\n

", + "smithy.api#documentation": "

An immutable identifier for a data source that is unique for an Amazon Web Services Region. Performance Insights gathers \n metrics from this data source. In the console, the identifier is shown as \n ResourceID. When you call DescribeDBInstances, the identifier is\n returned as DbiResourceId.

\n

To use a DB instance as a data source, specify its DbiResourceId value. For example, specify\n db-ABCDEFGHIJKLMNOPQRSTU1VW2X.

", "smithy.api#required": {} } }, - "Group": { - "target": "com.amazonaws.pi#RequestString", + "AnalysisReportId": { + "target": "com.amazonaws.pi#AnalysisReportId", "traits": { - "smithy.api#documentation": "

The name of the dimension group. Performance Insights searches the specified group for the dimension group ID. The following group name values are\n valid:

\n
    \n
  • \n

    \n db.query (Amazon DocumentDB only)

    \n
  • \n
  • \n

    \n db.sql (Amazon RDS and Aurora only)

    \n
  • \n
", + "smithy.api#documentation": "

A unique identifier of the created analysis report. For example,\n report-12345678901234567\n

", "smithy.api#required": {} } }, - "GroupIdentifier": { - "target": "com.amazonaws.pi#RequestString", + "TextFormat": { + "target": "com.amazonaws.pi#TextFormat", "traits": { - "smithy.api#documentation": "

The ID of the dimension group from which to retrieve dimension details. For dimension group db.sql, the group ID is\n db.sql.id. The following group ID values are valid:

\n
    \n
  • \n

    \n db.sql.id for dimension group db.sql (Aurora and RDS only)

    \n
  • \n
  • \n

    \n db.query.id for dimension group db.query (DocumentDB only)

    \n
  • \n
", - "smithy.api#required": {} + "smithy.api#documentation": "

Indicates the text format in the report. The options are PLAIN_TEXT or MARKDOWN. The default\n value is plain text.

" } }, - "RequestedDimensions": { - "target": "com.amazonaws.pi#RequestedDimensionList", + "AcceptLanguage": { + "target": "com.amazonaws.pi#AcceptLanguage", "traits": { - "smithy.api#documentation": "

A list of dimensions to retrieve the detail data for within the given dimension group. If you don't specify this parameter, Performance Insights returns\n all dimension data within the specified dimension group. Specify dimension names for the following dimension groups:

\n
    \n
  • \n

    \n db.sql - Specify either the full dimension name db.sql.statement or the short dimension name\n statement (Aurora and RDS only).

    \n
  • \n
  • \n

    \n db.query - Specify either the full dimension name db.query.statement or the short dimension name\n statement (DocumentDB only).

    \n
  • \n
" + "smithy.api#documentation": "

The text language in the report. The default language is EN_US (English). \n

" } } }, @@ -561,13 +997,13 @@ "smithy.api#input": {} } }, - "com.amazonaws.pi#GetDimensionKeyDetailsResponse": { + "com.amazonaws.pi#GetPerformanceAnalysisReportResponse": { "type": "structure", "members": { - "Dimensions": { - "target": "com.amazonaws.pi#DimensionKeyDetailList", + "AnalysisReport": { + "target": "com.amazonaws.pi#AnalysisReport", "traits": { - "smithy.api#documentation": "

The details for the requested dimensions.

" + "smithy.api#documentation": "

The summary of the performance analysis report created for a time period.

" } } }, @@ -609,7 +1045,7 @@ } }, "Identifier": { - "target": "com.amazonaws.pi#RequestString", + "target": "com.amazonaws.pi#IdentifierString", "traits": { "smithy.api#documentation": "

An immutable identifier for a data source that is unique for an Amazon Web Services Region. \n Performance Insights gathers metrics from this data source. To use a DB instance as a data source, \n specify its DbiResourceId value. For example, specify db-ABCDEFGHIJKLMNOPQRSTU1VW2X.\n

", "smithy.api#required": {} @@ -679,7 +1115,7 @@ } }, "Identifier": { - "target": "com.amazonaws.pi#RequestString", + "target": "com.amazonaws.pi#IdentifierString", "traits": { "smithy.api#documentation": "

An immutable identifier for a data source that is unique for an Amazon Web Services Region. Performance Insights gathers metrics from this data source. In the\n console, the identifier is shown as ResourceID. When you call DescribeDBInstances, the identifier is\n returned as DbiResourceId.

\n

To use a DB instance as a data source, specify its DbiResourceId value. For example, specify\n db-ABCDEFGHIJKLMNOPQRSTU1VW2X.

", "smithy.api#required": {} @@ -783,7 +1219,88 @@ "min": 0, "max": 256 }, - "smithy.api#pattern": "^db-[a-zA-Z0-9-]*$" + "smithy.api#pattern": "^[a-zA-Z0-9-]+$" + } + }, + "com.amazonaws.pi#Insight": { + "type": "structure", + "members": { + "InsightId": { + "target": "com.amazonaws.pi#String", + "traits": { + "smithy.api#documentation": "

The unique identifier for the insight. For example, insight-12345678901234567.

", + "smithy.api#required": {} + } + }, + "InsightType": { + "target": "com.amazonaws.pi#String", + "traits": { + "smithy.api#documentation": "

The type of insight. For example, HighDBLoad, HighCPU, or DominatingSQLs.

" + } + }, + "Context": { + "target": "com.amazonaws.pi#ContextType", + "traits": { + "smithy.api#documentation": "

Indicates if the insight is causal or correlated insight.

" + } + }, + "StartTime": { + "target": "com.amazonaws.pi#ISOTimestamp", + "traits": { + "smithy.api#documentation": "

The start time of the insight. For example, 2018-10-30T00:00:00Z.

" + } + }, + "EndTime": { + "target": "com.amazonaws.pi#ISOTimestamp", + "traits": { + "smithy.api#documentation": "

The end time of the insight. For example, 2018-10-30T00:00:00Z.

" + } + }, + "Severity": { + "target": "com.amazonaws.pi#Severity", + "traits": { + "smithy.api#documentation": "

The severity of the insight. The values are: Low, Medium, or High.

" + } + }, + "SupportingInsights": { + "target": "com.amazonaws.pi#InsightList", + "traits": { + "smithy.api#documentation": "

List of supporting insights that provide additional factors for the insight.

" + } + }, + "Description": { + "target": "com.amazonaws.pi#MarkdownString", + "traits": { + "smithy.api#documentation": "

Description of the insight. For example:\n A high severity Insight found between 02:00 to 02:30,\n where there was an unusually high DB load 600x above baseline. \n Likely performance impact.

" + } + }, + "Recommendations": { + "target": "com.amazonaws.pi#RecommendationList", + "traits": { + "smithy.api#documentation": "

List of recommendations for the insight.\n For example, Investigate the following SQLs that contributed \n to 100% of the total DBLoad during that time period: sql-id.

" + } + }, + "InsightData": { + "target": "com.amazonaws.pi#DataList", + "traits": { + "smithy.api#documentation": "

List of data objects containing metrics and references from the time range while generating the insight.

" + } + }, + "BaselineData": { + "target": "com.amazonaws.pi#DataList", + "traits": { + "smithy.api#documentation": "

\n Metric names and values from the timeframe \n used as baseline to generate the insight.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Retrieves the list of performance issues which are identified.

" + } + }, + "com.amazonaws.pi#InsightList": { + "type": "list", + "member": { + "target": "com.amazonaws.pi#Insight" } }, "com.amazonaws.pi#Integer": { @@ -861,7 +1378,7 @@ } }, "Identifier": { - "target": "com.amazonaws.pi#RequestString", + "target": "com.amazonaws.pi#IdentifierString", "traits": { "smithy.api#documentation": "

An immutable identifier for a data source that is unique within an Amazon Web Services Region. Performance Insights gathers\n metrics from this data source. To use an Amazon RDS DB instance as a data source, specify its\n DbiResourceId value. For example, specify db-ABCDEFGHIJKLMNOPQRSTU1VWZ.

", "smithy.api#required": {} @@ -870,20 +1387,197 @@ "Metrics": { "target": "com.amazonaws.pi#DimensionsMetricList", "traits": { - "smithy.api#documentation": "

The types of metrics for which to retrieve dimensions. Valid values include db.load.

", - "smithy.api#required": {} + "smithy.api#documentation": "

The types of metrics for which to retrieve dimensions. Valid values include db.load.

", + "smithy.api#required": {} + } + }, + "MaxResults": { + "target": "com.amazonaws.pi#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of items to return in the response. If more items exist than the specified \n MaxRecords value, a pagination token is included in the response so that the remaining \n results can be retrieved.

" + } + }, + "NextToken": { + "target": "com.amazonaws.pi#NextToken", + "traits": { + "smithy.api#documentation": "

An optional pagination token provided by a previous request. If this parameter is specified, \n the response includes only records beyond the token, up to the value specified by MaxRecords.\n

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.pi#ListAvailableResourceDimensionsResponse": { + "type": "structure", + "members": { + "MetricDimensions": { + "target": "com.amazonaws.pi#MetricDimensionsList", + "traits": { + "smithy.api#documentation": "

The dimension information returned for requested metric types.

" + } + }, + "NextToken": { + "target": "com.amazonaws.pi#NextToken", + "traits": { + "smithy.api#documentation": "

An optional pagination token provided by a previous request. If this parameter is specified, \n the response includes only records beyond the token, up to the value specified by MaxRecords.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.pi#ListAvailableResourceMetrics": { + "type": "operation", + "input": { + "target": "com.amazonaws.pi#ListAvailableResourceMetricsRequest" + }, + "output": { + "target": "com.amazonaws.pi#ListAvailableResourceMetricsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.pi#InternalServiceError" + }, + { + "target": "com.amazonaws.pi#InvalidArgumentException" + }, + { + "target": "com.amazonaws.pi#NotAuthorizedException" + } + ], + "traits": { + "smithy.api#documentation": "

Retrieve metrics of the specified types that can be queried for a specified DB instance.\n

", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.pi#ListAvailableResourceMetricsRequest": { + "type": "structure", + "members": { + "ServiceType": { + "target": "com.amazonaws.pi#ServiceType", + "traits": { + "smithy.api#documentation": "

The Amazon Web Services service for which Performance Insights returns metrics.

", + "smithy.api#required": {} + } + }, + "Identifier": { + "target": "com.amazonaws.pi#IdentifierString", + "traits": { + "smithy.api#documentation": "

An immutable identifier for a data source that is unique within an Amazon Web Services Region. Performance Insights gathers\n metrics from this data source. To use an Amazon RDS DB instance as a data source, specify its\n DbiResourceId value. For example, specify db-ABCDEFGHIJKLMNOPQRSTU1VWZ.

", + "smithy.api#required": {} + } + }, + "MetricTypes": { + "target": "com.amazonaws.pi#MetricTypeList", + "traits": { + "smithy.api#documentation": "

The types of metrics to return in the response. Valid values in the array include the following:

\n
    \n
  • \n

    \n os (OS counter metrics) - All engines

    \n
  • \n
  • \n

    \n db (DB load metrics) - All engines except for Amazon DocumentDB

    \n
  • \n
  • \n

    \n db.sql.stats (per-SQL metrics) - All engines except for Amazon DocumentDB

    \n
  • \n
  • \n

    \n db.sql_tokenized.stats (per-SQL digest metrics) - All engines except for Amazon DocumentDB

    \n
  • \n
", + "smithy.api#required": {} + } + }, + "NextToken": { + "target": "com.amazonaws.pi#NextToken", + "traits": { + "smithy.api#documentation": "

An optional pagination token provided by a previous request. If this parameter is specified, \n the response includes only records beyond the token, up to the value specified by MaxRecords.\n

" + } + }, + "MaxResults": { + "target": "com.amazonaws.pi#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of items to return. If the MaxRecords value is less than the number \n of existing items, the response includes a pagination token.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.pi#ListAvailableResourceMetricsResponse": { + "type": "structure", + "members": { + "Metrics": { + "target": "com.amazonaws.pi#ResponseResourceMetricList", + "traits": { + "smithy.api#documentation": "

An array of metrics available to query. Each array element contains the full name, \n description, and unit of the metric.\n

" + } + }, + "NextToken": { + "target": "com.amazonaws.pi#NextToken", + "traits": { + "smithy.api#documentation": "

A pagination token that indicates the response didn’t return all available records because MaxRecords was specified in the\n previous request. To get the remaining records, specify NextToken in a separate request with this value.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.pi#ListPerformanceAnalysisReports": { + "type": "operation", + "input": { + "target": "com.amazonaws.pi#ListPerformanceAnalysisReportsRequest" + }, + "output": { + "target": "com.amazonaws.pi#ListPerformanceAnalysisReportsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.pi#InternalServiceError" + }, + { + "target": "com.amazonaws.pi#InvalidArgumentException" + }, + { + "target": "com.amazonaws.pi#NotAuthorizedException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists all the analysis reports created for the DB instance. The reports are sorted based on the start time of each report.

", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.pi#ListPerformanceAnalysisReportsRequest": { + "type": "structure", + "members": { + "ServiceType": { + "target": "com.amazonaws.pi#ServiceType", + "traits": { + "smithy.api#documentation": "

The Amazon Web Services service for which Performance Insights returns metrics. Valid value is\n RDS.

", + "smithy.api#required": {} + } + }, + "Identifier": { + "target": "com.amazonaws.pi#IdentifierString", + "traits": { + "smithy.api#documentation": "

An immutable identifier for a data source that is unique for an Amazon Web Services Region. Performance Insights gathers metrics from this data source. In the\n console, the identifier is shown as ResourceID. When you call DescribeDBInstances, the identifier is\n returned as DbiResourceId.

\n

To use a DB instance as a data source, specify its DbiResourceId value. For example, specify\n db-ABCDEFGHIJKLMNOPQRSTU1VW2X.

", + "smithy.api#required": {} + } + }, + "NextToken": { + "target": "com.amazonaws.pi#NextToken", + "traits": { + "smithy.api#documentation": "

An optional pagination token provided by a previous request. \n If this parameter is specified, the response includes only records beyond\n the token, up to the value specified by MaxResults.

" } }, "MaxResults": { "target": "com.amazonaws.pi#MaxResults", "traits": { - "smithy.api#documentation": "

The maximum number of items to return in the response. If more items exist than the specified \n MaxRecords value, a pagination token is included in the response so that the remaining \n results can be retrieved.

" + "smithy.api#documentation": "

The maximum number of items to return in the response. If more items exist than the specified MaxResults value, a\n pagination token is included in the response so that the remaining results can be retrieved.

" } }, - "NextToken": { - "target": "com.amazonaws.pi#NextToken", + "ListTags": { + "target": "com.amazonaws.pi#Boolean", "traits": { - "smithy.api#documentation": "

An optional pagination token provided by a previous request. If this parameter is specified, \n the response includes only records beyond the token, up to the value specified by MaxRecords.\n

" + "smithy.api#documentation": "

Specifies whether or not to include the list of tags in the response.

" } } }, @@ -891,19 +1585,19 @@ "smithy.api#input": {} } }, - "com.amazonaws.pi#ListAvailableResourceDimensionsResponse": { + "com.amazonaws.pi#ListPerformanceAnalysisReportsResponse": { "type": "structure", "members": { - "MetricDimensions": { - "target": "com.amazonaws.pi#MetricDimensionsList", + "AnalysisReports": { + "target": "com.amazonaws.pi#AnalysisReportSummaryList", "traits": { - "smithy.api#documentation": "

The dimension information returned for requested metric types.

" + "smithy.api#documentation": "

List of reports including the report identifier, start and end time, creation time,\n and status.

" } }, "NextToken": { "target": "com.amazonaws.pi#NextToken", "traits": { - "smithy.api#documentation": "

An optional pagination token provided by a previous request. If this parameter is specified, \n the response includes only records beyond the token, up to the value specified by MaxRecords.

" + "smithy.api#documentation": "

An optional pagination token provided by a previous request. \n If this parameter is specified, the response includes only records beyond the token, \n up to the value specified by MaxResults.

" } } }, @@ -911,13 +1605,13 @@ "smithy.api#output": {} } }, - "com.amazonaws.pi#ListAvailableResourceMetrics": { + "com.amazonaws.pi#ListTagsForResource": { "type": "operation", "input": { - "target": "com.amazonaws.pi#ListAvailableResourceMetricsRequest" + "target": "com.amazonaws.pi#ListTagsForResourceRequest" }, "output": { - "target": "com.amazonaws.pi#ListAvailableResourceMetricsResponse" + "target": "com.amazonaws.pi#ListTagsForResourceResponse" }, "errors": [ { @@ -931,68 +1625,38 @@ } ], "traits": { - "smithy.api#documentation": "

Retrieve metrics of the specified types that can be queried for a specified DB instance.\n

", - "smithy.api#paginated": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "pageSize": "MaxResults" - } + "smithy.api#documentation": "

Retrieves all the metadata tags associated with Amazon RDS Performance Insights resource.

" } }, - "com.amazonaws.pi#ListAvailableResourceMetricsRequest": { + "com.amazonaws.pi#ListTagsForResourceRequest": { "type": "structure", "members": { "ServiceType": { "target": "com.amazonaws.pi#ServiceType", "traits": { - "smithy.api#documentation": "

The Amazon Web Services service for which Performance Insights returns metrics.

", - "smithy.api#required": {} - } - }, - "Identifier": { - "target": "com.amazonaws.pi#RequestString", - "traits": { - "smithy.api#documentation": "

An immutable identifier for a data source that is unique within an Amazon Web Services Region. Performance Insights gathers\n metrics from this data source. To use an Amazon RDS DB instance as a data source, specify its\n DbiResourceId value. For example, specify db-ABCDEFGHIJKLMNOPQRSTU1VWZ.

", + "smithy.api#documentation": "

List the tags for the Amazon Web Services service for which Performance Insights returns metrics. Valid value is RDS.

", "smithy.api#required": {} } }, - "MetricTypes": { - "target": "com.amazonaws.pi#MetricTypeList", + "ResourceARN": { + "target": "com.amazonaws.pi#AmazonResourceName", "traits": { - "smithy.api#documentation": "

The types of metrics to return in the response. Valid values in the array include the following:

\n
    \n
  • \n

    \n os (OS counter metrics) - All engines

    \n
  • \n
  • \n

    \n db (DB load metrics) - All engines except for Amazon DocumentDB

    \n
  • \n
  • \n

    \n db.sql.stats (per-SQL metrics) - All engines except for Amazon DocumentDB

    \n
  • \n
  • \n

    \n db.sql_tokenized.stats (per-SQL digest metrics) - All engines except for Amazon DocumentDB

    \n
  • \n
", + "smithy.api#documentation": "

Lists all the tags for the Amazon RDS Performance Insights resource. This value is an \n Amazon Resource Name (ARN). For information about creating an ARN, \n see \n Constructing an RDS Amazon Resource Name (ARN).

", "smithy.api#required": {} } - }, - "NextToken": { - "target": "com.amazonaws.pi#NextToken", - "traits": { - "smithy.api#documentation": "

An optional pagination token provided by a previous request. If this parameter is specified, \n the response includes only records beyond the token, up to the value specified by MaxRecords.\n

" - } - }, - "MaxResults": { - "target": "com.amazonaws.pi#MaxResults", - "traits": { - "smithy.api#documentation": "

The maximum number of items to return. If the MaxRecords value is less than the number \n of existing items, the response includes a pagination token.

" - } } }, "traits": { "smithy.api#input": {} } }, - "com.amazonaws.pi#ListAvailableResourceMetricsResponse": { + "com.amazonaws.pi#ListTagsForResourceResponse": { "type": "structure", "members": { - "Metrics": { - "target": "com.amazonaws.pi#ResponseResourceMetricList", - "traits": { - "smithy.api#documentation": "

An array of metrics available to query. Each array element contains the full name, \n description, and unit of the metric.\n

" - } - }, - "NextToken": { - "target": "com.amazonaws.pi#NextToken", + "Tags": { + "target": "com.amazonaws.pi#TagList", "traits": { - "smithy.api#documentation": "

A pagination token that indicates the response didn’t return all available records because MaxRecords was specified in the\n previous request. To get the remaining records, specify NextToken in a separate request with this value.

" + "smithy.api#documentation": "

The metadata assigned to an Amazon RDS resource consisting of a key-value pair.

" } } }, @@ -1000,6 +1664,17 @@ "smithy.api#output": {} } }, + "com.amazonaws.pi#MarkdownString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 8000 + }, + "smithy.api#pattern": "^(.|\\n)*$", + "smithy.api#sensitive": {} + } + }, "com.amazonaws.pi#MaxResults": { "type": "integer", "traits": { @@ -1128,7 +1803,7 @@ "min": 1, "max": 8192 }, - "smithy.api#pattern": "^[\\s\\S]*$" + "smithy.api#pattern": "^[a-zA-Z0-9_=-]+$" } }, "com.amazonaws.pi#NotAuthorizedException": { @@ -1143,16 +1818,57 @@ "smithy.api#error": "client" } }, + "com.amazonaws.pi#PerformanceInsightsMetric": { + "type": "structure", + "members": { + "Metric": { + "target": "com.amazonaws.pi#DescriptiveString", + "traits": { + "smithy.api#documentation": "

The Performance Insights metric.

" + } + }, + "DisplayName": { + "target": "com.amazonaws.pi#DescriptiveString", + "traits": { + "smithy.api#documentation": "

The Performance Insights metric name.

" + } + }, + "Dimensions": { + "target": "com.amazonaws.pi#DescriptiveMap", + "traits": { + "smithy.api#documentation": "

A dimension map that contains the dimensions for this partition.

" + } + }, + "Value": { + "target": "com.amazonaws.pi#Double", + "traits": { + "smithy.api#documentation": "

The value of the metric. For example, 9 for db.load.avg.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

This data type helps to determine Performance Insights metric to render for the insight.

" + } + }, "com.amazonaws.pi#PerformanceInsightsv20180227": { "type": "service", "version": "2018-02-27", "operations": [ + { + "target": "com.amazonaws.pi#CreatePerformanceAnalysisReport" + }, + { + "target": "com.amazonaws.pi#DeletePerformanceAnalysisReport" + }, { "target": "com.amazonaws.pi#DescribeDimensionKeys" }, { "target": "com.amazonaws.pi#GetDimensionKeyDetails" }, + { + "target": "com.amazonaws.pi#GetPerformanceAnalysisReport" + }, { "target": "com.amazonaws.pi#GetResourceMetadata" }, @@ -1164,6 +1880,18 @@ }, { "target": "com.amazonaws.pi#ListAvailableResourceMetrics" + }, + { + "target": "com.amazonaws.pi#ListPerformanceAnalysisReports" + }, + { + "target": "com.amazonaws.pi#ListTagsForResource" + }, + { + "target": "com.amazonaws.pi#TagResource" + }, + { + "target": "com.amazonaws.pi#UntagResource" } ], "traits": { @@ -1243,52 +1971,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -1296,13 +2028,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -1312,224 +2053,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://pi-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://pi-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ { "conditions": [ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://pi-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://pi-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [ + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ + true, { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://pi.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://pi.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://pi.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://pi.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] }, @@ -1964,6 +2656,17 @@ "UseDualStack": false } }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, { "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", "expect": { @@ -1977,6 +2680,17 @@ "UseDualStack": false } }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, { "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", "expect": { @@ -1990,6 +2704,17 @@ "UseDualStack": false } }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, { "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", "expect": { @@ -2003,6 +2728,17 @@ "UseDualStack": false } }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, { "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", "expect": { @@ -2066,6 +2802,12 @@ "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -2089,6 +2831,32 @@ } } }, + "com.amazonaws.pi#Recommendation": { + "type": "structure", + "members": { + "RecommendationId": { + "target": "com.amazonaws.pi#String", + "traits": { + "smithy.api#documentation": "

The unique identifier for the recommendation.

" + } + }, + "RecommendationDescription": { + "target": "com.amazonaws.pi#MarkdownString", + "traits": { + "smithy.api#documentation": "

The recommendation details to help resolve the performance issue. For example, \n Investigate the following SQLs that contributed to 100% of the total DBLoad during that time period: sql-id\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The list of recommendations for the insight.

" + } + }, + "com.amazonaws.pi#RecommendationList": { + "type": "list", + "member": { + "target": "com.amazonaws.pi#Recommendation" + } + }, "com.amazonaws.pi#RequestString": { "type": "string", "traits": { @@ -2214,6 +2982,29 @@ } } }, + "com.amazonaws.pi#Severity": { + "type": "enum", + "members": { + "LOW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LOW" + } + }, + "MEDIUM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MEDIUM" + } + }, + "HIGH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "HIGH" + } + } + } + }, "com.amazonaws.pi#String": { "type": "string", "traits": { @@ -2223,6 +3014,207 @@ }, "smithy.api#pattern": "\\S" } + }, + "com.amazonaws.pi#Tag": { + "type": "structure", + "members": { + "Key": { + "target": "com.amazonaws.pi#TagKey", + "traits": { + "smithy.api#documentation": "

A key is the required name of the tag. The string value can be from 1 to 128 Unicode \n characters in length and can't be prefixed with aws: or rds:. \n The string can only contain only the set of Unicode letters, digits, \n white-space, '_', '.', ':', '/', '=', '+', '-', '@' (Java regex: \"^([\\\\p{L}\\\\p{Z}\\\\p{N}_.:/=+\\\\-@]*)$\").

", + "smithy.api#required": {} + } + }, + "Value": { + "target": "com.amazonaws.pi#TagValue", + "traits": { + "smithy.api#documentation": "

A value is the optional value of the tag. The string value can be from 1 to 256 \n Unicode characters in length and can't be prefixed with aws: or rds:. \n The string can only contain only the set of Unicode letters, digits, \n white-space, '_', '.', ':', '/', '=', '+', '-', '@' (Java regex: \"^([\\\\p{L}\\\\p{Z}\\\\p{N}_.:/=+\\\\-@]*)$\").

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Metadata assigned to an Amazon RDS resource consisting of a key-value pair.

" + } + }, + "com.amazonaws.pi#TagKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + }, + "smithy.api#pattern": "^.*$" + } + }, + "com.amazonaws.pi#TagKeyList": { + "type": "list", + "member": { + "target": "com.amazonaws.pi#TagKey" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + }, + "com.amazonaws.pi#TagList": { + "type": "list", + "member": { + "target": "com.amazonaws.pi#Tag" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + }, + "com.amazonaws.pi#TagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.pi#TagResourceRequest" + }, + "output": { + "target": "com.amazonaws.pi#TagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.pi#InternalServiceError" + }, + { + "target": "com.amazonaws.pi#InvalidArgumentException" + }, + { + "target": "com.amazonaws.pi#NotAuthorizedException" + } + ], + "traits": { + "smithy.api#documentation": "

Adds metadata tags to the Amazon RDS Performance Insights resource.

" + } + }, + "com.amazonaws.pi#TagResourceRequest": { + "type": "structure", + "members": { + "ServiceType": { + "target": "com.amazonaws.pi#ServiceType", + "traits": { + "smithy.api#documentation": "

The Amazon Web Services service for which Performance Insights returns metrics. Valid value is RDS.

", + "smithy.api#required": {} + } + }, + "ResourceARN": { + "target": "com.amazonaws.pi#AmazonResourceName", + "traits": { + "smithy.api#documentation": "

The Amazon RDS Performance Insights resource that the tags are added to. This value is an Amazon Resource Name (ARN). For information about \n creating an ARN, see \n Constructing an RDS Amazon Resource Name (ARN).

", + "smithy.api#required": {} + } + }, + "Tags": { + "target": "com.amazonaws.pi#TagList", + "traits": { + "smithy.api#documentation": "

The metadata assigned to an Amazon RDS resource consisting of a key-value pair.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.pi#TagResourceResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.pi#TagValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 256 + }, + "smithy.api#pattern": "^.*$" + } + }, + "com.amazonaws.pi#TextFormat": { + "type": "enum", + "members": { + "PLAIN_TEXT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PLAIN_TEXT" + } + }, + "MARKDOWN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MARKDOWN" + } + } + } + }, + "com.amazonaws.pi#UntagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.pi#UntagResourceRequest" + }, + "output": { + "target": "com.amazonaws.pi#UntagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.pi#InternalServiceError" + }, + { + "target": "com.amazonaws.pi#InvalidArgumentException" + }, + { + "target": "com.amazonaws.pi#NotAuthorizedException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes the metadata tags from the Amazon RDS Performance Insights resource.

" + } + }, + "com.amazonaws.pi#UntagResourceRequest": { + "type": "structure", + "members": { + "ServiceType": { + "target": "com.amazonaws.pi#ServiceType", + "traits": { + "smithy.api#documentation": "

List the tags for the Amazon Web Services service for which Performance Insights returns metrics. Valid value is RDS.

", + "smithy.api#required": {} + } + }, + "ResourceARN": { + "target": "com.amazonaws.pi#AmazonResourceName", + "traits": { + "smithy.api#documentation": "

The Amazon RDS Performance Insights resource that the tags are added to. This value is an Amazon Resource Name (ARN). For information about \n creating an ARN, see \n Constructing an RDS Amazon Resource Name (ARN).

", + "smithy.api#required": {} + } + }, + "TagKeys": { + "target": "com.amazonaws.pi#TagKeyList", + "traits": { + "smithy.api#documentation": "

The metadata assigned to an Amazon RDS Performance Insights resource consisting of a key-value pair.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.pi#UntagResourceResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } } } }