Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3,075 changes: 431 additions & 2,644 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

629 changes: 52 additions & 577 deletions docs/datadog_api_client.v2.model.rst

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/v2/org-groups/BulkUpdateOrgGroupMemberships.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
attributes=OrgGroupMembershipBulkUpdateAttributes(
orgs=[
GlobalOrgIdentifier(
org_site="datadoghq.com",
org_site="us1",
org_uuid=UUID("c3d4e5f6-a7b8-9012-cdef-012345678901"),
),
],
Expand Down
4 changes: 4 additions & 0 deletions examples/v2/org-groups/CreateOrgGroupPolicy.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
from datadog_api_client.v2.model.org_group_policy_create_data import OrgGroupPolicyCreateData
from datadog_api_client.v2.model.org_group_policy_create_relationships import OrgGroupPolicyCreateRelationships
from datadog_api_client.v2.model.org_group_policy_create_request import OrgGroupPolicyCreateRequest
from datadog_api_client.v2.model.org_group_policy_enforcement_tier import OrgGroupPolicyEnforcementTier
from datadog_api_client.v2.model.org_group_policy_policy_type import OrgGroupPolicyPolicyType
from datadog_api_client.v2.model.org_group_policy_type import OrgGroupPolicyType
from datadog_api_client.v2.model.org_group_relationship_to_one import OrgGroupRelationshipToOne
from datadog_api_client.v2.model.org_group_relationship_to_one_data import OrgGroupRelationshipToOneData
Expand All @@ -18,7 +20,9 @@
data=OrgGroupPolicyCreateData(
attributes=OrgGroupPolicyCreateAttributes(
content=dict([("value", "UTC")]),
enforcement_tier=OrgGroupPolicyEnforcementTier.DEFAULT,
policy_name="monitor_timezone",
policy_type=OrgGroupPolicyPolicyType.ORG_CONFIG,
),
relationships=OrgGroupPolicyCreateRelationships(
org_group=OrgGroupRelationshipToOne(
Expand Down
2 changes: 1 addition & 1 deletion examples/v2/org-groups/CreateOrgGroupPolicyOverride.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
body = OrgGroupPolicyOverrideCreateRequest(
data=OrgGroupPolicyOverrideCreateData(
attributes=OrgGroupPolicyOverrideCreateAttributes(
org_site="datadoghq.com",
org_site="us1",
org_uuid=UUID("c3d4e5f6-a7b8-9012-cdef-012345678901"),
),
relationships=OrgGroupPolicyOverrideCreateRelationships(
Expand Down
17 changes: 17 additions & 0 deletions examples/v2/org-groups/GetOrgGroupPolicy.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
"""
Get an org group policy returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.org_groups_api import OrgGroupsApi
from uuid import UUID

configuration = Configuration()
configuration.unstable_operations["get_org_group_policy"] = True
with ApiClient(configuration) as api_client:
api_instance = OrgGroupsApi(api_client)
response = api_instance.get_org_group_policy(
org_group_policy_id=UUID("1a2b3c4d-5e6f-7890-abcd-ef0123456789"),
)

print(response)
17 changes: 17 additions & 0 deletions examples/v2/org-groups/GetOrgGroupPolicyOverride.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
"""
Get an org group policy override returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.org_groups_api import OrgGroupsApi
from uuid import UUID

configuration = Configuration()
configuration.unstable_operations["get_org_group_policy_override"] = True
with ApiClient(configuration) as api_client:
api_instance = OrgGroupsApi(api_client)
response = api_instance.get_org_group_policy_override(
org_group_policy_override_id=UUID("9f8e7d6c-5b4a-3210-fedc-ba0987654321"),
)

print(response)
2 changes: 2 additions & 0 deletions examples/v2/org-groups/UpdateOrgGroupPolicy.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.org_groups_api import OrgGroupsApi
from datadog_api_client.v2.model.org_group_policy_enforcement_tier import OrgGroupPolicyEnforcementTier
from datadog_api_client.v2.model.org_group_policy_type import OrgGroupPolicyType
from datadog_api_client.v2.model.org_group_policy_update_attributes import OrgGroupPolicyUpdateAttributes
from datadog_api_client.v2.model.org_group_policy_update_data import OrgGroupPolicyUpdateData
Expand All @@ -14,6 +15,7 @@
data=OrgGroupPolicyUpdateData(
attributes=OrgGroupPolicyUpdateAttributes(
content=dict([("value", "UTC")]),
enforcement_tier=OrgGroupPolicyEnforcementTier.DEFAULT,
),
id=UUID("1a2b3c4d-5e6f-7890-abcd-ef0123456789"),
type=OrgGroupPolicyType.ORG_GROUP_POLICIES,
Expand Down
2 changes: 1 addition & 1 deletion examples/v2/org-groups/UpdateOrgGroupPolicyOverride.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
body = OrgGroupPolicyOverrideUpdateRequest(
data=OrgGroupPolicyOverrideUpdateData(
attributes=OrgGroupPolicyOverrideUpdateAttributes(
org_site="datadoghq.com",
org_site="us1",
org_uuid=UUID("c3d4e5f6-a7b8-9012-cdef-012345678901"),
),
id=UUID("9f8e7d6c-5b4a-3210-fedc-ba0987654321"),
Expand Down
16 changes: 0 additions & 16 deletions examples/v2/synthetics/GetSyntheticsBrowserTestResult.py

This file was deleted.

16 changes: 0 additions & 16 deletions examples/v2/synthetics/GetSyntheticsTestResult.py

This file was deleted.

This file was deleted.

15 changes: 0 additions & 15 deletions examples/v2/synthetics/ListSyntheticsTestLatestResults.py

This file was deleted.

15 changes: 0 additions & 15 deletions examples/v2/synthetics/PollSyntheticsTestResults.py

This file was deleted.

2 changes: 2 additions & 0 deletions src/datadog_api_client/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,8 @@ def __init__(
"v2.delete_org_group_policy_override": False,
"v2.get_org_group": False,
"v2.get_org_group_membership": False,
"v2.get_org_group_policy": False,
"v2.get_org_group_policy_override": False,
"v2.list_org_group_memberships": False,
"v2.list_org_group_policies": False,
"v2.list_org_group_policy_configs": False,
Expand Down
82 changes: 81 additions & 1 deletion src/datadog_api_client/v2/api/org_groups_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,52 @@ def __init__(self, api_client=None):
api_client=api_client,
)

self._get_org_group_policy_endpoint = _Endpoint(
settings={
"response_type": (OrgGroupPolicyResponse,),
"auth": ["apiKeyAuth", "appKeyAuth"],
"endpoint_path": "/api/v2/org_group_policies/{org_group_policy_id}",
"operation_id": "get_org_group_policy",
"http_method": "GET",
"version": "v2",
},
params_map={
"org_group_policy_id": {
"required": True,
"openapi_types": (UUID,),
"attribute": "org_group_policy_id",
"location": "path",
},
},
headers_map={
"accept": ["application/json"],
},
api_client=api_client,
)

self._get_org_group_policy_override_endpoint = _Endpoint(
settings={
"response_type": (OrgGroupPolicyOverrideResponse,),
"auth": ["apiKeyAuth", "appKeyAuth"],
"endpoint_path": "/api/v2/org_group_policy_overrides/{org_group_policy_override_id}",
"operation_id": "get_org_group_policy_override",
"http_method": "GET",
"version": "v2",
},
params_map={
"org_group_policy_override_id": {
"required": True,
"openapi_types": (UUID,),
"attribute": "org_group_policy_override_id",
"location": "path",
},
},
headers_map={
"accept": ["application/json"],
},
api_client=api_client,
)

self._list_org_group_memberships_endpoint = _Endpoint(
settings={
"response_type": (OrgGroupMembershipListResponse,),
Expand Down Expand Up @@ -704,6 +750,40 @@ def get_org_group_membership(

return self._get_org_group_membership_endpoint.call_with_http_info(**kwargs)

def get_org_group_policy(
self,
org_group_policy_id: UUID,
) -> OrgGroupPolicyResponse:
"""Get an org group policy.

Get a specific organization group policy by its ID.

:param org_group_policy_id: The ID of the org group policy.
:type org_group_policy_id: UUID
:rtype: OrgGroupPolicyResponse
"""
kwargs: Dict[str, Any] = {}
kwargs["org_group_policy_id"] = org_group_policy_id

return self._get_org_group_policy_endpoint.call_with_http_info(**kwargs)

def get_org_group_policy_override(
self,
org_group_policy_override_id: UUID,
) -> OrgGroupPolicyOverrideResponse:
"""Get an org group policy override.

Get a specific organization group policy override by its ID.

:param org_group_policy_override_id: The ID of the org group policy override.
:type org_group_policy_override_id: UUID
:rtype: OrgGroupPolicyOverrideResponse
"""
kwargs: Dict[str, Any] = {}
kwargs["org_group_policy_override_id"] = org_group_policy_override_id

return self._get_org_group_policy_override_endpoint.call_with_http_info(**kwargs)

def list_org_group_memberships(
self,
*,
Expand Down Expand Up @@ -929,7 +1009,7 @@ def update_org_group_policy(
) -> OrgGroupPolicyResponse:
"""Update an org group policy.

Update the content of an existing organization group policy.
Update an existing organization group policy.

:param org_group_policy_id: The ID of the org group policy.
:type org_group_policy_id: UUID
Expand Down
Loading
Loading