updateServiceLevelObjective method

Future<UpdateServiceLevelObjectiveOutput> updateServiceLevelObjective({
  1. required String id,
  2. bool? autoInvestigationEnabled,
  3. List<BurnRateConfiguration>? burnRateConfigurations,
  4. String? description,
  5. Goal? goal,
  6. RequestBasedServiceLevelIndicatorConfig? requestBasedSliConfig,
  7. ServiceLevelIndicatorConfig? sliConfig,
})

Updates an existing service level objective (SLO). If you omit parameters, the previous values of those parameters are retained.

You cannot change from a period-based SLO to a request-based SLO, or change from a request-based SLO to a period-based SLO.

May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter id : The Amazon Resource Name (ARN) or name of the service level objective that you want to update.

Parameter autoInvestigationEnabled : Indicates whether DevOps Agent will automatically investigate this SLO when it is breached

Parameter burnRateConfigurations : Use this array to create burn rates 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.

Parameter description : An optional description for the SLO.

Parameter goal : A structure that contains the attributes that determine the goal of the SLO. This includes the time period for evaluation and the attainment threshold.

Parameter requestBasedSliConfig : If this SLO is a request-based SLO, this structure defines the information about what performance metric this SLO will monitor.

You can't specify both SliConfig and RequestBasedSliConfig in the same operation.

Parameter sliConfig : If this SLO is a period-based SLO, this structure defines the information about what performance metric this SLO will monitor.

Implementation

Future<UpdateServiceLevelObjectiveOutput> updateServiceLevelObjective({
  required String id,
  bool? autoInvestigationEnabled,
  List<BurnRateConfiguration>? burnRateConfigurations,
  String? description,
  Goal? goal,
  RequestBasedServiceLevelIndicatorConfig? requestBasedSliConfig,
  ServiceLevelIndicatorConfig? sliConfig,
}) async {
  final $payload = <String, dynamic>{
    if (autoInvestigationEnabled != null)
      'AutoInvestigationEnabled': autoInvestigationEnabled,
    if (burnRateConfigurations != null)
      'BurnRateConfigurations': burnRateConfigurations,
    if (description != null) 'Description': description,
    if (goal != null) 'Goal': goal,
    if (requestBasedSliConfig != null)
      'RequestBasedSliConfig': requestBasedSliConfig,
    if (sliConfig != null) 'SliConfig': sliConfig,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri: '/slo/${Uri.encodeComponent(id)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateServiceLevelObjectiveOutput.fromJson(response);
}