Skip to content

Commit e176892

Browse files
author
awstools
committed
feat(client-application-signals): Amazon CloudWatch Application Signals now supports creating Service Level Objectives with burn rates. Users can now create or update SLOs with burn rate configurations to meet their specific business requirements.
1 parent 67fa666 commit e176892

File tree

6 files changed

+130
-0
lines changed

6 files changed

+130
-0
lines changed

clients/client-application-signals/src/commands/CreateServiceLevelObjectiveCommand.ts

+10
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,11 @@ export interface CreateServiceLevelObjectiveCommandOutput extends CreateServiceL
277277
* Value: "STRING_VALUE", // required
278278
* },
279279
* ],
280+
* BurnRateConfigurations: [ // BurnRateConfigurations
281+
* { // BurnRateConfiguration
282+
* LookBackWindowMinutes: Number("int"), // required
283+
* },
284+
* ],
280285
* };
281286
* const command = new CreateServiceLevelObjectiveCommand(input);
282287
* const response = await client.send(command);
@@ -427,6 +432,11 @@ export interface CreateServiceLevelObjectiveCommandOutput extends CreateServiceL
427432
* // AttainmentGoal: Number("double"),
428433
* // WarningThreshold: Number("double"),
429434
* // },
435+
* // BurnRateConfigurations: [ // BurnRateConfigurations
436+
* // { // BurnRateConfiguration
437+
* // LookBackWindowMinutes: Number("int"), // required
438+
* // },
439+
* // ],
430440
* // },
431441
* // };
432442
*

clients/client-application-signals/src/commands/GetServiceLevelObjectiveCommand.ts

+5
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,11 @@ export interface GetServiceLevelObjectiveCommandOutput extends GetServiceLevelOb
191191
* // AttainmentGoal: Number("double"),
192192
* // WarningThreshold: Number("double"),
193193
* // },
194+
* // BurnRateConfigurations: [ // BurnRateConfigurations
195+
* // { // BurnRateConfiguration
196+
* // LookBackWindowMinutes: Number("int"), // required
197+
* // },
198+
* // ],
194199
* // },
195200
* // };
196201
*

clients/client-application-signals/src/commands/UpdateServiceLevelObjectiveCommand.ts

+10
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,11 @@ export interface UpdateServiceLevelObjectiveCommandOutput extends UpdateServiceL
189189
* AttainmentGoal: Number("double"),
190190
* WarningThreshold: Number("double"),
191191
* },
192+
* BurnRateConfigurations: [ // BurnRateConfigurations
193+
* { // BurnRateConfiguration
194+
* LookBackWindowMinutes: Number("int"), // required
195+
* },
196+
* ],
192197
* };
193198
* const command = new UpdateServiceLevelObjectiveCommand(input);
194199
* const response = await client.send(command);
@@ -339,6 +344,11 @@ export interface UpdateServiceLevelObjectiveCommandOutput extends UpdateServiceL
339344
* // AttainmentGoal: Number("double"),
340345
* // WarningThreshold: Number("double"),
341346
* // },
347+
* // BurnRateConfigurations: [ // BurnRateConfigurations
348+
* // { // BurnRateConfiguration
349+
* // LookBackWindowMinutes: Number("int"), // required
350+
* // },
351+
* // ],
342352
* // },
343353
* // };
344354
*

clients/client-application-signals/src/models/models_0.ts

+40
Original file line numberDiff line numberDiff line change
@@ -2016,6 +2016,25 @@ export class ConflictException extends __BaseException {
20162016
}
20172017
}
20182018

2019+
/**
2020+
* <p>This object defines the length of the look-back window used to calculate one burn rate metric
2021+
* for this SLO. The burn rate measures how fast the service is consuming the error budget, relative to the attainment goal of the SLO. A burn rate of
2022+
* exactly 1 indicates that the SLO goal will be met exactly.</p>
2023+
* <p>For example, if you specify 60 as the number of minutes in the look-back window, the burn rate is calculated as the following:</p>
2024+
* <p>
2025+
* <i>burn rate = error rate over the look-back window / (1 - attainment goal percentage)</i>
2026+
* </p>
2027+
* <p>For more information about burn rates, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-ServiceLevelObjectives.html#CloudWatch-ServiceLevelObjectives-burn">Calculate burn rates</a>.</p>
2028+
* @public
2029+
*/
2030+
export interface BurnRateConfiguration {
2031+
/**
2032+
* <p>The number of minutes to use as the look-back window.</p>
2033+
* @public
2034+
*/
2035+
LookBackWindowMinutes: number | undefined;
2036+
}
2037+
20192038
/**
20202039
* <p>Use this structure to specify the information for the metric that a period-based SLO will monitor.</p>
20212040
* @public
@@ -2263,6 +2282,13 @@ export interface CreateServiceLevelObjectiveInput {
22632282
* @public
22642283
*/
22652284
Tags?: Tag[] | undefined;
2285+
2286+
/**
2287+
* <p>Use this array to create <i>burn rates</i> for this SLO. Each
2288+
* burn rate is a metric that indicates how fast the service is consuming the error budget, relative to the attainment goal of the SLO.</p>
2289+
* @public
2290+
*/
2291+
BurnRateConfigurations?: BurnRateConfiguration[] | undefined;
22662292
}
22672293

