Skip to content

Commit 612bf4a

Browse files
author
awstools
committed
feat(client-resiliencehub): AWS Resilience Hub has expanded its drift detection capabilities by introducing a new type of drift detection - application resource drift. This new enhancement detects changes, such as the addition or deletion of resources within the application's input sources.
1 parent 7008655 commit 612bf4a

12 files changed

+666
-242
lines changed

clients/client-resiliencehub/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,14 @@ ListAppAssessmentComplianceDrifts
414414

415415
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/resiliencehub/command/ListAppAssessmentComplianceDriftsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-resiliencehub/Interface/ListAppAssessmentComplianceDriftsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-resiliencehub/Interface/ListAppAssessmentComplianceDriftsCommandOutput/)
416416

417+
</details>
418+
<details>
419+
<summary>
420+
ListAppAssessmentResourceDrifts
421+
</summary>
422+
423+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/resiliencehub/command/ListAppAssessmentResourceDriftsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-resiliencehub/Interface/ListAppAssessmentResourceDriftsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-resiliencehub/Interface/ListAppAssessmentResourceDriftsCommandOutput/)
424+
417425
</details>
418426
<details>
419427
<summary>

clients/client-resiliencehub/src/Resiliencehub.ts

+24
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,11 @@ import {
120120
ListAppAssessmentComplianceDriftsCommandInput,
121121
ListAppAssessmentComplianceDriftsCommandOutput,
122122
} from "./commands/ListAppAssessmentComplianceDriftsCommand";
123+
import {
124+
ListAppAssessmentResourceDriftsCommand,
125+
ListAppAssessmentResourceDriftsCommandInput,
126+
ListAppAssessmentResourceDriftsCommandOutput,
127+
} from "./commands/ListAppAssessmentResourceDriftsCommand";
123128
import {
124129
ListAppAssessmentsCommand,
125130
ListAppAssessmentsCommandInput,
@@ -277,6 +282,7 @@ const commands = {
277282
ImportResourcesToDraftAppVersionCommand,
278283
ListAlarmRecommendationsCommand,
279284
ListAppAssessmentComplianceDriftsCommand,
285+
ListAppAssessmentResourceDriftsCommand,
280286
ListAppAssessmentsCommand,
281287
ListAppComponentCompliancesCommand,
282288
ListAppComponentRecommendationsCommand,
@@ -732,6 +738,23 @@ export interface Resiliencehub {
732738
cb: (err: any, data?: ListAppAssessmentComplianceDriftsCommandOutput) => void
733739
): void;
734740

741+
/**
742+
* @see {@link ListAppAssessmentResourceDriftsCommand}
743+
*/
744+
listAppAssessmentResourceDrifts(
745+
args: ListAppAssessmentResourceDriftsCommandInput,
746+
options?: __HttpHandlerOptions
747+
): Promise<ListAppAssessmentResourceDriftsCommandOutput>;
748+
listAppAssessmentResourceDrifts(
749+
args: ListAppAssessmentResourceDriftsCommandInput,
750+
cb: (err: any, data?: ListAppAssessmentResourceDriftsCommandOutput) => void
751+
): void;
752+
listAppAssessmentResourceDrifts(
753+
args: ListAppAssessmentResourceDriftsCommandInput,
754+
options: __HttpHandlerOptions,
755+
cb: (err: any, data?: ListAppAssessmentResourceDriftsCommandOutput) => void
756+
): void;
757+
735758
/**
736759
* @see {@link ListAppAssessmentsCommand}
737760
*/
@@ -881,6 +904,7 @@ export interface Resiliencehub {
881904
/**
882905
* @see {@link ListRecommendationTemplatesCommand}
883906
*/
907+
listRecommendationTemplates(): Promise<ListRecommendationTemplatesCommandOutput>;
884908
listRecommendationTemplates(
885909
args: ListRecommendationTemplatesCommandInput,
886910
options?: __HttpHandlerOptions

clients/client-resiliencehub/src/ResiliencehubClient.ts

+6
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,10 @@ import {
145145
ListAppAssessmentComplianceDriftsCommandInput,
146146
ListAppAssessmentComplianceDriftsCommandOutput,
147147
} from "./commands/ListAppAssessmentComplianceDriftsCommand";
148+
import {
149+
ListAppAssessmentResourceDriftsCommandInput,
150+
ListAppAssessmentResourceDriftsCommandOutput,
151+
} from "./commands/ListAppAssessmentResourceDriftsCommand";
148152
import { ListAppAssessmentsCommandInput, ListAppAssessmentsCommandOutput } from "./commands/ListAppAssessmentsCommand";
149153
import {
150154
ListAppComponentCompliancesCommandInput,
@@ -271,6 +275,7 @@ export type ServiceInputTypes =
271275
| ImportResourcesToDraftAppVersionCommandInput
272276
| ListAlarmRecommendationsCommandInput
273277
| ListAppAssessmentComplianceDriftsCommandInput
278+
| ListAppAssessmentResourceDriftsCommandInput
274279
| ListAppAssessmentsCommandInput
275280
| ListAppComponentCompliancesCommandInput
276281
| ListAppComponentRecommendationsCommandInput
@@ -330,6 +335,7 @@ export type ServiceOutputTypes =
330335
| ImportResourcesToDraftAppVersionCommandOutput
331336
| ListAlarmRecommendationsCommandOutput
332337
| ListAppAssessmentComplianceDriftsCommandOutput
338+
| ListAppAssessmentResourceDriftsCommandOutput
333339
| ListAppAssessmentsCommandOutput
334340
| ListAppComponentCompliancesCommandOutput
335341
| ListAppComponentRecommendationsCommandOutput

clients/client-resiliencehub/src/commands/CreateAppCommand.ts

+3-4
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,9 @@ export interface CreateAppCommandOutput extends CreateAppResponse, __MetadataBea
3333

3434
/**
3535
* <p>Creates an Resilience Hub application. An Resilience Hub application is a
36-
* collection of Amazon Web Services resources structured to prevent and recover Amazon Web Services application disruptions. To describe a Resilience Hub application, you provide an
37-
* application name, resources from one or more CloudFormation stacks, Resource Groups, Terraform state files, AppRegistry applications, and an appropriate
38-
* resiliency policy. In addition, you can also add resources that are located on Amazon Elastic Kubernetes Service (Amazon EKS) clusters as optional resources. For more information
39-
* about the number of resources supported per application, see <a href="https://docs.aws.amazon.com/general/latest/gr/resiliencehub.html#limits_resiliencehub">Service
36+
* collection of Amazon Web Services resources structured to prevent and recover Amazon Web Services application disruptions. To describe a Resilience Hub application,
37+
* you provide an application name, resources from one or more CloudFormation stacks, Resource Groups, Terraform state files, AppRegistry applications, and an appropriate
38+
* resiliency policy. In addition, you can also add resources that are located on Amazon Elastic Kubernetes Service (Amazon EKS) clusters as optional resources. For more information about the number of resources supported per application, see <a href="https://docs.aws.amazon.com/general/latest/gr/resiliencehub.html#limits_resiliencehub">Service
4039
* quotas</a>.</p>
4140
* <p>After you create an Resilience Hub application, you publish it so that you can run a resiliency
4241
* assessment on it. You can then use recommendations from the assessment to improve resiliency
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
// smithy-typescript generated code
2+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3+
import { getSerdePlugin } from "@smithy/middleware-serde";
4+
import { Command as $Command } from "@smithy/smithy-client";
5+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
6+
7+
import { commonParams } from "../endpoint/EndpointParameters";
8+
import { ListAppAssessmentResourceDriftsRequest, ListAppAssessmentResourceDriftsResponse } from "../models/models_0";
9+
import {
10+
de_ListAppAssessmentResourceDriftsCommand,
11+
se_ListAppAssessmentResourceDriftsCommand,
12+
} from "../protocols/Aws_restJson1";
13+
import { ResiliencehubClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ResiliencehubClient";
14+
15+
/**
16+
* @public
17+
*/
18+
export { __MetadataBearer, $Command };
19+
/**
20+
* @public
21+
*
22+
* The input for {@link ListAppAssessmentResourceDriftsCommand}.
23+
*/
24+
export interface ListAppAssessmentResourceDriftsCommandInput extends ListAppAssessmentResourceDriftsRequest {}
25+
/**
26+
* @public
27+
*
28+
* The output of {@link ListAppAssessmentResourceDriftsCommand}.
29+
*/
30+
export interface ListAppAssessmentResourceDriftsCommandOutput
31+
extends ListAppAssessmentResourceDriftsResponse,
32+
__MetadataBearer {}
33+
34+
/**
35+
* <p>Indicates the list of resource drifts that were detected while running an assessment.</p>
36+
* @example
37+
* Use a bare-bones client and the command you need to make an API call.
38+
* ```javascript
39+
* import { ResiliencehubClient, ListAppAssessmentResourceDriftsCommand } from "@aws-sdk/client-resiliencehub"; // ES Modules import
40+
* // const { ResiliencehubClient, ListAppAssessmentResourceDriftsCommand } = require("@aws-sdk/client-resiliencehub"); // CommonJS import
41+
* const client = new ResiliencehubClient(config);
42+
* const input = { // ListAppAssessmentResourceDriftsRequest
43+
* assessmentArn: "STRING_VALUE", // required
44+
* nextToken: "STRING_VALUE",
45+
* maxResults: Number("int"),
46+
* };
47+
* const command = new ListAppAssessmentResourceDriftsCommand(input);
48+
* const response = await client.send(command);
49+
* // { // ListAppAssessmentResourceDriftsResponse
50+
* // resourceDrifts: [ // ResourceDriftList // required
51+
* // { // ResourceDrift
52+
* // appArn: "STRING_VALUE",
53+
* // appVersion: "STRING_VALUE",
54+
* // referenceId: "STRING_VALUE",
55+
* // resourceIdentifier: { // ResourceIdentifier
56+
* // logicalResourceId: { // LogicalResourceId
57+
* // identifier: "STRING_VALUE", // required
58+
* // logicalStackName: "STRING_VALUE",
59+
* // resourceGroupName: "STRING_VALUE",
60+
* // terraformSourceName: "STRING_VALUE",
61+
* // eksSourceName: "STRING_VALUE",
62+
* // },
63+
* // resourceType: "STRING_VALUE",
64+
* // },
65+
* // diffType: "STRING_VALUE",
66+
* // },
67+
* // ],
68+
* // nextToken: "STRING_VALUE",
69+
* // };
70+
*
71+
* ```
72+
*
73+
* @param ListAppAssessmentResourceDriftsCommandInput - {@link ListAppAssessmentResourceDriftsCommandInput}
74+
* @returns {@link ListAppAssessmentResourceDriftsCommandOutput}
75+
* @see {@link ListAppAssessmentResourceDriftsCommandInput} for command's `input` shape.
76+
* @see {@link ListAppAssessmentResourceDriftsCommandOutput} for command's `response` shape.
77+
* @see {@link ResiliencehubClientResolvedConfig | config} for ResiliencehubClient's `config` shape.
78+
*
79+
* @throws {@link AccessDeniedException} (client fault)
80+
* <p>You don't have permissions to perform the requested operation. The user or role that is
81+
* making the request must have at least one IAM permissions policy attached that grants the
82+
* required permissions.</p>
83+
*
84+
* @throws {@link InternalServerException} (server fault)
85+
* <p>This exception occurs when there is an internal failure in the Resilience Hub
86+
* service.</p>
87+
*
88+
* @throws {@link ThrottlingException} (client fault)
89+
* <p>This exception occurs when you have exceeded the limit on the number of requests per second.</p>
90+
*
91+
* @throws {@link ValidationException} (client fault)
92+
* <p>This exception occurs when a request is not valid.</p>
93+
*
94+
* @throws {@link ResiliencehubServiceException}
95+
* <p>Base exception class for all service exceptions from Resiliencehub service.</p>
96+
*
97+
* @public
98+
*/
99+
export class ListAppAssessmentResourceDriftsCommand extends $Command
100+
.classBuilder<
101+
ListAppAssessmentResourceDriftsCommandInput,
102+
ListAppAssessmentResourceDriftsCommandOutput,
103+
ResiliencehubClientResolvedConfig,
104+
ServiceInputTypes,
105+
ServiceOutputTypes
106+
>()
107+
.ep({
108+
...commonParams,
109+
})
110+
.m(function (this: any, Command: any, cs: any, config: ResiliencehubClientResolvedConfig, o: any) {
111+
return [
112+
getSerdePlugin(config, this.serialize, this.deserialize),
113+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
114+
];
115+
})
116+
.s("AwsResilienceHub", "ListAppAssessmentResourceDrifts", {})
117+
.n("ResiliencehubClient", "ListAppAssessmentResourceDriftsCommand")
118+
.f(void 0, void 0)
119+
.ser(se_ListAppAssessmentResourceDriftsCommand)
120+
.de(de_ListAppAssessmentResourceDriftsCommand)
121+
.build() {}

clients/client-resiliencehub/src/commands/ListRecommendationTemplatesCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export interface ListRecommendationTemplatesCommandOutput
4444
* // const { ResiliencehubClient, ListRecommendationTemplatesCommand } = require("@aws-sdk/client-resiliencehub"); // CommonJS import
4545
* const client = new ResiliencehubClient(config);
4646
* const input = { // ListRecommendationTemplatesRequest
47-
* assessmentArn: "STRING_VALUE", // required
47+
* assessmentArn: "STRING_VALUE",
4848
* reverseOrder: true || false,
4949
* status: [ // RecommendationTemplateStatusList
5050
* "STRING_VALUE",

clients/client-resiliencehub/src/commands/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export * from "./DescribeResiliencyPolicyCommand";
2525
export * from "./ImportResourcesToDraftAppVersionCommand";
2626
export * from "./ListAlarmRecommendationsCommand";
2727
export * from "./ListAppAssessmentComplianceDriftsCommand";
28+
export * from "./ListAppAssessmentResourceDriftsCommand";
2829
export * from "./ListAppAssessmentsCommand";
2930
export * from "./ListAppComponentCompliancesCommand";
3031
export * from "./ListAppComponentRecommendationsCommand";

0 commit comments

Comments
 (0)