Amazon CloudWatch Application Signals

2025/03/17 - Amazon CloudWatch Application Signals - 2 new api methods

Changes  This release adds support for adding, removing, and listing SLO time exclusion windows with the BatchUpdateExclusionWindows and ListServiceLevelObjectiveExclusionWindows APIs.

ListServiceLevelObjectiveExclusionWindows (new) Link ¶

Retrieves all exclusion windows configured for a specific SLO.

See also: AWS API Documentation

Request Syntax

client.list_service_level_objective_exclusion_windows(
    Id='string',
    MaxResults=123,
    NextToken='string'
)
type Id:

string

param Id:

[REQUIRED]

The ID of the SLO to list exclusion windows for.

type MaxResults:

integer

param MaxResults:

The maximum number of results to return in one operation. If you omit this parameter, the default of 50 is used. </p>

type NextToken:

string

param NextToken:

Include this value, if it was returned by the previous operation, to get the next set of service level objectives. </p>

rtype:

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. </p>

BatchUpdateExclusionWindows (new) Link ¶

Add or remove time window exclusions for one or more Service Level Objectives (SLOs).

See also: AWS API Documentation

Request Syntax

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'
        },
    ]
)
type SloIds:

list

param SloIds:

[REQUIRED]

The list of SLO IDs to add or remove exclusion windows from.

  • (string) --

type AddExclusionWindows:

list

param AddExclusionWindows:

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.

type RemoveExclusionWindows:

list

param RemoveExclusionWindows:

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.

rtype:

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.