22682294
/**
@@ -2333,6 +2359,13 @@ export interface ServiceLevelObjective {
23332359
* @public
23342360
*/
23352361
Goal: Goal | undefined;
2362+
2363+
/**
2364+
* <p>Each object in this array defines the length of the look-back window used to calculate one burn rate metric
2365+
* for this SLO. The burn rate measures how fast the service is consuming the error budget, relative to the attainment goal of the SLO.</p>
2366+
* @public
2367+
*/
2368+
BurnRateConfigurations?: BurnRateConfiguration[] | undefined;
23362369
}
23372370

23382371
/**
@@ -2583,6 +2616,13 @@ export interface UpdateServiceLevelObjectiveInput {
25832616
* @public
25842617
*/
25852618
Goal?: Goal | undefined;
2619+
2620+
/**
2621+
* <p>Use this array to create <i>burn rates</i> for this SLO. Each
2622+
* burn rate is a metric that indicates how fast the service is consuming the error budget, relative to the attainment goal of the SLO.</p>
2623+
* @public
2624+
*/
2625+
BurnRateConfigurations?: BurnRateConfiguration[] | undefined;
25862626
}
25872627

25882628
/**

clients/client-application-signals/src/protocols/Aws_restJson1.ts

+12
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ import {
8080
import { ApplicationSignalsServiceException as __BaseException } from "../models/ApplicationSignalsServiceException";
8181
import {
8282
AccessDeniedException,
83+
BurnRateConfiguration,
8384
CalendarInterval,
8485
ConflictException,
8586
Dimension,
@@ -144,6 +145,7 @@ export const se_CreateServiceLevelObjectiveCommand = async (
144145
let body: any;
145146
body = JSON.stringify(
146147
take(input, {
148+
BurnRateConfigurations: (_) => _json(_),
147149
Description: [],
148150
Goal: (_) => se_Goal(_, context),
149151
Name: [],
@@ -441,6 +443,7 @@ export const se_UpdateServiceLevelObjectiveCommand = async (
441443
let body: any;
442444
body = JSON.stringify(
443445
take(input, {
446+
BurnRateConfigurations: (_) => _json(_),
444447
Description: [],
445448
Goal: (_) => se_Goal(_, context),
446449
RequestBasedSliConfig: (_) => se_RequestBasedServiceLevelIndicatorConfig(_, context),
@@ -922,6 +925,10 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont
922925

923926
// se_Attributes omitted.
924927

928+
// se_BurnRateConfiguration omitted.
929+
930+
// se_BurnRateConfigurations omitted.
931+
925932
/**
926933
* serializeAws_restJson1CalendarInterval
927934
*/
@@ -1014,6 +1021,10 @@ const se_ServiceLevelIndicatorConfig = (input: ServiceLevelIndicatorConfig, cont
10141021

10151022
// de_Attributes omitted.
10161023

1024+
// de_BurnRateConfiguration omitted.
1025+
1026+
// de_BurnRateConfigurations omitted.
1027+
10171028
/**
10181029
* deserializeAws_restJson1CalendarInterval
10191030
*/
@@ -1120,6 +1131,7 @@ const de_ServiceLevelIndicator = (output: any, context: __SerdeContext): Service
11201131
const de_ServiceLevelObjective = (output: any, context: __SerdeContext): ServiceLevelObjective => {
11211132
return take(output, {
11221133
Arn: __expectString,
1134+
BurnRateConfigurations: _json,
11231135
CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
11241136
Description: __expectString,
11251137
EvaluationType: __expectString,

codegen/sdk-codegen/aws-models/application-signals.json

+53
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,41 @@
548548
"com.amazonaws.applicationsignals#BudgetSecondsRemaining": {
549549
"type": "integer"
550550
},
551+
"com.amazonaws.applicationsignals#BurnRateConfiguration": {
552+
"type": "structure",
553+
"members": {
554+
"LookBackWindowMinutes": {
555+
"target": "com.amazonaws.applicationsignals#BurnRateLookBackWindowMinutes",
556+
"traits": {
557+
"smithy.api#documentation": "<p>The number of minutes to use as the look-back window.</p>",
558+
"smithy.api#required": {}
559+
}
560+
}
561+
},
562+
"traits": {
563+
"smithy.api#documentation": "<p>This object defines the length of the look-back window used to calculate one burn rate metric\n for this SLO. The burn rate measures how fast the service is consuming the error budget, relative to the attainment goal of the SLO. A burn rate of\n exactly 1 indicates that the SLO goal will be met exactly.</p>\n <p>For example, if you specify 60 as the number of minutes in the look-back window, the burn rate is calculated as the following:</p>\n <p>\n <i>burn rate = error rate over the look-back window / (1 - attainment goal percentage)</i>\n </p>\n <p>For more information about burn rates, see <a href=\"https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-ServiceLevelObjectives.html#CloudWatch-ServiceLevelObjectives-burn\">Calculate burn rates</a>.</p>"
564+
}
565+
},
566+
"com.amazonaws.applicationsignals#BurnRateConfigurations": {
567+
"type": "list",
568+
"member": {
569+
"target": "com.amazonaws.applicationsignals#BurnRateConfiguration"
570+
},
571+
"traits": {
572+
"smithy.api#length": {
573+
"max": 10
574+
}
575+
}
576+
},
577+
"com.amazonaws.applicationsignals#BurnRateLookBackWindowMinutes": {
578+
"type": "integer",
579+
"traits": {
580+
"smithy.api#range": {
581+
"min": 1,
582+
"max": 10080
583+
}
584+
}
585+
},
551586
"com.amazonaws.applicationsignals#CalendarInterval": {
552587
"type": "structure",
553588
"members": {
@@ -674,6 +709,12 @@
674709
"traits": {
675710
"smithy.api#documentation": "<p>A list of key-value pairs to associate with the SLO. You can associate as many as 50 tags with an SLO.\n To be able to associate tags with the SLO when you create the SLO, you must\n have the <code>cloudwatch:TagResource</code> permission.</p>\n <p>Tags can help you organize and categorize your resources. You can also use them to scope user\n permissions by granting a user\n permission to access or change only resources with certain tag values.</p>"
676711
}
712+
},
713+
"BurnRateConfigurations": {
714+
"target": "com.amazonaws.applicationsignals#BurnRateConfigurations",
715+
"traits": {
716+
"smithy.api#documentation": "<p>Use this array to create <i>burn rates</i> for this SLO. Each \n burn rate is a metric that indicates how fast the service is consuming the error budget, relative to the attainment goal of the SLO.</p>"
717+
}
677718
}
678719
},
679720
"traits": {
@@ -2543,6 +2584,12 @@
25432584
"traits": {
25442585
"smithy.api#required": {}
25452586
}
2587+
},
2588+
"BurnRateConfigurations": {
2589+
"target": "com.amazonaws.applicationsignals#BurnRateConfigurations",
2590+
"traits": {
2591+
"smithy.api#documentation": "<p>Each object in this array defines the length of the look-back window used to calculate one burn rate metric\n for this SLO. The burn rate measures how fast the service is consuming the error budget, relative to the attainment goal of the SLO.</p>"
2592+
}
25462593
}
25472594
},
25482595
"traits": {
@@ -3392,6 +3439,12 @@
33923439
"traits": {
33933440
"smithy.api#documentation": "<p>A structure that contains the attributes that determine the goal of the SLO. This includes\n the time period for evaluation and the attainment threshold.</p>"
33943441
}
3442+
},
3443+
"BurnRateConfigurations": {
3444+
"target": "com.amazonaws.applicationsignals#BurnRateConfigurations",
3445+
"traits": {
3446+
"smithy.api#documentation": "<p>Use this array to create <i>burn rates</i> for this SLO. Each \n burn rate is a metric that indicates how fast the service is consuming the error budget, relative to the attainment goal of the SLO.</p>"
3447+
}
33953448
}
33963449
},
33973450
"traits": {

0 commit comments

Comments
 (0)