Skip to content

Commit

Permalink
feat(client-resiliencehub): AWS Resilience Hub now automatically dete…
Browse files Browse the repository at this point in the history
…cts already configured CloudWatch alarms and FIS experiments as part of the assessment process and returns the discovered resources in the corresponding list API responses. It also allows you to include or exclude test recommendations for an AppComponent.
  • Loading branch information
awstools committed Dec 18, 2024
1 parent 7fee20d commit 2014889
Show file tree
Hide file tree
Showing 7 changed files with 182 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export interface BatchUpdateRecommendationStatusCommandOutput
* targetRegion: "STRING_VALUE",
* },
* excluded: true || false, // required
* appComponentId: "STRING_VALUE",
* excludeReason: "AlreadyImplemented" || "NotRelevant" || "ComplexityOfImplementation",
* },
* ],
Expand All @@ -70,6 +71,7 @@ export interface BatchUpdateRecommendationStatusCommandOutput
* // targetRegion: "STRING_VALUE",
* // },
* // excluded: true || false, // required
* // appComponentId: "STRING_VALUE",
* // excludeReason: "AlreadyImplemented" || "NotRelevant" || "ComplexityOfImplementation",
* // },
* // ],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@ export interface ListAlarmRecommendationsCommandOutput extends ListAlarmRecommen
* // alreadyImplemented: true || false,
* // excluded: true || false,
* // excludeReason: "AlreadyImplemented" || "NotRelevant" || "ComplexityOfImplementation",
* // latestDiscoveredExperiment: { // Experiment
* // experimentArn: "STRING_VALUE",
* // experimentTemplateId: "STRING_VALUE",
* // },
* // discoveredAlarm: { // Alarm
* // alarmArn: "STRING_VALUE",
* // source: "STRING_VALUE",
* // },
* // },
* // ],
* // prerequisite: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@ export interface ListSopRecommendationsCommandOutput extends ListSopRecommendati
* // alreadyImplemented: true || false,
* // excluded: true || false,
* // excludeReason: "AlreadyImplemented" || "NotRelevant" || "ComplexityOfImplementation",
* // latestDiscoveredExperiment: { // Experiment
* // experimentArn: "STRING_VALUE",
* // experimentTemplateId: "STRING_VALUE",
* // },
* // discoveredAlarm: { // Alarm
* // alarmArn: "STRING_VALUE",
* // source: "STRING_VALUE",
* // },
* // },
* // ],
* // referenceId: "STRING_VALUE", // required
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export interface ListTestRecommendationsCommandOutput extends ListTestRecommenda
* // { // TestRecommendation
* // recommendationId: "STRING_VALUE",
* // referenceId: "STRING_VALUE", // required
* // appComponentId: "STRING_VALUE",
* // appComponentName: "STRING_VALUE",
* // name: "STRING_VALUE",
* // intent: "STRING_VALUE",
Expand All @@ -62,6 +63,14 @@ export interface ListTestRecommendationsCommandOutput extends ListTestRecommenda
* // alreadyImplemented: true || false,
* // excluded: true || false,
* // excludeReason: "AlreadyImplemented" || "NotRelevant" || "ComplexityOfImplementation",
* // latestDiscoveredExperiment: { // Experiment
* // experimentArn: "STRING_VALUE",
* // experimentTemplateId: "STRING_VALUE",
* // },
* // discoveredAlarm: { // Alarm
* // alarmArn: "STRING_VALUE",
* // source: "STRING_VALUE",
* // },
* // },
* // ],
* // prerequisite: "STRING_VALUE",
Expand Down
83 changes: 76 additions & 7 deletions clients/client-resiliencehub/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,26 @@ export class ServiceQuotaExceededException extends __BaseException {
}
}

/**
* <p>Indicates the Amazon CloudWatch alarm detected while running an assessment.</p>
* @public
*/
export interface Alarm {
/**
* <p>Amazon Resource Name (ARN) of the Amazon CloudWatch alarm.</p>
* @public
*/
alarmArn?: string | undefined;

/**
* <p>Indicates the source of the Amazon CloudWatch alarm. That is, it indicates if the
* alarm was created using Resilience Hub recommendation (<code>AwsResilienceHub</code>),
* or if you had created the alarm in Amazon CloudWatch (<code>Customer</code>).</p>
* @public
*/
source?: string | undefined;
}

/**
* @public
* @enum
Expand All @@ -583,6 +603,24 @@ export const ExcludeRecommendationReason = {
export type ExcludeRecommendationReason =
(typeof ExcludeRecommendationReason)[keyof typeof ExcludeRecommendationReason];

/**
* <p>Indicates the FIS experiment detected while running an assessment.</p>
* @public
*/
export interface Experiment {
/**
* <p>Amazon Resource Name (ARN) of the FIS experiment.</p>
* @public
*/
experimentArn?: string | undefined;

/**
* <p>Identifier of the FIS experiment template.</p>
* @public
*/
experimentTemplateId?: string | undefined;
}

