Skip to content

Commit

Permalink
feat(client-resiliencehub): In this release we improved resilience hu…
Browse files Browse the repository at this point in the history
…b application creation and maintenance by introducing new resource and app component crud APIs, improving visibility and maintenance of application input sources and added support for additional information attributes to be provided by customers.
  • Loading branch information
awstools committed Feb 21, 2023
1 parent 6d0fccc commit 014cd1c
Show file tree
Hide file tree
Showing 44 changed files with 7,658 additions and 1,562 deletions.
631 changes: 608 additions & 23 deletions clients/client-resiliencehub/src/Resiliencehub.ts

Large diffs are not rendered by default.

72 changes: 72 additions & 0 deletions clients/client-resiliencehub/src/ResiliencehubClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@ import {
AddDraftAppVersionResourceMappingsCommandOutput,
} from "./commands/AddDraftAppVersionResourceMappingsCommand";
import { CreateAppCommandInput, CreateAppCommandOutput } from "./commands/CreateAppCommand";
import {
CreateAppVersionAppComponentCommandInput,
CreateAppVersionAppComponentCommandOutput,
} from "./commands/CreateAppVersionAppComponentCommand";
import {
CreateAppVersionResourceCommandInput,
CreateAppVersionResourceCommandOutput,
} from "./commands/CreateAppVersionResourceCommand";
import {
CreateRecommendationTemplateCommandInput,
CreateRecommendationTemplateCommandOutput,
Expand All @@ -67,6 +75,18 @@ import {
DeleteAppAssessmentCommandOutput,
} from "./commands/DeleteAppAssessmentCommand";
import { DeleteAppCommandInput, DeleteAppCommandOutput } from "./commands/DeleteAppCommand";
import {
DeleteAppInputSourceCommandInput,
DeleteAppInputSourceCommandOutput,
} from "./commands/DeleteAppInputSourceCommand";
import {
DeleteAppVersionAppComponentCommandInput,
DeleteAppVersionAppComponentCommandOutput,
} from "./commands/DeleteAppVersionAppComponentCommand";
import {
DeleteAppVersionResourceCommandInput,
DeleteAppVersionResourceCommandOutput,
} from "./commands/DeleteAppVersionResourceCommand";
import {
DeleteRecommendationTemplateCommandInput,
DeleteRecommendationTemplateCommandOutput,
Expand All @@ -80,6 +100,15 @@ import {
DescribeAppAssessmentCommandOutput,
} from "./commands/DescribeAppAssessmentCommand";
import { DescribeAppCommandInput, DescribeAppCommandOutput } from "./commands/DescribeAppCommand";
import {
DescribeAppVersionAppComponentCommandInput,
DescribeAppVersionAppComponentCommandOutput,
} from "./commands/DescribeAppVersionAppComponentCommand";
import { DescribeAppVersionCommandInput, DescribeAppVersionCommandOutput } from "./commands/DescribeAppVersionCommand";
import {
DescribeAppVersionResourceCommandInput,
DescribeAppVersionResourceCommandOutput,
} from "./commands/DescribeAppVersionResourceCommand";
import {
DescribeAppVersionResourcesResolutionStatusCommandInput,
DescribeAppVersionResourcesResolutionStatusCommandOutput,
Expand Down Expand Up @@ -113,7 +142,15 @@ import {
ListAppComponentRecommendationsCommandInput,
ListAppComponentRecommendationsCommandOutput,
} from "./commands/ListAppComponentRecommendationsCommand";
import {
ListAppInputSourcesCommandInput,
ListAppInputSourcesCommandOutput,
} from "./commands/ListAppInputSourcesCommand";
import { ListAppsCommandInput, ListAppsCommandOutput } from "./commands/ListAppsCommand";
import {
ListAppVersionAppComponentsCommandInput,
ListAppVersionAppComponentsCommandOutput,
} from "./commands/ListAppVersionAppComponentsCommand";
import {
ListAppVersionResourceMappingsCommandInput,
ListAppVersionResourceMappingsCommandOutput,
Expand Down Expand Up @@ -168,6 +205,15 @@ import { StartAppAssessmentCommandInput, StartAppAssessmentCommandOutput } from
import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
import { UpdateAppCommandInput, UpdateAppCommandOutput } from "./commands/UpdateAppCommand";
import {
UpdateAppVersionAppComponentCommandInput,
UpdateAppVersionAppComponentCommandOutput,
} from "./commands/UpdateAppVersionAppComponentCommand";
import { UpdateAppVersionCommandInput, UpdateAppVersionCommandOutput } from "./commands/UpdateAppVersionCommand";
import {
UpdateAppVersionResourceCommandInput,
UpdateAppVersionResourceCommandOutput,
} from "./commands/UpdateAppVersionResourceCommand";
import {
UpdateResiliencyPolicyCommandInput,
UpdateResiliencyPolicyCommandOutput,
Expand All @@ -183,14 +229,22 @@ import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
export type ServiceInputTypes =
| AddDraftAppVersionResourceMappingsCommandInput
| CreateAppCommandInput
| CreateAppVersionAppComponentCommandInput
| CreateAppVersionResourceCommandInput
| CreateRecommendationTemplateCommandInput
| CreateResiliencyPolicyCommandInput
| DeleteAppAssessmentCommandInput
| DeleteAppCommandInput
| DeleteAppInputSourceCommandInput
| DeleteAppVersionAppComponentCommandInput
| DeleteAppVersionResourceCommandInput
| DeleteRecommendationTemplateCommandInput
| DeleteResiliencyPolicyCommandInput
| DescribeAppAssessmentCommandInput
| DescribeAppCommandInput
| DescribeAppVersionAppComponentCommandInput
| DescribeAppVersionCommandInput
| DescribeAppVersionResourceCommandInput
| DescribeAppVersionResourcesResolutionStatusCommandInput
| DescribeAppVersionTemplateCommandInput
| DescribeDraftAppVersionResourcesImportStatusCommandInput
Expand All @@ -200,6 +254,8 @@ export type ServiceInputTypes =
| ListAppAssessmentsCommandInput
| ListAppComponentCompliancesCommandInput
| ListAppComponentRecommendationsCommandInput
| ListAppInputSourcesCommandInput
| ListAppVersionAppComponentsCommandInput
| ListAppVersionResourceMappingsCommandInput
| ListAppVersionResourcesCommandInput
| ListAppVersionsCommandInput
Expand All @@ -219,19 +275,30 @@ export type ServiceInputTypes =
| TagResourceCommandInput
| UntagResourceCommandInput
| UpdateAppCommandInput
| UpdateAppVersionAppComponentCommandInput
| UpdateAppVersionCommandInput
| UpdateAppVersionResourceCommandInput
| UpdateResiliencyPolicyCommandInput;

export type ServiceOutputTypes =
| AddDraftAppVersionResourceMappingsCommandOutput
| CreateAppCommandOutput
| CreateAppVersionAppComponentCommandOutput
| CreateAppVersionResourceCommandOutput
| CreateRecommendationTemplateCommandOutput
| CreateResiliencyPolicyCommandOutput
| DeleteAppAssessmentCommandOutput
| DeleteAppCommandOutput
| DeleteAppInputSourceCommandOutput
| DeleteAppVersionAppComponentCommandOutput
| DeleteAppVersionResourceCommandOutput
| DeleteRecommendationTemplateCommandOutput
| DeleteResiliencyPolicyCommandOutput
| DescribeAppAssessmentCommandOutput
| DescribeAppCommandOutput
| DescribeAppVersionAppComponentCommandOutput
| DescribeAppVersionCommandOutput
| DescribeAppVersionResourceCommandOutput
| DescribeAppVersionResourcesResolutionStatusCommandOutput
| DescribeAppVersionTemplateCommandOutput
| DescribeDraftAppVersionResourcesImportStatusCommandOutput
Expand All @@ -241,6 +308,8 @@ export type ServiceOutputTypes =
| ListAppAssessmentsCommandOutput
| ListAppComponentCompliancesCommandOutput
| ListAppComponentRecommendationsCommandOutput
| ListAppInputSourcesCommandOutput
| ListAppVersionAppComponentsCommandOutput
| ListAppVersionResourceMappingsCommandOutput
| ListAppVersionResourcesCommandOutput
| ListAppVersionsCommandOutput
Expand All @@ -260,6 +329,9 @@ export type ServiceOutputTypes =
| TagResourceCommandOutput
| UntagResourceCommandOutput
| UpdateAppCommandOutput
| UpdateAppVersionAppComponentCommandOutput
| UpdateAppVersionCommandOutput
| UpdateAppVersionResourceCommandOutput
| UpdateResiliencyPolicyCommandOutput;

export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export interface AddDraftAppVersionResourceMappingsCommandOutput
__MetadataBearer {}

/**
* <p>Adds the resource mapping for the draft application version.</p>
* <p>Adds the resource mapping for the draft application version. You can also update an existing resource mapping to a new physical resource.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
6 changes: 3 additions & 3 deletions clients/client-resiliencehub/src/commands/CreateAppCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ export interface CreateAppCommandInput extends CreateAppRequest {}
export interface CreateAppCommandOutput extends CreateAppResponse, __MetadataBearer {}

/**
* <p>Creates a Resilience Hub application. A Resilience Hub application is a collection of Amazon Web Services
* <p>Creates an AWS Resilience Hub application. An AWS Resilience Hub application is a 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 application name, resources from one or more–up to
* AWS Resilience Hub application, you provide an application name, resources from one or more–up to
* five–CloudFormation stacks, and an appropriate resiliency policy.</p>
* <p>After you create a Resilience Hub application, you publish it so that you can run a resiliency
* <p>After you create an AWS Resilience Hub application, you publish it so that you can run a resiliency
* assessment on it. You can then use recommendations from the assessment to improve resiliency
* by running another assessment, comparing results, and then iterating the process until you
* achieve your goals for recovery time objective (RTO) and recovery point objective
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
// smithy-typescript generated code
import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
import { Command as $Command } from "@aws-sdk/smithy-client";
import {
FinalizeHandlerArguments,
Handler,
HandlerExecutionContext,
HttpHandlerOptions as __HttpHandlerOptions,
MetadataBearer as __MetadataBearer,
MiddlewareStack,
SerdeContext as __SerdeContext,
} from "@aws-sdk/types";

import {
CreateAppVersionAppComponentRequest,
CreateAppVersionAppComponentRequestFilterSensitiveLog,
CreateAppVersionAppComponentResponse,
CreateAppVersionAppComponentResponseFilterSensitiveLog,
} from "../models/models_0";
import {
deserializeAws_restJson1CreateAppVersionAppComponentCommand,
serializeAws_restJson1CreateAppVersionAppComponentCommand,
} from "../protocols/Aws_restJson1";
import { ResiliencehubClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ResiliencehubClient";

export interface CreateAppVersionAppComponentCommandInput extends CreateAppVersionAppComponentRequest {}
export interface CreateAppVersionAppComponentCommandOutput
extends CreateAppVersionAppComponentResponse,
__MetadataBearer {}

/**
* <p>Creates a new Application Component in the AWS Resilience Hub application.</p>
* <note>
* <p>This API updates the AWS Resilience Hub application draft version. To use this Application Component for running assessments, you must publish the AWS Resilience Hub application using the <code>PublishAppVersion</code> API.</p>
* </note>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { ResiliencehubClient, CreateAppVersionAppComponentCommand } from "@aws-sdk/client-resiliencehub"; // ES Modules import
* // const { ResiliencehubClient, CreateAppVersionAppComponentCommand } = require("@aws-sdk/client-resiliencehub"); // CommonJS import
* const client = new ResiliencehubClient(config);
* const command = new CreateAppVersionAppComponentCommand(input);
* const response = await client.send(command);
* ```
*
* @see {@link CreateAppVersionAppComponentCommandInput} for command's `input` shape.
* @see {@link CreateAppVersionAppComponentCommandOutput} for command's `response` shape.
* @see {@link ResiliencehubClientResolvedConfig | config} for ResiliencehubClient's `config` shape.
*
*/
export class CreateAppVersionAppComponentCommand extends $Command<
CreateAppVersionAppComponentCommandInput,
CreateAppVersionAppComponentCommandOutput,
ResiliencehubClientResolvedConfig
> {
// 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" },
};
}

constructor(readonly input: CreateAppVersionAppComponentCommandInput) {
// Start section: command_constructor
super();
// End section: command_constructor
}

/**
* @internal
*/
resolveMiddleware(
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
configuration: ResiliencehubClientResolvedConfig,
options?: __HttpHandlerOptions
): Handler<CreateAppVersionAppComponentCommandInput, CreateAppVersionAppComponentCommandOutput> {
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
this.middlewareStack.use(
getEndpointPlugin(configuration, CreateAppVersionAppComponentCommand.getEndpointParameterInstructions())
);

const stack = clientStack.concat(this.middlewareStack);

const { logger } = configuration;
const clientName = "ResiliencehubClient";
const commandName = "CreateAppVersionAppComponentCommand";
const handlerExecutionContext: HandlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: CreateAppVersionAppComponentRequestFilterSensitiveLog,
outputFilterSensitiveLog: CreateAppVersionAppComponentResponseFilterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve(
(request: FinalizeHandlerArguments<any>) =>
requestHandler.handle(request.request as __HttpRequest, options || {}),
handlerExecutionContext
);
}

private serialize(input: CreateAppVersionAppComponentCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
return serializeAws_restJson1CreateAppVersionAppComponentCommand(input, context);
}

private deserialize(
output: __HttpResponse,
context: __SerdeContext
): Promise<CreateAppVersionAppComponentCommandOutput> {
return deserializeAws_restJson1CreateAppVersionAppComponentCommand(output, context);
}

// Start section: command_body_extra
// End section: command_body_extra
}
Loading

0 comments on commit 014cd1c

Please sign in to comment.