Skip to content

Commit ed08342

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit fbf52885 of spec repo
1 parent fce1eac commit ed08342

File tree

47 files changed

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

47 files changed

+2925
-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-26 19:06:12.147951",
8-
"spec_repo_commit": "44cf4afe"
7+
"regenerated": "2024-07-30 17:07:35.872364",
8+
"spec_repo_commit": "fbf52885"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-07-26 19:06:12.165858",
13-
"spec_repo_commit": "44cf4afe"
12+
"regenerated": "2024-07-30 17:07:35.890457",
13+
"spec_repo_commit": "fbf52885"
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:
@@ -23829,6 +23843,107 @@ components:
2382923843
- PAST_SIX_MONTHS
2383023844
- PAST_ONE_YEAR
2383123845
- ALERT
23846+
WorkflowInstanceCreateMeta:
23847+
description: Additional information for creating a workflow instance.
23848+
properties:
23849+
payload:
23850+
additionalProperties: {}
23851+
description: The input parameters to the workflow.
23852+
type: object
23853+
type: object
23854+
WorkflowInstanceCreateRequest:
23855+
description: Request used to create a workflow instance.
23856+
properties:
23857+
meta:
23858+
$ref: '#/components/schemas/WorkflowInstanceCreateMeta'
23859+
type: object
23860+
WorkflowInstanceCreateResponse:
23861+
additionalProperties: {}
23862+
description: Response returned upon successful workflow instance creation.
23863+
properties:
23864+
data:
23865+
$ref: '#/components/schemas/WorkflowInstanceCreateResponseData'
23866+
type: object
23867+
WorkflowInstanceCreateResponseData:
23868+
additionalProperties: {}
23869+
description: Data about the created workflow instance.
23870+
properties:
23871+
id:
23872+
description: The ID of the workflow execution. It can be used to fetch the
23873+
execution status.
23874+
type: string
23875+
type: object
23876+
WorkflowInstanceListItem:
23877+
additionalProperties: {}
23878+
description: An item in the workflow instances list.
23879+
properties:
23880+
id:
23881+
description: The ID of the workflow instance
23882+
type: string
23883+
type: object
23884+
WorkflowListInstancesResponse:
23885+
additionalProperties: {}
23886+
description: Response returned when listing workflow instances.
23887+
properties:
23888+
data:
23889+
description: A list of workflow instances.
23890+
items:
23891+
$ref: '#/components/schemas/WorkflowInstanceListItem'
23892+
type: array
23893+
meta:
23894+
$ref: '#/components/schemas/WorkflowListInstancesResponseMeta'
23895+
type: object
23896+
WorkflowListInstancesResponseMeta:
23897+
additionalProperties: {}
23898+
description: Metadata about the instances list
23899+
properties:
23900+
page:
23901+
$ref: '#/components/schemas/WorkflowListInstancesResponseMetaPage'
23902+
type: object
23903+
WorkflowListInstancesResponseMetaPage:
23904+
additionalProperties: {}
23905+
description: Page information for the list instances response.
23906+
properties:
23907+
totalCount:
23908+
description: The total count of items.
23909+
format: int64
23910+
type: integer
23911+
type: object
23912+
WorklflowCancelInstanceResponse:
23913+
description: Information about the canceled instance.
23914+
properties:
23915+
data:
23916+
$ref: '#/components/schemas/WorklflowCancelInstanceResponseData'
23917+
type: object
23918+
WorklflowCancelInstanceResponseData:
23919+
description: Data about the canceled instance.
23920+
properties:
23921+
id:
23922+
description: The id of the canceled instance
23923+
type: string
23924+
type: object
23925+
WorklflowGetInstanceResponse:
23926+
additionalProperties: {}
23927+
description: The state of the given workflow instance.
23928+
properties:
23929+
data:
23930+
$ref: '#/components/schemas/WorklflowGetInstanceResponseData'
23931+
type: object
23932+
WorklflowGetInstanceResponseData:
23933+
additionalProperties: {}
23934+
description: The data of the instance response.
23935+
properties:
23936+
attributes:
23937+
$ref: '#/components/schemas/WorklflowGetInstanceResponseDataAttributes'
23938+
type: object
23939+
WorklflowGetInstanceResponseDataAttributes:
23940+
additionalProperties: {}
23941+
description: The attributes of the instance response data.
23942+
properties:
23943+
id:
23944+
description: The id of the instance.
23945+
type: string
23946+
type: object
2383223947
securitySchemes:
2383323948
AuthZ:
2383423949
description: This API uses OAuth 2 with the implicit grant flow.
@@ -37848,6 +37963,108 @@ paths:
3784837963
summary: Get user memberships
3784937964
tags:
3785037965
- Teams
37966+
/api/v2/workflows/{workflow_id}/instances:
37967+
get:
37968+
description: List all instances of a given workflow.
37969+
operationId: ListWorkflowInstances
37970+
parameters:
37971+
- $ref: '#/components/parameters/WorkflowId'
37972+
- $ref: '#/components/parameters/PageSize'
37973+
- $ref: '#/components/parameters/PageNumber'
37974+
responses:
37975+
'200':
37976+
content:
37977+
application/json:
37978+
schema:
37979+
$ref: '#/components/schemas/WorkflowListInstancesResponse'
37980+
description: OK
37981+
'400':
37982+
$ref: '#/components/responses/BadRequestResponse'
37983+
'403':
37984+
$ref: '#/components/responses/ForbiddenResponse'
37985+
'429':
37986+
$ref: '#/components/responses/TooManyRequestsResponse'
37987+
summary: List workflow instances
37988+
tags:
37989+
- Workflow Automation
37990+
post:
37991+
description: Execute the given workflow
37992+
operationId: CreateWorkflowInstance
37993+
parameters:
37994+
- $ref: '#/components/parameters/WorkflowId'
37995+
requestBody:
37996+
content:
37997+
application/json:
37998+
schema:
37999+
$ref: '#/components/schemas/WorkflowInstanceCreateRequest'
38000+
required: true
38001+
responses:
38002+
'200':
38003+
content:
38004+
application/json:
38005+
schema:
38006+
$ref: '#/components/schemas/WorkflowInstanceCreateResponse'
38007+
description: Created
38008+
'400':
38009+
$ref: '#/components/responses/BadRequestResponse'
38010+
'403':
38011+
$ref: '#/components/responses/ForbiddenResponse'
38012+
'429':
38013+
$ref: '#/components/responses/TooManyRequestsResponse'
38014+
summary: Execute a workflow
38015+
tags:
38016+
- Workflow Automation
38017+
x-codegen-request-body-name: body
38018+
/api/v2/workflows/{workflow_id}/instances/{instance_id}:
38019+
get:
38020+
description: Get a specific execution of a given workflow.
38021+
operationId: GetWorkflowInstance
38022+
parameters:
38023+
- $ref: '#/components/parameters/WorkflowId'
38024+
- $ref: '#/components/parameters/InstanceId'
38025+
responses:
38026+
'200':
38027+
content:
38028+
application/json:
38029+
schema:
38030+
$ref: '#/components/schemas/WorklflowGetInstanceResponse'
38031+
description: OK
38032+
'400':
38033+
$ref: '#/components/responses/BadRequestResponse'
38034+
'403':
38035+
$ref: '#/components/responses/ForbiddenResponse'
38036+
'404':
38037+
$ref: '#/components/responses/NotFoundResponse'
38038+
'429':
38039+
$ref: '#/components/responses/TooManyRequestsResponse'
38040+
summary: Get a workflow instance
38041+
tags:
38042+
- Workflow Automation
38043+
/api/v2/workflows/{workflow_id}/instances/{instance_id}/cancel:
38044+
put:
38045+
description: Cancels a specific execution of a given workflow.
38046+
operationId: CancelWorkflowInstance
38047+
parameters:
38048+
- $ref: '#/components/parameters/WorkflowId'
38049+
- $ref: '#/components/parameters/InstanceId'
38050+
responses:
38051+
'200':
38052+
content:
38053+
application/json:
38054+
schema:
38055+
$ref: '#/components/schemas/WorklflowCancelInstanceResponse'
38056+
description: OK
38057+
'400':
38058+
$ref: '#/components/responses/BadRequestResponse'
38059+
'403':
38060+
$ref: '#/components/responses/ForbiddenResponse'
38061+
'404':
38062+
$ref: '#/components/responses/NotFoundResponse'
38063+
'429':
38064+
$ref: '#/components/responses/TooManyRequestsResponse'
38065+
summary: Cancel a workflow instance
38066+
tags:
38067+
- Workflow Automation
3785138068
security:
3785238069
- apiKeyAuth: []
3785338070
appKeyAuth: []
@@ -38219,4 +38436,9 @@ tags:
3821938436
externalDocs:
3822038437
url: https://docs.datadoghq.com/account_management/users
3822138438
name: Users
38439+
- description: Automate your teams operational processes with Datadog Workflow Automation.
38440+
externalDocs:
38441+
description: Find out more at
38442+
url: https://docs.datadoghq.com/service_management/workflows/
38443+
name: Workflow Automation
3822238444
x-group-parameters: true

