CloudWatchApplicationSignals
****************************
Client
======
class CloudWatchApplicationSignals.Client
A low-level client representing Amazon CloudWatch Application
Signals
Use CloudWatch Application Signals for comprehensive observability
of your cloud-based applications. It enables real-time service
health dashboards and helps you track long-term performance trends
against your business goals. The application-centric view provides
you with unified visibility across your applications, services, and
dependencies, so you can proactively monitor and efficiently triage
any issues that may arise, ensuring optimal customer experience.
Application Signals provides the following benefits:
* Automatically collect metrics and traces from your applications,
and display key metrics such as call volume, availability,
latency, faults, and errors.
* Create and monitor service level objectives (SLOs).
* See a map of your application topology that Application Signals
automatically discovers, that gives you a visual representation
of your applications, dependencies, and their connectivity.
Application Signals works with CloudWatch RUM, CloudWatch
Synthetics canaries, and Amazon Web Services Service Catalog
AppRegistry, to display your client pages, Synthetics canaries, and
application names within dashboards and maps.
import boto3
client = boto3.client('application-signals')
These are the available methods:
* batch_get_service_level_objective_budget_report
* batch_update_exclusion_windows
* can_paginate
* close
* create_service_level_objective
* delete_service_level_objective
* get_paginator
* get_service
* get_service_level_objective
* get_waiter
* list_service_dependencies
* list_service_dependents
* list_service_level_objective_exclusion_windows
* list_service_level_objectives
* list_service_operations
* list_services
* list_tags_for_resource
* start_discovery
* tag_resource
* untag_resource
* update_service_level_objective
Paginators
==========
Paginators are available on a client instance via the "get_paginator"
method. For more detailed instructions and examples on the usage of
paginators, see the paginators user guide.
The available paginators are:
* ListServiceDependencies
* ListServiceDependents
* ListServiceLevelObjectiveExclusionWindows
* ListServiceLevelObjectives
* ListServiceOperations
* ListServices
CloudWatchApplicationSignals / Paginator / ListServiceDependents
ListServiceDependents
*********************
class CloudWatchApplicationSignals.Paginator.ListServiceDependents
paginator = client.get_paginator('list_service_dependents')
paginate(**kwargs)
Creates an iterator that will paginate through responses from
"CloudWatchApplicationSignals.Client.list_service_dependents()".
See also: AWS API Documentation
**Request Syntax**
response_iterator = paginator.paginate(
StartTime=datetime(2015, 1, 1),
EndTime=datetime(2015, 1, 1),
KeyAttributes={
'string': 'string'
},
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
Parameters:
* **StartTime** (*datetime*) --
**[REQUIRED]**
The start of the time period to retrieve information about.
When used in a raw HTTP Query API, it is formatted as be
epoch time in seconds. For example: "1698778057"
Your requested start time will be rounded to the nearest
hour.
* **EndTime** (*datetime*) --
**[REQUIRED]**
The end of the time period to retrieve information about.
When used in a raw HTTP Query API, it is formatted as be
epoch time in seconds. For example: "1698778057"
Your requested start time will be rounded to the nearest
hour.
* **KeyAttributes** (*dict*) --
**[REQUIRED]**
Use this field to specify which service you want to
retrieve information for. You must specify at least the
"Type", "Name", and "Environment" attributes.
This is a string-to-string map. It can include the
following fields.
* "Type" designates the type of object this is.
* "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.
* *(string) --*
* *(string) --*
* **PaginationConfig** (*dict*) --
A dictionary that provides parameters to control
pagination.
* **MaxItems** *(integer) --*
The total number of items to return. If the total number
of items available is more than the value specified in
max-items then a "NextToken" will be provided in the
output that you can use to resume pagination.
* **PageSize** *(integer) --*
The size of each page.
* **StartingToken** *(string) --*
A token to specify where to start paginating. This is the
"NextToken" from a previous response.
Return type:
dict
Returns:
**Response Syntax**
{
'StartTime': datetime(2015, 1, 1),
'EndTime': datetime(2015, 1, 1),
'ServiceDependents': [
{
'OperationName': 'string',
'DependentKeyAttributes': {
'string': 'string'
},
'DependentOperationName': 'string',
'MetricReferences': [
{
'Namespace': 'string',
'MetricType': 'string',
'Dimensions': [
{
'Name': 'string',
'Value': 'string'
},
],
'MetricName': 'string',
'AccountId': 'string'
},
]
},
],
}
**Response Structure**
* *(dict) --*
* **StartTime** *(datetime) --*
The start of the time period that the returned
information applies to. When used in a raw HTTP Query
API, it is formatted as be epoch time in seconds. For
example: "1698778057"
This displays the time that Application Signals used for
the request. It might not match your request exactly,
because it was rounded to the nearest hour.
* **EndTime** *(datetime) --*
The end of the time period that the returned information
applies to. When used in a raw HTTP Query API, it is
formatted as be epoch time in seconds. For example:
"1698778057"
This displays the time that Application Signals used for
the request. It might not match your request exactly,
because it was rounded to the nearest hour.
* **ServiceDependents** *(list) --*
An array, where each object in the array contains
information about one of the dependents of this service.
* *(dict) --*
This structure contains information about a service
dependent that was discovered by Application Signals. A
dependent is an entity that invoked the specified
service during the provided time range. Dependents
include other services, CloudWatch Synthetics canaries,
and clients that are instrumented with CloudWatch RUM
app monitors.
* **OperationName** *(string) --*
If the invoked entity is an operation on an entity,
the name of that dependent operation is displayed
here.
* **DependentKeyAttributes** *(dict) --*
This is a string-to-string map. It can include the
following fields.
* "Type" designates the type of object this is.
* "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.
* *(string) --*
* *(string) --*
* **DependentOperationName** *(string) --*
If the dependent invoker was a service that invoked
it from an operation, the name of that dependent
operation is displayed here.
* **MetricReferences** *(list) --*
An array of structures that each contain information
about one metric associated with this service
dependent that was discovered by Application Signals.
* *(dict) --*
This structure contains information about one
CloudWatch metric associated with this entity
discovered by Application Signals.
* **Namespace** *(string) --*
The namespace of the metric. For more
information, see CloudWatchNamespaces.
* **MetricType** *(string) --*
Used to display the appropriate statistics in the
CloudWatch console.
* **Dimensions** *(list) --*
An array of one or more dimensions that further
define the metric. For more information, see
CloudWatchDimensions.
* *(dict) --*
A dimension is a name/value pair that is part
of the identity of a metric. Because dimensions
are part of the unique identifier for a metric,
whenever you add a unique name/value pair to
one of your metrics, you are creating a new
variation of that metric. For example, many
Amazon EC2 metrics publish "InstanceId" as a
dimension name, and the actual instance ID as
the value for that dimension.
You can assign up to 30 dimensions to a metric.
* **Name** *(string) --*
The name of the dimension. Dimension names
must contain only ASCII characters, must
include at least one non-whitespace
character, and cannot start with a colon (
":"). ASCII control characters are not
supported as part of dimension names.
* **Value** *(string) --*
The value of the dimension. Dimension values
must contain only ASCII characters and must
include at least one non-whitespace
character. ASCII control characters are not
supported as part of dimension values.
* **MetricName** *(string) --*
The name of the metric.
* **AccountId** *(string) --*
Amazon Web Services account ID.
CloudWatchApplicationSignals / Paginator / ListServiceDependencies
ListServiceDependencies
***********************
class CloudWatchApplicationSignals.Paginator.ListServiceDependencies
paginator = client.get_paginator('list_service_dependencies')
paginate(**kwargs)
Creates an iterator that will paginate through responses from "
CloudWatchApplicationSignals.Client.list_service_dependencies()
".
See also: AWS API Documentation
**Request Syntax**
response_iterator = paginator.paginate(
StartTime=datetime(2015, 1, 1),
EndTime=datetime(2015, 1, 1),
KeyAttributes={
'string': 'string'
},
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
Parameters:
* **StartTime** (*datetime*) --
**[REQUIRED]**
The start of the time period to retrieve information about.
When used in a raw HTTP Query API, it is formatted as be
epoch time in seconds. For example: "1698778057"
Your requested start time will be rounded to the nearest
hour.
* **EndTime** (*datetime*) --
**[REQUIRED]**
The end of the time period to retrieve information about.
When used in a raw HTTP Query API, it is formatted as be
epoch time in seconds. For example: "1698778057"
Your requested end time will be rounded to the nearest
hour.
* **KeyAttributes** (*dict*) --
**[REQUIRED]**
Use this field to specify which service you want to
retrieve information for. You must specify at least the
"Type", "Name", and "Environment" attributes.
This is a string-to-string map. It can include the
following fields.
* "Type" designates the type of object this is.
* "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.
* *(string) --*
* *(string) --*
* **PaginationConfig** (*dict*) --
A dictionary that provides parameters to control
pagination.
* **MaxItems** *(integer) --*
The total number of items to return. If the total number
of items available is more than the value specified in
max-items then a "NextToken" will be provided in the
output that you can use to resume pagination.
* **PageSize** *(integer) --*
The size of each page.
* **StartingToken** *(string) --*
A token to specify where to start paginating. This is the
"NextToken" from a previous response.
Return type:
dict
Returns:
**Response Syntax**
{
'StartTime': datetime(2015, 1, 1),
'EndTime': datetime(2015, 1, 1),
'ServiceDependencies': [
{
'OperationName': 'string',
'DependencyKeyAttributes': {
'string': 'string'
},
'DependencyOperationName': 'string',
'MetricReferences': [
{
'Namespace': 'string',
'MetricType': 'string',
'Dimensions': [
{
'Name': 'string',
'Value': 'string'
},
],
'MetricName': 'string',
'AccountId': 'string'
},
]
},
],
}
**Response Structure**
* *(dict) --*
* **StartTime** *(datetime) --*
The start of the time period that the returned
information applies to. When used in a raw HTTP Query
API, it is formatted as be epoch time in seconds. For
example: "1698778057"
This displays the time that Application Signals used for
the request. It might not match your request exactly,
because it was rounded to the nearest hour.
* **EndTime** *(datetime) --*
The end of the time period that the returned information
applies to. When used in a raw HTTP Query API, it is
formatted as be epoch time in seconds. For example:
"1698778057"
This displays the time that Application Signals used for
the request. It might not match your request exactly,
because it was rounded to the nearest hour.
* **ServiceDependencies** *(list) --*
An array, where each object in the array contains
information about one of the dependencies of this
service.
* *(dict) --*
This structure contains information about one
dependency of this service.
* **OperationName** *(string) --*
The name of the operation in this service that calls
the dependency.
* **DependencyKeyAttributes** *(dict) --*
This is a string-to-string map. It can include the
following fields.
* "Type" designates the type of object this is.
* "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.
* *(string) --*
* *(string) --*
* **DependencyOperationName** *(string) --*
The name of the called operation in the dependency.
* **MetricReferences** *(list) --*
An array of structures that each contain information
about one metric associated with this service
dependency that was discovered by Application
Signals.
* *(dict) --*
This structure contains information about one
CloudWatch metric associated with this entity
discovered by Application Signals.
* **Namespace** *(string) --*
The namespace of the metric. For more
information, see CloudWatchNamespaces.
* **MetricType** *(string) --*
Used to display the appropriate statistics in the
CloudWatch console.
* **Dimensions** *(list) --*
An array of one or more dimensions that further
define the metric. For more information, see
CloudWatchDimensions.
* *(dict) --*
A dimension is a name/value pair that is part
of the identity of a metric. Because dimensions
are part of the unique identifier for a metric,
whenever you add a unique name/value pair to
one of your metrics, you are creating a new
variation of that metric. For example, many
Amazon EC2 metrics publish "InstanceId" as a
dimension name, and the actual instance ID as
the value for that dimension.
You can assign up to 30 dimensions to a metric.
* **Name** *(string) --*
The name of the dimension. Dimension names
must contain only ASCII characters, must
include at least one non-whitespace
character, and cannot start with a colon (
":"). ASCII control characters are not
supported as part of dimension names.
* **Value** *(string) --*
The value of the dimension. Dimension values
must contain only ASCII characters and must
include at least one non-whitespace
character. ASCII control characters are not
supported as part of dimension values.
* **MetricName** *(string) --*
The name of the metric.
* **AccountId** *(string) --*
Amazon Web Services account ID.
CloudWatchApplicationSignals / Paginator / ListServices
ListServices
************
class CloudWatchApplicationSignals.Paginator.ListServices
paginator = client.get_paginator('list_services')
paginate(**kwargs)
Creates an iterator that will paginate through responses from
"CloudWatchApplicationSignals.Client.list_services()".
See also: AWS API Documentation
**Request Syntax**
response_iterator = paginator.paginate(
StartTime=datetime(2015, 1, 1),
EndTime=datetime(2015, 1, 1),
IncludeLinkedAccounts=True|False,
AwsAccountId='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
Parameters:
* **StartTime** (*datetime*) --
**[REQUIRED]**
The start of the time period to retrieve information about.
When used in a raw HTTP Query API, it is formatted as be
epoch time in seconds. For example: "1698778057"
Your requested start time will be rounded to the nearest
hour.
* **EndTime** (*datetime*) --
**[REQUIRED]**
The end of the time period to retrieve information about.
When used in a raw HTTP Query API, it is formatted as be
epoch time in seconds. For example: "1698778057"
Your requested start time will be rounded to the nearest
hour.
* **IncludeLinkedAccounts** (*boolean*) -- If you are using
this operation in a monitoring account, specify "true" to
include services from source accounts in the returned data.
"
"
* **AwsAccountId** (*string*) -- Amazon Web Services Account
ID.
* **PaginationConfig** (*dict*) --
A dictionary that provides parameters to control
pagination.
* **MaxItems** *(integer) --*
The total number of items to return. If the total number
of items available is more than the value specified in
max-items then a "NextToken" will be provided in the
output that you can use to resume pagination.
* **PageSize** *(integer) --*
The size of each page.
* **StartingToken** *(string) --*
A token to specify where to start paginating. This is the
"NextToken" from a previous response.
Return type:
dict
Returns:
**Response Syntax**
{
'StartTime': datetime(2015, 1, 1),
'EndTime': datetime(2015, 1, 1),
'ServiceSummaries': [
{
'KeyAttributes': {
'string': 'string'
},
'AttributeMaps': [
{
'string': 'string'
},
],
'MetricReferences': [
{
'Namespace': 'string',
'MetricType': 'string',
'Dimensions': [
{
'Name': 'string',
'Value': 'string'
},
],
'MetricName': 'string',
'AccountId': 'string'
},
]
},
],
}
**Response Structure**
* *(dict) --*
* **StartTime** *(datetime) --*
The start of the time period that the returned
information applies to. When used in a raw HTTP Query
API, it is formatted as be epoch time in seconds. For
example: "1698778057"
This displays the time that Application Signals used for
the request. It might not match your request exactly,
because it was rounded to the nearest hour.
* **EndTime** *(datetime) --*
The end of the time period that the returned information
applies to. When used in a raw HTTP Query API, it is
formatted as be epoch time in seconds. For example:
"1698778057"
This displays the time that Application Signals used for
the request. It might not match your request exactly,
because it was rounded to the nearest hour.
* **ServiceSummaries** *(list) --*
An array of structures, where each structure contains
some information about a service. To get complete
information about a service, use GetService.
* *(dict) --*
This structure contains information about one of your
services that was discovered by Application Signals
* **KeyAttributes** *(dict) --*
This is a string-to-string map that help identify the
objects discovered by Application Signals. It can
include the following fields.
* "Type" designates the type of object this is.
* "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.
* *(string) --*
* *(string) --*
* **AttributeMaps** *(list) --*
This structure contains one or more string-to-string
maps that help identify this service. It can include
*platform attributes*, *application attributes*, and
*telemetry attributes*.
Platform attributes contain information the service's
platform.
* "PlatformType" defines the hosted-in platform.
* "EKS.Cluster" is the name of the Amazon EKS
cluster.
* "K8s.Cluster" is the name of the self-hosted
Kubernetes cluster.
* "K8s.Namespace" is the name of the Kubernetes
namespace in either Amazon EKS or Kubernetes
clusters.
* "K8s.Workload" is the name of the Kubernetes
workload in either Amazon EKS or Kubernetes
clusters.
* "K8s.Node" is the name of the Kubernetes node in
either Amazon EKS or Kubernetes clusters.
* "K8s.Pod" is the name of the Kubernetes pod in
either Amazon EKS or Kubernetes clusters.
* "EC2.AutoScalingGroup" is the name of the Amazon
EC2 Auto Scaling group.
* "EC2.InstanceId" is the ID of the Amazon EC2
instance.
* "Host" is the name of the host, for all platform
types.
Application attributes contain information about the
application.
* "AWS.Application" is the application's name in
Amazon Web Services Service Catalog AppRegistry.
* "AWS.Application.ARN" is the application's ARN in
Amazon Web Services Service Catalog AppRegistry.
Telemetry attributes contain telemetry information.
* "Telemetry.SDK" is the fingerprint of the
OpenTelemetry SDK version for instrumented
services.
* "Telemetry.Agent" is the fingerprint of the agent
used to collect and send telemetry data.
* "Telemetry.Source" Specifies the point of
application where the telemetry was collected or
specifies what was used for the source of telemetry
data.
* *(dict) --*
* *(string) --*
* *(string) --*
* **MetricReferences** *(list) --*
An array of structures that each contain information
about one metric associated with this service.
* *(dict) --*
This structure contains information about one
CloudWatch metric associated with this entity
discovered by Application Signals.
* **Namespace** *(string) --*
The namespace of the metric. For more
information, see CloudWatchNamespaces.
* **MetricType** *(string) --*
Used to display the appropriate statistics in the
CloudWatch console.
* **Dimensions** *(list) --*
An array of one or more dimensions that further
define the metric. For more information, see
CloudWatchDimensions.
* *(dict) --*
A dimension is a name/value pair that is part
of the identity of a metric. Because dimensions
are part of the unique identifier for a metric,
whenever you add a unique name/value pair to
one of your metrics, you are creating a new
variation of that metric. For example, many
Amazon EC2 metrics publish "InstanceId" as a
dimension name, and the actual instance ID as
the value for that dimension.
You can assign up to 30 dimensions to a metric.
* **Name** *(string) --*
The name of the dimension. Dimension names
must contain only ASCII characters, must
include at least one non-whitespace
character, and cannot start with a colon (
":"). ASCII control characters are not
supported as part of dimension names.
* **Value** *(string) --*
The value of the dimension. Dimension values
must contain only ASCII characters and must
include at least one non-whitespace
character. ASCII control characters are not
supported as part of dimension values.
* **MetricName** *(string) --*
The name of the metric.
* **AccountId** *(string) --*
Amazon Web Services account ID.
CloudWatchApplicationSignals / Paginator /
ListServiceLevelObjectiveExclusionWindows
ListServiceLevelObjectiveExclusionWindows
*****************************************
class CloudWatchApplicationSignals.Paginator.ListServiceLevelObjectiveExclusionWindows
paginator = client.get_paginator('list_service_level_objective_exclusion_windows')
paginate(**kwargs)
Creates an iterator that will paginate through responses from "
CloudWatchApplicationSignals.Client.list_service_level_objectiv
e_exclusion_windows()".
See also: AWS API Documentation
**Request Syntax**
response_iterator = paginator.paginate(
Id='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
Parameters:
* **Id** (*string*) --
**[REQUIRED]**
The ID of the SLO to list exclusion windows for.
* **PaginationConfig** (*dict*) --
A dictionary that provides parameters to control
pagination.
* **MaxItems** *(integer) --*
The total number of items to return. If the total number
of items available is more than the value specified in
max-items then a "NextToken" will be provided in the
output that you can use to resume pagination.
* **PageSize** *(integer) --*
The size of each page.
* **StartingToken** *(string) --*
A token to specify where to start paginating. This is the
"NextToken" from a previous response.
Return type:
dict
Returns:
**Response Syntax**
{
'ExclusionWindows': [
{
'Window': {
'DurationUnit': 'MINUTE'|'HOUR'|'DAY'|'MONTH',
'Duration': 123
},
'StartTime': datetime(2015, 1, 1),
'RecurrenceRule': {
'Expression': 'string'
},
'Reason': 'string'
},
],
}
**Response Structure**
* *(dict) --*
* **ExclusionWindows** *(list) --*
A list of exclusion windows configured for the SLO.
* *(dict) --*
The core SLO time window exclusion object that includes
Window, StartTime, RecurrenceRule, and Reason.
* **Window** *(dict) --*
The SLO time window exclusion .
* **DurationUnit** *(string) --*
The unit of time for the exclusion window duration.
Valid values: MINUTE, HOUR, DAY, MONTH.
* **Duration** *(integer) --*
The number of time units for the exclusion window
length.
* **StartTime** *(datetime) --*
The start of the SLO time window exclusion. Defaults
to current time if not specified.
* **RecurrenceRule** *(dict) --*
The recurrence rule for the SLO time window
exclusion. Supports both cron and rate expressions.
* **Expression** *(string) --*
A cron or rate expression that specifies the
schedule for the exclusion window.
* **Reason** *(string) --*
A description explaining why this time period should
be excluded from SLO calculations.
CloudWatchApplicationSignals / Paginator / ListServiceLevelObjectives
ListServiceLevelObjectives
**************************
class CloudWatchApplicationSignals.Paginator.ListServiceLevelObjectives
paginator = client.get_paginator('list_service_level_objectives')
paginate(**kwargs)
Creates an iterator that will paginate through responses from "
CloudWatchApplicationSignals.Client.list_service_level_objectiv
es()".
See also: AWS API Documentation
**Request Syntax**
response_iterator = paginator.paginate(
KeyAttributes={
'string': 'string'
},
OperationName='string',
DependencyConfig={
'DependencyKeyAttributes': {
'string': 'string'
},
'DependencyOperationName': 'string'
},
MetricSourceTypes=[
'ServiceOperation'|'CloudWatchMetric'|'ServiceDependency',
],
IncludeLinkedAccounts=True|False,
SloOwnerAwsAccountId='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
Parameters:
* **KeyAttributes** (*dict*) --
You can use this optional field to specify which services
you want to retrieve SLO information for.
This is a string-to-string map. It can include the
following fields.
* "Type" designates the type of object this is.
* "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.
* *(string) --*
* *(string) --*
* **OperationName** (*string*) -- The name of the operation
that this SLO is associated with.
* **DependencyConfig** (*dict*) --
Identifies the dependency using the
"DependencyKeyAttributes" and "DependencyOperationName".
* **DependencyKeyAttributes** *(dict) --* **[REQUIRED]**
This is a string-to-string map. It can include the
following fields.
* "Type" designates the type of object this is.
* "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.
* *(string) --*
* *(string) --*
* **DependencyOperationName** *(string) --* **[REQUIRED]**
The name of the called operation in the dependency.
* **MetricSourceTypes** (*list*) --
Use this optional field to only include SLOs with the
specified metric source types in the output. Supported
types are:
* Service operation
* Service dependency
* CloudWatch metric
* *(string) --*
* **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.
"
* **SloOwnerAwsAccountId** (*string*) -- SLO's Amazon Web
Services account ID.
* **PaginationConfig** (*dict*) --
A dictionary that provides parameters to control
pagination.
* **MaxItems** *(integer) --*
The total number of items to return. If the total number
of items available is more than the value specified in
max-items then a "NextToken" will be provided in the
output that you can use to resume pagination.
* **PageSize** *(integer) --*
The size of each page.
* **StartingToken** *(string) --*
A token to specify where to start paginating. This is the
"NextToken" from a previous response.
Return type:
dict
Returns:
**Response Syntax**
{
'SloSummaries': [
{
'Arn': 'string',
'Name': 'string',
'KeyAttributes': {
'string': 'string'
},
'OperationName': 'string',
'DependencyConfig': {
'DependencyKeyAttributes': {
'string': 'string'
},
'DependencyOperationName': 'string'
},
'CreatedTime': datetime(2015, 1, 1),
'EvaluationType': 'PeriodBased'|'RequestBased',
'MetricSourceType': 'ServiceOperation'|'CloudWatchMetric'|'ServiceDependency'
},
],
}
**Response Structure**
* *(dict) --*
* **SloSummaries** *(list) --*
An array of structures, where each structure contains
information about one SLO.
* *(dict) --*
A structure that contains information about one service
level objective (SLO) created in Application Signals.
* **Arn** *(string) --*
The ARN of this service level objective.
* **Name** *(string) --*
The name of the service level objective.
* **KeyAttributes** *(dict) --*
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.
* *(string) --*
* *(string) --*
* **OperationName** *(string) --*
If this service level objective is specific to a
single operation, this field displays the name of
that operation.
* **DependencyConfig** *(dict) --*
Identifies the dependency using the
"DependencyKeyAttributes" and
"DependencyOperationName".
* **DependencyKeyAttributes** *(dict) --*
This is a string-to-string map. It can include the
following fields.
* "Type" designates the type of object this is.
* "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.
* *(string) --*
* *(string) --*
* **DependencyOperationName** *(string) --*
The name of the called operation in the dependency.
* **CreatedTime** *(datetime) --*
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.
* **EvaluationType** *(string) --*
Displays whether this is a period-based SLO or a
request-based SLO.
* **MetricSourceType** *(string) --*
Displays the SLI metric source type for this SLO.
Supported types are:
* Service operation
* Service dependency
* CloudWatch metric
CloudWatchApplicationSignals / Paginator / ListServiceOperations
ListServiceOperations
*********************
class CloudWatchApplicationSignals.Paginator.ListServiceOperations
paginator = client.get_paginator('list_service_operations')
paginate(**kwargs)
Creates an iterator that will paginate through responses from
"CloudWatchApplicationSignals.Client.list_service_operations()".
See also: AWS API Documentation
**Request Syntax**
response_iterator = paginator.paginate(
StartTime=datetime(2015, 1, 1),
EndTime=datetime(2015, 1, 1),
KeyAttributes={
'string': 'string'
},
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
Parameters:
* **StartTime** (*datetime*) --
**[REQUIRED]**
The start of the time period to retrieve information about.
When used in a raw HTTP Query API, it is formatted as be
epoch time in seconds. For example: "1698778057"
Your requested start time will be rounded to the nearest
hour.
* **EndTime** (*datetime*) --
**[REQUIRED]**
The end of the time period to retrieve information about.
When used in a raw HTTP Query API, it is formatted as be
epoch time in seconds. For example: "1698778057"
Your requested end time will be rounded to the nearest
hour.
* **KeyAttributes** (*dict*) --
**[REQUIRED]**
Use this field to specify which service you want to
retrieve information for. You must specify at least the
"Type", "Name", and "Environment" attributes.
This is a string-to-string map. It can include the
following fields.
* "Type" designates the type of object this is.
* "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.
* *(string) --*
* *(string) --*
* **PaginationConfig** (*dict*) --
A dictionary that provides parameters to control
pagination.
* **MaxItems** *(integer) --*
The total number of items to return. If the total number
of items available is more than the value specified in
max-items then a "NextToken" will be provided in the
output that you can use to resume pagination.
* **PageSize** *(integer) --*
The size of each page.
* **StartingToken** *(string) --*
A token to specify where to start paginating. This is the
"NextToken" from a previous response.
Return type:
dict
Returns:
**Response Syntax**
{
'StartTime': datetime(2015, 1, 1),
'EndTime': datetime(2015, 1, 1),
'ServiceOperations': [
{
'Name': 'string',
'MetricReferences': [
{
'Namespace': 'string',
'MetricType': 'string',
'Dimensions': [
{
'Name': 'string',
'Value': 'string'
},
],
'MetricName': 'string',
'AccountId': 'string'
},
]
},
],
}
**Response Structure**
* *(dict) --*
* **StartTime** *(datetime) --*
The start of the time period that the returned
information applies to. When used in a raw HTTP Query
API, it is formatted as be epoch time in seconds. For
example: "1698778057"
This displays the time that Application Signals used for
the request. It might not match your request exactly,
because it was rounded to the nearest hour.
* **EndTime** *(datetime) --*
The end of the time period that the returned information
applies to. When used in a raw HTTP Query API, it is
formatted as be epoch time in seconds. For example:
"1698778057"
This displays the time that Application Signals used for
the request. It might not match your request exactly,
because it was rounded to the nearest hour.
* **ServiceOperations** *(list) --*
An array of structures that each contain information
about one operation of this service.
* *(dict) --*
This structure contains information about an operation
discovered by Application Signals. An operation is a
specific function performed by a service that was
discovered by Application Signals, and is often an API
that is called by an upstream dependent.
* **Name** *(string) --*
The name of the operation, discovered by Application
Signals.
* **MetricReferences** *(list) --*
An array of structures that each contain information
about one metric associated with this service
operation that was discovered by Application Signals.
* *(dict) --*
This structure contains information about one
CloudWatch metric associated with this entity
discovered by Application Signals.
* **Namespace** *(string) --*
The namespace of the metric. For more
information, see CloudWatchNamespaces.
* **MetricType** *(string) --*
Used to display the appropriate statistics in the
CloudWatch console.
* **Dimensions** *(list) --*
An array of one or more dimensions that further
define the metric. For more information, see
CloudWatchDimensions.
* *(dict) --*
A dimension is a name/value pair that is part
of the identity of a metric. Because dimensions
are part of the unique identifier for a metric,
whenever you add a unique name/value pair to
one of your metrics, you are creating a new
variation of that metric. For example, many
Amazon EC2 metrics publish "InstanceId" as a
dimension name, and the actual instance ID as
the value for that dimension.
You can assign up to 30 dimensions to a metric.
* **Name** *(string) --*
The name of the dimension. Dimension names
must contain only ASCII characters, must
include at least one non-whitespace
character, and cannot start with a colon (
":"). ASCII control characters are not
supported as part of dimension names.
* **Value** *(string) --*
The value of the dimension. Dimension values
must contain only ASCII characters and must
include at least one non-whitespace
character. ASCII control characters are not
supported as part of dimension values.
* **MetricName** *(string) --*
The name of the metric.
* **AccountId** *(string) --*
Amazon Web Services account ID.
CloudWatchApplicationSignals / Client / get_paginator
get_paginator
*************
CloudWatchApplicationSignals.Client.get_paginator(operation_name)
Create a paginator for an operation.
Parameters:
**operation_name** (*string*) -- The operation name. This is
the same name as the method name on the client. For example, if
the method name is "create_foo", and you'd normally invoke the
operation as "client.create_foo(**kwargs)", if the "create_foo"
operation can be paginated, you can use the call
"client.get_paginator("create_foo")".
Raises:
**OperationNotPageableError** -- Raised if the operation is not
pageable. You can use the "client.can_paginate" method to check
if an operation is pageable.
Return type:
"botocore.paginate.Paginator"
Returns:
A paginator object.
CloudWatchApplicationSignals / Client / can_paginate
can_paginate
************
CloudWatchApplicationSignals.Client.can_paginate(operation_name)
Check if an operation can be paginated.
Parameters:
**operation_name** (*string*) -- The operation name. This is
the same name as the method name on the client. For example, if
the method name is "create_foo", and you'd normally invoke the
operation as "client.create_foo(**kwargs)", if the "create_foo"
operation can be paginated, you can use the call
"client.get_paginator("create_foo")".
Returns:
"True" if the operation can be paginated, "False" otherwise.
CloudWatchApplicationSignals / Client / list_services
list_services
*************
CloudWatchApplicationSignals.Client.list_services(**kwargs)
Returns a list of services that have been discovered by Application
Signals. A service represents a minimum logical and transactional
unit that completes a business function. Services are discovered
through Application Signals instrumentation.
See also: AWS API Documentation
**Request Syntax**
response = client.list_services(
StartTime=datetime(2015, 1, 1),
EndTime=datetime(2015, 1, 1),
MaxResults=123,
NextToken='string',
IncludeLinkedAccounts=True|False,
AwsAccountId='string'
)
Parameters:
* **StartTime** (*datetime*) --
**[REQUIRED]**
The start of the time period to retrieve information about.
When used in a raw HTTP Query API, it is formatted as be epoch
time in seconds. For example: "1698778057"
Your requested start time will be rounded to the nearest hour.
* **EndTime** (*datetime*) --
**[REQUIRED]**
The end of the time period to retrieve information about. When
used in a raw HTTP Query API, it is formatted as be epoch time
in seconds. For example: "1698778057"
Your requested start time will be rounded to the nearest hour.
* **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
services.
* **IncludeLinkedAccounts** (*boolean*) -- If you are using this
operation in a monitoring account, specify "true" to include
services from source accounts in the returned data. ""
* **AwsAccountId** (*string*) -- Amazon Web Services Account ID.
Return type:
dict
Returns:
**Response Syntax**
{
'StartTime': datetime(2015, 1, 1),
'EndTime': datetime(2015, 1, 1),
'ServiceSummaries': [
{
'KeyAttributes': {
'string': 'string'
},
'AttributeMaps': [
{
'string': 'string'
},
],
'MetricReferences': [
{
'Namespace': 'string',
'MetricType': 'string',
'Dimensions': [
{
'Name': 'string',
'Value': 'string'
},
],
'MetricName': 'string',
'AccountId': 'string'
},
]
},
],
'NextToken': 'string'
}
**Response Structure**
* *(dict) --*
* **StartTime** *(datetime) --*
The start of the time period that the returned information
applies to. When used in a raw HTTP Query API, it is
formatted as be epoch time in seconds. For example:
"1698778057"
This displays the time that Application Signals used for the
request. It might not match your request exactly, because it
was rounded to the nearest hour.
* **EndTime** *(datetime) --*
The end of the time period that the returned information
applies to. When used in a raw HTTP Query API, it is
formatted as be epoch time in seconds. For example:
"1698778057"
This displays the time that Application Signals used for the
request. It might not match your request exactly, because it
was rounded to the nearest hour.
* **ServiceSummaries** *(list) --*
An array of structures, where each structure contains some
information about a service. To get complete information
about a service, use GetService.
* *(dict) --*
This structure contains information about one of your
services that was discovered by Application Signals
* **KeyAttributes** *(dict) --*
This is a string-to-string map that help identify the
objects discovered by Application Signals. It can
include the following fields.
* "Type" designates the type of object this is.
* "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.
* *(string) --*
* *(string) --*
* **AttributeMaps** *(list) --*
This structure contains one or more string-to-string
maps that help identify this service. It can include
*platform attributes*, *application attributes*, and
*telemetry attributes*.
Platform attributes contain information the service's
platform.
* "PlatformType" defines the hosted-in platform.
* "EKS.Cluster" is the name of the Amazon EKS cluster.
* "K8s.Cluster" is the name of the self-hosted
Kubernetes cluster.
* "K8s.Namespace" is the name of the Kubernetes
namespace in either Amazon EKS or Kubernetes clusters.
* "K8s.Workload" is the name of the Kubernetes workload
in either Amazon EKS or Kubernetes clusters.
* "K8s.Node" is the name of the Kubernetes node in
either Amazon EKS or Kubernetes clusters.
* "K8s.Pod" is the name of the Kubernetes pod in either
Amazon EKS or Kubernetes clusters.
* "EC2.AutoScalingGroup" is the name of the Amazon EC2
Auto Scaling group.
* "EC2.InstanceId" is the ID of the Amazon EC2 instance.
* "Host" is the name of the host, for all platform
types.
Application attributes contain information about the
application.
* "AWS.Application" is the application's name in Amazon
Web Services Service Catalog AppRegistry.
* "AWS.Application.ARN" is the application's ARN in
Amazon Web Services Service Catalog AppRegistry.
Telemetry attributes contain telemetry information.
* "Telemetry.SDK" is the fingerprint of the
OpenTelemetry SDK version for instrumented services.
* "Telemetry.Agent" is the fingerprint of the agent used
to collect and send telemetry data.
* "Telemetry.Source" Specifies the point of application
where the telemetry was collected or specifies what
was used for the source of telemetry data.
* *(dict) --*
* *(string) --*
* *(string) --*
* **MetricReferences** *(list) --*
An array of structures that each contain information
about one metric associated with this service.
* *(dict) --*
This structure contains information about one
CloudWatch metric associated with this entity
discovered by Application Signals.
* **Namespace** *(string) --*
The namespace of the metric. For more information,
see CloudWatchNamespaces.
* **MetricType** *(string) --*
Used to display the appropriate statistics in the
CloudWatch console.
* **Dimensions** *(list) --*
An array of one or more dimensions that further
define the metric. For more information, see
CloudWatchDimensions.
* *(dict) --*
A dimension is a name/value pair that is part of
the identity of a metric. Because dimensions are
part of the unique identifier for a metric,
whenever you add a unique name/value pair to one
of your metrics, you are creating a new variation
of that metric. For example, many Amazon EC2
metrics publish "InstanceId" as a dimension name,
and the actual instance ID as the value for that
dimension.
You can assign up to 30 dimensions to a metric.
* **Name** *(string) --*
The name of the dimension. Dimension names must
contain only ASCII characters, must include at
least one non-whitespace character, and cannot
start with a colon ( ":"). ASCII control
characters are not supported as part of
dimension names.
* **Value** *(string) --*
The value of the dimension. Dimension values
must contain only ASCII characters and must
include at least one non-whitespace character.
ASCII control characters are not supported as
part of dimension values.
* **MetricName** *(string) --*
The name of the metric.
* **AccountId** *(string) --*
Amazon Web Services account ID.
* **NextToken** *(string) --*
Include this value in your next use of this API to get next
set of services.
**Exceptions**
* "CloudWatchApplicationSignals.Client.exceptions.ValidationExcept
ion"
* "CloudWatchApplicationSignals.Client.exceptions.ThrottlingExcept
ion"
CloudWatchApplicationSignals / Client / batch_update_exclusion_windows
batch_update_exclusion_windows
******************************
CloudWatchApplicationSignals.Client.batch_update_exclusion_windows(**kwargs)
Add or remove time window exclusions for one or more Service Level
Objectives (SLOs).
See also: AWS API Documentation
**Request Syntax**
response = client.batch_update_exclusion_windows(
SloIds=[
'string',
],
AddExclusionWindows=[
{
'Window': {
'DurationUnit': 'MINUTE'|'HOUR'|'DAY'|'MONTH',
'Duration': 123
},
'StartTime': datetime(2015, 1, 1),
'RecurrenceRule': {
'Expression': 'string'
},
'Reason': 'string'
},
],
RemoveExclusionWindows=[
{
'Window': {
'DurationUnit': 'MINUTE'|'HOUR'|'DAY'|'MONTH',
'Duration': 123
},
'StartTime': datetime(2015, 1, 1),
'RecurrenceRule': {
'Expression': 'string'
},
'Reason': 'string'
},
]
)
Parameters:
* **SloIds** (*list*) --
**[REQUIRED]**
The list of SLO IDs to add or remove exclusion windows from.
* *(string) --*
* **AddExclusionWindows** (*list*) --
A list of exclusion windows to add to the specified SLOs. You
can add up to 10 exclusion windows per SLO.
* *(dict) --*
The core SLO time window exclusion object that includes
Window, StartTime, RecurrenceRule, and Reason.
* **Window** *(dict) --* **[REQUIRED]**
The SLO time window exclusion .
* **DurationUnit** *(string) --* **[REQUIRED]**
The unit of time for the exclusion window duration.
Valid values: MINUTE, HOUR, DAY, MONTH.
* **Duration** *(integer) --* **[REQUIRED]**
The number of time units for the exclusion window
length.
* **StartTime** *(datetime) --*
The start of the SLO time window exclusion. Defaults to
current time if not specified.
* **RecurrenceRule** *(dict) --*
The recurrence rule for the SLO time window exclusion.
Supports both cron and rate expressions.
* **Expression** *(string) --* **[REQUIRED]**
A cron or rate expression that specifies the schedule
for the exclusion window.
* **Reason** *(string) --*
A description explaining why this time period should be
excluded from SLO calculations.
* **RemoveExclusionWindows** (*list*) --
A list of exclusion windows to remove from the specified SLOs.
The window configuration must match an existing exclusion
window.
* *(dict) --*
The core SLO time window exclusion object that includes
Window, StartTime, RecurrenceRule, and Reason.
* **Window** *(dict) --* **[REQUIRED]**
The SLO time window exclusion .
* **DurationUnit** *(string) --* **[REQUIRED]**
The unit of time for the exclusion window duration.
Valid values: MINUTE, HOUR, DAY, MONTH.
* **Duration** *(integer) --* **[REQUIRED]**
The number of time units for the exclusion window
length.
* **StartTime** *(datetime) --*
The start of the SLO time window exclusion. Defaults to
current time if not specified.
* **RecurrenceRule** *(dict) --*
The recurrence rule for the SLO time window exclusion.
Supports both cron and rate expressions.
* **Expression** *(string) --* **[REQUIRED]**
A cron or rate expression that specifies the schedule
for the exclusion window.
* **Reason** *(string) --*
A description explaining why this time period should be
excluded from SLO calculations.
Return type:
dict
Returns:
**Response Syntax**
{
'SloIds': [
'string',
],
'Errors': [
{
'SloId': 'string',
'ErrorCode': 'string',
'ErrorMessage': 'string'
},
]
}
**Response Structure**
* *(dict) --*
* **SloIds** *(list) --*
The list of SLO IDs that were successfully processed.
* *(string) --*
* **Errors** *(list) --*
A list of errors that occurred while processing the request.
* *(dict) --*
An array of structures, where each structure includes an
error indicating that one of the requests in the array was
not valid.
* **SloId** *(string) --*
The SLO ID in the error.
* **ErrorCode** *(string) --*
The error code.
* **ErrorMessage** *(string) --*
The error message.
**Exceptions**
* "CloudWatchApplicationSignals.Client.exceptions.ValidationExcept
ion"
* "CloudWatchApplicationSignals.Client.exceptions.ResourceNotFound
Exception"
* "CloudWatchApplicationSignals.Client.exceptions.ThrottlingExcept
ion"
CloudWatchApplicationSignals / Client / list_tags_for_resource
list_tags_for_resource
**********************
CloudWatchApplicationSignals.Client.list_tags_for_resource(**kwargs)
Displays the tags associated with a CloudWatch resource. Tags can
be assigned to service level objectives.
See also: AWS API Documentation
**Request Syntax**
response = client.list_tags_for_resource(
ResourceArn='string'
)
Parameters:
**ResourceArn** (*string*) --
**[REQUIRED]**
The Amazon Resource Name (ARN) of the CloudWatch resource that
you want to view tags for.
The ARN format of an Application Signals SLO is
"arn:aws:cloudwatch:Region:account-id:slo:slo-name"
For more information about ARN format, see Resource Types
Defined by Amazon CloudWatch in the *Amazon Web Services General
Reference*.
Return type:
dict
Returns:
**Response Syntax**
{
'Tags': [
{
'Key': 'string',
'Value': 'string'
},
]
}
**Response Structure**
* *(dict) --*
* **Tags** *(list) --*
The list of tag keys and values associated with the resource
you specified.
* *(dict) --*
A key-value pair associated with a resource. Tags can help
you organize and categorize your resources.
* **Key** *(string) --*
A string that you can use to assign a value. The
combination of tag keys and values can help you organize
and categorize your resources.
* **Value** *(string) --*
The value for the specified tag key.
**Exceptions**
* "CloudWatchApplicationSignals.Client.exceptions.ResourceNotFound
Exception"
* "CloudWatchApplicationSignals.Client.exceptions.ThrottlingExcept
ion"
CloudWatchApplicationSignals / Client / untag_resource
untag_resource
**************
CloudWatchApplicationSignals.Client.untag_resource(**kwargs)
Removes one or more tags from the specified resource.
See also: AWS API Documentation
**Request Syntax**
response = client.untag_resource(
ResourceArn='string',
TagKeys=[
'string',
]
)
Parameters:
* **ResourceArn** (*string*) --
**[REQUIRED]**
The Amazon Resource Name (ARN) of the CloudWatch resource that
you want to delete tags from.
The ARN format of an Application Signals SLO is
"arn:aws:cloudwatch:Region:account-id:slo:slo-name"
For more information about ARN format, see Resource Types
Defined by Amazon CloudWatch in the *Amazon Web Services
General Reference*.
* **TagKeys** (*list*) --
**[REQUIRED]**
The list of tag keys to remove from the resource.
* *(string) --*
Return type:
dict
Returns:
**Response Syntax**
{}
**Response Structure**
* *(dict) --*
**Exceptions**
* "CloudWatchApplicationSignals.Client.exceptions.ResourceNotFound
Exception"
* "CloudWatchApplicationSignals.Client.exceptions.ThrottlingExcept
ion"
CloudWatchApplicationSignals / Client / list_service_operations
list_service_operations
***********************
CloudWatchApplicationSignals.Client.list_service_operations(**kwargs)
Returns a list of the *operations* of this service that have been
discovered by Application Signals. Only the operations that were
invoked during the specified time range are returned.
See also: AWS API Documentation
**Request Syntax**
response = client.list_service_operations(
StartTime=datetime(2015, 1, 1),
EndTime=datetime(2015, 1, 1),
KeyAttributes={
'string': 'string'
},
MaxResults=123,
NextToken='string'
)
Parameters:
* **StartTime** (*datetime*) --
**[REQUIRED]**
The start of the time period to retrieve information about.
When used in a raw HTTP Query API, it is formatted as be epoch
time in seconds. For example: "1698778057"
Your requested start time will be rounded to the nearest hour.
* **EndTime** (*datetime*) --
**[REQUIRED]**
The end of the time period to retrieve information about. When
used in a raw HTTP Query API, it is formatted as be epoch time
in seconds. For example: "1698778057"
Your requested end time will be rounded to the nearest hour.
* **KeyAttributes** (*dict*) --
**[REQUIRED]**
Use this field to specify which service you want to retrieve
information for. You must specify at least the "Type", "Name",
and "Environment" attributes.
This is a string-to-string map. It can include the following
fields.
* "Type" designates the type of object this is.
* "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.
* *(string) --*
* *(string) --*
* **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 operations.
Return type:
dict
Returns:
**Response Syntax**
{
'StartTime': datetime(2015, 1, 1),
'EndTime': datetime(2015, 1, 1),
'ServiceOperations': [
{
'Name': 'string',
'MetricReferences': [
{
'Namespace': 'string',
'MetricType': 'string',
'Dimensions': [
{
'Name': 'string',
'Value': 'string'
},
],
'MetricName': 'string',
'AccountId': 'string'
},
]
},
],
'NextToken': 'string'
}
**Response Structure**
* *(dict) --*
* **StartTime** *(datetime) --*
The start of the time period that the returned information
applies to. When used in a raw HTTP Query API, it is
formatted as be epoch time in seconds. For example:
"1698778057"
This displays the time that Application Signals used for the
request. It might not match your request exactly, because it
was rounded to the nearest hour.
* **EndTime** *(datetime) --*
The end of the time period that the returned information
applies to. When used in a raw HTTP Query API, it is
formatted as be epoch time in seconds. For example:
"1698778057"
This displays the time that Application Signals used for the
request. It might not match your request exactly, because it
was rounded to the nearest hour.
* **ServiceOperations** *(list) --*
An array of structures that each contain information about
one operation of this service.
* *(dict) --*
This structure contains information about an operation
discovered by Application Signals. An operation is a
specific function performed by a service that was
discovered by Application Signals, and is often an API
that is called by an upstream dependent.
* **Name** *(string) --*
The name of the operation, discovered by Application
Signals.
* **MetricReferences** *(list) --*
An array of structures that each contain information
about one metric associated with this service operation
that was discovered by Application Signals.
* *(dict) --*
This structure contains information about one
CloudWatch metric associated with this entity
discovered by Application Signals.
* **Namespace** *(string) --*
The namespace of the metric. For more information,
see CloudWatchNamespaces.
* **MetricType** *(string) --*
Used to display the appropriate statistics in the
CloudWatch console.
* **Dimensions** *(list) --*
An array of one or more dimensions that further
define the metric. For more information, see
CloudWatchDimensions.
* *(dict) --*
A dimension is a name/value pair that is part of
the identity of a metric. Because dimensions are
part of the unique identifier for a metric,
whenever you add a unique name/value pair to one
of your metrics, you are creating a new variation
of that metric. For example, many Amazon EC2
metrics publish "InstanceId" as a dimension name,
and the actual instance ID as the value for that
dimension.
You can assign up to 30 dimensions to a metric.
* **Name** *(string) --*
The name of the dimension. Dimension names must
contain only ASCII characters, must include at
least one non-whitespace character, and cannot
start with a colon ( ":"). ASCII control
characters are not supported as part of
dimension names.
* **Value** *(string) --*
The value of the dimension. Dimension values
must contain only ASCII characters and must
include at least one non-whitespace character.
ASCII control characters are not supported as
part of dimension values.
* **MetricName** *(string) --*
The name of the metric.
* **AccountId** *(string) --*
Amazon Web Services account ID.
* **NextToken** *(string) --*
Include this value in your next use of this API to get next
set of service operations.
**Exceptions**
* "CloudWatchApplicationSignals.Client.exceptions.ValidationExcept
ion"
* "CloudWatchApplicationSignals.Client.exceptions.ThrottlingExcept
ion"
CloudWatchApplicationSignals / Client /
batch_get_service_level_objective_budget_report
batch_get_service_level_objective_budget_report
***********************************************
CloudWatchApplicationSignals.Client.batch_get_service_level_objective_budget_report(**kwargs)
Use this operation to retrieve one or more *service level objective
(SLO) budget reports*.
An *error budget* is the amount of time or requests in an unhealthy
state that your service can accumulate during an interval before
your overall SLO budget health is breached and the SLO is
considered to be unmet. For example, an SLO with a threshold of
99.95% and a monthly interval translates to an error budget of 21.9
minutes of downtime in a 30-day month.
Budget reports include a health indicator, the attainment value,
and remaining budget.
For more information about SLO error budgets, see SLO concepts.
See also: AWS API Documentation
**Request Syntax**
response = client.batch_get_service_level_objective_budget_report(
Timestamp=datetime(2015, 1, 1),
SloIds=[
'string',
]
)
Parameters:
* **Timestamp** (*datetime*) --
**[REQUIRED]**
The date and time that you want the report to be for. It is
expressed as the number of milliseconds since Jan 1, 1970
00:00:00 UTC.
* **SloIds** (*list*) --
**[REQUIRED]**
An array containing the IDs of the service level objectives
that you want to include in the report.
* *(string) --*
Return type:
dict
Returns:
**Response Syntax**
{
'Timestamp': datetime(2015, 1, 1),
'Reports': [
{
'Arn': 'string',
'Name': 'string',
'EvaluationType': 'PeriodBased'|'RequestBased',
'BudgetStatus': 'OK'|'WARNING'|'BREACHED'|'INSUFFICIENT_DATA',
'Attainment': 123.0,
'TotalBudgetSeconds': 123,
'BudgetSecondsRemaining': 123,
'TotalBudgetRequests': 123,
'BudgetRequestsRemaining': 123,
'Sli': {
'SliMetric': {
'KeyAttributes': {
'string': 'string'
},
'OperationName': 'string',
'MetricType': 'LATENCY'|'AVAILABILITY',
'MetricDataQueries': [
{
'Id': 'string',
'MetricStat': {
'Metric': {
'Namespace': 'string',
'MetricName': 'string',
'Dimensions': [
{
'Name': 'string',
'Value': 'string'
},
]
},
'Period': 123,
'Stat': 'string',
'Unit': 'Microseconds'|'Milliseconds'|'Seconds'|'Bytes'|'Kilobytes'|'Megabytes'|'Gigabytes'|'Terabytes'|'Bits'|'Kilobits'|'Megabits'|'Gigabits'|'Terabits'|'Percent'|'Count'|'Bytes/Second'|'Kilobytes/Second'|'Megabytes/Second'|'Gigabytes/Second'|'Terabytes/Second'|'Bits/Second'|'Kilobits/Second'|'Megabits/Second'|'Gigabits/Second'|'Terabits/Second'|'Count/Second'|'None'
},
'Expression': 'string',
'Label': 'string',
'ReturnData': True|False,
'Period': 123,
'AccountId': 'string'
},
],
'DependencyConfig': {
'DependencyKeyAttributes': {
'string': 'string'
},
'DependencyOperationName': 'string'
}
},
'MetricThreshold': 123.0,
'ComparisonOperator': 'GreaterThanOrEqualTo'|'GreaterThan'|'LessThan'|'LessThanOrEqualTo'
},
'RequestBasedSli': {
'RequestBasedSliMetric': {
'KeyAttributes': {
'string': 'string'
},
'OperationName': 'string',
'MetricType': 'LATENCY'|'AVAILABILITY',
'TotalRequestCountMetric': [
{
'Id': 'string',
'MetricStat': {
'Metric': {
'Namespace': 'string',
'MetricName': 'string',
'Dimensions': [
{
'Name': 'string',
'Value': 'string'
},
]
},
'Period': 123,
'Stat': 'string',
'Unit': 'Microseconds'|'Milliseconds'|'Seconds'|'Bytes'|'Kilobytes'|'Megabytes'|'Gigabytes'|'Terabytes'|'Bits'|'Kilobits'|'Megabits'|'Gigabits'|'Terabits'|'Percent'|'Count'|'Bytes/Second'|'Kilobytes/Second'|'Megabytes/Second'|'Gigabytes/Second'|'Terabytes/Second'|'Bits/Second'|'Kilobits/Second'|'Megabits/Second'|'Gigabits/Second'|'Terabits/Second'|'Count/Second'|'None'
},
'Expression': 'string',
'Label': 'string',
'ReturnData': True|False,
'Period': 123,
'AccountId': 'string'
},
],
'MonitoredRequestCountMetric': {
'GoodCountMetric': [
{
'Id': 'string',
'MetricStat': {
'Metric': {
'Namespace': 'string',
'MetricName': 'string',
'Dimensions': [
{
'Name': 'string',
'Value': 'string'
},
]
},
'Period': 123,
'Stat': 'string',
'Unit': 'Microseconds'|'Milliseconds'|'Seconds'|'Bytes'|'Kilobytes'|'Megabytes'|'Gigabytes'|'Terabytes'|'Bits'|'Kilobits'|'Megabits'|'Gigabits'|'Terabits'|'Percent'|'Count'|'Bytes/Second'|'Kilobytes/Second'|'Megabytes/Second'|'Gigabytes/Second'|'Terabytes/Second'|'Bits/Second'|'Kilobits/Second'|'Megabits/Second'|'Gigabits/Second'|'Terabits/Second'|'Count/Second'|'None'
},
'Expression': 'string',
'Label': 'string',
'ReturnData': True|False,
'Period': 123,
'AccountId': 'string'
},
],
'BadCountMetric': [
{
'Id': 'string',
'MetricStat': {
'Metric': {
'Namespace': 'string',
'MetricName': 'string',
'Dimensions': [
{
'Name': 'string',
'Value': 'string'
},
]
},
'Period': 123,
'Stat': 'string',
'Unit': 'Microseconds'|'Milliseconds'|'Seconds'|'Bytes'|'Kilobytes'|'Megabytes'|'Gigabytes'|'Terabytes'|'Bits'|'Kilobits'|'Megabits'|'Gigabits'|'Terabits'|'Percent'|'Count'|'Bytes/Second'|'Kilobytes/Second'|'Megabytes/Second'|'Gigabytes/Second'|'Terabytes/Second'|'Bits/Second'|'Kilobits/Second'|'Megabits/Second'|'Gigabits/Second'|'Terabits/Second'|'Count/Second'|'None'
},
'Expression': 'string',
'Label': 'string',
'ReturnData': True|False,
'Period': 123,
'AccountId': 'string'
},
]
},
'DependencyConfig': {
'DependencyKeyAttributes': {
'string': 'string'
},
'DependencyOperationName': 'string'
}
},
'MetricThreshold': 123.0,
'ComparisonOperator': 'GreaterThanOrEqualTo'|'GreaterThan'|'LessThan'|'LessThanOrEqualTo'
},
'Goal': {
'Interval': {
'RollingInterval': {
'DurationUnit': 'MINUTE'|'HOUR'|'DAY'|'MONTH',
'Duration': 123
},
'CalendarInterval': {
'StartTime': datetime(2015, 1, 1),
'DurationUnit': 'MINUTE'|'HOUR'|'DAY'|'MONTH',
'Duration': 123
}
},
'AttainmentGoal': 123.0,
'WarningThreshold': 123.0
}
},
],
'Errors': [
{
'Name': 'string',
'Arn': 'string',
'ErrorCode': 'string',
'ErrorMessage': 'string'
},
]
}
**Response Structure**
* *(dict) --*
* **Timestamp** *(datetime) --*
The date and time that the report is for. It is expressed as
the number of milliseconds since Jan 1, 1970 00:00:00 UTC.
* **Reports** *(list) --*
An array of structures, where each structure is one budget
report.
* *(dict) --*
A structure containing an SLO budget report that you have
requested.
* **Arn** *(string) --*
The ARN of the SLO that this report is for.
* **Name** *(string) --*
The name of the SLO that this report is for.
* **EvaluationType** *(string) --*
Displays whether this budget report is for a period-
based SLO or a request-based SLO.
* **BudgetStatus** *(string) --*
The status of this SLO, as it relates to the error
budget for the entire time interval.
* "OK" means that the SLO had remaining budget above the
warning threshold, as of the time that you specified
in "TimeStamp".
* "WARNING" means that the SLO's remaining budget was
below the warning threshold, as of the time that you
specified in "TimeStamp".
* "BREACHED" means that the SLO's budget was exhausted,
as of the time that you specified in "TimeStamp".
* "INSUFFICIENT_DATA" means that the specified start and
end times were before the SLO was created, or that
attainment data is missing.
* **Attainment** *(float) --*
A number between 0 and 100 that represents the success
percentage of your application compared to the goal set
by the SLO.
If this is a period-based SLO, the number is the
percentage of time periods that the service has attained
the SLO's attainment goal, as of the time of the
request.
If this is a request-based SLO, the number is the number
of successful requests divided by the number of total
requests, multiplied by 100, during the time range that
you specified in your request.
* **TotalBudgetSeconds** *(integer) --*
The total number of seconds in the error budget for the
interval. This field is included only if the SLO is a
period-based SLO.
* **BudgetSecondsRemaining** *(integer) --*
The budget amount remaining before the SLO status
becomes "BREACHING", at the time specified in the
"Timestemp" parameter of the request. If this value is
negative, then the SLO is already in "BREACHING" status.
This field is included only if the SLO is a period-based
SLO.
* **TotalBudgetRequests** *(integer) --*
This field is displayed only for request-based SLOs. It
displays the total number of failed requests that can be
tolerated during the time range between the start of the
interval and the time stamp supplied in the budget
report request. It is based on the total number of
requests that occurred, and the percentage specified in
the attainment goal. If the number of failed requests
matches this number or is higher, then this SLO is
currently breaching.
This number can go up and down between reports with
different time stamps, based on both how many total
requests occur.
* **BudgetRequestsRemaining** *(integer) --*
This field is displayed only for request-based SLOs. It
displays the number of failed requests that can be
tolerated before any more successful requests occur, and
still have the application meet its SLO goal.
This number can go up and down between different
reports, based on both how many successful requests and
how many failed requests occur in that time.
* **Sli** *(dict) --*
A structure that contains information about the
performance metric that this SLO monitors.
* **SliMetric** *(dict) --*
A structure that contains information about the metric
that the SLO monitors.
* **KeyAttributes** *(dict) --*
This is a string-to-string map that contains
information about the type of object that this SLO
is related to. It can include the following fields.
* "Type" designates the type of object that this SLO
is related to.
* "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.
* *(string) --*
* *(string) --*
* **OperationName** *(string) --*
If the SLO monitors a specific operation of the
service, this field displays that operation name.
* **MetricType** *(string) --*
If the SLO monitors either the "LATENCY" or
"AVAILABILITY" metric that Application Signals
collects, this field displays which of those metrics
is used.
* **MetricDataQueries** *(list) --*
If this SLO monitors a CloudWatch metric or the
result of a CloudWatch metric math expression, this
structure includes the information about that metric
or expression.
* *(dict) --*
Use this structure to define a metric or metric
math expression that you want to use as for a
service level objective.
Each "MetricDataQuery" in the "MetricDataQueries"
array specifies either a metric to retrieve, or a
metric math expression to be performed on
retrieved metrics. A single "MetricDataQueries"
array can include as many as 20 "MetricDataQuery"
structures in the array. The 20 structures can
include as many as 10 structures that contain a
"MetricStat" parameter to retrieve a metric, and
as many as 10 structures that contain the
"Expression" parameter to perform a math
expression. Of those "Expression" structures,
exactly one must have true as the value for
"ReturnData". The result of this expression used
for the SLO.
For more information about metric math
expressions, see CloudWatchUse metric math.
Within each "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but
not both.
* **Id** *(string) --*
A short name used to tie this object to the
results in the response. This "Id" must be
unique within a "MetricDataQueries" array. If
you are performing math expressions on this set
of data, this name represents that data and can
serve as a variable in the metric math
expression. The valid characters are letters,
numbers, and underscore. The first character
must be a lowercase letter.
* **MetricStat** *(dict) --*
A metric to be used directly for the SLO, or to
be used in the math expression that will be used
for the SLO.
Within one "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but
not both.
* **Metric** *(dict) --*
The metric to use as the service level
indicator, including the metric name,
namespace, and dimensions.
* **Namespace** *(string) --*
The namespace of the metric. For more
information, see Namespaces.
* **MetricName** *(string) --*
The name of the metric to use.
* **Dimensions** *(list) --*
An array of one or more dimensions to use to
define the metric that you want to use. For
more information, see Dimensions.
* *(dict) --*
A dimension is a name/value pair that is
part of the identity of a metric. Because
dimensions are part of the unique
identifier for a metric, whenever you add
a unique name/value pair to one of your
metrics, you are creating a new variation
of that metric. For example, many Amazon
EC2 metrics publish "InstanceId" as a
dimension name, and the actual instance ID
as the value for that dimension.
You can assign up to 30 dimensions to a
metric.
* **Name** *(string) --*
The name of the dimension. Dimension
names must contain only ASCII
characters, must include at least one
non-whitespace character, and cannot
start with a colon ( ":"). ASCII control
characters are not supported as part of
dimension names.
* **Value** *(string) --*
The value of the dimension. Dimension
values must contain only ASCII
characters and must include at least one
non-whitespace character. ASCII control
characters are not supported as part of
dimension values.
* **Period** *(integer) --*
The granularity, in seconds, to be used for
the metric. For metrics with regular
resolution, a period can be as short as one
minute (60 seconds) and must be a multiple of
60. For high-resolution metrics that are
collected at intervals of less than one
minute, the period can be 1, 5, 10, 30, 60, or
any multiple of 60. High-resolution metrics
are those metrics stored by a "PutMetricData"
call that includes a "StorageResolution" of 1
second.
* **Stat** *(string) --*
The statistic to use for comparison to the
threshold. It can be any CloudWatch statistic
or extended statistic. For more information
about statistics, see CloudWatch statistics
definitions.
* **Unit** *(string) --*
If you omit "Unit" then all data that was
collected with any unit is returned, along
with the corresponding units that were
specified when the data was reported to
CloudWatch. If you specify a unit, the
operation returns only data that was collected
with that unit specified. If you specify a
unit that does not match the data collected,
the results of the operation are null.
CloudWatch does not perform unit conversions.
* **Expression** *(string) --*
This field can contain a metric math expression
to be performed on the other metrics that you
are retrieving within this "MetricDataQueries"
structure.
A math expression can use the "Id" of the other
metrics or queries to refer to those metrics,
and can also use the "Id" of other expressions
to use the result of those expressions. For more
information about metric math expressions, see
Metric Math Syntax and Functions in the *Amazon
CloudWatch User Guide*.
Within each "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but
not both.
* **Label** *(string) --*
A human-readable label for this metric or
expression. This is especially useful if this is
an expression, so that you know what the value
represents. If the metric or expression is shown
in a CloudWatch dashboard widget, the label is
shown. If "Label" is omitted, CloudWatch
generates a default.
You can put dynamic expressions into a label, so
that it is more descriptive. For more
information, see Using Dynamic Labels.
* **ReturnData** *(boolean) --*
Use this only if you are using a metric math
expression for the SLO. Specify "true" for
"ReturnData" for only the one expression result
to use as the alarm. For all other metrics and
expressions in the same
"CreateServiceLevelObjective" operation, specify
"ReturnData" as "false".
* **Period** *(integer) --*
The granularity, in seconds, of the returned
data points for this metric. For metrics with
regular resolution, a period can be as short as
one minute (60 seconds) and must be a multiple
of 60. For high-resolution metrics that are
collected at intervals of less than one minute,
the period can be 1, 5, 10, 30, 60, or any
multiple of 60. High-resolution metrics are
those metrics stored by a "PutMetricData" call
that includes a "StorageResolution" of 1 second.
If the "StartTime" parameter specifies a time
stamp that is greater than 3 hours ago, you must
specify the period as follows or no data points
in that time range is returned:
* Start time between 3 hours and 15 days ago -
Use a multiple of 60 seconds (1 minute).
* Start time between 15 and 63 days ago - Use a
multiple of 300 seconds (5 minutes).
* Start time greater than 63 days ago - Use a
multiple of 3600 seconds (1 hour).
* **AccountId** *(string) --*
The ID of the account where this metric is
located. If you are performing this operation in
a monitoring account, use this to specify which
source account to retrieve this metric from.
* **DependencyConfig** *(dict) --*
Identifies the dependency using the
"DependencyKeyAttributes" and
"DependencyOperationName".
* **DependencyKeyAttributes** *(dict) --*
This is a string-to-string map. It can include the
following fields.
* "Type" designates the type of object this is.
* "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.
* *(string) --*
* *(string) --*
* **DependencyOperationName** *(string) --*
The name of the called operation in the
dependency.
* **MetricThreshold** *(float) --*
The value that the SLI metric is compared to.
* **ComparisonOperator** *(string) --*
The arithmetic operation used when comparing the
specified metric to the threshold.
* **RequestBasedSli** *(dict) --*
This structure contains information about the
performance metric that a request-based SLO monitors.
* **RequestBasedSliMetric** *(dict) --*
A structure that contains information about the metric
that the SLO monitors.
* **KeyAttributes** *(dict) --*
This is a string-to-string map that contains
information about the type of object that this SLO
is related to. It can include the following fields.
* "Type" designates the type of object that this SLO
is related to.
* "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.
* *(string) --*
* *(string) --*
* **OperationName** *(string) --*
If the SLO monitors a specific operation of the
service, this field displays that operation name.
* **MetricType** *(string) --*
If the SLO monitors either the "LATENCY" or
"AVAILABILITY" metric that Application Signals
collects, this field displays which of those metrics
is used.
* **TotalRequestCountMetric** *(list) --*
This structure defines the metric that is used as
the "total requests" number for a request-based SLO.
The number observed for this metric is divided by
the number of "good requests" or "bad requests" that
is observed for the metric defined in
"MonitoredRequestCountMetric".
* *(dict) --*
Use this structure to define a metric or metric
math expression that you want to use as for a
service level objective.
Each "MetricDataQuery" in the "MetricDataQueries"
array specifies either a metric to retrieve, or a
metric math expression to be performed on
retrieved metrics. A single "MetricDataQueries"
array can include as many as 20 "MetricDataQuery"
structures in the array. The 20 structures can
include as many as 10 structures that contain a
"MetricStat" parameter to retrieve a metric, and
as many as 10 structures that contain the
"Expression" parameter to perform a math
expression. Of those "Expression" structures,
exactly one must have true as the value for
"ReturnData". The result of this expression used
for the SLO.
For more information about metric math
expressions, see CloudWatchUse metric math.
Within each "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but
not both.
* **Id** *(string) --*
A short name used to tie this object to the
results in the response. This "Id" must be
unique within a "MetricDataQueries" array. If
you are performing math expressions on this set
of data, this name represents that data and can
serve as a variable in the metric math
expression. The valid characters are letters,
numbers, and underscore. The first character
must be a lowercase letter.
* **MetricStat** *(dict) --*
A metric to be used directly for the SLO, or to
be used in the math expression that will be used
for the SLO.
Within one "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but
not both.
* **Metric** *(dict) --*
The metric to use as the service level
indicator, including the metric name,
namespace, and dimensions.
* **Namespace** *(string) --*
The namespace of the metric. For more
information, see Namespaces.
* **MetricName** *(string) --*
The name of the metric to use.
* **Dimensions** *(list) --*
An array of one or more dimensions to use to
define the metric that you want to use. For
more information, see Dimensions.
* *(dict) --*
A dimension is a name/value pair that is
part of the identity of a metric. Because
dimensions are part of the unique
identifier for a metric, whenever you add
a unique name/value pair to one of your
metrics, you are creating a new variation
of that metric. For example, many Amazon
EC2 metrics publish "InstanceId" as a
dimension name, and the actual instance ID
as the value for that dimension.
You can assign up to 30 dimensions to a
metric.
* **Name** *(string) --*
The name of the dimension. Dimension
names must contain only ASCII
characters, must include at least one
non-whitespace character, and cannot
start with a colon ( ":"). ASCII control
characters are not supported as part of
dimension names.
* **Value** *(string) --*
The value of the dimension. Dimension
values must contain only ASCII
characters and must include at least one
non-whitespace character. ASCII control
characters are not supported as part of
dimension values.
* **Period** *(integer) --*
The granularity, in seconds, to be used for
the metric. For metrics with regular
resolution, a period can be as short as one
minute (60 seconds) and must be a multiple of
60. For high-resolution metrics that are
collected at intervals of less than one
minute, the period can be 1, 5, 10, 30, 60, or
any multiple of 60. High-resolution metrics
are those metrics stored by a "PutMetricData"
call that includes a "StorageResolution" of 1
second.
* **Stat** *(string) --*
The statistic to use for comparison to the
threshold. It can be any CloudWatch statistic
or extended statistic. For more information
about statistics, see CloudWatch statistics
definitions.
* **Unit** *(string) --*
If you omit "Unit" then all data that was
collected with any unit is returned, along
with the corresponding units that were
specified when the data was reported to
CloudWatch. If you specify a unit, the
operation returns only data that was collected
with that unit specified. If you specify a
unit that does not match the data collected,
the results of the operation are null.
CloudWatch does not perform unit conversions.
* **Expression** *(string) --*
This field can contain a metric math expression
to be performed on the other metrics that you
are retrieving within this "MetricDataQueries"
structure.
A math expression can use the "Id" of the other
metrics or queries to refer to those metrics,
and can also use the "Id" of other expressions
to use the result of those expressions. For more
information about metric math expressions, see
Metric Math Syntax and Functions in the *Amazon
CloudWatch User Guide*.
Within each "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but
not both.
* **Label** *(string) --*
A human-readable label for this metric or
expression. This is especially useful if this is
an expression, so that you know what the value
represents. If the metric or expression is shown
in a CloudWatch dashboard widget, the label is
shown. If "Label" is omitted, CloudWatch
generates a default.
You can put dynamic expressions into a label, so
that it is more descriptive. For more
information, see Using Dynamic Labels.
* **ReturnData** *(boolean) --*
Use this only if you are using a metric math
expression for the SLO. Specify "true" for
"ReturnData" for only the one expression result
to use as the alarm. For all other metrics and
expressions in the same
"CreateServiceLevelObjective" operation, specify
"ReturnData" as "false".
* **Period** *(integer) --*
The granularity, in seconds, of the returned
data points for this metric. For metrics with
regular resolution, a period can be as short as
one minute (60 seconds) and must be a multiple
of 60. For high-resolution metrics that are
collected at intervals of less than one minute,
the period can be 1, 5, 10, 30, 60, or any
multiple of 60. High-resolution metrics are
those metrics stored by a "PutMetricData" call
that includes a "StorageResolution" of 1 second.
If the "StartTime" parameter specifies a time
stamp that is greater than 3 hours ago, you must
specify the period as follows or no data points
in that time range is returned:
* Start time between 3 hours and 15 days ago -
Use a multiple of 60 seconds (1 minute).
* Start time between 15 and 63 days ago - Use a
multiple of 300 seconds (5 minutes).
* Start time greater than 63 days ago - Use a
multiple of 3600 seconds (1 hour).
* **AccountId** *(string) --*
The ID of the account where this metric is
located. If you are performing this operation in
a monitoring account, use this to specify which
source account to retrieve this metric from.
* **MonitoredRequestCountMetric** *(dict) --*
This structure defines the metric that is used as
the "good request" or "bad request" value for a
request-based SLO. This value observed for the
metric defined in "TotalRequestCountMetric" is
divided by the number found for
"MonitoredRequestCountMetric" to determine the
percentage of successful requests that this SLO
tracks.
Note:
This is a Tagged Union structure. Only one of the
following top level keys will be set:
"GoodCountMetric", "BadCountMetric". If a
client receives an unknown member it will set
"SDK_UNKNOWN_MEMBER" as the top level key,
which maps to the name or tag of the unknown
member. The structure of "SDK_UNKNOWN_MEMBER" is
as follows:
'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
* **GoodCountMetric** *(list) --*
If you want to count "good requests" to determine
the percentage of successful requests for this
request-based SLO, specify the metric to use as
"good requests" in this structure.
* *(dict) --*
Use this structure to define a metric or metric
math expression that you want to use as for a
service level objective.
Each "MetricDataQuery" in the
"MetricDataQueries" array specifies either a
metric to retrieve, or a metric math expression
to be performed on retrieved metrics. A single
"MetricDataQueries" array can include as many as
20 "MetricDataQuery" structures in the array.
The 20 structures can include as many as 10
structures that contain a "MetricStat" parameter
to retrieve a metric, and as many as 10
structures that contain the "Expression"
parameter to perform a math expression. Of those
"Expression" structures, exactly one must have
true as the value for "ReturnData". The result
of this expression used for the SLO.
For more information about metric math
expressions, see CloudWatchUse metric math.
Within each "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but
not both.
* **Id** *(string) --*
A short name used to tie this object to the
results in the response. This "Id" must be
unique within a "MetricDataQueries" array. If
you are performing math expressions on this
set of data, this name represents that data
and can serve as a variable in the metric math
expression. The valid characters are letters,
numbers, and underscore. The first character
must be a lowercase letter.
* **MetricStat** *(dict) --*
A metric to be used directly for the SLO, or
to be used in the math expression that will be
used for the SLO.
Within one "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat"
but not both.
* **Metric** *(dict) --*
The metric to use as the service level
indicator, including the metric name,
namespace, and dimensions.
* **Namespace** *(string) --*
The namespace of the metric. For more
information, see Namespaces.
* **MetricName** *(string) --*
The name of the metric to use.
* **Dimensions** *(list) --*
An array of one or more dimensions to use
to define the metric that you want to use.
For more information, see Dimensions.
* *(dict) --*
A dimension is a name/value pair that is
part of the identity of a metric.
Because dimensions are part of the
unique identifier for a metric, whenever
you add a unique name/value pair to one
of your metrics, you are creating a new
variation of that metric. For example,
many Amazon EC2 metrics publish
"InstanceId" as a dimension name, and
the actual instance ID as the value for
that dimension.
You can assign up to 30 dimensions to a
metric.
* **Name** *(string) --*
The name of the dimension. Dimension
names must contain only ASCII
characters, must include at least one
non-whitespace character, and cannot
start with a colon ( ":"). ASCII
control characters are not supported
as part of dimension names.
* **Value** *(string) --*
The value of the dimension. Dimension
values must contain only ASCII
characters and must include at least
one non-whitespace character. ASCII
control characters are not supported
as part of dimension values.
* **Period** *(integer) --*
The granularity, in seconds, to be used for
the metric. For metrics with regular
resolution, a period can be as short as one
minute (60 seconds) and must be a multiple
of 60. For high-resolution metrics that are
collected at intervals of less than one
minute, the period can be 1, 5, 10, 30, 60,
or any multiple of 60. High-resolution
metrics are those metrics stored by a
"PutMetricData" call that includes a
"StorageResolution" of 1 second.
* **Stat** *(string) --*
The statistic to use for comparison to the
threshold. It can be any CloudWatch
statistic or extended statistic. For more
information about statistics, see CloudWatch
statistics definitions.
* **Unit** *(string) --*
If you omit "Unit" then all data that was
collected with any unit is returned, along
with the corresponding units that were
specified when the data was reported to
CloudWatch. If you specify a unit, the
operation returns only data that was
collected with that unit specified. If you
specify a unit that does not match the data
collected, the results of the operation are
null. CloudWatch does not perform unit
conversions.
* **Expression** *(string) --*
This field can contain a metric math
expression to be performed on the other
metrics that you are retrieving within this
"MetricDataQueries" structure.
A math expression can use the "Id" of the
other metrics or queries to refer to those
metrics, and can also use the "Id" of other
expressions to use the result of those
expressions. For more information about metric
math expressions, see Metric Math Syntax and
Functions in the *Amazon CloudWatch User
Guide*.
Within each "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat"
but not both.
* **Label** *(string) --*
A human-readable label for this metric or
expression. This is especially useful if this
is an expression, so that you know what the
value represents. If the metric or expression
is shown in a CloudWatch dashboard widget, the
label is shown. If "Label" is omitted,
CloudWatch generates a default.
You can put dynamic expressions into a label,
so that it is more descriptive. For more
information, see Using Dynamic Labels.
* **ReturnData** *(boolean) --*
Use this only if you are using a metric math
expression for the SLO. Specify "true" for
"ReturnData" for only the one expression
result to use as the alarm. For all other
metrics and expressions in the same
"CreateServiceLevelObjective" operation,
specify "ReturnData" as "false".
* **Period** *(integer) --*
The granularity, in seconds, of the returned
data points for this metric. For metrics with
regular resolution, a period can be as short
as one minute (60 seconds) and must be a
multiple of 60. For high-resolution metrics
that are collected at intervals of less than
one minute, the period can be 1, 5, 10, 30,
60, or any multiple of 60. High-resolution
metrics are those metrics stored by a
"PutMetricData" call that includes a
"StorageResolution" of 1 second.
If the "StartTime" parameter specifies a time
stamp that is greater than 3 hours ago, you
must specify the period as follows or no data
points in that time range is returned:
* Start time between 3 hours and 15 days ago -
Use a multiple of 60 seconds (1 minute).
* Start time between 15 and 63 days ago - Use
a multiple of 300 seconds (5 minutes).
* Start time greater than 63 days ago - Use a
multiple of 3600 seconds (1 hour).
* **AccountId** *(string) --*
The ID of the account where this metric is
located. If you are performing this operation
in a monitoring account, use this to specify
which source account to retrieve this metric
from.
* **BadCountMetric** *(list) --*
If you want to count "bad requests" to determine
the percentage of successful requests for this
request-based SLO, specify the metric to use as
"bad requests" in this structure.
* *(dict) --*
Use this structure to define a metric or metric
math expression that you want to use as for a
service level objective.
Each "MetricDataQuery" in the
"MetricDataQueries" array specifies either a
metric to retrieve, or a metric math expression
to be performed on retrieved metrics. A single
"MetricDataQueries" array can include as many as
20 "MetricDataQuery" structures in the array.
The 20 structures can include as many as 10
structures that contain a "MetricStat" parameter
to retrieve a metric, and as many as 10
structures that contain the "Expression"
parameter to perform a math expression. Of those
"Expression" structures, exactly one must have
true as the value for "ReturnData". The result
of this expression used for the SLO.
For more information about metric math
expressions, see CloudWatchUse metric math.
Within each "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but
not both.
* **Id** *(string) --*
A short name used to tie this object to the
results in the response. This "Id" must be
unique within a "MetricDataQueries" array. If
you are performing math expressions on this
set of data, this name represents that data
and can serve as a variable in the metric math
expression. The valid characters are letters,
numbers, and underscore. The first character
must be a lowercase letter.
* **MetricStat** *(dict) --*
A metric to be used directly for the SLO, or
to be used in the math expression that will be
used for the SLO.
Within one "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat"
but not both.
* **Metric** *(dict) --*
The metric to use as the service level
indicator, including the metric name,
namespace, and dimensions.
* **Namespace** *(string) --*
The namespace of the metric. For more
information, see Namespaces.
* **MetricName** *(string) --*
The name of the metric to use.
* **Dimensions** *(list) --*
An array of one or more dimensions to use
to define the metric that you want to use.
For more information, see Dimensions.
* *(dict) --*
A dimension is a name/value pair that is
part of the identity of a metric.
Because dimensions are part of the
unique identifier for a metric, whenever
you add a unique name/value pair to one
of your metrics, you are creating a new
variation of that metric. For example,
many Amazon EC2 metrics publish
"InstanceId" as a dimension name, and
the actual instance ID as the value for
that dimension.
You can assign up to 30 dimensions to a
metric.
* **Name** *(string) --*
The name of the dimension. Dimension
names must contain only ASCII
characters, must include at least one
non-whitespace character, and cannot
start with a colon ( ":"). ASCII
control characters are not supported
as part of dimension names.
* **Value** *(string) --*
The value of the dimension. Dimension
values must contain only ASCII
characters and must include at least
one non-whitespace character. ASCII
control characters are not supported
as part of dimension values.
* **Period** *(integer) --*
The granularity, in seconds, to be used for
the metric. For metrics with regular
resolution, a period can be as short as one
minute (60 seconds) and must be a multiple
of 60. For high-resolution metrics that are
collected at intervals of less than one
minute, the period can be 1, 5, 10, 30, 60,
or any multiple of 60. High-resolution
metrics are those metrics stored by a
"PutMetricData" call that includes a
"StorageResolution" of 1 second.
* **Stat** *(string) --*
The statistic to use for comparison to the
threshold. It can be any CloudWatch
statistic or extended statistic. For more
information about statistics, see CloudWatch
statistics definitions.
* **Unit** *(string) --*
If you omit "Unit" then all data that was
collected with any unit is returned, along
with the corresponding units that were
specified when the data was reported to
CloudWatch. If you specify a unit, the
operation returns only data that was
collected with that unit specified. If you
specify a unit that does not match the data
collected, the results of the operation are
null. CloudWatch does not perform unit
conversions.
* **Expression** *(string) --*
This field can contain a metric math
expression to be performed on the other
metrics that you are retrieving within this
"MetricDataQueries" structure.
A math expression can use the "Id" of the
other metrics or queries to refer to those
metrics, and can also use the "Id" of other
expressions to use the result of those
expressions. For more information about metric
math expressions, see Metric Math Syntax and
Functions in the *Amazon CloudWatch User
Guide*.
Within each "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat"
but not both.
* **Label** *(string) --*
A human-readable label for this metric or
expression. This is especially useful if this
is an expression, so that you know what the
value represents. If the metric or expression
is shown in a CloudWatch dashboard widget, the
label is shown. If "Label" is omitted,
CloudWatch generates a default.
You can put dynamic expressions into a label,
so that it is more descriptive. For more
information, see Using Dynamic Labels.
* **ReturnData** *(boolean) --*
Use this only if you are using a metric math
expression for the SLO. Specify "true" for
"ReturnData" for only the one expression
result to use as the alarm. For all other
metrics and expressions in the same
"CreateServiceLevelObjective" operation,
specify "ReturnData" as "false".
* **Period** *(integer) --*
The granularity, in seconds, of the returned
data points for this metric. For metrics with
regular resolution, a period can be as short
as one minute (60 seconds) and must be a
multiple of 60. For high-resolution metrics
that are collected at intervals of less than
one minute, the period can be 1, 5, 10, 30,
60, or any multiple of 60. High-resolution
metrics are those metrics stored by a
"PutMetricData" call that includes a
"StorageResolution" of 1 second.
If the "StartTime" parameter specifies a time
stamp that is greater than 3 hours ago, you
must specify the period as follows or no data
points in that time range is returned:
* Start time between 3 hours and 15 days ago -
Use a multiple of 60 seconds (1 minute).
* Start time between 15 and 63 days ago - Use
a multiple of 300 seconds (5 minutes).
* Start time greater than 63 days ago - Use a
multiple of 3600 seconds (1 hour).
* **AccountId** *(string) --*
The ID of the account where this metric is
located. If you are performing this operation
in a monitoring account, use this to specify
which source account to retrieve this metric
from.
* **DependencyConfig** *(dict) --*
Identifies the dependency using the
"DependencyKeyAttributes" and
"DependencyOperationName".
* **DependencyKeyAttributes** *(dict) --*
This is a string-to-string map. It can include the
following fields.
* "Type" designates the type of object this is.
* "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.
* *(string) --*
* *(string) --*
* **DependencyOperationName** *(string) --*
The name of the called operation in the
dependency.
* **MetricThreshold** *(float) --*
This value is the threshold that the observed metric
values of the SLI metric are compared to.
* **ComparisonOperator** *(string) --*
The arithmetic operation used when comparing the
specified metric to the threshold.
* **Goal** *(dict) --*
This structure contains the attributes that determine
the goal of an SLO. This includes the time period for
evaluation and the attainment threshold.
* **Interval** *(dict) --*
The time period used to evaluate the SLO. It can be
either a calendar interval or rolling interval.
If you omit this parameter, a rolling interval of 7
days is used.
Note:
This is a Tagged Union structure. Only one of the
following top level keys will be set:
"RollingInterval", "CalendarInterval". If a
client receives an unknown member it will set
"SDK_UNKNOWN_MEMBER" as the top level key, which
maps to the name or tag of the unknown member.
The structure of "SDK_UNKNOWN_MEMBER" is as
follows:
'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
* **RollingInterval** *(dict) --*
If the interval is a rolling interval, this
structure contains the interval specifications.
* **DurationUnit** *(string) --*
Specifies the rolling interval unit.
* **Duration** *(integer) --*
Specifies the duration of each rolling interval.
For example, if "Duration" is "7" and
"DurationUnit" is "DAY", each rolling interval is
seven days.
* **CalendarInterval** *(dict) --*
If the interval is a calendar interval, this
structure contains the interval specifications.
* **StartTime** *(datetime) --*
The date and time when you want the first interval
to start. Be sure to choose a time that configures
the intervals the way that you want. For example,
if you want weekly intervals starting on Mondays
at 6 a.m., be sure to specify a start time that is
a Monday at 6 a.m.
When used in a raw HTTP Query API, it is formatted
as be epoch time in seconds. For example:
"1698778057"
As soon as one calendar interval ends, another
automatically begins.
* **DurationUnit** *(string) --*
Specifies the calendar interval unit.
* **Duration** *(integer) --*
Specifies the duration of each calendar interval.
For example, if "Duration" is "1" and
"DurationUnit" is "MONTH", each interval is one
month, aligned with the calendar.
* **AttainmentGoal** *(float) --*
The threshold that determines if the goal is being
met.
If this is a period-based SLO, the attainment goal is
the percentage of good periods that meet the threshold
requirements to the total periods within the interval.
For example, an attainment goal of 99.9% means that
within your interval, you are targeting 99.9% of the
periods to be in healthy state.
If this is a request-based SLO, the attainment goal is
the percentage of requests that must be successful to
meet the attainment goal.
If you omit this parameter, 99 is used to represent
99% as the attainment goal.
* **WarningThreshold** *(float) --*
The percentage of remaining budget over total budget
that you want to get warnings for. If you omit this
parameter, the default of 50.0 is used.
* **Errors** *(list) --*
An array of structures, where each structure includes an
error indicating that one of the requests in the array was
not valid.
* *(dict) --*
A structure containing information about one error that
occurred during a
BatchGetServiceLevelObjectiveBudgetReport operation.
* **Name** *(string) --*
The name of the SLO that this error is related to.
* **Arn** *(string) --*
The ARN of the SLO that this error is related to.
* **ErrorCode** *(string) --*
The error code for this error.
* **ErrorMessage** *(string) --*
The message for this error.
**Exceptions**
* "CloudWatchApplicationSignals.Client.exceptions.ValidationExcept
ion"
* "CloudWatchApplicationSignals.Client.exceptions.ThrottlingExcept
ion"
CloudWatchApplicationSignals / Client / list_service_dependencies
list_service_dependencies
*************************
CloudWatchApplicationSignals.Client.list_service_dependencies(**kwargs)
Returns a list of service dependencies of the service that you
specify. A dependency is an infrastructure component that an
operation of this service connects with. Dependencies can include
Amazon Web Services services, Amazon Web Services resources, and
third-party services.
See also: AWS API Documentation
**Request Syntax**
response = client.list_service_dependencies(
StartTime=datetime(2015, 1, 1),
EndTime=datetime(2015, 1, 1),
KeyAttributes={
'string': 'string'
},
MaxResults=123,
NextToken='string'
)
Parameters:
* **StartTime** (*datetime*) --
**[REQUIRED]**
The start of the time period to retrieve information about.
When used in a raw HTTP Query API, it is formatted as be epoch
time in seconds. For example: "1698778057"
Your requested start time will be rounded to the nearest hour.
* **EndTime** (*datetime*) --
**[REQUIRED]**
The end of the time period to retrieve information about. When
used in a raw HTTP Query API, it is formatted as be epoch time
in seconds. For example: "1698778057"
Your requested end time will be rounded to the nearest hour.
* **KeyAttributes** (*dict*) --
**[REQUIRED]**
Use this field to specify which service you want to retrieve
information for. You must specify at least the "Type", "Name",
and "Environment" attributes.
This is a string-to-string map. It can include the following
fields.
* "Type" designates the type of object this is.
* "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.
* *(string) --*
* *(string) --*
* **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 dependencies.
Return type:
dict
Returns:
**Response Syntax**
{
'StartTime': datetime(2015, 1, 1),
'EndTime': datetime(2015, 1, 1),
'ServiceDependencies': [
{
'OperationName': 'string',
'DependencyKeyAttributes': {
'string': 'string'
},
'DependencyOperationName': 'string',
'MetricReferences': [
{
'Namespace': 'string',
'MetricType': 'string',
'Dimensions': [
{
'Name': 'string',
'Value': 'string'
},
],
'MetricName': 'string',
'AccountId': 'string'
},
]
},
],
'NextToken': 'string'
}
**Response Structure**
* *(dict) --*
* **StartTime** *(datetime) --*
The start of the time period that the returned information
applies to. When used in a raw HTTP Query API, it is
formatted as be epoch time in seconds. For example:
"1698778057"
This displays the time that Application Signals used for the
request. It might not match your request exactly, because it
was rounded to the nearest hour.
* **EndTime** *(datetime) --*
The end of the time period that the returned information
applies to. When used in a raw HTTP Query API, it is
formatted as be epoch time in seconds. For example:
"1698778057"
This displays the time that Application Signals used for the
request. It might not match your request exactly, because it
was rounded to the nearest hour.
* **ServiceDependencies** *(list) --*
An array, where each object in the array contains
information about one of the dependencies of this service.
* *(dict) --*
This structure contains information about one dependency
of this service.
* **OperationName** *(string) --*
The name of the operation in this service that calls the
dependency.
* **DependencyKeyAttributes** *(dict) --*
This is a string-to-string map. It can include the
following fields.
* "Type" designates the type of object this is.
* "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.
* *(string) --*
* *(string) --*
* **DependencyOperationName** *(string) --*
The name of the called operation in the dependency.
* **MetricReferences** *(list) --*
An array of structures that each contain information
about one metric associated with this service dependency
that was discovered by Application Signals.
* *(dict) --*
This structure contains information about one
CloudWatch metric associated with this entity
discovered by Application Signals.
* **Namespace** *(string) --*
The namespace of the metric. For more information,
see CloudWatchNamespaces.
* **MetricType** *(string) --*
Used to display the appropriate statistics in the
CloudWatch console.
* **Dimensions** *(list) --*
An array of one or more dimensions that further
define the metric. For more information, see
CloudWatchDimensions.
* *(dict) --*
A dimension is a name/value pair that is part of
the identity of a metric. Because dimensions are
part of the unique identifier for a metric,
whenever you add a unique name/value pair to one
of your metrics, you are creating a new variation
of that metric. For example, many Amazon EC2
metrics publish "InstanceId" as a dimension name,
and the actual instance ID as the value for that
dimension.
You can assign up to 30 dimensions to a metric.
* **Name** *(string) --*
The name of the dimension. Dimension names must
contain only ASCII characters, must include at
least one non-whitespace character, and cannot
start with a colon ( ":"). ASCII control
characters are not supported as part of
dimension names.
* **Value** *(string) --*
The value of the dimension. Dimension values
must contain only ASCII characters and must
include at least one non-whitespace character.
ASCII control characters are not supported as
part of dimension values.
* **MetricName** *(string) --*
The name of the metric.
* **AccountId** *(string) --*
Amazon Web Services account ID.
* **NextToken** *(string) --*
Include this value in your next use of this API to get next
set of service dependencies.
**Exceptions**
* "CloudWatchApplicationSignals.Client.exceptions.ValidationExcept
ion"
* "CloudWatchApplicationSignals.Client.exceptions.ThrottlingExcept
ion"
CloudWatchApplicationSignals / Client / get_waiter
get_waiter
**********
CloudWatchApplicationSignals.Client.get_waiter(waiter_name)
Returns an object that can wait for some condition.
Parameters:
**waiter_name** (*str*) -- The name of the waiter to get. See
the waiters section of the service docs for a list of available
waiters.
Returns:
The specified waiter object.
Return type:
"botocore.waiter.Waiter"
CloudWatchApplicationSignals / Client / delete_service_level_objective
delete_service_level_objective
******************************
CloudWatchApplicationSignals.Client.delete_service_level_objective(**kwargs)
Deletes the specified service level objective.
See also: AWS API Documentation
**Request Syntax**
response = client.delete_service_level_objective(
Id='string'
)
Parameters:
**Id** (*string*) --
**[REQUIRED]**
The ARN or name of the service level objective to delete.
Return type:
dict
Returns:
**Response Syntax**
{}
**Response Structure**
* *(dict) --*
**Exceptions**
* "CloudWatchApplicationSignals.Client.exceptions.ValidationExcept
ion"
* "CloudWatchApplicationSignals.Client.exceptions.ResourceNotFound
Exception"
* "CloudWatchApplicationSignals.Client.exceptions.ThrottlingExcept
ion"
CloudWatchApplicationSignals / Client / list_service_dependents
list_service_dependents
***********************
CloudWatchApplicationSignals.Client.list_service_dependents(**kwargs)
Returns the list of dependents that invoked the specified service
during the provided time range. Dependents include other services,
CloudWatch Synthetics canaries, and clients that are instrumented
with CloudWatch RUM app monitors.
See also: AWS API Documentation
**Request Syntax**
response = client.list_service_dependents(
StartTime=datetime(2015, 1, 1),
EndTime=datetime(2015, 1, 1),
KeyAttributes={
'string': 'string'
},
MaxResults=123,
NextToken='string'
)
Parameters:
* **StartTime** (*datetime*) --
**[REQUIRED]**
The start of the time period to retrieve information about.
When used in a raw HTTP Query API, it is formatted as be epoch
time in seconds. For example: "1698778057"
Your requested start time will be rounded to the nearest hour.
* **EndTime** (*datetime*) --
**[REQUIRED]**
The end of the time period to retrieve information about. When
used in a raw HTTP Query API, it is formatted as be epoch time
in seconds. For example: "1698778057"
Your requested start time will be rounded to the nearest hour.
* **KeyAttributes** (*dict*) --
**[REQUIRED]**
Use this field to specify which service you want to retrieve
information for. You must specify at least the "Type", "Name",
and "Environment" attributes.
This is a string-to-string map. It can include the following
fields.
* "Type" designates the type of object this is.
* "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.
* *(string) --*
* *(string) --*
* **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 dependents.
Return type:
dict
Returns:
**Response Syntax**
{
'StartTime': datetime(2015, 1, 1),
'EndTime': datetime(2015, 1, 1),
'ServiceDependents': [
{
'OperationName': 'string',
'DependentKeyAttributes': {
'string': 'string'
},
'DependentOperationName': 'string',
'MetricReferences': [
{
'Namespace': 'string',
'MetricType': 'string',
'Dimensions': [
{
'Name': 'string',
'Value': 'string'
},
],
'MetricName': 'string',
'AccountId': 'string'
},
]
},
],
'NextToken': 'string'
}
**Response Structure**
* *(dict) --*
* **StartTime** *(datetime) --*
The start of the time period that the returned information
applies to. When used in a raw HTTP Query API, it is
formatted as be epoch time in seconds. For example:
"1698778057"
This displays the time that Application Signals used for the
request. It might not match your request exactly, because it
was rounded to the nearest hour.
* **EndTime** *(datetime) --*
The end of the time period that the returned information
applies to. When used in a raw HTTP Query API, it is
formatted as be epoch time in seconds. For example:
"1698778057"
This displays the time that Application Signals used for the
request. It might not match your request exactly, because it
was rounded to the nearest hour.
* **ServiceDependents** *(list) --*
An array, where each object in the array contains
information about one of the dependents of this service.
* *(dict) --*
This structure contains information about a service
dependent that was discovered by Application Signals. A
dependent is an entity that invoked the specified service
during the provided time range. Dependents include other
services, CloudWatch Synthetics canaries, and clients that
are instrumented with CloudWatch RUM app monitors.
* **OperationName** *(string) --*
If the invoked entity is an operation on an entity, the
name of that dependent operation is displayed here.
* **DependentKeyAttributes** *(dict) --*
This is a string-to-string map. It can include the
following fields.
* "Type" designates the type of object this is.
* "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.
* *(string) --*
* *(string) --*
* **DependentOperationName** *(string) --*
If the dependent invoker was a service that invoked it
from an operation, the name of that dependent operation
is displayed here.
* **MetricReferences** *(list) --*
An array of structures that each contain information
about one metric associated with this service dependent
that was discovered by Application Signals.
* *(dict) --*
This structure contains information about one
CloudWatch metric associated with this entity
discovered by Application Signals.
* **Namespace** *(string) --*
The namespace of the metric. For more information,
see CloudWatchNamespaces.
* **MetricType** *(string) --*
Used to display the appropriate statistics in the
CloudWatch console.
* **Dimensions** *(list) --*
An array of one or more dimensions that further
define the metric. For more information, see
CloudWatchDimensions.
* *(dict) --*
A dimension is a name/value pair that is part of
the identity of a metric. Because dimensions are
part of the unique identifier for a metric,
whenever you add a unique name/value pair to one
of your metrics, you are creating a new variation
of that metric. For example, many Amazon EC2
metrics publish "InstanceId" as a dimension name,
and the actual instance ID as the value for that
dimension.
You can assign up to 30 dimensions to a metric.
* **Name** *(string) --*
The name of the dimension. Dimension names must
contain only ASCII characters, must include at
least one non-whitespace character, and cannot
start with a colon ( ":"). ASCII control
characters are not supported as part of
dimension names.
* **Value** *(string) --*
The value of the dimension. Dimension values
must contain only ASCII characters and must
include at least one non-whitespace character.
ASCII control characters are not supported as
part of dimension values.
* **MetricName** *(string) --*
The name of the metric.
* **AccountId** *(string) --*
Amazon Web Services account ID.
* **NextToken** *(string) --*
Include this value in your next use of this API to get next
set of service dependents.
**Exceptions**
* "CloudWatchApplicationSignals.Client.exceptions.ValidationExcept
ion"
* "CloudWatchApplicationSignals.Client.exceptions.ThrottlingExcept
ion"
CloudWatchApplicationSignals / Client / get_service
get_service
***********
CloudWatchApplicationSignals.Client.get_service(**kwargs)
Returns information about a service discovered by Application
Signals.
See also: AWS API Documentation
**Request Syntax**
response = client.get_service(
StartTime=datetime(2015, 1, 1),
EndTime=datetime(2015, 1, 1),
KeyAttributes={
'string': 'string'
}
)
Parameters:
* **StartTime** (*datetime*) --
**[REQUIRED]**
The start of the time period to retrieve information about.
When used in a raw HTTP Query API, it is formatted as be epoch
time in seconds. For example: "1698778057"
Your requested start time will be rounded to the nearest hour.
* **EndTime** (*datetime*) --
**[REQUIRED]**
The end of the time period to retrieve information about. When
used in a raw HTTP Query API, it is formatted as be epoch time
in seconds. For example: "1698778057"
Your requested start time will be rounded to the nearest hour.
* **KeyAttributes** (*dict*) --
**[REQUIRED]**
Use this field to specify which service you want to retrieve
information for. You must specify at least the "Type", "Name",
and "Environment" attributes.
This is a string-to-string map. It can include the following
fields.
* "Type" designates the type of object this is.
* "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.
* *(string) --*
* *(string) --*
Return type:
dict
Returns:
**Response Syntax**
{
'Service': {
'KeyAttributes': {
'string': 'string'
},
'AttributeMaps': [
{
'string': 'string'
},
],
'MetricReferences': [
{
'Namespace': 'string',
'MetricType': 'string',
'Dimensions': [
{
'Name': 'string',
'Value': 'string'
},
],
'MetricName': 'string',
'AccountId': 'string'
},
],
'LogGroupReferences': [
{
'string': 'string'
},
]
},
'StartTime': datetime(2015, 1, 1),
'EndTime': datetime(2015, 1, 1),
'LogGroupReferences': [
{
'string': 'string'
},
]
}
**Response Structure**
* *(dict) --*
* **Service** *(dict) --*
A structure containing information about the service.
* **KeyAttributes** *(dict) --*
This is a string-to-string map. It can include the
following fields.
* "Type" designates the type of object this is.
* "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.
* *(string) --*
* *(string) --*
* **AttributeMaps** *(list) --*
This structure contains one or more string-to-string maps
that help identify this service. It can include *platform
attributes*, *application attributes*, and *telemetry
attributes*.
Platform attributes contain information the service's
platform.
* "PlatformType" defines the hosted-in platform.
* "EKS.Cluster" is the name of the Amazon EKS cluster.
* "K8s.Cluster" is the name of the self-hosted Kubernetes
cluster.
* "K8s.Namespace" is the name of the Kubernetes namespace
in either Amazon EKS or Kubernetes clusters.
* "K8s.Workload" is the name of the Kubernetes workload in
either Amazon EKS or Kubernetes clusters.
* "K8s.Node" is the name of the Kubernetes node in either
Amazon EKS or Kubernetes clusters.
* "K8s.Pod" is the name of the Kubernetes pod in either
Amazon EKS or Kubernetes clusters.
* "EC2.AutoScalingGroup" is the name of the Amazon EC2
Auto Scaling group.
* "EC2.InstanceId" is the ID of the Amazon EC2 instance.
* "Host" is the name of the host, for all platform types.
Application attributes contain information about the
application.
* "AWS.Application" is the application's name in Amazon
Web Services Service Catalog AppRegistry.
* "AWS.Application.ARN" is the application's ARN in Amazon
Web Services Service Catalog AppRegistry.
Telemetry attributes contain telemetry information.
* "Telemetry.SDK" is the fingerprint of the OpenTelemetry
SDK version for instrumented services.
* "Telemetry.Agent" is the fingerprint of the agent used
to collect and send telemetry data.
* "Telemetry.Source" Specifies the point of application
where the telemetry was collected or specifies what was
used for the source of telemetry data.
* *(dict) --*
* *(string) --*
* *(string) --*
* **MetricReferences** *(list) --*
An array of structures that each contain information about
one metric associated with this service.
* *(dict) --*
This structure contains information about one CloudWatch
metric associated with this entity discovered by
Application Signals.
* **Namespace** *(string) --*
The namespace of the metric. For more information, see
CloudWatchNamespaces.
* **MetricType** *(string) --*
Used to display the appropriate statistics in the
CloudWatch console.
* **Dimensions** *(list) --*
An array of one or more dimensions that further define
the metric. For more information, see
CloudWatchDimensions.
* *(dict) --*
A dimension is a name/value pair that is part of the
identity of a metric. Because dimensions are part of
the unique identifier for a metric, whenever you add
a unique name/value pair to one of your metrics, you
are creating a new variation of that metric. For
example, many Amazon EC2 metrics publish
"InstanceId" as a dimension name, and the actual
instance ID as the value for that dimension.
You can assign up to 30 dimensions to a metric.
* **Name** *(string) --*
The name of the dimension. Dimension names must
contain only ASCII characters, must include at
least one non-whitespace character, and cannot
start with a colon ( ":"). ASCII control
characters are not supported as part of dimension
names.
* **Value** *(string) --*
The value of the dimension. Dimension values must
contain only ASCII characters and must include at
least one non-whitespace character. ASCII control
characters are not supported as part of dimension
values.
* **MetricName** *(string) --*
The name of the metric.
* **AccountId** *(string) --*
Amazon Web Services account ID.
* **LogGroupReferences** *(list) --*
An array of string-to-string maps that each contain
information about one log group associated with this
service. Each string-to-string map includes the following
fields:
* ""Type": "AWS::Resource""
* ""ResourceType": "AWS::Logs::LogGroup""
* ""Identifier": "name-of-log-group""
* *(dict) --*
* *(string) --*
* *(string) --*
* **StartTime** *(datetime) --*
The start time of the data included in the response. In a
raw HTTP Query API, it is formatted as be epoch time in
seconds. For example: "1698778057".
This displays the time that Application Signals used for the
request. It might not match your request exactly, because it
was rounded to the nearest hour.
* **EndTime** *(datetime) --*
The end time of the data included in the response. In a raw
HTTP Query API, it is formatted as be epoch time in seconds.
For example: "1698778057".
This displays the time that Application Signals used for the
request. It might not match your request exactly, because it
was rounded to the nearest hour.
* **LogGroupReferences** *(list) --*
An array of string-to-string maps that each contain
information about one log group associated with this
service. Each string-to-string map includes the following
fields:
* ""Type": "AWS::Resource""
* ""ResourceType": "AWS::Logs::LogGroup""
* ""Identifier": "name-of-log-group""
* *(dict) --*
* *(string) --*
* *(string) --*
**Exceptions**
* "CloudWatchApplicationSignals.Client.exceptions.ValidationExcept
ion"
* "CloudWatchApplicationSignals.Client.exceptions.ThrottlingExcept
ion"
CloudWatchApplicationSignals / Client / update_service_level_objective
update_service_level_objective
******************************
CloudWatchApplicationSignals.Client.update_service_level_objective(**kwargs)
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.
See also: AWS API Documentation
**Request Syntax**
response = client.update_service_level_objective(
Id='string',
Description='string',
SliConfig={
'SliMetricConfig': {
'KeyAttributes': {
'string': 'string'
},
'OperationName': 'string',
'MetricType': 'LATENCY'|'AVAILABILITY',
'Statistic': 'string',
'PeriodSeconds': 123,
'MetricDataQueries': [
{
'Id': 'string',
'MetricStat': {
'Metric': {
'Namespace': 'string',
'MetricName': 'string',
'Dimensions': [
{
'Name': 'string',
'Value': 'string'
},
]
},
'Period': 123,
'Stat': 'string',
'Unit': 'Microseconds'|'Milliseconds'|'Seconds'|'Bytes'|'Kilobytes'|'Megabytes'|'Gigabytes'|'Terabytes'|'Bits'|'Kilobits'|'Megabits'|'Gigabits'|'Terabits'|'Percent'|'Count'|'Bytes/Second'|'Kilobytes/Second'|'Megabytes/Second'|'Gigabytes/Second'|'Terabytes/Second'|'Bits/Second'|'Kilobits/Second'|'Megabits/Second'|'Gigabits/Second'|'Terabits/Second'|'Count/Second'|'None'
},
'Expression': 'string',
'Label': 'string',
'ReturnData': True|False,
'Period': 123,
'AccountId': 'string'
},
],
'DependencyConfig': {
'DependencyKeyAttributes': {
'string': 'string'
},
'DependencyOperationName': 'string'
}
},
'MetricThreshold': 123.0,
'ComparisonOperator': 'GreaterThanOrEqualTo'|'GreaterThan'|'LessThan'|'LessThanOrEqualTo'
},
RequestBasedSliConfig={
'RequestBasedSliMetricConfig': {
'KeyAttributes': {
'string': 'string'
},
'OperationName': 'string',
'MetricType': 'LATENCY'|'AVAILABILITY',
'TotalRequestCountMetric': [
{
'Id': 'string',
'MetricStat': {
'Metric': {
'Namespace': 'string',
'MetricName': 'string',
'Dimensions': [
{
'Name': 'string',
'Value': 'string'
},
]
},
'Period': 123,
'Stat': 'string',
'Unit': 'Microseconds'|'Milliseconds'|'Seconds'|'Bytes'|'Kilobytes'|'Megabytes'|'Gigabytes'|'Terabytes'|'Bits'|'Kilobits'|'Megabits'|'Gigabits'|'Terabits'|'Percent'|'Count'|'Bytes/Second'|'Kilobytes/Second'|'Megabytes/Second'|'Gigabytes/Second'|'Terabytes/Second'|'Bits/Second'|'Kilobits/Second'|'Megabits/Second'|'Gigabits/Second'|'Terabits/Second'|'Count/Second'|'None'
},
'Expression': 'string',
'Label': 'string',
'ReturnData': True|False,
'Period': 123,
'AccountId': 'string'
},
],
'MonitoredRequestCountMetric': {
'GoodCountMetric': [
{
'Id': 'string',
'MetricStat': {
'Metric': {
'Namespace': 'string',
'MetricName': 'string',
'Dimensions': [
{
'Name': 'string',
'Value': 'string'
},
]
},
'Period': 123,
'Stat': 'string',
'Unit': 'Microseconds'|'Milliseconds'|'Seconds'|'Bytes'|'Kilobytes'|'Megabytes'|'Gigabytes'|'Terabytes'|'Bits'|'Kilobits'|'Megabits'|'Gigabits'|'Terabits'|'Percent'|'Count'|'Bytes/Second'|'Kilobytes/Second'|'Megabytes/Second'|'Gigabytes/Second'|'Terabytes/Second'|'Bits/Second'|'Kilobits/Second'|'Megabits/Second'|'Gigabits/Second'|'Terabits/Second'|'Count/Second'|'None'
},
'Expression': 'string',
'Label': 'string',
'ReturnData': True|False,
'Period': 123,
'AccountId': 'string'
},
],
'BadCountMetric': [
{
'Id': 'string',
'MetricStat': {
'Metric': {
'Namespace': 'string',
'MetricName': 'string',
'Dimensions': [
{
'Name': 'string',
'Value': 'string'
},
]
},
'Period': 123,
'Stat': 'string',
'Unit': 'Microseconds'|'Milliseconds'|'Seconds'|'Bytes'|'Kilobytes'|'Megabytes'|'Gigabytes'|'Terabytes'|'Bits'|'Kilobits'|'Megabits'|'Gigabits'|'Terabits'|'Percent'|'Count'|'Bytes/Second'|'Kilobytes/Second'|'Megabytes/Second'|'Gigabytes/Second'|'Terabytes/Second'|'Bits/Second'|'Kilobits/Second'|'Megabits/Second'|'Gigabits/Second'|'Terabits/Second'|'Count/Second'|'None'
},
'Expression': 'string',
'Label': 'string',
'ReturnData': True|False,
'Period': 123,
'AccountId': 'string'
},
]
},
'DependencyConfig': {
'DependencyKeyAttributes': {
'string': 'string'
},
'DependencyOperationName': 'string'
}
},
'MetricThreshold': 123.0,
'ComparisonOperator': 'GreaterThanOrEqualTo'|'GreaterThan'|'LessThan'|'LessThanOrEqualTo'
},
Goal={
'Interval': {
'RollingInterval': {
'DurationUnit': 'MINUTE'|'HOUR'|'DAY'|'MONTH',
'Duration': 123
},
'CalendarInterval': {
'StartTime': datetime(2015, 1, 1),
'DurationUnit': 'MINUTE'|'HOUR'|'DAY'|'MONTH',
'Duration': 123
}
},
'AttainmentGoal': 123.0,
'WarningThreshold': 123.0
},
BurnRateConfigurations=[
{
'LookBackWindowMinutes': 123
},
]
)
Parameters:
* **Id** (*string*) --
**[REQUIRED]**
The Amazon Resource Name (ARN) or name of the service level
objective that you want to update.
* **Description** (*string*) -- An optional description for the
SLO.
* **SliConfig** (*dict*) --
If this SLO is a period-based SLO, this structure defines the
information about what performance metric this SLO will
monitor.
* **SliMetricConfig** *(dict) --* **[REQUIRED]**
Use this structure to specify the metric to be used for the
SLO.
* **KeyAttributes** *(dict) --*
If this SLO is related to a metric collected by
Application Signals, you must use this field to specify
which service the SLO metric is related to. To do so, you
must specify at least the "Type", "Name", and
"Environment" attributes.
This is a string-to-string map. It can include the
following fields.
* "Type" designates the type of object this is.
* "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.
* *(string) --*
* *(string) --*
* **OperationName** *(string) --*
If the SLO is to monitor a specific operation of the
service, use this field to specify the name of that
operation.
* **MetricType** *(string) --*
If the SLO is to monitor either the "LATENCY" or
"AVAILABILITY" metric that Application Signals collects,
use this field to specify which of those metrics is used.
* **Statistic** *(string) --*
The statistic to use for comparison to the threshold. It
can be any CloudWatch statistic or extended statistic. For
more information about statistics, see CloudWatch
statistics definitions.
* **PeriodSeconds** *(integer) --*
The number of seconds to use as the period for SLO
evaluation. Your application's performance is compared to
the SLI during each period. For each period, the
application is determined to have either achieved or not
achieved the necessary performance.
* **MetricDataQueries** *(list) --*
If this SLO monitors a CloudWatch metric or the result of
a CloudWatch metric math expression, use this structure to
specify that metric or expression.
* *(dict) --*
Use this structure to define a metric or metric math
expression that you want to use as for a service level
objective.
Each "MetricDataQuery" in the "MetricDataQueries" array
specifies either a metric to retrieve, or a metric math
expression to be performed on retrieved metrics. A
single "MetricDataQueries" array can include as many as
20 "MetricDataQuery" structures in the array. The 20
structures can include as many as 10 structures that
contain a "MetricStat" parameter to retrieve a metric,
and as many as 10 structures that contain the
"Expression" parameter to perform a math expression. Of
those "Expression" structures, exactly one must have
true as the value for "ReturnData". The result of this
expression used for the SLO.
For more information about metric math expressions, see
CloudWatchUse metric math.
Within each "MetricDataQuery" object, you must specify
either "Expression" or "MetricStat" but not both.
* **Id** *(string) --* **[REQUIRED]**
A short name used to tie this object to the results in
the response. This "Id" must be unique within a
"MetricDataQueries" array. If you are performing math
expressions on this set of data, this name represents
that data and can serve as a variable in the metric
math expression. The valid characters are letters,
numbers, and underscore. The first character must be a
lowercase letter.
* **MetricStat** *(dict) --*
A metric to be used directly for the SLO, or to be
used in the math expression that will be used for the
SLO.
Within one "MetricDataQuery" object, you must specify
either "Expression" or "MetricStat" but not both.
* **Metric** *(dict) --* **[REQUIRED]**
The metric to use as the service level indicator,
including the metric name, namespace, and
dimensions.
* **Namespace** *(string) --*
The namespace of the metric. For more information,
see Namespaces.
* **MetricName** *(string) --*
The name of the metric to use.
* **Dimensions** *(list) --*
An array of one or more dimensions to use to
define the metric that you want to use. For more
information, see Dimensions.
* *(dict) --*
A dimension is a name/value pair that is part of
the identity of a metric. Because dimensions are
part of the unique identifier for a metric,
whenever you add a unique name/value pair to one
of your metrics, you are creating a new
variation of that metric. For example, many
Amazon EC2 metrics publish "InstanceId" as a
dimension name, and the actual instance ID as
the value for that dimension.
You can assign up to 30 dimensions to a metric.
* **Name** *(string) --* **[REQUIRED]**
The name of the dimension. Dimension names
must contain only ASCII characters, must
include at least one non-whitespace character,
and cannot start with a colon ( ":"). ASCII
control characters are not supported as part
of dimension names.
* **Value** *(string) --* **[REQUIRED]**
The value of the dimension. Dimension values
must contain only ASCII characters and must
include at least one non-whitespace character.
ASCII control characters are not supported as
part of dimension values.
* **Period** *(integer) --* **[REQUIRED]**
The granularity, in seconds, to be used for the
metric. For metrics with regular resolution, a
period can be as short as one minute (60 seconds)
and must be a multiple of 60. For high-resolution
metrics that are collected at intervals of less than
one minute, the period can be 1, 5, 10, 30, 60, or
any multiple of 60. High-resolution metrics are
those metrics stored by a "PutMetricData" call that
includes a "StorageResolution" of 1 second.
* **Stat** *(string) --* **[REQUIRED]**
The statistic to use for comparison to the
threshold. It can be any CloudWatch statistic or
extended statistic. For more information about
statistics, see CloudWatch statistics definitions.
* **Unit** *(string) --*
If you omit "Unit" then all data that was collected
with any unit is returned, along with the
corresponding units that were specified when the
data was reported to CloudWatch. If you specify a
unit, the operation returns only data that was
collected with that unit specified. If you specify a
unit that does not match the data collected, the
results of the operation are null. CloudWatch does
not perform unit conversions.
* **Expression** *(string) --*
This field can contain a metric math expression to be
performed on the other metrics that you are retrieving
within this "MetricDataQueries" structure.
A math expression can use the "Id" of the other
metrics or queries to refer to those metrics, and can
also use the "Id" of other expressions to use the
result of those expressions. For more information
about metric math expressions, see Metric Math Syntax
and Functions in the *Amazon CloudWatch User Guide*.
Within each "MetricDataQuery" object, you must specify
either "Expression" or "MetricStat" but not both.
* **Label** *(string) --*
A human-readable label for this metric or expression.
This is especially useful if this is an expression, so
that you know what the value represents. If the metric
or expression is shown in a CloudWatch dashboard
widget, the label is shown. If "Label" is omitted,
CloudWatch generates a default.
You can put dynamic expressions into a label, so that
it is more descriptive. For more information, see
Using Dynamic Labels.
* **ReturnData** *(boolean) --*
Use this only if you are using a metric math
expression for the SLO. Specify "true" for
"ReturnData" for only the one expression result to use
as the alarm. For all other metrics and expressions in
the same "CreateServiceLevelObjective" operation,
specify "ReturnData" as "false".
* **Period** *(integer) --*
The granularity, in seconds, of the returned data
points for this metric. For metrics with regular
resolution, a period can be as short as one minute (60
seconds) and must be a multiple of 60. For high-
resolution metrics that are collected at intervals of
less than one minute, the period can be 1, 5, 10, 30,
60, or any multiple of 60. High-resolution metrics are
those metrics stored by a "PutMetricData" call that
includes a "StorageResolution" of 1 second.
If the "StartTime" parameter specifies a time stamp
that is greater than 3 hours ago, you must specify the
period as follows or no data points in that time range
is returned:
* Start time between 3 hours and 15 days ago - Use a
multiple of 60 seconds (1 minute).
* Start time between 15 and 63 days ago - Use a
multiple of 300 seconds (5 minutes).
* Start time greater than 63 days ago - Use a multiple
of 3600 seconds (1 hour).
* **AccountId** *(string) --*
The ID of the account where this metric is located. If
you are performing this operation in a monitoring
account, use this to specify which source account to
retrieve this metric from.
* **DependencyConfig** *(dict) --*
Identifies the dependency using the
"DependencyKeyAttributes" and "DependencyOperationName".
* **DependencyKeyAttributes** *(dict) --* **[REQUIRED]**
This is a string-to-string map. It can include the
following fields.
* "Type" designates the type of object this is.
* "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.
* *(string) --*
* *(string) --*
* **DependencyOperationName** *(string) --* **[REQUIRED]**
The name of the called operation in the dependency.
* **MetricThreshold** *(float) --* **[REQUIRED]**
This parameter is used only when a request-based SLO tracks
the "Latency" metric. Specify the threshold value that the
observed "Latency" metric values are to be compared to.
* **ComparisonOperator** *(string) --* **[REQUIRED]**
The arithmetic operation to use when comparing the specified
metric to the threshold.
* **RequestBasedSliConfig** (*dict*) --
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.
* **RequestBasedSliMetricConfig** *(dict) --* **[REQUIRED]**
Use this structure to specify the metric to be used for the
SLO.
* **KeyAttributes** *(dict) --*
If this SLO is related to a metric collected by
Application Signals, you must use this field to specify
which service the SLO metric is related to. To do so, you
must specify at least the "Type", "Name", and
"Environment" attributes.
This is a string-to-string map. It can include the
following fields.
* "Type" designates the type of object this is.
* "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.
* *(string) --*
* *(string) --*
* **OperationName** *(string) --*
If the SLO is to monitor a specific operation of the
service, use this field to specify the name of that
operation.
* **MetricType** *(string) --*
If the SLO is to monitor either the "LATENCY" or
"AVAILABILITY" metric that Application Signals collects,
use this field to specify which of those metrics is used.
* **TotalRequestCountMetric** *(list) --*
Use this structure to define the metric that you want to
use as the "total requests" number for a request-based
SLO. This result will be divided by the "good request" or
"bad request" value defined in
"MonitoredRequestCountMetric".
* *(dict) --*
Use this structure to define a metric or metric math
expression that you want to use as for a service level
objective.
Each "MetricDataQuery" in the "MetricDataQueries" array
specifies either a metric to retrieve, or a metric math
expression to be performed on retrieved metrics. A
single "MetricDataQueries" array can include as many as
20 "MetricDataQuery" structures in the array. The 20
structures can include as many as 10 structures that
contain a "MetricStat" parameter to retrieve a metric,
and as many as 10 structures that contain the
"Expression" parameter to perform a math expression. Of
those "Expression" structures, exactly one must have
true as the value for "ReturnData". The result of this
expression used for the SLO.
For more information about metric math expressions, see
CloudWatchUse metric math.
Within each "MetricDataQuery" object, you must specify
either "Expression" or "MetricStat" but not both.
* **Id** *(string) --* **[REQUIRED]**
A short name used to tie this object to the results in
the response. This "Id" must be unique within a
"MetricDataQueries" array. If you are performing math
expressions on this set of data, this name represents
that data and can serve as a variable in the metric
math expression. The valid characters are letters,
numbers, and underscore. The first character must be a
lowercase letter.
* **MetricStat** *(dict) --*
A metric to be used directly for the SLO, or to be
used in the math expression that will be used for the
SLO.
Within one "MetricDataQuery" object, you must specify
either "Expression" or "MetricStat" but not both.
* **Metric** *(dict) --* **[REQUIRED]**
The metric to use as the service level indicator,
including the metric name, namespace, and
dimensions.
* **Namespace** *(string) --*
The namespace of the metric. For more information,
see Namespaces.
* **MetricName** *(string) --*
The name of the metric to use.
* **Dimensions** *(list) --*
An array of one or more dimensions to use to
define the metric that you want to use. For more
information, see Dimensions.
* *(dict) --*
A dimension is a name/value pair that is part of
the identity of a metric. Because dimensions are
part of the unique identifier for a metric,
whenever you add a unique name/value pair to one
of your metrics, you are creating a new
variation of that metric. For example, many
Amazon EC2 metrics publish "InstanceId" as a
dimension name, and the actual instance ID as
the value for that dimension.
You can assign up to 30 dimensions to a metric.
* **Name** *(string) --* **[REQUIRED]**
The name of the dimension. Dimension names
must contain only ASCII characters, must
include at least one non-whitespace character,
and cannot start with a colon ( ":"). ASCII
control characters are not supported as part
of dimension names.
* **Value** *(string) --* **[REQUIRED]**
The value of the dimension. Dimension values
must contain only ASCII characters and must
include at least one non-whitespace character.
ASCII control characters are not supported as
part of dimension values.
* **Period** *(integer) --* **[REQUIRED]**
The granularity, in seconds, to be used for the
metric. For metrics with regular resolution, a
period can be as short as one minute (60 seconds)
and must be a multiple of 60. For high-resolution
metrics that are collected at intervals of less than
one minute, the period can be 1, 5, 10, 30, 60, or
any multiple of 60. High-resolution metrics are
those metrics stored by a "PutMetricData" call that
includes a "StorageResolution" of 1 second.
* **Stat** *(string) --* **[REQUIRED]**
The statistic to use for comparison to the
threshold. It can be any CloudWatch statistic or
extended statistic. For more information about
statistics, see CloudWatch statistics definitions.
* **Unit** *(string) --*
If you omit "Unit" then all data that was collected
with any unit is returned, along with the
corresponding units that were specified when the
data was reported to CloudWatch. If you specify a
unit, the operation returns only data that was
collected with that unit specified. If you specify a
unit that does not match the data collected, the
results of the operation are null. CloudWatch does
not perform unit conversions.
* **Expression** *(string) --*
This field can contain a metric math expression to be
performed on the other metrics that you are retrieving
within this "MetricDataQueries" structure.
A math expression can use the "Id" of the other
metrics or queries to refer to those metrics, and can
also use the "Id" of other expressions to use the
result of those expressions. For more information
about metric math expressions, see Metric Math Syntax
and Functions in the *Amazon CloudWatch User Guide*.
Within each "MetricDataQuery" object, you must specify
either "Expression" or "MetricStat" but not both.
* **Label** *(string) --*
A human-readable label for this metric or expression.
This is especially useful if this is an expression, so
that you know what the value represents. If the metric
or expression is shown in a CloudWatch dashboard
widget, the label is shown. If "Label" is omitted,
CloudWatch generates a default.
You can put dynamic expressions into a label, so that
it is more descriptive. For more information, see
Using Dynamic Labels.
* **ReturnData** *(boolean) --*
Use this only if you are using a metric math
expression for the SLO. Specify "true" for
"ReturnData" for only the one expression result to use
as the alarm. For all other metrics and expressions in
the same "CreateServiceLevelObjective" operation,
specify "ReturnData" as "false".
* **Period** *(integer) --*
The granularity, in seconds, of the returned data
points for this metric. For metrics with regular
resolution, a period can be as short as one minute (60
seconds) and must be a multiple of 60. For high-
resolution metrics that are collected at intervals of
less than one minute, the period can be 1, 5, 10, 30,
60, or any multiple of 60. High-resolution metrics are
those metrics stored by a "PutMetricData" call that
includes a "StorageResolution" of 1 second.
If the "StartTime" parameter specifies a time stamp
that is greater than 3 hours ago, you must specify the
period as follows or no data points in that time range
is returned:
* Start time between 3 hours and 15 days ago - Use a
multiple of 60 seconds (1 minute).
* Start time between 15 and 63 days ago - Use a
multiple of 300 seconds (5 minutes).
* Start time greater than 63 days ago - Use a multiple
of 3600 seconds (1 hour).
* **AccountId** *(string) --*
The ID of the account where this metric is located. If
you are performing this operation in a monitoring
account, use this to specify which source account to
retrieve this metric from.
* **MonitoredRequestCountMetric** *(dict) --*
Use this structure to define the metric that you want to
use as the "good request" or "bad request" value for a
request-based SLO. This value observed for the metric
defined in "TotalRequestCountMetric" will be divided by
the number found for "MonitoredRequestCountMetric" to
determine the percentage of successful requests that this
SLO tracks.
Note:
This is a Tagged Union structure. Only one of the
following top level keys can be set: "GoodCountMetric",
"BadCountMetric".
* **GoodCountMetric** *(list) --*
If you want to count "good requests" to determine the
percentage of successful requests for this request-based
SLO, specify the metric to use as "good requests" in
this structure.
* *(dict) --*
Use this structure to define a metric or metric math
expression that you want to use as for a service level
objective.
Each "MetricDataQuery" in the "MetricDataQueries"
array specifies either a metric to retrieve, or a
metric math expression to be performed on retrieved
metrics. A single "MetricDataQueries" array can
include as many as 20 "MetricDataQuery" structures in
the array. The 20 structures can include as many as 10
structures that contain a "MetricStat" parameter to
retrieve a metric, and as many as 10 structures that
contain the "Expression" parameter to perform a math
expression. Of those "Expression" structures, exactly
one must have true as the value for "ReturnData". The
result of this expression used for the SLO.
For more information about metric math expressions,
see CloudWatchUse metric math.
Within each "MetricDataQuery" object, you must specify
either "Expression" or "MetricStat" but not both.
* **Id** *(string) --* **[REQUIRED]**
A short name used to tie this object to the results
in the response. This "Id" must be unique within a
"MetricDataQueries" array. If you are performing
math expressions on this set of data, this name
represents that data and can serve as a variable in
the metric math expression. The valid characters are
letters, numbers, and underscore. The first
character must be a lowercase letter.
* **MetricStat** *(dict) --*
A metric to be used directly for the SLO, or to be
used in the math expression that will be used for
the SLO.
Within one "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but not
both.
* **Metric** *(dict) --* **[REQUIRED]**
The metric to use as the service level indicator,
including the metric name, namespace, and
dimensions.
* **Namespace** *(string) --*
The namespace of the metric. For more
information, see Namespaces.
* **MetricName** *(string) --*
The name of the metric to use.
* **Dimensions** *(list) --*
An array of one or more dimensions to use to
define the metric that you want to use. For more
information, see Dimensions.
* *(dict) --*
A dimension is a name/value pair that is part
of the identity of a metric. Because
dimensions are part of the unique identifier
for a metric, whenever you add a unique
name/value pair to one of your metrics, you
are creating a new variation of that metric.
For example, many Amazon EC2 metrics publish
"InstanceId" as a dimension name, and the
actual instance ID as the value for that
dimension.
You can assign up to 30 dimensions to a
metric.
* **Name** *(string) --* **[REQUIRED]**
The name of the dimension. Dimension names
must contain only ASCII characters, must
include at least one non-whitespace
character, and cannot start with a colon (
":"). ASCII control characters are not
supported as part of dimension names.
* **Value** *(string) --* **[REQUIRED]**
The value of the dimension. Dimension values
must contain only ASCII characters and must
include at least one non-whitespace
character. ASCII control characters are not
supported as part of dimension values.
* **Period** *(integer) --* **[REQUIRED]**
The granularity, in seconds, to be used for the
metric. For metrics with regular resolution, a
period can be as short as one minute (60 seconds)
and must be a multiple of 60. For high-resolution
metrics that are collected at intervals of less
than one minute, the period can be 1, 5, 10, 30,
60, or any multiple of 60. High-resolution metrics
are those metrics stored by a "PutMetricData" call
that includes a "StorageResolution" of 1 second.
* **Stat** *(string) --* **[REQUIRED]**
The statistic to use for comparison to the
threshold. It can be any CloudWatch statistic or
extended statistic. For more information about
statistics, see CloudWatch statistics definitions.
* **Unit** *(string) --*
If you omit "Unit" then all data that was
collected with any unit is returned, along with
the corresponding units that were specified when
the data was reported to CloudWatch. If you
specify a unit, the operation returns only data
that was collected with that unit specified. If
you specify a unit that does not match the data
collected, the results of the operation are null.
CloudWatch does not perform unit conversions.
* **Expression** *(string) --*
This field can contain a metric math expression to
be performed on the other metrics that you are
retrieving within this "MetricDataQueries"
structure.
A math expression can use the "Id" of the other
metrics or queries to refer to those metrics, and
can also use the "Id" of other expressions to use
the result of those expressions. For more
information about metric math expressions, see
Metric Math Syntax and Functions in the *Amazon
CloudWatch User Guide*.
Within each "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but not
both.
* **Label** *(string) --*
A human-readable label for this metric or
expression. This is especially useful if this is an
expression, so that you know what the value
represents. If the metric or expression is shown in
a CloudWatch dashboard widget, the label is shown.
If "Label" is omitted, CloudWatch generates a
default.
You can put dynamic expressions into a label, so
that it is more descriptive. For more information,
see Using Dynamic Labels.
* **ReturnData** *(boolean) --*
Use this only if you are using a metric math
expression for the SLO. Specify "true" for
"ReturnData" for only the one expression result to
use as the alarm. For all other metrics and
expressions in the same
"CreateServiceLevelObjective" operation, specify
"ReturnData" as "false".
* **Period** *(integer) --*
The granularity, in seconds, of the returned data
points for this metric. For metrics with regular
resolution, a period can be as short as one minute
(60 seconds) and must be a multiple of 60. For high-
resolution metrics that are collected at intervals
of less than one minute, the period can be 1, 5, 10,
30, 60, or any multiple of 60. High-resolution
metrics are those metrics stored by a
"PutMetricData" call that includes a
"StorageResolution" of 1 second.
If the "StartTime" parameter specifies a time stamp
that is greater than 3 hours ago, you must specify
the period as follows or no data points in that time
range is returned:
* Start time between 3 hours and 15 days ago - Use a
multiple of 60 seconds (1 minute).
* Start time between 15 and 63 days ago - Use a
multiple of 300 seconds (5 minutes).
* Start time greater than 63 days ago - Use a
multiple of 3600 seconds (1 hour).
* **AccountId** *(string) --*
The ID of the account where this metric is located.
If you are performing this operation in a monitoring
account, use this to specify which source account to
retrieve this metric from.
* **BadCountMetric** *(list) --*
If you want to count "bad requests" to determine the
percentage of successful requests for this request-based
SLO, specify the metric to use as "bad requests" in this
structure.
* *(dict) --*
Use this structure to define a metric or metric math
expression that you want to use as for a service level
objective.
Each "MetricDataQuery" in the "MetricDataQueries"
array specifies either a metric to retrieve, or a
metric math expression to be performed on retrieved
metrics. A single "MetricDataQueries" array can
include as many as 20 "MetricDataQuery" structures in
the array. The 20 structures can include as many as 10
structures that contain a "MetricStat" parameter to
retrieve a metric, and as many as 10 structures that
contain the "Expression" parameter to perform a math
expression. Of those "Expression" structures, exactly
one must have true as the value for "ReturnData". The
result of this expression used for the SLO.
For more information about metric math expressions,
see CloudWatchUse metric math.
Within each "MetricDataQuery" object, you must specify
either "Expression" or "MetricStat" but not both.
* **Id** *(string) --* **[REQUIRED]**
A short name used to tie this object to the results
in the response. This "Id" must be unique within a
"MetricDataQueries" array. If you are performing
math expressions on this set of data, this name
represents that data and can serve as a variable in
the metric math expression. The valid characters are
letters, numbers, and underscore. The first
character must be a lowercase letter.
* **MetricStat** *(dict) --*
A metric to be used directly for the SLO, or to be
used in the math expression that will be used for
the SLO.
Within one "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but not
both.
* **Metric** *(dict) --* **[REQUIRED]**
The metric to use as the service level indicator,
including the metric name, namespace, and
dimensions.
* **Namespace** *(string) --*
The namespace of the metric. For more
information, see Namespaces.
* **MetricName** *(string) --*
The name of the metric to use.
* **Dimensions** *(list) --*
An array of one or more dimensions to use to
define the metric that you want to use. For more
information, see Dimensions.
* *(dict) --*
A dimension is a name/value pair that is part
of the identity of a metric. Because
dimensions are part of the unique identifier
for a metric, whenever you add a unique
name/value pair to one of your metrics, you
are creating a new variation of that metric.
For example, many Amazon EC2 metrics publish
"InstanceId" as a dimension name, and the
actual instance ID as the value for that
dimension.
You can assign up to 30 dimensions to a
metric.
* **Name** *(string) --* **[REQUIRED]**
The name of the dimension. Dimension names
must contain only ASCII characters, must
include at least one non-whitespace
character, and cannot start with a colon (
":"). ASCII control characters are not
supported as part of dimension names.
* **Value** *(string) --* **[REQUIRED]**
The value of the dimension. Dimension values
must contain only ASCII characters and must
include at least one non-whitespace
character. ASCII control characters are not
supported as part of dimension values.
* **Period** *(integer) --* **[REQUIRED]**
The granularity, in seconds, to be used for the
metric. For metrics with regular resolution, a
period can be as short as one minute (60 seconds)
and must be a multiple of 60. For high-resolution
metrics that are collected at intervals of less
than one minute, the period can be 1, 5, 10, 30,
60, or any multiple of 60. High-resolution metrics
are those metrics stored by a "PutMetricData" call
that includes a "StorageResolution" of 1 second.
* **Stat** *(string) --* **[REQUIRED]**
The statistic to use for comparison to the
threshold. It can be any CloudWatch statistic or
extended statistic. For more information about
statistics, see CloudWatch statistics definitions.
* **Unit** *(string) --*
If you omit "Unit" then all data that was
collected with any unit is returned, along with
the corresponding units that were specified when
the data was reported to CloudWatch. If you
specify a unit, the operation returns only data
that was collected with that unit specified. If
you specify a unit that does not match the data
collected, the results of the operation are null.
CloudWatch does not perform unit conversions.
* **Expression** *(string) --*
This field can contain a metric math expression to
be performed on the other metrics that you are
retrieving within this "MetricDataQueries"
structure.
A math expression can use the "Id" of the other
metrics or queries to refer to those metrics, and
can also use the "Id" of other expressions to use
the result of those expressions. For more
information about metric math expressions, see
Metric Math Syntax and Functions in the *Amazon
CloudWatch User Guide*.
Within each "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but not
both.
* **Label** *(string) --*
A human-readable label for this metric or
expression. This is especially useful if this is an
expression, so that you know what the value
represents. If the metric or expression is shown in
a CloudWatch dashboard widget, the label is shown.
If "Label" is omitted, CloudWatch generates a
default.
You can put dynamic expressions into a label, so
that it is more descriptive. For more information,
see Using Dynamic Labels.
* **ReturnData** *(boolean) --*
Use this only if you are using a metric math
expression for the SLO. Specify "true" for
"ReturnData" for only the one expression result to
use as the alarm. For all other metrics and
expressions in the same
"CreateServiceLevelObjective" operation, specify
"ReturnData" as "false".
* **Period** *(integer) --*
The granularity, in seconds, of the returned data
points for this metric. For metrics with regular
resolution, a period can be as short as one minute
(60 seconds) and must be a multiple of 60. For high-
resolution metrics that are collected at intervals
of less than one minute, the period can be 1, 5, 10,
30, 60, or any multiple of 60. High-resolution
metrics are those metrics stored by a
"PutMetricData" call that includes a
"StorageResolution" of 1 second.
If the "StartTime" parameter specifies a time stamp
that is greater than 3 hours ago, you must specify
the period as follows or no data points in that time
range is returned:
* Start time between 3 hours and 15 days ago - Use a
multiple of 60 seconds (1 minute).
* Start time between 15 and 63 days ago - Use a
multiple of 300 seconds (5 minutes).
* Start time greater than 63 days ago - Use a
multiple of 3600 seconds (1 hour).
* **AccountId** *(string) --*
The ID of the account where this metric is located.
If you are performing this operation in a monitoring
account, use this to specify which source account to
retrieve this metric from.
* **DependencyConfig** *(dict) --*
Identifies the dependency using the
"DependencyKeyAttributes" and "DependencyOperationName".
* **DependencyKeyAttributes** *(dict) --* **[REQUIRED]**
This is a string-to-string map. It can include the
following fields.
* "Type" designates the type of object this is.
* "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.
* *(string) --*
* *(string) --*
* **DependencyOperationName** *(string) --* **[REQUIRED]**
The name of the called operation in the dependency.
* **MetricThreshold** *(float) --*
The value that the SLI metric is compared to. This parameter
is required if this SLO is tracking the "Latency" metric.
* **ComparisonOperator** *(string) --*
The arithmetic operation to use when comparing the specified
metric to the threshold. This parameter is required if this
SLO is tracking the "Latency" metric.
* **Goal** (*dict*) --
A structure that contains the attributes that determine the
goal of the SLO. This includes the time period for evaluation
and the attainment threshold.
* **Interval** *(dict) --*
The time period used to evaluate the SLO. It can be either a
calendar interval or rolling interval.
If you omit this parameter, a rolling interval of 7 days is
used.
Note:
This is a Tagged Union structure. Only one of the
following top level keys can be set: "RollingInterval",
"CalendarInterval".
* **RollingInterval** *(dict) --*
If the interval is a rolling interval, this structure
contains the interval specifications.
* **DurationUnit** *(string) --* **[REQUIRED]**
Specifies the rolling interval unit.
* **Duration** *(integer) --* **[REQUIRED]**
Specifies the duration of each rolling interval. For
example, if "Duration" is "7" and "DurationUnit" is
"DAY", each rolling interval is seven days.
* **CalendarInterval** *(dict) --*
If the interval is a calendar interval, this structure
contains the interval specifications.
* **StartTime** *(datetime) --* **[REQUIRED]**
The date and time when you want the first interval to
start. Be sure to choose a time that configures the
intervals the way that you want. For example, if you
want weekly intervals starting on Mondays at 6 a.m., be
sure to specify a start time that is a Monday at 6 a.m.
When used in a raw HTTP Query API, it is formatted as be
epoch time in seconds. For example: "1698778057"
As soon as one calendar interval ends, another
automatically begins.
* **DurationUnit** *(string) --* **[REQUIRED]**
Specifies the calendar interval unit.
* **Duration** *(integer) --* **[REQUIRED]**
Specifies the duration of each calendar interval. For
example, if "Duration" is "1" and "DurationUnit" is
"MONTH", each interval is one month, aligned with the
calendar.
* **AttainmentGoal** *(float) --*
The threshold that determines if the goal is being met.
If this is a period-based SLO, the attainment goal is the
percentage of good periods that meet the threshold
requirements to the total periods within the interval. For
example, an attainment goal of 99.9% means that within your
interval, you are targeting 99.9% of the periods to be in
healthy state.
If this is a request-based SLO, the attainment goal is the
percentage of requests that must be successful to meet the
attainment goal.
If you omit this parameter, 99 is used to represent 99% as
the attainment goal.
* **WarningThreshold** *(float) --*
The percentage of remaining budget over total budget that
you want to get warnings for. If you omit this parameter,
the default of 50.0 is used.
* **BurnRateConfigurations** (*list*) --
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.
* *(dict) --*
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.
For example, if you specify 60 as the number of minutes in
the look-back window, the burn rate is calculated as the
following:
*burn rate = error rate over the look-back window / (100% -
attainment goal percentage)*
For more information about burn rates, see Calculate burn
rates.
* **LookBackWindowMinutes** *(integer) --* **[REQUIRED]**
The number of minutes to use as the look-back window.
Return type:
dict
Returns:
**Response Syntax**
{
'Slo': {
'Arn': 'string',
'Name': 'string',
'Description': 'string',
'CreatedTime': datetime(2015, 1, 1),
'LastUpdatedTime': datetime(2015, 1, 1),
'Sli': {
'SliMetric': {
'KeyAttributes': {
'string': 'string'
},
'OperationName': 'string',
'MetricType': 'LATENCY'|'AVAILABILITY',
'MetricDataQueries': [
{
'Id': 'string',
'MetricStat': {
'Metric': {
'Namespace': 'string',
'MetricName': 'string',
'Dimensions': [
{
'Name': 'string',
'Value': 'string'
},
]
},
'Period': 123,
'Stat': 'string',
'Unit': 'Microseconds'|'Milliseconds'|'Seconds'|'Bytes'|'Kilobytes'|'Megabytes'|'Gigabytes'|'Terabytes'|'Bits'|'Kilobits'|'Megabits'|'Gigabits'|'Terabits'|'Percent'|'Count'|'Bytes/Second'|'Kilobytes/Second'|'Megabytes/Second'|'Gigabytes/Second'|'Terabytes/Second'|'Bits/Second'|'Kilobits/Second'|'Megabits/Second'|'Gigabits/Second'|'Terabits/Second'|'Count/Second'|'None'
},
'Expression': 'string',
'Label': 'string',
'ReturnData': True|False,
'Period': 123,
'AccountId': 'string'
},
],
'DependencyConfig': {
'DependencyKeyAttributes': {
'string': 'string'
},
'DependencyOperationName': 'string'
}
},
'MetricThreshold': 123.0,
'ComparisonOperator': 'GreaterThanOrEqualTo'|'GreaterThan'|'LessThan'|'LessThanOrEqualTo'
},
'RequestBasedSli': {
'RequestBasedSliMetric': {
'KeyAttributes': {
'string': 'string'
},
'OperationName': 'string',
'MetricType': 'LATENCY'|'AVAILABILITY',
'TotalRequestCountMetric': [
{
'Id': 'string',
'MetricStat': {
'Metric': {
'Namespace': 'string',
'MetricName': 'string',
'Dimensions': [
{
'Name': 'string',
'Value': 'string'
},
]
},
'Period': 123,
'Stat': 'string',
'Unit': 'Microseconds'|'Milliseconds'|'Seconds'|'Bytes'|'Kilobytes'|'Megabytes'|'Gigabytes'|'Terabytes'|'Bits'|'Kilobits'|'Megabits'|'Gigabits'|'Terabits'|'Percent'|'Count'|'Bytes/Second'|'Kilobytes/Second'|'Megabytes/Second'|'Gigabytes/Second'|'Terabytes/Second'|'Bits/Second'|'Kilobits/Second'|'Megabits/Second'|'Gigabits/Second'|'Terabits/Second'|'Count/Second'|'None'
},
'Expression': 'string',
'Label': 'string',
'ReturnData': True|False,
'Period': 123,
'AccountId': 'string'
},
],
'MonitoredRequestCountMetric': {
'GoodCountMetric': [
{
'Id': 'string',
'MetricStat': {
'Metric': {
'Namespace': 'string',
'MetricName': 'string',
'Dimensions': [
{
'Name': 'string',
'Value': 'string'
},
]
},
'Period': 123,
'Stat': 'string',
'Unit': 'Microseconds'|'Milliseconds'|'Seconds'|'Bytes'|'Kilobytes'|'Megabytes'|'Gigabytes'|'Terabytes'|'Bits'|'Kilobits'|'Megabits'|'Gigabits'|'Terabits'|'Percent'|'Count'|'Bytes/Second'|'Kilobytes/Second'|'Megabytes/Second'|'Gigabytes/Second'|'Terabytes/Second'|'Bits/Second'|'Kilobits/Second'|'Megabits/Second'|'Gigabits/Second'|'Terabits/Second'|'Count/Second'|'None'
},
'Expression': 'string',
'Label': 'string',
'ReturnData': True|False,
'Period': 123,
'AccountId': 'string'
},
],
'BadCountMetric': [
{
'Id': 'string',
'MetricStat': {
'Metric': {
'Namespace': 'string',
'MetricName': 'string',
'Dimensions': [
{
'Name': 'string',
'Value': 'string'
},
]
},
'Period': 123,
'Stat': 'string',
'Unit': 'Microseconds'|'Milliseconds'|'Seconds'|'Bytes'|'Kilobytes'|'Megabytes'|'Gigabytes'|'Terabytes'|'Bits'|'Kilobits'|'Megabits'|'Gigabits'|'Terabits'|'Percent'|'Count'|'Bytes/Second'|'Kilobytes/Second'|'Megabytes/Second'|'Gigabytes/Second'|'Terabytes/Second'|'Bits/Second'|'Kilobits/Second'|'Megabits/Second'|'Gigabits/Second'|'Terabits/Second'|'Count/Second'|'None'
},
'Expression': 'string',
'Label': 'string',
'ReturnData': True|False,
'Period': 123,
'AccountId': 'string'
},
]
},
'DependencyConfig': {
'DependencyKeyAttributes': {
'string': 'string'
},
'DependencyOperationName': 'string'
}
},
'MetricThreshold': 123.0,
'ComparisonOperator': 'GreaterThanOrEqualTo'|'GreaterThan'|'LessThan'|'LessThanOrEqualTo'
},
'EvaluationType': 'PeriodBased'|'RequestBased',
'Goal': {
'Interval': {
'RollingInterval': {
'DurationUnit': 'MINUTE'|'HOUR'|'DAY'|'MONTH',
'Duration': 123
},
'CalendarInterval': {
'StartTime': datetime(2015, 1, 1),
'DurationUnit': 'MINUTE'|'HOUR'|'DAY'|'MONTH',
'Duration': 123
}
},
'AttainmentGoal': 123.0,
'WarningThreshold': 123.0
},
'BurnRateConfigurations': [
{
'LookBackWindowMinutes': 123
},
],
'MetricSourceType': 'ServiceOperation'|'CloudWatchMetric'|'ServiceDependency'
}
}
**Response Structure**
* *(dict) --*
* **Slo** *(dict) --*
A structure that contains information about the SLO that you
just updated.
* **Arn** *(string) --*
The ARN of this SLO.
* **Name** *(string) --*
The name of this SLO.
* **Description** *(string) --*
The description that you created for this SLO.
* **CreatedTime** *(datetime) --*
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".
* **LastUpdatedTime** *(datetime) --*
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".
* **Sli** *(dict) --*
A structure containing information about the performance
metric that this SLO monitors, if this is a period-based
SLO.
* **SliMetric** *(dict) --*
A structure that contains information about the metric
that the SLO monitors.
* **KeyAttributes** *(dict) --*
This is a string-to-string map that contains
information about the type of object that this SLO is
related to. It can include the following fields.
* "Type" designates the type of object that this SLO
is related to.
* "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.
* *(string) --*
* *(string) --*
* **OperationName** *(string) --*
If the SLO monitors a specific operation of the
service, this field displays that operation name.
* **MetricType** *(string) --*
If the SLO monitors either the "LATENCY" or
"AVAILABILITY" metric that Application Signals
collects, this field displays which of those metrics
is used.
* **MetricDataQueries** *(list) --*
If this SLO monitors a CloudWatch metric or the result
of a CloudWatch metric math expression, this structure
includes the information about that metric or
expression.
* *(dict) --*
Use this structure to define a metric or metric math
expression that you want to use as for a service
level objective.
Each "MetricDataQuery" in the "MetricDataQueries"
array specifies either a metric to retrieve, or a
metric math expression to be performed on retrieved
metrics. A single "MetricDataQueries" array can
include as many as 20 "MetricDataQuery" structures
in the array. The 20 structures can include as many
as 10 structures that contain a "MetricStat"
parameter to retrieve a metric, and as many as 10
structures that contain the "Expression" parameter
to perform a math expression. Of those "Expression"
structures, exactly one must have true as the value
for "ReturnData". The result of this expression used
for the SLO.
For more information about metric math expressions,
see CloudWatchUse metric math.
Within each "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but not
both.
* **Id** *(string) --*
A short name used to tie this object to the
results in the response. This "Id" must be unique
within a "MetricDataQueries" array. If you are
performing math expressions on this set of data,
this name represents that data and can serve as a
variable in the metric math expression. The valid
characters are letters, numbers, and underscore.
The first character must be a lowercase letter.
* **MetricStat** *(dict) --*
A metric to be used directly for the SLO, or to be
used in the math expression that will be used for
the SLO.
Within one "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but
not both.
* **Metric** *(dict) --*
The metric to use as the service level
indicator, including the metric name, namespace,
and dimensions.
* **Namespace** *(string) --*
The namespace of the metric. For more
information, see Namespaces.
* **MetricName** *(string) --*
The name of the metric to use.
* **Dimensions** *(list) --*
An array of one or more dimensions to use to
define the metric that you want to use. For
more information, see Dimensions.
* *(dict) --*
A dimension is a name/value pair that is
part of the identity of a metric. Because
dimensions are part of the unique identifier
for a metric, whenever you add a unique
name/value pair to one of your metrics, you
are creating a new variation of that metric.
For example, many Amazon EC2 metrics publish
"InstanceId" as a dimension name, and the
actual instance ID as the value for that
dimension.
You can assign up to 30 dimensions to a
metric.
* **Name** *(string) --*
The name of the dimension. Dimension names
must contain only ASCII characters, must
include at least one non-whitespace
character, and cannot start with a colon (
":"). ASCII control characters are not
supported as part of dimension names.
* **Value** *(string) --*
The value of the dimension. Dimension
values must contain only ASCII characters
and must include at least one non-
whitespace character. ASCII control
characters are not supported as part of
dimension values.
* **Period** *(integer) --*
The granularity, in seconds, to be used for the
metric. For metrics with regular resolution, a
period can be as short as one minute (60
seconds) and must be a multiple of 60. For high-
resolution metrics that are collected at
intervals of less than one minute, the period
can be 1, 5, 10, 30, 60, or any multiple of 60.
High-resolution metrics are those metrics stored
by a "PutMetricData" call that includes a
"StorageResolution" of 1 second.
* **Stat** *(string) --*
The statistic to use for comparison to the
threshold. It can be any CloudWatch statistic or
extended statistic. For more information about
statistics, see CloudWatch statistics
definitions.
* **Unit** *(string) --*
If you omit "Unit" then all data that was
collected with any unit is returned, along with
the corresponding units that were specified when
the data was reported to CloudWatch. If you
specify a unit, the operation returns only data
that was collected with that unit specified. If
you specify a unit that does not match the data
collected, the results of the operation are
null. CloudWatch does not perform unit
conversions.
* **Expression** *(string) --*
This field can contain a metric math expression to
be performed on the other metrics that you are
retrieving within this "MetricDataQueries"
structure.
A math expression can use the "Id" of the other
metrics or queries to refer to those metrics, and
can also use the "Id" of other expressions to use
the result of those expressions. For more
information about metric math expressions, see
Metric Math Syntax and Functions in the *Amazon
CloudWatch User Guide*.
Within each "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but
not both.
* **Label** *(string) --*
A human-readable label for this metric or
expression. This is especially useful if this is
an expression, so that you know what the value
represents. If the metric or expression is shown
in a CloudWatch dashboard widget, the label is
shown. If "Label" is omitted, CloudWatch generates
a default.
You can put dynamic expressions into a label, so
that it is more descriptive. For more information,
see Using Dynamic Labels.
* **ReturnData** *(boolean) --*
Use this only if you are using a metric math
expression for the SLO. Specify "true" for
"ReturnData" for only the one expression result to
use as the alarm. For all other metrics and
expressions in the same
"CreateServiceLevelObjective" operation, specify
"ReturnData" as "false".
* **Period** *(integer) --*
The granularity, in seconds, of the returned data
points for this metric. For metrics with regular
resolution, a period can be as short as one minute
(60 seconds) and must be a multiple of 60. For
high-resolution metrics that are collected at
intervals of less than one minute, the period can
be 1, 5, 10, 30, 60, or any multiple of 60. High-
resolution metrics are those metrics stored by a
"PutMetricData" call that includes a
"StorageResolution" of 1 second.
If the "StartTime" parameter specifies a time
stamp that is greater than 3 hours ago, you must
specify the period as follows or no data points in
that time range is returned:
* Start time between 3 hours and 15 days ago - Use
a multiple of 60 seconds (1 minute).
* Start time between 15 and 63 days ago - Use a
multiple of 300 seconds (5 minutes).
* Start time greater than 63 days ago - Use a
multiple of 3600 seconds (1 hour).
* **AccountId** *(string) --*
The ID of the account where this metric is
located. If you are performing this operation in a
monitoring account, use this to specify which
source account to retrieve this metric from.
* **DependencyConfig** *(dict) --*
Identifies the dependency using the
"DependencyKeyAttributes" and
"DependencyOperationName".
* **DependencyKeyAttributes** *(dict) --*
This is a string-to-string map. It can include the
following fields.
* "Type" designates the type of object this is.
* "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.
* *(string) --*
* *(string) --*
* **DependencyOperationName** *(string) --*
The name of the called operation in the dependency.
* **MetricThreshold** *(float) --*
The value that the SLI metric is compared to.
* **ComparisonOperator** *(string) --*
The arithmetic operation used when comparing the
specified metric to the threshold.
* **RequestBasedSli** *(dict) --*
A structure containing information about the performance
metric that this SLO monitors, if this is a request-based
SLO.
* **RequestBasedSliMetric** *(dict) --*
A structure that contains information about the metric
that the SLO monitors.
* **KeyAttributes** *(dict) --*
This is a string-to-string map that contains
information about the type of object that this SLO is
related to. It can include the following fields.
* "Type" designates the type of object that this SLO
is related to.
* "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.
* *(string) --*
* *(string) --*
* **OperationName** *(string) --*
If the SLO monitors a specific operation of the
service, this field displays that operation name.
* **MetricType** *(string) --*
If the SLO monitors either the "LATENCY" or
"AVAILABILITY" metric that Application Signals
collects, this field displays which of those metrics
is used.
* **TotalRequestCountMetric** *(list) --*
This structure defines the metric that is used as the
"total requests" number for a request-based SLO. The
number observed for this metric is divided by the
number of "good requests" or "bad requests" that is
observed for the metric defined in
"MonitoredRequestCountMetric".
* *(dict) --*
Use this structure to define a metric or metric math
expression that you want to use as for a service
level objective.
Each "MetricDataQuery" in the "MetricDataQueries"
array specifies either a metric to retrieve, or a
metric math expression to be performed on retrieved
metrics. A single "MetricDataQueries" array can
include as many as 20 "MetricDataQuery" structures
in the array. The 20 structures can include as many
as 10 structures that contain a "MetricStat"
parameter to retrieve a metric, and as many as 10
structures that contain the "Expression" parameter
to perform a math expression. Of those "Expression"
structures, exactly one must have true as the value
for "ReturnData". The result of this expression used
for the SLO.
For more information about metric math expressions,
see CloudWatchUse metric math.
Within each "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but not
both.
* **Id** *(string) --*
A short name used to tie this object to the
results in the response. This "Id" must be unique
within a "MetricDataQueries" array. If you are
performing math expressions on this set of data,
this name represents that data and can serve as a
variable in the metric math expression. The valid
characters are letters, numbers, and underscore.
The first character must be a lowercase letter.
* **MetricStat** *(dict) --*
A metric to be used directly for the SLO, or to be
used in the math expression that will be used for
the SLO.
Within one "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but
not both.
* **Metric** *(dict) --*
The metric to use as the service level
indicator, including the metric name, namespace,
and dimensions.
* **Namespace** *(string) --*
The namespace of the metric. For more
information, see Namespaces.
* **MetricName** *(string) --*
The name of the metric to use.
* **Dimensions** *(list) --*
An array of one or more dimensions to use to
define the metric that you want to use. For
more information, see Dimensions.
* *(dict) --*
A dimension is a name/value pair that is
part of the identity of a metric. Because
dimensions are part of the unique identifier
for a metric, whenever you add a unique
name/value pair to one of your metrics, you
are creating a new variation of that metric.
For example, many Amazon EC2 metrics publish
"InstanceId" as a dimension name, and the
actual instance ID as the value for that
dimension.
You can assign up to 30 dimensions to a
metric.
* **Name** *(string) --*
The name of the dimension. Dimension names
must contain only ASCII characters, must
include at least one non-whitespace
character, and cannot start with a colon (
":"). ASCII control characters are not
supported as part of dimension names.
* **Value** *(string) --*
The value of the dimension. Dimension
values must contain only ASCII characters
and must include at least one non-
whitespace character. ASCII control
characters are not supported as part of
dimension values.
* **Period** *(integer) --*
The granularity, in seconds, to be used for the
metric. For metrics with regular resolution, a
period can be as short as one minute (60
seconds) and must be a multiple of 60. For high-
resolution metrics that are collected at
intervals of less than one minute, the period
can be 1, 5, 10, 30, 60, or any multiple of 60.
High-resolution metrics are those metrics stored
by a "PutMetricData" call that includes a
"StorageResolution" of 1 second.
* **Stat** *(string) --*
The statistic to use for comparison to the
threshold. It can be any CloudWatch statistic or
extended statistic. For more information about
statistics, see CloudWatch statistics
definitions.
* **Unit** *(string) --*
If you omit "Unit" then all data that was
collected with any unit is returned, along with
the corresponding units that were specified when
the data was reported to CloudWatch. If you
specify a unit, the operation returns only data
that was collected with that unit specified. If
you specify a unit that does not match the data
collected, the results of the operation are
null. CloudWatch does not perform unit
conversions.
* **Expression** *(string) --*
This field can contain a metric math expression to
be performed on the other metrics that you are
retrieving within this "MetricDataQueries"
structure.
A math expression can use the "Id" of the other
metrics or queries to refer to those metrics, and
can also use the "Id" of other expressions to use
the result of those expressions. For more
information about metric math expressions, see
Metric Math Syntax and Functions in the *Amazon
CloudWatch User Guide*.
Within each "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but
not both.
* **Label** *(string) --*
A human-readable label for this metric or
expression. This is especially useful if this is
an expression, so that you know what the value
represents. If the metric or expression is shown
in a CloudWatch dashboard widget, the label is
shown. If "Label" is omitted, CloudWatch generates
a default.
You can put dynamic expressions into a label, so
that it is more descriptive. For more information,
see Using Dynamic Labels.
* **ReturnData** *(boolean) --*
Use this only if you are using a metric math
expression for the SLO. Specify "true" for
"ReturnData" for only the one expression result to
use as the alarm. For all other metrics and
expressions in the same
"CreateServiceLevelObjective" operation, specify
"ReturnData" as "false".
* **Period** *(integer) --*
The granularity, in seconds, of the returned data
points for this metric. For metrics with regular
resolution, a period can be as short as one minute
(60 seconds) and must be a multiple of 60. For
high-resolution metrics that are collected at
intervals of less than one minute, the period can
be 1, 5, 10, 30, 60, or any multiple of 60. High-
resolution metrics are those metrics stored by a
"PutMetricData" call that includes a
"StorageResolution" of 1 second.
If the "StartTime" parameter specifies a time
stamp that is greater than 3 hours ago, you must
specify the period as follows or no data points in
that time range is returned:
* Start time between 3 hours and 15 days ago - Use
a multiple of 60 seconds (1 minute).
* Start time between 15 and 63 days ago - Use a
multiple of 300 seconds (5 minutes).
* Start time greater than 63 days ago - Use a
multiple of 3600 seconds (1 hour).
* **AccountId** *(string) --*
The ID of the account where this metric is
located. If you are performing this operation in a
monitoring account, use this to specify which
source account to retrieve this metric from.
* **MonitoredRequestCountMetric** *(dict) --*
This structure defines the metric that is used as the
"good request" or "bad request" value for a request-
based SLO. This value observed for the metric defined
in "TotalRequestCountMetric" is divided by the number
found for "MonitoredRequestCountMetric" to determine
the percentage of successful requests that this SLO
tracks.
Note:
This is a Tagged Union structure. Only one of the
following top level keys will be set:
"GoodCountMetric", "BadCountMetric". If a client
receives an unknown member it will set
"SDK_UNKNOWN_MEMBER" as the top level key, which
maps to the name or tag of the unknown member.
The structure of "SDK_UNKNOWN_MEMBER" is as
follows:
'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
* **GoodCountMetric** *(list) --*
If you want to count "good requests" to determine
the percentage of successful requests for this
request-based SLO, specify the metric to use as
"good requests" in this structure.
* *(dict) --*
Use this structure to define a metric or metric
math expression that you want to use as for a
service level objective.
Each "MetricDataQuery" in the "MetricDataQueries"
array specifies either a metric to retrieve, or a
metric math expression to be performed on
retrieved metrics. A single "MetricDataQueries"
array can include as many as 20 "MetricDataQuery"
structures in the array. The 20 structures can
include as many as 10 structures that contain a
"MetricStat" parameter to retrieve a metric, and
as many as 10 structures that contain the
"Expression" parameter to perform a math
expression. Of those "Expression" structures,
exactly one must have true as the value for
"ReturnData". The result of this expression used
for the SLO.
For more information about metric math
expressions, see CloudWatchUse metric math.
Within each "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but
not both.
* **Id** *(string) --*
A short name used to tie this object to the
results in the response. This "Id" must be
unique within a "MetricDataQueries" array. If
you are performing math expressions on this set
of data, this name represents that data and can
serve as a variable in the metric math
expression. The valid characters are letters,
numbers, and underscore. The first character
must be a lowercase letter.
* **MetricStat** *(dict) --*
A metric to be used directly for the SLO, or to
be used in the math expression that will be used
for the SLO.
Within one "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but
not both.
* **Metric** *(dict) --*
The metric to use as the service level
indicator, including the metric name,
namespace, and dimensions.
* **Namespace** *(string) --*
The namespace of the metric. For more
information, see Namespaces.
* **MetricName** *(string) --*
The name of the metric to use.
* **Dimensions** *(list) --*
An array of one or more dimensions to use to
define the metric that you want to use. For
more information, see Dimensions.
* *(dict) --*
A dimension is a name/value pair that is
part of the identity of a metric. Because
dimensions are part of the unique
identifier for a metric, whenever you add
a unique name/value pair to one of your
metrics, you are creating a new variation
of that metric. For example, many Amazon
EC2 metrics publish "InstanceId" as a
dimension name, and the actual instance ID
as the value for that dimension.
You can assign up to 30 dimensions to a
metric.
* **Name** *(string) --*
The name of the dimension. Dimension
names must contain only ASCII
characters, must include at least one
non-whitespace character, and cannot
start with a colon ( ":"). ASCII control
characters are not supported as part of
dimension names.
* **Value** *(string) --*
The value of the dimension. Dimension
values must contain only ASCII
characters and must include at least one
non-whitespace character. ASCII control
characters are not supported as part of
dimension values.
* **Period** *(integer) --*
The granularity, in seconds, to be used for
the metric. For metrics with regular
resolution, a period can be as short as one
minute (60 seconds) and must be a multiple of
60. For high-resolution metrics that are
collected at intervals of less than one
minute, the period can be 1, 5, 10, 30, 60, or
any multiple of 60. High-resolution metrics
are those metrics stored by a "PutMetricData"
call that includes a "StorageResolution" of 1
second.
* **Stat** *(string) --*
The statistic to use for comparison to the
threshold. It can be any CloudWatch statistic
or extended statistic. For more information
about statistics, see CloudWatch statistics
definitions.
* **Unit** *(string) --*
If you omit "Unit" then all data that was
collected with any unit is returned, along
with the corresponding units that were
specified when the data was reported to
CloudWatch. If you specify a unit, the
operation returns only data that was collected
with that unit specified. If you specify a
unit that does not match the data collected,
the results of the operation are null.
CloudWatch does not perform unit conversions.
* **Expression** *(string) --*
This field can contain a metric math expression
to be performed on the other metrics that you
are retrieving within this "MetricDataQueries"
structure.
A math expression can use the "Id" of the other
metrics or queries to refer to those metrics,
and can also use the "Id" of other expressions
to use the result of those expressions. For more
information about metric math expressions, see
Metric Math Syntax and Functions in the *Amazon
CloudWatch User Guide*.
Within each "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but
not both.
* **Label** *(string) --*
A human-readable label for this metric or
expression. This is especially useful if this is
an expression, so that you know what the value
represents. If the metric or expression is shown
in a CloudWatch dashboard widget, the label is
shown. If "Label" is omitted, CloudWatch
generates a default.
You can put dynamic expressions into a label, so
that it is more descriptive. For more
information, see Using Dynamic Labels.
* **ReturnData** *(boolean) --*
Use this only if you are using a metric math
expression for the SLO. Specify "true" for
"ReturnData" for only the one expression result
to use as the alarm. For all other metrics and
expressions in the same
"CreateServiceLevelObjective" operation, specify
"ReturnData" as "false".
* **Period** *(integer) --*
The granularity, in seconds, of the returned
data points for this metric. For metrics with
regular resolution, a period can be as short as
one minute (60 seconds) and must be a multiple
of 60. For high-resolution metrics that are
collected at intervals of less than one minute,
the period can be 1, 5, 10, 30, 60, or any
multiple of 60. High-resolution metrics are
those metrics stored by a "PutMetricData" call
that includes a "StorageResolution" of 1 second.
If the "StartTime" parameter specifies a time
stamp that is greater than 3 hours ago, you must
specify the period as follows or no data points
in that time range is returned:
* Start time between 3 hours and 15 days ago -
Use a multiple of 60 seconds (1 minute).
* Start time between 15 and 63 days ago - Use a
multiple of 300 seconds (5 minutes).
* Start time greater than 63 days ago - Use a
multiple of 3600 seconds (1 hour).
* **AccountId** *(string) --*
The ID of the account where this metric is
located. If you are performing this operation in
a monitoring account, use this to specify which
source account to retrieve this metric from.
* **BadCountMetric** *(list) --*
If you want to count "bad requests" to determine the
percentage of successful requests for this request-
based SLO, specify the metric to use as "bad
requests" in this structure.
* *(dict) --*
Use this structure to define a metric or metric
math expression that you want to use as for a
service level objective.
Each "MetricDataQuery" in the "MetricDataQueries"
array specifies either a metric to retrieve, or a
metric math expression to be performed on
retrieved metrics. A single "MetricDataQueries"
array can include as many as 20 "MetricDataQuery"
structures in the array. The 20 structures can
include as many as 10 structures that contain a
"MetricStat" parameter to retrieve a metric, and
as many as 10 structures that contain the
"Expression" parameter to perform a math
expression. Of those "Expression" structures,
exactly one must have true as the value for
"ReturnData". The result of this expression used
for the SLO.
For more information about metric math
expressions, see CloudWatchUse metric math.
Within each "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but
not both.
* **Id** *(string) --*
A short name used to tie this object to the
results in the response. This "Id" must be
unique within a "MetricDataQueries" array. If
you are performing math expressions on this set
of data, this name represents that data and can
serve as a variable in the metric math
expression. The valid characters are letters,
numbers, and underscore. The first character
must be a lowercase letter.
* **MetricStat** *(dict) --*
A metric to be used directly for the SLO, or to
be used in the math expression that will be used
for the SLO.
Within one "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but
not both.
* **Metric** *(dict) --*
The metric to use as the service level
indicator, including the metric name,
namespace, and dimensions.
* **Namespace** *(string) --*
The namespace of the metric. For more
information, see Namespaces.
* **MetricName** *(string) --*
The name of the metric to use.
* **Dimensions** *(list) --*
An array of one or more dimensions to use to
define the metric that you want to use. For
more information, see Dimensions.
* *(dict) --*
A dimension is a name/value pair that is
part of the identity of a metric. Because
dimensions are part of the unique
identifier for a metric, whenever you add
a unique name/value pair to one of your
metrics, you are creating a new variation
of that metric. For example, many Amazon
EC2 metrics publish "InstanceId" as a
dimension name, and the actual instance ID
as the value for that dimension.
You can assign up to 30 dimensions to a
metric.
* **Name** *(string) --*
The name of the dimension. Dimension
names must contain only ASCII
characters, must include at least one
non-whitespace character, and cannot
start with a colon ( ":"). ASCII control
characters are not supported as part of
dimension names.
* **Value** *(string) --*
The value of the dimension. Dimension
values must contain only ASCII
characters and must include at least one
non-whitespace character. ASCII control
characters are not supported as part of
dimension values.
* **Period** *(integer) --*
The granularity, in seconds, to be used for
the metric. For metrics with regular
resolution, a period can be as short as one
minute (60 seconds) and must be a multiple of
60. For high-resolution metrics that are
collected at intervals of less than one
minute, the period can be 1, 5, 10, 30, 60, or
any multiple of 60. High-resolution metrics
are those metrics stored by a "PutMetricData"
call that includes a "StorageResolution" of 1
second.
* **Stat** *(string) --*
The statistic to use for comparison to the
threshold. It can be any CloudWatch statistic
or extended statistic. For more information
about statistics, see CloudWatch statistics
definitions.
* **Unit** *(string) --*
If you omit "Unit" then all data that was
collected with any unit is returned, along
with the corresponding units that were
specified when the data was reported to
CloudWatch. If you specify a unit, the
operation returns only data that was collected
with that unit specified. If you specify a
unit that does not match the data collected,
the results of the operation are null.
CloudWatch does not perform unit conversions.
* **Expression** *(string) --*
This field can contain a metric math expression
to be performed on the other metrics that you
are retrieving within this "MetricDataQueries"
structure.
A math expression can use the "Id" of the other
metrics or queries to refer to those metrics,
and can also use the "Id" of other expressions
to use the result of those expressions. For more
information about metric math expressions, see
Metric Math Syntax and Functions in the *Amazon
CloudWatch User Guide*.
Within each "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but
not both.
* **Label** *(string) --*
A human-readable label for this metric or
expression. This is especially useful if this is
an expression, so that you know what the value
represents. If the metric or expression is shown
in a CloudWatch dashboard widget, the label is
shown. If "Label" is omitted, CloudWatch
generates a default.
You can put dynamic expressions into a label, so
that it is more descriptive. For more
information, see Using Dynamic Labels.
* **ReturnData** *(boolean) --*
Use this only if you are using a metric math
expression for the SLO. Specify "true" for
"ReturnData" for only the one expression result
to use as the alarm. For all other metrics and
expressions in the same
"CreateServiceLevelObjective" operation, specify
"ReturnData" as "false".
* **Period** *(integer) --*
The granularity, in seconds, of the returned
data points for this metric. For metrics with
regular resolution, a period can be as short as
one minute (60 seconds) and must be a multiple
of 60. For high-resolution metrics that are
collected at intervals of less than one minute,
the period can be 1, 5, 10, 30, 60, or any
multiple of 60. High-resolution metrics are
those metrics stored by a "PutMetricData" call
that includes a "StorageResolution" of 1 second.
If the "StartTime" parameter specifies a time
stamp that is greater than 3 hours ago, you must
specify the period as follows or no data points
in that time range is returned:
* Start time between 3 hours and 15 days ago -
Use a multiple of 60 seconds (1 minute).
* Start time between 15 and 63 days ago - Use a
multiple of 300 seconds (5 minutes).
* Start time greater than 63 days ago - Use a
multiple of 3600 seconds (1 hour).
* **AccountId** *(string) --*
The ID of the account where this metric is
located. If you are performing this operation in
a monitoring account, use this to specify which
source account to retrieve this metric from.
* **DependencyConfig** *(dict) --*
Identifies the dependency using the
"DependencyKeyAttributes" and
"DependencyOperationName".
* **DependencyKeyAttributes** *(dict) --*
This is a string-to-string map. It can include the
following fields.
* "Type" designates the type of object this is.
* "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.
* *(string) --*
* *(string) --*
* **DependencyOperationName** *(string) --*
The name of the called operation in the dependency.
* **MetricThreshold** *(float) --*
This value is the threshold that the observed metric
values of the SLI metric are compared to.
* **ComparisonOperator** *(string) --*
The arithmetic operation used when comparing the
specified metric to the threshold.
* **EvaluationType** *(string) --*
Displays whether this is a period-based SLO or a request-
based SLO.
* **Goal** *(dict) --*
This structure contains the attributes that determine the
goal of an SLO. This includes the time period for
evaluation and the attainment threshold.
* **Interval** *(dict) --*
The time period used to evaluate the SLO. It can be
either a calendar interval or rolling interval.
If you omit this parameter, a rolling interval of 7 days
is used.
Note:
This is a Tagged Union structure. Only one of the
following top level keys will be set:
"RollingInterval", "CalendarInterval". If a client
receives an unknown member it will set
"SDK_UNKNOWN_MEMBER" as the top level key, which
maps to the name or tag of the unknown member. The
structure of "SDK_UNKNOWN_MEMBER" is as follows:
'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
* **RollingInterval** *(dict) --*
If the interval is a rolling interval, this structure
contains the interval specifications.
* **DurationUnit** *(string) --*
Specifies the rolling interval unit.
* **Duration** *(integer) --*
Specifies the duration of each rolling interval. For
example, if "Duration" is "7" and "DurationUnit" is
"DAY", each rolling interval is seven days.
* **CalendarInterval** *(dict) --*
If the interval is a calendar interval, this structure
contains the interval specifications.
* **StartTime** *(datetime) --*
The date and time when you want the first interval
to start. Be sure to choose a time that configures
the intervals the way that you want. For example, if
you want weekly intervals starting on Mondays at 6
a.m., be sure to specify a start time that is a
Monday at 6 a.m.
When used in a raw HTTP Query API, it is formatted
as be epoch time in seconds. For example:
"1698778057"
As soon as one calendar interval ends, another
automatically begins.
* **DurationUnit** *(string) --*
Specifies the calendar interval unit.
* **Duration** *(integer) --*
Specifies the duration of each calendar interval.
For example, if "Duration" is "1" and "DurationUnit"
is "MONTH", each interval is one month, aligned with
the calendar.
* **AttainmentGoal** *(float) --*
The threshold that determines if the goal is being met.
If this is a period-based SLO, the attainment goal is
the percentage of good periods that meet the threshold
requirements to the total periods within the interval.
For example, an attainment goal of 99.9% means that
within your interval, you are targeting 99.9% of the
periods to be in healthy state.
If this is a request-based SLO, the attainment goal is
the percentage of requests that must be successful to
meet the attainment goal.
If you omit this parameter, 99 is used to represent 99%
as the attainment goal.
* **WarningThreshold** *(float) --*
The percentage of remaining budget over total budget
that you want to get warnings for. If you omit this
parameter, the default of 50.0 is used.
* **BurnRateConfigurations** *(list) --*
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.
* *(dict) --*
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.
For example, if you specify 60 as the number of minutes
in the look-back window, the burn rate is calculated as
the following:
*burn rate = error rate over the look-back window /
(100% - attainment goal percentage)*
For more information about burn rates, see Calculate
burn rates.
* **LookBackWindowMinutes** *(integer) --*
The number of minutes to use as the look-back window.
* **MetricSourceType** *(string) --*
Displays the SLI metric source type for this SLO.
Supported types are:
* Service operation
* Service dependency
* CloudWatch metric
**Exceptions**
* "CloudWatchApplicationSignals.Client.exceptions.ValidationExcept
ion"
* "CloudWatchApplicationSignals.Client.exceptions.ResourceNotFound
Exception"
* "CloudWatchApplicationSignals.Client.exceptions.ThrottlingExcept
ion"
CloudWatchApplicationSignals / Client / list_service_level_objectives
list_service_level_objectives
*****************************
CloudWatchApplicationSignals.Client.list_service_level_objectives(**kwargs)
Returns a list of SLOs created in this account.
See also: AWS API Documentation
**Request Syntax**
response = client.list_service_level_objectives(
KeyAttributes={
'string': 'string'
},
OperationName='string',
DependencyConfig={
'DependencyKeyAttributes': {
'string': 'string'
},
'DependencyOperationName': 'string'
},
MaxResults=123,
NextToken='string',
MetricSourceTypes=[
'ServiceOperation'|'CloudWatchMetric'|'ServiceDependency',
],
IncludeLinkedAccounts=True|False,
SloOwnerAwsAccountId='string'
)
Parameters:
* **KeyAttributes** (*dict*) --
You can use this optional field to specify which services you
want to retrieve SLO information for.
This is a string-to-string map. It can include the following
fields.
* "Type" designates the type of object this is.
* "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.
* *(string) --*
* *(string) --*
* **OperationName** (*string*) -- The name of the operation that
this SLO is associated with.
* **DependencyConfig** (*dict*) --
Identifies the dependency using the "DependencyKeyAttributes"
and "DependencyOperationName".
* **DependencyKeyAttributes** *(dict) --* **[REQUIRED]**
This is a string-to-string map. It can include the following
fields.
* "Type" designates the type of object this is.
* "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.
* *(string) --*
* *(string) --*
* **DependencyOperationName** *(string) --* **[REQUIRED]**
The name of the called operation in the dependency.
* **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.
* **MetricSourceTypes** (*list*) --
Use this optional field to only include SLOs with the
specified metric source types in the output. Supported types
are:
* Service operation
* Service dependency
* CloudWatch metric
* *(string) --*
* **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.
"
* **SloOwnerAwsAccountId** (*string*) -- SLO's Amazon Web
Services account ID.
Return type:
dict
Returns:
**Response Syntax**
{
'SloSummaries': [
{
'Arn': 'string',
'Name': 'string',
'KeyAttributes': {
'string': 'string'
},
'OperationName': 'string',
'DependencyConfig': {
'DependencyKeyAttributes': {
'string': 'string'
},
'DependencyOperationName': 'string'
},
'CreatedTime': datetime(2015, 1, 1),
'EvaluationType': 'PeriodBased'|'RequestBased',
'MetricSourceType': 'ServiceOperation'|'CloudWatchMetric'|'ServiceDependency'
},
],
'NextToken': 'string'
}
**Response Structure**
* *(dict) --*
* **SloSummaries** *(list) --*
An array of structures, where each structure contains
information about one SLO.
* *(dict) --*
A structure that contains information about one service
level objective (SLO) created in Application Signals.
* **Arn** *(string) --*
The ARN of this service level objective.
* **Name** *(string) --*
The name of the service level objective.
* **KeyAttributes** *(dict) --*
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.
* *(string) --*
* *(string) --*
* **OperationName** *(string) --*
If this service level objective is specific to a single
operation, this field displays the name of that
operation.
* **DependencyConfig** *(dict) --*
Identifies the dependency using the
"DependencyKeyAttributes" and "DependencyOperationName".
* **DependencyKeyAttributes** *(dict) --*
This is a string-to-string map. It can include the
following fields.
* "Type" designates the type of object this is.
* "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.
* *(string) --*
* *(string) --*
* **DependencyOperationName** *(string) --*
The name of the called operation in the dependency.
* **CreatedTime** *(datetime) --*
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.
* **EvaluationType** *(string) --*
Displays whether this is a period-based SLO or a
request-based SLO.
* **MetricSourceType** *(string) --*
Displays the SLI metric source type for this SLO.
Supported types are:
* Service operation
* Service dependency
* CloudWatch metric
* **NextToken** *(string) --*
Include this value in your next use of this API to get next
set of service level objectives.
**Exceptions**
* "CloudWatchApplicationSignals.Client.exceptions.ValidationExcept
ion"
* "CloudWatchApplicationSignals.Client.exceptions.ThrottlingExcept
ion"
CloudWatchApplicationSignals / Client / close
close
*****
CloudWatchApplicationSignals.Client.close()
Closes underlying endpoint connections.
CloudWatchApplicationSignals / Client / start_discovery
start_discovery
***************
CloudWatchApplicationSignals.Client.start_discovery()
Enables this Amazon Web Services account to be able to use
CloudWatch Application Signals by creating the
*AWSServiceRoleForCloudWatchApplicationSignals* service-linked
role. This service- linked role has the following permissions:
* "xray:GetServiceGraph"
* "logs:StartQuery"
* "logs:GetQueryResults"
* "cloudwatch:GetMetricData"
* "cloudwatch:ListMetrics"
* "tag:GetResources"
* "autoscaling:DescribeAutoScalingGroups"
After completing this step, you still need to instrument your Java
and Python applications to send data to Application Signals. For
more information, see Enabling Application Signals.
See also: AWS API Documentation
**Request Syntax**
response = client.start_discovery()
Return type:
dict
Returns:
**Response Syntax**
{}
**Response Structure**
* *(dict) --*
**Exceptions**
* "CloudWatchApplicationSignals.Client.exceptions.ValidationExcept
ion"
* "CloudWatchApplicationSignals.Client.exceptions.ThrottlingExcept
ion"
* "CloudWatchApplicationSignals.Client.exceptions.AccessDeniedExce
ption"
CloudWatchApplicationSignals / Client / tag_resource
tag_resource
************
CloudWatchApplicationSignals.Client.tag_resource(**kwargs)
Assigns one or more tags (key-value pairs) to the specified
CloudWatch resource, such as a service level objective.
Tags can help you organize and categorize your resources. You can
also use them to scope user permissions by granting a user
permission to access or change only resources with certain tag
values.
Tags don't have any semantic meaning to Amazon Web Services and are
interpreted strictly as strings of characters.
You can use the "TagResource" action with an alarm that already has
tags. If you specify a new tag key for the alarm, this tag is
appended to the list of tags associated with the alarm. If you
specify a tag key that is already associated with the alarm, the
new tag value that you specify replaces the previous value for that
tag.
You can associate as many as 50 tags with a CloudWatch resource.
See also: AWS API Documentation
**Request Syntax**
response = client.tag_resource(
ResourceArn='string',
Tags=[
{
'Key': 'string',
'Value': 'string'
},
]
)
Parameters:
* **ResourceArn** (*string*) --
**[REQUIRED]**
The Amazon Resource Name (ARN) of the CloudWatch resource that
you want to set tags for.
The ARN format of an Application Signals SLO is
"arn:aws:cloudwatch:Region:account-id:slo:slo-name"
For more information about ARN format, see Resource Types
Defined by Amazon CloudWatch in the *Amazon Web Services
General Reference*.
* **Tags** (*list*) --
**[REQUIRED]**
The list of key-value pairs to associate with the alarm.
* *(dict) --*
A key-value pair associated with a resource. Tags can help
you organize and categorize your resources.
* **Key** *(string) --* **[REQUIRED]**
A string that you can use to assign a value. The
combination of tag keys and values can help you organize
and categorize your resources.
* **Value** *(string) --* **[REQUIRED]**
The value for the specified tag key.
Return type:
dict
Returns:
**Response Syntax**
{}
**Response Structure**
* *(dict) --*
**Exceptions**
* "CloudWatchApplicationSignals.Client.exceptions.ResourceNotFound
Exception"
* "CloudWatchApplicationSignals.Client.exceptions.ThrottlingExcept
ion"
* "CloudWatchApplicationSignals.Client.exceptions.ServiceQuotaExce
ededException"
CloudWatchApplicationSignals / Client /
list_service_level_objective_exclusion_windows
list_service_level_objective_exclusion_windows
**********************************************
CloudWatchApplicationSignals.Client.list_service_level_objective_exclusion_windows(**kwargs)
Retrieves all exclusion windows configured for a specific SLO.
See also: AWS API Documentation
**Request Syntax**
response = client.list_service_level_objective_exclusion_windows(
Id='string',
MaxResults=123,
NextToken='string'
)
Parameters:
* **Id** (*string*) --
**[REQUIRED]**
The ID of the SLO to list exclusion windows for.
* **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. ""
Return type:
dict
Returns:
**Response Syntax**
{
'ExclusionWindows': [
{
'Window': {
'DurationUnit': 'MINUTE'|'HOUR'|'DAY'|'MONTH',
'Duration': 123
},
'StartTime': datetime(2015, 1, 1),
'RecurrenceRule': {
'Expression': 'string'
},
'Reason': 'string'
},
],
'NextToken': 'string'
}
**Response Structure**
* *(dict) --*
* **ExclusionWindows** *(list) --*
A list of exclusion windows configured for the SLO.
* *(dict) --*
The core SLO time window exclusion object that includes
Window, StartTime, RecurrenceRule, and Reason.
* **Window** *(dict) --*
The SLO time window exclusion .
* **DurationUnit** *(string) --*
The unit of time for the exclusion window duration.
Valid values: MINUTE, HOUR, DAY, MONTH.
* **Duration** *(integer) --*
The number of time units for the exclusion window
length.
* **StartTime** *(datetime) --*
The start of the SLO time window exclusion. Defaults to
current time if not specified.
* **RecurrenceRule** *(dict) --*
The recurrence rule for the SLO time window exclusion.
Supports both cron and rate expressions.
* **Expression** *(string) --*
A cron or rate expression that specifies the schedule
for the exclusion window.
* **Reason** *(string) --*
A description explaining why this time period should be
excluded from SLO calculations.
* **NextToken** *(string) --*
Include this value, if it was returned by the previous
operation, to get the next set of service level objectives.
""
**Exceptions**
* "CloudWatchApplicationSignals.Client.exceptions.ValidationExcept
ion"
* "CloudWatchApplicationSignals.Client.exceptions.ResourceNotFound
Exception"
* "CloudWatchApplicationSignals.Client.exceptions.ThrottlingExcept
ion"
CloudWatchApplicationSignals / Client / create_service_level_objective
create_service_level_objective
******************************
CloudWatchApplicationSignals.Client.create_service_level_objective(**kwargs)
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.
Note:
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"
See also: AWS API Documentation
**Request Syntax**
response = client.create_service_level_objective(
Name='string',
Description='string',
SliConfig={
'SliMetricConfig': {
'KeyAttributes': {
'string': 'string'
},
'OperationName': 'string',
'MetricType': 'LATENCY'|'AVAILABILITY',
'Statistic': 'string',
'PeriodSeconds': 123,
'MetricDataQueries': [
{
'Id': 'string',
'MetricStat': {
'Metric': {
'Namespace': 'string',
'MetricName': 'string',
'Dimensions': [
{
'Name': 'string',
'Value': 'string'
},
]
},
'Period': 123,
'Stat': 'string',
'Unit': 'Microseconds'|'Milliseconds'|'Seconds'|'Bytes'|'Kilobytes'|'Megabytes'|'Gigabytes'|'Terabytes'|'Bits'|'Kilobits'|'Megabits'|'Gigabits'|'Terabits'|'Percent'|'Count'|'Bytes/Second'|'Kilobytes/Second'|'Megabytes/Second'|'Gigabytes/Second'|'Terabytes/Second'|'Bits/Second'|'Kilobits/Second'|'Megabits/Second'|'Gigabits/Second'|'Terabits/Second'|'Count/Second'|'None'
},
'Expression': 'string',
'Label': 'string',
'ReturnData': True|False,
'Period': 123,
'AccountId': 'string'
},
],
'DependencyConfig': {
'DependencyKeyAttributes': {
'string': 'string'
},
'DependencyOperationName': 'string'
}
},
'MetricThreshold': 123.0,
'ComparisonOperator': 'GreaterThanOrEqualTo'|'GreaterThan'|'LessThan'|'LessThanOrEqualTo'
},
RequestBasedSliConfig={
'RequestBasedSliMetricConfig': {
'KeyAttributes': {
'string': 'string'
},
'OperationName': 'string',
'MetricType': 'LATENCY'|'AVAILABILITY',
'TotalRequestCountMetric': [
{
'Id': 'string',
'MetricStat': {
'Metric': {
'Namespace': 'string',
'MetricName': 'string',
'Dimensions': [
{
'Name': 'string',
'Value': 'string'
},
]
},
'Period': 123,
'Stat': 'string',
'Unit': 'Microseconds'|'Milliseconds'|'Seconds'|'Bytes'|'Kilobytes'|'Megabytes'|'Gigabytes'|'Terabytes'|'Bits'|'Kilobits'|'Megabits'|'Gigabits'|'Terabits'|'Percent'|'Count'|'Bytes/Second'|'Kilobytes/Second'|'Megabytes/Second'|'Gigabytes/Second'|'Terabytes/Second'|'Bits/Second'|'Kilobits/Second'|'Megabits/Second'|'Gigabits/Second'|'Terabits/Second'|'Count/Second'|'None'
},
'Expression': 'string',
'Label': 'string',
'ReturnData': True|False,
'Period': 123,
'AccountId': 'string'
},
],
'MonitoredRequestCountMetric': {
'GoodCountMetric': [
{
'Id': 'string',
'MetricStat': {
'Metric': {
'Namespace': 'string',
'MetricName': 'string',
'Dimensions': [
{
'Name': 'string',
'Value': 'string'
},
]
},
'Period': 123,
'Stat': 'string',
'Unit': 'Microseconds'|'Milliseconds'|'Seconds'|'Bytes'|'Kilobytes'|'Megabytes'|'Gigabytes'|'Terabytes'|'Bits'|'Kilobits'|'Megabits'|'Gigabits'|'Terabits'|'Percent'|'Count'|'Bytes/Second'|'Kilobytes/Second'|'Megabytes/Second'|'Gigabytes/Second'|'Terabytes/Second'|'Bits/Second'|'Kilobits/Second'|'Megabits/Second'|'Gigabits/Second'|'Terabits/Second'|'Count/Second'|'None'
},
'Expression': 'string',
'Label': 'string',
'ReturnData': True|False,
'Period': 123,
'AccountId': 'string'
},
],
'BadCountMetric': [
{
'Id': 'string',
'MetricStat': {
'Metric': {
'Namespace': 'string',
'MetricName': 'string',
'Dimensions': [
{
'Name': 'string',
'Value': 'string'
},
]
},
'Period': 123,
'Stat': 'string',
'Unit': 'Microseconds'|'Milliseconds'|'Seconds'|'Bytes'|'Kilobytes'|'Megabytes'|'Gigabytes'|'Terabytes'|'Bits'|'Kilobits'|'Megabits'|'Gigabits'|'Terabits'|'Percent'|'Count'|'Bytes/Second'|'Kilobytes/Second'|'Megabytes/Second'|'Gigabytes/Second'|'Terabytes/Second'|'Bits/Second'|'Kilobits/Second'|'Megabits/Second'|'Gigabits/Second'|'Terabits/Second'|'Count/Second'|'None'
},
'Expression': 'string',
'Label': 'string',
'ReturnData': True|False,
'Period': 123,
'AccountId': 'string'
},
]
},
'DependencyConfig': {
'DependencyKeyAttributes': {
'string': 'string'
},
'DependencyOperationName': 'string'
}
},
'MetricThreshold': 123.0,
'ComparisonOperator': 'GreaterThanOrEqualTo'|'GreaterThan'|'LessThan'|'LessThanOrEqualTo'
},
Goal={
'Interval': {
'RollingInterval': {
'DurationUnit': 'MINUTE'|'HOUR'|'DAY'|'MONTH',
'Duration': 123
},
'CalendarInterval': {
'StartTime': datetime(2015, 1, 1),
'DurationUnit': 'MINUTE'|'HOUR'|'DAY'|'MONTH',
'Duration': 123
}
},
'AttainmentGoal': 123.0,
'WarningThreshold': 123.0
},
Tags=[
{
'Key': 'string',
'Value': 'string'
},
],
BurnRateConfigurations=[
{
'LookBackWindowMinutes': 123
},
]
)
Parameters:
* **Name** (*string*) --
**[REQUIRED]**
A name for this SLO.
* **Description** (*string*) -- An optional description for this
SLO.
* **SliConfig** (*dict*) --
If this SLO is a period-based SLO, this structure defines the
information about what performance metric this SLO will
monitor.
You can't specify both "RequestBasedSliConfig" and "SliConfig"
in the same operation.
* **SliMetricConfig** *(dict) --* **[REQUIRED]**
Use this structure to specify the metric to be used for the
SLO.
* **KeyAttributes** *(dict) --*
If this SLO is related to a metric collected by
Application Signals, you must use this field to specify
which service the SLO metric is related to. To do so, you
must specify at least the "Type", "Name", and
"Environment" attributes.
This is a string-to-string map. It can include the
following fields.
* "Type" designates the type of object this is.
* "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.
* *(string) --*
* *(string) --*
* **OperationName** *(string) --*
If the SLO is to monitor a specific operation of the
service, use this field to specify the name of that
operation.
* **MetricType** *(string) --*
If the SLO is to monitor either the "LATENCY" or
"AVAILABILITY" metric that Application Signals collects,
use this field to specify which of those metrics is used.
* **Statistic** *(string) --*
The statistic to use for comparison to the threshold. It
can be any CloudWatch statistic or extended statistic. For
more information about statistics, see CloudWatch
statistics definitions.
* **PeriodSeconds** *(integer) --*
The number of seconds to use as the period for SLO
evaluation. Your application's performance is compared to
the SLI during each period. For each period, the
application is determined to have either achieved or not
achieved the necessary performance.
* **MetricDataQueries** *(list) --*
If this SLO monitors a CloudWatch metric or the result of
a CloudWatch metric math expression, use this structure to
specify that metric or expression.
* *(dict) --*
Use this structure to define a metric or metric math
expression that you want to use as for a service level
objective.
Each "MetricDataQuery" in the "MetricDataQueries" array
specifies either a metric to retrieve, or a metric math
expression to be performed on retrieved metrics. A
single "MetricDataQueries" array can include as many as
20 "MetricDataQuery" structures in the array. The 20
structures can include as many as 10 structures that
contain a "MetricStat" parameter to retrieve a metric,
and as many as 10 structures that contain the
"Expression" parameter to perform a math expression. Of
those "Expression" structures, exactly one must have
true as the value for "ReturnData". The result of this
expression used for the SLO.
For more information about metric math expressions, see
CloudWatchUse metric math.
Within each "MetricDataQuery" object, you must specify
either "Expression" or "MetricStat" but not both.
* **Id** *(string) --* **[REQUIRED]**
A short name used to tie this object to the results in
the response. This "Id" must be unique within a
"MetricDataQueries" array. If you are performing math
expressions on this set of data, this name represents
that data and can serve as a variable in the metric
math expression. The valid characters are letters,
numbers, and underscore. The first character must be a
lowercase letter.
* **MetricStat** *(dict) --*
A metric to be used directly for the SLO, or to be
used in the math expression that will be used for the
SLO.
Within one "MetricDataQuery" object, you must specify
either "Expression" or "MetricStat" but not both.
* **Metric** *(dict) --* **[REQUIRED]**
The metric to use as the service level indicator,
including the metric name, namespace, and
dimensions.
* **Namespace** *(string) --*
The namespace of the metric. For more information,
see Namespaces.
* **MetricName** *(string) --*
The name of the metric to use.
* **Dimensions** *(list) --*
An array of one or more dimensions to use to
define the metric that you want to use. For more
information, see Dimensions.
* *(dict) --*
A dimension is a name/value pair that is part of
the identity of a metric. Because dimensions are
part of the unique identifier for a metric,
whenever you add a unique name/value pair to one
of your metrics, you are creating a new
variation of that metric. For example, many
Amazon EC2 metrics publish "InstanceId" as a
dimension name, and the actual instance ID as
the value for that dimension.
You can assign up to 30 dimensions to a metric.
* **Name** *(string) --* **[REQUIRED]**
The name of the dimension. Dimension names
must contain only ASCII characters, must
include at least one non-whitespace character,
and cannot start with a colon ( ":"). ASCII
control characters are not supported as part
of dimension names.
* **Value** *(string) --* **[REQUIRED]**
The value of the dimension. Dimension values
must contain only ASCII characters and must
include at least one non-whitespace character.
ASCII control characters are not supported as
part of dimension values.
* **Period** *(integer) --* **[REQUIRED]**
The granularity, in seconds, to be used for the
metric. For metrics with regular resolution, a
period can be as short as one minute (60 seconds)
and must be a multiple of 60. For high-resolution
metrics that are collected at intervals of less than
one minute, the period can be 1, 5, 10, 30, 60, or
any multiple of 60. High-resolution metrics are
those metrics stored by a "PutMetricData" call that
includes a "StorageResolution" of 1 second.
* **Stat** *(string) --* **[REQUIRED]**
The statistic to use for comparison to the
threshold. It can be any CloudWatch statistic or
extended statistic. For more information about
statistics, see CloudWatch statistics definitions.
* **Unit** *(string) --*
If you omit "Unit" then all data that was collected
with any unit is returned, along with the
corresponding units that were specified when the
data was reported to CloudWatch. If you specify a
unit, the operation returns only data that was
collected with that unit specified. If you specify a
unit that does not match the data collected, the
results of the operation are null. CloudWatch does
not perform unit conversions.
* **Expression** *(string) --*
This field can contain a metric math expression to be
performed on the other metrics that you are retrieving
within this "MetricDataQueries" structure.
A math expression can use the "Id" of the other
metrics or queries to refer to those metrics, and can
also use the "Id" of other expressions to use the
result of those expressions. For more information
about metric math expressions, see Metric Math Syntax
and Functions in the *Amazon CloudWatch User Guide*.
Within each "MetricDataQuery" object, you must specify
either "Expression" or "MetricStat" but not both.
* **Label** *(string) --*
A human-readable label for this metric or expression.
This is especially useful if this is an expression, so
that you know what the value represents. If the metric
or expression is shown in a CloudWatch dashboard
widget, the label is shown. If "Label" is omitted,
CloudWatch generates a default.
You can put dynamic expressions into a label, so that
it is more descriptive. For more information, see
Using Dynamic Labels.
* **ReturnData** *(boolean) --*
Use this only if you are using a metric math
expression for the SLO. Specify "true" for
"ReturnData" for only the one expression result to use
as the alarm. For all other metrics and expressions in
the same "CreateServiceLevelObjective" operation,
specify "ReturnData" as "false".
* **Period** *(integer) --*
The granularity, in seconds, of the returned data
points for this metric. For metrics with regular
resolution, a period can be as short as one minute (60
seconds) and must be a multiple of 60. For high-
resolution metrics that are collected at intervals of
less than one minute, the period can be 1, 5, 10, 30,
60, or any multiple of 60. High-resolution metrics are
those metrics stored by a "PutMetricData" call that
includes a "StorageResolution" of 1 second.
If the "StartTime" parameter specifies a time stamp
that is greater than 3 hours ago, you must specify the
period as follows or no data points in that time range
is returned:
* Start time between 3 hours and 15 days ago - Use a
multiple of 60 seconds (1 minute).
* Start time between 15 and 63 days ago - Use a
multiple of 300 seconds (5 minutes).
* Start time greater than 63 days ago - Use a multiple
of 3600 seconds (1 hour).
* **AccountId** *(string) --*
The ID of the account where this metric is located. If
you are performing this operation in a monitoring
account, use this to specify which source account to
retrieve this metric from.
* **DependencyConfig** *(dict) --*
Identifies the dependency using the
"DependencyKeyAttributes" and "DependencyOperationName".
* **DependencyKeyAttributes** *(dict) --* **[REQUIRED]**
This is a string-to-string map. It can include the
following fields.
* "Type" designates the type of object this is.
* "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.
* *(string) --*
* *(string) --*
* **DependencyOperationName** *(string) --* **[REQUIRED]**
The name of the called operation in the dependency.
* **MetricThreshold** *(float) --* **[REQUIRED]**
This parameter is used only when a request-based SLO tracks
the "Latency" metric. Specify the threshold value that the
observed "Latency" metric values are to be compared to.
* **ComparisonOperator** *(string) --* **[REQUIRED]**
The arithmetic operation to use when comparing the specified
metric to the threshold.
* **RequestBasedSliConfig** (*dict*) --
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 "RequestBasedSliConfig" and "SliConfig"
in the same operation.
* **RequestBasedSliMetricConfig** *(dict) --* **[REQUIRED]**
Use this structure to specify the metric to be used for the
SLO.
* **KeyAttributes** *(dict) --*
If this SLO is related to a metric collected by
Application Signals, you must use this field to specify
which service the SLO metric is related to. To do so, you
must specify at least the "Type", "Name", and
"Environment" attributes.
This is a string-to-string map. It can include the
following fields.
* "Type" designates the type of object this is.
* "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.
* *(string) --*
* *(string) --*
* **OperationName** *(string) --*
If the SLO is to monitor a specific operation of the
service, use this field to specify the name of that
operation.
* **MetricType** *(string) --*
If the SLO is to monitor either the "LATENCY" or
"AVAILABILITY" metric that Application Signals collects,
use this field to specify which of those metrics is used.
* **TotalRequestCountMetric** *(list) --*
Use this structure to define the metric that you want to
use as the "total requests" number for a request-based
SLO. This result will be divided by the "good request" or
"bad request" value defined in
"MonitoredRequestCountMetric".
* *(dict) --*
Use this structure to define a metric or metric math
expression that you want to use as for a service level
objective.
Each "MetricDataQuery" in the "MetricDataQueries" array
specifies either a metric to retrieve, or a metric math
expression to be performed on retrieved metrics. A
single "MetricDataQueries" array can include as many as
20 "MetricDataQuery" structures in the array. The 20
structures can include as many as 10 structures that
contain a "MetricStat" parameter to retrieve a metric,
and as many as 10 structures that contain the
"Expression" parameter to perform a math expression. Of
those "Expression" structures, exactly one must have
true as the value for "ReturnData". The result of this
expression used for the SLO.
For more information about metric math expressions, see
CloudWatchUse metric math.
Within each "MetricDataQuery" object, you must specify
either "Expression" or "MetricStat" but not both.
* **Id** *(string) --* **[REQUIRED]**
A short name used to tie this object to the results in
the response. This "Id" must be unique within a
"MetricDataQueries" array. If you are performing math
expressions on this set of data, this name represents
that data and can serve as a variable in the metric
math expression. The valid characters are letters,
numbers, and underscore. The first character must be a
lowercase letter.
* **MetricStat** *(dict) --*
A metric to be used directly for the SLO, or to be
used in the math expression that will be used for the
SLO.
Within one "MetricDataQuery" object, you must specify
either "Expression" or "MetricStat" but not both.
* **Metric** *(dict) --* **[REQUIRED]**
The metric to use as the service level indicator,
including the metric name, namespace, and
dimensions.
* **Namespace** *(string) --*
The namespace of the metric. For more information,
see Namespaces.
* **MetricName** *(string) --*
The name of the metric to use.
* **Dimensions** *(list) --*
An array of one or more dimensions to use to
define the metric that you want to use. For more
information, see Dimensions.
* *(dict) --*
A dimension is a name/value pair that is part of
the identity of a metric. Because dimensions are
part of the unique identifier for a metric,
whenever you add a unique name/value pair to one
of your metrics, you are creating a new
variation of that metric. For example, many
Amazon EC2 metrics publish "InstanceId" as a
dimension name, and the actual instance ID as
the value for that dimension.
You can assign up to 30 dimensions to a metric.
* **Name** *(string) --* **[REQUIRED]**
The name of the dimension. Dimension names
must contain only ASCII characters, must
include at least one non-whitespace character,
and cannot start with a colon ( ":"). ASCII
control characters are not supported as part
of dimension names.
* **Value** *(string) --* **[REQUIRED]**
The value of the dimension. Dimension values
must contain only ASCII characters and must
include at least one non-whitespace character.
ASCII control characters are not supported as
part of dimension values.
* **Period** *(integer) --* **[REQUIRED]**
The granularity, in seconds, to be used for the
metric. For metrics with regular resolution, a
period can be as short as one minute (60 seconds)
and must be a multiple of 60. For high-resolution
metrics that are collected at intervals of less than
one minute, the period can be 1, 5, 10, 30, 60, or
any multiple of 60. High-resolution metrics are
those metrics stored by a "PutMetricData" call that
includes a "StorageResolution" of 1 second.
* **Stat** *(string) --* **[REQUIRED]**
The statistic to use for comparison to the
threshold. It can be any CloudWatch statistic or
extended statistic. For more information about
statistics, see CloudWatch statistics definitions.
* **Unit** *(string) --*
If you omit "Unit" then all data that was collected
with any unit is returned, along with the
corresponding units that were specified when the
data was reported to CloudWatch. If you specify a
unit, the operation returns only data that was
collected with that unit specified. If you specify a
unit that does not match the data collected, the
results of the operation are null. CloudWatch does
not perform unit conversions.
* **Expression** *(string) --*
This field can contain a metric math expression to be
performed on the other metrics that you are retrieving
within this "MetricDataQueries" structure.
A math expression can use the "Id" of the other
metrics or queries to refer to those metrics, and can
also use the "Id" of other expressions to use the
result of those expressions. For more information
about metric math expressions, see Metric Math Syntax
and Functions in the *Amazon CloudWatch User Guide*.
Within each "MetricDataQuery" object, you must specify
either "Expression" or "MetricStat" but not both.
* **Label** *(string) --*
A human-readable label for this metric or expression.
This is especially useful if this is an expression, so
that you know what the value represents. If the metric
or expression is shown in a CloudWatch dashboard
widget, the label is shown. If "Label" is omitted,
CloudWatch generates a default.
You can put dynamic expressions into a label, so that
it is more descriptive. For more information, see
Using Dynamic Labels.
* **ReturnData** *(boolean) --*
Use this only if you are using a metric math
expression for the SLO. Specify "true" for
"ReturnData" for only the one expression result to use
as the alarm. For all other metrics and expressions in
the same "CreateServiceLevelObjective" operation,
specify "ReturnData" as "false".
* **Period** *(integer) --*
The granularity, in seconds, of the returned data
points for this metric. For metrics with regular
resolution, a period can be as short as one minute (60
seconds) and must be a multiple of 60. For high-
resolution metrics that are collected at intervals of
less than one minute, the period can be 1, 5, 10, 30,
60, or any multiple of 60. High-resolution metrics are
those metrics stored by a "PutMetricData" call that
includes a "StorageResolution" of 1 second.
If the "StartTime" parameter specifies a time stamp
that is greater than 3 hours ago, you must specify the
period as follows or no data points in that time range
is returned:
* Start time between 3 hours and 15 days ago - Use a
multiple of 60 seconds (1 minute).
* Start time between 15 and 63 days ago - Use a
multiple of 300 seconds (5 minutes).
* Start time greater than 63 days ago - Use a multiple
of 3600 seconds (1 hour).
* **AccountId** *(string) --*
The ID of the account where this metric is located. If
you are performing this operation in a monitoring
account, use this to specify which source account to
retrieve this metric from.
* **MonitoredRequestCountMetric** *(dict) --*
Use this structure to define the metric that you want to
use as the "good request" or "bad request" value for a
request-based SLO. This value observed for the metric
defined in "TotalRequestCountMetric" will be divided by
the number found for "MonitoredRequestCountMetric" to
determine the percentage of successful requests that this
SLO tracks.
Note:
This is a Tagged Union structure. Only one of the
following top level keys can be set: "GoodCountMetric",
"BadCountMetric".
* **GoodCountMetric** *(list) --*
If you want to count "good requests" to determine the
percentage of successful requests for this request-based
SLO, specify the metric to use as "good requests" in
this structure.
* *(dict) --*
Use this structure to define a metric or metric math
expression that you want to use as for a service level
objective.
Each "MetricDataQuery" in the "MetricDataQueries"
array specifies either a metric to retrieve, or a
metric math expression to be performed on retrieved
metrics. A single "MetricDataQueries" array can
include as many as 20 "MetricDataQuery" structures in
the array. The 20 structures can include as many as 10
structures that contain a "MetricStat" parameter to
retrieve a metric, and as many as 10 structures that
contain the "Expression" parameter to perform a math
expression. Of those "Expression" structures, exactly
one must have true as the value for "ReturnData". The
result of this expression used for the SLO.
For more information about metric math expressions,
see CloudWatchUse metric math.
Within each "MetricDataQuery" object, you must specify
either "Expression" or "MetricStat" but not both.
* **Id** *(string) --* **[REQUIRED]**
A short name used to tie this object to the results
in the response. This "Id" must be unique within a
"MetricDataQueries" array. If you are performing
math expressions on this set of data, this name
represents that data and can serve as a variable in
the metric math expression. The valid characters are
letters, numbers, and underscore. The first
character must be a lowercase letter.
* **MetricStat** *(dict) --*
A metric to be used directly for the SLO, or to be
used in the math expression that will be used for
the SLO.
Within one "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but not
both.
* **Metric** *(dict) --* **[REQUIRED]**
The metric to use as the service level indicator,
including the metric name, namespace, and
dimensions.
* **Namespace** *(string) --*
The namespace of the metric. For more
information, see Namespaces.
* **MetricName** *(string) --*
The name of the metric to use.
* **Dimensions** *(list) --*
An array of one or more dimensions to use to
define the metric that you want to use. For more
information, see Dimensions.
* *(dict) --*
A dimension is a name/value pair that is part
of the identity of a metric. Because
dimensions are part of the unique identifier
for a metric, whenever you add a unique
name/value pair to one of your metrics, you
are creating a new variation of that metric.
For example, many Amazon EC2 metrics publish
"InstanceId" as a dimension name, and the
actual instance ID as the value for that
dimension.
You can assign up to 30 dimensions to a
metric.
* **Name** *(string) --* **[REQUIRED]**
The name of the dimension. Dimension names
must contain only ASCII characters, must
include at least one non-whitespace
character, and cannot start with a colon (
":"). ASCII control characters are not
supported as part of dimension names.
* **Value** *(string) --* **[REQUIRED]**
The value of the dimension. Dimension values
must contain only ASCII characters and must
include at least one non-whitespace
character. ASCII control characters are not
supported as part of dimension values.
* **Period** *(integer) --* **[REQUIRED]**
The granularity, in seconds, to be used for the
metric. For metrics with regular resolution, a
period can be as short as one minute (60 seconds)
and must be a multiple of 60. For high-resolution
metrics that are collected at intervals of less
than one minute, the period can be 1, 5, 10, 30,
60, or any multiple of 60. High-resolution metrics
are those metrics stored by a "PutMetricData" call
that includes a "StorageResolution" of 1 second.
* **Stat** *(string) --* **[REQUIRED]**
The statistic to use for comparison to the
threshold. It can be any CloudWatch statistic or
extended statistic. For more information about
statistics, see CloudWatch statistics definitions.
* **Unit** *(string) --*
If you omit "Unit" then all data that was
collected with any unit is returned, along with
the corresponding units that were specified when
the data was reported to CloudWatch. If you
specify a unit, the operation returns only data
that was collected with that unit specified. If
you specify a unit that does not match the data
collected, the results of the operation are null.
CloudWatch does not perform unit conversions.
* **Expression** *(string) --*
This field can contain a metric math expression to
be performed on the other metrics that you are
retrieving within this "MetricDataQueries"
structure.
A math expression can use the "Id" of the other
metrics or queries to refer to those metrics, and
can also use the "Id" of other expressions to use
the result of those expressions. For more
information about metric math expressions, see
Metric Math Syntax and Functions in the *Amazon
CloudWatch User Guide*.
Within each "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but not
both.
* **Label** *(string) --*
A human-readable label for this metric or
expression. This is especially useful if this is an
expression, so that you know what the value
represents. If the metric or expression is shown in
a CloudWatch dashboard widget, the label is shown.
If "Label" is omitted, CloudWatch generates a
default.
You can put dynamic expressions into a label, so
that it is more descriptive. For more information,
see Using Dynamic Labels.
* **ReturnData** *(boolean) --*
Use this only if you are using a metric math
expression for the SLO. Specify "true" for
"ReturnData" for only the one expression result to
use as the alarm. For all other metrics and
expressions in the same
"CreateServiceLevelObjective" operation, specify
"ReturnData" as "false".
* **Period** *(integer) --*
The granularity, in seconds, of the returned data
points for this metric. For metrics with regular
resolution, a period can be as short as one minute
(60 seconds) and must be a multiple of 60. For high-
resolution metrics that are collected at intervals
of less than one minute, the period can be 1, 5, 10,
30, 60, or any multiple of 60. High-resolution
metrics are those metrics stored by a
"PutMetricData" call that includes a
"StorageResolution" of 1 second.
If the "StartTime" parameter specifies a time stamp
that is greater than 3 hours ago, you must specify
the period as follows or no data points in that time
range is returned:
* Start time between 3 hours and 15 days ago - Use a
multiple of 60 seconds (1 minute).
* Start time between 15 and 63 days ago - Use a
multiple of 300 seconds (5 minutes).
* Start time greater than 63 days ago - Use a
multiple of 3600 seconds (1 hour).
* **AccountId** *(string) --*
The ID of the account where this metric is located.
If you are performing this operation in a monitoring
account, use this to specify which source account to
retrieve this metric from.
* **BadCountMetric** *(list) --*
If you want to count "bad requests" to determine the
percentage of successful requests for this request-based
SLO, specify the metric to use as "bad requests" in this
structure.
* *(dict) --*
Use this structure to define a metric or metric math
expression that you want to use as for a service level
objective.
Each "MetricDataQuery" in the "MetricDataQueries"
array specifies either a metric to retrieve, or a
metric math expression to be performed on retrieved
metrics. A single "MetricDataQueries" array can
include as many as 20 "MetricDataQuery" structures in
the array. The 20 structures can include as many as 10
structures that contain a "MetricStat" parameter to
retrieve a metric, and as many as 10 structures that
contain the "Expression" parameter to perform a math
expression. Of those "Expression" structures, exactly
one must have true as the value for "ReturnData". The
result of this expression used for the SLO.
For more information about metric math expressions,
see CloudWatchUse metric math.
Within each "MetricDataQuery" object, you must specify
either "Expression" or "MetricStat" but not both.
* **Id** *(string) --* **[REQUIRED]**
A short name used to tie this object to the results
in the response. This "Id" must be unique within a
"MetricDataQueries" array. If you are performing
math expressions on this set of data, this name
represents that data and can serve as a variable in
the metric math expression. The valid characters are
letters, numbers, and underscore. The first
character must be a lowercase letter.
* **MetricStat** *(dict) --*
A metric to be used directly for the SLO, or to be
used in the math expression that will be used for
the SLO.
Within one "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but not
both.
* **Metric** *(dict) --* **[REQUIRED]**
The metric to use as the service level indicator,
including the metric name, namespace, and
dimensions.
* **Namespace** *(string) --*
The namespace of the metric. For more
information, see Namespaces.
* **MetricName** *(string) --*
The name of the metric to use.
* **Dimensions** *(list) --*
An array of one or more dimensions to use to
define the metric that you want to use. For more
information, see Dimensions.
* *(dict) --*
A dimension is a name/value pair that is part
of the identity of a metric. Because
dimensions are part of the unique identifier
for a metric, whenever you add a unique
name/value pair to one of your metrics, you
are creating a new variation of that metric.
For example, many Amazon EC2 metrics publish
"InstanceId" as a dimension name, and the
actual instance ID as the value for that
dimension.
You can assign up to 30 dimensions to a
metric.
* **Name** *(string) --* **[REQUIRED]**
The name of the dimension. Dimension names
must contain only ASCII characters, must
include at least one non-whitespace
character, and cannot start with a colon (
":"). ASCII control characters are not
supported as part of dimension names.
* **Value** *(string) --* **[REQUIRED]**
The value of the dimension. Dimension values
must contain only ASCII characters and must
include at least one non-whitespace
character. ASCII control characters are not
supported as part of dimension values.
* **Period** *(integer) --* **[REQUIRED]**
The granularity, in seconds, to be used for the
metric. For metrics with regular resolution, a
period can be as short as one minute (60 seconds)
and must be a multiple of 60. For high-resolution
metrics that are collected at intervals of less
than one minute, the period can be 1, 5, 10, 30,
60, or any multiple of 60. High-resolution metrics
are those metrics stored by a "PutMetricData" call
that includes a "StorageResolution" of 1 second.
* **Stat** *(string) --* **[REQUIRED]**
The statistic to use for comparison to the
threshold. It can be any CloudWatch statistic or
extended statistic. For more information about
statistics, see CloudWatch statistics definitions.
* **Unit** *(string) --*
If you omit "Unit" then all data that was
collected with any unit is returned, along with
the corresponding units that were specified when
the data was reported to CloudWatch. If you
specify a unit, the operation returns only data
that was collected with that unit specified. If
you specify a unit that does not match the data
collected, the results of the operation are null.
CloudWatch does not perform unit conversions.
* **Expression** *(string) --*
This field can contain a metric math expression to
be performed on the other metrics that you are
retrieving within this "MetricDataQueries"
structure.
A math expression can use the "Id" of the other
metrics or queries to refer to those metrics, and
can also use the "Id" of other expressions to use
the result of those expressions. For more
information about metric math expressions, see
Metric Math Syntax and Functions in the *Amazon
CloudWatch User Guide*.
Within each "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but not
both.
* **Label** *(string) --*
A human-readable label for this metric or
expression. This is especially useful if this is an
expression, so that you know what the value
represents. If the metric or expression is shown in
a CloudWatch dashboard widget, the label is shown.
If "Label" is omitted, CloudWatch generates a
default.
You can put dynamic expressions into a label, so
that it is more descriptive. For more information,
see Using Dynamic Labels.
* **ReturnData** *(boolean) --*
Use this only if you are using a metric math
expression for the SLO. Specify "true" for
"ReturnData" for only the one expression result to
use as the alarm. For all other metrics and
expressions in the same
"CreateServiceLevelObjective" operation, specify
"ReturnData" as "false".
* **Period** *(integer) --*
The granularity, in seconds, of the returned data
points for this metric. For metrics with regular
resolution, a period can be as short as one minute
(60 seconds) and must be a multiple of 60. For high-
resolution metrics that are collected at intervals
of less than one minute, the period can be 1, 5, 10,
30, 60, or any multiple of 60. High-resolution
metrics are those metrics stored by a
"PutMetricData" call that includes a
"StorageResolution" of 1 second.
If the "StartTime" parameter specifies a time stamp
that is greater than 3 hours ago, you must specify
the period as follows or no data points in that time
range is returned:
* Start time between 3 hours and 15 days ago - Use a
multiple of 60 seconds (1 minute).
* Start time between 15 and 63 days ago - Use a
multiple of 300 seconds (5 minutes).
* Start time greater than 63 days ago - Use a
multiple of 3600 seconds (1 hour).
* **AccountId** *(string) --*
The ID of the account where this metric is located.
If you are performing this operation in a monitoring
account, use this to specify which source account to
retrieve this metric from.
* **DependencyConfig** *(dict) --*
Identifies the dependency using the
"DependencyKeyAttributes" and "DependencyOperationName".
* **DependencyKeyAttributes** *(dict) --* **[REQUIRED]**
This is a string-to-string map. It can include the
following fields.
* "Type" designates the type of object this is.
* "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.
* *(string) --*
* *(string) --*
* **DependencyOperationName** *(string) --* **[REQUIRED]**
The name of the called operation in the dependency.
* **MetricThreshold** *(float) --*
The value that the SLI metric is compared to. This parameter
is required if this SLO is tracking the "Latency" metric.
* **ComparisonOperator** *(string) --*
The arithmetic operation to use when comparing the specified
metric to the threshold. This parameter is required if this
SLO is tracking the "Latency" metric.
* **Goal** (*dict*) --
This structure contains the attributes that determine the goal
of the SLO.
* **Interval** *(dict) --*
The time period used to evaluate the SLO. It can be either a
calendar interval or rolling interval.
If you omit this parameter, a rolling interval of 7 days is
used.
Note:
This is a Tagged Union structure. Only one of the
following top level keys can be set: "RollingInterval",
"CalendarInterval".
* **RollingInterval** *(dict) --*
If the interval is a rolling interval, this structure
contains the interval specifications.
* **DurationUnit** *(string) --* **[REQUIRED]**
Specifies the rolling interval unit.
* **Duration** *(integer) --* **[REQUIRED]**
Specifies the duration of each rolling interval. For
example, if "Duration" is "7" and "DurationUnit" is
"DAY", each rolling interval is seven days.
* **CalendarInterval** *(dict) --*
If the interval is a calendar interval, this structure
contains the interval specifications.
* **StartTime** *(datetime) --* **[REQUIRED]**
The date and time when you want the first interval to
start. Be sure to choose a time that configures the
intervals the way that you want. For example, if you
want weekly intervals starting on Mondays at 6 a.m., be
sure to specify a start time that is a Monday at 6 a.m.
When used in a raw HTTP Query API, it is formatted as be
epoch time in seconds. For example: "1698778057"
As soon as one calendar interval ends, another
automatically begins.
* **DurationUnit** *(string) --* **[REQUIRED]**
Specifies the calendar interval unit.
* **Duration** *(integer) --* **[REQUIRED]**
Specifies the duration of each calendar interval. For
example, if "Duration" is "1" and "DurationUnit" is
"MONTH", each interval is one month, aligned with the
calendar.
* **AttainmentGoal** *(float) --*
The threshold that determines if the goal is being met.
If this is a period-based SLO, the attainment goal is the
percentage of good periods that meet the threshold
requirements to the total periods within the interval. For
example, an attainment goal of 99.9% means that within your
interval, you are targeting 99.9% of the periods to be in
healthy state.
If this is a request-based SLO, the attainment goal is the
percentage of requests that must be successful to meet the
attainment goal.
If you omit this parameter, 99 is used to represent 99% as
the attainment goal.
* **WarningThreshold** *(float) --*
The percentage of remaining budget over total budget that
you want to get warnings for. If you omit this parameter,
the default of 50.0 is used.
* **Tags** (*list*) --
A list of key-value pairs to associate with the SLO. You can
associate as many as 50 tags with an SLO. To be able to
associate tags with the SLO when you create the SLO, you must
have the "cloudwatch:TagResource" permission.
Tags can help you organize and categorize your resources. You
can also use them to scope user permissions by granting a user
permission to access or change only resources with certain tag
values.
* *(dict) --*
A key-value pair associated with a resource. Tags can help
you organize and categorize your resources.
* **Key** *(string) --* **[REQUIRED]**
A string that you can use to assign a value. The
combination of tag keys and values can help you organize
and categorize your resources.
* **Value** *(string) --* **[REQUIRED]**
The value for the specified tag key.
* **BurnRateConfigurations** (*list*) --
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.
* *(dict) --*
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.
For example, if you specify 60 as the number of minutes in
the look-back window, the burn rate is calculated as the
following:
*burn rate = error rate over the look-back window / (100% -
attainment goal percentage)*
For more information about burn rates, see Calculate burn
rates.
* **LookBackWindowMinutes** *(integer) --* **[REQUIRED]**
The number of minutes to use as the look-back window.
Return type:
dict
Returns:
**Response Syntax**
{
'Slo': {
'Arn': 'string',
'Name': 'string',
'Description': 'string',
'CreatedTime': datetime(2015, 1, 1),
'LastUpdatedTime': datetime(2015, 1, 1),
'Sli': {
'SliMetric': {
'KeyAttributes': {
'string': 'string'
},
'OperationName': 'string',
'MetricType': 'LATENCY'|'AVAILABILITY',
'MetricDataQueries': [
{
'Id': 'string',
'MetricStat': {
'Metric': {
'Namespace': 'string',
'MetricName': 'string',
'Dimensions': [
{
'Name': 'string',
'Value': 'string'
},
]
},
'Period': 123,
'Stat': 'string',
'Unit': 'Microseconds'|'Milliseconds'|'Seconds'|'Bytes'|'Kilobytes'|'Megabytes'|'Gigabytes'|'Terabytes'|'Bits'|'Kilobits'|'Megabits'|'Gigabits'|'Terabits'|'Percent'|'Count'|'Bytes/Second'|'Kilobytes/Second'|'Megabytes/Second'|'Gigabytes/Second'|'Terabytes/Second'|'Bits/Second'|'Kilobits/Second'|'Megabits/Second'|'Gigabits/Second'|'Terabits/Second'|'Count/Second'|'None'
},
'Expression': 'string',
'Label': 'string',
'ReturnData': True|False,
'Period': 123,
'AccountId': 'string'
},
],
'DependencyConfig': {
'DependencyKeyAttributes': {
'string': 'string'
},
'DependencyOperationName': 'string'
}
},
'MetricThreshold': 123.0,
'ComparisonOperator': 'GreaterThanOrEqualTo'|'GreaterThan'|'LessThan'|'LessThanOrEqualTo'
},
'RequestBasedSli': {
'RequestBasedSliMetric': {
'KeyAttributes': {
'string': 'string'
},
'OperationName': 'string',
'MetricType': 'LATENCY'|'AVAILABILITY',
'TotalRequestCountMetric': [
{
'Id': 'string',
'MetricStat': {
'Metric': {
'Namespace': 'string',
'MetricName': 'string',
'Dimensions': [
{
'Name': 'string',
'Value': 'string'
},
]
},
'Period': 123,
'Stat': 'string',
'Unit': 'Microseconds'|'Milliseconds'|'Seconds'|'Bytes'|'Kilobytes'|'Megabytes'|'Gigabytes'|'Terabytes'|'Bits'|'Kilobits'|'Megabits'|'Gigabits'|'Terabits'|'Percent'|'Count'|'Bytes/Second'|'Kilobytes/Second'|'Megabytes/Second'|'Gigabytes/Second'|'Terabytes/Second'|'Bits/Second'|'Kilobits/Second'|'Megabits/Second'|'Gigabits/Second'|'Terabits/Second'|'Count/Second'|'None'
},
'Expression': 'string',
'Label': 'string',
'ReturnData': True|False,
'Period': 123,
'AccountId': 'string'
},
],
'MonitoredRequestCountMetric': {
'GoodCountMetric': [
{
'Id': 'string',
'MetricStat': {
'Metric': {
'Namespace': 'string',
'MetricName': 'string',
'Dimensions': [
{
'Name': 'string',
'Value': 'string'
},
]
},
'Period': 123,
'Stat': 'string',
'Unit': 'Microseconds'|'Milliseconds'|'Seconds'|'Bytes'|'Kilobytes'|'Megabytes'|'Gigabytes'|'Terabytes'|'Bits'|'Kilobits'|'Megabits'|'Gigabits'|'Terabits'|'Percent'|'Count'|'Bytes/Second'|'Kilobytes/Second'|'Megabytes/Second'|'Gigabytes/Second'|'Terabytes/Second'|'Bits/Second'|'Kilobits/Second'|'Megabits/Second'|'Gigabits/Second'|'Terabits/Second'|'Count/Second'|'None'
},
'Expression': 'string',
'Label': 'string',
'ReturnData': True|False,
'Period': 123,
'AccountId': 'string'
},
],
'BadCountMetric': [
{
'Id': 'string',
'MetricStat': {
'Metric': {
'Namespace': 'string',
'MetricName': 'string',
'Dimensions': [
{
'Name': 'string',
'Value': 'string'
},
]
},
'Period': 123,
'Stat': 'string',
'Unit': 'Microseconds'|'Milliseconds'|'Seconds'|'Bytes'|'Kilobytes'|'Megabytes'|'Gigabytes'|'Terabytes'|'Bits'|'Kilobits'|'Megabits'|'Gigabits'|'Terabits'|'Percent'|'Count'|'Bytes/Second'|'Kilobytes/Second'|'Megabytes/Second'|'Gigabytes/Second'|'Terabytes/Second'|'Bits/Second'|'Kilobits/Second'|'Megabits/Second'|'Gigabits/Second'|'Terabits/Second'|'Count/Second'|'None'
},
'Expression': 'string',
'Label': 'string',
'ReturnData': True|False,
'Period': 123,
'AccountId': 'string'
},
]
},
'DependencyConfig': {
'DependencyKeyAttributes': {
'string': 'string'
},
'DependencyOperationName': 'string'
}
},
'MetricThreshold': 123.0,
'ComparisonOperator': 'GreaterThanOrEqualTo'|'GreaterThan'|'LessThan'|'LessThanOrEqualTo'
},
'EvaluationType': 'PeriodBased'|'RequestBased',
'Goal': {
'Interval': {
'RollingInterval': {
'DurationUnit': 'MINUTE'|'HOUR'|'DAY'|'MONTH',
'Duration': 123
},
'CalendarInterval': {
'StartTime': datetime(2015, 1, 1),
'DurationUnit': 'MINUTE'|'HOUR'|'DAY'|'MONTH',
'Duration': 123
}
},
'AttainmentGoal': 123.0,
'WarningThreshold': 123.0
},
'BurnRateConfigurations': [
{
'LookBackWindowMinutes': 123
},
],
'MetricSourceType': 'ServiceOperation'|'CloudWatchMetric'|'ServiceDependency'
}
}
**Response Structure**
* *(dict) --*
* **Slo** *(dict) --*
A structure that contains information about the SLO that you
just created.
* **Arn** *(string) --*
The ARN of this SLO.
* **Name** *(string) --*
The name of this SLO.
* **Description** *(string) --*
The description that you created for this SLO.
* **CreatedTime** *(datetime) --*
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".
* **LastUpdatedTime** *(datetime) --*
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".
* **Sli** *(dict) --*
A structure containing information about the performance
metric that this SLO monitors, if this is a period-based
SLO.
* **SliMetric** *(dict) --*
A structure that contains information about the metric
that the SLO monitors.
* **KeyAttributes** *(dict) --*
This is a string-to-string map that contains
information about the type of object that this SLO is
related to. It can include the following fields.
* "Type" designates the type of object that this SLO
is related to.
* "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.
* *(string) --*
* *(string) --*
* **OperationName** *(string) --*
If the SLO monitors a specific operation of the
service, this field displays that operation name.
* **MetricType** *(string) --*
If the SLO monitors either the "LATENCY" or
"AVAILABILITY" metric that Application Signals
collects, this field displays which of those metrics
is used.
* **MetricDataQueries** *(list) --*
If this SLO monitors a CloudWatch metric or the result
of a CloudWatch metric math expression, this structure
includes the information about that metric or
expression.
* *(dict) --*
Use this structure to define a metric or metric math
expression that you want to use as for a service
level objective.
Each "MetricDataQuery" in the "MetricDataQueries"
array specifies either a metric to retrieve, or a
metric math expression to be performed on retrieved
metrics. A single "MetricDataQueries" array can
include as many as 20 "MetricDataQuery" structures
in the array. The 20 structures can include as many
as 10 structures that contain a "MetricStat"
parameter to retrieve a metric, and as many as 10
structures that contain the "Expression" parameter
to perform a math expression. Of those "Expression"
structures, exactly one must have true as the value
for "ReturnData". The result of this expression used
for the SLO.
For more information about metric math expressions,
see CloudWatchUse metric math.
Within each "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but not
both.
* **Id** *(string) --*
A short name used to tie this object to the
results in the response. This "Id" must be unique
within a "MetricDataQueries" array. If you are
performing math expressions on this set of data,
this name represents that data and can serve as a
variable in the metric math expression. The valid
characters are letters, numbers, and underscore.
The first character must be a lowercase letter.
* **MetricStat** *(dict) --*
A metric to be used directly for the SLO, or to be
used in the math expression that will be used for
the SLO.
Within one "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but
not both.
* **Metric** *(dict) --*
The metric to use as the service level
indicator, including the metric name, namespace,
and dimensions.
* **Namespace** *(string) --*
The namespace of the metric. For more
information, see Namespaces.
* **MetricName** *(string) --*
The name of the metric to use.
* **Dimensions** *(list) --*
An array of one or more dimensions to use to
define the metric that you want to use. For
more information, see Dimensions.
* *(dict) --*
A dimension is a name/value pair that is
part of the identity of a metric. Because
dimensions are part of the unique identifier
for a metric, whenever you add a unique
name/value pair to one of your metrics, you
are creating a new variation of that metric.
For example, many Amazon EC2 metrics publish
"InstanceId" as a dimension name, and the
actual instance ID as the value for that
dimension.
You can assign up to 30 dimensions to a
metric.
* **Name** *(string) --*
The name of the dimension. Dimension names
must contain only ASCII characters, must
include at least one non-whitespace
character, and cannot start with a colon (
":"). ASCII control characters are not
supported as part of dimension names.
* **Value** *(string) --*
The value of the dimension. Dimension
values must contain only ASCII characters
and must include at least one non-
whitespace character. ASCII control
characters are not supported as part of
dimension values.
* **Period** *(integer) --*
The granularity, in seconds, to be used for the
metric. For metrics with regular resolution, a
period can be as short as one minute (60
seconds) and must be a multiple of 60. For high-
resolution metrics that are collected at
intervals of less than one minute, the period
can be 1, 5, 10, 30, 60, or any multiple of 60.
High-resolution metrics are those metrics stored
by a "PutMetricData" call that includes a
"StorageResolution" of 1 second.
* **Stat** *(string) --*
The statistic to use for comparison to the
threshold. It can be any CloudWatch statistic or
extended statistic. For more information about
statistics, see CloudWatch statistics
definitions.
* **Unit** *(string) --*
If you omit "Unit" then all data that was
collected with any unit is returned, along with
the corresponding units that were specified when
the data was reported to CloudWatch. If you
specify a unit, the operation returns only data
that was collected with that unit specified. If
you specify a unit that does not match the data
collected, the results of the operation are
null. CloudWatch does not perform unit
conversions.
* **Expression** *(string) --*
This field can contain a metric math expression to
be performed on the other metrics that you are
retrieving within this "MetricDataQueries"
structure.
A math expression can use the "Id" of the other
metrics or queries to refer to those metrics, and
can also use the "Id" of other expressions to use
the result of those expressions. For more
information about metric math expressions, see
Metric Math Syntax and Functions in the *Amazon
CloudWatch User Guide*.
Within each "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but
not both.
* **Label** *(string) --*
A human-readable label for this metric or
expression. This is especially useful if this is
an expression, so that you know what the value
represents. If the metric or expression is shown
in a CloudWatch dashboard widget, the label is
shown. If "Label" is omitted, CloudWatch generates
a default.
You can put dynamic expressions into a label, so
that it is more descriptive. For more information,
see Using Dynamic Labels.
* **ReturnData** *(boolean) --*
Use this only if you are using a metric math
expression for the SLO. Specify "true" for
"ReturnData" for only the one expression result to
use as the alarm. For all other metrics and
expressions in the same
"CreateServiceLevelObjective" operation, specify
"ReturnData" as "false".
* **Period** *(integer) --*
The granularity, in seconds, of the returned data
points for this metric. For metrics with regular
resolution, a period can be as short as one minute
(60 seconds) and must be a multiple of 60. For
high-resolution metrics that are collected at
intervals of less than one minute, the period can
be 1, 5, 10, 30, 60, or any multiple of 60. High-
resolution metrics are those metrics stored by a
"PutMetricData" call that includes a
"StorageResolution" of 1 second.
If the "StartTime" parameter specifies a time
stamp that is greater than 3 hours ago, you must
specify the period as follows or no data points in
that time range is returned:
* Start time between 3 hours and 15 days ago - Use
a multiple of 60 seconds (1 minute).
* Start time between 15 and 63 days ago - Use a
multiple of 300 seconds (5 minutes).
* Start time greater than 63 days ago - Use a
multiple of 3600 seconds (1 hour).
* **AccountId** *(string) --*
The ID of the account where this metric is
located. If you are performing this operation in a
monitoring account, use this to specify which
source account to retrieve this metric from.
* **DependencyConfig** *(dict) --*
Identifies the dependency using the
"DependencyKeyAttributes" and
"DependencyOperationName".
* **DependencyKeyAttributes** *(dict) --*
This is a string-to-string map. It can include the
following fields.
* "Type" designates the type of object this is.
* "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.
* *(string) --*
* *(string) --*
* **DependencyOperationName** *(string) --*
The name of the called operation in the dependency.
* **MetricThreshold** *(float) --*
The value that the SLI metric is compared to.
* **ComparisonOperator** *(string) --*
The arithmetic operation used when comparing the
specified metric to the threshold.
* **RequestBasedSli** *(dict) --*
A structure containing information about the performance
metric that this SLO monitors, if this is a request-based
SLO.
* **RequestBasedSliMetric** *(dict) --*
A structure that contains information about the metric
that the SLO monitors.
* **KeyAttributes** *(dict) --*
This is a string-to-string map that contains
information about the type of object that this SLO is
related to. It can include the following fields.
* "Type" designates the type of object that this SLO
is related to.
* "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.
* *(string) --*
* *(string) --*
* **OperationName** *(string) --*
If the SLO monitors a specific operation of the
service, this field displays that operation name.
* **MetricType** *(string) --*
If the SLO monitors either the "LATENCY" or
"AVAILABILITY" metric that Application Signals
collects, this field displays which of those metrics
is used.
* **TotalRequestCountMetric** *(list) --*
This structure defines the metric that is used as the
"total requests" number for a request-based SLO. The
number observed for this metric is divided by the
number of "good requests" or "bad requests" that is
observed for the metric defined in
"MonitoredRequestCountMetric".
* *(dict) --*
Use this structure to define a metric or metric math
expression that you want to use as for a service
level objective.
Each "MetricDataQuery" in the "MetricDataQueries"
array specifies either a metric to retrieve, or a
metric math expression to be performed on retrieved
metrics. A single "MetricDataQueries" array can
include as many as 20 "MetricDataQuery" structures
in the array. The 20 structures can include as many
as 10 structures that contain a "MetricStat"
parameter to retrieve a metric, and as many as 10
structures that contain the "Expression" parameter
to perform a math expression. Of those "Expression"
structures, exactly one must have true as the value
for "ReturnData". The result of this expression used
for the SLO.
For more information about metric math expressions,
see CloudWatchUse metric math.
Within each "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but not
both.
* **Id** *(string) --*
A short name used to tie this object to the
results in the response. This "Id" must be unique
within a "MetricDataQueries" array. If you are
performing math expressions on this set of data,
this name represents that data and can serve as a
variable in the metric math expression. The valid
characters are letters, numbers, and underscore.
The first character must be a lowercase letter.
* **MetricStat** *(dict) --*
A metric to be used directly for the SLO, or to be
used in the math expression that will be used for
the SLO.
Within one "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but
not both.
* **Metric** *(dict) --*
The metric to use as the service level
indicator, including the metric name, namespace,
and dimensions.
* **Namespace** *(string) --*
The namespace of the metric. For more
information, see Namespaces.
* **MetricName** *(string) --*
The name of the metric to use.
* **Dimensions** *(list) --*
An array of one or more dimensions to use to
define the metric that you want to use. For
more information, see Dimensions.
* *(dict) --*
A dimension is a name/value pair that is
part of the identity of a metric. Because
dimensions are part of the unique identifier
for a metric, whenever you add a unique
name/value pair to one of your metrics, you
are creating a new variation of that metric.
For example, many Amazon EC2 metrics publish
"InstanceId" as a dimension name, and the
actual instance ID as the value for that
dimension.
You can assign up to 30 dimensions to a
metric.
* **Name** *(string) --*
The name of the dimension. Dimension names
must contain only ASCII characters, must
include at least one non-whitespace
character, and cannot start with a colon (
":"). ASCII control characters are not
supported as part of dimension names.
* **Value** *(string) --*
The value of the dimension. Dimension
values must contain only ASCII characters
and must include at least one non-
whitespace character. ASCII control
characters are not supported as part of
dimension values.
* **Period** *(integer) --*
The granularity, in seconds, to be used for the
metric. For metrics with regular resolution, a
period can be as short as one minute (60
seconds) and must be a multiple of 60. For high-
resolution metrics that are collected at
intervals of less than one minute, the period
can be 1, 5, 10, 30, 60, or any multiple of 60.
High-resolution metrics are those metrics stored
by a "PutMetricData" call that includes a
"StorageResolution" of 1 second.
* **Stat** *(string) --*
The statistic to use for comparison to the
threshold. It can be any CloudWatch statistic or
extended statistic. For more information about
statistics, see CloudWatch statistics
definitions.
* **Unit** *(string) --*
If you omit "Unit" then all data that was
collected with any unit is returned, along with
the corresponding units that were specified when
the data was reported to CloudWatch. If you
specify a unit, the operation returns only data
that was collected with that unit specified. If
you specify a unit that does not match the data
collected, the results of the operation are
null. CloudWatch does not perform unit
conversions.
* **Expression** *(string) --*
This field can contain a metric math expression to
be performed on the other metrics that you are
retrieving within this "MetricDataQueries"
structure.
A math expression can use the "Id" of the other
metrics or queries to refer to those metrics, and
can also use the "Id" of other expressions to use
the result of those expressions. For more
information about metric math expressions, see
Metric Math Syntax and Functions in the *Amazon
CloudWatch User Guide*.
Within each "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but
not both.
* **Label** *(string) --*
A human-readable label for this metric or
expression. This is especially useful if this is
an expression, so that you know what the value
represents. If the metric or expression is shown
in a CloudWatch dashboard widget, the label is
shown. If "Label" is omitted, CloudWatch generates
a default.
You can put dynamic expressions into a label, so
that it is more descriptive. For more information,
see Using Dynamic Labels.
* **ReturnData** *(boolean) --*
Use this only if you are using a metric math
expression for the SLO. Specify "true" for
"ReturnData" for only the one expression result to
use as the alarm. For all other metrics and
expressions in the same
"CreateServiceLevelObjective" operation, specify
"ReturnData" as "false".
* **Period** *(integer) --*
The granularity, in seconds, of the returned data
points for this metric. For metrics with regular
resolution, a period can be as short as one minute
(60 seconds) and must be a multiple of 60. For
high-resolution metrics that are collected at
intervals of less than one minute, the period can
be 1, 5, 10, 30, 60, or any multiple of 60. High-
resolution metrics are those metrics stored by a
"PutMetricData" call that includes a
"StorageResolution" of 1 second.
If the "StartTime" parameter specifies a time
stamp that is greater than 3 hours ago, you must
specify the period as follows or no data points in
that time range is returned:
* Start time between 3 hours and 15 days ago - Use
a multiple of 60 seconds (1 minute).
* Start time between 15 and 63 days ago - Use a
multiple of 300 seconds (5 minutes).
* Start time greater than 63 days ago - Use a
multiple of 3600 seconds (1 hour).
* **AccountId** *(string) --*
The ID of the account where this metric is
located. If you are performing this operation in a
monitoring account, use this to specify which
source account to retrieve this metric from.
* **MonitoredRequestCountMetric** *(dict) --*
This structure defines the metric that is used as the
"good request" or "bad request" value for a request-
based SLO. This value observed for the metric defined
in "TotalRequestCountMetric" is divided by the number
found for "MonitoredRequestCountMetric" to determine
the percentage of successful requests that this SLO
tracks.
Note:
This is a Tagged Union structure. Only one of the
following top level keys will be set:
"GoodCountMetric", "BadCountMetric". If a client
receives an unknown member it will set
"SDK_UNKNOWN_MEMBER" as the top level key, which
maps to the name or tag of the unknown member.
The structure of "SDK_UNKNOWN_MEMBER" is as
follows:
'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
* **GoodCountMetric** *(list) --*
If you want to count "good requests" to determine
the percentage of successful requests for this
request-based SLO, specify the metric to use as
"good requests" in this structure.
* *(dict) --*
Use this structure to define a metric or metric
math expression that you want to use as for a
service level objective.
Each "MetricDataQuery" in the "MetricDataQueries"
array specifies either a metric to retrieve, or a
metric math expression to be performed on
retrieved metrics. A single "MetricDataQueries"
array can include as many as 20 "MetricDataQuery"
structures in the array. The 20 structures can
include as many as 10 structures that contain a
"MetricStat" parameter to retrieve a metric, and
as many as 10 structures that contain the
"Expression" parameter to perform a math
expression. Of those "Expression" structures,
exactly one must have true as the value for
"ReturnData". The result of this expression used
for the SLO.
For more information about metric math
expressions, see CloudWatchUse metric math.
Within each "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but
not both.
* **Id** *(string) --*
A short name used to tie this object to the
results in the response. This "Id" must be
unique within a "MetricDataQueries" array. If
you are performing math expressions on this set
of data, this name represents that data and can
serve as a variable in the metric math
expression. The valid characters are letters,
numbers, and underscore. The first character
must be a lowercase letter.
* **MetricStat** *(dict) --*
A metric to be used directly for the SLO, or to
be used in the math expression that will be used
for the SLO.
Within one "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but
not both.
* **Metric** *(dict) --*
The metric to use as the service level
indicator, including the metric name,
namespace, and dimensions.
* **Namespace** *(string) --*
The namespace of the metric. For more
information, see Namespaces.
* **MetricName** *(string) --*
The name of the metric to use.
* **Dimensions** *(list) --*
An array of one or more dimensions to use to
define the metric that you want to use. For
more information, see Dimensions.
* *(dict) --*
A dimension is a name/value pair that is
part of the identity of a metric. Because
dimensions are part of the unique
identifier for a metric, whenever you add
a unique name/value pair to one of your
metrics, you are creating a new variation
of that metric. For example, many Amazon
EC2 metrics publish "InstanceId" as a
dimension name, and the actual instance ID
as the value for that dimension.
You can assign up to 30 dimensions to a
metric.
* **Name** *(string) --*
The name of the dimension. Dimension
names must contain only ASCII
characters, must include at least one
non-whitespace character, and cannot
start with a colon ( ":"). ASCII control
characters are not supported as part of
dimension names.
* **Value** *(string) --*
The value of the dimension. Dimension
values must contain only ASCII
characters and must include at least one
non-whitespace character. ASCII control
characters are not supported as part of
dimension values.
* **Period** *(integer) --*
The granularity, in seconds, to be used for
the metric. For metrics with regular
resolution, a period can be as short as one
minute (60 seconds) and must be a multiple of
60. For high-resolution metrics that are
collected at intervals of less than one
minute, the period can be 1, 5, 10, 30, 60, or
any multiple of 60. High-resolution metrics
are those metrics stored by a "PutMetricData"
call that includes a "StorageResolution" of 1
second.
* **Stat** *(string) --*
The statistic to use for comparison to the
threshold. It can be any CloudWatch statistic
or extended statistic. For more information
about statistics, see CloudWatch statistics
definitions.
* **Unit** *(string) --*
If you omit "Unit" then all data that was
collected with any unit is returned, along
with the corresponding units that were
specified when the data was reported to
CloudWatch. If you specify a unit, the
operation returns only data that was collected
with that unit specified. If you specify a
unit that does not match the data collected,
the results of the operation are null.
CloudWatch does not perform unit conversions.
* **Expression** *(string) --*
This field can contain a metric math expression
to be performed on the other metrics that you
are retrieving within this "MetricDataQueries"
structure.
A math expression can use the "Id" of the other
metrics or queries to refer to those metrics,
and can also use the "Id" of other expressions
to use the result of those expressions. For more
information about metric math expressions, see
Metric Math Syntax and Functions in the *Amazon
CloudWatch User Guide*.
Within each "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but
not both.
* **Label** *(string) --*
A human-readable label for this metric or
expression. This is especially useful if this is
an expression, so that you know what the value
represents. If the metric or expression is shown
in a CloudWatch dashboard widget, the label is
shown. If "Label" is omitted, CloudWatch
generates a default.
You can put dynamic expressions into a label, so
that it is more descriptive. For more
information, see Using Dynamic Labels.
* **ReturnData** *(boolean) --*
Use this only if you are using a metric math
expression for the SLO. Specify "true" for
"ReturnData" for only the one expression result
to use as the alarm. For all other metrics and
expressions in the same
"CreateServiceLevelObjective" operation, specify
"ReturnData" as "false".
* **Period** *(integer) --*
The granularity, in seconds, of the returned
data points for this metric. For metrics with
regular resolution, a period can be as short as
one minute (60 seconds) and must be a multiple
of 60. For high-resolution metrics that are
collected at intervals of less than one minute,
the period can be 1, 5, 10, 30, 60, or any
multiple of 60. High-resolution metrics are
those metrics stored by a "PutMetricData" call
that includes a "StorageResolution" of 1 second.
If the "StartTime" parameter specifies a time
stamp that is greater than 3 hours ago, you must
specify the period as follows or no data points
in that time range is returned:
* Start time between 3 hours and 15 days ago -
Use a multiple of 60 seconds (1 minute).
* Start time between 15 and 63 days ago - Use a
multiple of 300 seconds (5 minutes).
* Start time greater than 63 days ago - Use a
multiple of 3600 seconds (1 hour).
* **AccountId** *(string) --*
The ID of the account where this metric is
located. If you are performing this operation in
a monitoring account, use this to specify which
source account to retrieve this metric from.
* **BadCountMetric** *(list) --*
If you want to count "bad requests" to determine the
percentage of successful requests for this request-
based SLO, specify the metric to use as "bad
requests" in this structure.
* *(dict) --*
Use this structure to define a metric or metric
math expression that you want to use as for a
service level objective.
Each "MetricDataQuery" in the "MetricDataQueries"
array specifies either a metric to retrieve, or a
metric math expression to be performed on
retrieved metrics. A single "MetricDataQueries"
array can include as many as 20 "MetricDataQuery"
structures in the array. The 20 structures can
include as many as 10 structures that contain a
"MetricStat" parameter to retrieve a metric, and
as many as 10 structures that contain the
"Expression" parameter to perform a math
expression. Of those "Expression" structures,
exactly one must have true as the value for
"ReturnData". The result of this expression used
for the SLO.
For more information about metric math
expressions, see CloudWatchUse metric math.
Within each "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but
not both.
* **Id** *(string) --*
A short name used to tie this object to the
results in the response. This "Id" must be
unique within a "MetricDataQueries" array. If
you are performing math expressions on this set
of data, this name represents that data and can
serve as a variable in the metric math
expression. The valid characters are letters,
numbers, and underscore. The first character
must be a lowercase letter.
* **MetricStat** *(dict) --*
A metric to be used directly for the SLO, or to
be used in the math expression that will be used
for the SLO.
Within one "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but
not both.
* **Metric** *(dict) --*
The metric to use as the service level
indicator, including the metric name,
namespace, and dimensions.
* **Namespace** *(string) --*
The namespace of the metric. For more
information, see Namespaces.
* **MetricName** *(string) --*
The name of the metric to use.
* **Dimensions** *(list) --*
An array of one or more dimensions to use to
define the metric that you want to use. For
more information, see Dimensions.
* *(dict) --*
A dimension is a name/value pair that is
part of the identity of a metric. Because
dimensions are part of the unique
identifier for a metric, whenever you add
a unique name/value pair to one of your
metrics, you are creating a new variation
of that metric. For example, many Amazon
EC2 metrics publish "InstanceId" as a
dimension name, and the actual instance ID
as the value for that dimension.
You can assign up to 30 dimensions to a
metric.
* **Name** *(string) --*
The name of the dimension. Dimension
names must contain only ASCII
characters, must include at least one
non-whitespace character, and cannot
start with a colon ( ":"). ASCII control
characters are not supported as part of
dimension names.
* **Value** *(string) --*
The value of the dimension. Dimension
values must contain only ASCII
characters and must include at least one
non-whitespace character. ASCII control
characters are not supported as part of
dimension values.
* **Period** *(integer) --*
The granularity, in seconds, to be used for
the metric. For metrics with regular
resolution, a period can be as short as one
minute (60 seconds) and must be a multiple of
60. For high-resolution metrics that are
collected at intervals of less than one
minute, the period can be 1, 5, 10, 30, 60, or
any multiple of 60. High-resolution metrics
are those metrics stored by a "PutMetricData"
call that includes a "StorageResolution" of 1
second.
* **Stat** *(string) --*
The statistic to use for comparison to the
threshold. It can be any CloudWatch statistic
or extended statistic. For more information
about statistics, see CloudWatch statistics
definitions.
* **Unit** *(string) --*
If you omit "Unit" then all data that was
collected with any unit is returned, along
with the corresponding units that were
specified when the data was reported to
CloudWatch. If you specify a unit, the
operation returns only data that was collected
with that unit specified. If you specify a
unit that does not match the data collected,
the results of the operation are null.
CloudWatch does not perform unit conversions.
* **Expression** *(string) --*
This field can contain a metric math expression
to be performed on the other metrics that you
are retrieving within this "MetricDataQueries"
structure.
A math expression can use the "Id" of the other
metrics or queries to refer to those metrics,
and can also use the "Id" of other expressions
to use the result of those expressions. For more
information about metric math expressions, see
Metric Math Syntax and Functions in the *Amazon
CloudWatch User Guide*.
Within each "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but
not both.
* **Label** *(string) --*
A human-readable label for this metric or
expression. This is especially useful if this is
an expression, so that you know what the value
represents. If the metric or expression is shown
in a CloudWatch dashboard widget, the label is
shown. If "Label" is omitted, CloudWatch
generates a default.
You can put dynamic expressions into a label, so
that it is more descriptive. For more
information, see Using Dynamic Labels.
* **ReturnData** *(boolean) --*
Use this only if you are using a metric math
expression for the SLO. Specify "true" for
"ReturnData" for only the one expression result
to use as the alarm. For all other metrics and
expressions in the same
"CreateServiceLevelObjective" operation, specify
"ReturnData" as "false".
* **Period** *(integer) --*
The granularity, in seconds, of the returned
data points for this metric. For metrics with
regular resolution, a period can be as short as
one minute (60 seconds) and must be a multiple
of 60. For high-resolution metrics that are
collected at intervals of less than one minute,
the period can be 1, 5, 10, 30, 60, or any
multiple of 60. High-resolution metrics are
those metrics stored by a "PutMetricData" call
that includes a "StorageResolution" of 1 second.
If the "StartTime" parameter specifies a time
stamp that is greater than 3 hours ago, you must
specify the period as follows or no data points
in that time range is returned:
* Start time between 3 hours and 15 days ago -
Use a multiple of 60 seconds (1 minute).
* Start time between 15 and 63 days ago - Use a
multiple of 300 seconds (5 minutes).
* Start time greater than 63 days ago - Use a
multiple of 3600 seconds (1 hour).
* **AccountId** *(string) --*
The ID of the account where this metric is
located. If you are performing this operation in
a monitoring account, use this to specify which
source account to retrieve this metric from.
* **DependencyConfig** *(dict) --*
Identifies the dependency using the
"DependencyKeyAttributes" and
"DependencyOperationName".
* **DependencyKeyAttributes** *(dict) --*
This is a string-to-string map. It can include the
following fields.
* "Type" designates the type of object this is.
* "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.
* *(string) --*
* *(string) --*
* **DependencyOperationName** *(string) --*
The name of the called operation in the dependency.
* **MetricThreshold** *(float) --*
This value is the threshold that the observed metric
values of the SLI metric are compared to.
* **ComparisonOperator** *(string) --*
The arithmetic operation used when comparing the
specified metric to the threshold.
* **EvaluationType** *(string) --*
Displays whether this is a period-based SLO or a request-
based SLO.
* **Goal** *(dict) --*
This structure contains the attributes that determine the
goal of an SLO. This includes the time period for
evaluation and the attainment threshold.
* **Interval** *(dict) --*
The time period used to evaluate the SLO. It can be
either a calendar interval or rolling interval.
If you omit this parameter, a rolling interval of 7 days
is used.
Note:
This is a Tagged Union structure. Only one of the
following top level keys will be set:
"RollingInterval", "CalendarInterval". If a client
receives an unknown member it will set
"SDK_UNKNOWN_MEMBER" as the top level key, which
maps to the name or tag of the unknown member. The
structure of "SDK_UNKNOWN_MEMBER" is as follows:
'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
* **RollingInterval** *(dict) --*
If the interval is a rolling interval, this structure
contains the interval specifications.
* **DurationUnit** *(string) --*
Specifies the rolling interval unit.
* **Duration** *(integer) --*
Specifies the duration of each rolling interval. For
example, if "Duration" is "7" and "DurationUnit" is
"DAY", each rolling interval is seven days.
* **CalendarInterval** *(dict) --*
If the interval is a calendar interval, this structure
contains the interval specifications.
* **StartTime** *(datetime) --*
The date and time when you want the first interval
to start. Be sure to choose a time that configures
the intervals the way that you want. For example, if
you want weekly intervals starting on Mondays at 6
a.m., be sure to specify a start time that is a
Monday at 6 a.m.
When used in a raw HTTP Query API, it is formatted
as be epoch time in seconds. For example:
"1698778057"
As soon as one calendar interval ends, another
automatically begins.
* **DurationUnit** *(string) --*
Specifies the calendar interval unit.
* **Duration** *(integer) --*
Specifies the duration of each calendar interval.
For example, if "Duration" is "1" and "DurationUnit"
is "MONTH", each interval is one month, aligned with
the calendar.
* **AttainmentGoal** *(float) --*
The threshold that determines if the goal is being met.
If this is a period-based SLO, the attainment goal is
the percentage of good periods that meet the threshold
requirements to the total periods within the interval.
For example, an attainment goal of 99.9% means that
within your interval, you are targeting 99.9% of the
periods to be in healthy state.
If this is a request-based SLO, the attainment goal is
the percentage of requests that must be successful to
meet the attainment goal.
If you omit this parameter, 99 is used to represent 99%
as the attainment goal.
* **WarningThreshold** *(float) --*
The percentage of remaining budget over total budget
that you want to get warnings for. If you omit this
parameter, the default of 50.0 is used.
* **BurnRateConfigurations** *(list) --*
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.
* *(dict) --*
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.
For example, if you specify 60 as the number of minutes
in the look-back window, the burn rate is calculated as
the following:
*burn rate = error rate over the look-back window /
(100% - attainment goal percentage)*
For more information about burn rates, see Calculate
burn rates.
* **LookBackWindowMinutes** *(integer) --*
The number of minutes to use as the look-back window.
* **MetricSourceType** *(string) --*
Displays the SLI metric source type for this SLO.
Supported types are:
* Service operation
* Service dependency
* CloudWatch metric
**Exceptions**
* "CloudWatchApplicationSignals.Client.exceptions.ValidationExcept
ion"
* "CloudWatchApplicationSignals.Client.exceptions.ThrottlingExcept
ion"
* "CloudWatchApplicationSignals.Client.exceptions.AccessDeniedExce
ption"
* "CloudWatchApplicationSignals.Client.exceptions.ServiceQuotaExce
ededException"
* "CloudWatchApplicationSignals.Client.exceptions.ConflictExceptio
n"
CloudWatchApplicationSignals / Client / get_service_level_objective
get_service_level_objective
***************************
CloudWatchApplicationSignals.Client.get_service_level_objective(**kwargs)
Returns information about one SLO created in the account.
See also: AWS API Documentation
**Request Syntax**
response = client.get_service_level_objective(
Id='string'
)
Parameters:
**Id** (*string*) --
**[REQUIRED]**
The ARN or name of the SLO that you want to retrieve information
about. You can find the ARNs of SLOs by using the
ListServiceLevelObjectives operation.
Return type:
dict
Returns:
**Response Syntax**
{
'Slo': {
'Arn': 'string',
'Name': 'string',
'Description': 'string',
'CreatedTime': datetime(2015, 1, 1),
'LastUpdatedTime': datetime(2015, 1, 1),
'Sli': {
'SliMetric': {
'KeyAttributes': {
'string': 'string'
},
'OperationName': 'string',
'MetricType': 'LATENCY'|'AVAILABILITY',
'MetricDataQueries': [
{
'Id': 'string',
'MetricStat': {
'Metric': {
'Namespace': 'string',
'MetricName': 'string',
'Dimensions': [
{
'Name': 'string',
'Value': 'string'
},
]
},
'Period': 123,
'Stat': 'string',
'Unit': 'Microseconds'|'Milliseconds'|'Seconds'|'Bytes'|'Kilobytes'|'Megabytes'|'Gigabytes'|'Terabytes'|'Bits'|'Kilobits'|'Megabits'|'Gigabits'|'Terabits'|'Percent'|'Count'|'Bytes/Second'|'Kilobytes/Second'|'Megabytes/Second'|'Gigabytes/Second'|'Terabytes/Second'|'Bits/Second'|'Kilobits/Second'|'Megabits/Second'|'Gigabits/Second'|'Terabits/Second'|'Count/Second'|'None'
},
'Expression': 'string',
'Label': 'string',
'ReturnData': True|False,
'Period': 123,
'AccountId': 'string'
},
],
'DependencyConfig': {
'DependencyKeyAttributes': {
'string': 'string'
},
'DependencyOperationName': 'string'
}
},
'MetricThreshold': 123.0,
'ComparisonOperator': 'GreaterThanOrEqualTo'|'GreaterThan'|'LessThan'|'LessThanOrEqualTo'
},
'RequestBasedSli': {
'RequestBasedSliMetric': {
'KeyAttributes': {
'string': 'string'
},
'OperationName': 'string',
'MetricType': 'LATENCY'|'AVAILABILITY',
'TotalRequestCountMetric': [
{
'Id': 'string',
'MetricStat': {
'Metric': {
'Namespace': 'string',
'MetricName': 'string',
'Dimensions': [
{
'Name': 'string',
'Value': 'string'
},
]
},
'Period': 123,
'Stat': 'string',
'Unit': 'Microseconds'|'Milliseconds'|'Seconds'|'Bytes'|'Kilobytes'|'Megabytes'|'Gigabytes'|'Terabytes'|'Bits'|'Kilobits'|'Megabits'|'Gigabits'|'Terabits'|'Percent'|'Count'|'Bytes/Second'|'Kilobytes/Second'|'Megabytes/Second'|'Gigabytes/Second'|'Terabytes/Second'|'Bits/Second'|'Kilobits/Second'|'Megabits/Second'|'Gigabits/Second'|'Terabits/Second'|'Count/Second'|'None'
},
'Expression': 'string',
'Label': 'string',
'ReturnData': True|False,
'Period': 123,
'AccountId': 'string'
},
],
'MonitoredRequestCountMetric': {
'GoodCountMetric': [
{
'Id': 'string',
'MetricStat': {
'Metric': {
'Namespace': 'string',
'MetricName': 'string',
'Dimensions': [
{
'Name': 'string',
'Value': 'string'
},
]
},
'Period': 123,
'Stat': 'string',
'Unit': 'Microseconds'|'Milliseconds'|'Seconds'|'Bytes'|'Kilobytes'|'Megabytes'|'Gigabytes'|'Terabytes'|'Bits'|'Kilobits'|'Megabits'|'Gigabits'|'Terabits'|'Percent'|'Count'|'Bytes/Second'|'Kilobytes/Second'|'Megabytes/Second'|'Gigabytes/Second'|'Terabytes/Second'|'Bits/Second'|'Kilobits/Second'|'Megabits/Second'|'Gigabits/Second'|'Terabits/Second'|'Count/Second'|'None'
},
'Expression': 'string',
'Label': 'string',
'ReturnData': True|False,
'Period': 123,
'AccountId': 'string'
},
],
'BadCountMetric': [
{
'Id': 'string',
'MetricStat': {
'Metric': {
'Namespace': 'string',
'MetricName': 'string',
'Dimensions': [
{
'Name': 'string',
'Value': 'string'
},
]
},
'Period': 123,
'Stat': 'string',
'Unit': 'Microseconds'|'Milliseconds'|'Seconds'|'Bytes'|'Kilobytes'|'Megabytes'|'Gigabytes'|'Terabytes'|'Bits'|'Kilobits'|'Megabits'|'Gigabits'|'Terabits'|'Percent'|'Count'|'Bytes/Second'|'Kilobytes/Second'|'Megabytes/Second'|'Gigabytes/Second'|'Terabytes/Second'|'Bits/Second'|'Kilobits/Second'|'Megabits/Second'|'Gigabits/Second'|'Terabits/Second'|'Count/Second'|'None'
},
'Expression': 'string',
'Label': 'string',
'ReturnData': True|False,
'Period': 123,
'AccountId': 'string'
},
]
},
'DependencyConfig': {
'DependencyKeyAttributes': {
'string': 'string'
},
'DependencyOperationName': 'string'
}
},
'MetricThreshold': 123.0,
'ComparisonOperator': 'GreaterThanOrEqualTo'|'GreaterThan'|'LessThan'|'LessThanOrEqualTo'
},
'EvaluationType': 'PeriodBased'|'RequestBased',
'Goal': {
'Interval': {
'RollingInterval': {
'DurationUnit': 'MINUTE'|'HOUR'|'DAY'|'MONTH',
'Duration': 123
},
'CalendarInterval': {
'StartTime': datetime(2015, 1, 1),
'DurationUnit': 'MINUTE'|'HOUR'|'DAY'|'MONTH',
'Duration': 123
}
},
'AttainmentGoal': 123.0,
'WarningThreshold': 123.0
},
'BurnRateConfigurations': [
{
'LookBackWindowMinutes': 123
},
],
'MetricSourceType': 'ServiceOperation'|'CloudWatchMetric'|'ServiceDependency'
}
}
**Response Structure**
* *(dict) --*
* **Slo** *(dict) --*
A structure containing the information about the SLO.
* **Arn** *(string) --*
The ARN of this SLO.
* **Name** *(string) --*
The name of this SLO.
* **Description** *(string) --*
The description that you created for this SLO.
* **CreatedTime** *(datetime) --*
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".
* **LastUpdatedTime** *(datetime) --*
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".
* **Sli** *(dict) --*
A structure containing information about the performance
metric that this SLO monitors, if this is a period-based
SLO.
* **SliMetric** *(dict) --*
A structure that contains information about the metric
that the SLO monitors.
* **KeyAttributes** *(dict) --*
This is a string-to-string map that contains
information about the type of object that this SLO is
related to. It can include the following fields.
* "Type" designates the type of object that this SLO
is related to.
* "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.
* *(string) --*
* *(string) --*
* **OperationName** *(string) --*
If the SLO monitors a specific operation of the
service, this field displays that operation name.
* **MetricType** *(string) --*
If the SLO monitors either the "LATENCY" or
"AVAILABILITY" metric that Application Signals
collects, this field displays which of those metrics
is used.
* **MetricDataQueries** *(list) --*
If this SLO monitors a CloudWatch metric or the result
of a CloudWatch metric math expression, this structure
includes the information about that metric or
expression.
* *(dict) --*
Use this structure to define a metric or metric math
expression that you want to use as for a service
level objective.
Each "MetricDataQuery" in the "MetricDataQueries"
array specifies either a metric to retrieve, or a
metric math expression to be performed on retrieved
metrics. A single "MetricDataQueries" array can
include as many as 20 "MetricDataQuery" structures
in the array. The 20 structures can include as many
as 10 structures that contain a "MetricStat"
parameter to retrieve a metric, and as many as 10
structures that contain the "Expression" parameter
to perform a math expression. Of those "Expression"
structures, exactly one must have true as the value
for "ReturnData". The result of this expression used
for the SLO.
For more information about metric math expressions,
see CloudWatchUse metric math.
Within each "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but not
both.
* **Id** *(string) --*
A short name used to tie this object to the
results in the response. This "Id" must be unique
within a "MetricDataQueries" array. If you are
performing math expressions on this set of data,
this name represents that data and can serve as a
variable in the metric math expression. The valid
characters are letters, numbers, and underscore.
The first character must be a lowercase letter.
* **MetricStat** *(dict) --*
A metric to be used directly for the SLO, or to be
used in the math expression that will be used for
the SLO.
Within one "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but
not both.
* **Metric** *(dict) --*
The metric to use as the service level
indicator, including the metric name, namespace,
and dimensions.
* **Namespace** *(string) --*
The namespace of the metric. For more
information, see Namespaces.
* **MetricName** *(string) --*
The name of the metric to use.
* **Dimensions** *(list) --*
An array of one or more dimensions to use to
define the metric that you want to use. For
more information, see Dimensions.
* *(dict) --*
A dimension is a name/value pair that is
part of the identity of a metric. Because
dimensions are part of the unique identifier
for a metric, whenever you add a unique
name/value pair to one of your metrics, you
are creating a new variation of that metric.
For example, many Amazon EC2 metrics publish
"InstanceId" as a dimension name, and the
actual instance ID as the value for that
dimension.
You can assign up to 30 dimensions to a
metric.
* **Name** *(string) --*
The name of the dimension. Dimension names
must contain only ASCII characters, must
include at least one non-whitespace
character, and cannot start with a colon (
":"). ASCII control characters are not
supported as part of dimension names.
* **Value** *(string) --*
The value of the dimension. Dimension
values must contain only ASCII characters
and must include at least one non-
whitespace character. ASCII control
characters are not supported as part of
dimension values.
* **Period** *(integer) --*
The granularity, in seconds, to be used for the
metric. For metrics with regular resolution, a
period can be as short as one minute (60
seconds) and must be a multiple of 60. For high-
resolution metrics that are collected at
intervals of less than one minute, the period
can be 1, 5, 10, 30, 60, or any multiple of 60.
High-resolution metrics are those metrics stored
by a "PutMetricData" call that includes a
"StorageResolution" of 1 second.
* **Stat** *(string) --*
The statistic to use for comparison to the
threshold. It can be any CloudWatch statistic or
extended statistic. For more information about
statistics, see CloudWatch statistics
definitions.
* **Unit** *(string) --*
If you omit "Unit" then all data that was
collected with any unit is returned, along with
the corresponding units that were specified when
the data was reported to CloudWatch. If you
specify a unit, the operation returns only data
that was collected with that unit specified. If
you specify a unit that does not match the data
collected, the results of the operation are
null. CloudWatch does not perform unit
conversions.
* **Expression** *(string) --*
This field can contain a metric math expression to
be performed on the other metrics that you are
retrieving within this "MetricDataQueries"
structure.
A math expression can use the "Id" of the other
metrics or queries to refer to those metrics, and
can also use the "Id" of other expressions to use
the result of those expressions. For more
information about metric math expressions, see
Metric Math Syntax and Functions in the *Amazon
CloudWatch User Guide*.
Within each "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but
not both.
* **Label** *(string) --*
A human-readable label for this metric or
expression. This is especially useful if this is
an expression, so that you know what the value
represents. If the metric or expression is shown
in a CloudWatch dashboard widget, the label is
shown. If "Label" is omitted, CloudWatch generates
a default.
You can put dynamic expressions into a label, so
that it is more descriptive. For more information,
see Using Dynamic Labels.
* **ReturnData** *(boolean) --*
Use this only if you are using a metric math
expression for the SLO. Specify "true" for
"ReturnData" for only the one expression result to
use as the alarm. For all other metrics and
expressions in the same
"CreateServiceLevelObjective" operation, specify
"ReturnData" as "false".
* **Period** *(integer) --*
The granularity, in seconds, of the returned data
points for this metric. For metrics with regular
resolution, a period can be as short as one minute
(60 seconds) and must be a multiple of 60. For
high-resolution metrics that are collected at
intervals of less than one minute, the period can
be 1, 5, 10, 30, 60, or any multiple of 60. High-
resolution metrics are those metrics stored by a
"PutMetricData" call that includes a
"StorageResolution" of 1 second.
If the "StartTime" parameter specifies a time
stamp that is greater than 3 hours ago, you must
specify the period as follows or no data points in
that time range is returned:
* Start time between 3 hours and 15 days ago - Use
a multiple of 60 seconds (1 minute).
* Start time between 15 and 63 days ago - Use a
multiple of 300 seconds (5 minutes).
* Start time greater than 63 days ago - Use a
multiple of 3600 seconds (1 hour).
* **AccountId** *(string) --*
The ID of the account where this metric is
located. If you are performing this operation in a
monitoring account, use this to specify which
source account to retrieve this metric from.
* **DependencyConfig** *(dict) --*
Identifies the dependency using the
"DependencyKeyAttributes" and
"DependencyOperationName".
* **DependencyKeyAttributes** *(dict) --*
This is a string-to-string map. It can include the
following fields.
* "Type" designates the type of object this is.
* "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.
* *(string) --*
* *(string) --*
* **DependencyOperationName** *(string) --*
The name of the called operation in the dependency.
* **MetricThreshold** *(float) --*
The value that the SLI metric is compared to.
* **ComparisonOperator** *(string) --*
The arithmetic operation used when comparing the
specified metric to the threshold.
* **RequestBasedSli** *(dict) --*
A structure containing information about the performance
metric that this SLO monitors, if this is a request-based
SLO.
* **RequestBasedSliMetric** *(dict) --*
A structure that contains information about the metric
that the SLO monitors.
* **KeyAttributes** *(dict) --*
This is a string-to-string map that contains
information about the type of object that this SLO is
related to. It can include the following fields.
* "Type" designates the type of object that this SLO
is related to.
* "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.
* *(string) --*
* *(string) --*
* **OperationName** *(string) --*
If the SLO monitors a specific operation of the
service, this field displays that operation name.
* **MetricType** *(string) --*
If the SLO monitors either the "LATENCY" or
"AVAILABILITY" metric that Application Signals
collects, this field displays which of those metrics
is used.
* **TotalRequestCountMetric** *(list) --*
This structure defines the metric that is used as the
"total requests" number for a request-based SLO. The
number observed for this metric is divided by the
number of "good requests" or "bad requests" that is
observed for the metric defined in
"MonitoredRequestCountMetric".
* *(dict) --*
Use this structure to define a metric or metric math
expression that you want to use as for a service
level objective.
Each "MetricDataQuery" in the "MetricDataQueries"
array specifies either a metric to retrieve, or a
metric math expression to be performed on retrieved
metrics. A single "MetricDataQueries" array can
include as many as 20 "MetricDataQuery" structures
in the array. The 20 structures can include as many
as 10 structures that contain a "MetricStat"
parameter to retrieve a metric, and as many as 10
structures that contain the "Expression" parameter
to perform a math expression. Of those "Expression"
structures, exactly one must have true as the value
for "ReturnData". The result of this expression used
for the SLO.
For more information about metric math expressions,
see CloudWatchUse metric math.
Within each "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but not
both.
* **Id** *(string) --*
A short name used to tie this object to the
results in the response. This "Id" must be unique
within a "MetricDataQueries" array. If you are
performing math expressions on this set of data,
this name represents that data and can serve as a
variable in the metric math expression. The valid
characters are letters, numbers, and underscore.
The first character must be a lowercase letter.
* **MetricStat** *(dict) --*
A metric to be used directly for the SLO, or to be
used in the math expression that will be used for
the SLO.
Within one "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but
not both.
* **Metric** *(dict) --*
The metric to use as the service level
indicator, including the metric name, namespace,
and dimensions.
* **Namespace** *(string) --*
The namespace of the metric. For more
information, see Namespaces.
* **MetricName** *(string) --*
The name of the metric to use.
* **Dimensions** *(list) --*
An array of one or more dimensions to use to
define the metric that you want to use. For
more information, see Dimensions.
* *(dict) --*
A dimension is a name/value pair that is
part of the identity of a metric. Because
dimensions are part of the unique identifier
for a metric, whenever you add a unique
name/value pair to one of your metrics, you
are creating a new variation of that metric.
For example, many Amazon EC2 metrics publish
"InstanceId" as a dimension name, and the
actual instance ID as the value for that
dimension.
You can assign up to 30 dimensions to a
metric.
* **Name** *(string) --*
The name of the dimension. Dimension names
must contain only ASCII characters, must
include at least one non-whitespace
character, and cannot start with a colon (
":"). ASCII control characters are not
supported as part of dimension names.
* **Value** *(string) --*
The value of the dimension. Dimension
values must contain only ASCII characters
and must include at least one non-
whitespace character. ASCII control
characters are not supported as part of
dimension values.
* **Period** *(integer) --*
The granularity, in seconds, to be used for the
metric. For metrics with regular resolution, a
period can be as short as one minute (60
seconds) and must be a multiple of 60. For high-
resolution metrics that are collected at
intervals of less than one minute, the period
can be 1, 5, 10, 30, 60, or any multiple of 60.
High-resolution metrics are those metrics stored
by a "PutMetricData" call that includes a
"StorageResolution" of 1 second.
* **Stat** *(string) --*
The statistic to use for comparison to the
threshold. It can be any CloudWatch statistic or
extended statistic. For more information about
statistics, see CloudWatch statistics
definitions.
* **Unit** *(string) --*
If you omit "Unit" then all data that was
collected with any unit is returned, along with
the corresponding units that were specified when
the data was reported to CloudWatch. If you
specify a unit, the operation returns only data
that was collected with that unit specified. If
you specify a unit that does not match the data
collected, the results of the operation are
null. CloudWatch does not perform unit
conversions.
* **Expression** *(string) --*
This field can contain a metric math expression to
be performed on the other metrics that you are
retrieving within this "MetricDataQueries"
structure.
A math expression can use the "Id" of the other
metrics or queries to refer to those metrics, and
can also use the "Id" of other expressions to use
the result of those expressions. For more
information about metric math expressions, see
Metric Math Syntax and Functions in the *Amazon
CloudWatch User Guide*.
Within each "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but
not both.
* **Label** *(string) --*
A human-readable label for this metric or
expression. This is especially useful if this is
an expression, so that you know what the value
represents. If the metric or expression is shown
in a CloudWatch dashboard widget, the label is
shown. If "Label" is omitted, CloudWatch generates
a default.
You can put dynamic expressions into a label, so
that it is more descriptive. For more information,
see Using Dynamic Labels.
* **ReturnData** *(boolean) --*
Use this only if you are using a metric math
expression for the SLO. Specify "true" for
"ReturnData" for only the one expression result to
use as the alarm. For all other metrics and
expressions in the same
"CreateServiceLevelObjective" operation, specify
"ReturnData" as "false".
* **Period** *(integer) --*
The granularity, in seconds, of the returned data
points for this metric. For metrics with regular
resolution, a period can be as short as one minute
(60 seconds) and must be a multiple of 60. For
high-resolution metrics that are collected at
intervals of less than one minute, the period can
be 1, 5, 10, 30, 60, or any multiple of 60. High-
resolution metrics are those metrics stored by a
"PutMetricData" call that includes a
"StorageResolution" of 1 second.
If the "StartTime" parameter specifies a time
stamp that is greater than 3 hours ago, you must
specify the period as follows or no data points in
that time range is returned:
* Start time between 3 hours and 15 days ago - Use
a multiple of 60 seconds (1 minute).
* Start time between 15 and 63 days ago - Use a
multiple of 300 seconds (5 minutes).
* Start time greater than 63 days ago - Use a
multiple of 3600 seconds (1 hour).
* **AccountId** *(string) --*
The ID of the account where this metric is
located. If you are performing this operation in a
monitoring account, use this to specify which
source account to retrieve this metric from.
* **MonitoredRequestCountMetric** *(dict) --*
This structure defines the metric that is used as the
"good request" or "bad request" value for a request-
based SLO. This value observed for the metric defined
in "TotalRequestCountMetric" is divided by the number
found for "MonitoredRequestCountMetric" to determine
the percentage of successful requests that this SLO
tracks.
Note:
This is a Tagged Union structure. Only one of the
following top level keys will be set:
"GoodCountMetric", "BadCountMetric". If a client
receives an unknown member it will set
"SDK_UNKNOWN_MEMBER" as the top level key, which
maps to the name or tag of the unknown member.
The structure of "SDK_UNKNOWN_MEMBER" is as
follows:
'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
* **GoodCountMetric** *(list) --*
If you want to count "good requests" to determine
the percentage of successful requests for this
request-based SLO, specify the metric to use as
"good requests" in this structure.
* *(dict) --*
Use this structure to define a metric or metric
math expression that you want to use as for a
service level objective.
Each "MetricDataQuery" in the "MetricDataQueries"
array specifies either a metric to retrieve, or a
metric math expression to be performed on
retrieved metrics. A single "MetricDataQueries"
array can include as many as 20 "MetricDataQuery"
structures in the array. The 20 structures can
include as many as 10 structures that contain a
"MetricStat" parameter to retrieve a metric, and
as many as 10 structures that contain the
"Expression" parameter to perform a math
expression. Of those "Expression" structures,
exactly one must have true as the value for
"ReturnData". The result of this expression used
for the SLO.
For more information about metric math
expressions, see CloudWatchUse metric math.
Within each "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but
not both.
* **Id** *(string) --*
A short name used to tie this object to the
results in the response. This "Id" must be
unique within a "MetricDataQueries" array. If
you are performing math expressions on this set
of data, this name represents that data and can
serve as a variable in the metric math
expression. The valid characters are letters,
numbers, and underscore. The first character
must be a lowercase letter.
* **MetricStat** *(dict) --*
A metric to be used directly for the SLO, or to
be used in the math expression that will be used
for the SLO.
Within one "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but
not both.
* **Metric** *(dict) --*
The metric to use as the service level
indicator, including the metric name,
namespace, and dimensions.
* **Namespace** *(string) --*
The namespace of the metric. For more
information, see Namespaces.
* **MetricName** *(string) --*
The name of the metric to use.
* **Dimensions** *(list) --*
An array of one or more dimensions to use to
define the metric that you want to use. For
more information, see Dimensions.
* *(dict) --*
A dimension is a name/value pair that is
part of the identity of a metric. Because
dimensions are part of the unique
identifier for a metric, whenever you add
a unique name/value pair to one of your
metrics, you are creating a new variation
of that metric. For example, many Amazon
EC2 metrics publish "InstanceId" as a
dimension name, and the actual instance ID
as the value for that dimension.
You can assign up to 30 dimensions to a
metric.
* **Name** *(string) --*
The name of the dimension. Dimension
names must contain only ASCII
characters, must include at least one
non-whitespace character, and cannot
start with a colon ( ":"). ASCII control
characters are not supported as part of
dimension names.
* **Value** *(string) --*
The value of the dimension. Dimension
values must contain only ASCII
characters and must include at least one
non-whitespace character. ASCII control
characters are not supported as part of
dimension values.
* **Period** *(integer) --*
The granularity, in seconds, to be used for
the metric. For metrics with regular
resolution, a period can be as short as one
minute (60 seconds) and must be a multiple of
60. For high-resolution metrics that are
collected at intervals of less than one
minute, the period can be 1, 5, 10, 30, 60, or
any multiple of 60. High-resolution metrics
are those metrics stored by a "PutMetricData"
call that includes a "StorageResolution" of 1
second.
* **Stat** *(string) --*
The statistic to use for comparison to the
threshold. It can be any CloudWatch statistic
or extended statistic. For more information
about statistics, see CloudWatch statistics
definitions.
* **Unit** *(string) --*
If you omit "Unit" then all data that was
collected with any unit is returned, along
with the corresponding units that were
specified when the data was reported to
CloudWatch. If you specify a unit, the
operation returns only data that was collected
with that unit specified. If you specify a
unit that does not match the data collected,
the results of the operation are null.
CloudWatch does not perform unit conversions.
* **Expression** *(string) --*
This field can contain a metric math expression
to be performed on the other metrics that you
are retrieving within this "MetricDataQueries"
structure.
A math expression can use the "Id" of the other
metrics or queries to refer to those metrics,
and can also use the "Id" of other expressions
to use the result of those expressions. For more
information about metric math expressions, see
Metric Math Syntax and Functions in the *Amazon
CloudWatch User Guide*.
Within each "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but
not both.
* **Label** *(string) --*
A human-readable label for this metric or
expression. This is especially useful if this is
an expression, so that you know what the value
represents. If the metric or expression is shown
in a CloudWatch dashboard widget, the label is
shown. If "Label" is omitted, CloudWatch
generates a default.
You can put dynamic expressions into a label, so
that it is more descriptive. For more
information, see Using Dynamic Labels.
* **ReturnData** *(boolean) --*
Use this only if you are using a metric math
expression for the SLO. Specify "true" for
"ReturnData" for only the one expression result
to use as the alarm. For all other metrics and
expressions in the same
"CreateServiceLevelObjective" operation, specify
"ReturnData" as "false".
* **Period** *(integer) --*
The granularity, in seconds, of the returned
data points for this metric. For metrics with
regular resolution, a period can be as short as
one minute (60 seconds) and must be a multiple
of 60. For high-resolution metrics that are
collected at intervals of less than one minute,
the period can be 1, 5, 10, 30, 60, or any
multiple of 60. High-resolution metrics are
those metrics stored by a "PutMetricData" call
that includes a "StorageResolution" of 1 second.
If the "StartTime" parameter specifies a time
stamp that is greater than 3 hours ago, you must
specify the period as follows or no data points
in that time range is returned:
* Start time between 3 hours and 15 days ago -
Use a multiple of 60 seconds (1 minute).
* Start time between 15 and 63 days ago - Use a
multiple of 300 seconds (5 minutes).
* Start time greater than 63 days ago - Use a
multiple of 3600 seconds (1 hour).
* **AccountId** *(string) --*
The ID of the account where this metric is
located. If you are performing this operation in
a monitoring account, use this to specify which
source account to retrieve this metric from.
* **BadCountMetric** *(list) --*
If you want to count "bad requests" to determine the
percentage of successful requests for this request-
based SLO, specify the metric to use as "bad
requests" in this structure.
* *(dict) --*
Use this structure to define a metric or metric
math expression that you want to use as for a
service level objective.
Each "MetricDataQuery" in the "MetricDataQueries"
array specifies either a metric to retrieve, or a
metric math expression to be performed on
retrieved metrics. A single "MetricDataQueries"
array can include as many as 20 "MetricDataQuery"
structures in the array. The 20 structures can
include as many as 10 structures that contain a
"MetricStat" parameter to retrieve a metric, and
as many as 10 structures that contain the
"Expression" parameter to perform a math
expression. Of those "Expression" structures,
exactly one must have true as the value for
"ReturnData". The result of this expression used
for the SLO.
For more information about metric math
expressions, see CloudWatchUse metric math.
Within each "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but
not both.
* **Id** *(string) --*
A short name used to tie this object to the
results in the response. This "Id" must be
unique within a "MetricDataQueries" array. If
you are performing math expressions on this set
of data, this name represents that data and can
serve as a variable in the metric math
expression. The valid characters are letters,
numbers, and underscore. The first character
must be a lowercase letter.
* **MetricStat** *(dict) --*
A metric to be used directly for the SLO, or to
be used in the math expression that will be used
for the SLO.
Within one "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but
not both.
* **Metric** *(dict) --*
The metric to use as the service level
indicator, including the metric name,
namespace, and dimensions.
* **Namespace** *(string) --*
The namespace of the metric. For more
information, see Namespaces.
* **MetricName** *(string) --*
The name of the metric to use.
* **Dimensions** *(list) --*
An array of one or more dimensions to use to
define the metric that you want to use. For
more information, see Dimensions.
* *(dict) --*
A dimension is a name/value pair that is
part of the identity of a metric. Because
dimensions are part of the unique
identifier for a metric, whenever you add
a unique name/value pair to one of your
metrics, you are creating a new variation
of that metric. For example, many Amazon
EC2 metrics publish "InstanceId" as a
dimension name, and the actual instance ID
as the value for that dimension.
You can assign up to 30 dimensions to a
metric.
* **Name** *(string) --*
The name of the dimension. Dimension
names must contain only ASCII
characters, must include at least one
non-whitespace character, and cannot
start with a colon ( ":"). ASCII control
characters are not supported as part of
dimension names.
* **Value** *(string) --*
The value of the dimension. Dimension
values must contain only ASCII
characters and must include at least one
non-whitespace character. ASCII control
characters are not supported as part of
dimension values.
* **Period** *(integer) --*
The granularity, in seconds, to be used for
the metric. For metrics with regular
resolution, a period can be as short as one
minute (60 seconds) and must be a multiple of
60. For high-resolution metrics that are
collected at intervals of less than one
minute, the period can be 1, 5, 10, 30, 60, or
any multiple of 60. High-resolution metrics
are those metrics stored by a "PutMetricData"
call that includes a "StorageResolution" of 1
second.
* **Stat** *(string) --*
The statistic to use for comparison to the
threshold. It can be any CloudWatch statistic
or extended statistic. For more information
about statistics, see CloudWatch statistics
definitions.
* **Unit** *(string) --*
If you omit "Unit" then all data that was
collected with any unit is returned, along
with the corresponding units that were
specified when the data was reported to
CloudWatch. If you specify a unit, the
operation returns only data that was collected
with that unit specified. If you specify a
unit that does not match the data collected,
the results of the operation are null.
CloudWatch does not perform unit conversions.
* **Expression** *(string) --*
This field can contain a metric math expression
to be performed on the other metrics that you
are retrieving within this "MetricDataQueries"
structure.
A math expression can use the "Id" of the other
metrics or queries to refer to those metrics,
and can also use the "Id" of other expressions
to use the result of those expressions. For more
information about metric math expressions, see
Metric Math Syntax and Functions in the *Amazon
CloudWatch User Guide*.
Within each "MetricDataQuery" object, you must
specify either "Expression" or "MetricStat" but
not both.
* **Label** *(string) --*
A human-readable label for this metric or
expression. This is especially useful if this is
an expression, so that you know what the value
represents. If the metric or expression is shown
in a CloudWatch dashboard widget, the label is
shown. If "Label" is omitted, CloudWatch
generates a default.
You can put dynamic expressions into a label, so
that it is more descriptive. For more
information, see Using Dynamic Labels.
* **ReturnData** *(boolean) --*
Use this only if you are using a metric math
expression for the SLO. Specify "true" for
"ReturnData" for only the one expression result
to use as the alarm. For all other metrics and
expressions in the same
"CreateServiceLevelObjective" operation, specify
"ReturnData" as "false".
* **Period** *(integer) --*
The granularity, in seconds, of the returned
data points for this metric. For metrics with
regular resolution, a period can be as short as
one minute (60 seconds) and must be a multiple
of 60. For high-resolution metrics that are
collected at intervals of less than one minute,
the period can be 1, 5, 10, 30, 60, or any
multiple of 60. High-resolution metrics are
those metrics stored by a "PutMetricData" call
that includes a "StorageResolution" of 1 second.
If the "StartTime" parameter specifies a time
stamp that is greater than 3 hours ago, you must
specify the period as follows or no data points
in that time range is returned:
* Start time between 3 hours and 15 days ago -
Use a multiple of 60 seconds (1 minute).
* Start time between 15 and 63 days ago - Use a
multiple of 300 seconds (5 minutes).
* Start time greater than 63 days ago - Use a
multiple of 3600 seconds (1 hour).
* **AccountId** *(string) --*
The ID of the account where this metric is
located. If you are performing this operation in
a monitoring account, use this to specify which
source account to retrieve this metric from.
* **DependencyConfig** *(dict) --*
Identifies the dependency using the
"DependencyKeyAttributes" and
"DependencyOperationName".
* **DependencyKeyAttributes** *(dict) --*
This is a string-to-string map. It can include the
following fields.
* "Type" designates the type of object this is.
* "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.
* *(string) --*
* *(string) --*
* **DependencyOperationName** *(string) --*
The name of the called operation in the dependency.
* **MetricThreshold** *(float) --*
This value is the threshold that the observed metric
values of the SLI metric are compared to.
* **ComparisonOperator** *(string) --*
The arithmetic operation used when comparing the
specified metric to the threshold.
* **EvaluationType** *(string) --*
Displays whether this is a period-based SLO or a request-
based SLO.
* **Goal** *(dict) --*
This structure contains the attributes that determine the
goal of an SLO. This includes the time period for
evaluation and the attainment threshold.
* **Interval** *(dict) --*
The time period used to evaluate the SLO. It can be
either a calendar interval or rolling interval.
If you omit this parameter, a rolling interval of 7 days
is used.
Note:
This is a Tagged Union structure. Only one of the
following top level keys will be set:
"RollingInterval", "CalendarInterval". If a client
receives an unknown member it will set
"SDK_UNKNOWN_MEMBER" as the top level key, which
maps to the name or tag of the unknown member. The
structure of "SDK_UNKNOWN_MEMBER" is as follows:
'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
* **RollingInterval** *(dict) --*
If the interval is a rolling interval, this structure
contains the interval specifications.
* **DurationUnit** *(string) --*
Specifies the rolling interval unit.
* **Duration** *(integer) --*
Specifies the duration of each rolling interval. For
example, if "Duration" is "7" and "DurationUnit" is
"DAY", each rolling interval is seven days.
* **CalendarInterval** *(dict) --*
If the interval is a calendar interval, this structure
contains the interval specifications.
* **StartTime** *(datetime) --*
The date and time when you want the first interval
to start. Be sure to choose a time that configures
the intervals the way that you want. For example, if
you want weekly intervals starting on Mondays at 6
a.m., be sure to specify a start time that is a
Monday at 6 a.m.
When used in a raw HTTP Query API, it is formatted
as be epoch time in seconds. For example:
"1698778057"
As soon as one calendar interval ends, another
automatically begins.
* **DurationUnit** *(string) --*
Specifies the calendar interval unit.
* **Duration** *(integer) --*
Specifies the duration of each calendar interval.
For example, if "Duration" is "1" and "DurationUnit"
is "MONTH", each interval is one month, aligned with
the calendar.
* **AttainmentGoal** *(float) --*
The threshold that determines if the goal is being met.
If this is a period-based SLO, the attainment goal is
the percentage of good periods that meet the threshold
requirements to the total periods within the interval.
For example, an attainment goal of 99.9% means that
within your interval, you are targeting 99.9% of the
periods to be in healthy state.
If this is a request-based SLO, the attainment goal is
the percentage of requests that must be successful to
meet the attainment goal.
If you omit this parameter, 99 is used to represent 99%
as the attainment goal.
* **WarningThreshold** *(float) --*
The percentage of remaining budget over total budget
that you want to get warnings for. If you omit this
parameter, the default of 50.0 is used.
* **BurnRateConfigurations** *(list) --*
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.
* *(dict) --*
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.
For example, if you specify 60 as the number of minutes
in the look-back window, the burn rate is calculated as
the following:
*burn rate = error rate over the look-back window /
(100% - attainment goal percentage)*
For more information about burn rates, see Calculate
burn rates.
* **LookBackWindowMinutes** *(integer) --*
The number of minutes to use as the look-back window.
* **MetricSourceType** *(string) --*
Displays the SLI metric source type for this SLO.
Supported types are:
* Service operation
* Service dependency
* CloudWatch metric
**Exceptions**
* "CloudWatchApplicationSignals.Client.exceptions.ValidationExcept
ion"
* "CloudWatchApplicationSignals.Client.exceptions.ResourceNotFound
Exception"
* "CloudWatchApplicationSignals.Client.exceptions.ThrottlingExcept
ion"