CfnServiceLevelObjective

class aws_cdk.aws_applicationsignals.CfnServiceLevelObjective(scope, id, *, name, description=None, goal=None, request_based_sli=None, sli=None, tags=None)

Bases: CfnResource

Creates or updates 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 . An attainment goal is the percentage of time or requests that the SLI is expected to meet the threshold over each time 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.

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.

When you call this 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

You can easily set SLO targets for your applications that are discovered by Application Signals, using critical metrics such as latency and availability. You can also set SLOs against any CloudWatch metric or math expression that produces a time series.

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

For more information about SLOs, see Service level objectives (SLOs) .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-applicationsignals-servicelevelobjective.html

CloudformationResource:

AWS::ApplicationSignals::ServiceLevelObjective

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_applicationsignals as applicationsignals

cfn_service_level_objective = applicationsignals.CfnServiceLevelObjective(self, "MyCfnServiceLevelObjective",
    name="name",

    # the properties below are optional
    description="description",
    goal=applicationsignals.CfnServiceLevelObjective.GoalProperty(
        attainment_goal=123,
        interval=applicationsignals.CfnServiceLevelObjective.IntervalProperty(
            calendar_interval=applicationsignals.CfnServiceLevelObjective.CalendarIntervalProperty(
                duration=123,
                duration_unit="durationUnit",
                start_time=123
            ),
            rolling_interval=applicationsignals.CfnServiceLevelObjective.RollingIntervalProperty(
                duration=123,
                duration_unit="durationUnit"
            )
        ),
        warning_threshold=123
    ),
    request_based_sli=applicationsignals.CfnServiceLevelObjective.RequestBasedSliProperty(
        request_based_sli_metric=applicationsignals.CfnServiceLevelObjective.RequestBasedSliMetricProperty(
            key_attributes={
                "key_attributes_key": "keyAttributes"
            },
            metric_type="metricType",
            monitored_request_count_metric=applicationsignals.CfnServiceLevelObjective.MonitoredRequestCountMetricProperty(
                bad_count_metric=[applicationsignals.CfnServiceLevelObjective.MetricDataQueryProperty(
                    id="id",

                    # the properties below are optional
                    account_id="accountId",
                    expression="expression",
                    metric_stat=applicationsignals.CfnServiceLevelObjective.MetricStatProperty(
                        metric=applicationsignals.CfnServiceLevelObjective.MetricProperty(
                            dimensions=[applicationsignals.CfnServiceLevelObjective.DimensionProperty(
                                name="name",
                                value="value"
                            )],
                            metric_name="metricName",
                            namespace="namespace"
                        ),
                        period=123,
                        stat="stat",

                        # the properties below are optional
                        unit="unit"
                    ),
                    return_data=False
                )],
                good_count_metric=[applicationsignals.CfnServiceLevelObjective.MetricDataQueryProperty(
                    id="id",

                    # the properties below are optional
                    account_id="accountId",
                    expression="expression",
                    metric_stat=applicationsignals.CfnServiceLevelObjective.MetricStatProperty(
                        metric=applicationsignals.CfnServiceLevelObjective.MetricProperty(
                            dimensions=[applicationsignals.CfnServiceLevelObjective.DimensionProperty(
                                name="name",
                                value="value"
                            )],
                            metric_name="metricName",
                            namespace="namespace"
                        ),
                        period=123,
                        stat="stat",

                        # the properties below are optional
                        unit="unit"
                    ),
                    return_data=False
                )]
            ),
            operation_name="operationName",
            total_request_count_metric=[applicationsignals.CfnServiceLevelObjective.MetricDataQueryProperty(
                id="id",

                # the properties below are optional
                account_id="accountId",
                expression="expression",
                metric_stat=applicationsignals.CfnServiceLevelObjective.MetricStatProperty(
                    metric=applicationsignals.CfnServiceLevelObjective.MetricProperty(
                        dimensions=[applicationsignals.CfnServiceLevelObjective.DimensionProperty(
                            name="name",
                            value="value"
                        )],
                        metric_name="metricName",
                        namespace="namespace"
                    ),
                    period=123,
                    stat="stat",

                    # the properties below are optional
                    unit="unit"
                ),
                return_data=False
            )]
        ),

        # the properties below are optional
        comparison_operator="comparisonOperator",
        metric_threshold=123
    ),
    sli=applicationsignals.CfnServiceLevelObjective.SliProperty(
        comparison_operator="comparisonOperator",
        metric_threshold=123,
        sli_metric=applicationsignals.CfnServiceLevelObjective.SliMetricProperty(
            key_attributes={
                "key_attributes_key": "keyAttributes"
            },
            metric_data_queries=[applicationsignals.CfnServiceLevelObjective.MetricDataQueryProperty(
                id="id",

                # the properties below are optional
                account_id="accountId",
                expression="expression",
                metric_stat=applicationsignals.CfnServiceLevelObjective.MetricStatProperty(
                    metric=applicationsignals.CfnServiceLevelObjective.MetricProperty(
                        dimensions=[applicationsignals.CfnServiceLevelObjective.DimensionProperty(
                            name="name",
                            value="value"
                        )],
                        metric_name="metricName",
                        namespace="namespace"
                    ),
                    period=123,
                    stat="stat",

                    # the properties below are optional
                    unit="unit"
                ),
                return_data=False
            )],
            metric_type="metricType",
            operation_name="operationName",
            period_seconds=123,
            statistic="statistic"
        )
    ),
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
Parameters:
  • scope (Construct) – Scope in which this resource is defined.

  • id (str) – Construct identifier for this resource (unique in its scope).

  • name (str) – A name for this SLO.

  • description (Optional[str]) – An optional description for this SLO. Default: - “No description”

  • goal (Union[IResolvable, GoalProperty, Dict[str, Any], None]) – This structure contains the attributes that determine the goal of an SLO. This includes the time period for evaluation and the attainment threshold.

  • request_based_sli (Union[IResolvable, RequestBasedSliProperty, Dict[str, Any], None]) – A structure containing information about the performance metric that this SLO monitors, if this is a request-based SLO.

  • sli (Union[IResolvable, SliProperty, Dict[str, Any], None]) – A structure containing information about the performance metric that this SLO monitors, if this is a period-based SLO.

  • tags (Optional[Sequence[Union[CfnTag, Dict[str, Any]]]]) – 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.

Methods

add_deletion_override(path)

Syntactic sugar for addOverride(path, undefined).

Parameters:

path (str) – The path of the value to delete.

Return type:

None

add_dependency(target)

Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

Parameters:

target (CfnResource) –

Return type:

None

add_depends_on(target)

(deprecated) Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

Parameters:

target (CfnResource) –

Deprecated:

use addDependency

Stability:

deprecated

Return type:

None

add_metadata(key, value)

Add a value to the CloudFormation Resource Metadata.

Parameters:
  • key (str) –

  • value (Any) –

See:

Return type:

None

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

add_override(path, value)

Adds an override to the synthesized CloudFormation resource.

To add a property override, either use addPropertyOverride or prefix path with “Properties.” (i.e. Properties.TopicName).

If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.

To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.

For example:

cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"])
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")

would add the overrides Example:

"Properties": {
  "GlobalSecondaryIndexes": [
    {
      "Projection": {
        "NonKeyAttributes": [ "myattribute" ]
        ...
      }
      ...
    },
    {
      "ProjectionType": "INCLUDE"
      ...
    },
  ]
  ...
}

The value argument to addOverride will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.

Parameters:
  • path (str) –

    • The path of the property, you can use dot notation to override values in complex types. Any intermediate keys will be created as needed.

  • value (Any) –

    • The value. Could be primitive or complex.

Return type:

None

add_property_deletion_override(property_path)

Adds an override that deletes the value of a property from the resource definition.

Parameters:

property_path (str) – The path to the property.

Return type:

None

add_property_override(property_path, value)

Adds an override to a resource property.

Syntactic sugar for addOverride("Properties.<...>", value).

Parameters:
  • property_path (str) – The path of the property.

  • value (Any) – The value.

Return type:

None

apply_removal_policy(policy=None, *, apply_to_update_replace_policy=None, default=None)

Sets the deletion policy of the resource based on the removal policy specified.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN). In some cases, a snapshot can be taken of the resource prior to deletion (RemovalPolicy.SNAPSHOT). A list of resources that support this policy can be found in the following link:

Parameters:
  • policy (Optional[RemovalPolicy]) –

  • apply_to_update_replace_policy (Optional[bool]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: true

  • default (Optional[RemovalPolicy]) – The default policy to apply in case the removal policy is not defined. Default: - Default value is resource specific. To determine the default value for a resource, please consult that specific resource’s documentation.

See:

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options

Return type:

None

get_att(attribute_name, type_hint=None)

Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.

Parameters:
  • attribute_name (str) – The name of the attribute.

  • type_hint (Optional[ResolutionTypeHint]) –

Return type:

Reference

get_metadata(key)

Retrieve a value value from the CloudFormation Resource Metadata.

Parameters:

key (str) –

See:

Return type:

Any

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

inspect(inspector)

Examines the CloudFormation resource and discloses attributes.

Parameters:

inspector (TreeInspector) – tree inspector to collect and process attributes.

Return type:

None

obtain_dependencies()

Retrieves an array of resources this resource depends on.

This assembles dependencies on resources across stacks (including nested stacks) automatically.

Return type:

List[Union[Stack, CfnResource]]

obtain_resource_dependencies()

Get a shallow copy of dependencies between this resource and other resources in the same stack.

Return type:

List[CfnResource]

override_logical_id(new_logical_id)

Overrides the auto-generated logical ID with a specific ID.

Parameters:

new_logical_id (str) – The new logical ID to use for this stack element.

Return type:

None

remove_dependency(target)

Indicates that this resource no longer depends on another resource.

This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.

Parameters:

target (CfnResource) –

Return type:

None

replace_dependency(target, new_target)

Replaces one dependency with another.

Parameters:
Return type:

None

to_string()

Returns a string representation of this construct.

Return type:

str

Returns:

a string representation of this resource

Attributes

CFN_RESOURCE_TYPE_NAME = 'AWS::ApplicationSignals::ServiceLevelObjective'
attr_arn

The ARN of this SLO.

CloudformationAttribute:

Arn

attr_created_time

The date and time that this SLO was created.

CloudformationAttribute:

CreatedTime

attr_evaluation_type

Displays whether this is a period-based SLO or a request-based SLO.

CloudformationAttribute:

EvaluationType

attr_last_updated_time

The time that this SLO was most recently updated.

CloudformationAttribute:

LastUpdatedTime

cdk_tag_manager

Tag Manager which manages the tags for this resource.

cfn_options

Options for this resource, such as condition, update policy etc.

cfn_resource_type

AWS resource type.

creation_stack

return:

the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.

description

An optional description for this SLO.

goal

This structure contains the attributes that determine the goal of an SLO.

logical_id

The logical ID for this CloudFormation stack element.

The logical ID of the element is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

Returns:

the logical ID as a stringified token. This value will only get resolved during synthesis.

name

A name for this SLO.

node

The tree node.

ref

Return a string that will be resolved to a CloudFormation { Ref } for this element.

If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).

