Skip to content

Commit ae0ff09

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 4e77e3e0 of spec repo
1 parent a4bafe6 commit ae0ff09

21 files changed

+1045
-4
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2024-07-11 16:35:12.035901",
8-
"spec_repo_commit": "d83fe206"
7+
"regenerated": "2024-07-12 19:45:03.956736",
8+
"spec_repo_commit": "4e77e3e0"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-07-11 16:35:12.052518",
13-
"spec_repo_commit": "d83fe206"
12+
"regenerated": "2024-07-12 19:45:03.973872",
13+
"spec_repo_commit": "4e77e3e0"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 210 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,13 @@ components:
351351
required: true
352352
schema:
353353
type: string
354+
InstanceId:
355+
description: The ID of the workflow instance.
356+
in: path
357+
name: instance_id
358+
required: true
359+
schema:
360+
type: string
354361
MetricID:
355362
description: The name of the log-based metric.
356363
in: path
@@ -536,6 +543,13 @@ components:
536543
schema:
537544
example: 00000000-0000-9999-0000-000000000000
538545
type: string
546+
WorkflowId:
547+
description: The ID of the workflow.
548+
in: path
549+
name: workflow_id
550+
required: true
551+
schema:
552+
type: string
539553
requestBodies: {}
540554
responses:
541555
BadRequestResponse:
@@ -23249,6 +23263,55 @@ components:
2324923263
- PAST_SIX_MONTHS
2325023264
- PAST_ONE_YEAR
2325123265
- ALERT
23266+
WorkflowInstanceCreateMeta:
23267+
description: Additional information for creating a workflow instance.
23268+
properties:
23269+
payload:
23270+
additionalProperties: {}
23271+
description: The input parameters to the workflow.
23272+
type: object
23273+
type: object
23274+
WorkflowInstanceCreateRequest:
23275+
description: Request used to create a workflow instance.
23276+
properties:
23277+
meta:
23278+
$ref: '#/components/schemas/WorkflowInstanceCreateMeta'
23279+
type: object
23280+
WorkflowInstanceCreateResponse:
23281+
description: Response returned upon successful workflow instance creation.
23282+
properties:
23283+
data:
23284+
$ref: '#/components/schemas/WorkflowInstanceCreateResponseData'
23285+
type: object
23286+
WorkflowInstanceCreateResponseData:
23287+
description: Data about the created workflow instance.
23288+
properties:
23289+
id:
23290+
description: The ID of the workflow execution. It can be used to fetch the
23291+
execution status.
23292+
type: string
23293+
type: object
23294+
WorkflowInstanceListItem:
23295+
additionalProperties: {}
23296+
description: An item in the workflow instances list.
23297+
type: object
23298+
WorkflowListInstancesResponse:
23299+
description: Response returned when listing workflow instances.
23300+
properties:
23301+
data:
23302+
description: A list of workflow instances.
23303+
items:
23304+
$ref: '#/components/schemas/WorkflowInstanceListItem'
23305+
type: array
23306+
type: object
23307+
WorklflowCancelInstanceResponse:
23308+
additionalProperties: {}
23309+
description: Information about the canceled instance.
23310+
type: object
23311+
WorklflowGetInstanceResponse:
23312+
additionalProperties: {}
23313+
description: The state of the given workflow instance.
23314+
type: object
2325223315
securitySchemes:
2325323316
AuthZ:
2325423317
description: This API uses OAuth 2 with the implicit grant flow.
@@ -37018,6 +37081,148 @@ paths:
3701837081
summary: Get user memberships
3701937082
tags:
3702037083
- Teams
37084+
/api/v2/workflows/{workflow_id}/instances:
37085+
get:
37086+
description: List all instances of a given workflow.
37087+
operationId: ListWorkflowInstances
37088+
parameters:
37089+
- $ref: '#/components/parameters/WorkflowId'
37090+
- $ref: '#/components/parameters/PageSize'
37091+
- $ref: '#/components/parameters/PageNumber'
37092+
responses:
37093+
'200':
37094+
content:
37095+
application/json:
37096+
schema:
37097+
$ref: '#/components/schemas/WorkflowListInstancesResponse'
37098+
description: OK
37099+
'400':
37100+
content:
37101+
application/json:
37102+
schema:
37103+
$ref: '#/components/schemas/APIErrorResponse'
37104+
description: Bad Request
37105+
'403':
37106+
content:
37107+
application/json:
37108+
schema:
37109+
$ref: '#/components/schemas/APIErrorResponse'
37110+
description: Forbidden
37111+
'429':
37112+
$ref: '#/components/responses/TooManyRequestsResponse'
37113+
summary: List workflow instances
37114+
tags:
37115+
- Workflow Automation
37116+
post:
37117+
description: Execute the given workflow
37118+
operationId: CreateWorkflowInstance
37119+
parameters:
37120+
- $ref: '#/components/parameters/WorkflowId'
37121+
requestBody:
37122+
content:
37123+
application/json:
37124+
schema:
37125+
$ref: '#/components/schemas/WorkflowInstanceCreateRequest'
37126+
required: true
37127+
responses:
37128+
'200':
37129+
content:
37130+
application/json:
37131+
schema:
37132+
$ref: '#/components/schemas/WorkflowInstanceCreateResponse'
37133+
description: Created
37134+
'400':
37135+
content:
37136+
application/json:
37137+
schema:
37138+
$ref: '#/components/schemas/APIErrorResponse'
37139+
description: Bad Request
37140+
'403':
37141+
content:
37142+
application/json:
37143+
schema:
37144+
$ref: '#/components/schemas/APIErrorResponse'
37145+
description: Forbidden
37146+
'429':
37147+
$ref: '#/components/responses/TooManyRequestsResponse'
37148+
summary: Execute a workflow
37149+
tags:
37150+
- Workflow Automation
37151+
x-codegen-request-body-name: body
37152+
/api/v2/workflows/{workflow_id}/instances/{instance_id}:
37153+
get:
37154+
description: Get a specific execution of a given workflow.
37155+
operationId: GetWorkflowInstance
37156+
parameters:
37157+
- $ref: '#/components/parameters/WorkflowId'
37158+
- $ref: '#/components/parameters/InstanceId'
37159+
responses:
37160+
'200':
37161+
content:
37162+
application/json:
37163+
schema:
37164+
$ref: '#/components/schemas/WorklflowGetInstanceResponse'
37165+
description: OK
37166+
'400':
37167+
content:
37168+
application/json:
37169+
schema:
37170+
$ref: '#/components/schemas/APIErrorResponse'
37171+
description: Bad Request
37172+
'403':
37173+
content:
37174+
application/json:
37175+
schema:
37176+
$ref: '#/components/schemas/APIErrorResponse'
37177+
description: Forbidden
37178+
'404':
37179+
content:
37180+
application/json:
37181+
schema:
37182+
$ref: '#/components/schemas/APIErrorResponse'
37183+
description: Not Found
37184+
'429':
37185+
$ref: '#/components/responses/TooManyRequestsResponse'
37186+
summary: Get a workflow instance
37187+
tags:
37188+
- Workflow Automation
37189+
/api/v2/workflows/{workflow_id}/instances/{instance_id}/cancel:
37190+
put:
37191+
description: Cancels a specific execution of a given workflow.
37192+
operationId: CancelWorkflowInstance
37193+
parameters:
37194+
- $ref: '#/components/parameters/WorkflowId'
37195+
- $ref: '#/components/parameters/InstanceId'
37196+
responses:
37197+
'200':
37198+
content:
37199+
application/json:
37200+
schema:
37201+
$ref: '#/components/schemas/WorklflowCancelInstanceResponse'
37202+
description: OK
37203+
'400':
37204+
content:
37205+
application/json:
37206+
schema:
37207+
$ref: '#/components/schemas/APIErrorResponse'
37208+
description: Bad Request
37209+
'403':
37210+
content:
37211+
application/json:
37212+
schema:
37213+
$ref: '#/components/schemas/APIErrorResponse'
37214+
description: Forbidden
37215+
'404':
37216+
content:
37217+
application/json:
37218+
schema:
37219+
$ref: '#/components/schemas/APIErrorResponse'
37220+
description: Not Found
37221+
'429':
37222+
$ref: '#/components/responses/TooManyRequestsResponse'
37223+
summary: Cancel a workflow instance
37224+
tags:
37225+
- Workflow Automation
3702137226
x-merge-override:
3702237227
/api/v2/apicatalog/api: true
3702337228
/api/v2/apm/config/metrics: true
@@ -37462,4 +37667,9 @@ tags:
3746237667
externalDocs:
3746337668
url: https://docs.datadoghq.com/account_management/users
3746437669
name: Users
37670+
- description: Automate your teams operational processes with Datadog Workflow Automation.
37671+
externalDocs:
37672+
description: Find out more at
37673+
url: https://docs.datadoghq.com/service_management/workflows/
37674+
name: Workflow Automation
3746537675
x-group-parameters: true

