Skip to content

Commit 69f412e

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit e5e0c6ab of spec repo
1 parent a73845e commit 69f412e

File tree

46 files changed

+2923
-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.

46 files changed

+2923
-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-30 17:01:08.846214",
8-
"spec_repo_commit": "4380003d"
7+
"regenerated": "2024-07-30 19:01:23.554608",
8+
"spec_repo_commit": "e5e0c6ab"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-07-30 17:01:08.864677",
13-
"spec_repo_commit": "4380003d"
12+
"regenerated": "2024-07-30 19:01:23.572549",
13+
"spec_repo_commit": "e5e0c6ab"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 222 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,13 @@ components:
358358
required: true
359359
schema:
360360
type: string
361+
InstanceId:
362+
description: The ID of the workflow instance.
363+
in: path
364+
name: instance_id
365+
required: true
366+
schema:
367+
type: string
361368
MetricID:
362369
description: The name of the log-based metric.
363370
in: path
@@ -543,6 +550,13 @@ components:
543550
schema:
544551
example: 00000000-0000-9999-0000-000000000000
545552
type: string
553+
WorkflowId:
554+
description: The ID of the workflow.
555+
in: path
556+
name: workflow_id
557+
required: true
558+
schema:
559+
type: string
546560
requestBodies: {}
547561
responses:
548562
BadRequestResponse:
@@ -23831,6 +23845,107 @@ components:
2383123845
- PAST_SIX_MONTHS
2383223846
- PAST_ONE_YEAR
2383323847
- ALERT
23848+
WorkflowInstanceCreateMeta:
23849+
description: Additional information for creating a workflow instance.
23850+
properties:
23851+
payload:
23852+
additionalProperties: {}
23853+
description: The input parameters to the workflow.
23854+
type: object
23855+
type: object
23856+
WorkflowInstanceCreateRequest:
23857+
description: Request used to create a workflow instance.
23858+
properties:
23859+
meta:
23860+
$ref: '#/components/schemas/WorkflowInstanceCreateMeta'
23861+
type: object
23862+
WorkflowInstanceCreateResponse:
23863+
additionalProperties: {}
23864+
description: Response returned upon successful workflow instance creation.
23865+
properties:
23866+
data:
23867+
$ref: '#/components/schemas/WorkflowInstanceCreateResponseData'
23868+
type: object
23869+
WorkflowInstanceCreateResponseData:
23870+
additionalProperties: {}
23871+
description: Data about the created workflow instance.
23872+
properties:
23873+
id:
23874+
description: The ID of the workflow execution. It can be used to fetch the
23875+
execution status.
23876+
type: string
23877+
type: object
23878+
WorkflowInstanceListItem:
23879+
additionalProperties: {}
23880+
description: An item in the workflow instances list.
23881+
properties:
23882+
id:
23883+
description: The ID of the workflow instance
23884+
type: string
23885+
type: object
23886+
WorkflowListInstancesResponse:
23887+
additionalProperties: {}
23888+
description: Response returned when listing workflow instances.
23889+
properties:
23890+
data:
23891+
description: A list of workflow instances.
23892+
items:
23893+
$ref: '#/components/schemas/WorkflowInstanceListItem'
23894+
type: array
23895+
meta:
23896+
$ref: '#/components/schemas/WorkflowListInstancesResponseMeta'
23897+
type: object
23898+
WorkflowListInstancesResponseMeta:
23899+
additionalProperties: {}
23900+
description: Metadata about the instances list
23901+
properties:
23902+
page:
23903+
$ref: '#/components/schemas/WorkflowListInstancesResponseMetaPage'
23904+
type: object
23905+
WorkflowListInstancesResponseMetaPage:
23906+
additionalProperties: {}
23907+
description: Page information for the list instances response.
23908+
properties:
23909+
totalCount:
23910+
description: The total count of items.
23911+
format: int64
23912+
type: integer
23913+
type: object
23914+
WorklflowCancelInstanceResponse:
23915+
description: Information about the canceled instance.
23916+
properties:
23917+
data:
23918+
$ref: '#/components/schemas/WorklflowCancelInstanceResponseData'
23919+
type: object
23920+
WorklflowCancelInstanceResponseData:
23921+
description: Data about the canceled instance.
23922+
properties:
23923+
id:
23924+
description: The id of the canceled instance
23925+
type: string
23926+
type: object
23927+
WorklflowGetInstanceResponse:
23928+
additionalProperties: {}
23929+
description: The state of the given workflow instance.
23930+
properties:
23931+
data:
23932+
$ref: '#/components/schemas/WorklflowGetInstanceResponseData'
23933+
type: object
23934+
WorklflowGetInstanceResponseData:
23935+
additionalProperties: {}
23936+
description: The data of the instance response.
23937+
properties:
23938+
attributes:
23939+
$ref: '#/components/schemas/WorklflowGetInstanceResponseDataAttributes'
23940+
type: object
23941+
WorklflowGetInstanceResponseDataAttributes:
23942+
additionalProperties: {}
23943+
description: The attributes of the instance response data.
23944+
properties:
23945+
id:
23946+
description: The id of the instance.
23947+
type: string
23948+
type: object
2383423949
securitySchemes:
2383523950
AuthZ:
2383623951
description: This API uses OAuth 2 with the implicit grant flow.
@@ -37850,6 +37965,108 @@ paths:
3785037965
summary: Get user memberships
3785137966
tags:
3785237967
- Teams
37968+
/api/v2/workflows/{workflow_id}/instances:
37969+
get:
37970+
description: List all instances of a given workflow.
37971+
operationId: ListWorkflowInstances
37972+
parameters:
37973+
- $ref: '#/components/parameters/WorkflowId'
37974+
- $ref: '#/components/parameters/PageSize'
37975+
- $ref: '#/components/parameters/PageNumber'
37976+
responses:
37977+
'200':
37978+
content:
37979+
application/json:
37980+
schema:
37981+
$ref: '#/components/schemas/WorkflowListInstancesResponse'
37982+
description: OK
37983+
'400':
37984+
$ref: '#/components/responses/BadRequestResponse'
37985+
'403':
37986+
$ref: '#/components/responses/ForbiddenResponse'
37987+
'429':
37988+
$ref: '#/components/responses/TooManyRequestsResponse'
37989+
summary: List workflow instances
37990+
tags:
37991+
- Workflow Automation
37992+
post:
37993+
description: Execute the given workflow
37994+
operationId: CreateWorkflowInstance
37995+
parameters:
37996+
- $ref: '#/components/parameters/WorkflowId'
37997+
requestBody:
37998+
content:
37999+
application/json:
38000+
schema:
38001+
$ref: '#/components/schemas/WorkflowInstanceCreateRequest'
38002+
required: true
38003+
responses:
38004+
'200':
38005+
content:
38006+
application/json:
38007+
schema:
38008+
$ref: '#/components/schemas/WorkflowInstanceCreateResponse'
38009+
description: Created
38010+
'400':
38011+
$ref: '#/components/responses/BadRequestResponse'
38012+
'403':
38013+
$ref: '#/components/responses/ForbiddenResponse'
38014+
'429':
38015+
$ref: '#/components/responses/TooManyRequestsResponse'
38016+
summary: Execute a workflow
38017+
tags:
38018+
- Workflow Automation
38019+
x-codegen-request-body-name: body
38020+
/api/v2/workflows/{workflow_id}/instances/{instance_id}:
38021+
get:
38022+
description: Get a specific execution of a given workflow.
38023+
operationId: GetWorkflowInstance
38024+
parameters:
38025+
- $ref: '#/components/parameters/WorkflowId'
38026+
- $ref: '#/components/parameters/InstanceId'
38027+
responses:
38028+
'200':
38029+
content:
38030+
application/json:
38031+
schema:
38032+
$ref: '#/components/schemas/WorklflowGetInstanceResponse'
38033+
description: OK
38034+
'400':
38035+
$ref: '#/components/responses/BadRequestResponse'
38036+
'403':
38037+
$ref: '#/components/responses/ForbiddenResponse'
38038+
'404':
38039+
$ref: '#/components/responses/NotFoundResponse'
38040+
'429':
38041+
$ref: '#/components/responses/TooManyRequestsResponse'
38042+
summary: Get a workflow instance
38043+
tags:
38044+
- Workflow Automation
38045+
/api/v2/workflows/{workflow_id}/instances/{instance_id}/cancel:
38046+
put:
38047+
description: Cancels a specific execution of a given workflow.
38048+
operationId: CancelWorkflowInstance
38049+
parameters:
38050+
- $ref: '#/components/parameters/WorkflowId'
38051+
- $ref: '#/components/parameters/InstanceId'
38052+
responses:
38053+
'200':
38054+
content:
38055+
application/json:
38056+
schema:
38057+
$ref: '#/components/schemas/WorklflowCancelInstanceResponse'
38058+
description: OK
38059+
'400':
38060+
$ref: '#/components/responses/BadRequestResponse'
38061+
'403':
38062+
$ref: '#/components/responses/ForbiddenResponse'
38063+
'404':
38064+
$ref: '#/components/responses/NotFoundResponse'
38065+
'429':
38066+
$ref: '#/components/responses/TooManyRequestsResponse'
38067+
summary: Cancel a workflow instance
38068+
tags:
38069+
- Workflow Automation
3785338070
security:
3785438071
- apiKeyAuth: []
3785538072
appKeyAuth: []
@@ -38221,4 +38438,9 @@ tags:
3822138438
externalDocs:
3822238439
url: https://docs.datadoghq.com/account_management/users
3822338440
name: Users
38441+
- description: Automate your teams operational processes with Datadog Workflow Automation.
38442+
externalDocs:
38443+
description: Find out more at
38444+
url: https://docs.datadoghq.com/service_management/workflows/
38445+
name: Workflow Automation
3822438446
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)