request_based_sli

A structure containing information about the performance metric that this SLO monitors, if this is a request-based SLO.

sli

A structure containing information about the performance metric that this SLO monitors, if this is a period-based SLO.

stack

The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

tags

A list of key-value pairs to associate with the SLO.

Static Methods

classmethod is_cfn_element(x)

Returns true if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.

Parameters:

x (Any) –

Return type:

bool

Returns:

The construct as a stack element or undefined if it is not a stack element.

classmethod is_cfn_resource(x)

Check whether the given object is a CfnResource.

Parameters:

x (Any) –

Return type:

bool

classmethod is_construct(x)

Checks if x is a construct.

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Construct.

CalendarIntervalProperty

class CfnServiceLevelObjective.CalendarIntervalProperty(*, duration, duration_unit, start_time)

Bases: object

If the interval for this service level objective is a calendar interval, this structure contains the interval specifications.

Parameters:
  • duration (Union[int, float]) – 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.

  • duration_unit (str) – Specifies the calendar interval unit.

  • start_time (Union[int, float]) – 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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-calendarinterval.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_applicationsignals as applicationsignals

calendar_interval_property = applicationsignals.CfnServiceLevelObjective.CalendarIntervalProperty(
    duration=123,
    duration_unit="durationUnit",
    start_time=123
)

Attributes

duration

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-calendarinterval.html#cfn-applicationsignals-servicelevelobjective-calendarinterval-duration

duration_unit

Specifies the calendar interval unit.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-calendarinterval.html#cfn-applicationsignals-servicelevelobjective-calendarinterval-durationunit

start_time

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-calendarinterval.html#cfn-applicationsignals-servicelevelobjective-calendarinterval-starttime

DimensionProperty

class CfnServiceLevelObjective.DimensionProperty(*, name, value)

Bases: object

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.

Parameters:
  • name (str) – 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 (str) – 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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-dimension.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_applicationsignals as applicationsignals

dimension_property = applicationsignals.CfnServiceLevelObjective.DimensionProperty(
    name="name",
    value="value"
)

Attributes

name

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-dimension.html#cfn-applicationsignals-servicelevelobjective-dimension-name

value

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-dimension.html#cfn-applicationsignals-servicelevelobjective-dimension-value

GoalProperty

class CfnServiceLevelObjective.GoalProperty(*, attainment_goal=None, interval=None, warning_threshold=None)

Bases: object

This structure contains the attributes that determine the goal of an SLO.

This includes the time period for evaluation and the attainment threshold.

Parameters:
  • attainment_goal (Union[int, float, None]) – 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.

  • interval (Union[IResolvable, IntervalProperty, Dict[str, Any], None]) – 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.

  • warning_threshold (Union[int, float, None]) – 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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-goal.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_applicationsignals as applicationsignals