docs/datadog_api_client.v2.api.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,13 @@ users\_api
351351
:members:
352352
:show-inheritance:
353353

354+
workflow\_automation\_api
355+
-------------------------
356+
357+
.. automodule:: datadog_api_client.v2.api.workflow_automation_api
358+
:members:
359+
:show-inheritance:
360+
354361

355362
.. automodule:: datadog_api_client.v2.api
356363
:members:

docs/datadog_api_client.v2.model.rst

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10529,6 +10529,62 @@ widget\_live\_span
1052910529
:members:
1053010530
:show-inheritance:
1053110531

10532+
workflow\_instance\_create\_meta
10533+
--------------------------------
10534+
10535+
.. automodule:: datadog_api_client.v2.model.workflow_instance_create_meta
10536+
:members:
10537+
:show-inheritance:
10538+
10539+
workflow\_instance\_create\_request
10540+
-----------------------------------
10541+
10542+
.. automodule:: datadog_api_client.v2.model.workflow_instance_create_request
10543+
:members:
10544+
:show-inheritance:
10545+
10546+
workflow\_instance\_create\_response
10547+
------------------------------------
10548+
10549+
.. automodule:: datadog_api_client.v2.model.workflow_instance_create_response
10550+
:members:
10551+
:show-inheritance:
10552+
10553+
workflow\_instance\_create\_response\_data
10554+
------------------------------------------
10555+
10556+
.. automodule:: datadog_api_client.v2.model.workflow_instance_create_response_data
10557+
:members:
10558+
:show-inheritance:
10559+
10560+
workflow\_instance\_list\_item
10561+
------------------------------
10562+
10563+
.. automodule:: datadog_api_client.v2.model.workflow_instance_list_item
10564+
:members:
10565+
:show-inheritance:
10566+
10567+
workflow\_list\_instances\_response
10568+
-----------------------------------
10569+
10570+
.. automodule:: datadog_api_client.v2.model.workflow_list_instances_response
10571+
:members:
10572+
:show-inheritance:
10573+
10574+
worklflow\_cancel\_instance\_response
10575+
-------------------------------------
10576+
10577+
.. automodule:: datadog_api_client.v2.model.worklflow_cancel_instance_response
10578+
:members:
10579+
:show-inheritance:
10580+
10581+
worklflow\_get\_instance\_response
10582+
----------------------------------
10583+
10584+
.. automodule:: datadog_api_client.v2.model.worklflow_get_instance_response
10585+
:members:
10586+
:show-inheritance:
10587+
1053210588

