Skip to content

Commit ec25cbb

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 478393d of spec repo
1 parent 4bddd46 commit ec25cbb

14 files changed

Lines changed: 666 additions & 0 deletions

File tree

‎.generator/schemas/v2/openapi.yaml‎

Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105386,6 +105386,54 @@ components:
105386105386
type: string
105387105387
x-enum-varnames:
105388105388
- SCHEDULE
105389+
RerouteOnCallPageRequest:
105390+
description: Full request to reroute an On-Call Page to a different team or user.
105391+
example:
105392+
data:
105393+
attributes:
105394+
comment: Rerouting to the database team.
105395+
target:
105396+
identifier: my-team
105397+
type: team_handle
105398+
type: reroute
105399+
properties:
105400+
data:
105401+
$ref: "#/components/schemas/RerouteOnCallPageRequestData"
105402+
required:
105403+
- data
105404+
type: object
105405+
RerouteOnCallPageRequestData:
105406+
description: The data for rerouting an On-Call Page, including attributes and resource type.
105407+
properties:
105408+
attributes:
105409+
$ref: "#/components/schemas/RerouteOnCallPageRequestDataAttributes"
105410+
type:
105411+
$ref: "#/components/schemas/RerouteOnCallPageRequestDataType"
105412+
required:
105413+
- attributes
105414+
- type
105415+
type: object
105416+
RerouteOnCallPageRequestDataAttributes:
105417+
description: Details about where to reroute the On-Call Page.
105418+
properties:
105419+
comment:
105420+
description: An optional comment explaining why the page is being rerouted.
105421+
example: Rerouting to the database team.
105422+
type: string
105423+
target:
105424+
$ref: "#/components/schemas/CreatePageRequestDataAttributesTarget"
105425+
required:
105426+
- target
105427+
type: object
105428+
RerouteOnCallPageRequestDataType:
105429+
default: reroute
105430+
description: The type of resource used when rerouting an On-Call Page.
105431+
enum:
105432+
- reroute
105433+
example: reroute
105434+
type: string
105435+
x-enum-varnames:
105436+
- REROUTE
105389105437
ResolveVulnerableSymbolsRequest:
105390105438
description: The top-level request object for resolving vulnerable symbols in a set of packages.
105391105439
properties:
@@ -208334,6 +208382,142 @@ paths:
208334208382
summary: Escalate On-Call Page
208335208383
tags:
208336208384
- On-Call Paging
208385+
/api/v2/on-call/pages/{page_id}/reroute:
208386+
post:
208387+
description: |-
208388+
Reroutes an On-Call Page.
208389+
operationId: RerouteOnCallPage
208390+
parameters:
208391+
- description: The page ID.
208392+
in: path
208393+
name: page_id
208394+
required: true
208395+
schema:
208396+
example: 15e74b8b-f865-48d0-bcc5-453323ed2c8f
208397+
format: uuid
208398+
type: string
208399+
requestBody:
208400+
content:
208401+
application/json:
208402+
examples:
208403+
default:
208404+
value:
208405+
data:
208406+
attributes:
208407+
comment: Rerouting to the database team.
208408+
target:
208409+
identifier: my-team
208410+
type: team_handle
208411+
type: reroute
208412+
schema:
208413+
$ref: "#/components/schemas/RerouteOnCallPageRequest"
208414+
required: true
208415+
responses:
208416+
"204":
208417+
description: No Content.
208418+
"400":
208419+
content:
208420+
application/json:
208421+
schema:
208422+
$ref: "#/components/schemas/JSONAPIErrorResponse"
208423+
description: Bad Request
208424+
"401":
208425+
content:
208426+
application/json:
208427+
schema:
208428+
$ref: "#/components/schemas/JSONAPIErrorResponse"
208429+
description: Unauthorized
208430+
"403":
208431+
content:
208432+
application/json:
208433+
schema:
208434+
$ref: "#/components/schemas/JSONAPIErrorResponse"
208435+
description: Forbidden
208436+
"429":
208437+
$ref: "#/components/responses/TooManyRequestsResponse"
208438+
security:
208439+
- apiKeyAuth: []
208440+
appKeyAuth: []
208441+
- AuthZ: []
208442+
servers:
208443+
- url: https://{site}
208444+
variables:
208445+
site:
208446+
default: navy.oncall.datadoghq.com
208447+
description: The globally available endpoint for On-Call.
208448+
enum:
208449+
- lava.oncall.datadoghq.com
208450+
- saffron.oncall.datadoghq.com
208451+
- navy.oncall.datadoghq.com
208452+
- coral.oncall.datadoghq.com
208453+
- teal.oncall.datadoghq.com
208454+
- beige.oncall.datadoghq.eu
208455+
- scarlet.oncall.datadoghq.com
208456+
x-enum-varnames:
208457+
- LAVA
208458+
- SAFFRON
208459+
- NAVY
208460+
- CORAL
208461+
- TEAL
208462+
- BEIGE
208463+
- SCARLET
208464+
- url: "{protocol}://{name}"
208465+
variables:
208466+
name:
208467+
default: navy.oncall.datadoghq.com
208468+
description: The full DNS name of the On-Call paging endpoint.
208469+
enum:
208470+
- lava.oncall.datadoghq.com
208471+
- saffron.oncall.datadoghq.com
208472+
- navy.oncall.datadoghq.com
208473+
- coral.oncall.datadoghq.com
208474+
- teal.oncall.datadoghq.com
208475+
- beige.oncall.datadoghq.eu
208476+
- scarlet.oncall.datadoghq.com
208477+
x-enum-varnames:
208478+
- LAVA
208479+
- SAFFRON
208480+
- NAVY
208481+
- CORAL
208482+
- TEAL
208483+
- BEIGE
208484+
- SCARLET
208485+
protocol:
208486+
default: https
208487+
description: The protocol for accessing the API.
208488+
- url: https://{subdomain}.{site}
208489+
variables:
208490+
site:
208491+
default: datadoghq.com
208492+
description: The Datadog site where the On-Call paging endpoint is deployed.
208493+
enum:
208494+
- datadoghq.com
208495+
- datadoghq.eu
208496+
x-enum-varnames:
208497+
- DATADOGHQ_COM
208498+
- DATADOGHQ_EU
208499+
subdomain:
208500+
default: navy.oncall
208501+
description: The On-Call paging subdomain.
208502+
enum:
208503+
- lava.oncall
208504+
- saffron.oncall
208505+
- navy.oncall
208506+
- coral.oncall
208507+
- teal.oncall
208508+
- beige.oncall
208509+
- scarlet.oncall
208510+
x-enum-varnames:
208511+
- LAVA
208512+
- SAFFRON
208513+
- NAVY
208514+
- CORAL
208515+
- TEAL
208516+
- BEIGE
208517+
- SCARLET
208518+
summary: Reroute On-Call Page
208519+
tags:
208520+
- On-Call Paging
208337208521
/api/v2/on-call/pages/{page_id}/resolve:
208338208522
post:
208339208523
description: |-
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
"""
2+
Reroute On-Call Page returns "No Content." response
3+
"""
4+
5+
from os import environ
6+
from datadog_api_client import ApiClient, Configuration
7+
from datadog_api_client.v2.api.on_call_paging_api import OnCallPagingApi
8+
from datadog_api_client.v2.model.create_page_request_data_attributes_target import CreatePageRequestDataAttributesTarget
9+
from datadog_api_client.v2.model.on_call_page_target_type import OnCallPageTargetType
10+
from datadog_api_client.v2.model.reroute_on_call_page_request import RerouteOnCallPageRequest
11+
from datadog_api_client.v2.model.reroute_on_call_page_request_data import RerouteOnCallPageRequestData
12+
from datadog_api_client.v2.model.reroute_on_call_page_request_data_attributes import (
13+
RerouteOnCallPageRequestDataAttributes,
14+
)
15+
from datadog_api_client.v2.model.reroute_on_call_page_request_data_type import RerouteOnCallPageRequestDataType
16+
from uuid import UUID
17+
18+
body = RerouteOnCallPageRequest(
19+
data=RerouteOnCallPageRequestData(
20+
attributes=RerouteOnCallPageRequestDataAttributes(
21+
comment="Rerouting to the database team.",
22+
target=CreatePageRequestDataAttributesTarget(
23+
identifier="my-team",
24+
type=OnCallPageTargetType.TEAM_HANDLE,
25+
),
26+
),
27+
type=RerouteOnCallPageRequestDataType.REROUTE,
28+
),
29+
)
30+
31+
configuration = Configuration()
32+
configuration.access_token = environ["DD_BEARER_TOKEN"]
33+
with ApiClient(configuration) as api_client:
34+
api_instance = OnCallPagingApi(api_client)
35+
api_instance.reroute_on_call_page(page_id=UUID("15e74b8b-f865-48d0-bcc5-453323ed2c8f"), body=body)

