Skip to content

Commit 741abb2

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit ba3b721 of spec repo (#4334)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 497cf25 commit 741abb2

10 files changed

Lines changed: 149 additions & 32 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128713,6 +128713,9 @@ components:
128713128713
runAsUserMode:
128714128714
$ref: "#/components/schemas/WorkflowRunAsUserMode"
128715128715
readOnly: true
128716+
sensitivePrivileges:
128717+
description: Whether the workflow requires sensitive privileges to run. Only the workflow owner can update this field. This allows it to run actions that use [Execution Policies](https://docs.datadoghq.com/actions/private_actions/execution_policies/).
128718+
type: boolean
128716128719
spec:
128717128720
$ref: "#/components/schemas/Spec"
128718128721
tags:
@@ -128793,6 +128796,9 @@ components:
128793128796
runAsUserMode:
128794128797
$ref: "#/components/schemas/WorkflowRunAsUserMode"
128795128798
readOnly: true
128799+
sensitivePrivileges:
128800+
description: Whether the workflow requires sensitive privileges to run. Only the workflow owner can update this field. This allows it to run actions that use [Execution Policies](https://docs.datadoghq.com/actions/private_actions/execution_policies/).
128801+
type: boolean
128796128802
spec:
128797128803
$ref: "#/components/schemas/Spec"
128798128804
tags:
@@ -128914,6 +128920,9 @@ components:
128914128920
runAsUserMode:
128915128921
$ref: "#/components/schemas/WorkflowRunAsUserMode"
128916128922
readOnly: true
128923+
sensitivePrivileges:
128924+
description: Whether the workflow requires sensitive privileges to run. Only the workflow owner can update this field. This allows it to run actions that use [Execution Policies](https://docs.datadoghq.com/actions/private_actions/execution_policies/).
128925+
type: boolean
128917128926
spec:
128918128927
$ref: "#/components/schemas/Spec"
128919128928
nullable: true

examples/v2/workflow-automation/CreateWorkflow.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ public static void main(String[] args) {
5050
.runAs(
5151
new WorkflowRunAs(
5252
new WorkflowRunAsOwner().type(WorkflowRunAsOwnerType.OWNER)))
53+
.sensitivePrivileges(true)
5354
.spec(
5455
new Spec()
5556
.connectionEnvs(

examples/v2/workflow-automation/UpdateWorkflow.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ public static void main(String[] args) {
5353
.runAs(
5454
new WorkflowRunAs(
5555
new WorkflowRunAsOwner().type(WorkflowRunAsOwnerType.OWNER)))
56+
.sensitivePrivileges(false)
5657
.spec(
5758
new Spec()
5859
.connectionEnvs(

src/main/java/com/datadog/api/client/v2/model/WorkflowDataAttributes.java

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
WorkflowDataAttributes.JSON_PROPERTY_PUBLISHED,
2929
WorkflowDataAttributes.JSON_PROPERTY_RUN_AS,
3030
WorkflowDataAttributes.JSON_PROPERTY_RUN_AS_USER_MODE,
31+
WorkflowDataAttributes.JSON_PROPERTY_SENSITIVE_PRIVILEGES,
3132
WorkflowDataAttributes.JSON_PROPERTY_SPEC,
3233
WorkflowDataAttributes.JSON_PROPERTY_TAGS,
3334
WorkflowDataAttributes.JSON_PROPERTY_UPDATED_AT,
@@ -55,6 +56,9 @@ public class WorkflowDataAttributes {
5556
public static final String JSON_PROPERTY_RUN_AS_USER_MODE = "runAsUserMode";
5657
private WorkflowRunAsUserMode runAsUserMode;
5758

59+
public static final String JSON_PROPERTY_SENSITIVE_PRIVILEGES = "sensitivePrivileges";
60+
private Boolean sensitivePrivileges;
61+
5862
public static final String JSON_PROPERTY_SPEC = "spec";
5963
private Spec spec;
6064

@@ -204,6 +208,30 @@ public void setRunAsUserMode(WorkflowRunAsUserMode runAsUserMode) {
204208
this.runAsUserMode = runAsUserMode;
205209
}
206210

211+
public WorkflowDataAttributes sensitivePrivileges(Boolean sensitivePrivileges) {
212+
this.sensitivePrivileges = sensitivePrivileges;
213+
return this;
214+
}
215+
216+
/**
217+
* Whether the workflow requires sensitive privileges to run. Only the workflow owner can update
218+
* this field. This allows it to run actions that use <a
219+
* href="https://docs.datadoghq.com/actions/private_actions/execution_policies/">Execution
220+
* Policies</a>.
221+
*
222+
* @return sensitivePrivileges
223+
*/
224+
@jakarta.annotation.Nullable
225+
@JsonProperty(JSON_PROPERTY_SENSITIVE_PRIVILEGES)
226+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
227+
public Boolean getSensitivePrivileges() {
228+
return sensitivePrivileges;
229+
}
230+
231+
public void setSensitivePrivileges(Boolean sensitivePrivileges) {
232+
this.sensitivePrivileges = sensitivePrivileges;
233+
}
234+
207235
public WorkflowDataAttributes spec(Spec spec) {
208236
this.spec = spec;
209237
this.unparsed |= spec.unparsed;
@@ -353,6 +381,7 @@ public boolean equals(Object o) {
353381
&& Objects.equals(this.published, workflowDataAttributes.published)
354382
&& Objects.equals(this.runAs, workflowDataAttributes.runAs)
355383
&& Objects.equals(this.runAsUserMode, workflowDataAttributes.runAsUserMode)
384+
&& Objects.equals(this.sensitivePrivileges, workflowDataAttributes.sensitivePrivileges)
356385
&& Objects.equals(this.spec, workflowDataAttributes.spec)
357386
&& Objects.equals(this.tags, workflowDataAttributes.tags)
358387
&& Objects.equals(this.updatedAt, workflowDataAttributes.updatedAt)
@@ -369,6 +398,7 @@ public int hashCode() {
369398
published,
370399
runAs,
371400
runAsUserMode,
401+
sensitivePrivileges,
372402
spec,
373403
tags,
374404
updatedAt,
@@ -386,6 +416,9 @@ public String toString() {
386416
sb.append(" published: ").append(toIndentedString(published)).append("\n");
387417
sb.append(" runAs: ").append(toIndentedString(runAs)).append("\n");
388418
sb.append(" runAsUserMode: ").append(toIndentedString(runAsUserMode)).append("\n");
419+
sb.append(" sensitivePrivileges: ")
420+
.append(toIndentedString(sensitivePrivileges))
421+
.append("\n");
389422
sb.append(" spec: ").append(toIndentedString(spec)).append("\n");
390423
sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
391424
sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n");

src/main/java/com/datadog/api/client/v2/model/WorkflowDataUpdateAttributes.java

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
WorkflowDataUpdateAttributes.JSON_PROPERTY_PUBLISHED,
2828
WorkflowDataUpdateAttributes.JSON_PROPERTY_RUN_AS,
2929
WorkflowDataUpdateAttributes.JSON_PROPERTY_RUN_AS_USER_MODE,
30+
WorkflowDataUpdateAttributes.JSON_PROPERTY_SENSITIVE_PRIVILEGES,
3031
WorkflowDataUpdateAttributes.JSON_PROPERTY_SPEC,
3132
WorkflowDataUpdateAttributes.JSON_PROPERTY_TAGS,
3233
WorkflowDataUpdateAttributes.JSON_PROPERTY_UPDATED_AT,
@@ -54,6 +55,9 @@ public class WorkflowDataUpdateAttributes {
5455
public static final String JSON_PROPERTY_RUN_AS_USER_MODE = "runAsUserMode";
5556
private WorkflowRunAsUserMode runAsUserMode;
5657

58+
public static final String JSON_PROPERTY_SENSITIVE_PRIVILEGES = "sensitivePrivileges";
59+
private Boolean sensitivePrivileges;
60+
5761
public static final String JSON_PROPERTY_SPEC = "spec";
5862
private Spec spec;
5963

@@ -193,6 +197,30 @@ public void setRunAsUserMode(WorkflowRunAsUserMode runAsUserMode) {
193197
this.runAsUserMode = runAsUserMode;
194198
}
195199

200+
public WorkflowDataUpdateAttributes sensitivePrivileges(Boolean sensitivePrivileges) {
201+
this.sensitivePrivileges = sensitivePrivileges;
202+
return this;
203+
}
204+
205+
/**
206+
* Whether the workflow requires sensitive privileges to run. Only the workflow owner can update
207+
* this field. This allows it to run actions that use <a
208+
* href="https://docs.datadoghq.com/actions/private_actions/execution_policies/">Execution
209+
* Policies</a>.
210+
*
211+
* @return sensitivePrivileges
212+
*/
213+
@jakarta.annotation.Nullable
214+
@JsonProperty(JSON_PROPERTY_SENSITIVE_PRIVILEGES)
215+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
216+
public Boolean getSensitivePrivileges() {
217+
return sensitivePrivileges;
218+
}
219+
220+
public void setSensitivePrivileges(Boolean sensitivePrivileges) {
221+
this.sensitivePrivileges = sensitivePrivileges;
222+
}
223+
196224
public WorkflowDataUpdateAttributes spec(Spec spec) {
197225
this.spec = spec;
198226
this.unparsed |= spec.unparsed;
@@ -343,6 +371,8 @@ public boolean equals(Object o) {
343371
&& Objects.equals(this.published, workflowDataUpdateAttributes.published)
344372
&& Objects.equals(this.runAs, workflowDataUpdateAttributes.runAs)
345373
&& Objects.equals(this.runAsUserMode, workflowDataUpdateAttributes.runAsUserMode)
374+
&& Objects.equals(
375+
this.sensitivePrivileges, workflowDataUpdateAttributes.sensitivePrivileges)
346376
&& Objects.equals(this.spec, workflowDataUpdateAttributes.spec)
347377
&& Objects.equals(this.tags, workflowDataUpdateAttributes.tags)
348378
&& Objects.equals(this.updatedAt, workflowDataUpdateAttributes.updatedAt)
@@ -360,6 +390,7 @@ public int hashCode() {
360390
published,
361391
runAs,
362392
runAsUserMode,
393+
sensitivePrivileges,
363394
spec,
364395
tags,
365396
updatedAt,
@@ -377,6 +408,9 @@ public String toString() {
377408
sb.append(" published: ").append(toIndentedString(published)).append("\n");
378409
sb.append(" runAs: ").append(toIndentedString(runAs)).append("\n");
379410
sb.append(" runAsUserMode: ").append(toIndentedString(runAsUserMode)).append("\n");
411+
sb.append(" sensitivePrivileges: ")
412+
.append(toIndentedString(sensitivePrivileges))
413+
.append("\n");
380414
sb.append(" spec: ").append(toIndentedString(spec)).append("\n");
381415
sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
382416
sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n");

src/main/java/com/datadog/api/client/v2/model/WorkflowListItemAttributes.java

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
WorkflowListItemAttributes.JSON_PROPERTY_NAME,
2828
WorkflowListItemAttributes.JSON_PROPERTY_PUBLISHED,
2929
WorkflowListItemAttributes.JSON_PROPERTY_RUN_AS_USER_MODE,
30+
WorkflowListItemAttributes.JSON_PROPERTY_SENSITIVE_PRIVILEGES,
3031
WorkflowListItemAttributes.JSON_PROPERTY_SPEC,
3132
WorkflowListItemAttributes.JSON_PROPERTY_TAGS,
3233
WorkflowListItemAttributes.JSON_PROPERTY_UPDATED_AT
@@ -50,6 +51,9 @@ public class WorkflowListItemAttributes {
5051
public static final String JSON_PROPERTY_RUN_AS_USER_MODE = "runAsUserMode";
5152
private WorkflowRunAsUserMode runAsUserMode;
5253

54+
public static final String JSON_PROPERTY_SENSITIVE_PRIVILEGES = "sensitivePrivileges";
55+
private Boolean sensitivePrivileges;
56+
5357
public static final String JSON_PROPERTY_SPEC = "spec";
5458
private Spec spec;
5559

@@ -167,6 +171,30 @@ public void setRunAsUserMode(WorkflowRunAsUserMode runAsUserMode) {
167171
this.runAsUserMode = runAsUserMode;
168172
}
169173

174+
public WorkflowListItemAttributes sensitivePrivileges(Boolean sensitivePrivileges) {
175+
this.sensitivePrivileges = sensitivePrivileges;
176+
return this;
177+
}
178+
179+
/**
180+
* Whether the workflow requires sensitive privileges to run. Only the workflow owner can update
181+
* this field. This allows it to run actions that use <a
182+
* href="https://docs.datadoghq.com/actions/private_actions/execution_policies/">Execution
183+
* Policies</a>.
184+
*
185+
* @return sensitivePrivileges
186+
*/
187+
@jakarta.annotation.Nullable
188+
@JsonProperty(JSON_PROPERTY_SENSITIVE_PRIVILEGES)
189+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
190+
public Boolean getSensitivePrivileges() {
191+
return sensitivePrivileges;
192+
}
193+
194+
public void setSensitivePrivileges(Boolean sensitivePrivileges) {
195+
this.sensitivePrivileges = sensitivePrivileges;
196+
}
197+
170198
public WorkflowListItemAttributes spec(Spec spec) {
171199
this.spec = spec;
172200
this.unparsed |= spec.unparsed;
@@ -294,6 +322,7 @@ public boolean equals(Object o) {
294322
&& Objects.equals(this.name, workflowListItemAttributes.name)
295323
&& Objects.equals(this.published, workflowListItemAttributes.published)
296324
&& Objects.equals(this.runAsUserMode, workflowListItemAttributes.runAsUserMode)
325+
&& Objects.equals(this.sensitivePrivileges, workflowListItemAttributes.sensitivePrivileges)
297326
&& Objects.equals(this.spec, workflowListItemAttributes.spec)
298327
&& Objects.equals(this.tags, workflowListItemAttributes.tags)
299328
&& Objects.equals(this.updatedAt, workflowListItemAttributes.updatedAt)
@@ -309,6 +338,7 @@ public int hashCode() {
309338
name,
310339
published,
311340
runAsUserMode,
341+
sensitivePrivileges,
312342
spec,
313343
tags,
314344
updatedAt,
@@ -324,6 +354,9 @@ public String toString() {
324354
sb.append(" name: ").append(toIndentedString(name)).append("\n");
325355
sb.append(" published: ").append(toIndentedString(published)).append("\n");
326356
sb.append(" runAsUserMode: ").append(toIndentedString(runAsUserMode)).append("\n");
357+
sb.append(" sensitivePrivileges: ")
358+
.append(toIndentedString(sensitivePrivileges))
359+
.append("\n");
327360
sb.append(" spec: ").append(toIndentedString(spec)).append("\n");
328361
sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
329362
sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n");

src/test/resources/com/datadog/api/client/v2/api/workflow_automation.feature

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,11 @@ Feature: Workflow Automation
4747
@team:DataDog/workflow-automation-dev
4848
Scenario: Create a Workflow returns "Successfully created a workflow." response
4949
Given new "CreateWorkflow" request
50-
And body with value {"data": {"attributes": {"description": "A sample workflow.", "name": "Example Workflow", "published": true, "runAs": {"type": "owner"}, "spec": {"connectionEnvs": [{"connections": [{"connectionId": "e1e64943-c7c5-4487-aece-25aaec7d3aad", "label": "INTEGRATION_DATADOG"}], "env": "default"}], "inputSchema": {"parameters": [{"defaultValue": "default", "name": "input", "type": "STRING"}]}, "outputSchema": {"parameters": [{"name": "output", "type": "ARRAY_OBJECT", "value": "outputValue"}]}, "steps": [{"actionId": "com.datadoghq.dd.monitor.listMonitors", "connectionLabel": "INTEGRATION_DATADOG", "name": "Step1", "outboundEdges": [{"branchName": "main", "nextStepName": "Step2"}], "parameters": [{"name": "tags", "value": "service:monitoring"}]}, {"actionId": "com.datadoghq.core.noop", "name": "Step2"}], "triggers": [{"monitorTrigger": {"rateLimit": {"count": 1, "interval": "3600s"}}, "startStepNames": ["Step1"]}, {"startStepNames": ["Step1"], "githubWebhookTrigger": {}}]}, "tags": ["team:infra", "service:monitoring", "foo:bar"]}, "type": "workflows"}}
50+
And body with value {"data": {"attributes": {"description": "A sample workflow.", "name": "Example Workflow", "published": true, "runAs": {"type": "owner"}, "sensitivePrivileges": true, "spec": {"connectionEnvs": [{"connections": [{"connectionId": "e1e64943-c7c5-4487-aece-25aaec7d3aad", "label": "INTEGRATION_DATADOG"}], "env": "default"}], "inputSchema": {"parameters": [{"defaultValue": "default", "name": "input", "type": "STRING"}]}, "outputSchema": {"parameters": [{"name": "output", "type": "ARRAY_OBJECT", "value": "outputValue"}]}, "steps": [{"actionId": "com.datadoghq.dd.monitor.listMonitors", "connectionLabel": "INTEGRATION_DATADOG", "name": "Step1", "outboundEdges": [{"branchName": "main", "nextStepName": "Step2"}], "parameters": [{"name": "tags", "value": "service:monitoring"}]}, {"actionId": "com.datadoghq.core.noop", "name": "Step2"}], "triggers": [{"monitorTrigger": {"rateLimit": {"count": 1, "interval": "3600s"}}, "startStepNames": ["Step1"]}, {"startStepNames": ["Step1"], "githubWebhookTrigger": {}}]}, "tags": ["team:infra", "service:monitoring", "foo:bar"]}, "type": "workflows"}}
5151
When the request is sent
5252
Then the response status is 201 Successfully created a workflow.
5353
And the response "data.attributes.runAsUserMode" is equal to "owner"
54+
And the response "data.attributes.sensitivePrivileges" is equal to true
5455

5556
@team:DataDog/workflow-automation-dev
5657
Scenario: Delete an existing Workflow returns "Not found" response
@@ -189,7 +190,8 @@ Feature: Workflow Automation
189190
Given there is a valid "workflow" in the system
190191
And new "UpdateWorkflow" request
191192
And request contains "workflow_id" parameter from "workflow.data.id"
192-
And body with value {"data": {"attributes": {"description": "A sample workflow.", "name": "Example Workflow", "published": true, "runAs": {"type": "owner"}, "spec": {"connectionEnvs": [{"connections": [{"connectionId": "e1e64943-c7c5-4487-aece-25aaec7d3aad", "label": "INTEGRATION_DATADOG"}], "env": "default"}], "inputSchema": {"parameters": [{"defaultValue": "default", "name": "input", "type": "STRING"}]}, "outputSchema": {"parameters": [{"name": "output", "type": "ARRAY_OBJECT", "value": "outputValue"}]}, "steps": [{"actionId": "com.datadoghq.dd.monitor.listMonitors", "connectionLabel": "INTEGRATION_DATADOG", "name": "Step1", "outboundEdges": [{"branchName": "main", "nextStepName": "Step2"}], "parameters": [{"name": "tags", "value": "service:monitoring"}]}, {"actionId": "com.datadoghq.core.noop", "name": "Step2"}], "triggers": [{"monitorTrigger": {"rateLimit": {"count": 1, "interval": "3600s"}}, "startStepNames": ["Step1"]}, {"startStepNames": ["Step1"], "githubWebhookTrigger": {}}]}, "tags": ["team:infra", "service:monitoring", "foo:bar"]}, "id": "22222222-2222-2222-2222-222222222222", "type": "workflows"}}
193+
And body with value {"data": {"attributes": {"description": "A sample workflow.", "name": "Example Workflow", "published": true, "runAs": {"type": "owner"}, "sensitivePrivileges": false, "spec": {"connectionEnvs": [{"connections": [{"connectionId": "e1e64943-c7c5-4487-aece-25aaec7d3aad", "label": "INTEGRATION_DATADOG"}], "env": "default"}], "inputSchema": {"parameters": [{"defaultValue": "default", "name": "input", "type": "STRING"}]}, "outputSchema": {"parameters": [{"name": "output", "type": "ARRAY_OBJECT", "value": "outputValue"}]}, "steps": [{"actionId": "com.datadoghq.dd.monitor.listMonitors", "connectionLabel": "INTEGRATION_DATADOG", "name": "Step1", "outboundEdges": [{"branchName": "main", "nextStepName": "Step2"}], "parameters": [{"name": "tags", "value": "service:monitoring"}]}, {"actionId": "com.datadoghq.core.noop", "name": "Step2"}], "triggers": [{"monitorTrigger": {"rateLimit": {"count": 1, "interval": "3600s"}}, "startStepNames": ["Step1"]}, {"startStepNames": ["Step1"], "githubWebhookTrigger": {}}]}, "tags": ["team:infra", "service:monitoring", "foo:bar"]}, "id": "22222222-2222-2222-2222-222222222222", "type": "workflows"}}
193194
When the request is sent
194195
Then the response status is 200 Successfully updated a workflow.
195196
And the response "data.attributes.runAsUserMode" is equal to "owner"
197+
And the response "data.attributes.sensitivePrivileges" is equal to false

src/test/resources/generated-test/test-runner-data/v2/workflow-automation/create-a-workflow-returns-successfully-created-a-workflow-response.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"runAs": {
2222
"type": "owner"
2323
},
24+
"sensitivePrivileges": true,
2425
"spec": {
2526
"connectionEnvs": [
2627
{

src/test/resources/generated-test/test-runner-data/v2/workflow-automation/update-an-existing-workflow-returns-successfully-updated-a-workflow-response.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"runAs": {
2222
"type": "owner"
2323
},
24+
"sensitivePrivileges": false,
2425
"spec": {
2526
"connectionEnvs": [
2627
{

0 commit comments

Comments
 (0)