1053310589
.. automodule:: datadog_api_client.v2.model
1053410590
:members:
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
"""
2+
Cancel a workflow instance returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.workflow_automation_api import WorkflowAutomationApi
7+
8+
configuration = Configuration()
9+
with ApiClient(configuration) as api_client:
10+
api_instance = WorkflowAutomationApi(api_client)
11+
response = api_instance.cancel_workflow_instance(
12+
workflow_id="workflow_id",
13+
instance_id="instance_id",
14+
)
15+
16+
print(response)
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
"""
2+
Execute a workflow returns "Created" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.workflow_automation_api import WorkflowAutomationApi
7+
from datadog_api_client.v2.model.workflow_instance_create_meta import WorkflowInstanceCreateMeta
8+
from datadog_api_client.v2.model.workflow_instance_create_request import WorkflowInstanceCreateRequest
9+
10+
body = WorkflowInstanceCreateRequest(
11+
meta=WorkflowInstanceCreateMeta(),
12+
)
13+
14+
configuration = Configuration()
15+
with ApiClient(configuration) as api_client:
16+
api_instance = WorkflowAutomationApi(api_client)
17+
response = api_instance.create_workflow_instance(workflow_id="workflow_id", body=body)
18+
19+
print(response)
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
"""
2+
Get a workflow instance returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.workflow_automation_api import WorkflowAutomationApi
7+
8+
configuration = Configuration()
9+
with ApiClient(configuration) as api_client:
10+
api_instance = WorkflowAutomationApi(api_client)
11+
response = api_instance.get_workflow_instance(
12+
workflow_id="workflow_id",
13+
instance_id="instance_id",
14+
)
15+
16+
print(response)

0 commit comments

Comments
 (0)