Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add with_configured_alert_ids parameter to get a SLO details endpoint #910

Merged
merged 1 commit into from
May 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.4.1.dev6",
"regenerated": "2021-05-05 11:51:39.750453",
"spec_repo_commit": "45e6981"
"regenerated": "2021-05-05 16:35:55.570334",
"spec_repo_commit": "eaa0782"
},
"v2": {
"apigentools_version": "1.4.1.dev6",
"regenerated": "2021-05-05 11:52:51.665617",
"spec_repo_commit": "45e6981"
"regenerated": "2021-05-05 16:36:58.979772",
"spec_repo_commit": "eaa0782"
}
}
}
2 changes: 2 additions & 0 deletions api/v1/datadog/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ docs/SLOListResponse.md
docs/SLOListResponseMetadata.md
docs/SLOListResponseMetadataPage.md
docs/SLOResponse.md
docs/SLOResponseData.md
docs/SLOThreshold.md
docs/SLOTimeframe.md
docs/SLOType.md
Expand Down Expand Up @@ -863,6 +864,7 @@ model_slo_list_response.go
model_slo_list_response_metadata.go
model_slo_list_response_metadata_page.go
model_slo_response.go
model_slo_response_data.go
model_slo_threshold.go
model_slo_timeframe.go
model_slo_type.go
Expand Down
1 change: 1 addition & 0 deletions api/v1/datadog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,7 @@ Class | Method | HTTP request | Description
- [SLOListResponseMetadata](docs/SLOListResponseMetadata.md)
- [SLOListResponseMetadataPage](docs/SLOListResponseMetadataPage.md)
- [SLOResponse](docs/SLOResponse.md)
- [SLOResponseData](docs/SLOResponseData.md)
- [SLOThreshold](docs/SLOThreshold.md)
- [SLOTimeframe](docs/SLOTimeframe.md)
- [SLOType](docs/SLOType.md)
Expand Down
171 changes: 170 additions & 1 deletion api/v1/datadog/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5793,6 +5793,15 @@ paths:
schema:
type: string
style: simple
- description: Get the IDs of SLO monitors that reference this SLO.
example: true
explode: true
in: query
name: with_configured_alert_ids
required: false
schema:
type: boolean
style: form
responses:
"200":
content:
Expand Down Expand Up @@ -16216,6 +16225,10 @@ components:
- 1
- 1
name: Custom Metric SLO
configured_alert_ids:
- 123
- 456
- 789
id: id
modified_at: 6
monitor_tags:
Expand All @@ -16226,7 +16239,7 @@ components:
- errors
properties:
data:
$ref: '#/components/schemas/ServiceLevelObjective'
$ref: '#/components/schemas/SLOResponse_data'
errors:
description: |-
An array of error messages. Each endpoint documents how/whether this field is
Expand Down Expand Up @@ -25410,6 +25423,162 @@ components:
page:
$ref: '#/components/schemas/SLOListResponse_metadata_page'
type: object
SLOResponse_data:
description: |-
A service level objective object includes a service level indicator, thresholds
for one or more timeframes, and metadata (`name`, `description`, `tags`, etc.).
example:
creator:
name: name
handle: handle
email: email
query:
denominator: sum:my.custom.metric{*}.as_count()
numerator: sum:my.custom.metric{type:good}.as_count()
created_at: 0
description: description
groups:
- env:prod
- role:mysql
type: metric
tags:
- env:prod
- app:core
thresholds:
- target: 95
timeframe: 7d
- target: 95
timeframe: 30d
warning: 97
monitor_ids:
- 1
- 1
name: Custom Metric SLO
configured_alert_ids:
- 123
- 456
- 789
id: id
modified_at: 6
monitor_tags:
- monitor_tags
- monitor_tags
properties:
configured_alert_ids:
description: A list of SLO monitors IDs that reference this SLO. This field
is returned only when `with_configured_alert_ids` parameter is true in
query.
example:
- 123
- 456
- 789
items:
description: A monitor ID.
format: int64
type: integer
type: array
created_at:
description: |-
Creation timestamp (UNIX time in seconds)

Always included in service level objective responses.
format: int64
readOnly: true
type: integer
creator:
$ref: '#/components/schemas/Creator'
description:
description: |-
A user-defined description of the service level objective.

Always included in service level objective responses (but may be `null`).
Optional in create/update requests.
nullable: true
type: string
groups:
description: |-
A list of (up to 20) monitor groups that narrow the scope of a monitor service level objective.

Included in service level objective responses if it is not empty. Optional in
create/update requests for monitor service level objectives, but may only be
used when then length of the `monitor_ids` field is one.
example:
- env:prod
- role:mysql
items:
description: A group name, for instance `env:prod`.
type: string
type: array
id:
description: |-
A unique identifier for the service level objective object.

Always included in service level objective responses.
readOnly: true
type: string
modified_at:
description: |-
Modification timestamp (UNIX time in seconds)

Always included in service level objective responses.
format: int64
readOnly: true
type: integer
monitor_ids:
description: |-
A list of monitor ids that defines the scope of a monitor service level
objective. **Required if type is `monitor`**.
items:
description: A monitor ID.
format: int64
type: integer
type: array
monitor_tags:
description: |-
The union of monitor tags for all monitors referenced by the `monitor_ids`
field.
Always included in service level objective responses for monitor service level
objectives (but may be empty). Ignored in create/update requests. Does not
affect which monitors are included in the service level objective (that is
determined entirely by the `monitor_ids` field).
items:
description: A monitor tag.
type: string
type: array
name:
description: The name of the service level objective object.
example: Custom Metric SLO
type: string
query:
$ref: '#/components/schemas/ServiceLevelObjectiveQuery'
tags:
description: |-
A list of tags associated with this service level objective.
Always included in service level objective responses (but may be empty).
Optional in create/update requests.
example:
- env:prod
- app:core
items:
description: A tag to apply to your SLO.
type: string
type: array
thresholds:
description: |-
The thresholds (timeframes and associated targets) for this service level
objective object.
example:
- target: 95
timeframe: 7d
- target: 95
timeframe: 30d
warning: 97
items:
$ref: '#/components/schemas/SLOThreshold'
type: array
type:
$ref: '#/components/schemas/SLOType'
type: object
ScatterPlotWidgetDefinition_requests:
description: Widget definition.
example:
Expand Down
34 changes: 30 additions & 4 deletions api/v1/datadog/api_service_level_objectives.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions api/v1/datadog/docs/SLOResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Name | Type | Description | Notes
---- | ---- | ----------- | ------
**Data** | Pointer to [**ServiceLevelObjective**](ServiceLevelObjective.md) | | [optional]
**Data** | Pointer to [**SLOResponseData**](SLOResponseData.md) | | [optional]
**Errors** | Pointer to **[]string** | An array of error messages. Each endpoint documents how/whether this field is used. | [optional]

## Methods
Expand All @@ -28,20 +28,20 @@ but it doesn't guarantee that properties required by API are set

### GetData

`func (o *SLOResponse) GetData() ServiceLevelObjective`
`func (o *SLOResponse) GetData() SLOResponseData`

GetData returns the Data field if non-nil, zero value otherwise.

### GetDataOk

`func (o *SLOResponse) GetDataOk() (*ServiceLevelObjective, bool)`
`func (o *SLOResponse) GetDataOk() (*SLOResponseData, bool)`

GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetData

`func (o *SLOResponse) SetData(v ServiceLevelObjective)`
`func (o *SLOResponse) SetData(v SLOResponseData)`

SetData sets Data field to given value.

Expand Down
Loading