Skip to content

Commit 8d2e5fb

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 6015bc1 of spec repo
1 parent 636ac83 commit 8d2e5fb

21 files changed

Lines changed: 588 additions & 28 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26764,6 +26764,8 @@ components:
2676426764
description: "A sample workflow."
2676526765
name: "Example Workflow"
2676626766
published: true
26767+
runAs:
26768+
type: owner
2676726769
spec:
2676826770
annotations:
2676926771
- display:
@@ -121077,6 +121079,8 @@ components:
121077121079
description: "A sample workflow."
121078121080
name: "Example Workflow"
121079121081
published: true
121082+
runAs:
121083+
type: owner
121080121084
spec:
121081121085
annotations:
121082121086
- display:
@@ -124160,6 +124164,12 @@ components:
124160124164
published:
124161124165
description: Set the workflow to published or unpublished. Workflows in an unpublished state will only be executable via manual runs. Automatic triggers such as Schedule will not execute the workflow until it is published.
124162124166
type: boolean
124167+
runAs:
124168+
$ref: "#/components/schemas/WorkflowRunAs"
124169+
writeOnly: true
124170+
runAsUserMode:
124171+
$ref: "#/components/schemas/WorkflowRunAsUserMode"
124172+
readOnly: true
124163124173
spec:
124164124174
$ref: "#/components/schemas/Spec"
124165124175
tags:
@@ -124188,6 +124198,9 @@ components:
124188124198
$ref: "#/components/schemas/WorkflowUserRelationship"
124189124199
owner:
124190124200
$ref: "#/components/schemas/WorkflowUserRelationship"
124201+
runAs:
124202+
$ref: "#/components/schemas/WorkflowUserRelationship"
124203+
description: The service account used to run the workflow. Present when `runAsUserMode` is `service_account`.
124191124204
readOnly: true
124192124205
type: object
124193124206
WorkflowDataType:
@@ -124231,6 +124244,12 @@ components:
124231124244
published:
124232124245
description: Set the workflow to published or unpublished. Workflows in an unpublished state will only be executable via manual runs. Automatic triggers such as Schedule will not execute the workflow until it is published.
124233124246
type: boolean
124247+
runAs:
124248+
$ref: "#/components/schemas/WorkflowRunAs"
124249+
writeOnly: true
124250+
runAsUserMode:
124251+
$ref: "#/components/schemas/WorkflowRunAsUserMode"
124252+
readOnly: true
124234124253
spec:
124235124254
$ref: "#/components/schemas/Spec"
124236124255
tags:
@@ -124349,6 +124368,9 @@ components:
124349124368
published:
124350124369
description: Whether the workflow is published. Unpublished workflows can only be run manually. Automatic triggers such as Schedule do not fire until the workflow is published.
124351124370
type: boolean
124371+
runAsUserMode:
124372+
$ref: "#/components/schemas/WorkflowRunAsUserMode"
124373+
readOnly: true
124352124374
spec:
124353124375
$ref: "#/components/schemas/Spec"
124354124376
nullable: true
@@ -124366,6 +124388,82 @@ components:
124366124388
required:
124367124389
- name
124368124390
type: object
124391+
WorkflowRunAs:
124392+
description: Identity used to run the workflow.
124393+
example:
124394+
type: owner
124395+
oneOf:
124396+
- $ref: "#/components/schemas/WorkflowRunAsOwner"
124397+
- $ref: "#/components/schemas/WorkflowRunAsServiceAccount"
124398+
- $ref: "#/components/schemas/WorkflowRunAsInitiator"
124399+
WorkflowRunAsInitiator:
124400+
additionalProperties: false
124401+
description: Run the workflow as the user who initiates the execution.
124402+
properties:
124403+
type:
124404+
$ref: "#/components/schemas/WorkflowRunAsInitiatorType"
124405+
required:
124406+
- type
124407+
type: object
124408+
WorkflowRunAsInitiatorType:
124409+
description: The initiator run-as type.
124410+
enum:
124411+
- initiator
124412+
example: initiator
124413+
type: string
124414+
x-enum-varnames:
124415+
- INITIATOR
124416+
WorkflowRunAsOwner:
124417+
additionalProperties: false
124418+
description: Run the workflow as its owner.
124419+
properties:
124420+
type:
124421+
$ref: "#/components/schemas/WorkflowRunAsOwnerType"
124422+
required:
124423+
- type
124424+
type: object
124425+
WorkflowRunAsOwnerType:
124426+
description: The owner run-as type.
124427+
enum:
124428+
- owner
124429+
example: owner
124430+
type: string
124431+
x-enum-varnames:
124432+
- OWNER
124433+
WorkflowRunAsServiceAccount:
124434+
additionalProperties: false
124435+
description: Run the workflow as a service account.
124436+
properties:
124437+
id:
124438+
description: The service account identifier.
124439+
example: 00000000-0000-0000-0000-000000000007
124440+
type: string
124441+
type:
124442+
$ref: "#/components/schemas/WorkflowRunAsServiceAccountType"
124443+
required:
124444+
- type
124445+
- id
124446+
type: object
124447+
WorkflowRunAsServiceAccountType:
124448+
description: The service account run-as type.
124449+
enum:
124450+
- service_account
124451+
example: service_account
124452+
type: string
124453+
x-enum-varnames:
124454+
- SERVICE_ACCOUNT
124455+
WorkflowRunAsUserMode:
124456+
description: The effective type of identity used to run the workflow.
124457+
enum:
124458+
- owner
124459+
- service_account
124460+
- initiator
124461+
example: owner
124462+
type: string
124463+
x-enum-varnames:
124464+
- OWNER
124465+
- SERVICE_ACCOUNT
124466+
- INITIATOR
124369124467
WorkflowTriggerWrapper:
124370124468
description: "Schema for a Workflow-based trigger."
124371124469
properties:
@@ -220413,6 +220511,7 @@ paths:
220413220511
description: A sample workflow.
220414220512
name: Example Workflow
220415220513
published: true
220514+
runAsUserMode: owner
220416220515
spec: {}
220417220516
tags:
220418220517
- team:infra
@@ -220467,6 +220566,8 @@ paths:
220467220566
description: A sample workflow.
220468220567
name: Example Workflow
220469220568
published: true
220569+
runAs:
220570+
type: owner
220470220571
spec:
220471220572
annotations:
220472220573
- display:
@@ -220533,6 +220634,7 @@ paths:
220533220634
data:
220534220635
attributes:
220535220636
name: Example Workflow
220637+
runAsUserMode: owner
220536220638
spec: {}
220537220639
id: 00000000-0000-0000-0000-000000000001
220538220640
type: workflows
@@ -220616,6 +220718,7 @@ paths:
220616220718
description: A sample workflow.
220617220719
name: Example Workflow
220618220720
published: true
220721+
runAsUserMode: owner
220619220722
spec: {}
220620220723
tags:
220621220724
- team:infra
@@ -220672,6 +220775,8 @@ paths:
220672220775
description: A sample workflow.
220673220776
name: Example Workflow
220674220777
published: true
220778+
runAs:
220779+
type: owner
220675220780
spec:
220676220781
annotations:
220677220782
- display:
@@ -220739,6 +220844,7 @@ paths:
220739220844
data:
220740220845
attributes:
220741220846
name: Example Workflow
220847+
runAsUserMode: owner
220742220848
id: 00000000-0000-0000-0000-000000000003
220743220849
type: workflows
220744220850
schema:

examples/v2/workflow-automation/CreateWorkflow.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,18 @@
2626
from datadog_api_client.v2.model.workflow_data import WorkflowData
2727
from datadog_api_client.v2.model.workflow_data_attributes import WorkflowDataAttributes
2828
from datadog_api_client.v2.model.workflow_data_type import WorkflowDataType
29+
from datadog_api_client.v2.model.workflow_run_as_owner import WorkflowRunAsOwner
30+
from datadog_api_client.v2.model.workflow_run_as_owner_type import WorkflowRunAsOwnerType
2931

3032
body = CreateWorkflowRequest(
3133
data=WorkflowData(
3234
attributes=WorkflowDataAttributes(
3335
description="A sample workflow.",
3436
name="Example Workflow",
3537
published=True,
38+
run_as=WorkflowRunAsOwner(
39+
type=WorkflowRunAsOwnerType.OWNER,
40+
),
3641
spec=Spec(
3742
connection_envs=[
3843
ConnectionEnv(

examples/v2/workflow-automation/UpdateWorkflow.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
from datadog_api_client.v2.model.workflow_data_type import WorkflowDataType
2828
from datadog_api_client.v2.model.workflow_data_update import WorkflowDataUpdate
2929
from datadog_api_client.v2.model.workflow_data_update_attributes import WorkflowDataUpdateAttributes
30+
from datadog_api_client.v2.model.workflow_run_as_owner import WorkflowRunAsOwner
31+
from datadog_api_client.v2.model.workflow_run_as_owner_type import WorkflowRunAsOwnerType
3032

3133
# there is a valid "workflow" in the system
3234
WORKFLOW_DATA_ID = environ["WORKFLOW_DATA_ID"]
@@ -37,6 +39,9 @@
3739
description="A sample workflow.",
3840
name="Example Workflow",
3941
published=True,
42+
run_as=WorkflowRunAsOwner(
43+
type=WorkflowRunAsOwnerType.OWNER,
44+
),
4045
spec=Spec(
4146
connection_envs=[
4247
ConnectionEnv(

src/datadog_api_client/v2/model/workflow_data_attributes.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,28 @@
1515

1616

1717
if TYPE_CHECKING:
18+
from datadog_api_client.v2.model.workflow_run_as import WorkflowRunAs
19+
from datadog_api_client.v2.model.workflow_run_as_user_mode import WorkflowRunAsUserMode
1820
from datadog_api_client.v2.model.spec import Spec
21+
from datadog_api_client.v2.model.workflow_run_as_owner import WorkflowRunAsOwner
22+
from datadog_api_client.v2.model.workflow_run_as_service_account import WorkflowRunAsServiceAccount
23+
from datadog_api_client.v2.model.workflow_run_as_initiator import WorkflowRunAsInitiator
1924

2025

2126
class WorkflowDataAttributes(ModelNormal):
2227
@cached_property
2328
def openapi_types(_):
29+
from datadog_api_client.v2.model.workflow_run_as import WorkflowRunAs
30+
from datadog_api_client.v2.model.workflow_run_as_user_mode import WorkflowRunAsUserMode
2431
from datadog_api_client.v2.model.spec import Spec
2532

2633
return {
2734
"created_at": (datetime,),
2835
"description": (str,),
2936
"name": (str,),
3037
"published": (bool,),
38+
"run_as": (WorkflowRunAs,),
39+
"run_as_user_mode": (WorkflowRunAsUserMode,),
3140
"spec": (Spec,),
3241
"tags": ([str],),
3342
"updated_at": (datetime,),
@@ -39,6 +48,8 @@ def openapi_types(_):
3948
"description": "description",
4049
"name": "name",
4150
"published": "published",
51+
"run_as": "runAs",
52+
"run_as_user_mode": "runAsUserMode",
4253
"spec": "spec",
4354
"tags": "tags",
4455
"updated_at": "updatedAt",
@@ -56,6 +67,10 @@ def __init__(
5667
created_at: Union[datetime, UnsetType] = unset,
5768
description: Union[str, UnsetType] = unset,
5869
published: Union[bool, UnsetType] = unset,
70+
run_as: Union[
71+
WorkflowRunAs, WorkflowRunAsOwner, WorkflowRunAsServiceAccount, WorkflowRunAsInitiator, UnsetType
72+
] = unset,
73+
run_as_user_mode: Union[WorkflowRunAsUserMode, UnsetType] = unset,
5974
tags: Union[List[str], UnsetType] = unset,
6075
updated_at: Union[datetime, UnsetType] = unset,
6176
webhook_secret: Union[str, UnsetType] = unset,
@@ -76,6 +91,12 @@ def __init__(
7691
:param published: Set the workflow to published or unpublished. Workflows in an unpublished state will only be executable via manual runs. Automatic triggers such as Schedule will not execute the workflow until it is published.
7792
:type published: bool, optional
7893
94+
:param run_as: Identity used to run the workflow.
95+
:type run_as: WorkflowRunAs, optional
96+
97+
:param run_as_user_mode: The effective type of identity used to run the workflow.
98+
:type run_as_user_mode: WorkflowRunAsUserMode, optional
99+
79100
:param spec: A complete Workflow Automation definition, including its triggers, steps, and connections.
80101
:type spec: Spec
81102
@@ -94,6 +115,10 @@ def __init__(
94115
kwargs["description"] = description
95116
if published is not unset:
96117
kwargs["published"] = published
118+
if run_as is not unset:
119+
kwargs["run_as"] = run_as
120+
if run_as_user_mode is not unset:
121+
kwargs["run_as_user_mode"] = run_as_user_mode
97122
if tags is not unset:
98123
kwargs["tags"] = tags
99124
if updated_at is not unset:

src/datadog_api_client/v2/model/workflow_data_relationships.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,20 @@ def openapi_types(_):
2525
return {
2626
"creator": (WorkflowUserRelationship,),
2727
"owner": (WorkflowUserRelationship,),
28+
"run_as": (WorkflowUserRelationship,),
2829
}
2930

3031
attribute_map = {
3132
"creator": "creator",
3233
"owner": "owner",
34+
"run_as": "runAs",
3335
}
3436

3537
def __init__(
3638
self_,
3739
creator: Union[WorkflowUserRelationship, UnsetType] = unset,
3840
owner: Union[WorkflowUserRelationship, UnsetType] = unset,
41+
run_as: Union[WorkflowUserRelationship, UnsetType] = unset,
3942
**kwargs,
4043
):
4144
"""
@@ -46,9 +49,14 @@ def __init__(
4649
4750
:param owner: The definition of ``WorkflowUserRelationship`` object.
4851
:type owner: WorkflowUserRelationship, optional
52+
53+
:param run_as: The definition of ``WorkflowUserRelationship`` object.
54+
:type run_as: WorkflowUserRelationship, optional
4955
"""
5056
if creator is not unset:
5157
kwargs["creator"] = creator
5258
if owner is not unset:
5359
kwargs["owner"] = owner
60+
if run_as is not unset:
61+
kwargs["run_as"] = run_as
5462
super().__init__(kwargs)

0 commit comments

Comments
 (0)