Skip to content

Commit

Permalink
feat(client-resiliencehub): AWS Resilience Hub's new summary view vis…
Browse files Browse the repository at this point in the history
…ually represents applications' resilience through charts, enabling efficient resilience management. It provides a consolidated view of the app portfolio's resilience state and allows data export for custom stakeholder reporting.
  • Loading branch information
awstools committed Nov 21, 2024
1 parent a404f1b commit 415d379
Show file tree
Hide file tree
Showing 14 changed files with 1,450 additions and 56 deletions.
24 changes: 24 additions & 0 deletions clients/client-resiliencehub/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,14 @@ DescribeDraftAppVersionResourcesImportStatus

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/resiliencehub/command/DescribeDraftAppVersionResourcesImportStatusCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-resiliencehub/Interface/DescribeDraftAppVersionResourcesImportStatusCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-resiliencehub/Interface/DescribeDraftAppVersionResourcesImportStatusCommandOutput/)

</details>
<details>
<summary>
DescribeMetricsExport
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/resiliencehub/command/DescribeMetricsExportCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-resiliencehub/Interface/DescribeMetricsExportCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-resiliencehub/Interface/DescribeMetricsExportCommandOutput/)

</details>
<details>
<summary>
Expand Down Expand Up @@ -510,6 +518,14 @@ ListAppVersions

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/resiliencehub/command/ListAppVersionsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-resiliencehub/Interface/ListAppVersionsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-resiliencehub/Interface/ListAppVersionsCommandOutput/)

</details>
<details>
<summary>
ListMetrics
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/resiliencehub/command/ListMetricsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-resiliencehub/Interface/ListMetricsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-resiliencehub/Interface/ListMetricsCommandOutput/)

</details>
<details>
<summary>
Expand Down Expand Up @@ -622,6 +638,14 @@ StartAppAssessment

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/resiliencehub/command/StartAppAssessmentCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-resiliencehub/Interface/StartAppAssessmentCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-resiliencehub/Interface/StartAppAssessmentCommandOutput/)

</details>
<details>
<summary>
StartMetricsExport
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/resiliencehub/command/StartMetricsExportCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-resiliencehub/Interface/StartMetricsExportCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-resiliencehub/Interface/StartMetricsExportCommandOutput/)

