Skip to content

Commit

Permalink
Regenerate client from commit 848af7a9 of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Jun 18, 2024
1 parent c38977b commit 43c7415
Show file tree
Hide file tree
Showing 30 changed files with 1,064 additions and 7 deletions.
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2024-06-17 09:21:24.214498",
"spec_repo_commit": "743cf92b"
"regenerated": "2024-06-18 16:37:19.527536",
"spec_repo_commit": "848af7a9"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-06-17 09:21:24.231452",
"spec_repo_commit": "743cf92b"
"regenerated": "2024-06-18 16:37:19.544104",
"spec_repo_commit": "848af7a9"
}
}
}
196 changes: 196 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,14 @@ components:
required: true
schema:
type: string
OrgConfigName:
description: The name of an Org Config.
in: path
name: org_config_name
required: true
schema:
example: monitor_timezone
type: string
PageNumber:
description: Specific page number to return.
in: query
Expand Down Expand Up @@ -13822,6 +13830,104 @@ components:
required:
- data
type: object
OrgConfigGetResponse:
description: A response with a single Org Config.
properties:
data:
$ref: '#/components/schemas/OrgConfigRead'
required:
- data
type: object
OrgConfigListResponse:
description: A response with multiple Org Configs.
properties:
data:
description: An array of Org Configs.
items:
$ref: '#/components/schemas/OrgConfigRead'
type: array
required:
- data
type: object
OrgConfigRead:
description: A single Org Config.
properties:
attributes:
$ref: '#/components/schemas/OrgConfigReadAttributes'
id:
description: A unique identifier for an Org Config.
example: abcd1234
type: string
type:
$ref: '#/components/schemas/OrgConfigType'
required:
- id
- type
- attributes
type: object
OrgConfigReadAttributes:
description: Readable attributes of an Org Config.
properties:
description:
description: The description of an Org Config.
example: Frobulate the turbo encabulator manifold
type: string
modified_at:
description: The timestamp of the last Org Config update (if any).
format: date-time
nullable: true
type: string
name:
description: The machine-friendly name of an Org Config.
example: monitor_timezone
type: string
value:
description: The value of an Org Config.
value_type:
description: The type of an Org Config value.
example: bool
type: string
required:
- name
- description
- value_type
- value
type: object
OrgConfigType:
description: Data type of an Org Config.
enum:
- org_configs
example: org_configs
type: string
x-enum-varnames:
- ORG_CONFIGS
OrgConfigWrite:
description: An Org Config write operation.
properties:
attributes:
$ref: '#/components/schemas/OrgConfigWriteAttributes'
type:
$ref: '#/components/schemas/OrgConfigType'
required:
- type
- attributes
type: object
OrgConfigWriteAttributes:
description: Writable attributes of an Org Config.
properties:
value:
description: The value of an Org Config.
required:
- value
type: object
OrgConfigWriteRequest:
description: A request to update an Org Config.
properties:
data:
$ref: '#/components/schemas/OrgConfigWrite'
required:
- data
type: object
Organization:
description: Organization object.
properties:
Expand Down Expand Up @@ -30455,6 +30561,96 @@ paths:
limitParam: page[limit]
pageOffsetParam: page[offset]
resultsPath: data
/api/v2/org_configs:
get:
description: Returns all Org Configs (name, description, and value).
operationId: ListOrgConfigs
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/OrgConfigListResponse'
description: OK
'400':
$ref: '#/components/responses/BadRequestResponse'
'401':
$ref: '#/components/responses/UnauthorizedResponse'
'403':
$ref: '#/components/responses/ForbiddenResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
security:
- apiKeyAuth: []
appKeyAuth: []
summary: List Org Configs
tags:
- Organizations
/api/v2/org_configs/{org_config_name}:
get:
description: Return the name, description, and value of a specific Org Config.
operationId: GetOrgConfig
parameters:
- $ref: '#/components/parameters/OrgConfigName'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/OrgConfigGetResponse'
description: OK
'400':
$ref: '#/components/responses/BadRequestResponse'
'401':
$ref: '#/components/responses/UnauthorizedResponse'
'403':
$ref: '#/components/responses/ForbiddenResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
security:
- apiKeyAuth: []
appKeyAuth: []
summary: Get a specific Org Config value
tags:
- Organizations
patch:
description: Update the value of a specific Org Config.
operationId: UpdateOrgConfig
parameters:
- $ref: '#/components/parameters/OrgConfigName'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/OrgConfigWriteRequest'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/OrgConfigGetResponse'
description: OK
'400':
$ref: '#/components/responses/BadRequestResponse'
'401':
$ref: '#/components/responses/UnauthorizedResponse'
'403':
$ref: '#/components/responses/ForbiddenResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
security:
- apiKeyAuth: []
appKeyAuth: []
- AuthZ:
- org_management
summary: Update a specific Org Config
tags:
- Organizations
/api/v2/permissions:
get:
description: Returns a list of all permissions, including name, description,
Expand Down
56 changes: 56 additions & 0 deletions docs/datadog_api_client.v2.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6133,6 +6133,62 @@ opsgenie\_services\_response
:members:
:show-inheritance:

