Skip to content

Commit

Permalink
feat(client-application-signals): Amazon CloudWatch Application Signa…
Browse files Browse the repository at this point in the history
…ls 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.
  • Loading branch information
awstools committed Nov 13, 2024
1 parent 67fa666 commit e176892
Show file tree
Hide file tree
Showing 6 changed files with 130 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,11 @@ export interface CreateServiceLevelObjectiveCommandOutput extends CreateServiceL
* Value: "STRING_VALUE", // required
* },
* ],
* BurnRateConfigurations: [ // BurnRateConfigurations
* { // BurnRateConfiguration
* LookBackWindowMinutes: Number("int"), // required
* },
* ],
* };
* const command = new CreateServiceLevelObjectiveCommand(input);
* const response = await client.send(command);
Expand Down Expand Up @@ -427,6 +432,11 @@ export interface CreateServiceLevelObjectiveCommandOutput extends CreateServiceL
* // AttainmentGoal: Number("double"),
* // WarningThreshold: Number("double"),
* // },
* // BurnRateConfigurations: [ // BurnRateConfigurations
* // { // BurnRateConfiguration
* // LookBackWindowMinutes: Number("int"), // required
* // },
* // ],
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,11 @@ export interface GetServiceLevelObjectiveCommandOutput extends GetServiceLevelOb
* // AttainmentGoal: Number("double"),
* // WarningThreshold: Number("double"),
* // },
* // BurnRateConfigurations: [ // BurnRateConfigurations
* // { // BurnRateConfiguration
* // LookBackWindowMinutes: Number("int"), // required
* // },
* // ],
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,11 @@ export interface UpdateServiceLevelObjectiveCommandOutput extends UpdateServiceL
* AttainmentGoal: Number("double"),
* WarningThreshold: Number("double"),
* },
* BurnRateConfigurations: [ // BurnRateConfigurations
* { // BurnRateConfiguration
* LookBackWindowMinutes: Number("int"), // required
* },
* ],
* };
* const command = new UpdateServiceLevelObjectiveCommand(input);
* const response = await client.send(command);
Expand Down Expand Up @@ -339,6 +344,11 @@ export interface UpdateServiceLevelObjectiveCommandOutput extends UpdateServiceL
* // AttainmentGoal: Number("double"),
* // WarningThreshold: Number("double"),
* // },
* // BurnRateConfigurations: [ // BurnRateConfigurations
* // { // BurnRateConfiguration
* // LookBackWindowMinutes: Number("int"), // required
* // },
* // ],
* // },
* // };
*
Expand Down
40 changes: 40 additions & 0 deletions clients/client-application-signals/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2016,6 +2016,25 @@ export class ConflictException extends __BaseException {
}
}

/**
* <p>This object defines the length of the look-back window used to calculate one burn rate metric
* 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
* exactly 1 indicates that the SLO goal will be met exactly.</p>
* <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>
* <p>
* <i>burn rate = error rate over the look-back window / (1 - attainment goal percentage)</i>
* </p>
* <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>
* @public
*/
export interface BurnRateConfiguration {
/**
* <p>The number of minutes to use as the look-back window.</p>
* @public
*/
LookBackWindowMinutes: number | undefined;
}

/**
* <p>Use this structure to specify the information for the metric that a period-based SLO will monitor.</p>
* @public
Expand Down Expand Up @@ -2263,6 +2282,13 @@ export interface CreateServiceLevelObjectiveInput {
* @public
*/
Tags?: Tag[] | undefined;

/**
* <p>Use this array to create <i>burn rates</i> for this SLO. Each
* 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>
* @public
*/
BurnRateConfigurations?: BurnRateConfiguration[] | undefined;
}

/**
Expand Down Expand Up @@ -2333,6 +2359,13 @@ export interface ServiceLevelObjective {
* @public
*/
Goal: Goal | undefined;

/**
* <p>Each object in this array defines the length of the look-back window used to calculate one burn rate metric
* 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>
* @public
*/
BurnRateConfigurations?: BurnRateConfiguration[] | undefined;
}

/**
Expand Down Expand Up @@ -2583,6 +2616,13 @@ export interface UpdateServiceLevelObjectiveInput {
* @public
*/
Goal?: Goal | undefined;