</details>
<details>
<summary>
Expand Down
61 changes: 61 additions & 0 deletions clients/client-resiliencehub/src/Resiliencehub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ import {
DescribeDraftAppVersionResourcesImportStatusCommandInput,
DescribeDraftAppVersionResourcesImportStatusCommandOutput,
} from "./commands/DescribeDraftAppVersionResourcesImportStatusCommand";
import {
DescribeMetricsExportCommand,
DescribeMetricsExportCommandInput,
DescribeMetricsExportCommandOutput,
} from "./commands/DescribeMetricsExportCommand";
import {
DescribeResiliencyPolicyCommand,
DescribeResiliencyPolicyCommandInput,
Expand Down Expand Up @@ -176,6 +181,7 @@ import {
ListAppVersionsCommandInput,
ListAppVersionsCommandOutput,
} from "./commands/ListAppVersionsCommand";
import { ListMetricsCommand, ListMetricsCommandInput, ListMetricsCommandOutput } from "./commands/ListMetricsCommand";
import {
ListRecommendationTemplatesCommand,
ListRecommendationTemplatesCommandInput,
Expand Down Expand Up @@ -246,6 +252,11 @@ import {
StartAppAssessmentCommandInput,
StartAppAssessmentCommandOutput,
} from "./commands/StartAppAssessmentCommand";
import {
StartMetricsExportCommand,
StartMetricsExportCommandInput,
StartMetricsExportCommandOutput,
} from "./commands/StartMetricsExportCommand";
import {
StartResourceGroupingRecommendationTaskCommand,
StartResourceGroupingRecommendationTaskCommandInput,
Expand Down Expand Up @@ -304,6 +315,7 @@ const commands = {
DescribeAppVersionResourcesResolutionStatusCommand,
DescribeAppVersionTemplateCommand,
DescribeDraftAppVersionResourcesImportStatusCommand,
DescribeMetricsExportCommand,
DescribeResiliencyPolicyCommand,
DescribeResourceGroupingRecommendationTaskCommand,
ImportResourcesToDraftAppVersionCommand,
Expand All @@ -319,6 +331,7 @@ const commands = {
ListAppVersionResourceMappingsCommand,
ListAppVersionResourcesCommand,
ListAppVersionsCommand,
ListMetricsCommand,
ListRecommendationTemplatesCommand,
ListResiliencyPoliciesCommand,
ListResourceGroupingRecommendationsCommand,
Expand All @@ -333,6 +346,7 @@ const commands = {
RemoveDraftAppVersionResourceMappingsCommand,
ResolveAppVersionResourcesCommand,
StartAppAssessmentCommand,
StartMetricsExportCommand,
StartResourceGroupingRecommendationTaskCommand,
TagResourceCommand,
UntagResourceCommand,
Expand Down Expand Up @@ -717,6 +731,23 @@ export interface Resiliencehub {
cb: (err: any, data?: DescribeDraftAppVersionResourcesImportStatusCommandOutput) => void
): void;

/**
* @see {@link DescribeMetricsExportCommand}
*/
describeMetricsExport(
args: DescribeMetricsExportCommandInput,
options?: __HttpHandlerOptions
): Promise<DescribeMetricsExportCommandOutput>;
describeMetricsExport(
args: DescribeMetricsExportCommandInput,
cb: (err: any, data?: DescribeMetricsExportCommandOutput) => void
): void;
describeMetricsExport(
args: DescribeMetricsExportCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: DescribeMetricsExportCommandOutput) => void
): void;

/**
* @see {@link DescribeResiliencyPolicyCommand}
*/
Expand Down Expand Up @@ -965,6 +996,18 @@ export interface Resiliencehub {
cb: (err: any, data?: ListAppVersionsCommandOutput) => void
): void;

/**
* @see {@link ListMetricsCommand}
*/
listMetrics(): Promise<ListMetricsCommandOutput>;
listMetrics(args: ListMetricsCommandInput, options?: __HttpHandlerOptions): Promise<ListMetricsCommandOutput>;
listMetrics(args: ListMetricsCommandInput, cb: (err: any, data?: ListMetricsCommandOutput) => void): void;
listMetrics(
args: ListMetricsCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: ListMetricsCommandOutput) => void
): void;

/**
* @see {@link ListRecommendationTemplatesCommand}
*/
Expand Down Expand Up @@ -1207,6 +1250,24 @@ export interface Resiliencehub {
cb: (err: any, data?: StartAppAssessmentCommandOutput) => void
): void;

/**
* @see {@link StartMetricsExportCommand}
*/
startMetricsExport(): Promise<StartMetricsExportCommandOutput>;
startMetricsExport(
args: StartMetricsExportCommandInput,
options?: __HttpHandlerOptions
): Promise<StartMetricsExportCommandOutput>;
startMetricsExport(
args: StartMetricsExportCommandInput,
cb: (err: any, data?: StartMetricsExportCommandOutput) => void
): void;
startMetricsExport(
args: StartMetricsExportCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: StartMetricsExportCommandOutput) => void
): void;

/**
* @see {@link StartResourceGroupingRecommendationTaskCommand}
*/
Expand Down
12 changes: 12 additions & 0 deletions clients/client-resiliencehub/src/ResiliencehubClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ import {
DescribeDraftAppVersionResourcesImportStatusCommandInput,
DescribeDraftAppVersionResourcesImportStatusCommandOutput,
} from "./commands/DescribeDraftAppVersionResourcesImportStatusCommand";
import {
DescribeMetricsExportCommandInput,
DescribeMetricsExportCommandOutput,
} from "./commands/DescribeMetricsExportCommand";
import {
DescribeResiliencyPolicyCommandInput,
DescribeResiliencyPolicyCommandOutput,
Expand Down Expand Up @@ -184,6 +188,7 @@ import {
ListAppVersionResourcesCommandOutput,
} from "./commands/ListAppVersionResourcesCommand";
import { ListAppVersionsCommandInput, ListAppVersionsCommandOutput } from "./commands/ListAppVersionsCommand";
import { ListMetricsCommandInput, ListMetricsCommandOutput } from "./commands/ListMetricsCommand";
import {
ListRecommendationTemplatesCommandInput,
ListRecommendationTemplatesCommandOutput,
Expand Down Expand Up @@ -234,6 +239,7 @@ import {
ResolveAppVersionResourcesCommandOutput,
} from "./commands/ResolveAppVersionResourcesCommand";
import { StartAppAssessmentCommandInput, StartAppAssessmentCommandOutput } from "./commands/StartAppAssessmentCommand";
import { StartMetricsExportCommandInput, StartMetricsExportCommandOutput } from "./commands/StartMetricsExportCommand";
import {
StartResourceGroupingRecommendationTaskCommandInput,
StartResourceGroupingRecommendationTaskCommandOutput,
Expand Down Expand Up @@ -292,6 +298,7 @@ export type ServiceInputTypes =
| DescribeAppVersionResourcesResolutionStatusCommandInput
| DescribeAppVersionTemplateCommandInput
| DescribeDraftAppVersionResourcesImportStatusCommandInput
| DescribeMetricsExportCommandInput
| DescribeResiliencyPolicyCommandInput
| DescribeResourceGroupingRecommendationTaskCommandInput
| ImportResourcesToDraftAppVersionCommandInput
Expand All @@ -307,6 +314,7 @@ export type ServiceInputTypes =
| ListAppVersionResourcesCommandInput
| ListAppVersionsCommandInput
| ListAppsCommandInput
| ListMetricsCommandInput
| ListRecommendationTemplatesCommandInput
| ListResiliencyPoliciesCommandInput
| ListResourceGroupingRecommendationsCommandInput
Expand All @@ -321,6 +329,7 @@ export type ServiceInputTypes =
| RemoveDraftAppVersionResourceMappingsCommandInput
| ResolveAppVersionResourcesCommandInput
| StartAppAssessmentCommandInput
| StartMetricsExportCommandInput
| StartResourceGroupingRecommendationTaskCommandInput
| TagResourceCommandInput
| UntagResourceCommandInput
Expand Down Expand Up @@ -357,6 +366,7 @@ export type ServiceOutputTypes =
| DescribeAppVersionResourcesResolutionStatusCommandOutput
| DescribeAppVersionTemplateCommandOutput
| DescribeDraftAppVersionResourcesImportStatusCommandOutput
| DescribeMetricsExportCommandOutput
| DescribeResiliencyPolicyCommandOutput
| DescribeResourceGroupingRecommendationTaskCommandOutput
| ImportResourcesToDraftAppVersionCommandOutput
Expand All @@ -372,6 +382,7 @@ export type ServiceOutputTypes =
| ListAppVersionResourcesCommandOutput
| ListAppVersionsCommandOutput
| ListAppsCommandOutput
| ListMetricsCommandOutput
| ListRecommendationTemplatesCommandOutput
| ListResiliencyPoliciesCommandOutput
| ListResourceGroupingRecommendationsCommandOutput
Expand All @@ -386,6 +397,7 @@ export type ServiceOutputTypes =
| RemoveDraftAppVersionResourceMappingsCommandOutput
| ResolveAppVersionResourcesCommandOutput
| StartAppAssessmentCommandOutput
| StartMetricsExportCommandOutput
| StartResourceGroupingRecommendationTaskCommandOutput
| TagResourceCommandOutput
| UntagResourceCommandOutput
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
// smithy-typescript generated code
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { getSerdePlugin } from "@smithy/middleware-serde";
import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { commonParams } from "../endpoint/EndpointParameters";
import { DescribeMetricsExportRequest, DescribeMetricsExportResponse } from "../models/models_0";
import { de_DescribeMetricsExportCommand, se_DescribeMetricsExportCommand } from "../protocols/Aws_restJson1";
import { ResiliencehubClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ResiliencehubClient";

/**
* @public
*/
export type { __MetadataBearer };
export { $Command };
/**
* @public
*
* The input for {@link DescribeMetricsExportCommand}.
*/
export interface DescribeMetricsExportCommandInput extends DescribeMetricsExportRequest {}
/**
* @public
*
* The output of {@link DescribeMetricsExportCommand}.
*/
export interface DescribeMetricsExportCommandOutput extends DescribeMetricsExportResponse, __MetadataBearer {}

/**
* <p>Describes the metrics of the application configuration being exported.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { ResiliencehubClient, DescribeMetricsExportCommand } from "@aws-sdk/client-resiliencehub"; // ES Modules import
* // const { ResiliencehubClient, DescribeMetricsExportCommand } = require("@aws-sdk/client-resiliencehub"); // CommonJS import
* const client = new ResiliencehubClient(config);
* const input = { // DescribeMetricsExportRequest
* metricsExportId: "STRING_VALUE", // required
* };
* const command = new DescribeMetricsExportCommand(input);
* const response = await client.send(command);
* // { // DescribeMetricsExportResponse
* // metricsExportId: "STRING_VALUE", // required
* // status: "Pending" || "InProgress" || "Failed" || "Success", // required
* // exportLocation: { // S3Location
* // bucket: "STRING_VALUE",
* // prefix: "STRING_VALUE",
* // },
* // errorMessage: "STRING_VALUE",
* // };
*
* ```
*
* @param DescribeMetricsExportCommandInput - {@link DescribeMetricsExportCommandInput}
* @returns {@link DescribeMetricsExportCommandOutput}
* @see {@link DescribeMetricsExportCommandInput} for command's `input` shape.
* @see {@link DescribeMetricsExportCommandOutput} for command's `response` shape.
* @see {@link ResiliencehubClientResolvedConfig | config} for ResiliencehubClient's `config` shape.
*
* @throws {@link AccessDeniedException} (client fault)
* <p>You don't have permissions to perform the requested operation. The user or role that is
* making the request must have at least one IAM permissions policy attached that grants the
* required permissions.</p>
*
* @throws {@link InternalServerException} (server fault)
* <p>This exception occurs when there is an internal failure in the Resilience Hub
* service.</p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* <p>This exception occurs when the specified resource could not be found.</p>
*
* @throws {@link ThrottlingException} (client fault)
* <p>This exception occurs when you have exceeded the limit on the number of requests per second.</p>
*
* @throws {@link ValidationException} (client fault)
* <p>This exception occurs when a request is not valid.</p>
*
* @throws {@link ResiliencehubServiceException}
* <p>Base exception class for all service exceptions from Resiliencehub service.</p>
*
* @public
*/
export class DescribeMetricsExportCommand extends $Command
.classBuilder<
DescribeMetricsExportCommandInput,
DescribeMetricsExportCommandOutput,
ResiliencehubClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes
>()
.ep(commonParams)
.m(function (this: any, Command: any, cs: any, config: ResiliencehubClientResolvedConfig, o: any) {
return [
getSerdePlugin(config, this.serialize, this.deserialize),
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
];
})
.s("AwsResilienceHub", "DescribeMetricsExport", {})
.n("ResiliencehubClient", "DescribeMetricsExportCommand")
.f(void 0, void 0)
.ser(se_DescribeMetricsExportCommand)
.de(de_DescribeMetricsExportCommand)
.build() {
/** @internal type navigation helper, not in runtime. */
protected declare static __types: {
api: {
input: DescribeMetricsExportRequest;
output: DescribeMetricsExportResponse;
};
sdk: {
input: DescribeMetricsExportCommandInput;
output: DescribeMetricsExportCommandOutput;
};
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export interface ListAppAssessmentComplianceDriftsCommandOutput
__MetadataBearer {}

/**
* <p>Indicates the list of compliance drifts that were detected while running an
* <p>List of compliance drifts that were detected while running an
* assessment.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export interface ListAppAssessmentResourceDriftsCommandOutput
__MetadataBearer {}

/**
* <p>Indicates the list of resource drifts that were detected while running an
* <p>List of resource drifts that were detected while running an
* assessment.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
Expand Down
Loading

0 comments on commit 415d379

Please sign in to comment.