org\_config\_get\_response
--------------------------

.. automodule:: datadog_api_client.v2.model.org_config_get_response
:members:
:show-inheritance:

org\_config\_list\_response
---------------------------

.. automodule:: datadog_api_client.v2.model.org_config_list_response
:members:
:show-inheritance:

org\_config\_read
-----------------

.. automodule:: datadog_api_client.v2.model.org_config_read
:members:
:show-inheritance:

org\_config\_read\_attributes
-----------------------------

.. automodule:: datadog_api_client.v2.model.org_config_read_attributes
:members:
:show-inheritance:

org\_config\_type
-----------------

.. automodule:: datadog_api_client.v2.model.org_config_type
:members:
:show-inheritance:

org\_config\_write
------------------

.. automodule:: datadog_api_client.v2.model.org_config_write
:members:
:show-inheritance:

org\_config\_write\_attributes
------------------------------

.. automodule:: datadog_api_client.v2.model.org_config_write_attributes
:members:
:show-inheritance:

org\_config\_write\_request
---------------------------

.. automodule:: datadog_api_client.v2.model.org_config_write_request
:members:
:show-inheritance:

organization
------------

Expand Down
15 changes: 15 additions & 0 deletions examples/v2/organizations/GetOrgConfig.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
"""
Get a specific Org Config value returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.organizations_api import OrganizationsApi

configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = OrganizationsApi(api_client)
response = api_instance.get_org_config(
org_config_name="custom_roles",
)

print(response)
13 changes: 13 additions & 0 deletions examples/v2/organizations/ListOrgConfigs.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
"""
List Org Configs returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.organizations_api import OrganizationsApi

configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = OrganizationsApi(api_client)
response = api_instance.list_org_configs()

print(response)
26 changes: 26 additions & 0 deletions examples/v2/organizations/UpdateOrgConfig.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
"""
Update a specific Org Config returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.organizations_api import OrganizationsApi
from datadog_api_client.v2.model.org_config_type import OrgConfigType
from datadog_api_client.v2.model.org_config_write import OrgConfigWrite
from datadog_api_client.v2.model.org_config_write_attributes import OrgConfigWriteAttributes
from datadog_api_client.v2.model.org_config_write_request import OrgConfigWriteRequest

body = OrgConfigWriteRequest(
data=OrgConfigWrite(
attributes=OrgConfigWriteAttributes(
value="UTC",
),
type=OrgConfigType.ORG_CONFIGS,
),
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = OrganizationsApi(api_client)
response = api_instance.update_org_config(org_config_name="monitor_timezone", body=body)

print(response)
Loading

0 comments on commit 43c7415

Please sign in to comment.