Skip to content
Get started

Fetch in-depth information about a single SLA

slas.retrieve(strurn) -> SlaRetrieveResponse
GET/v1/slas/{urn}

Fetch in-depth information about a single SLA

ParametersExpand Collapse
urn: str
ReturnsExpand Collapse
class SlaRetrieveResponse:
description: str

A description of the SLA

name: str

The name of the SLA

urn: str

A unique identifier for the SLA

vendor_urn: str

A unique identifier for the vendor associated with the SLA

sla_details: Optional[SlaDetails]

The SLA tier configuration details, including type and credit tiers. Null if the SLA does not have incident-based tier rules configured.

Accepts one of the following:
class SlaDetailsAPIUptimeSlaDetails:
measurement_period_unit: str

The duration unit of the measurement interval (e.g. DAY, MONTH, QUARTER, YEAR)

measurement_period_value: int

The number of measurement period units (e.g. 1 for a single calendar quarter)

tiers: List[SlaDetailsAPIUptimeSlaDetailsTier]

The credit tiers of the SLA, ordered by availability percentage

availability_percentage: float

The availability percentage threshold for the tier, modeled as a float between 0 and 1 (e.g. 0.999 is 99.9% availability)

credit_unit: str

The unit of the credit value (e.g. PERCENT or DAY)

credit_value: float

The credit value for the tier (e.g. 0.5 for 50% credit)

sla_type: Optional[Literal["UPTIME"]]

The type of SLA

class SlaDetailsAPITimeUnderSlaDetails:
measurement_period_unit: str

The duration unit of the measurement interval (e.g. MONTH, QUARTER)

measurement_period_value: int

The number of measurement period units (e.g. 1 for a single calendar quarter)

tiers: List[SlaDetailsAPITimeUnderSlaDetailsTier]

The credit tiers of the SLA, ordered by availability percentage

availability_percentage: float

The availability percentage threshold for the tier, modeled as a float between 0 and 1 (e.g. 0.999 is 99.9% availability)

credit_unit: str

The unit of the credit value (e.g. PERCENT, DAY, or HOUR)

credit_value: float

The credit value for the tier (e.g. 0.5 for 50% credit)

per_unit: str

The 'per' unit for the time under calculation (e.g. PERCENT or HOUR)

per_value: float

The 'per' value for the time under calculation (e.g. 5% per each 1% below threshold)

sla_type: Optional[Literal["TIME_UNDER"]]

The type of SLA

Fetch in-depth information about a single SLA

import os
from clarative import Clarative

client = Clarative(
    api_key=os.environ.get("CLARATIVE_API_KEY"),  # This is the default and can be omitted
)
sla = client.slas.retrieve(
    "urn",
)
print(sla.description)
{
  "description": "description",
  "name": "name",
  "urn": "urn",
  "vendor_urn": "vendor_urn",
  "sla_details": {
    "measurement_period_unit": "measurement_period_unit",
    "measurement_period_value": 0,
    "tiers": [
      {
        "availability_percentage": 0,
        "credit_unit": "credit_unit",
        "credit_value": 0
      }
    ],
    "sla_type": "UPTIME"
  }
}
Returns Examples
{
  "description": "description",
  "name": "name",
  "urn": "urn",
  "vendor_urn": "vendor_urn",
  "sla_details": {
    "measurement_period_unit": "measurement_period_unit",
    "measurement_period_value": 0,
    "tiers": [
      {
        "availability_percentage": 0,
        "credit_unit": "credit_unit",
        "credit_value": 0
      }
    ],
    "sla_type": "UPTIME"
  }
}