Skip to content

Commit

Permalink
Regenerate client from commit 23c35cbe of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Jul 9, 2024
1 parent 53ee814 commit 43cf523
Show file tree
Hide file tree
Showing 19 changed files with 926 additions and 4 deletions.
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.6.6",
"regenerated": "2024-07-03 18:25:16.853230",
"spec_repo_commit": "ce846cd6"
"regenerated": "2024-07-09 13:59:00.673383",
"spec_repo_commit": "23c35cbe"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-07-03 18:25:16.870911",
"spec_repo_commit": "ce846cd6"
"regenerated": "2024-07-09 13:59:00.690281",
"spec_repo_commit": "23c35cbe"
}
}
}
195 changes: 195 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,13 @@ components:
required: true
schema:
type: string
InstanceId:
description: The ID of the workflow instance.
in: path
name: instance_id
required: true
schema:
type: string
MetricID:
description: The name of the log-based metric.
in: path
Expand Down Expand Up @@ -536,6 +543,13 @@ components:
schema:
example: 00000000-0000-9999-0000-000000000000
type: string
WorkflowId:
description: The ID of the workflow.
in: path
name: workflow_id
required: true
schema:
type: string
requestBodies: {}
responses:
BadRequestResponse:
Expand Down Expand Up @@ -23233,6 +23247,40 @@ components:
- PAST_SIX_MONTHS
- PAST_ONE_YEAR
- ALERT
WorkflowInstanceCreateMeta:
description: Additional information for creating a workflow instance
properties:
payload:
additionalProperties: {}
description: The input parameters to the workflow
type: object
type: object
WorkflowInstanceCreateRequest:
description: Request used to create a workflow instance.
properties:
meta:
$ref: '#/components/schemas/WorkflowInstanceCreateMeta'
type: object
WorkflowInstanceCreateResponse:
description: Response returned upon successful workflow instance Creation
properties:
instanceId:
description: The ID of the workflow execution. Can be used to fetch execution
status
type: string
type: object
WorkflowListInstancesResponse:
additionalProperties: {}
description: Response returned when listing workflow instances
type: object
WorklflowCancelInstanceResponse:
additionalProperties: {}
description: Information about the canceled instance
type: object
WorklflowGetInstanceResponse:
additionalProperties: {}
description: State of the given workflow instance
type: object
securitySchemes:
AuthZ:
description: This API uses OAuth 2 with the implicit grant flow.
Expand Down Expand Up @@ -36928,6 +36976,148 @@ paths:
summary: Get user memberships
tags:
- Teams
/api/v2/workflows/{workflow_id}/instances:
get:
description: List all instances of a given workflow
operationId: ListWorkflowInstances
parameters:
- $ref: '#/components/parameters/WorkflowId'
- $ref: '#/components/parameters/PageSize'
- $ref: '#/components/parameters/PageNumber'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/WorkflowListInstancesResponse'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Bad Request
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Forbidden
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
summary: List workflow instances
tags:
- Workflow Automation
post:
description: Execute the given workflow
operationId: CreateWorkflowInstance
parameters:
- $ref: '#/components/parameters/WorkflowId'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/WorkflowInstanceCreateRequest'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/WorkflowInstanceCreateResponse'
description: Created
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Bad Request
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Forbidden
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
summary: Execute a workflow
tags:
- Workflow Automation
x-codegen-request-body-name: body
/api/v2/workflows/{workflow_id}/instances/{instance_id}:
get:
description: Get a specific execution of a given workflow
operationId: GetWorkflowInstance
parameters:
- $ref: '#/components/parameters/WorkflowId'
- $ref: '#/components/parameters/InstanceId'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/WorklflowGetInstanceResponse'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Bad Request
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Forbidden
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Not Found
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
summary: Get a workflow instance
tags:
- Workflow Automation
/api/v2/workflows/{workflow_id}/instances/{instance_id}/cancel:
put:
description: Cancels a specific execution of a given workflow
operationId: CancelWorkflowInstance
parameters:
- $ref: '#/components/parameters/WorkflowId'
- $ref: '#/components/parameters/InstanceId'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/WorklflowCancelInstanceResponse'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Bad Request
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Forbidden
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Not Found
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
summary: Cancel a workflow instance
tags:
- Workflow Automation
security:
- apiKeyAuth: []
appKeyAuth: []
Expand Down Expand Up @@ -37295,4 +37485,9 @@ tags:
externalDocs:
url: https://docs.datadoghq.com/account_management/users
name: Users
- description: Automate your teams operational processes with Datadog Workflow Automation.
externalDocs:
description: Find out more at
url: https://docs.datadoghq.com/service_management/workflows/
name: Workflow Automation
x-group-parameters: true
7 changes: 7 additions & 0 deletions docs/datadog_api_client.v2.api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,13 @@ users\_api
:members:
:show-inheritance:

workflow\_automation\_api
-------------------------

.. automodule:: datadog_api_client.v2.api.workflow_automation_api
:members:
:show-inheritance:


.. automodule:: datadog_api_client.v2.api
:members:
Expand Down
42 changes: 42 additions & 0 deletions docs/datadog_api_client.v2.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10515,6 +10515,48 @@ widget\_live\_span
:members:
:show-inheritance:

workflow\_instance\_create\_meta
--------------------------------

.. automodule:: datadog_api_client.v2.model.workflow_instance_create_meta
:members:
:show-inheritance:

workflow\_instance\_create\_request
-----------------------------------

.. automodule:: datadog_api_client.v2.model.workflow_instance_create_request
:members:
:show-inheritance:

workflow\_instance\_create\_response
------------------------------------

.. automodule:: datadog_api_client.v2.model.workflow_instance_create_response
:members:
:show-inheritance:

workflow\_list\_instances\_response
-----------------------------------

.. automodule:: datadog_api_client.v2.model.workflow_list_instances_response
:members:
:show-inheritance:

worklflow\_cancel\_instance\_response
-------------------------------------

.. automodule:: datadog_api_client.v2.model.worklflow_cancel_instance_response
:members:
:show-inheritance:

worklflow\_get\_instance\_response
----------------------------------

.. automodule:: datadog_api_client.v2.model.worklflow_get_instance_response
:members:
:show-inheritance:


.. automodule:: datadog_api_client.v2.model
:members:
Expand Down
16 changes: 16 additions & 0 deletions examples/v2/workflow-automation/CancelWorkflowInstance.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"""
Cancel a workflow instance returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.workflow_automation_api import WorkflowAutomationApi

configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = WorkflowAutomationApi(api_client)
response = api_instance.cancel_workflow_instance(
workflow_id="workflow_id",
instance_id="instance_id",
)

print(response)
19 changes: 19 additions & 0 deletions examples/v2/workflow-automation/CreateWorkflowInstance.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
"""
Execute a workflow returns "Created" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.workflow_automation_api import WorkflowAutomationApi
from datadog_api_client.v2.model.workflow_instance_create_meta import WorkflowInstanceCreateMeta
from datadog_api_client.v2.model.workflow_instance_create_request import WorkflowInstanceCreateRequest

body = WorkflowInstanceCreateRequest(
meta=WorkflowInstanceCreateMeta(),
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = WorkflowAutomationApi(api_client)
response = api_instance.create_workflow_instance(workflow_id="workflow_id", body=body)

print(response)
16 changes: 16 additions & 0 deletions examples/v2/workflow-automation/GetWorkflowInstance.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"""
Get a workflow instance returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.workflow_automation_api import WorkflowAutomationApi

configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = WorkflowAutomationApi(api_client)
response = api_instance.get_workflow_instance(
workflow_id="workflow_id",
instance_id="instance_id",
)

print(response)
15 changes: 15 additions & 0 deletions examples/v2/workflow-automation/ListWorkflowInstances.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
"""
List workflow instances returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.workflow_automation_api import WorkflowAutomationApi

configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = WorkflowAutomationApi(api_client)
response = api_instance.list_workflow_instances(
workflow_id="workflow_id",
)

print(response)
Loading

0 comments on commit 43cf523

Please sign in to comment.