‎src/datadog_api_client/v2/api/on_call_paging_api.py‎

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
)
1313
from datadog_api_client.v2.model.create_page_response import CreatePageResponse
1414
from datadog_api_client.v2.model.create_page_request import CreatePageRequest
15+
from datadog_api_client.v2.model.reroute_on_call_page_request import RerouteOnCallPageRequest
1516

1617

1718
class OnCallPagingApi:
@@ -295,6 +296,100 @@ def __init__(self, api_client=None):
295296
api_client=api_client,
296297
)
297298

299+
self._reroute_on_call_page_endpoint = _Endpoint(
300+
settings={
301+
"response_type": None,
302+
"auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
303+
"endpoint_path": "/api/v2/on-call/pages/{page_id}/reroute",
304+
"operation_id": "reroute_on_call_page",
305+
"http_method": "POST",
306+
"version": "v2",
307+
"servers": [
308+
{
309+
"url": "https://{site}",
310+
"variables": {
311+
"site": {
312+
"description": "The globally available endpoint for On-Call.",
313+
"default_value": "navy.oncall.datadoghq.com",
314+
"enum_values": [
315+
"lava.oncall.datadoghq.com",
316+
"saffron.oncall.datadoghq.com",
317+
"navy.oncall.datadoghq.com",
318+
"coral.oncall.datadoghq.com",
319+
"teal.oncall.datadoghq.com",
320+
"beige.oncall.datadoghq.eu",
321+
"scarlet.oncall.datadoghq.com",
322+
],
323+
},
324+
},
325+
},
326+
{
327+
"url": "{protocol}://{name}",
328+
"variables": {
329+
"name": {
330+
"description": "The full DNS name of the On-Call paging endpoint.",
331+
"default_value": "navy.oncall.datadoghq.com",
332+
"enum_values": [
333+
"lava.oncall.datadoghq.com",
334+
"saffron.oncall.datadoghq.com",
335+
"navy.oncall.datadoghq.com",
336+
"coral.oncall.datadoghq.com",
337+
"teal.oncall.datadoghq.com",
338+
"beige.oncall.datadoghq.eu",
339+
"scarlet.oncall.datadoghq.com",
340+
],
341+
},
342+
"protocol": {
343+
"description": "The protocol for accessing the API.",
344+
"default_value": "https",
345+
},
346+
},
347+
},
348+
{
349+
"url": "https://{subdomain}.{site}",
350+
"variables": {
351+
"site": {
352+
"description": "The Datadog site where the On-Call paging endpoint is deployed.",
353+
"default_value": "datadoghq.com",
354+
"enum_values": [
355+
"datadoghq.com",
356+
"datadoghq.eu",
357+
],
358+
},
359+
"subdomain": {
360+
"description": "The On-Call paging subdomain.",
361+
"default_value": "navy.oncall",
362+
"enum_values": [
363+
"lava.oncall",
364+
"saffron.oncall",
365+
"navy.oncall",
366+
"coral.oncall",
367+
"teal.oncall",
368+
"beige.oncall",
369+
"scarlet.oncall",
370+
],
371+
},
372+
},
373+
},
374+
],
375+
},
376+
params_map={
377+
"page_id": {
378+
"required": True,
379+
"openapi_types": (UUID,),
380+
"attribute": "page_id",
381+
"location": "path",
382+
},
383+
"body": {
384+
"required": True,
385+
"openapi_types": (RerouteOnCallPageRequest,),
386+
"location": "body",
387+
},
388+
},
389+
headers_map={"accept": ["*/*"], "content_type": ["application/json"]},
390+
api_client=api_client,
391+
)
392+
298393
self._resolve_on_call_page_endpoint = _Endpoint(
299394
settings={
300395
"response_type": None,
@@ -436,6 +531,27 @@ def escalate_on_call_page(
436531

437532
return self._escalate_on_call_page_endpoint.call_with_http_info(**kwargs)
438533

534+
def reroute_on_call_page(
535+
self,
536+
page_id: UUID,
537+
body: RerouteOnCallPageRequest,
538+
) -> None:
539+
"""Reroute On-Call Page.
540+
541+
Reroutes an On-Call Page.
542+
543+
:param page_id: The page ID.
544+
:type page_id: UUID
545+
:type body: RerouteOnCallPageRequest
546+
:rtype: None
547+
"""
548+
kwargs: Dict[str, Any] = {}
549+
kwargs["page_id"] = page_id
550+
551+
kwargs["body"] = body
552+
553+
return self._reroute_on_call_page_endpoint.call_with_http_info(**kwargs)
554+
439555
def resolve_on_call_page(
440556
self,
441557
page_id: UUID,

0 commit comments

Comments
 (0)