Skip to content

Commit 6a923fe

Browse files
Merge master into datadog-api-spec/test/bruce.tu/DBNBK-116-Extend-Widget.TIME-schema
2 parents 18d4b6d + af7c461 commit 6a923fe

29 files changed

+602
-86
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-08-14 22:32:00.966604",
8-
"spec_repo_commit": "07d72513"
7+
"regenerated": "2024-08-16 20:37:03.717440",
8+
"spec_repo_commit": "9c789d05"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-08-14 22:32:00.983631",
13-
"spec_repo_commit": "07d72513"
12+
"regenerated": "2024-08-16 20:37:03.734852",
13+
"spec_repo_commit": "9c789d05"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15143,6 +15143,12 @@ components:
1514315143
description: Unique identifier of the global variable.
1514415144
readOnly: true
1514515145
type: string
15146+
is_fido:
15147+
description: Determines if the global variable is a FIDO variable.
15148+
type: boolean
15149+
is_totp:
15150+
description: Determines if the global variable is a TOTP/MFA variable.
15151+
type: boolean
1514615152
name:
1514715153
description: Name of the global variable. Unique across Synthetic global
1514815154
variables.
@@ -15233,6 +15239,53 @@ components:
1523315239
- JSON_PATH
1523415240
- REGEX
1523515241
- X_PATH
15242+
SyntheticsGlobalVariableRequest:
15243+
description: Details of the global variable to create.
15244+
properties:
15245+
attributes:
15246+
$ref: '#/components/schemas/SyntheticsGlobalVariableAttributes'
15247+
description:
15248+
description: Description of the global variable.
15249+
example: Example description
15250+
type: string
15251+
id:
15252+
description: Unique identifier of the global variable.
15253+
readOnly: true
15254+
type: string
15255+
is_fido:
15256+
description: Determines if the global variable is a FIDO variable.
15257+
type: boolean
15258+
is_totp:
15259+
description: Determines if the global variable is a TOTP/MFA variable.
15260+
type: boolean
15261+
name:
15262+
description: Name of the global variable. Unique across Synthetic global
15263+
variables.
15264+
example: MY_VARIABLE
15265+
type: string
15266+
parse_test_options:
15267+
$ref: '#/components/schemas/SyntheticsGlobalVariableParseTestOptions'
15268+
parse_test_public_id:
15269+
description: A Synthetic test ID to use as a test to generate the variable
15270+
value.
15271+
example: abc-def-123
15272+
type: string
15273+
tags:
15274+
description: Tags of the global variable.
15275+
example:
15276+
- team:front
15277+
- test:workflow-1
15278+
items:
15279+
description: Tag name.
15280+
type: string
15281+
type: array
15282+
value:
15283+
$ref: '#/components/schemas/SyntheticsGlobalVariableValue'
15284+
required:
15285+
- description
15286+
- name
15287+
- tags
15288+
type: object
1523615289
SyntheticsGlobalVariableTOTPParameters:
1523715290
description: Parameters for the TOTP/MFA variable
1523815291
properties:
@@ -31194,7 +31247,7 @@ paths:
3119431247
content:
3119531248
application/json:
3119631249
schema:
31197-
$ref: '#/components/schemas/SyntheticsGlobalVariable'
31250+
$ref: '#/components/schemas/SyntheticsGlobalVariableRequest'
3119831251
description: Details of the global variable to create.
3119931252
required: true
3120031253
responses:
@@ -31328,7 +31381,7 @@ paths:
3132831381
content:
3132931382
application/json:
3133031383
schema:
31331-
$ref: '#/components/schemas/SyntheticsGlobalVariable'
31384+
$ref: '#/components/schemas/SyntheticsGlobalVariableRequest'
3133231385
description: Details of the global variable to update.
3133331386
required: true
3133431387
responses:

.generator/schemas/v2/openapi.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8075,10 +8075,6 @@ components:
80758075
FastlyAccounResponseAttributes:
80768076
description: Attributes object of a Fastly account.
80778077
properties:
8078-
api_key:
8079-
description: The FastlyAccounResponseAttributes api_key.
8080-
type: string
8081-
writeOnly: true
80828078
name:
80838079
description: The name of the Fastly account.
80848080
example: test-name
@@ -8176,9 +8172,6 @@ components:
81768172
description: The API key of the Fastly account.
81778173
example: ABCDEFG123
81788174
type: string
8179-
name:
8180-
description: The FastlyAccountUpdateRequestAttributes name.
8181-
type: string
81828175
type: object
81838176
FastlyAccountUpdateRequestData:
81848177
description: Data object for updating a Fastly account.

docs/datadog_api_client.v1.model.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4400,6 +4400,13 @@ datadog\_api\_client.v1.model.synthetics\_global\_variable\_parser\_type module
44004400
:members:
44014401
:show-inheritance:
44024402

4403+
datadog\_api\_client.v1.model.synthetics\_global\_variable\_request module
4404+
--------------------------------------------------------------------------
4405+
4406+
.. automodule:: datadog_api_client.v1.model.synthetics_global_variable_request
4407+
:members:
4408+
:show-inheritance:
4409+
44034410
datadog\_api\_client.v1.model.synthetics\_global\_variable\_totp\_parameters module
44044411
-----------------------------------------------------------------------------------
44054412