LICENSE-3rdparty.csv

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ base64,https://github.com/marshallpierce/rust-base64,MIT OR Apache-2.0,"Alice Ma
1111
base64,https://github.com/marshallpierce/rust-base64,MIT OR Apache-2.0,Marshall Pierce <[email protected]>
1212
bitflags,https://github.com/bitflags/bitflags,MIT OR Apache-2.0,The Rust Project Developers
1313
bumpalo,https://github.com/fitzgen/bumpalo,MIT OR Apache-2.0,Nick Fitzgerald <[email protected]>
14+
byteorder,https://github.com/BurntSushi/byteorder,Unlicense OR MIT,Andrew Gallant <[email protected]>
1415
bytes,https://github.com/tokio-rs/bytes,MIT,"Carl Lerche <[email protected]>, Sean McArthur <[email protected]>"
1516
cfg-if,https://github.com/alexcrichton/cfg-if,MIT OR Apache-2.0,Alex Crichton <[email protected]>
1617
chrono,https://github.com/chronotope/chrono,MIT OR Apache-2.0,The chrono Authors
@@ -150,6 +151,7 @@ windows_x86_64_gnu,https://github.com/microsoft/windows-rs,MIT OR Apache-2.0,Mic
150151
windows_x86_64_gnullvm,https://github.com/microsoft/windows-rs,MIT OR Apache-2.0,Microsoft
151152
windows_x86_64_msvc,https://github.com/microsoft/windows-rs,MIT OR Apache-2.0,Microsoft
152153
winreg,https://github.com/gentoo90/winreg-rs,MIT,Igor Shaula <[email protected]>
154+
zerocopy,https://github.com/google/zerocopy,BSD-2-Clause OR Apache-2.0 OR MIT,Joshua Liebow-Feeser <[email protected]>
153155
zstd,https://github.com/gyscos/zstd-rs,MIT,Alexandre Bury <[email protected]>
154156
zstd-safe,https://github.com/gyscos/zstd-rs,MIT OR Apache-2.0,Alexandre Bury <[email protected]>
155157
zstd-sys,https://github.com/gyscos/zstd-rs,MIT OR Apache-2.0,Alexandre Bury <[email protected]>
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)