goal_property = applicationsignals.CfnServiceLevelObjective.GoalProperty(
    attainment_goal=123,
    interval=applicationsignals.CfnServiceLevelObjective.IntervalProperty(
        calendar_interval=applicationsignals.CfnServiceLevelObjective.CalendarIntervalProperty(
            duration=123,
            duration_unit="durationUnit",
            start_time=123
        ),
        rolling_interval=applicationsignals.CfnServiceLevelObjective.RollingIntervalProperty(
            duration=123,
            duration_unit="durationUnit"
        )
    ),
    warning_threshold=123
)

Attributes

attainment_goal

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-goal.html#cfn-applicationsignals-servicelevelobjective-goal-attainmentgoal

interval

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-goal.html#cfn-applicationsignals-servicelevelobjective-goal-interval

warning_threshold

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-goal.html#cfn-applicationsignals-servicelevelobjective-goal-warningthreshold

IntervalProperty

class CfnServiceLevelObjective.IntervalProperty(*, calendar_interval=None, rolling_interval=None)

Bases: object

The time period used to evaluate the SLO.

It can be either a calendar interval or rolling interval.

Parameters:
  • calendar_interval (Union[IResolvable, CalendarIntervalProperty, Dict[str, Any], None]) – If the interval is a calendar interval, this structure contains the interval specifications.

  • rolling_interval (Union[IResolvable, RollingIntervalProperty, Dict[str, Any], None]) – If the interval is a rolling interval, this structure contains the interval specifications.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-interval.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_applicationsignals as applicationsignals

interval_property = applicationsignals.CfnServiceLevelObjective.IntervalProperty(
    calendar_interval=applicationsignals.CfnServiceLevelObjective.CalendarIntervalProperty(
        duration=123,
        duration_unit="durationUnit",
        start_time=123
    ),
    rolling_interval=applicationsignals.CfnServiceLevelObjective.RollingIntervalProperty(
        duration=123,
        duration_unit="durationUnit"
    )
)

Attributes

calendar_interval

If the interval is a calendar interval, this structure contains the interval specifications.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-interval.html#cfn-applicationsignals-servicelevelobjective-interval-calendarinterval

rolling_interval

If the interval is a rolling interval, this structure contains the interval specifications.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-interval.html#cfn-applicationsignals-servicelevelobjective-interval-rollinginterval

MetricDataQueryProperty

class CfnServiceLevelObjective.MetricDataQueryProperty(*, id, account_id=None, expression=None, metric_stat=None, return_data=None)

Bases: object

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 Use metric math .

Within each MetricDataQuery object, you must specify either Expression or MetricStat but not both.

Parameters:
  • id (str) – 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.

  • account_id (Optional[str]) – 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.

  • expression (Optional[str]) – 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.

  • metric_stat (Union[IResolvable, MetricStatProperty, Dict[str, Any], None]) – 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.

  • return_data (Union[bool, IResolvable, None]) – 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 .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-metricdataquery.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_applicationsignals as applicationsignals

metric_data_query_property = applicationsignals.CfnServiceLevelObjective.MetricDataQueryProperty(
    id="id",

    # the properties below are optional
    account_id="accountId",
    expression="expression",
    metric_stat=applicationsignals.CfnServiceLevelObjective.MetricStatProperty(
        metric=applicationsignals.CfnServiceLevelObjective.MetricProperty(
            dimensions=[applicationsignals.CfnServiceLevelObjective.DimensionProperty(
                name="name",
                value="value"
            )],
            metric_name="metricName",
            namespace="namespace"
        ),
        period=123,
        stat="stat",

        # the properties below are optional
        unit="unit"
    ),
    return_data=False
)

Attributes

account_id

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-metricdataquery.html#cfn-applicationsignals-servicelevelobjective-metricdataquery-accountid

expression

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-metricdataquery.html#cfn-applicationsignals-servicelevelobjective-metricdataquery-expression

id

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-metricdataquery.html#cfn-applicationsignals-servicelevelobjective-metricdataquery-id

metric_stat

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-metricdataquery.html#cfn-applicationsignals-servicelevelobjective-metricdataquery-metricstat

return_data

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 .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-metricdataquery.html#cfn-applicationsignals-servicelevelobjective-metricdataquery-returndata

MetricProperty

class CfnServiceLevelObjective.MetricProperty(*, dimensions=None, metric_name=None, namespace=None)

Bases: object

This structure defines the metric used for a service level indicator, including the metric name, namespace, and dimensions.

Parameters:
  • dimensions (Union[IResolvable, Sequence[Union[IResolvable, DimensionProperty, Dict[str, Any]]], None]) – An array of one or more dimensions to use to define the metric that you want to use. For more information, see Dimensions .

  • metric_name (Optional[str]) – The name of the metric to use.

  • namespace (Optional[str]) – The namespace of the metric. For more information, see Namespaces .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-metric.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_applicationsignals as applicationsignals

