Skip to content

Commit 43cf523

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 23c35cbe of spec repo
1 parent 53ee814 commit 43cf523

19 files changed

+926
-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-03 18:25:16.853230",
8-
"spec_repo_commit": "ce846cd6"
7+
"regenerated": "2024-07-09 13:59:00.673383",
8+
"spec_repo_commit": "23c35cbe"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-07-03 18:25:16.870911",
13-
"spec_repo_commit": "ce846cd6"
12+
"regenerated": "2024-07-09 13:59:00.690281",
13+
"spec_repo_commit": "23c35cbe"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 195 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:
@@ -23233,6 +23247,40 @@ components:
2323323247
- PAST_SIX_MONTHS
2323423248
- PAST_ONE_YEAR
2323523249
- ALERT
23250+
WorkflowInstanceCreateMeta:
23251+
description: Additional information for creating a workflow instance
23252+
properties:
23253+
payload:
23254+
additionalProperties: {}
23255+
description: The input parameters to the workflow
23256+
type: object
23257+
type: object
23258+
WorkflowInstanceCreateRequest:
23259+
description: Request used to create a workflow instance.
23260+
properties:
23261+
meta:
23262+
$ref: '#/components/schemas/WorkflowInstanceCreateMeta'
23263+
type: object
23264+
WorkflowInstanceCreateResponse:
23265+
description: Response returned upon successful workflow instance Creation
23266+
properties:
23267+
instanceId:
23268+
description: The ID of the workflow execution. Can be used to fetch execution
23269+
status
23270+
type: string
23271+
type: object
23272+
WorkflowListInstancesResponse:
23273+
additionalProperties: {}
23274+
description: Response returned when listing workflow instances
23275+
type: object
23276+
WorklflowCancelInstanceResponse:
23277+
additionalProperties: {}
23278+
description: Information about the canceled instance
23279+
type: object
23280+
WorklflowGetInstanceResponse:
23281+
additionalProperties: {}
23282+
description: State of the given workflow instance
23283+
type: object
2323623284
securitySchemes:
2323723285
AuthZ:
2323823286
description: This API uses OAuth 2 with the implicit grant flow.
@@ -36928,6 +36976,148 @@ paths:
3692836976
summary: Get user memberships
3692936977
tags:
3693036978
- Teams
36979+
/api/v2/workflows/{workflow_id}/instances:
36980+
get:
36981+
description: List all instances of a given workflow
36982+
operationId: ListWorkflowInstances
36983+
parameters:
36984+
- $ref: '#/components/parameters/WorkflowId'
36985+
- $ref: '#/components/parameters/PageSize'
36986+
- $ref: '#/components/parameters/PageNumber'
36987+
responses:
36988+
'200':
36989+
content:
36990+
application/json:
36991+
schema:
36992+
$ref: '#/components/schemas/WorkflowListInstancesResponse'
36993+
description: OK
36994+
'400':
36995+
content:
36996+
application/json:
36997+
schema:
36998+
$ref: '#/components/schemas/APIErrorResponse'
36999+
description: Bad Request
37000+
'403':
37001+
content:
37002+
application/json:
37003+
schema:
37004+
$ref: '#/components/schemas/APIErrorResponse'
37005+
description: Forbidden
37006+
'429':
37007+
$ref: '#/components/responses/TooManyRequestsResponse'
37008+
summary: List workflow instances
37009+
tags:
37010+
- Workflow Automation
37011+
post:
37012+
description: Execute the given workflow
37013+
operationId: CreateWorkflowInstance
37014+
parameters:
37015+
- $ref: '#/components/parameters/WorkflowId'
37016+
requestBody:
37017+
content:
37018+
application/json:
37019+
schema:
37020+
$ref: '#/components/schemas/WorkflowInstanceCreateRequest'
37021+
required: true
37022+
responses:
37023+
'200':
37024+
content:
37025+
application/json:
37026+
schema:
37027+
$ref: '#/components/schemas/WorkflowInstanceCreateResponse'
37028+
description: Created
37029+
'400':
37030+
content:
37031+
application/json:
37032+
schema:
37033+
$ref: '#/components/schemas/APIErrorResponse'
37034+
description: Bad Request
37035+
'403':
37036+
content:
37037+
application/json:
37038+
schema:
37039+
$ref: '#/components/schemas/APIErrorResponse'
37040+
description: Forbidden
37041+
'429':
37042+
$ref: '#/components/responses/TooManyRequestsResponse'
37043+
summary: Execute a workflow
37044+
tags:
37045+
- Workflow Automation
37046+
x-codegen-request-body-name: body
37047+
/api/v2/workflows/{workflow_id}/instances/{instance_id}:
37048+
get:
37049+
description: Get a specific execution of a given workflow
37050+
operationId: GetWorkflowInstance
37051+
parameters:
37052+
- $ref: '#/components/parameters/WorkflowId'
37053+
- $ref: '#/components/parameters/InstanceId'
37054+
responses:
37055+
'200':
37056+
content:
37057+
application/json:
37058+
schema:
37059+
$ref: '#/components/schemas/WorklflowGetInstanceResponse'
37060+
description: OK
37061+
'400':
37062+
content:
37063+
application/json:
37064+
schema:
37065+
$ref: '#/components/schemas/APIErrorResponse'
37066+
description: Bad Request
37067+
'403':
37068+
content:
37069+
application/json:
37070+
schema:
37071+
$ref: '#/components/schemas/APIErrorResponse'
37072+
description: Forbidden
37073+
'404':
37074+
content:
37075+
application/json:
37076+
schema:
37077+
$ref: '#/components/schemas/APIErrorResponse'
37078+
description: Not Found
37079+
'429':
37080+
$ref: '#/components/responses/TooManyRequestsResponse'
37081+
summary: Get a workflow instance
37082+
tags:
37083+
- Workflow Automation
37084+
/api/v2/workflows/{workflow_id}/instances/{instance_id}/cancel:
37085+
put:
37086+
description: Cancels a specific execution of a given workflow
37087+
operationId: CancelWorkflowInstance
37088+
parameters:
37089+
- $ref: '#/components/parameters/WorkflowId'
37090+
- $ref: '#/components/parameters/InstanceId'
37091+
responses:
37092+
'200':
37093+
content:
37094+
application/json:
37095+
schema:
37096+
$ref: '#/components/schemas/WorklflowCancelInstanceResponse'
37097+
description: OK
37098+
'400':
37099+
content:
37100+
application/json:
37101+
schema:
37102+
$ref: '#/components/schemas/APIErrorResponse'
37103+
description: Bad Request
37104+
'403':
37105+
content:
37106+
application/json:
37107+
schema:
37108+
$ref: '#/components/schemas/APIErrorResponse'
37109+
description: Forbidden
37110+
'404':
37111+
content:
37112+
application/json:
37113+
schema:
37114+
$ref: '#/components/schemas/APIErrorResponse'
37115+
description: Not Found
37116+
'429':
37117+
$ref: '#/components/responses/TooManyRequestsResponse'
37118+
summary: Cancel a workflow instance
37119+
tags:
37120+
- Workflow Automation
3693137121
security:
3693237122
- apiKeyAuth: []
3693337123
appKeyAuth: []
@@ -37295,4 +37485,9 @@ tags:
3729537485
externalDocs:
3729637486
url: https://docs.datadoghq.com/account_management/users
3729737487
name: Users
37488+
- description: Automate your teams operational processes with Datadog Workflow Automation.
37489+
externalDocs:
37490+
description: Find out more at
37491+
url: https://docs.datadoghq.com/service_management/workflows/
37492+
name: Workflow Automation
3729837493
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: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10515,6 +10515,48 @@ widget\_live\_span
1051510515
:members:
1051610516
:show-inheritance:
1051710517