/**
* <p>Use this array to create <i>burn rates</i> for this SLO. Each
* 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>
* @public
*/
BurnRateConfigurations?: BurnRateConfiguration[] | undefined;
}

/**
Expand Down
12 changes: 12 additions & 0 deletions clients/client-application-signals/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ import {
import { ApplicationSignalsServiceException as __BaseException } from "../models/ApplicationSignalsServiceException";
import {
AccessDeniedException,
BurnRateConfiguration,
CalendarInterval,
ConflictException,
Dimension,
Expand Down Expand Up @@ -144,6 +145,7 @@ export const se_CreateServiceLevelObjectiveCommand = async (
let body: any;
body = JSON.stringify(
take(input, {
BurnRateConfigurations: (_) => _json(_),
Description: [],
Goal: (_) => se_Goal(_, context),
Name: [],
Expand Down Expand Up @@ -441,6 +443,7 @@ export const se_UpdateServiceLevelObjectiveCommand = async (
let body: any;
body = JSON.stringify(
take(input, {
BurnRateConfigurations: (_) => _json(_),
Description: [],
Goal: (_) => se_Goal(_, context),
RequestBasedSliConfig: (_) => se_RequestBasedServiceLevelIndicatorConfig(_, context),
Expand Down Expand Up @@ -922,6 +925,10 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont

// se_Attributes omitted.

// se_BurnRateConfiguration omitted.

// se_BurnRateConfigurations omitted.

/**
* serializeAws_restJson1CalendarInterval
*/
Expand Down Expand Up @@ -1014,6 +1021,10 @@ const se_ServiceLevelIndicatorConfig = (input: ServiceLevelIndicatorConfig, cont

// de_Attributes omitted.

// de_BurnRateConfiguration omitted.

// de_BurnRateConfigurations omitted.

/**
* deserializeAws_restJson1CalendarInterval
*/
Expand Down Expand Up @@ -1120,6 +1131,7 @@ const de_ServiceLevelIndicator = (output: any, context: __SerdeContext): Service
const de_ServiceLevelObjective = (output: any, context: __SerdeContext): ServiceLevelObjective => {
return take(output, {
Arn: __expectString,
BurnRateConfigurations: _json,
CreatedTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
Description: __expectString,
EvaluationType: __expectString,
Expand Down
53 changes: 53 additions & 0 deletions codegen/sdk-codegen/aws-models/application-signals.json
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,41 @@
"com.amazonaws.applicationsignals#BudgetSecondsRemaining": {
"type": "integer"
},
"com.amazonaws.applicationsignals#BurnRateConfiguration": {
"type": "structure",
"members": {
"LookBackWindowMinutes": {
"target": "com.amazonaws.applicationsignals#BurnRateLookBackWindowMinutes",
"traits": {
"smithy.api#documentation": "<p>The number of minutes to use as the look-back window.</p>",
"smithy.api#required": {}
}
}
},
"traits": {
"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>"
}
},
"com.amazonaws.applicationsignals#BurnRateConfigurations": {
"type": "list",
"member": {
"target": "com.amazonaws.applicationsignals#BurnRateConfiguration"
},
"traits": {
"smithy.api#length": {
"max": 10
}
}
},
"com.amazonaws.applicationsignals#BurnRateLookBackWindowMinutes": {
"type": "integer",
"traits": {
"smithy.api#range": {
"min": 1,
"max": 10080
}
}
},
"com.amazonaws.applicationsignals#CalendarInterval": {
"type": "structure",
"members": {
Expand Down Expand Up @@ -674,6 +709,12 @@
"traits": {
"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>"
}
},
"BurnRateConfigurations": {
"target": "com.amazonaws.applicationsignals#BurnRateConfigurations",
"traits": {
"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>"
}
}
},
"traits": {
Expand Down Expand Up @@ -2543,6 +2584,12 @@
"traits": {
"smithy.api#required": {}
}
},
"BurnRateConfigurations": {
"target": "com.amazonaws.applicationsignals#BurnRateConfigurations",
"traits": {
"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>"
}
}
},
"traits": {
Expand Down Expand Up @@ -3392,6 +3439,12 @@
"traits": {
"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>"
}
},
"BurnRateConfigurations": {
"target": "com.amazonaws.applicationsignals#BurnRateConfigurations",
"traits": {
"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>"
}
}
},
"traits": {
Expand Down

0 comments on commit e176892

Please sign in to comment.