/**
* <p>Defines a recommendation.</p>
* @public
Expand Down Expand Up @@ -623,6 +661,18 @@ export interface RecommendationItem {
* @public
*/
excludeReason?: ExcludeRecommendationReason | undefined;

/**
* <p>Indicates the experiment created in FIS that was discovered by Resilience Hub, which matches the recommendation.</p>
* @public
*/
latestDiscoveredExperiment?: Experiment | undefined;

/**
* <p>Indicates the previously implemented Amazon CloudWatch alarm discovered by Resilience Hub.</p>
* @public
*/
discoveredAlarm?: Alarm | undefined;
}

/**
Expand Down Expand Up @@ -853,7 +903,10 @@ export interface PermissionModel {
* <p>Existing Amazon Web Services
* IAM role name in the primary Amazon Web Services account that will be assumed by
* Resilience Hub Service Principle to obtain a read-only access to your application
* resources while running an assessment.</p>
* resources while running an assessment. </p>
* <p>If your IAM role includes a path, you must include the path in the <code>invokerRoleName</code> parameter.
* For example, if your IAM role's ARN is <code>arn:aws:iam:123456789012:role/my-path/role-name</code>, you should pass <code>my-path/role-name</code>.
* </p>
* <note>
* <ul>
* <li>
Expand Down Expand Up @@ -1492,8 +1545,7 @@ export interface ResourceErrorsDetails {
resourceErrors?: ResourceError[] | undefined;

/**
* <p> This indicates if there are more errors not listed in the
* <code>resourceErrors</code>
* <p> This indicates if there are more errors not listed in the <code>resourceErrors</code>
* list. </p>
* @public
*/
Expand Down Expand Up @@ -1535,7 +1587,7 @@ export interface AssessmentRiskRecommendation {

/**
* <p>Indicates the Application Components (AppComponents) that were assessed as part of the
* assessnent and are associated with the identified risk and recommendation.</p>
* assessment and are associated with the identified risk and recommendation.</p>
* <note>
* <p>This property is available only in the US East (N. Virginia) Region.</p>
* </note>
Expand Down Expand Up @@ -1774,8 +1826,7 @@ export interface AppAssessmentSummary {
assessmentArn: string | undefined;

/**
* <p>Current
* status of compliance for the resiliency policy.</p>
* <p>Current status of compliance for the resiliency policy.</p>
* @public
*/
complianceStatus?: ComplianceStatus | undefined;
Expand Down Expand Up @@ -2144,6 +2195,12 @@ export interface UpdateRecommendationStatusRequestEntry {
*/
excluded: boolean | undefined;

/**
* <p>Indicates the identifier of the AppComponent.</p>
* @public
*/
appComponentId?: string | undefined;

/**
* <p>Indicates the reason for excluding an operational recommendation.</p>
* @public
Expand Down Expand Up @@ -2226,6 +2283,12 @@ export interface BatchUpdateRecommendationStatusSuccessfulEntry {
*/
excluded: boolean | undefined;

/**
* <p>Indicates the identifier of an AppComponent.</p>
* @public
*/
appComponentId?: string | undefined;

/**
* <p>Indicates the reason for excluding an operational recommendation.</p>
* @public
Expand Down Expand Up @@ -4491,7 +4554,7 @@ export interface ComplianceDrift {
/**
* <p>Difference type between actual and expected recovery point objective (RPO) and recovery
* time objective (RTO) values. Currently, Resilience Hub supports only
* <code>NotEqual</code> difference type.</p>
* <code>NotEqual</code> difference type.</p>
* @public
*/
diffType?: DifferenceType | undefined;
Expand Down Expand Up @@ -6082,6 +6145,12 @@ export interface TestRecommendation {
*/
referenceId: string | undefined;

/**
* <p>Indicates the identifier of the AppComponent.</p>
* @public
*/
appComponentId?: string | undefined;

/**
* <p>Name of the Application Component.</p>
* @public
Expand Down
4 changes: 4 additions & 0 deletions clients/client-resiliencehub/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3470,6 +3470,8 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont

// de_AdditionalInfoValueList omitted.

// de_Alarm omitted.

// de_AlarmRecommendation omitted.

// de_AlarmRecommendationList omitted.
Expand Down Expand Up @@ -3779,6 +3781,8 @@ const de_DisruptionResiliencyScore = (

// de_EventSubscriptionList omitted.

// de_Experiment omitted.

// de_FailedGroupingRecommendationEntries omitted.

// de_FailedGroupingRecommendationEntry omitted.
Expand Down
Loading

0 comments on commit 2014889

Please sign in to comment.