diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 040612a150..8e30967997 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -42283,6 +42283,74 @@ components: - type - id type: object + ManagedOrgsData: + description: The managed organizations resource. + properties: + id: + description: The UUID of the current organization. + example: "4dee724d-00cc-11ea-a77b-570c9d03c6c5" + format: uuid + type: string + relationships: + $ref: "#/components/schemas/ManagedOrgsRelationships" + type: + $ref: "#/components/schemas/ManagedOrgsType" + required: + - id + - type + - relationships + type: object + ManagedOrgsRelationshipToOrg: + description: Relationship to the current organization. + properties: + data: + $ref: "#/components/schemas/OrgRelationshipData" + required: + - data + type: object + ManagedOrgsRelationshipToOrgs: + description: Relationship to the managed organizations. + properties: + data: + description: List of managed organization references. + items: + $ref: "#/components/schemas/OrgRelationshipData" + type: array + required: + - data + type: object + ManagedOrgsRelationships: + description: Relationships of the managed organizations resource. + properties: + current_org: + $ref: "#/components/schemas/ManagedOrgsRelationshipToOrg" + managed_orgs: + $ref: "#/components/schemas/ManagedOrgsRelationshipToOrgs" + required: + - current_org + - managed_orgs + type: object + ManagedOrgsResponse: + description: Response containing the current organization and its managed organizations. + properties: + data: + $ref: "#/components/schemas/ManagedOrgsData" + included: + description: Included organization resources. + items: + $ref: "#/components/schemas/OrgData" + type: array + required: + - data + - included + type: object + ManagedOrgsType: + description: The resource type for managed organizations. + enum: [managed_orgs] + example: "managed_orgs" + type: string + x-enum-varnames: + - MANAGED_ORGS MemberTeam: description: A member team properties: @@ -50978,6 +51046,53 @@ components: x-enum-varnames: - ASC - DESC + OrgAttributes: + description: Attributes of an organization. + properties: + created_at: + description: The creation timestamp of the organization. + example: "2019-09-26T17:28:28Z" + format: date-time + type: string + description: + description: A description of the organization. + example: "Production organization." + type: string + disabled: + description: Whether the organization is disabled. + example: false + type: boolean + modified_at: + description: The last modification timestamp of the organization. + example: "2024-01-15T10:30:00Z" + format: date-time + type: string + name: + description: The name of the organization. + example: "My Organization" + type: string + public_id: + description: The public identifier of the organization. + example: "abcdef12345" + type: string + sharing: + description: The sharing setting of the organization. + example: "none" + type: string + url: + description: The URL of the organization. + example: "https://app.datadoghq.com/account/my-org" + type: string + required: + - public_id + - name + - description + - sharing + - url + - disabled + - created_at + - modified_at + type: object OrgConfigGetResponse: description: A response with a single Org Config. properties: @@ -51279,6 +51394,23 @@ components: type: string x-enum-varnames: - USERS + OrgData: + description: An organization resource. + properties: + attributes: + $ref: "#/components/schemas/OrgAttributes" + id: + description: The UUID of the organization. + example: "4dee724d-00cc-11ea-a77b-570c9d03c6c5" + format: uuid + type: string + type: + $ref: "#/components/schemas/OrgResourceType" + required: + - id + - type + - attributes + type: object OrgGroupAttributes: description: Attributes of an org group. properties: @@ -52171,6 +52303,27 @@ components: required: - data type: object + OrgRelationshipData: + description: Reference to an organization resource. + properties: + id: + description: The UUID of the organization. + example: "4dee724d-00cc-11ea-a77b-570c9d03c6c5" + format: uuid + type: string + type: + $ref: "#/components/schemas/OrgResourceType" + required: + - id + - type + type: object + OrgResourceType: + description: The resource type for organizations. + enum: [orgs] + example: "orgs" + type: string + x-enum-varnames: + - ORGS Organization: description: Organization object. properties: @@ -62654,23 +62807,19 @@ components: - DONE - TIMEOUT SecurityMonitoringContentPackActivation: - description: The activation status of a content pack. + description: The activation status of a content pack enum: - never_activated - activated - deactivated example: activated type: string - x-enum-descriptions: - - Pack has never been activated for this organization. - - Pack is currently activated. - - Pack was previously activated but has since been deactivated. x-enum-varnames: - NEVER_ACTIVATED - ACTIVATED - DEACTIVATED SecurityMonitoringContentPackIntegrationStatus: - description: The installation status of the related integration. + description: The installation status of the related integration enum: - installed - available @@ -62679,12 +62828,6 @@ components: - error example: installed type: string - x-enum-descriptions: - - Integration is fully installed. - - Integration exists in the catalog but is not installed. - - Integration is only partially configured. - - Integration detected (for example, logs are flowing) but not explicitly installed. - - Integration is in an error state. x-enum-varnames: - INSTALLED - AVAILABLE @@ -62701,9 +62844,7 @@ components: cp_activation: $ref: "#/components/schemas/SecurityMonitoringContentPackActivation" filters_configured_for_logs: - description: |- - Whether filters (Security Filters or Index Query depending on the pricing model) are - present and correctly configured to route logs into Cloud SIEM. + description: Whether filters (Security Filters or Index Query depending on the pricing model) are configured for logs example: true type: boolean integration_installed_status: @@ -62711,7 +62852,7 @@ components: logs_last_collected: $ref: "#/components/schemas/SecurityMonitoringContentPackTimestampBucket" logs_seen_from_any_index: - description: Whether logs for this content pack have been seen in any Datadog index within the last 72 hours. + description: Whether logs have been seen from any index example: true type: boolean state: @@ -62776,7 +62917,7 @@ components: - meta type: object SecurityMonitoringContentPackStatus: - description: The current operational status of a content pack. + description: The current status of a content pack enum: - install - activate @@ -62786,13 +62927,6 @@ components: - broken example: active type: string - x-enum-descriptions: - - Not activated; no logs detected in the last 72 hours. - - Not activated; logs are flowing into a Datadog index but not yet routed through Cloud SIEM. - - Activated; awaiting first log ingestion. - - Activated; logs received within the last 24 hours. - - Activated; integration not installed or logs last seen 24 to 72 hours ago. - - Activated; no logs for over 72 hours, filter missing, or Cloud SIEM index incorrectly ordered. x-enum-varnames: - INSTALL - ACTIVATE @@ -62801,7 +62935,7 @@ components: - WARNING - BROKEN SecurityMonitoringContentPackTimestampBucket: - description: Timestamp bucket indicating when logs were last collected. + description: Timestamp bucket indicating when logs were last collected enum: - not_seen - within_24_hours @@ -62810,12 +62944,6 @@ components: - over_30d example: within_24_hours type: string - x-enum-descriptions: - - No logs observed. - - Logs received within the last 24 hours. - - Logs last seen 24 to 72 hours ago. - - Logs last seen 3 to 30 days ago. - - Logs last seen more than 30 days ago. x-enum-varnames: - NOT_SEEN - WITHIN_24_HOURS @@ -63906,7 +64034,7 @@ components: - $ref: "#/components/schemas/SecurityMonitoringSignalRulePayload" - $ref: "#/components/schemas/CloudConfigurationRulePayload" SecurityMonitoringSKU: - description: The Cloud SIEM pricing model (SKU) for the organization. + description: The SIEM pricing model (SKU) for the organization enum: - per_gb_analyzed - per_event_in_siem_index_2023 @@ -107923,6 +108051,83 @@ paths: operator: OR permissions: - on_call_read + /api/v2/org: + get: + description: Returns the current organization and its managed organizations in JSON:API format. + operationId: ListOrgs + parameters: + - description: Filter managed organizations by name. + example: "My Child Org" + in: query + name: "filter[name]" + required: false + schema: + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + id: "4dee724d-00cc-11ea-a77b-570c9d03c6c5" + relationships: + current_org: + data: + id: "4dee724d-00cc-11ea-a77b-570c9d03c6c5" + type: "orgs" + managed_orgs: + data: + - id: "a1b2c3d4-00cc-11ea-a77b-570c9d03c6c5" + type: "orgs" + type: "managed_orgs" + included: + - attributes: + created_at: "2019-09-26T17:28:28Z" + description: "Production organization." + disabled: false + modified_at: "2024-01-15T10:30:00Z" + name: "My Organization" + public_id: "abcdef12345" + sharing: "none" + url: "https://app.datadoghq.com/account/my-org" + id: "4dee724d-00cc-11ea-a77b-570c9d03c6c5" + type: "orgs" + - attributes: + created_at: "2020-05-10T12:00:00Z" + description: "Child organization." + disabled: false + modified_at: "2024-06-20T08:15:00Z" + name: "My Child Org" + public_id: "ghijkl67890" + sharing: "none" + url: "https://app.datadoghq.com/account/my-child-org" + id: "a1b2c3d4-00cc-11ea-a77b-570c9d03c6c5" + type: "orgs" + schema: + $ref: "#/components/schemas/ManagedOrgsResponse" + description: OK + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - org_management + - org_connections_write + summary: List your managed organizations + tags: + - Organizations + "x-permission": + operator: OR + permissions: + - org_management + - org_connections_write /api/v2/org_configs: get: description: Returns all Org Configs (name, description, and value). @@ -118729,8 +118934,9 @@ paths: /api/v2/security_monitoring/content_packs/states: get: description: |- - Get the activation state, integration status, and log collection status - for all Cloud SIEM content packs. + Get the activation and configuration states for all security monitoring content packs. + This endpoint returns status information about each content pack including activation state, + integration status, and log collection status. operationId: GetContentPacksStates responses: "200": @@ -118753,31 +118959,21 @@ paths: description: Not Found "429": $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - security_monitoring_filters_read summary: Get content pack states tags: - Security Monitoring - "x-permission": - operator: OR - permissions: - - security_monitoring_filters_read - - logs_read_index_data x-unstable: |- **Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/security_monitoring/content_packs/{content_pack_id}/activate: put: description: |- - Activate a Cloud SIEM content pack. This operation configures the necessary + Activate a security monitoring content pack. This operation configures the necessary log filters or security filters depending on the pricing model and updates the content pack activation state. operationId: ActivateContentPack parameters: - - description: The ID of the content pack to activate (for example, `aws-cloudtrail`). + - description: The ID of the content pack to activate. in: path name: content_pack_id required: true @@ -118801,30 +118997,20 @@ paths: description: Not Found "429": $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - security_monitoring_filters_write summary: Activate content pack tags: - Security Monitoring - "x-permission": - operator: OR - permissions: - - security_monitoring_filters_write - - logs_modify_indexes x-unstable: |- **Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/security_monitoring/content_packs/{content_pack_id}/deactivate: put: description: |- - Deactivate a Cloud SIEM content pack. This operation removes the content pack's + Deactivate a security monitoring content pack. This operation removes the content pack's configuration from log filters or security filters and updates the content pack activation state. operationId: DeactivateContentPack parameters: - - description: The ID of the content pack to deactivate (for example, `aws-cloudtrail`). + - description: The ID of the content pack to deactivate. in: path name: content_pack_id required: true @@ -118848,19 +119034,9 @@ paths: description: Not Found "429": $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - security_monitoring_filters_write summary: Deactivate content pack tags: - Security Monitoring - "x-permission": - operator: OR - permissions: - - security_monitoring_filters_write - - logs_modify_indexes x-unstable: |- **Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). @@ -128932,6 +129108,50 @@ paths: permissions: - user_access_manage - service_account_write + /api/v2/users/{user_id}/invitations: + delete: + description: |- + Cancel all pending invitations for a specified user. + Requires the `user_access_invite` permission. + operationId: DeleteUserInvitations + parameters: + - description: The UUID of the user whose pending invitations should be canceled. + in: path + name: user_id + required: true + schema: + example: "4dee724d-00cc-11ea-a77b-570c9d03c6c5" + format: uuid + type: string + responses: + "200": + description: OK + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Authentication error + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Not found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - user_access_invite + summary: Delete a pending user's invitations + tags: + - Users + "x-permission": + operator: OR + permissions: + - user_access_invite /api/v2/users/{user_id}/orgs: get: description: |- diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index e218c6a5b3..c36ba10d1a 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -18253,6 +18253,48 @@ datadog\_api\_client.v2.model.maintenance\_data\_relationships\_status\_page\_da :members: :show-inheritance: +datadog\_api\_client.v2.model.managed\_orgs\_data module +-------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.managed_orgs_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.managed\_orgs\_relationship\_to\_org module +------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.managed_orgs_relationship_to_org + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.managed\_orgs\_relationship\_to\_orgs module +-------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.managed_orgs_relationship_to_orgs + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.managed\_orgs\_relationships module +----------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.managed_orgs_relationships + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.managed\_orgs\_response module +------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.managed_orgs_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.managed\_orgs\_type module +-------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.managed_orgs_type + :members: + :show-inheritance: + datadog\_api\_client.v2.model.member\_team module ------------------------------------------------- @@ -22292,6 +22334,13 @@ datadog\_api\_client.v2.model.order\_direction module :members: :show-inheritance: +datadog\_api\_client.v2.model.org\_attributes module +---------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.org_attributes + :members: + :show-inheritance: + datadog\_api\_client.v2.model.org\_config\_get\_response module --------------------------------------------------------------- @@ -22502,6 +22551,13 @@ datadog\_api\_client.v2.model.org\_connection\_user\_relationship\_data\_type mo :members: :show-inheritance: +datadog\_api\_client.v2.model.org\_data module +---------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.org_data + :members: + :show-inheritance: + datadog\_api\_client.v2.model.org\_group\_attributes module ----------------------------------------------------------- @@ -22985,6 +23041,20 @@ datadog\_api\_client.v2.model.org\_group\_update\_request module :members: :show-inheritance: +datadog\_api\_client.v2.model.org\_relationship\_data module +------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.org_relationship_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.org\_resource\_type module +-------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.org_resource_type + :members: + :show-inheritance: + datadog\_api\_client.v2.model.organization module ------------------------------------------------- diff --git a/examples/v2/organizations/ListOrgs.py b/examples/v2/organizations/ListOrgs.py new file mode 100644 index 0000000000..b1db506461 --- /dev/null +++ b/examples/v2/organizations/ListOrgs.py @@ -0,0 +1,13 @@ +""" +List your managed organizations 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_orgs() + + print(response) diff --git a/examples/v2/users/DeleteUserInvitations.py b/examples/v2/users/DeleteUserInvitations.py new file mode 100644 index 0000000000..fe441dfb5f --- /dev/null +++ b/examples/v2/users/DeleteUserInvitations.py @@ -0,0 +1,14 @@ +""" +Delete a pending user's invitations returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.users_api import UsersApi +from uuid import UUID + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = UsersApi(api_client) + api_instance.delete_user_invitations( + user_id=UUID("4dee724d-00cc-11ea-a77b-570c9d03c6c5"), + ) diff --git a/src/datadog_api_client/v2/api/organizations_api.py b/src/datadog_api_client/v2/api/organizations_api.py index 68d83731f7..7f4ef8c6de 100644 --- a/src/datadog_api_client/v2/api/organizations_api.py +++ b/src/datadog_api_client/v2/api/organizations_api.py @@ -12,6 +12,7 @@ UnsetType, unset, ) +from datadog_api_client.v2.model.managed_orgs_response import ManagedOrgsResponse from datadog_api_client.v2.model.org_config_list_response import OrgConfigListResponse from datadog_api_client.v2.model.org_config_get_response import OrgConfigGetResponse from datadog_api_client.v2.model.org_config_write_request import OrgConfigWriteRequest @@ -66,6 +67,28 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._list_orgs_endpoint = _Endpoint( + settings={ + "response_type": (ManagedOrgsResponse,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/org", + "operation_id": "list_orgs", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "filter_name": { + "openapi_types": (str,), + "attribute": "filter[name]", + "location": "query", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + self._update_org_config_endpoint = _Endpoint( settings={ "response_type": (OrgConfigGetResponse,), @@ -141,6 +164,25 @@ def list_org_configs( kwargs: Dict[str, Any] = {} return self._list_org_configs_endpoint.call_with_http_info(**kwargs) + def list_orgs( + self, + *, + filter_name: Union[str, UnsetType] = unset, + ) -> ManagedOrgsResponse: + """List your managed organizations. + + Returns the current organization and its managed organizations in JSON:API format. + + :param filter_name: Filter managed organizations by name. + :type filter_name: str, optional + :rtype: ManagedOrgsResponse + """ + kwargs: Dict[str, Any] = {} + if filter_name is not unset: + kwargs["filter_name"] = filter_name + + return self._list_orgs_endpoint.call_with_http_info(**kwargs) + def update_org_config( self, org_config_name: str, diff --git a/src/datadog_api_client/v2/api/security_monitoring_api.py b/src/datadog_api_client/v2/api/security_monitoring_api.py index 1ea82d4bcc..fa18b2b9dd 100644 --- a/src/datadog_api_client/v2/api/security_monitoring_api.py +++ b/src/datadog_api_client/v2/api/security_monitoring_api.py @@ -192,7 +192,7 @@ def __init__(self, api_client=None): self._activate_content_pack_endpoint = _Endpoint( settings={ "response_type": None, - "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "auth": ["apiKeyAuth", "appKeyAuth"], "endpoint_path": "/api/v2/security_monitoring/content_packs/{content_pack_id}/activate", "operation_id": "activate_content_pack", "http_method": "PUT", @@ -659,7 +659,7 @@ def __init__(self, api_client=None): self._deactivate_content_pack_endpoint = _Endpoint( settings={ "response_type": None, - "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "auth": ["apiKeyAuth", "appKeyAuth"], "endpoint_path": "/api/v2/security_monitoring/content_packs/{content_pack_id}/deactivate", "operation_id": "deactivate_content_pack", "http_method": "PUT", @@ -1025,7 +1025,7 @@ def __init__(self, api_client=None): self._get_content_packs_states_endpoint = _Endpoint( settings={ "response_type": (SecurityMonitoringContentPackStatesResponse,), - "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "auth": ["apiKeyAuth", "appKeyAuth"], "endpoint_path": "/api/v2/security_monitoring/content_packs/states", "operation_id": "get_content_packs_states", "http_method": "GET", @@ -2993,11 +2993,11 @@ def activate_content_pack( ) -> None: """Activate content pack. - Activate a Cloud SIEM content pack. This operation configures the necessary + Activate a security monitoring content pack. This operation configures the necessary log filters or security filters depending on the pricing model and updates the content pack activation state. - :param content_pack_id: The ID of the content pack to activate (for example, ``aws-cloudtrail`` ). + :param content_pack_id: The ID of the content pack to activate. :type content_pack_id: str :rtype: None """ @@ -3417,10 +3417,10 @@ def deactivate_content_pack( ) -> None: """Deactivate content pack. - Deactivate a Cloud SIEM content pack. This operation removes the content pack's + Deactivate a security monitoring content pack. This operation removes the content pack's configuration from log filters or security filters and updates the content pack activation state. - :param content_pack_id: The ID of the content pack to deactivate (for example, ``aws-cloudtrail`` ). + :param content_pack_id: The ID of the content pack to deactivate. :type content_pack_id: str :rtype: None """ @@ -3704,8 +3704,9 @@ def get_content_packs_states( ) -> SecurityMonitoringContentPackStatesResponse: """Get content pack states. - Get the activation state, integration status, and log collection status - for all Cloud SIEM content packs. + Get the activation and configuration states for all security monitoring content packs. + This endpoint returns status information about each content pack including activation state, + integration status, and log collection status. :rtype: SecurityMonitoringContentPackStatesResponse """ diff --git a/src/datadog_api_client/v2/api/users_api.py b/src/datadog_api_client/v2/api/users_api.py index 7f08f1aa8e..b815c2527a 100644 --- a/src/datadog_api_client/v2/api/users_api.py +++ b/src/datadog_api_client/v2/api/users_api.py @@ -13,6 +13,7 @@ get_attribute_from_path, UnsetType, unset, + UUID, ) from datadog_api_client.v2.model.user_invitations_response import UserInvitationsResponse from datadog_api_client.v2.model.user_invitations_request import UserInvitationsRequest @@ -56,6 +57,29 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._delete_user_invitations_endpoint = _Endpoint( + settings={ + "response_type": None, + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/users/{user_id}/invitations", + "operation_id": "delete_user_invitations", + "http_method": "DELETE", + "version": "v2", + }, + params_map={ + "user_id": { + "required": True, + "openapi_types": (UUID,), + "attribute": "user_id", + "location": "path", + }, + }, + headers_map={ + "accept": ["*/*"], + }, + api_client=api_client, + ) + self._disable_user_endpoint = _Endpoint( settings={ "response_type": None, @@ -280,6 +304,24 @@ def create_user( return self._create_user_endpoint.call_with_http_info(**kwargs) + def delete_user_invitations( + self, + user_id: UUID, + ) -> None: + """Delete a pending user's invitations. + + Cancel all pending invitations for a specified user. + Requires the ``user_access_invite`` permission. + + :param user_id: The UUID of the user whose pending invitations should be canceled. + :type user_id: UUID + :rtype: None + """ + kwargs: Dict[str, Any] = {} + kwargs["user_id"] = user_id + + return self._delete_user_invitations_endpoint.call_with_http_info(**kwargs) + def disable_user( self, user_id: str, diff --git a/src/datadog_api_client/v2/model/managed_orgs_data.py b/src/datadog_api_client/v2/model/managed_orgs_data.py new file mode 100644 index 0000000000..edc0c70be2 --- /dev/null +++ b/src/datadog_api_client/v2/model/managed_orgs_data.py @@ -0,0 +1,55 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + UUID, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.managed_orgs_relationships import ManagedOrgsRelationships + from datadog_api_client.v2.model.managed_orgs_type import ManagedOrgsType + + +class ManagedOrgsData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.managed_orgs_relationships import ManagedOrgsRelationships + from datadog_api_client.v2.model.managed_orgs_type import ManagedOrgsType + + return { + "id": (UUID,), + "relationships": (ManagedOrgsRelationships,), + "type": (ManagedOrgsType,), + } + + attribute_map = { + "id": "id", + "relationships": "relationships", + "type": "type", + } + + def __init__(self_, id: UUID, relationships: ManagedOrgsRelationships, type: ManagedOrgsType, **kwargs): + """ + The managed organizations resource. + + :param id: The UUID of the current organization. + :type id: UUID + + :param relationships: Relationships of the managed organizations resource. + :type relationships: ManagedOrgsRelationships + + :param type: The resource type for managed organizations. + :type type: ManagedOrgsType + """ + super().__init__(kwargs) + + self_.id = id + self_.relationships = relationships + self_.type = type diff --git a/src/datadog_api_client/v2/model/managed_orgs_relationship_to_org.py b/src/datadog_api_client/v2/model/managed_orgs_relationship_to_org.py new file mode 100644 index 0000000000..4fca6becd4 --- /dev/null +++ b/src/datadog_api_client/v2/model/managed_orgs_relationship_to_org.py @@ -0,0 +1,40 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.org_relationship_data import OrgRelationshipData + + +class ManagedOrgsRelationshipToOrg(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.org_relationship_data import OrgRelationshipData + + return { + "data": (OrgRelationshipData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: OrgRelationshipData, **kwargs): + """ + Relationship to the current organization. + + :param data: Reference to an organization resource. + :type data: OrgRelationshipData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/managed_orgs_relationship_to_orgs.py b/src/datadog_api_client/v2/model/managed_orgs_relationship_to_orgs.py new file mode 100644 index 0000000000..90c3187e8b --- /dev/null +++ b/src/datadog_api_client/v2/model/managed_orgs_relationship_to_orgs.py @@ -0,0 +1,40 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.org_relationship_data import OrgRelationshipData + + +class ManagedOrgsRelationshipToOrgs(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.org_relationship_data import OrgRelationshipData + + return { + "data": ([OrgRelationshipData],), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: List[OrgRelationshipData], **kwargs): + """ + Relationship to the managed organizations. + + :param data: List of managed organization references. + :type data: [OrgRelationshipData] + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/managed_orgs_relationships.py b/src/datadog_api_client/v2/model/managed_orgs_relationships.py new file mode 100644 index 0000000000..6a25bfdbf4 --- /dev/null +++ b/src/datadog_api_client/v2/model/managed_orgs_relationships.py @@ -0,0 +1,50 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.managed_orgs_relationship_to_org import ManagedOrgsRelationshipToOrg + from datadog_api_client.v2.model.managed_orgs_relationship_to_orgs import ManagedOrgsRelationshipToOrgs + + +class ManagedOrgsRelationships(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.managed_orgs_relationship_to_org import ManagedOrgsRelationshipToOrg + from datadog_api_client.v2.model.managed_orgs_relationship_to_orgs import ManagedOrgsRelationshipToOrgs + + return { + "current_org": (ManagedOrgsRelationshipToOrg,), + "managed_orgs": (ManagedOrgsRelationshipToOrgs,), + } + + attribute_map = { + "current_org": "current_org", + "managed_orgs": "managed_orgs", + } + + def __init__( + self_, current_org: ManagedOrgsRelationshipToOrg, managed_orgs: ManagedOrgsRelationshipToOrgs, **kwargs + ): + """ + Relationships of the managed organizations resource. + + :param current_org: Relationship to the current organization. + :type current_org: ManagedOrgsRelationshipToOrg + + :param managed_orgs: Relationship to the managed organizations. + :type managed_orgs: ManagedOrgsRelationshipToOrgs + """ + super().__init__(kwargs) + + self_.current_org = current_org + self_.managed_orgs = managed_orgs diff --git a/src/datadog_api_client/v2/model/managed_orgs_response.py b/src/datadog_api_client/v2/model/managed_orgs_response.py new file mode 100644 index 0000000000..71578e288f --- /dev/null +++ b/src/datadog_api_client/v2/model/managed_orgs_response.py @@ -0,0 +1,48 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.managed_orgs_data import ManagedOrgsData + from datadog_api_client.v2.model.org_data import OrgData + + +class ManagedOrgsResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.managed_orgs_data import ManagedOrgsData + from datadog_api_client.v2.model.org_data import OrgData + + return { + "data": (ManagedOrgsData,), + "included": ([OrgData],), + } + + attribute_map = { + "data": "data", + "included": "included", + } + + def __init__(self_, data: ManagedOrgsData, included: List[OrgData], **kwargs): + """ + Response containing the current organization and its managed organizations. + + :param data: The managed organizations resource. + :type data: ManagedOrgsData + + :param included: Included organization resources. + :type included: [OrgData] + """ + super().__init__(kwargs) + + self_.data = data + self_.included = included diff --git a/src/datadog_api_client/v2/model/managed_orgs_type.py b/src/datadog_api_client/v2/model/managed_orgs_type.py new file mode 100644 index 0000000000..1416c7cb0f --- /dev/null +++ b/src/datadog_api_client/v2/model/managed_orgs_type.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ManagedOrgsType(ModelSimple): + """ + The resource type for managed organizations. + + :param value: If omitted defaults to "managed_orgs". Must be one of ["managed_orgs"]. + :type value: str + """ + + allowed_values = { + "managed_orgs", + } + MANAGED_ORGS: ClassVar["ManagedOrgsType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ManagedOrgsType.MANAGED_ORGS = ManagedOrgsType("managed_orgs") diff --git a/src/datadog_api_client/v2/model/org_attributes.py b/src/datadog_api_client/v2/model/org_attributes.py new file mode 100644 index 0000000000..7780253859 --- /dev/null +++ b/src/datadog_api_client/v2/model/org_attributes.py @@ -0,0 +1,87 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + datetime, +) + + +class OrgAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "created_at": (datetime,), + "description": (str,), + "disabled": (bool,), + "modified_at": (datetime,), + "name": (str,), + "public_id": (str,), + "sharing": (str,), + "url": (str,), + } + + attribute_map = { + "created_at": "created_at", + "description": "description", + "disabled": "disabled", + "modified_at": "modified_at", + "name": "name", + "public_id": "public_id", + "sharing": "sharing", + "url": "url", + } + + def __init__( + self_, + created_at: datetime, + description: str, + disabled: bool, + modified_at: datetime, + name: str, + public_id: str, + sharing: str, + url: str, + **kwargs, + ): + """ + Attributes of an organization. + + :param created_at: The creation timestamp of the organization. + :type created_at: datetime + + :param description: A description of the organization. + :type description: str + + :param disabled: Whether the organization is disabled. + :type disabled: bool + + :param modified_at: The last modification timestamp of the organization. + :type modified_at: datetime + + :param name: The name of the organization. + :type name: str + + :param public_id: The public identifier of the organization. + :type public_id: str + + :param sharing: The sharing setting of the organization. + :type sharing: str + + :param url: The URL of the organization. + :type url: str + """ + super().__init__(kwargs) + + self_.created_at = created_at + self_.description = description + self_.disabled = disabled + self_.modified_at = modified_at + self_.name = name + self_.public_id = public_id + self_.sharing = sharing + self_.url = url diff --git a/src/datadog_api_client/v2/model/org_data.py b/src/datadog_api_client/v2/model/org_data.py new file mode 100644 index 0000000000..eb9eb6d22f --- /dev/null +++ b/src/datadog_api_client/v2/model/org_data.py @@ -0,0 +1,55 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + UUID, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.org_attributes import OrgAttributes + from datadog_api_client.v2.model.org_resource_type import OrgResourceType + + +class OrgData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.org_attributes import OrgAttributes + from datadog_api_client.v2.model.org_resource_type import OrgResourceType + + return { + "attributes": (OrgAttributes,), + "id": (UUID,), + "type": (OrgResourceType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__(self_, attributes: OrgAttributes, id: UUID, type: OrgResourceType, **kwargs): + """ + An organization resource. + + :param attributes: Attributes of an organization. + :type attributes: OrgAttributes + + :param id: The UUID of the organization. + :type id: UUID + + :param type: The resource type for organizations. + :type type: OrgResourceType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/org_relationship_data.py b/src/datadog_api_client/v2/model/org_relationship_data.py new file mode 100644 index 0000000000..772190899e --- /dev/null +++ b/src/datadog_api_client/v2/model/org_relationship_data.py @@ -0,0 +1,47 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + UUID, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.org_resource_type import OrgResourceType + + +class OrgRelationshipData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.org_resource_type import OrgResourceType + + return { + "id": (UUID,), + "type": (OrgResourceType,), + } + + attribute_map = { + "id": "id", + "type": "type", + } + + def __init__(self_, id: UUID, type: OrgResourceType, **kwargs): + """ + Reference to an organization resource. + + :param id: The UUID of the organization. + :type id: UUID + + :param type: The resource type for organizations. + :type type: OrgResourceType + """ + super().__init__(kwargs) + + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/org_resource_type.py b/src/datadog_api_client/v2/model/org_resource_type.py new file mode 100644 index 0000000000..e4d8c37c99 --- /dev/null +++ b/src/datadog_api_client/v2/model/org_resource_type.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class OrgResourceType(ModelSimple): + """ + The resource type for organizations. + + :param value: If omitted defaults to "orgs". Must be one of ["orgs"]. + :type value: str + """ + + allowed_values = { + "orgs", + } + ORGS: ClassVar["OrgResourceType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +OrgResourceType.ORGS = OrgResourceType("orgs") diff --git a/src/datadog_api_client/v2/model/security_monitoring_content_pack_activation.py b/src/datadog_api_client/v2/model/security_monitoring_content_pack_activation.py index d6fd274f87..735b621113 100644 --- a/src/datadog_api_client/v2/model/security_monitoring_content_pack_activation.py +++ b/src/datadog_api_client/v2/model/security_monitoring_content_pack_activation.py @@ -14,7 +14,7 @@ class SecurityMonitoringContentPackActivation(ModelSimple): """ - The activation status of a content pack. + The activation status of a content pack :param value: Must be one of ["never_activated", "activated", "deactivated"]. :type value: str diff --git a/src/datadog_api_client/v2/model/security_monitoring_content_pack_integration_status.py b/src/datadog_api_client/v2/model/security_monitoring_content_pack_integration_status.py index 67490be7f2..50ce284b88 100644 --- a/src/datadog_api_client/v2/model/security_monitoring_content_pack_integration_status.py +++ b/src/datadog_api_client/v2/model/security_monitoring_content_pack_integration_status.py @@ -14,7 +14,7 @@ class SecurityMonitoringContentPackIntegrationStatus(ModelSimple): """ - The installation status of the related integration. + The installation status of the related integration :param value: Must be one of ["installed", "available", "partially_installed", "detected", "error"]. :type value: str diff --git a/src/datadog_api_client/v2/model/security_monitoring_content_pack_state_attributes.py b/src/datadog_api_client/v2/model/security_monitoring_content_pack_state_attributes.py index 4f9946a2d3..ed09ca55db 100644 --- a/src/datadog_api_client/v2/model/security_monitoring_content_pack_state_attributes.py +++ b/src/datadog_api_client/v2/model/security_monitoring_content_pack_state_attributes.py @@ -79,23 +79,22 @@ def __init__( :param cloud_siem_index_incorrect: Whether the cloud SIEM index configuration is incorrect (only applies to certain pricing models) :type cloud_siem_index_incorrect: bool - :param cp_activation: The activation status of a content pack. + :param cp_activation: The activation status of a content pack :type cp_activation: SecurityMonitoringContentPackActivation - :param filters_configured_for_logs: Whether filters (Security Filters or Index Query depending on the pricing model) are - present and correctly configured to route logs into Cloud SIEM. + :param filters_configured_for_logs: Whether filters (Security Filters or Index Query depending on the pricing model) are configured for logs :type filters_configured_for_logs: bool - :param integration_installed_status: The installation status of the related integration. + :param integration_installed_status: The installation status of the related integration :type integration_installed_status: SecurityMonitoringContentPackIntegrationStatus, optional - :param logs_last_collected: Timestamp bucket indicating when logs were last collected. + :param logs_last_collected: Timestamp bucket indicating when logs were last collected :type logs_last_collected: SecurityMonitoringContentPackTimestampBucket - :param logs_seen_from_any_index: Whether logs for this content pack have been seen in any Datadog index within the last 72 hours. + :param logs_seen_from_any_index: Whether logs have been seen from any index :type logs_seen_from_any_index: bool - :param state: The current operational status of a content pack. + :param state: The current status of a content pack :type state: SecurityMonitoringContentPackStatus """ if integration_installed_status is not unset: diff --git a/src/datadog_api_client/v2/model/security_monitoring_content_pack_state_meta.py b/src/datadog_api_client/v2/model/security_monitoring_content_pack_state_meta.py index 4f37a6b107..3b9aac7ffc 100644 --- a/src/datadog_api_client/v2/model/security_monitoring_content_pack_state_meta.py +++ b/src/datadog_api_client/v2/model/security_monitoring_content_pack_state_meta.py @@ -37,7 +37,7 @@ def __init__(self_, cloud_siem_index_incorrect: bool, sku: SecurityMonitoringSKU :param cloud_siem_index_incorrect: Whether the cloud SIEM index configuration is incorrect at the organization level :type cloud_siem_index_incorrect: bool - :param sku: The Cloud SIEM pricing model (SKU) for the organization. + :param sku: The SIEM pricing model (SKU) for the organization :type sku: SecurityMonitoringSKU """ super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/security_monitoring_content_pack_status.py b/src/datadog_api_client/v2/model/security_monitoring_content_pack_status.py index efdcbe2da7..a8f83bec1d 100644 --- a/src/datadog_api_client/v2/model/security_monitoring_content_pack_status.py +++ b/src/datadog_api_client/v2/model/security_monitoring_content_pack_status.py @@ -14,7 +14,7 @@ class SecurityMonitoringContentPackStatus(ModelSimple): """ - The current operational status of a content pack. + The current status of a content pack :param value: Must be one of ["install", "activate", "initializing", "active", "warning", "broken"]. :type value: str diff --git a/src/datadog_api_client/v2/model/security_monitoring_content_pack_timestamp_bucket.py b/src/datadog_api_client/v2/model/security_monitoring_content_pack_timestamp_bucket.py index cfec617fb5..672ce48dcd 100644 --- a/src/datadog_api_client/v2/model/security_monitoring_content_pack_timestamp_bucket.py +++ b/src/datadog_api_client/v2/model/security_monitoring_content_pack_timestamp_bucket.py @@ -14,7 +14,7 @@ class SecurityMonitoringContentPackTimestampBucket(ModelSimple): """ - Timestamp bucket indicating when logs were last collected. + Timestamp bucket indicating when logs were last collected :param value: Must be one of ["not_seen", "within_24_hours", "within_24_to_72_hours", "over_72h_to_30d", "over_30d"]. :type value: str diff --git a/src/datadog_api_client/v2/model/security_monitoring_sku.py b/src/datadog_api_client/v2/model/security_monitoring_sku.py index 4abab4f991..82a8815a64 100644 --- a/src/datadog_api_client/v2/model/security_monitoring_sku.py +++ b/src/datadog_api_client/v2/model/security_monitoring_sku.py @@ -14,7 +14,7 @@ class SecurityMonitoringSKU(ModelSimple): """ - The Cloud SIEM pricing model (SKU) for the organization. + The SIEM pricing model (SKU) for the organization :param value: Must be one of ["per_gb_analyzed", "per_event_in_siem_index_2023", "add_on_2024"]. :type value: str diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index aff201a663..7a527bd60b 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -3444,6 +3444,12 @@ from datadog_api_client.v2.model.maintenance_data_relationships_status_page_data import ( MaintenanceDataRelationshipsStatusPageData, ) +from datadog_api_client.v2.model.managed_orgs_data import ManagedOrgsData +from datadog_api_client.v2.model.managed_orgs_relationship_to_org import ManagedOrgsRelationshipToOrg +from datadog_api_client.v2.model.managed_orgs_relationship_to_orgs import ManagedOrgsRelationshipToOrgs +from datadog_api_client.v2.model.managed_orgs_relationships import ManagedOrgsRelationships +from datadog_api_client.v2.model.managed_orgs_response import ManagedOrgsResponse +from datadog_api_client.v2.model.managed_orgs_type import ManagedOrgsType from datadog_api_client.v2.model.member_team import MemberTeam from datadog_api_client.v2.model.member_team_type import MemberTeamType from datadog_api_client.v2.model.metadata import Metadata @@ -4612,6 +4618,7 @@ from datadog_api_client.v2.model.opsgenie_service_update_request import OpsgenieServiceUpdateRequest from datadog_api_client.v2.model.opsgenie_services_response import OpsgenieServicesResponse from datadog_api_client.v2.model.order_direction import OrderDirection +from datadog_api_client.v2.model.org_attributes import OrgAttributes from datadog_api_client.v2.model.org_config_get_response import OrgConfigGetResponse from datadog_api_client.v2.model.org_config_list_response import OrgConfigListResponse from datadog_api_client.v2.model.org_config_read import OrgConfigRead @@ -4642,6 +4649,7 @@ from datadog_api_client.v2.model.org_connection_user_relationship import OrgConnectionUserRelationship from datadog_api_client.v2.model.org_connection_user_relationship_data import OrgConnectionUserRelationshipData from datadog_api_client.v2.model.org_connection_user_relationship_data_type import OrgConnectionUserRelationshipDataType +from datadog_api_client.v2.model.org_data import OrgData from datadog_api_client.v2.model.org_group_attributes import OrgGroupAttributes from datadog_api_client.v2.model.org_group_create_attributes import OrgGroupCreateAttributes from datadog_api_client.v2.model.org_group_create_data import OrgGroupCreateData @@ -4721,6 +4729,8 @@ from datadog_api_client.v2.model.org_group_update_attributes import OrgGroupUpdateAttributes from datadog_api_client.v2.model.org_group_update_data import OrgGroupUpdateData from datadog_api_client.v2.model.org_group_update_request import OrgGroupUpdateRequest +from datadog_api_client.v2.model.org_relationship_data import OrgRelationshipData +from datadog_api_client.v2.model.org_resource_type import OrgResourceType from datadog_api_client.v2.model.organization import Organization from datadog_api_client.v2.model.organization_attributes import OrganizationAttributes from datadog_api_client.v2.model.organizations_type import OrganizationsType @@ -9897,6 +9907,12 @@ "MaintenanceDataRelationshipsLastModifiedByUserData", "MaintenanceDataRelationshipsStatusPage", "MaintenanceDataRelationshipsStatusPageData", + "ManagedOrgsData", + "ManagedOrgsRelationshipToOrg", + "ManagedOrgsRelationshipToOrgs", + "ManagedOrgsRelationships", + "ManagedOrgsResponse", + "ManagedOrgsType", "MemberTeam", "MemberTeamType", "Metadata", @@ -10473,6 +10489,7 @@ "OpsgenieServiceUpdateRequest", "OpsgenieServicesResponse", "OrderDirection", + "OrgAttributes", "OrgConfigGetResponse", "OrgConfigListResponse", "OrgConfigRead", @@ -10503,6 +10520,7 @@ "OrgConnectionUserRelationship", "OrgConnectionUserRelationshipData", "OrgConnectionUserRelationshipDataType", + "OrgData", "OrgGroupAttributes", "OrgGroupCreateAttributes", "OrgGroupCreateData", @@ -10572,6 +10590,8 @@ "OrgGroupUpdateAttributes", "OrgGroupUpdateData", "OrgGroupUpdateRequest", + "OrgRelationshipData", + "OrgResourceType", "Organization", "OrganizationAttributes", "OrganizationsType", diff --git a/tests/v2/features/organizations.feature b/tests/v2/features/organizations.feature index 45e56056c2..d50c9a305d 100644 --- a/tests/v2/features/organizations.feature +++ b/tests/v2/features/organizations.feature @@ -41,6 +41,12 @@ Feature: Organizations When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/org-management + Scenario: List your managed organizations returns "OK" response + Given new "ListOrgs" request + When the request is sent + Then the response status is 200 OK + @team:DataDog/org-management Scenario: Update a specific Org Config returns "Bad Request" response Given new "UpdateOrgConfig" request diff --git a/tests/v2/features/undo.json b/tests/v2/features/undo.json index 31f26b9109..c154e02a9a 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -4125,6 +4125,12 @@ "type": "safe" } }, + "ListOrgs": { + "tag": "Organizations", + "undo": { + "type": "safe" + } + }, "ListOrgConfigs": { "tag": "Organizations", "undo": { @@ -6963,6 +6969,12 @@ "type": "idempotent" } }, + "DeleteUserInvitations": { + "tag": "Users", + "undo": { + "type": "safe" + } + }, "ListUserOrganizations": { "tag": "Users", "undo": { diff --git a/tests/v2/features/users.feature b/tests/v2/features/users.feature index f64d3b8946..6e4f65eb57 100644 --- a/tests/v2/features/users.feature +++ b/tests/v2/features/users.feature @@ -25,6 +25,20 @@ Feature: Users And the response "data.attributes.disabled" is false And the response "data.attributes.service_account" is false + @generated @skip @team:DataDog/org-management + Scenario: Delete a pending user's invitations returns "Not found" response + Given new "DeleteUserInvitations" request + And request contains "user_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not found + + @generated @skip @team:DataDog/org-management + Scenario: Delete a pending user's invitations returns "OK" response + Given new "DeleteUserInvitations" request + And request contains "user_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/org-management Scenario: Disable a user returns "Not found" response Given new "DisableUser" request