metric_property = applicationsignals.CfnServiceLevelObjective.MetricProperty(
    dimensions=[applicationsignals.CfnServiceLevelObjective.DimensionProperty(
        name="name",
        value="value"
    )],
    metric_name="metricName",
    namespace="namespace"
)

Attributes

dimensions

An array of one or more dimensions to use to define the metric that you want to use.

For more information, see Dimensions .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-metric.html#cfn-applicationsignals-servicelevelobjective-metric-dimensions

metric_name

The name of the metric to use.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-metric.html#cfn-applicationsignals-servicelevelobjective-metric-metricname

namespace

The namespace of the metric.

For more information, see Namespaces .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-metric.html#cfn-applicationsignals-servicelevelobjective-metric-namespace

MetricStatProperty

class CfnServiceLevelObjective.MetricStatProperty(*, metric, period, stat, unit=None)

Bases: object

This structure defines the metric to be used as the service level indicator, along with the statistics, period, and unit.

Parameters:
  • metric (Union[IResolvable, MetricProperty, Dict[str, Any]]) – The metric to use as the service level indicator, including the metric name, namespace, and dimensions.

  • period (Union[int, float]) – 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 (str) – 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 (Optional[str]) – 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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-metricstat.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_applicationsignals as applicationsignals

metric_stat_property = applicationsignals.CfnServiceLevelObjective.MetricStatProperty(
    metric=applicationsignals.CfnServiceLevelObjective.MetricProperty(
        dimensions=[applicationsignals.CfnServiceLevelObjective.DimensionProperty(
            name="name",
            value="value"
        )],
        metric_name="metricName",
        namespace="namespace"
    ),
    period=123,
    stat="stat",

    # the properties below are optional
    unit="unit"
)

Attributes

metric

The metric to use as the service level indicator, including the metric name, namespace, and dimensions.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-metricstat.html#cfn-applicationsignals-servicelevelobjective-metricstat-metric

period

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-metricstat.html#cfn-applicationsignals-servicelevelobjective-metricstat-period

stat

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 .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-metricstat.html#cfn-applicationsignals-servicelevelobjective-metricstat-stat

unit

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-metricstat.html#cfn-applicationsignals-servicelevelobjective-metricstat-unit

MonitoredRequestCountMetricProperty

class CfnServiceLevelObjective.MonitoredRequestCountMetricProperty(*, bad_count_metric=None, good_count_metric=None)

Bases: object

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.

Parameters:
  • bad_count_metric (Union[IResolvable, Sequence[Union[IResolvable, MetricDataQueryProperty, Dict[str, Any]]], None]) – 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.

  • good_count_metric (Union[IResolvable, Sequence[Union[IResolvable, MetricDataQueryProperty, Dict[str, Any]]], None]) – 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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-monitoredrequestcountmetric.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_applicationsignals as applicationsignals

monitored_request_count_metric_property = applicationsignals.CfnServiceLevelObjective.MonitoredRequestCountMetricProperty(
    bad_count_metric=[applicationsignals.CfnServiceLevelObjective.MetricDataQueryProperty(
        id="id",

        # the properties below are optional
        account_id="accountId",
        expression="expression",
        metric_stat=applicationsignals.CfnServiceLevelObjective.MetricStatProperty(
            metric=applicationsignals.CfnServiceLevelObjective.MetricProperty(
                dimensions=[applicationsignals.CfnServiceLevelObjective.DimensionProperty(
                    name="name",
                    value="value"
                )],
                metric_name="metricName",
                namespace="namespace"
            ),
            period=123,
            stat="stat",

            # the properties below are optional
            unit="unit"
        ),
        return_data=False
    )],
    good_count_metric=[applicationsignals.CfnServiceLevelObjective.MetricDataQueryProperty(
        id="id",

        # the properties below are optional
        account_id="accountId",
        expression="expression",
        metric_stat=applicationsignals.CfnServiceLevelObjective.MetricStatProperty(
            metric=applicationsignals.CfnServiceLevelObjective.MetricProperty(
                dimensions=[applicationsignals.CfnServiceLevelObjective.DimensionProperty(
                    name="name",
                    value="value"
                )],
                metric_name="metricName",
                namespace="namespace"
            ),
            period=123,
            stat="stat",

            # the properties below are optional
            unit="unit"
        ),
        return_data=False
    )]
)

Attributes

bad_count_metric

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-monitoredrequestcountmetric.html#cfn-applicationsignals-servicelevelobjective-monitoredrequestcountmetric-badcountmetric

good_count_metric

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-monitoredrequestcountmetric.html#cfn-applicationsignals-servicelevelobjective-monitoredrequestcountmetric-goodcountmetric

RequestBasedSliMetricProperty

