Skip to content

Commit c2426a7

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 3fc3b9c of spec repo (#91)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 698ecb0 commit c2426a7

File tree

8 files changed

+261
-7
lines changed

8 files changed

+261
-7
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.2.0",
7-
"regenerated": "2020-09-28 16:56:15.115972",
8-
"spec_repo_commit": "e47f9cc"
7+
"regenerated": "2020-09-28 17:45:15.578351",
8+
"spec_repo_commit": "3fc3b9c"
99
},
1010
"v2": {
1111
"apigentools_version": "1.2.0",
12-
"regenerated": "2020-09-28 16:56:25.993833",
13-
"spec_repo_commit": "e47f9cc"
12+
"regenerated": "2020-09-28 17:45:26.835204",
13+
"spec_repo_commit": "3fc3b9c"
1414
}
1515
}
1616
}

docs/v1/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ Class | Method | HTTP request | Description
233233
*SyntheticsApi* | [**get_browser_test**](SyntheticsApi.md#get_browser_test) | **GET** /api/v1/synthetics/tests/browser/{public_id} | Get a test configuration (browser)
234234
*SyntheticsApi* | [**get_browser_test_latest_results**](SyntheticsApi.md#get_browser_test_latest_results) | **GET** /api/v1/synthetics/tests/browser/{public_id}/results | Get the test&#39;s latest results summaries (browser)
235235
*SyntheticsApi* | [**get_browser_test_result**](SyntheticsApi.md#get_browser_test_result) | **GET** /api/v1/synthetics/tests/browser/{public_id}/results/{result_id} | Get a test result (browser)
236+
*SyntheticsApi* | [**get_global_variable**](SyntheticsApi.md#get_global_variable) | **GET** /api/v1/synthetics/variables/{variable_id} | Get a global variable
236237
*SyntheticsApi* | [**get_test**](SyntheticsApi.md#get_test) | **GET** /api/v1/synthetics/tests/{public_id} | Get a test configuration (API)
237238
*SyntheticsApi* | [**list_locations**](SyntheticsApi.md#list_locations) | **GET** /api/v1/synthetics/locations | Get all locations (public and private)
238239
*SyntheticsApi* | [**list_tests**](SyntheticsApi.md#list_tests) | **GET** /api/v1/synthetics/tests | Get the list of all tests

docs/v1/SyntheticsApi.md

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Method | HTTP request | Description
1414
[**get_browser_test**](SyntheticsApi.md#get_browser_test) | **GET** /api/v1/synthetics/tests/browser/{public_id} | Get a test configuration (browser)
1515
[**get_browser_test_latest_results**](SyntheticsApi.md#get_browser_test_latest_results) | **GET** /api/v1/synthetics/tests/browser/{public_id}/results | Get the test&#39;s latest results summaries (browser)
1616
[**get_browser_test_result**](SyntheticsApi.md#get_browser_test_result) | **GET** /api/v1/synthetics/tests/browser/{public_id}/results/{result_id} | Get a test result (browser)
17+
[**get_global_variable**](SyntheticsApi.md#get_global_variable) | **GET** /api/v1/synthetics/variables/{variable_id} | Get a global variable
1718
[**get_test**](SyntheticsApi.md#get_test) | **GET** /api/v1/synthetics/tests/{public_id} | Get a test configuration (API)
1819
[**list_locations**](SyntheticsApi.md#list_locations) | **GET** /api/v1/synthetics/locations | Get all locations (public and private)
1920
[**list_tests**](SyntheticsApi.md#list_tests) | **GET** /api/v1/synthetics/tests | Get the list of all tests
@@ -1081,6 +1082,98 @@ Name | Type | Description | Notes
10811082

10821083
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
10831084

1085+
# **get_global_variable**
1086+
> SyntheticsGlobalVariable get_global_variable(variable_id)
1087+
1088+
Get a global variable
1089+
1090+
Get the detailed configuration of a global variable.
1091+
1092+
### Example
1093+
1094+
* Api Key Authentication (apiKeyAuth):
1095+
* Api Key Authentication (appKeyAuth):
1096+
```python
1097+
import time
1098+
import datadog_api_client.v1
1099+
from datadog_api_client.v1.api import synthetics_api
1100+
from datadog_api_client.v1.model.api_error_response import APIErrorResponse
1101+
from datadog_api_client.v1.model.synthetics_global_variable import SyntheticsGlobalVariable
1102+
from pprint import pprint
1103+
# Defining the host is optional and defaults to https://api.datadoghq.com
1104+
# See configuration.py for a list of all supported configuration parameters.
1105+
configuration = datadog_api_client.v1.Configuration(
1106+
host = "https://api.datadoghq.com"
1107+
)
1108+
1109+
# The client must configure the authentication and authorization parameters
1110+
# in accordance with the API server security policy.
1111+
# Examples for each auth method are provided below, use the example that
1112+
# satisfies your auth use case.
1113+
1114+
# Configure API key authorization: apiKeyAuth
1115+
configuration = datadog_api_client.v1.Configuration(
1116+
host = "https://api.datadoghq.com",
1117+
api_key = {
1118+
'apiKeyAuth': 'YOUR_API_KEY'
1119+
}
1120+
)
1121+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
1122+
# configuration.api_key_prefix['apiKeyAuth'] = 'Bearer'
1123+
1124+
# Configure API key authorization: appKeyAuth
1125+
configuration = datadog_api_client.v1.Configuration(
1126+
host = "https://api.datadoghq.com",
1127+
api_key = {
1128+
'appKeyAuth': 'YOUR_API_KEY'
1129+
}
1130+
)
1131+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
1132+
# configuration.api_key_prefix['appKeyAuth'] = 'Bearer'
1133+
1134+
# Enter a context with an instance of the API client
1135+
with datadog_api_client.v1.ApiClient(configuration) as api_client:
1136+
# Create an instance of the API class
1137+
api_instance = synthetics_api.SyntheticsApi(api_client)
1138+
variable_id = "variable_id_example" # str | The ID of the global variable.
1139+
1140+
# example passing only required values which don't have defaults set
1141+
try:
1142+
# Get a global variable
1143+
api_response = api_instance.get_global_variable(variable_id)
1144+
pprint(api_response)
1145+
except datadog_api_client.v1.ApiException as e:
1146+
print("Exception when calling SyntheticsApi->get_global_variable: %s\n" % e)
1147+
```
1148+
1149+
### Parameters
1150+
1151+
Name | Type | Description | Notes
1152+
------------- | ------------- | ------------- | -------------
1153+
**variable_id** | **str**| The ID of the global variable. |
1154+
1155+
### Return type
1156+
1157+
[**SyntheticsGlobalVariable**](SyntheticsGlobalVariable.md)
1158+
1159+
### Authorization
1160+
1161+
[apiKeyAuth](README.md#apiKeyAuth), [appKeyAuth](README.md#appKeyAuth)
1162+
1163+
### HTTP request headers
1164+
1165+
- **Content-Type**: Not defined
1166+
- **Accept**: application/json
1167+
1168+
### HTTP response details
1169+
| Status code | Description | Response headers |
1170+
|-------------|-------------|------------------|
1171+
**200** | OK | - |
1172+
**403** | Forbidden | - |
1173+
**404** | Not found | - |
1174+
1175+
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
1176+
10841177
# **get_test**
10851178
> SyntheticsTestDetails get_test(public_id)
10861179

docs/v1/SyntheticsGlobalVariableValue.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Value of the global variable.
44
## Properties
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**value** | **str** | Value of the global variable. |
7+
**value** | **str** | Value of the global variable. When reading a global variable, the value will not be present if the variable is secure. |
88
**secure** | **bool** | Determines if the variable is secure. | [optional]
99

1010
[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)

src/datadog_api_client/v1/api/synthetics_api.py

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1318,6 +1318,126 @@ def __get_browser_test_result(
13181318
callable=__get_browser_test_result
13191319
)
13201320

1321+
def __get_global_variable(
1322+
self,
1323+
variable_id,
1324+
**kwargs
1325+
):
1326+
"""Get a global variable # noqa: E501
1327+
1328+
Get the detailed configuration of a global variable. # noqa: E501
1329+
This method makes a synchronous HTTP request by default. To make an
1330+
asynchronous HTTP request, please pass async_req=True
1331+
1332+
>>> thread = api.get_global_variable(variable_id, async_req=True)
1333+
>>> result = thread.get()
1334+
1335+
Args:
1336+
variable_id (str): The ID of the global variable.
1337+
1338+
Keyword Args:
1339+
_return_http_data_only (bool): response data without head status
1340+
code and headers. Default is True.
1341+
_preload_content (bool): if False, the urllib3.HTTPResponse object
1342+
will be returned without reading/decoding response data.
1343+
Default is True.
1344+
_request_timeout (float/tuple): timeout setting for this request. If one
1345+
number provided, it will be total request timeout. It can also
1346+
be a pair (tuple) of (connection, read) timeouts.
1347+
Default is None.
1348+
_check_input_type (bool): specifies if type checking
1349+
should be done one the data sent to the server.
1350+
Default is True.
1351+
_check_return_type (bool): specifies if type checking
1352+
should be done one the data received from the server.
1353+
Default is True.
1354+
_host_index (int/None): specifies the index of the server
1355+
that we want to use.
1356+
Default is read from the configuration.
1357+
async_req (bool): execute request asynchronously
1358+
1359+
Returns:
1360+
SyntheticsGlobalVariable
1361+
If the method is called asynchronously, returns the request
1362+
thread.
1363+
"""
1364+
kwargs['async_req'] = kwargs.get(
1365+
'async_req', False
1366+
)
1367+
kwargs['_return_http_data_only'] = kwargs.get(
1368+
'_return_http_data_only', True
1369+
)
1370+
kwargs['_preload_content'] = kwargs.get(
1371+
'_preload_content', True
1372+
)
1373+
kwargs['_request_timeout'] = kwargs.get(
1374+
'_request_timeout', None
1375+
)
1376+
kwargs['_check_input_type'] = kwargs.get(
1377+
'_check_input_type', True
1378+
)
1379+
kwargs['_check_return_type'] = kwargs.get(
1380+
'_check_return_type', True
1381+
)
1382+
kwargs['_host_index'] = kwargs.get('_host_index')
1383+
kwargs['variable_id'] = \
1384+
variable_id
1385+
return self.call_with_http_info(**kwargs)
1386+
1387+
self.get_global_variable = Endpoint(
1388+
settings={
1389+
'response_type': (SyntheticsGlobalVariable,),
1390+
'auth': [
1391+
'apiKeyAuth',
1392+
'appKeyAuth'
1393+
],
1394+
'endpoint_path': '/api/v1/synthetics/variables/{variable_id}',
1395+
'operation_id': 'get_global_variable',
1396+
'http_method': 'GET',
1397+
'servers': None,
1398+
},
1399+
params_map={
1400+
'all': [
1401+
'variable_id',
1402+
],
1403+
'required': [
1404+
'variable_id',
1405+
],
1406+
'nullable': [
1407+
],
1408+
'enum': [
1409+
],
1410+
'validation': [
1411+
]
1412+
},
1413+
root_map={
1414+
'validations': {
1415+
},
1416+
'allowed_values': {
1417+
},
1418+
'openapi_types': {
1419+
'variable_id':
1420+
(str,),
1421+
},
1422+
'attribute_map': {
1423+
'variable_id': 'variable_id',
1424+
},
1425+
'location_map': {
1426+
'variable_id': 'path',
1427+
},
1428+
'collection_format_map': {
1429+
}
1430+
},
1431+
headers_map={
1432+
'accept': [
1433+
'application/json'
1434+
],
1435+
'content_type': [],
1436+
},
1437+
api_client=api_client,
1438+
callable=__get_global_variable
1439+
)
1440+
13211441
def __get_test(
13221442
self,
13231443
public_id,

src/datadog_api_client/v1/model/synthetics_global_variable_value.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def __init__(self, value, *args, **kwargs): # noqa: E501
101101
"""SyntheticsGlobalVariableValue - a model defined in OpenAPI
102102
103103
Args:
104-
value (str): Value of the global variable.
104+
value (str): Value of the global variable. When reading a global variable, the value will not be present if the variable is secure.
105105
106106
Keyword Args:
107107
_check_type (bool): if True, values for parameters in openapi_types

src/datadog_api_client/v1/openapi.yaml

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6094,7 +6094,8 @@ components:
60946094
description: Determines if the variable is secure.
60956095
type: boolean
60966096
value:
6097-
description: Value of the global variable.
6097+
description: Value of the global variable. When reading a global variable,
6098+
the value will not be present if the variable is secure.
60986099
type: string
60996100
required:
61006101
- value
@@ -13819,6 +13820,38 @@ paths:
1381913820
summary: Delete a global variable
1382013821
tags:
1382113822
- Synthetics
13823+
get:
13824+
description: Get the detailed configuration of a global variable.
13825+
operationId: GetGlobalVariable
13826+
parameters:
13827+
- description: The ID of the global variable.
13828+
in: path
13829+
name: variable_id
13830+
required: true
13831+
schema:
13832+
type: string
13833+
responses:
13834+
'200':
13835+
content:
13836+
application/json:
13837+
schema:
13838+
$ref: '#/components/schemas/SyntheticsGlobalVariable'
13839+
description: OK
13840+
'403':
13841+
content:
13842+
application/json:
13843+
schema:
13844+
$ref: '#/components/schemas/APIErrorResponse'
13845+
description: Forbidden
13846+
'404':
13847+
content:
13848+
application/json:
13849+
schema:
13850+
$ref: '#/components/schemas/APIErrorResponse'
13851+
description: Not found
13852+
summary: Get a global variable
13853+
tags:
13854+
- Synthetics
1382213855
put:
1382313856
description: Edit a Synthetics global variable.
1382413857
operationId: EditGlobalVariable

tests/v1/features/synthetics.feature

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,3 +129,10 @@ Feature: Synthetics
129129
Given new "ListTests" request
130130
When the request is sent
131131
Then the response status is 200 OK - Returns the list of all Synthetic tests.
132+
133+
@generated @skip
134+
Scenario: Get a global variable returns "OK" response
135+
Given new "GetGlobalVariable" request
136+
And request contains "variable_id" parameter from "<PATH>"
137+
When the request is sent
138+
Then the response status is 200 OK

0 commit comments

Comments
 (0)