Skip to content

Commit 7fbaaf7

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add /api/v2/org_configs specs (#2005)
Co-authored-by: ci.datadog-api-spec <[email protected]> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
1 parent c38977b commit 7fbaaf7

30 files changed

+1064
-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.6.6",
7-
"regenerated": "2024-06-17 09:21:24.214498",
8-
"spec_repo_commit": "743cf92b"
7+
"regenerated": "2024-06-18 16:37:19.527536",
8+
"spec_repo_commit": "848af7a9"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-06-17 09:21:24.231452",
13-
"spec_repo_commit": "743cf92b"
12+
"regenerated": "2024-06-18 16:37:19.544104",
13+
"spec_repo_commit": "848af7a9"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 196 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,14 @@ components:
373373
required: true
374374
schema:
375375
type: string
376+
OrgConfigName:
377+
description: The name of an Org Config.
378+
in: path
379+
name: org_config_name
380+
required: true
381+
schema:
382+
example: monitor_timezone
383+
type: string
376384
PageNumber:
377385
description: Specific page number to return.
378386
in: query
@@ -13822,6 +13830,104 @@ components:
1382213830
required:
1382313831
- data
1382413832
type: object
13833+
OrgConfigGetResponse:
13834+
description: A response with a single Org Config.
13835+
properties:
13836+
data:
13837+
$ref: '#/components/schemas/OrgConfigRead'
13838+
required:
13839+
- data
13840+
type: object
13841+
OrgConfigListResponse:
13842+
description: A response with multiple Org Configs.
13843+
properties:
13844+
data:
13845+
description: An array of Org Configs.
13846+
items:
13847+
$ref: '#/components/schemas/OrgConfigRead'
13848+
type: array
13849+
required:
13850+
- data
13851+
type: object
13852+
OrgConfigRead:
13853+
description: A single Org Config.
13854+
properties:
13855+
attributes:
13856+
$ref: '#/components/schemas/OrgConfigReadAttributes'
13857+
id:
13858+
description: A unique identifier for an Org Config.
13859+
example: abcd1234
13860+
type: string
13861+
type:
13862+
$ref: '#/components/schemas/OrgConfigType'
13863+
required:
13864+
- id
13865+
- type
13866+
- attributes
13867+
type: object
13868+
OrgConfigReadAttributes:
13869+
description: Readable attributes of an Org Config.
13870+
properties:
13871+
description:
13872+
description: The description of an Org Config.
13873+
example: Frobulate the turbo encabulator manifold
13874+
type: string
13875+
modified_at:
13876+
description: The timestamp of the last Org Config update (if any).
13877+
format: date-time
13878+
nullable: true
13879+
type: string
13880+
name:
13881+
description: The machine-friendly name of an Org Config.
13882+
example: monitor_timezone
13883+
type: string
13884+
value:
13885+
description: The value of an Org Config.
13886+
value_type:
13887+
description: The type of an Org Config value.
13888+
example: bool
13889+
type: string
13890+
required:
13891+
- name
13892+
- description
13893+
- value_type
13894+
- value
13895+
type: object
13896+
OrgConfigType:
13897+
description: Data type of an Org Config.
13898+
enum:
13899+
- org_configs
13900+
example: org_configs
13901+
type: string
13902+
x-enum-varnames:
13903+
- ORG_CONFIGS
13904+
OrgConfigWrite:
13905+
description: An Org Config write operation.
13906+
properties:
13907+
attributes:
13908+
$ref: '#/components/schemas/OrgConfigWriteAttributes'
13909+
type:
13910+
$ref: '#/components/schemas/OrgConfigType'
13911+
required:
13912+
- type
13913+
- attributes
13914+
type: object
13915+
OrgConfigWriteAttributes:
13916+
description: Writable attributes of an Org Config.
13917+
properties:
13918+
value:
13919+
description: The value of an Org Config.
13920+
required:
13921+
- value
13922+
type: object
13923+
OrgConfigWriteRequest:
13924+
description: A request to update an Org Config.
13925+
properties:
13926+
data:
13927+
$ref: '#/components/schemas/OrgConfigWrite'
13928+
required:
13929+
- data
13930+
type: object
1382513931
Organization:
1382613932
description: Organization object.
1382713933
properties:
@@ -30455,6 +30561,96 @@ paths:
3045530561
limitParam: page[limit]
3045630562
pageOffsetParam: page[offset]
3045730563
resultsPath: data
30564+
/api/v2/org_configs:
30565+
get:
30566+
description: Returns all Org Configs (name, description, and value).
30567+
operationId: ListOrgConfigs
30568+
responses:
30569+
'200':
30570+
content:
30571+
application/json:
30572+
schema:
30573+
$ref: '#/components/schemas/OrgConfigListResponse'
30574+
description: OK
30575+
'400':
30576+
$ref: '#/components/responses/BadRequestResponse'
30577+
'401':
30578+
$ref: '#/components/responses/UnauthorizedResponse'
30579+
'403':
30580+
$ref: '#/components/responses/ForbiddenResponse'
30581+
'429':
30582+
$ref: '#/components/responses/TooManyRequestsResponse'
30583+
security:
30584+
- apiKeyAuth: []
30585+
appKeyAuth: []
30586+
summary: List Org Configs
30587+
tags:
30588+
- Organizations
30589+
/api/v2/org_configs/{org_config_name}:
30590+
get:
30591+
description: Return the name, description, and value of a specific Org Config.
30592+
operationId: GetOrgConfig
30593+
parameters:
30594+
- $ref: '#/components/parameters/OrgConfigName'
30595+
responses:
30596+
'200':
30597+
content:
30598+
application/json:
30599+
schema:
30600+
$ref: '#/components/schemas/OrgConfigGetResponse'
30601+
description: OK
30602+
'400':
30603+
$ref: '#/components/responses/BadRequestResponse'
30604+
'401':
30605+
$ref: '#/components/responses/UnauthorizedResponse'
30606+
'403':
30607+
$ref: '#/components/responses/ForbiddenResponse'
30608+
'404':
30609+
$ref: '#/components/responses/NotFoundResponse'
30610+
'429':
30611+
$ref: '#/components/responses/TooManyRequestsResponse'
30612+
security:
30613+
- apiKeyAuth: []
30614+
appKeyAuth: []
30615+
summary: Get a specific Org Config value
30616+
tags:
30617+
- Organizations
30618+
patch:
30619+
description: Update the value of a specific Org Config.
30620+
operationId: UpdateOrgConfig
30621+
parameters:
30622+
- $ref: '#/components/parameters/OrgConfigName'
30623+
requestBody:
30624+
content:
30625+
application/json:
30626+
schema:
30627+
$ref: '#/components/schemas/OrgConfigWriteRequest'
30628+
required: true
30629+
responses:
30630+
'200':
30631+
content:
30632+
application/json:
30633+
schema:
30634+
$ref: '#/components/schemas/OrgConfigGetResponse'
30635+
description: OK
30636+
'400':
30637+
$ref: '#/components/responses/BadRequestResponse'
30638+
'401':
30639+
$ref: '#/components/responses/UnauthorizedResponse'
30640+
'403':
30641+
$ref: '#/components/responses/ForbiddenResponse'
30642+
'404':
30643+
$ref: '#/components/responses/NotFoundResponse'
30644+
'429':
30645+
$ref: '#/components/responses/TooManyRequestsResponse'
30646+
security:
30647+
- apiKeyAuth: []
30648+
appKeyAuth: []
30649+
- AuthZ:
30650+
- org_management
30651+
summary: Update a specific Org Config
30652+
tags:
30653+
- Organizations
3045830654
/api/v2/permissions:
3045930655
get:
3046030656
description: Returns a list of all permissions, including name, description,

docs/datadog_api_client.v2.model.rst

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6133,6 +6133,62 @@ opsgenie\_services\_response
61336133
:members:
61346134
:show-inheritance:
61356135

6136+
org\_config\_get\_response
6137+
--------------------------
6138+
6139+
.. automodule:: datadog_api_client.v2.model.org_config_get_response
6140+
:members:
6141+
:show-inheritance:
6142+
6143+
org\_config\_list\_response
6144+
---------------------------
6145+
6146+
.. automodule:: datadog_api_client.v2.model.org_config_list_response
6147+
:members:
6148+
:show-inheritance:
6149+
6150+
org\_config\_read
6151+
-----------------
6152+
6153+
.. automodule:: datadog_api_client.v2.model.org_config_read
6154+
:members:
6155+
:show-inheritance:
6156+
6157+
org\_config\_read\_attributes
6158+
-----------------------------
6159+
6160+
.. automodule:: datadog_api_client.v2.model.org_config_read_attributes
6161+
:members:
6162+
:show-inheritance:
6163+
6164+
org\_config\_type
6165+
-----------------
6166+
6167+
.. automodule:: datadog_api_client.v2.model.org_config_type
6168+
:members:
6169+
:show-inheritance:
6170+
6171+
org\_config\_write
6172+
------------------
6173+
6174+
.. automodule:: datadog_api_client.v2.model.org_config_write
6175+
:members:
6176+
:show-inheritance:
6177+
6178+
org\_config\_write\_attributes
6179+
------------------------------
6180+
6181+
.. automodule:: datadog_api_client.v2.model.org_config_write_attributes
6182+
:members:
6183+
:show-inheritance:
6184+
6185+
org\_config\_write\_request
6186+
---------------------------
6187+
6188+
.. automodule:: datadog_api_client.v2.model.org_config_write_request
6189+
:members:
6190+
:show-inheritance:
6191+
61366192
organization
61376193
------------
61386194

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
"""
2+
Get a specific Org Config value returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.organizations_api import OrganizationsApi
7+
8+
configuration = Configuration()
9+
with ApiClient(configuration) as api_client:
10+
api_instance = OrganizationsApi(api_client)
11+
response = api_instance.get_org_config(
12+
org_config_name="custom_roles",
13+
)
14+
15+
print(response)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
"""
2+
List Org Configs returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.organizations_api import OrganizationsApi
7+
8+
configuration = Configuration()
9+
with ApiClient(configuration) as api_client:
10+
api_instance = OrganizationsApi(api_client)
11+
response = api_instance.list_org_configs()
12+
13+
print(response)
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
"""
2+
Update a specific Org Config returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.organizations_api import OrganizationsApi
7+
from datadog_api_client.v2.model.org_config_type import OrgConfigType
8+
from datadog_api_client.v2.model.org_config_write import OrgConfigWrite
9+
from datadog_api_client.v2.model.org_config_write_attributes import OrgConfigWriteAttributes
10+
from datadog_api_client.v2.model.org_config_write_request import OrgConfigWriteRequest
11+
12+
body = OrgConfigWriteRequest(
13+
data=OrgConfigWrite(
14+
attributes=OrgConfigWriteAttributes(
15+
value="UTC",
16+
),
17+
type=OrgConfigType.ORG_CONFIGS,
18+
),
19+
)
20+
21+
configuration = Configuration()
22+
with ApiClient(configuration) as api_client:
23+
api_instance = OrganizationsApi(api_client)
24+
response = api_instance.update_org_config(org_config_name="monitor_timezone", body=body)
25+
26+
print(response)

0 commit comments

Comments
 (0)