class CfnServiceLevelObjective.RequestBasedSliMetricProperty(*, key_attributes=None, metric_type=None, monitored_request_count_metric=None, operation_name=None, total_request_count_metric=None)

Bases: object

This structure contains the information about the metric that is used for a request-based SLO.

Parameters:
  • key_attributes (Union[IResolvable, Mapping[str, str], None]) – 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.

  • metric_type (Optional[str]) – If the SLO monitors either the LATENCY or AVAILABILITY metric that Application Signals collects, this field displays which of those metrics is used.

  • monitored_request_count_metric (Union[IResolvable, MonitoredRequestCountMetricProperty, Dict[str, Any], None]) – 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.

  • operation_name (Optional[str]) – If the SLO monitors a specific operation of the service, this field displays that operation name.

  • total_request_count_metric (Union[IResolvable, Sequence[Union[IResolvable, MetricDataQueryProperty, Dict[str, Any]]], None]) – 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 .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-requestbasedslimetric.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_applicationsignals as applicationsignals

request_based_sli_metric_property = applicationsignals.CfnServiceLevelObjective.RequestBasedSliMetricProperty(
    key_attributes={
        "key_attributes_key": "keyAttributes"
    },
    metric_type="metricType",
    monitored_request_count_metric=applicationsignals.CfnServiceLevelObjective.MonitoredRequestCountMetricProperty(
        bad_count_metric=[applicationsignals.CfnServiceLevelObjective.MetricDataQueryProperty(
            id="id",

            # the properties below are optional
            account_id="accountId",
            expression="expression",
            metric_stat=applicationsignals.CfnServiceLevelObjective.MetricStatProperty(
                metric=applicationsignals.CfnServiceLevelObjective.MetricProperty(
                    dimensions=[applicationsignals.CfnServiceLevelObjective.DimensionProperty(
                        name="name",
                        value="value"
                    )],
                    metric_name="metricName",
                    namespace="namespace"
                ),
                period=123,
                stat="stat",

                # the properties below are optional
                unit="unit"
            ),
            return_data=False
        )],
        good_count_metric=[applicationsignals.CfnServiceLevelObjective.MetricDataQueryProperty(
            id="id",

            # the properties below are optional
            account_id="accountId",
            expression="expression",
            metric_stat=applicationsignals.CfnServiceLevelObjective.MetricStatProperty(
                metric=applicationsignals.CfnServiceLevelObjective.MetricProperty(
                    dimensions=[applicationsignals.CfnServiceLevelObjective.DimensionProperty(
                        name="name",
                        value="value"
                    )],
                    metric_name="metricName",
                    namespace="namespace"
                ),
                period=123,
                stat="stat",

                # the properties below are optional
                unit="unit"
            ),
            return_data=False
        )]
    ),
    operation_name="operationName",
    total_request_count_metric=[applicationsignals.CfnServiceLevelObjective.MetricDataQueryProperty(
        id="id",

        # the properties below are optional
        account_id="accountId",
        expression="expression",
        metric_stat=applicationsignals.CfnServiceLevelObjective.MetricStatProperty(
            metric=applicationsignals.CfnServiceLevelObjective.MetricProperty(
                dimensions=[applicationsignals.CfnServiceLevelObjective.DimensionProperty(
                    name="name",
                    value="value"
                )],
                metric_name="metricName",
                namespace="namespace"
            ),
            period=123,
            stat="stat",

            # the properties below are optional
            unit="unit"
        ),
        return_data=False
    )]
)

Attributes

key_attributes

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-requestbasedslimetric.html#cfn-applicationsignals-servicelevelobjective-requestbasedslimetric-keyattributes

metric_type

If the SLO monitors either the LATENCY or AVAILABILITY metric that Application Signals collects, this field displays which of those metrics is used.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-requestbasedslimetric.html#cfn-applicationsignals-servicelevelobjective-requestbasedslimetric-metrictype

monitored_request_count_metric

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-requestbasedslimetric.html#cfn-applicationsignals-servicelevelobjective-requestbasedslimetric-monitoredrequestcountmetric

operation_name

If the SLO monitors a specific operation of the service, this field displays that operation name.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-requestbasedslimetric.html#cfn-applicationsignals-servicelevelobjective-requestbasedslimetric-operationname

total_request_count_metric

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 .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-requestbasedslimetric.html#cfn-applicationsignals-servicelevelobjective-requestbasedslimetric-totalrequestcountmetric

RequestBasedSliProperty

class CfnServiceLevelObjective.RequestBasedSliProperty(*, request_based_sli_metric, comparison_operator=None, metric_threshold=None)

Bases: object

This structure contains information about the performance metric that a request-based SLO monitors.