10518+
workflow\_instance\_create\_meta
10519+
--------------------------------
10520+
10521+
.. automodule:: datadog_api_client.v2.model.workflow_instance_create_meta
10522+
:members:
10523+
:show-inheritance:
10524+
10525+
workflow\_instance\_create\_request
10526+
-----------------------------------
10527+
10528+
.. automodule:: datadog_api_client.v2.model.workflow_instance_create_request
10529+
:members:
10530+
:show-inheritance:
10531+
10532+
workflow\_instance\_create\_response
10533+
------------------------------------
10534+
10535+
.. automodule:: datadog_api_client.v2.model.workflow_instance_create_response
10536+
:members:
10537+
:show-inheritance:
10538+
10539+
workflow\_list\_instances\_response
10540+
-----------------------------------
10541+
10542+
.. automodule:: datadog_api_client.v2.model.workflow_list_instances_response
10543+
:members:
10544+
:show-inheritance:
10545+
10546+
worklflow\_cancel\_instance\_response
10547+
-------------------------------------
10548+
10549+
.. automodule:: datadog_api_client.v2.model.worklflow_cancel_instance_response
10550+
:members:
10551+
:show-inheritance:
10552+
10553+
worklflow\_get\_instance\_response
10554+
----------------------------------
10555+
10556+
.. automodule:: datadog_api_client.v2.model.worklflow_get_instance_response
10557+
:members:
10558+
:show-inheritance:
10559+
1051810560

1051910561
.. automodule:: datadog_api_client.v2.model
1052010562
: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)
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
"""
2+
List workflow instances 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.list_workflow_instances(
12+
workflow_id="workflow_id",
13+
)
14+
15+
print(response)

0 commit comments

Comments
 (0)