examples/v1/synthetics/CreateGlobalVariable.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
from datadog_api_client import ApiClient, Configuration
66
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi
7-
from datadog_api_client.v1.model.synthetics_global_variable import SyntheticsGlobalVariable
87
from datadog_api_client.v1.model.synthetics_global_variable_attributes import SyntheticsGlobalVariableAttributes
98
from datadog_api_client.v1.model.synthetics_global_variable_parse_test_options import (
109
SyntheticsGlobalVariableParseTestOptions,
@@ -13,11 +12,12 @@
1312
SyntheticsGlobalVariableParseTestOptionsType,
1413
)
1514
from datadog_api_client.v1.model.synthetics_global_variable_parser_type import SyntheticsGlobalVariableParserType
15+
from datadog_api_client.v1.model.synthetics_global_variable_request import SyntheticsGlobalVariableRequest
1616
from datadog_api_client.v1.model.synthetics_global_variable_value import SyntheticsGlobalVariableValue
1717
from datadog_api_client.v1.model.synthetics_restricted_roles import SyntheticsRestrictedRoles
1818
from datadog_api_client.v1.model.synthetics_variable_parser import SyntheticsVariableParser
1919

20-
body = SyntheticsGlobalVariable(
20+
body = SyntheticsGlobalVariableRequest(
2121
attributes=SyntheticsGlobalVariableAttributes(
2222
restricted_roles=SyntheticsRestrictedRoles(
2323
[

examples/v1/synthetics/CreateGlobalVariable_1068962881.py

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,35 +5,25 @@
55
from os import environ
66
from datadog_api_client import ApiClient, Configuration
77
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi
8-
from datadog_api_client.v1.model.synthetics_global_variable import SyntheticsGlobalVariable
9-
from datadog_api_client.v1.model.synthetics_global_variable_options import SyntheticsGlobalVariableOptions
108
from datadog_api_client.v1.model.synthetics_global_variable_parse_test_options import (
119
SyntheticsGlobalVariableParseTestOptions,
1210
)
1311
from datadog_api_client.v1.model.synthetics_global_variable_parse_test_options_type import (
1412
SyntheticsGlobalVariableParseTestOptionsType,
1513
)
16-
from datadog_api_client.v1.model.synthetics_global_variable_totp_parameters import (
17-
SyntheticsGlobalVariableTOTPParameters,
18-
)
14+
from datadog_api_client.v1.model.synthetics_global_variable_request import SyntheticsGlobalVariableRequest
1915
from datadog_api_client.v1.model.synthetics_global_variable_value import SyntheticsGlobalVariableValue
2016

2117
# there is a valid "synthetics_api_test_multi_step" in the system
2218
SYNTHETICS_API_TEST_MULTI_STEP_PUBLIC_ID = environ["SYNTHETICS_API_TEST_MULTI_STEP_PUBLIC_ID"]
2319

24-
body = SyntheticsGlobalVariable(
20+
body = SyntheticsGlobalVariableRequest(
2521
description="",
26-
name="GLOBAL_VARIABLE_PAYLOAD_EXAMPLESYNTHETIC",
22+
name="GLOBAL_VARIABLE_FROM_TEST_PAYLOAD_EXAMPLESYNTHETIC",
2723
tags=[],
2824
value=SyntheticsGlobalVariableValue(
2925
secure=False,
3026
value="",
31-
options=SyntheticsGlobalVariableOptions(
32-
totp_parameters=SyntheticsGlobalVariableTOTPParameters(
33-
digits=6,
34-
refresh_interval=30,
35-
),
36-
),
3727
),
3828
parse_test_public_id=SYNTHETICS_API_TEST_MULTI_STEP_PUBLIC_ID,
3929
parse_test_options=SyntheticsGlobalVariableParseTestOptions(
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
"""
2+
Create a FIDO global variable returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi
7+
from datadog_api_client.v1.model.synthetics_global_variable_request import SyntheticsGlobalVariableRequest
8+
9+
body = SyntheticsGlobalVariableRequest(
10+
description="",
11+
is_fido=True,
12+
name="GLOBAL_VARIABLE_FIDO_PAYLOAD_EXAMPLESYNTHETIC",
13+
tags=[],
14+
)
15+
16+
configuration = Configuration()
17+
with ApiClient(configuration) as api_client:
18+
api_instance = SyntheticsApi(api_client)
19+
response = api_instance.create_global_variable(body=body)
20+
21+
print(response)
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
"""
2+
Create a TOTP global variable returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi
7+
from datadog_api_client.v1.model.synthetics_global_variable_options import SyntheticsGlobalVariableOptions
8+
from datadog_api_client.v1.model.synthetics_global_variable_request import SyntheticsGlobalVariableRequest
9+
from datadog_api_client.v1.model.synthetics_global_variable_totp_parameters import (
10+
SyntheticsGlobalVariableTOTPParameters,
11+
)
12+
from datadog_api_client.v1.model.synthetics_global_variable_value import SyntheticsGlobalVariableValue
13+
14+
body = SyntheticsGlobalVariableRequest(
15+
description="",
16+
is_totp=True,
17+
name="GLOBAL_VARIABLE_TOTP_PAYLOAD_EXAMPLESYNTHETIC",
18+
tags=[],
19+
value=SyntheticsGlobalVariableValue(
20+
secure=False,
21+
value="",
22+
options=SyntheticsGlobalVariableOptions(
23+
totp_parameters=SyntheticsGlobalVariableTOTPParameters(
24+
digits=6,
25+
refresh_interval=30,
26+
),
27+
),
28+
),
29+
)
30+
31+
configuration = Configuration()
32+
with ApiClient(configuration) as api_client:
33+
api_instance = SyntheticsApi(api_client)
34+
response = api_instance.create_global_variable(body=body)
35+
36+
print(response)

examples/v1/synthetics/EditGlobalVariable.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
from datadog_api_client import ApiClient, Configuration
66
from datadog_api_client.v1.api.synthetics_api import SyntheticsApi
7-
from datadog_api_client.v1.model.synthetics_global_variable import SyntheticsGlobalVariable
87
from datadog_api_client.v1.model.synthetics_global_variable_attributes import SyntheticsGlobalVariableAttributes
98
from datadog_api_client.v1.model.synthetics_global_variable_parse_test_options import (
109
SyntheticsGlobalVariableParseTestOptions,
@@ -13,11 +12,12 @@
1312
SyntheticsGlobalVariableParseTestOptionsType,
1413
)
1514
from datadog_api_client.v1.model.synthetics_global_variable_parser_type import SyntheticsGlobalVariableParserType
15+
from datadog_api_client.v1.model.synthetics_global_variable_request import SyntheticsGlobalVariableRequest
1616
from datadog_api_client.v1.model.synthetics_global_variable_value import SyntheticsGlobalVariableValue
1717
from datadog_api_client.v1.model.synthetics_restricted_roles import SyntheticsRestrictedRoles
1818
from datadog_api_client.v1.model.synthetics_variable_parser import SyntheticsVariableParser
1919

20-
body = SyntheticsGlobalVariable(
20+
body = SyntheticsGlobalVariableRequest(
2121
attributes=SyntheticsGlobalVariableAttributes(
2222
restricted_roles=SyntheticsRestrictedRoles(
2323
[

src/datadog_api_client/v1/api/synthetics_api.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
)
4444
from datadog_api_client.v1.model.synthetics_list_global_variables_response import SyntheticsListGlobalVariablesResponse
4545
from datadog_api_client.v1.model.synthetics_global_variable import SyntheticsGlobalVariable
46+
from datadog_api_client.v1.model.synthetics_global_variable_request import SyntheticsGlobalVariableRequest
4647

4748

4849
class SyntheticsApi:
@@ -73,7 +74,7 @@ def __init__(self, api_client=None):
7374
params_map={
7475
"body": {
7576
"required": True,
76-
"openapi_types": (SyntheticsGlobalVariable,),
77+
"openapi_types": (SyntheticsGlobalVariableRequest,),
7778
"location": "body",
7879
},
7980
},
@@ -225,7 +226,7 @@ def __init__(self, api_client=None):
225226
},
226227
"body": {
227228
"required": True,
228-
"openapi_types": (SyntheticsGlobalVariable,),
229+
"openapi_types": (SyntheticsGlobalVariableRequest,),
229230
"location": "body",
230231
},
231232
},
@@ -754,14 +755,14 @@ def __init__(self, api_client=None):
754755

755756
def create_global_variable(
756757
self,
757-
body: SyntheticsGlobalVariable,
758+
body: SyntheticsGlobalVariableRequest,
758759
) -> SyntheticsGlobalVariable:
759760
"""Create a global variable.
760761
761762
Create a Synthetic global variable.
762763
763764
:param body: Details of the global variable to create.
764-
:type body: SyntheticsGlobalVariable
765+
:type body: SyntheticsGlobalVariableRequest
765766
:rtype: SyntheticsGlobalVariable
766767
"""
767768
kwargs: Dict[str, Any] = {}
@@ -874,7 +875,7 @@ def delete_tests(
874875
def edit_global_variable(
875876
self,
876877
variable_id: str,
877-
body: SyntheticsGlobalVariable,
878+
body: SyntheticsGlobalVariableRequest,
878879
) -> SyntheticsGlobalVariable:
879880
"""Edit a global variable.
880881
@@ -883,7 +884,7 @@ def edit_global_variable(
883884
:param variable_id: The ID of the global variable.
884885
:type variable_id: str
885886
:param body: Details of the global variable to update.
886-
:type body: SyntheticsGlobalVariable
887+
:type body: SyntheticsGlobalVariableRequest
887888
:rtype: SyntheticsGlobalVariable
888889
"""
889890
kwargs: Dict[str, Any] = {}

0 commit comments

Comments
 (0)