service_level_objectives
Creates, updates, deletes, gets or lists a service_level_objectives resource.
Overview
| Name | service_level_objectives |
| Type | Resource |
| Id | aws.application_signals.service_level_objectives |
Fields
The following fields are returned by SELECT queries:
- get_service_level_objective
- list_service_level_objectives
| Name | Datatype | Description |
|---|---|---|
arn | string | The ARN of this SLO. (pattern: <code>arn:(aws|aws-us-gov):application-signals:[^:]:[^:]:slo/[0-9A-Za-z][-._0-9A-Za-z ]{0,126}[0-9A-Za-z]</code>) |
auto_investigation_enabled | boolean | Indicates whether DevOps Agent will automatically investigate this SLO when it is breached |
burn_rate_configurations | array | 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. |
created_time | string (date-time) | The date and time that this SLO was created. When used in a raw HTTP Query API, it is formatted as yyyy-MM-dd'T'HH:mm:ss. For example, 2019-07-01T23:59:59. |
description | string | The description that you created for this SLO. |
evaluation_type | string | Displays whether this is a period-based SLO or a request-based SLO. (PeriodBased, RequestBased) |
goal | object | This structure contains the attributes that determine the goal of an SLO. This includes the time period for evaluation and the attainment threshold. |
last_updated_time | string (date-time) | The time that this SLO was most recently updated. When used in a raw HTTP Query API, it is formatted as yyyy-MM-dd'T'HH:mm:ss. For example, 2019-07-01T23:59:59. |
metric_source_type | string | Displays the SLI metric source type for this SLO. Supported types are: Service operation Service dependency Service CloudWatch metric AppMonitor Canary (ServiceOperation, CloudWatchMetric, ServiceDependency, AppMonitor, Canary, Service) |
name | string | The name of this SLO. (pattern: <code>[0-9A-Za-z][-._0-9A-Za-z ]{0,126}[0-9A-Za-z]</code>) |
request_based_sli | object | This structure contains information about the performance metric that a request-based SLO monitors. |
sli | object | A structure containing information about the performance metric that this SLO monitors, if this is a period-based SLO. |
| Name | Datatype | Description |
|---|---|---|
arn | string | The ARN of this service level objective. (pattern: <code>arn:(aws|aws-us-gov):application-signals:[^:]:[^:]:slo/[0-9A-Za-z][-._0-9A-Za-z ]{0,126}[0-9A-Za-z]</code>) |
composite_sli_config | object | The composite SLI configuration for service-level SLOs that monitor multiple operations of a service. |
created_time | string (date-time) | The date and time that this service level objective was created. It is expressed as the number of milliseconds since Jan 1, 1970 00:00:00 UTC. |
dependency_config | object | Identifies the dependency using the DependencyKeyAttributes and DependencyOperationName. When creating a service dependency SLO, you must specify the KeyAttributes of the service, and the DependencyConfig for the dependency. You can specify the OperationName of the service, from which it calls the dependency. Alternatively, you can exclude OperationName and the SLO will monitor all of the service's operations that call the dependency. |
evaluation_type | string | Displays whether this is a period-based SLO or a request-based SLO. (PeriodBased, RequestBased) |
key_attributes | object | This is a string-to-string map. It can include the following fields. Type designates the type of object this service level objective is for. ResourceType specifies the type of the resource. This field is used only when the value of the Type field is Resource or AWS::Resource. Name specifies the name of the object. This is used only if the value of the Type field is Service, RemoteService, or AWS::Service. Identifier identifies the resource objects of this resource. This is used only if the value of the Type field is Resource or AWS::Resource. Environment specifies the location where this object is hosted, or what it belongs to. |
metric_source | object | Identifies the metric source for SLOs on resources other than Application Signals services. |
metric_source_type | string | Displays the SLI metric source type for this SLO. Supported types are: Service operation Service dependency Service CloudWatch metric AppMonitor Canary (ServiceOperation, CloudWatchMetric, ServiceDependency, AppMonitor, Canary, Service) |
name | string | The name of the service level objective. (pattern: <code>[0-9A-Za-z][-._0-9A-Za-z ]{0,126}[0-9A-Za-z]</code>) |
operation_name | string | If this service level objective is specific to a single operation, this field displays the name of that operation. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_service_level_objective | select | id, region | Returns information about one SLO created in the account. | |
list_service_level_objectives | select | region | OperationName, MaxResults, NextToken, IncludeLinkedAccounts, SloOwnerAwsAccountId | Returns a list of SLOs created in this account. |
create_service_level_objective | insert | region | Creates a service level objective (SLO), which can help you ensure that your critical business operations are meeting customer expectations. Use SLOs to set and track specific target levels for the reliability and availability of your applications and services. SLOs use service level indicators (SLIs) to calculate whether the application is performing at the level that you want. Create an SLO to set a target for a service or operation’s availability or latency. CloudWatch measures this target frequently you can find whether it has been breached. The target performance quality that is defined for an SLO is the attainment goal. You can set SLO targets for your applications that are discovered by Application Signals, using critical metrics such as latency and availability. You can also set SLOs against any CloudWatch metric or math expression that produces a time series. You can't create an SLO for a service operation that was discovered by Application Signals until after that operation has reported standard metrics to Application Signals. When you create an SLO, you specify whether it is a period-based SLO or a request-based SLO. Each type of SLO has a different way of evaluating your application's performance against its attainment goal. A period-based SLO uses defined periods of time within a specified total time interval. For each period of time, Application Signals determines whether the application met its goal. The attainment rate is calculated as the number of good periods/number of total periods. For example, for a period-based SLO, meeting an attainment goal of 99.9% means that within your interval, your application must meet its performance goal during at least 99.9% of the time periods. A request-based SLO doesn't use pre-defined periods of time. Instead, the SLO measures number of good requests/number of total requests during the interval. At any time, you can find the ratio of good requests to total requests for the interval up to the time stamp that you specify, and measure that ratio against the goal set in your SLO. After you have created an SLO, you can retrieve error budget reports for it. An error budget is the amount of time or amount of requests that your application can be non-compliant with the SLO's goal, and still have your application meet the goal. For a period-based SLO, the error budget starts at a number defined by the highest number of periods that can fail to meet the threshold, while still meeting the overall goal. The remaining error budget decreases with every failed period that is recorded. The error budget within one interval can never increase. For example, an SLO with a threshold that 99.95% of requests must be completed under 2000ms every month translates to an error budget of 21.9 minutes of downtime per month. For a request-based SLO, the remaining error budget is dynamic and can increase or decrease, depending on the ratio of good requests to total requests. For more information about SLOs, see Service level objectives (SLOs). When you perform a CreateServiceLevelObjective operation, Application Signals creates the AWSServiceRoleForCloudWatchApplicationSignals service-linked role, if it doesn't already exist in your account. This service- linked role has the following permissions: xray:GetServiceGraph logs:StartQuery logs:GetQueryResults cloudwatch:GetMetricData cloudwatch:ListMetrics tag:GetResources autoscaling:DescribeAutoScalingGroups | |
update_service_level_objective | update | id, region | 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. | |
delete_service_level_objective | delete | id, region | Deletes the specified service level objective. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
id | string | The ARN or name of the service level objective to delete. |
region | string | AWS region (default: us-east-1) |
IncludeLinkedAccounts | boolean | If you are using this operation in a monitoring account, specify true to include SLO from source accounts in the returned data. When you are monitoring an account, you can use Amazon Web Services account ID in KeyAttribute filter for service source account and SloOwnerawsaccountID for SLO source account with IncludeLinkedAccounts to filter the returned data to only a single source account. |
MaxResults | integer | The maximum number of results to return in one operation. If you omit this parameter, the default of 50 is used. |
NextToken | string | Include this value, if it was returned by the previous operation, to get the next set of service level objectives. |
OperationName | string | The name of the operation that this SLO is associated with. |
SloOwnerAwsAccountId | string | SLO's Amazon Web Services account ID. |
SELECT examples
- get_service_level_objective
- list_service_level_objectives
Returns information about one SLO created in the account.
SELECT
arn,
auto_investigation_enabled,
burn_rate_configurations,
created_time,
description,
evaluation_type,
goal,
last_updated_time,
metric_source_type,
name,
request_based_sli,
sli
FROM aws.application_signals.service_level_objectives
WHERE id = '{{ id }}' -- required
AND region = '{{ region }}' -- required
;
Returns a list of SLOs created in this account.
SELECT
arn,
composite_sli_config,
created_time,
dependency_config,
evaluation_type,
key_attributes,
metric_source,
metric_source_type,
name,
operation_name
FROM aws.application_signals.service_level_objectives
WHERE region = '{{ region }}' -- required
AND OperationName = '{{ OperationName }}'
AND MaxResults = '{{ MaxResults }}'
AND NextToken = '{{ NextToken }}'
AND IncludeLinkedAccounts = '{{ IncludeLinkedAccounts }}'
AND SloOwnerAwsAccountId = '{{ SloOwnerAwsAccountId }}'
;
INSERT examples
- create_service_level_objective
- Manifest
Creates a service level objective (SLO), which can help you ensure that your critical business operations are meeting customer expectations. Use SLOs to set and track specific target levels for the reliability and availability of your applications and services. SLOs use service level indicators (SLIs) to calculate whether the application is performing at the level that you want. Create an SLO to set a target for a service or operation’s availability or latency. CloudWatch measures this target frequently you can find whether it has been breached. The target performance quality that is defined for an SLO is the attainment goal. You can set SLO targets for your applications that are discovered by Application Signals, using critical metrics such as latency and availability. You can also set SLOs against any CloudWatch metric or math expression that produces a time series. You can't create an SLO for a service operation that was discovered by Application Signals until after that operation has reported standard metrics to Application Signals. When you create an SLO, you specify whether it is a period-based SLO or a request-based SLO. Each type of SLO has a different way of evaluating your application's performance against its attainment goal. A period-based SLO uses defined periods of time within a specified total time interval. For each period of time, Application Signals determines whether the application met its goal. The attainment rate is calculated as the number of good periods/number of total periods. For example, for a period-based SLO, meeting an attainment goal of 99.9% means that within your interval, your application must meet its performance goal during at least 99.9% of the time periods. A request-based SLO doesn't use pre-defined periods of time. Instead, the SLO measures number of good requests/number of total requests during the interval. At any time, you can find the ratio of good requests to total requests for the interval up to the time stamp that you specify, and measure that ratio against the goal set in your SLO. After you have created an SLO, you can retrieve error budget reports for it. An error budget is the amount of time or amount of requests that your application can be non-compliant with the SLO's goal, and still have your application meet the goal. For a period-based SLO, the error budget starts at a number defined by the highest number of periods that can fail to meet the threshold, while still meeting the overall goal. The remaining error budget decreases with every failed period that is recorded. The error budget within one interval can never increase. For example, an SLO with a threshold that 99.95% of requests must be completed under 2000ms every month translates to an error budget of 21.9 minutes of downtime per month. For a request-based SLO, the remaining error budget is dynamic and can increase or decrease, depending on the ratio of good requests to total requests. For more information about SLOs, see Service level objectives (SLOs). When you perform a CreateServiceLevelObjective operation, Application Signals creates the AWSServiceRoleForCloudWatchApplicationSignals service-linked role, if it doesn't already exist in your account. This service- linked role has the following permissions: xray:GetServiceGraph logs:StartQuery logs:GetQueryResults cloudwatch:GetMetricData cloudwatch:ListMetrics tag:GetResources autoscaling:DescribeAutoScalingGroups
INSERT INTO aws.application_signals.service_level_objectives (
Name,
Description,
SliConfig,
RequestBasedSliConfig,
Goal,
Tags,
BurnRateConfigurations,
CreateRecommendedSlo,
AutoInvestigationEnabled,
region
)
SELECT
'{{ Name }}',
'{{ Description }}',
'{{ SliConfig }}',
'{{ RequestBasedSliConfig }}',
'{{ Goal }}',
'{{ Tags }}',
'{{ BurnRateConfigurations }}',
{{ CreateRecommendedSlo }},
{{ AutoInvestigationEnabled }},
'{{ region }}'
RETURNING
slo
;
# Description fields are for documentation purposes
- name: service_level_objectives
props:
- name: region
value: "{{ region }}"
description: Required parameter for the service_level_objectives resource.
- name: Name
value: "{{ Name }}"
- name: Description
value: "{{ Description }}"
- name: SliConfig
description: |
This structure specifies the information about the service and the performance metric that a period-based SLO is to monitor.
value:
SliMetricConfig:
KeyAttributes: "{{ KeyAttributes }}"
OperationName: "{{ OperationName }}"
MetricType: "{{ MetricType }}"
MetricName: "{{ MetricName }}"
Statistic: "{{ Statistic }}"
PeriodSeconds: {{ PeriodSeconds }}
MetricSource:
MetricSourceKeyAttributes: "{{ MetricSourceKeyAttributes }}"
MetricSourceAttributes: "{{ MetricSourceAttributes }}"
MetricDataQueries:
- Id: "{{ Id }}"
MetricStat:
Metric:
Namespace: "{{ Namespace }}"
MetricName: "{{ MetricName }}"
Dimensions: "{{ Dimensions }}"
Period: {{ Period }}
Stat: "{{ Stat }}"
Unit: "{{ Unit }}"
Expression: "{{ Expression }}"
Label: "{{ Label }}"
ReturnData: {{ ReturnData }}
Period: {{ Period }}
AccountId: "{{ AccountId }}"
DependencyConfig:
DependencyKeyAttributes: "{{ DependencyKeyAttributes }}"
DependencyOperationName: "{{ DependencyOperationName }}"
CompositeSliConfig:
SelectionConfig:
Type: "{{ Type }}"
Pattern: "{{ Pattern }}"
Components:
- OperationName: "{{ OperationName }}"
MetricThreshold: {{ MetricThreshold }}
ComparisonOperator: "{{ ComparisonOperator }}"
- name: RequestBasedSliConfig
description: |
This structure specifies the information about the service and the performance metric that a request-based SLO is to monitor.
value:
RequestBasedSliMetricConfig:
KeyAttributes: "{{ KeyAttributes }}"
OperationName: "{{ OperationName }}"
MetricType: "{{ MetricType }}"
TotalRequestCountMetric:
- Id: "{{ Id }}"
MetricStat:
Metric:
Namespace: "{{ Namespace }}"
MetricName: "{{ MetricName }}"
Dimensions: "{{ Dimensions }}"
Period: {{ Period }}
Stat: "{{ Stat }}"
Unit: "{{ Unit }}"
Expression: "{{ Expression }}"
Label: "{{ Label }}"
ReturnData: {{ ReturnData }}
Period: {{ Period }}
AccountId: "{{ AccountId }}"
MonitoredRequestCountMetric:
GoodCountMetric:
- Id: "{{ Id }}"
MetricStat:
Metric: "{{ Metric }}"
Period: {{ Period }}
Stat: "{{ Stat }}"
Unit: "{{ Unit }}"
Expression: "{{ Expression }}"
Label: "{{ Label }}"
ReturnData: {{ ReturnData }}
Period: {{ Period }}
AccountId: "{{ AccountId }}"
BadCountMetric:
- Id: "{{ Id }}"
MetricStat:
Metric: "{{ Metric }}"
Period: {{ Period }}
Stat: "{{ Stat }}"
Unit: "{{ Unit }}"
Expression: "{{ Expression }}"
Label: "{{ Label }}"
ReturnData: {{ ReturnData }}
Period: {{ Period }}
AccountId: "{{ AccountId }}"
DependencyConfig:
DependencyKeyAttributes: "{{ DependencyKeyAttributes }}"
DependencyOperationName: "{{ DependencyOperationName }}"
MetricSource:
MetricSourceKeyAttributes: "{{ MetricSourceKeyAttributes }}"
MetricSourceAttributes: "{{ MetricSourceAttributes }}"
MetricName: "{{ MetricName }}"
CompositeSliConfig:
SelectionConfig:
Type: "{{ Type }}"
Pattern: "{{ Pattern }}"
Components:
- OperationName: "{{ OperationName }}"
MetricThreshold: {{ MetricThreshold }}
ComparisonOperator: "{{ ComparisonOperator }}"
- name: Goal
description: |
This structure contains the attributes that determine the goal of an SLO. This includes the time period for evaluation and the attainment threshold.
value:
Interval:
RollingInterval:
DurationUnit: "{{ DurationUnit }}"
Duration: {{ Duration }}
CalendarInterval:
StartTime: "{{ StartTime }}"
DurationUnit: "{{ DurationUnit }}"
Duration: {{ Duration }}
AttainmentGoal: {{ AttainmentGoal }}
WarningThreshold: {{ WarningThreshold }}
- name: Tags
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
- name: BurnRateConfigurations
value:
- LookBackWindowMinutes: {{ LookBackWindowMinutes }}
- name: CreateRecommendedSlo
value: {{ CreateRecommendedSlo }}
- name: AutoInvestigationEnabled
value: {{ AutoInvestigationEnabled }}
UPDATE examples
- update_service_level_objective
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.
UPDATE aws.application_signals.service_level_objectives
SET
Description = '{{ Description }}',
SliConfig = '{{ SliConfig }}',
RequestBasedSliConfig = '{{ RequestBasedSliConfig }}',
Goal = '{{ Goal }}',
BurnRateConfigurations = '{{ BurnRateConfigurations }}',
AutoInvestigationEnabled = {{ AutoInvestigationEnabled }}
WHERE
id = '{{ id }}' --required
AND region = '{{ region }}' --required
RETURNING
slo;
DELETE examples
- delete_service_level_objective
Deletes the specified service level objective.
DELETE FROM aws.application_signals.service_level_objectives
WHERE id = '{{ id }}' --required
AND region = '{{ region }}' --required
;