Parameters:
  • request_based_sli_metric (Union[IResolvable, RequestBasedSliMetricProperty, Dict[str, Any]]) – A structure that contains information about the metric that the SLO monitors.

  • comparison_operator (Optional[str]) – The arithmetic operation used when comparing the specified metric to the threshold.

  • metric_threshold (Union[int, float, None]) – This value is the threshold that the observed metric values of the SLI metric are compared to.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-requestbasedsli.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_applicationsignals as applicationsignals

request_based_sli_property = applicationsignals.CfnServiceLevelObjective.RequestBasedSliProperty(
    request_based_sli_metric=applicationsignals.CfnServiceLevelObjective.RequestBasedSliMetricProperty(
        key_attributes={
            "key_attributes_key": "keyAttributes"
        },
        metric_type="metricType",
        monitored_request_count_metric=applicationsignals.CfnServiceLevelObjective.MonitoredRequestCountMetricProperty(
            bad_count_metric=[applicationsignals.CfnServiceLevelObjective.MetricDataQueryProperty(
                id="id",

                # the properties below are optional
                account_id="accountId",
                expression="expression",
                metric_stat=applicationsignals.CfnServiceLevelObjective.MetricStatProperty(
                    metric=applicationsignals.CfnServiceLevelObjective.MetricProperty(
                        dimensions=[applicationsignals.CfnServiceLevelObjective.DimensionProperty(
                            name="name",
                            value="value"
                        )],
                        metric_name="metricName",
                        namespace="namespace"
                    ),
                    period=123,
                    stat="stat",

                    # the properties below are optional
                    unit="unit"
                ),
                return_data=False
            )],
            good_count_metric=[applicationsignals.CfnServiceLevelObjective.MetricDataQueryProperty(
                id="id",

                # the properties below are optional
                account_id="accountId",
                expression="expression",
                metric_stat=applicationsignals.CfnServiceLevelObjective.MetricStatProperty(
                    metric=applicationsignals.CfnServiceLevelObjective.MetricProperty(
                        dimensions=[applicationsignals.CfnServiceLevelObjective.DimensionProperty(
                            name="name",
                            value="value"
                        )],
                        metric_name="metricName",
                        namespace="namespace"
                    ),
                    period=123,
                    stat="stat",

                    # the properties below are optional
                    unit="unit"
                ),
                return_data=False
            )]
        ),
        operation_name="operationName",
        total_request_count_metric=[applicationsignals.CfnServiceLevelObjective.MetricDataQueryProperty(
            id="id",

            # the properties below are optional
            account_id="accountId",
            expression="expression",
            metric_stat=applicationsignals.CfnServiceLevelObjective.MetricStatProperty(
                metric=applicationsignals.CfnServiceLevelObjective.MetricProperty(
                    dimensions=[applicationsignals.CfnServiceLevelObjective.DimensionProperty(
                        name="name",
                        value="value"
                    )],
                    metric_name="metricName",
                    namespace="namespace"
                ),
                period=123,
                stat="stat",

                # the properties below are optional
                unit="unit"
            ),
            return_data=False
        )]
    ),

    # the properties below are optional
    comparison_operator="comparisonOperator",
    metric_threshold=123
)

Attributes

comparison_operator

The arithmetic operation used when comparing the specified metric to the threshold.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-requestbasedsli.html#cfn-applicationsignals-servicelevelobjective-requestbasedsli-comparisonoperator

metric_threshold

This value is the threshold that the observed metric values of the SLI metric are compared to.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-requestbasedsli.html#cfn-applicationsignals-servicelevelobjective-requestbasedsli-metricthreshold

request_based_sli_metric

A structure that contains information about the metric that the SLO monitors.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-requestbasedsli.html#cfn-applicationsignals-servicelevelobjective-requestbasedsli-requestbasedslimetric

RollingIntervalProperty

class CfnServiceLevelObjective.RollingIntervalProperty(*, duration, duration_unit)

Bases: object

If the interval for this SLO is a rolling interval, this structure contains the interval specifications.

Parameters:
  • duration (Union[int, float]) – Specifies the duration of each rolling interval. For example, if Duration is 7 and DurationUnit is DAY , each rolling interval is seven days.

  • duration_unit (str) – Specifies the rolling interval unit.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-rollinginterval.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_applicationsignals as applicationsignals

rolling_interval_property = applicationsignals.CfnServiceLevelObjective.RollingIntervalProperty(
    duration=123,
    duration_unit="durationUnit"
)

Attributes

duration

Specifies the duration of each rolling interval.

For example, if Duration is 7 and DurationUnit is DAY , each rolling interval is seven days.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-rollinginterval.html#cfn-applicationsignals-servicelevelobjective-rollinginterval-duration

duration_unit

Specifies the rolling interval unit.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-rollinginterval.html#cfn-applicationsignals-servicelevelobjective-rollinginterval-durationunit

SliMetricProperty

