Skip to content

Commit d92d38b

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 54ffed1b of spec repo
1 parent 0bc78c3 commit d92d38b

File tree

44 files changed

+2704
-4
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+2704
-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-25 18:59:16.169917",
8-
"spec_repo_commit": "ccf15bee"
7+
"regenerated": "2024-07-26 14:24:39.409462",
8+
"spec_repo_commit": "54ffed1b"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-07-25 18:59:16.187515",
13-
"spec_repo_commit": "ccf15bee"
12+
"regenerated": "2024-07-26 14:24:39.427532",
13+
"spec_repo_commit": "54ffed1b"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 244 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:
@@ -23594,6 +23608,89 @@ components:
2359423608
- PAST_SIX_MONTHS
2359523609
- PAST_ONE_YEAR
2359623610
- ALERT
23611+
WorkflowInstanceCreateMeta:
23612+
description: Additional information for creating a workflow instance.
23613+
properties:
23614+
payload:
23615+
additionalProperties: {}
23616+
description: The input parameters to the workflow.
23617+
type: object
23618+
type: object
23619+
WorkflowInstanceCreateRequest:
23620+
description: Request used to create a workflow instance.
23621+
properties:
23622+
meta:
23623+
$ref: '#/components/schemas/WorkflowInstanceCreateMeta'
23624+
type: object
23625+
WorkflowInstanceCreateResponse:
23626+
additionalProperties: {}
23627+
description: Response returned upon successful workflow instance creation.
23628+
properties:
23629+
data:
23630+
$ref: '#/components/schemas/WorkflowInstanceCreateResponseData'
23631+
type: object
23632+
WorkflowInstanceCreateResponseData:
23633+
additionalProperties: {}
23634+
description: Data about the created workflow instance.
23635+
properties:
23636+
id:
23637+
description: The ID of the workflow execution. It can be used to fetch the
23638+
execution status.
23639+
type: string
23640+
type: object
23641+
WorkflowInstanceListItem:
23642+
additionalProperties: {}
23643+
description: An item in the workflow instances list.
23644+
properties:
23645+
id:
23646+
description: The ID of the workflow instance
23647+
type: string
23648+
type: object
23649+
WorkflowListInstancesResponse:
23650+
additionalProperties: {}
23651+
description: Response returned when listing workflow instances.
23652+
properties:
23653+
data:
23654+
description: A list of workflow instances.
23655+
items:
23656+
$ref: '#/components/schemas/WorkflowInstanceListItem'
23657+
type: array
23658+
type: object
23659+
WorklflowCancelInstanceResponse:
23660+
description: Information about the canceled instance.
23661+
properties:
23662+
data:
23663+
$ref: '#/components/schemas/WorklflowCancelInstanceResponseData'
23664+
type: object
23665+
WorklflowCancelInstanceResponseData:
23666+
description: Data about the canceled instance.
23667+
properties:
23668+
id:
23669+
description: The id of the canceled instance
23670+
type: string
23671+
type: object
23672+
WorklflowGetInstanceResponse:
23673+
additionalProperties: {}
23674+
description: The state of the given workflow instance.
23675+
properties:
23676+
data:
23677+
$ref: '#/components/schemas/WorklflowGetInstanceResponseData'
23678+
type: object
23679+
WorklflowGetInstanceResponseData:
23680+
additionalProperties: {}
23681+
description: The data of the instance response.
23682+
properties:
23683+
attributes:
23684+
$ref: '#/components/schemas/WorklflowGetInstanceResponseDataAttributes'
23685+
type: object
23686+
WorklflowGetInstanceResponseDataAttributes:
23687+
additionalProperties: {}
23688+
description: The attributes of the instance response data.
23689+
properties:
23690+
id:
23691+
description: The id of the instance.
23692+
type: string
23693+
type: object
2359723694
securitySchemes:
2359823695
AuthZ:
2359923696
description: This API uses OAuth 2 with the implicit grant flow.
@@ -37501,6 +37598,148 @@ paths:
3750137598
summary: Get user memberships
3750237599
tags:
3750337600
- Teams
37601+
/api/v2/workflows/{workflow_id}/instances:
37602+
get:
37603+
description: List all instances of a given workflow.
37604+
operationId: ListWorkflowInstances
37605+
parameters:
37606+
- $ref: '#/components/parameters/WorkflowId'
37607+
- $ref: '#/components/parameters/PageSize'
37608+
- $ref: '#/components/parameters/PageNumber'
37609+
responses:
37610+
'200':
37611+
content:
37612+
application/json:
37613+
schema:
37614+
$ref: '#/components/schemas/WorkflowListInstancesResponse'
37615+
description: OK
37616+
'400':
37617+
content:
37618+
application/json:
37619+
schema:
37620+
$ref: '#/components/schemas/APIErrorResponse'
37621+
description: Bad Request
37622+
'403':
37623+
content:
37624+
application/json:
37625+
schema:
37626+
$ref: '#/components/schemas/APIErrorResponse'
37627+
description: Forbidden
37628+
'429':
37629+
$ref: '#/components/responses/TooManyRequestsResponse'
37630+
summary: List workflow instances
37631+
tags:
37632+
- Workflow Automation
37633+
post:
37634+
description: Execute the given workflow
37635+
operationId: CreateWorkflowInstance
37636+
parameters:
37637+
- $ref: '#/components/parameters/WorkflowId'
37638+
requestBody:
37639+
content:
37640+
application/json:
37641+
schema:
37642+
$ref: '#/components/schemas/WorkflowInstanceCreateRequest'
37643+
required: true
37644+
responses:
37645+
'200':
37646+
content:
37647+
application/json:
37648+
schema:
37649+
$ref: '#/components/schemas/WorkflowInstanceCreateResponse'
37650+
description: Created
37651+
'400':
37652+
content:
37653+
application/json:
37654+
schema:
37655+
$ref: '#/components/schemas/APIErrorResponse'
37656+
description: Bad Request
37657+
'403':
37658+
content:
37659+
application/json:
37660+
schema:
37661+
$ref: '#/components/schemas/APIErrorResponse'
37662+
description: Forbidden
37663+
'429':
37664+
$ref: '#/components/responses/TooManyRequestsResponse'
37665+
summary: Execute a workflow
37666+
tags:
37667+
- Workflow Automation
37668+
x-codegen-request-body-name: body
37669+
/api/v2/workflows/{workflow_id}/instances/{instance_id}:
37670+
get:
37671+
description: Get a specific execution of a given workflow.
37672+
operationId: GetWorkflowInstance
37673+
parameters:
37674+
- $ref: '#/components/parameters/WorkflowId'
37675+
- $ref: '#/components/parameters/InstanceId'
37676+
responses:
37677+
'200':
37678+
content:
37679+
application/json:
37680+
schema:
37681+
$ref: '#/components/schemas/WorklflowGetInstanceResponse'
37682+
description: OK
37683+
'400':
37684+
content:
37685+
application/json:
37686+
schema:
37687+
$ref: '#/components/schemas/APIErrorResponse'
37688+
description: Bad Request
37689+
'403':
37690+
content:
37691+
application/json:
37692+
schema:
37693+
$ref: '#/components/schemas/APIErrorResponse'
37694+
description: Forbidden
37695+
'404':
37696+
content:
37697+
application/json:
37698+
schema:
37699+
$ref: '#/components/schemas/APIErrorResponse'
37700+
description: Not Found
37701+
'429':
37702+
$ref: '#/components/responses/TooManyRequestsResponse'
37703+
summary: Get a workflow instance
37704+
tags:
37705+
- Workflow Automation
37706+
/api/v2/workflows/{workflow_id}/instances/{instance_id}/cancel:
37707+
put:
37708+
description: Cancels a specific execution of a given workflow.
37709+
operationId: CancelWorkflowInstance
37710+
parameters:
37711+
- $ref: '#/components/parameters/WorkflowId'
37712+
- $ref: '#/components/parameters/InstanceId'
37713+
responses:
37714+
'200':
37715+
content:
37716+
application/json:
37717+
schema:
37718+
$ref: '#/components/schemas/WorklflowCancelInstanceResponse'
37719+
description: OK
37720+
'400':
37721+
content:
37722+
application/json:
37723+
schema:
37724+
$ref: '#/components/schemas/APIErrorResponse'
37725+
description: Bad Request
37726+
'403':
37727+
content:
37728+
application/json:
37729+
schema:
37730+
$ref: '#/components/schemas/APIErrorResponse'
37731+
description: Forbidden
37732+
'404':
37733+
content:
37734+
application/json:
37735+
schema:
37736+
$ref: '#/components/schemas/APIErrorResponse'
37737+
description: Not Found
37738+
'429':
37739+
$ref: '#/components/responses/TooManyRequestsResponse'
37740+
summary: Cancel a workflow instance
37741+
tags:
37742+
- Workflow Automation
3750437743
security:
3750537744
- apiKeyAuth: []
3750637745
appKeyAuth: []
@@ -37872,4 +38111,9 @@ tags:
3787238111
externalDocs:
3787338112
url: https://docs.datadoghq.com/account_management/users
3787438113
name: Users
38114+
- description: Automate your teams operational processes with Datadog Workflow Automation.
38115+
externalDocs:
38116+
description: Find out more at
38117+
url: https://docs.datadoghq.com/service_management/workflows/
38118+
name: Workflow Automation
3787538119
x-group-parameters: true
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Cancel a workflow instance returns "OK" response
2+
use datadog_api_client::datadog;
3+
use datadog_api_client::datadogV2::api_workflow_automation::WorkflowAutomationAPI;
4+
5+
#[tokio::main]
6+
async fn main() {
7+
let configuration = datadog::Configuration::new();
8+
let api = WorkflowAutomationAPI::with_config(configuration);
9+
let resp = api
10+
.cancel_workflow_instance(
11+
"ccf73164-1998-4785-a7a3-8d06c7e5f558".to_string(),
12+
"305a472b-71ab-4ce8-8f8d-75db635627b5".to_string(),
13+
)
14+
.await;
15+
if let Ok(value) = resp {
16+
println!("{:#?}", value);
17+
} else {
18+
println!("{:#?}", resp.unwrap_err());
19+
}
20+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Execute a workflow returns "Created" response
2+
use datadog_api_client::datadog;
3+
use datadog_api_client::datadogV2::api_workflow_automation::WorkflowAutomationAPI;
4+
use datadog_api_client::datadogV2::model::WorkflowInstanceCreateMeta;
5+
use datadog_api_client::datadogV2::model::WorkflowInstanceCreateRequest;
6+
use serde_json::Value;
7+
use std::collections::BTreeMap;
8+
9+
#[tokio::main]
10+
async fn main() {
11+
let body =
12+
WorkflowInstanceCreateRequest::new().meta(WorkflowInstanceCreateMeta::new().payload(
13+
BTreeMap::from([("input".to_string(), Value::from("value"))]),
14+
));
15+
let configuration = datadog::Configuration::new();
16+
let api = WorkflowAutomationAPI::with_config(configuration);
17+
let resp = api
18+
.create_workflow_instance("ccf73164-1998-4785-a7a3-8d06c7e5f558".to_string(), body)
19+
.await;
20+
if let Ok(value) = resp {
21+
println!("{:#?}", value);
22+
} else {
23+
println!("{:#?}", resp.unwrap_err());
24+
}
25+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Get a workflow instance returns "OK" response
2+
use datadog_api_client::datadog;
3+
use datadog_api_client::datadogV2::api_workflow_automation::WorkflowAutomationAPI;
4+
5+
#[tokio::main]
6+
async fn main() {
7+
let configuration = datadog::Configuration::new();
8+
let api = WorkflowAutomationAPI::with_config(configuration);
9+
let resp = api
10+
.get_workflow_instance(
11+
"ccf73164-1998-4785-a7a3-8d06c7e5f558".to_string(),
12+
"305a472b-71ab-4ce8-8f8d-75db635627b5".to_string(),
13+
)
14+
.await;
15+
if let Ok(value) = resp {
16+
println!("{:#?}", value);
17+
} else {
18+
println!("{:#?}", resp.unwrap_err());
19+
}
20+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// List workflow instances returns "OK" response
2+
use datadog_api_client::datadog;
3+
use datadog_api_client::datadogV2::api_workflow_automation::ListWorkflowInstancesOptionalParams;
4+
use datadog_api_client::datadogV2::api_workflow_automation::WorkflowAutomationAPI;
5+
6+
#[tokio::main]
7+
async fn main() {
8+
let configuration = datadog::Configuration::new();
9+
let api = WorkflowAutomationAPI::with_config(configuration);
10+
let resp = api
11+
.list_workflow_instances(
12+
"ccf73164-1998-4785-a7a3-8d06c7e5f558".to_string(),
13+
ListWorkflowInstancesOptionalParams::default(),
14+
)
15+
.await;
16+
if let Ok(value) = resp {
17+
println!("{:#?}", value);
18+
} else {
19+
println!("{:#?}", resp.unwrap_err());
20+
}
21+
}

0 commit comments

Comments
 (0)