class CfnServiceLevelObjective.SliMetricProperty(*, key_attributes=None, metric_data_queries=None, metric_type=None, operation_name=None, period_seconds=None, statistic=None)

Bases: object

Use this structure to specify the metric to be used for the SLO.

Parameters:
  • key_attributes (Union[IResolvable, Mapping[str, str], None]) – 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.

  • metric_data_queries (Union[IResolvable, Sequence[Union[IResolvable, MetricDataQueryProperty, Dict[str, Any]]], None]) – 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.

  • metric_type (Optional[str]) – 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.

  • operation_name (Optional[str]) – If the SLO is to monitor a specific operation of the service, use this field to specify the name of that operation.

  • period_seconds (Union[int, float, None]) – 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.

  • statistic (Optional[str]) –

    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 .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-slimetric.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_applicationsignals as applicationsignals

sli_metric_property = applicationsignals.CfnServiceLevelObjective.SliMetricProperty(
    key_attributes={
        "key_attributes_key": "keyAttributes"
    },
    metric_data_queries=[applicationsignals.CfnServiceLevelObjective.MetricDataQueryProperty(
        id="id",

        # the properties below are optional
        account_id="accountId",
        expression="expression",
        metric_stat=applicationsignals.CfnServiceLevelObjective.MetricStatProperty(
            metric=applicationsignals.CfnServiceLevelObjective.MetricProperty(
                dimensions=[applicationsignals.CfnServiceLevelObjective.DimensionProperty(
                    name="name",
                    value="value"
                )],
                metric_name="metricName",
                namespace="namespace"
            ),
            period=123,
            stat="stat",

            # the properties below are optional
            unit="unit"
        ),
        return_data=False
    )],
    metric_type="metricType",
    operation_name="operationName",
    period_seconds=123,
    statistic="statistic"
)

Attributes

key_attributes

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-slimetric.html#cfn-applicationsignals-servicelevelobjective-slimetric-keyattributes

metric_data_queries

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-slimetric.html#cfn-applicationsignals-servicelevelobjective-slimetric-metricdataqueries

metric_type

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-slimetric.html#cfn-applicationsignals-servicelevelobjective-slimetric-metrictype

operation_name

If the SLO is to monitor a specific operation of the service, use this field to specify the name of that operation.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-slimetric.html#cfn-applicationsignals-servicelevelobjective-slimetric-operationname

period_seconds

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-slimetric.html#cfn-applicationsignals-servicelevelobjective-slimetric-periodseconds

statistic

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 .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-slimetric.html#cfn-applicationsignals-servicelevelobjective-slimetric-statistic

SliProperty

class CfnServiceLevelObjective.SliProperty(*, comparison_operator, metric_threshold, sli_metric)

Bases: object

This structure specifies the information about the service and the performance metric that an SLO is to monitor.

Parameters:
  • comparison_operator (str) – The arithmetic operation to use when comparing the specified metric to the threshold.

  • metric_threshold (Union[int, float]) – The value that the SLI metric is compared to.

  • sli_metric (Union[IResolvable, SliMetricProperty, Dict[str, Any]]) – Use this structure to specify the metric to be used for the SLO.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-sli.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_applicationsignals as applicationsignals

sli_property = applicationsignals.CfnServiceLevelObjective.SliProperty(
    comparison_operator="comparisonOperator",
    metric_threshold=123,
    sli_metric=applicationsignals.CfnServiceLevelObjective.SliMetricProperty(
        key_attributes={
            "key_attributes_key": "keyAttributes"
        },
        metric_data_queries=[applicationsignals.CfnServiceLevelObjective.MetricDataQueryProperty(
            id="id",

            # the properties below are optional
            account_id="accountId",
            expression="expression",
            metric_stat=applicationsignals.CfnServiceLevelObjective.MetricStatProperty(
                metric=applicationsignals.CfnServiceLevelObjective.MetricProperty(
                    dimensions=[applicationsignals.CfnServiceLevelObjective.DimensionProperty(
                        name="name",
                        value="value"
                    )],
                    metric_name="metricName",
                    namespace="namespace"
                ),
                period=123,
                stat="stat",

                # the properties below are optional
                unit="unit"
            ),
            return_data=False
        )],
        metric_type="metricType",
        operation_name="operationName",
        period_seconds=123,
        statistic="statistic"
    )
)

Attributes

comparison_operator

The arithmetic operation to use when comparing the specified metric to the threshold.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-sli.html#cfn-applicationsignals-servicelevelobjective-sli-comparisonoperator

metric_threshold

The value that the SLI metric is compared to.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-sli.html#cfn-applicationsignals-servicelevelobjective-sli-metricthreshold

sli_metric

Use this structure to specify the metric to be used for the SLO.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-sli.html#cfn-applicationsignals-servicelevelobjective-sli-slimetric