From 988dc82a64ddecb968bda5cd180e4b7bfe8b9980 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Wed, 22 Apr 2026 18:43:01 +0000 Subject: [PATCH] Regenerate client from commit ce99df3 of spec repo --- .generator/schemas/v2/openapi.yaml | 530 +++++++++++------- docs/datadog_api_client.v2.model.rst | 84 ++- .../key-management/GetPersonalAccessToken.py | 2 +- .../RevokePersonalAccessToken.py | 2 +- .../UpdatePersonalAccessToken.py | 2 +- .../BulkUpdateOrgGroupMemberships.py | 2 +- .../v2/org-groups/CreateOrgGroupPolicy.py | 4 - .../CreateOrgGroupPolicyOverride.py | 2 +- examples/v2/org-groups/GetOrgGroupPolicy.py | 17 - .../org-groups/GetOrgGroupPolicyOverride.py | 17 - .../v2/org-groups/UpdateOrgGroupPolicy.py | 2 - .../UpdateOrgGroupPolicyOverride.py | 2 +- examples/v2/organizations/ListOrgs.py | 13 + .../GetServiceAccountAccessToken.py | 2 +- .../RevokeServiceAccountAccessToken.py | 2 +- .../UpdateServiceAccountAccessToken.py | 2 +- examples/v2/users/DeleteUserInvitations.py | 14 + src/datadog_api_client/configuration.py | 2 - .../v2/api/key_management_api.py | 42 +- .../v2/api/org_groups_api.py | 82 +-- .../v2/api/organizations_api.py | 42 ++ .../v2/api/service_accounts_api.py | 42 +- src/datadog_api_client/v2/api/users_api.py | 42 ++ .../full_personal_access_token_attributes.py | 9 + .../v2/model/managed_orgs_data.py | 55 ++ .../model/managed_orgs_relationship_to_org.py | 40 ++ .../managed_orgs_relationship_to_orgs.py | 40 ++ .../v2/model/managed_orgs_relationships.py | 50 ++ .../v2/model/managed_orgs_response.py | 48 ++ ...cy_policy_type.py => managed_orgs_type.py} | 12 +- .../v2/model/org_attributes.py | 87 +++ src/datadog_api_client/v2/model/org_data.py | 55 ++ .../v2/model/org_group_policy_attributes.py | 29 +- .../org_group_policy_create_attributes.py | 37 +- .../v2/model/org_group_policy_create_data.py | 2 +- .../org_group_policy_enforcement_tier.py | 41 -- ...group_policy_override_update_attributes.py | 2 +- .../org_group_policy_override_update_data.py | 2 +- .../org_group_policy_update_attributes.py | 22 +- .../v2/model/org_relationship_data.py | 47 ++ .../v2/model/org_resource_type.py | 35 ++ .../model/personal_access_token_attributes.py | 9 + .../v2/model/user_attributes.py | 9 - src/datadog_api_client/v2/models/__init__.py | 24 +- ...ce_account_returns_created_response.frozen | 2 +- ...vice_account_returns_created_response.yaml | 14 +- ...service_account_returns_ok_response.frozen | 2 +- ...a_service_account_returns_ok_response.yaml | 18 +- ...service_account_returns_ok_response.frozen | 2 +- ...a_service_account_returns_ok_response.yaml | 12 +- ...account_returns_no_content_response.frozen | 2 +- ...e_account_returns_no_content_response.yaml | 16 +- ...service_account_returns_ok_response.frozen | 2 +- ...a_service_account_returns_ok_response.yaml | 20 +- tests/v2/features/key_management.feature | 14 +- tests/v2/features/org_groups.feature | 78 +-- tests/v2/features/organizations.feature | 6 + tests/v2/features/service_accounts.feature | 14 +- tests/v2/features/undo.json | 28 +- tests/v2/features/users.feature | 14 + 60 files changed, 1176 insertions(+), 674 deletions(-) delete mode 100644 examples/v2/org-groups/GetOrgGroupPolicy.py delete mode 100644 examples/v2/org-groups/GetOrgGroupPolicyOverride.py create mode 100644 examples/v2/organizations/ListOrgs.py create mode 100644 examples/v2/users/DeleteUserInvitations.py create mode 100644 src/datadog_api_client/v2/model/managed_orgs_data.py create mode 100644 src/datadog_api_client/v2/model/managed_orgs_relationship_to_org.py create mode 100644 src/datadog_api_client/v2/model/managed_orgs_relationship_to_orgs.py create mode 100644 src/datadog_api_client/v2/model/managed_orgs_relationships.py create mode 100644 src/datadog_api_client/v2/model/managed_orgs_response.py rename src/datadog_api_client/v2/model/{org_group_policy_policy_type.py => managed_orgs_type.py} (57%) create mode 100644 src/datadog_api_client/v2/model/org_attributes.py create mode 100644 src/datadog_api_client/v2/model/org_data.py delete mode 100644 src/datadog_api_client/v2/model/org_group_policy_enforcement_tier.py create mode 100644 src/datadog_api_client/v2/model/org_relationship_data.py create mode 100644 src/datadog_api_client/v2/model/org_resource_type.py diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 5861fba12e..8d66d8407c 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -1140,9 +1140,9 @@ components: schema: type: string PersonalAccessTokenID: - description: The ID of the personal access token. + description: The UUID of the personal access token. in: path - name: pat_id + name: pat_uuid required: true schema: example: "00000000-0000-1234-0000-000000000000" @@ -29180,6 +29180,11 @@ components: FullPersonalAccessTokenAttributes: description: Attributes of a full personal access token, including the token key. properties: + alias: + description: The alias (short identifier) of the personal access token. + example: "2H9MCNMBM8FQjQ16YucXkX" + readOnly: true + type: string created_at: description: Creation date of the personal access token. example: "2024-01-01T00:00:00+00:00" @@ -30985,7 +30990,7 @@ components: properties: org_site: description: The site of the organization. - example: "us1" + example: "datadoghq.com" type: string org_uuid: description: The UUID of the organization. @@ -42278,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: @@ -50973,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: @@ -51274,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: @@ -51293,7 +51430,7 @@ components: type: string owner_org_site: description: The site of the organization that owns this org group. - example: "us1" + example: "datadoghq.com" type: string owner_org_uuid: description: The UUID of the organization that owns this org group. @@ -51399,7 +51536,7 @@ components: type: string org_site: description: The site of the member organization. - example: "us1" + example: "datadoghq.com" type: string org_uuid: description: The UUID of the member organization. @@ -51620,8 +51757,11 @@ components: example: value: "UTC" type: object - enforcement_tier: - $ref: "#/components/schemas/OrgGroupPolicyEnforcementTier" + enforced_at: + description: Timestamp when the policy was enforced. + example: "2024-01-15T10:30:00Z" + format: date-time + type: string modified_at: description: Timestamp when the policy was last modified. example: "2024-01-15T10:30:00Z" @@ -51631,12 +51771,9 @@ components: description: The name of the policy. example: "monitor_timezone" type: string - policy_type: - $ref: "#/components/schemas/OrgGroupPolicyPolicyType" required: - policy_name - - policy_type - - enforcement_tier + - enforced_at - modified_at type: object OrgGroupPolicyConfigAttributes: @@ -51707,8 +51844,7 @@ components: x-enum-varnames: - ORG_GROUP_POLICY_CONFIGS OrgGroupPolicyCreateAttributes: - description: >- - Attributes for creating an org group policy. If `policy_type` or `enforcement_tier` are not provided, they default to `org_config` and `DEFAULT` respectively. + description: Attributes for creating an org group policy. properties: content: additionalProperties: {} @@ -51716,14 +51852,10 @@ components: example: value: "UTC" type: object - enforcement_tier: - $ref: "#/components/schemas/OrgGroupPolicyEnforcementTier" policy_name: description: The name of the policy. example: "monitor_timezone" type: string - policy_type: - $ref: "#/components/schemas/OrgGroupPolicyPolicyType" required: - policy_name - content @@ -51777,20 +51909,6 @@ components: - type - attributes type: object - OrgGroupPolicyEnforcementTier: - default: DEFAULT - description: >- - The enforcement tier of the policy. `DEFAULT` means the policy is set but member orgs may mutate it. `ENFORCE` means the policy is strictly controlled and mutations are blocked for affected orgs. `DELEGATE` means each member org controls its own value. - enum: - - DEFAULT - - ENFORCE - - DELEGATE - example: DEFAULT - type: string - x-enum-varnames: - - DEFAULT - - ENFORCE - - DELEGATE OrgGroupPolicyListResponse: description: Response containing a list of org group policies. properties: @@ -51823,7 +51941,7 @@ components: type: string org_site: description: The site of the organization that has the override. - example: "us1" + example: "datadoghq.com" type: string org_uuid: description: The UUID of the organization that has the override. @@ -51841,7 +51959,7 @@ components: properties: org_site: description: The site of the organization. - example: "us1" + example: "datadoghq.com" type: string org_uuid: description: The UUID of the organization to grant the override. @@ -51957,12 +52075,11 @@ components: x-enum-varnames: - ORG_GROUP_POLICY_OVERRIDES OrgGroupPolicyOverrideUpdateAttributes: - description: >- - Attributes for updating a policy override. The `org_uuid` and `org_site` fields must match the existing override and cannot be changed. + description: Attributes for updating a policy override. properties: org_site: description: The site of the organization. - example: "us1" + example: "datadoghq.com" type: string org_uuid: description: The UUID of the organization. @@ -51998,16 +52115,6 @@ components: required: - data type: object - OrgGroupPolicyPolicyType: - default: org_config - description: >- - The type of the policy. Only `org_config` is supported, indicating a policy backed by an organization configuration setting. - enum: - - org_config - example: org_config - type: string - x-enum-varnames: - - ORG_CONFIG OrgGroupPolicyRelationshipToOne: description: Relationship to a single org group policy. properties: @@ -52076,8 +52183,6 @@ components: example: value: "UTC" type: object - enforcement_tier: - $ref: "#/components/schemas/OrgGroupPolicyEnforcementTier" type: object OrgGroupPolicyUpdateData: description: Data for updating an org group policy. @@ -52198,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: @@ -53442,6 +53568,11 @@ components: PersonalAccessTokenAttributes: description: Attributes of a personal access token. properties: + alias: + description: The alias (short identifier) of the personal access token. + example: "2H9MCNMBM8FQjQ16YucXkX" + readOnly: true + type: string created_at: description: Creation date of the personal access token. example: "2024-01-01T00:00:00+00:00" @@ -77987,10 +78118,6 @@ components: description: Title of the user. nullable: true type: string - uuid: - description: UUID of the user. - readOnly: true - type: string verified: description: Whether the user is verified. type: boolean @@ -108027,6 +108154,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). @@ -108315,7 +108519,7 @@ paths: created_at: "2024-01-15T10:30:00Z" modified_at: "2024-01-15T10:30:00Z" org_name: "Acme Corp" - org_site: "us1" + org_site: "datadoghq.com" org_uuid: "c3d4e5f6-a7b8-9012-cdef-012345678901" id: "f1e2d3c4-b5a6-7890-1234-567890abcdef" relationships: @@ -108373,7 +108577,7 @@ paths: data: attributes: orgs: - - org_site: "us1" + - org_site: "datadoghq.com" org_uuid: "c3d4e5f6-a7b8-9012-cdef-012345678901" relationships: source_org_group: @@ -108400,7 +108604,7 @@ paths: created_at: "2024-01-15T10:30:00Z" modified_at: "2024-01-16T14:00:00Z" org_name: "Acme Corp" - org_site: "us1" + org_site: "datadoghq.com" org_uuid: "c3d4e5f6-a7b8-9012-cdef-012345678901" id: "f1e2d3c4-b5a6-7890-1234-567890abcdef" relationships: @@ -108465,7 +108669,7 @@ paths: created_at: "2024-01-15T10:30:00Z" modified_at: "2024-01-15T10:30:00Z" org_name: "Acme Corp" - org_site: "us1" + org_site: "datadoghq.com" org_uuid: "c3d4e5f6-a7b8-9012-cdef-012345678901" id: "f1e2d3c4-b5a6-7890-1234-567890abcdef" relationships: @@ -108546,7 +108750,7 @@ paths: created_at: "2024-01-15T10:30:00Z" modified_at: "2024-01-16T14:00:00Z" org_name: "Acme Corp" - org_site: "us1" + org_site: "datadoghq.com" org_uuid: "c3d4e5f6-a7b8-9012-cdef-012345678901" id: "f1e2d3c4-b5a6-7890-1234-567890abcdef" relationships: @@ -108614,10 +108818,9 @@ paths: - attributes: content: value: "UTC" - enforcement_tier: "DEFAULT" + enforced_at: "2024-01-15T10:30:00Z" modified_at: "2024-01-15T10:30:00Z" policy_name: "monitor_timezone" - policy_type: "org_config" id: "1a2b3c4d-5e6f-7890-abcd-ef0123456789" relationships: org_group: @@ -108673,9 +108876,7 @@ paths: attributes: content: value: "UTC" - enforcement_tier: "DEFAULT" policy_name: "monitor_timezone" - policy_type: "org_config" relationships: org_group: data: @@ -108696,10 +108897,9 @@ paths: attributes: content: value: "UTC" - enforcement_tier: "DEFAULT" + enforced_at: "2024-01-15T10:30:00Z" modified_at: "2024-01-15T10:30:00Z" policy_name: "monitor_timezone" - policy_type: "org_config" id: "1a2b3c4d-5e6f-7890-abcd-ef0123456789" relationships: org_group: @@ -108789,73 +108989,8 @@ paths: 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/). - get: - description: Get a specific organization group policy by its ID. - operationId: GetOrgGroupPolicy - parameters: - - $ref: "#/components/parameters/OrgGroupPolicyId" - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - attributes: - content: - value: "UTC" - enforcement_tier: "DEFAULT" - modified_at: "2024-01-15T10:30:00Z" - policy_name: "monitor_timezone" - policy_type: "org_config" - id: "1a2b3c4d-5e6f-7890-abcd-ef0123456789" - relationships: - org_group: - data: - id: "a1b2c3d4-e5f6-7890-abcd-ef0123456789" - type: org_groups - type: org_group_policies - schema: - $ref: "#/components/schemas/OrgGroupPolicyResponse" - description: OK - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Bad Request - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Unauthorized - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Forbidden - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Not Found - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - summary: Get an org group policy - tags: [Org Groups] - "x-permission": - operator: OR - permissions: - - org_group_read - 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/). patch: - description: Update an existing organization group policy. + description: Update the content of an existing organization group policy. operationId: UpdateOrgGroupPolicy parameters: - $ref: "#/components/parameters/OrgGroupPolicyId" @@ -108869,7 +109004,6 @@ paths: attributes: content: value: "US/Eastern" - enforcement_tier: "ENFORCE" id: "1a2b3c4d-5e6f-7890-abcd-ef0123456789" type: org_group_policies schema: @@ -108886,10 +109020,9 @@ paths: attributes: content: value: "US/Eastern" - enforcement_tier: "ENFORCE" + enforced_at: "2024-01-15T10:30:00Z" modified_at: "2024-01-16T14:00:00Z" policy_name: "monitor_timezone" - policy_type: "org_config" id: "1a2b3c4d-5e6f-7890-abcd-ef0123456789" relationships: org_group: @@ -109003,7 +109136,7 @@ paths: - attributes: created_at: "2024-01-15T10:30:00Z" modified_at: "2024-01-15T10:30:00Z" - org_site: "us1" + org_site: "datadoghq.com" org_uuid: "c3d4e5f6-a7b8-9012-cdef-012345678901" id: "9f8e7d6c-5b4a-3210-fedc-ba0987654321" relationships: @@ -109062,7 +109195,7 @@ paths: value: data: attributes: - org_site: "us1" + org_site: "datadoghq.com" org_uuid: "c3d4e5f6-a7b8-9012-cdef-012345678901" relationships: org_group: @@ -109088,7 +109221,7 @@ paths: attributes: created_at: "2024-01-15T10:30:00Z" modified_at: "2024-01-15T10:30:00Z" - org_site: "us1" + org_site: "datadoghq.com" org_uuid: "c3d4e5f6-a7b8-9012-cdef-012345678901" id: "9f8e7d6c-5b4a-3210-fedc-ba0987654321" relationships: @@ -109183,73 +109316,6 @@ paths: 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/). - get: - description: Get a specific organization group policy override by its ID. - operationId: GetOrgGroupPolicyOverride - parameters: - - $ref: "#/components/parameters/OrgGroupPolicyOverrideId" - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - attributes: - created_at: "2024-01-15T10:30:00Z" - modified_at: "2024-01-15T10:30:00Z" - org_site: "us1" - org_uuid: "c3d4e5f6-a7b8-9012-cdef-012345678901" - id: "9f8e7d6c-5b4a-3210-fedc-ba0987654321" - relationships: - org_group: - data: - id: "a1b2c3d4-e5f6-7890-abcd-ef0123456789" - type: org_groups - org_group_policy: - data: - id: "1a2b3c4d-5e6f-7890-abcd-ef0123456789" - type: org_group_policies - type: org_group_policy_overrides - schema: - $ref: "#/components/schemas/OrgGroupPolicyOverrideResponse" - description: OK - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Bad Request - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Unauthorized - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Forbidden - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Not Found - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - summary: Get an org group policy override - tags: [Org Groups] - "x-permission": - operator: OR - permissions: - - org_group_read - 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/). patch: description: Update an existing organization group policy override. operationId: UpdateOrgGroupPolicyOverride @@ -109263,7 +109329,7 @@ paths: value: data: attributes: - org_site: "us1" + org_site: "datadoghq.com" org_uuid: "c3d4e5f6-a7b8-9012-cdef-012345678901" id: "9f8e7d6c-5b4a-3210-fedc-ba0987654321" type: org_group_policy_overrides @@ -109281,7 +109347,7 @@ paths: attributes: created_at: "2024-01-15T10:30:00Z" modified_at: "2024-01-16T14:00:00Z" - org_site: "us1" + org_site: "datadoghq.com" org_uuid: "c3d4e5f6-a7b8-9012-cdef-012345678901" id: "9f8e7d6c-5b4a-3210-fedc-ba0987654321" relationships: @@ -109353,7 +109419,7 @@ paths: created_at: "2024-01-15T10:30:00Z" modified_at: "2024-01-15T10:30:00Z" name: "My Org Group" - owner_org_site: "us1" + owner_org_site: "datadoghq.com" owner_org_uuid: "b2c3d4e5-f6a7-8901-bcde-f01234567890" id: "a1b2c3d4-e5f6-7890-abcd-ef0123456789" type: org_groups @@ -109420,7 +109486,7 @@ paths: created_at: "2024-01-15T10:30:00Z" modified_at: "2024-01-15T10:30:00Z" name: "My Org Group" - owner_org_site: "us1" + owner_org_site: "datadoghq.com" owner_org_uuid: "b2c3d4e5-f6a7-8901-bcde-f01234567890" id: "a1b2c3d4-e5f6-7890-abcd-ef0123456789" type: org_groups @@ -109523,7 +109589,7 @@ paths: created_at: "2024-01-15T10:30:00Z" modified_at: "2024-01-15T10:30:00Z" name: "My Org Group" - owner_org_site: "us1" + owner_org_site: "datadoghq.com" owner_org_uuid: "b2c3d4e5-f6a7-8901-bcde-f01234567890" id: "a1b2c3d4-e5f6-7890-abcd-ef0123456789" type: org_groups @@ -109596,7 +109662,7 @@ paths: created_at: "2024-01-15T10:30:00Z" modified_at: "2024-01-16T14:00:00Z" name: "Updated Org Group Name" - owner_org_site: "us1" + owner_org_site: "datadoghq.com" owner_org_uuid: "b2c3d4e5-f6a7-8901-bcde-f01234567890" id: "a1b2c3d4-e5f6-7890-abcd-ef0123456789" type: org_groups @@ -109764,7 +109830,7 @@ paths: operator: OR permissions: - user_app_keys - /api/v2/personal_access_tokens/{pat_id}: + /api/v2/personal_access_tokens/{pat_uuid}: delete: description: Revoke a specific personal access token. operationId: RevokePersonalAccessToken @@ -121343,7 +121409,7 @@ paths: operator: OR permissions: - service_account_write - /api/v2/service_accounts/{service_account_id}/access_tokens/{pat_id}: + /api/v2/service_accounts/{service_account_id}/access_tokens/{pat_uuid}: delete: description: Revoke a specific access token for a service account. operationId: RevokeServiceAccountAccessToken @@ -129399,6 +129465,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 373a050081..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 ----------------------------------------------------------- @@ -22754,13 +22810,6 @@ datadog\_api\_client.v2.model.org\_group\_policy\_data module :members: :show-inheritance: -datadog\_api\_client.v2.model.org\_group\_policy\_enforcement\_tier module --------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.org_group_policy_enforcement_tier - :members: - :show-inheritance: - datadog\_api\_client.v2.model.org\_group\_policy\_list\_response module ----------------------------------------------------------------------- @@ -22866,13 +22915,6 @@ datadog\_api\_client.v2.model.org\_group\_policy\_override\_update\_request modu :members: :show-inheritance: -datadog\_api\_client.v2.model.org\_group\_policy\_policy\_type module ---------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.org_group_policy_policy_type - :members: - :show-inheritance: - datadog\_api\_client.v2.model.org\_group\_policy\_relationship\_to\_one module ------------------------------------------------------------------------------ @@ -22999,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/key-management/GetPersonalAccessToken.py b/examples/v2/key-management/GetPersonalAccessToken.py index d2a095c8b5..a233e8f84b 100644 --- a/examples/v2/key-management/GetPersonalAccessToken.py +++ b/examples/v2/key-management/GetPersonalAccessToken.py @@ -13,7 +13,7 @@ with ApiClient(configuration) as api_client: api_instance = KeyManagementApi(api_client) response = api_instance.get_personal_access_token( - pat_id=PERSONAL_ACCESS_TOKEN_DATA_ID, + pat_uuid=PERSONAL_ACCESS_TOKEN_DATA_ID, ) print(response) diff --git a/examples/v2/key-management/RevokePersonalAccessToken.py b/examples/v2/key-management/RevokePersonalAccessToken.py index e556052464..3b58563d3c 100644 --- a/examples/v2/key-management/RevokePersonalAccessToken.py +++ b/examples/v2/key-management/RevokePersonalAccessToken.py @@ -13,5 +13,5 @@ with ApiClient(configuration) as api_client: api_instance = KeyManagementApi(api_client) api_instance.revoke_personal_access_token( - pat_id=PERSONAL_ACCESS_TOKEN_DATA_ID, + pat_uuid=PERSONAL_ACCESS_TOKEN_DATA_ID, ) diff --git a/examples/v2/key-management/UpdatePersonalAccessToken.py b/examples/v2/key-management/UpdatePersonalAccessToken.py index 38e95f97ff..a2bda12b8a 100644 --- a/examples/v2/key-management/UpdatePersonalAccessToken.py +++ b/examples/v2/key-management/UpdatePersonalAccessToken.py @@ -26,6 +26,6 @@ configuration = Configuration() with ApiClient(configuration) as api_client: api_instance = KeyManagementApi(api_client) - response = api_instance.update_personal_access_token(pat_id=PERSONAL_ACCESS_TOKEN_DATA_ID, body=body) + response = api_instance.update_personal_access_token(pat_uuid=PERSONAL_ACCESS_TOKEN_DATA_ID, body=body) print(response) diff --git a/examples/v2/org-groups/BulkUpdateOrgGroupMemberships.py b/examples/v2/org-groups/BulkUpdateOrgGroupMemberships.py index acca0b53dc..4f38609b71 100644 --- a/examples/v2/org-groups/BulkUpdateOrgGroupMemberships.py +++ b/examples/v2/org-groups/BulkUpdateOrgGroupMemberships.py @@ -24,7 +24,7 @@ attributes=OrgGroupMembershipBulkUpdateAttributes( orgs=[ GlobalOrgIdentifier( - org_site="us1", + org_site="datadoghq.com", org_uuid=UUID("c3d4e5f6-a7b8-9012-cdef-012345678901"), ), ], diff --git a/examples/v2/org-groups/CreateOrgGroupPolicy.py b/examples/v2/org-groups/CreateOrgGroupPolicy.py index 3dc02d4898..f33361d1ee 100644 --- a/examples/v2/org-groups/CreateOrgGroupPolicy.py +++ b/examples/v2/org-groups/CreateOrgGroupPolicy.py @@ -8,8 +8,6 @@ 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 @@ -20,9 +18,7 @@ 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( diff --git a/examples/v2/org-groups/CreateOrgGroupPolicyOverride.py b/examples/v2/org-groups/CreateOrgGroupPolicyOverride.py index 2aeb23dd0a..6b348c185f 100644 --- a/examples/v2/org-groups/CreateOrgGroupPolicyOverride.py +++ b/examples/v2/org-groups/CreateOrgGroupPolicyOverride.py @@ -24,7 +24,7 @@ body = OrgGroupPolicyOverrideCreateRequest( data=OrgGroupPolicyOverrideCreateData( attributes=OrgGroupPolicyOverrideCreateAttributes( - org_site="us1", + org_site="datadoghq.com", org_uuid=UUID("c3d4e5f6-a7b8-9012-cdef-012345678901"), ), relationships=OrgGroupPolicyOverrideCreateRelationships( diff --git a/examples/v2/org-groups/GetOrgGroupPolicy.py b/examples/v2/org-groups/GetOrgGroupPolicy.py deleted file mode 100644 index ef0651cd86..0000000000 --- a/examples/v2/org-groups/GetOrgGroupPolicy.py +++ /dev/null @@ -1,17 +0,0 @@ -""" -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) diff --git a/examples/v2/org-groups/GetOrgGroupPolicyOverride.py b/examples/v2/org-groups/GetOrgGroupPolicyOverride.py deleted file mode 100644 index 9fefe29e28..0000000000 --- a/examples/v2/org-groups/GetOrgGroupPolicyOverride.py +++ /dev/null @@ -1,17 +0,0 @@ -""" -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) diff --git a/examples/v2/org-groups/UpdateOrgGroupPolicy.py b/examples/v2/org-groups/UpdateOrgGroupPolicy.py index daffa940ce..3decf71b94 100644 --- a/examples/v2/org-groups/UpdateOrgGroupPolicy.py +++ b/examples/v2/org-groups/UpdateOrgGroupPolicy.py @@ -4,7 +4,6 @@ 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 @@ -15,7 +14,6 @@ data=OrgGroupPolicyUpdateData( attributes=OrgGroupPolicyUpdateAttributes( content=dict([("value", "UTC")]), - enforcement_tier=OrgGroupPolicyEnforcementTier.DEFAULT, ), id=UUID("1a2b3c4d-5e6f-7890-abcd-ef0123456789"), type=OrgGroupPolicyType.ORG_GROUP_POLICIES, diff --git a/examples/v2/org-groups/UpdateOrgGroupPolicyOverride.py b/examples/v2/org-groups/UpdateOrgGroupPolicyOverride.py index c53273e58e..b59bc61a69 100644 --- a/examples/v2/org-groups/UpdateOrgGroupPolicyOverride.py +++ b/examples/v2/org-groups/UpdateOrgGroupPolicyOverride.py @@ -15,7 +15,7 @@ body = OrgGroupPolicyOverrideUpdateRequest( data=OrgGroupPolicyOverrideUpdateData( attributes=OrgGroupPolicyOverrideUpdateAttributes( - org_site="us1", + org_site="datadoghq.com", org_uuid=UUID("c3d4e5f6-a7b8-9012-cdef-012345678901"), ), id=UUID("9f8e7d6c-5b4a-3210-fedc-ba0987654321"), 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/service-accounts/GetServiceAccountAccessToken.py b/examples/v2/service-accounts/GetServiceAccountAccessToken.py index babbbfbe2b..efde74d186 100644 --- a/examples/v2/service-accounts/GetServiceAccountAccessToken.py +++ b/examples/v2/service-accounts/GetServiceAccountAccessToken.py @@ -17,7 +17,7 @@ api_instance = ServiceAccountsApi(api_client) response = api_instance.get_service_account_access_token( service_account_id=SERVICE_ACCOUNT_USER_DATA_ID, - pat_id=SERVICE_ACCOUNT_ACCESS_TOKEN_DATA_ID, + pat_uuid=SERVICE_ACCOUNT_ACCESS_TOKEN_DATA_ID, ) print(response) diff --git a/examples/v2/service-accounts/RevokeServiceAccountAccessToken.py b/examples/v2/service-accounts/RevokeServiceAccountAccessToken.py index 55187e47e5..6c299ceb1a 100644 --- a/examples/v2/service-accounts/RevokeServiceAccountAccessToken.py +++ b/examples/v2/service-accounts/RevokeServiceAccountAccessToken.py @@ -17,5 +17,5 @@ api_instance = ServiceAccountsApi(api_client) api_instance.revoke_service_account_access_token( service_account_id=SERVICE_ACCOUNT_USER_DATA_ID, - pat_id=SERVICE_ACCOUNT_ACCESS_TOKEN_DATA_ID, + pat_uuid=SERVICE_ACCOUNT_ACCESS_TOKEN_DATA_ID, ) diff --git a/examples/v2/service-accounts/UpdateServiceAccountAccessToken.py b/examples/v2/service-accounts/UpdateServiceAccountAccessToken.py index 1810fb2877..791fb71c99 100644 --- a/examples/v2/service-accounts/UpdateServiceAccountAccessToken.py +++ b/examples/v2/service-accounts/UpdateServiceAccountAccessToken.py @@ -31,7 +31,7 @@ with ApiClient(configuration) as api_client: api_instance = ServiceAccountsApi(api_client) response = api_instance.update_service_account_access_token( - service_account_id=SERVICE_ACCOUNT_USER_DATA_ID, pat_id=SERVICE_ACCOUNT_ACCESS_TOKEN_DATA_ID, body=body + service_account_id=SERVICE_ACCOUNT_USER_DATA_ID, pat_uuid=SERVICE_ACCOUNT_ACCESS_TOKEN_DATA_ID, body=body ) 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/configuration.py b/src/datadog_api_client/configuration.py index aa232fe4e0..4e1a043c02 100644 --- a/src/datadog_api_client/configuration.py +++ b/src/datadog_api_client/configuration.py @@ -472,8 +472,6 @@ 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, diff --git a/src/datadog_api_client/v2/api/key_management_api.py b/src/datadog_api_client/v2/api/key_management_api.py index c47153cb4f..11060b7a16 100644 --- a/src/datadog_api_client/v2/api/key_management_api.py +++ b/src/datadog_api_client/v2/api/key_management_api.py @@ -257,16 +257,16 @@ def __init__(self, api_client=None): settings={ "response_type": (PersonalAccessTokenResponse,), "auth": ["apiKeyAuth", "appKeyAuth"], - "endpoint_path": "/api/v2/personal_access_tokens/{pat_id}", + "endpoint_path": "/api/v2/personal_access_tokens/{pat_uuid}", "operation_id": "get_personal_access_token", "http_method": "GET", "version": "v2", }, params_map={ - "pat_id": { + "pat_uuid": { "required": True, "openapi_types": (str,), - "attribute": "pat_id", + "attribute": "pat_uuid", "location": "path", }, }, @@ -499,16 +499,16 @@ def __init__(self, api_client=None): settings={ "response_type": None, "auth": ["apiKeyAuth", "appKeyAuth"], - "endpoint_path": "/api/v2/personal_access_tokens/{pat_id}", + "endpoint_path": "/api/v2/personal_access_tokens/{pat_uuid}", "operation_id": "revoke_personal_access_token", "http_method": "DELETE", "version": "v2", }, params_map={ - "pat_id": { + "pat_uuid": { "required": True, "openapi_types": (str,), - "attribute": "pat_id", + "attribute": "pat_uuid", "location": "path", }, }, @@ -600,16 +600,16 @@ def __init__(self, api_client=None): settings={ "response_type": (PersonalAccessTokenResponse,), "auth": ["apiKeyAuth", "appKeyAuth"], - "endpoint_path": "/api/v2/personal_access_tokens/{pat_id}", + "endpoint_path": "/api/v2/personal_access_tokens/{pat_uuid}", "operation_id": "update_personal_access_token", "http_method": "PATCH", "version": "v2", }, params_map={ - "pat_id": { + "pat_uuid": { "required": True, "openapi_types": (str,), - "attribute": "pat_id", + "attribute": "pat_uuid", "location": "path", }, "body": { @@ -789,18 +789,18 @@ def get_current_user_application_key( def get_personal_access_token( self, - pat_id: str, + pat_uuid: str, ) -> PersonalAccessTokenResponse: """Get a personal access token. Get a specific personal access token by its UUID. - :param pat_id: The ID of the personal access token. - :type pat_id: str + :param pat_uuid: The UUID of the personal access token. + :type pat_uuid: str :rtype: PersonalAccessTokenResponse """ kwargs: Dict[str, Any] = {} - kwargs["pat_id"] = pat_id + kwargs["pat_uuid"] = pat_uuid return self._get_personal_access_token_endpoint.call_with_http_info(**kwargs) @@ -1046,18 +1046,18 @@ def list_personal_access_tokens( def revoke_personal_access_token( self, - pat_id: str, + pat_uuid: str, ) -> None: """Revoke a personal access token. Revoke a specific personal access token. - :param pat_id: The ID of the personal access token. - :type pat_id: str + :param pat_uuid: The UUID of the personal access token. + :type pat_uuid: str :rtype: None """ kwargs: Dict[str, Any] = {} - kwargs["pat_id"] = pat_id + kwargs["pat_uuid"] = pat_uuid return self._revoke_personal_access_token_endpoint.call_with_http_info(**kwargs) @@ -1127,20 +1127,20 @@ def update_current_user_application_key( def update_personal_access_token( self, - pat_id: str, + pat_uuid: str, body: PersonalAccessTokenUpdateRequest, ) -> PersonalAccessTokenResponse: """Update a personal access token. Update a specific personal access token. - :param pat_id: The ID of the personal access token. - :type pat_id: str + :param pat_uuid: The UUID of the personal access token. + :type pat_uuid: str :type body: PersonalAccessTokenUpdateRequest :rtype: PersonalAccessTokenResponse """ kwargs: Dict[str, Any] = {} - kwargs["pat_id"] = pat_id + kwargs["pat_uuid"] = pat_uuid kwargs["body"] = body diff --git a/src/datadog_api_client/v2/api/org_groups_api.py b/src/datadog_api_client/v2/api/org_groups_api.py index 229e082622..7d693c2a66 100644 --- a/src/datadog_api_client/v2/api/org_groups_api.py +++ b/src/datadog_api_client/v2/api/org_groups_api.py @@ -241,52 +241,6 @@ 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,), @@ -750,40 +704,6 @@ 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, *, @@ -1009,7 +929,7 @@ def update_org_group_policy( ) -> OrgGroupPolicyResponse: """Update an org group policy. - Update an existing organization group policy. + Update the content of an existing organization group policy. :param org_group_policy_id: The ID of the org group policy. :type org_group_policy_id: UUID 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/service_accounts_api.py b/src/datadog_api_client/v2/api/service_accounts_api.py index e972993b05..79b63e3b78 100644 --- a/src/datadog_api_client/v2/api/service_accounts_api.py +++ b/src/datadog_api_client/v2/api/service_accounts_api.py @@ -144,7 +144,7 @@ def __init__(self, api_client=None): settings={ "response_type": (PersonalAccessTokenResponse,), "auth": ["apiKeyAuth", "appKeyAuth"], - "endpoint_path": "/api/v2/service_accounts/{service_account_id}/access_tokens/{pat_id}", + "endpoint_path": "/api/v2/service_accounts/{service_account_id}/access_tokens/{pat_uuid}", "operation_id": "get_service_account_access_token", "http_method": "GET", "version": "v2", @@ -156,10 +156,10 @@ def __init__(self, api_client=None): "attribute": "service_account_id", "location": "path", }, - "pat_id": { + "pat_uuid": { "required": True, "openapi_types": (str,), - "attribute": "pat_id", + "attribute": "pat_uuid", "location": "path", }, }, @@ -298,7 +298,7 @@ def __init__(self, api_client=None): settings={ "response_type": None, "auth": ["apiKeyAuth", "appKeyAuth"], - "endpoint_path": "/api/v2/service_accounts/{service_account_id}/access_tokens/{pat_id}", + "endpoint_path": "/api/v2/service_accounts/{service_account_id}/access_tokens/{pat_uuid}", "operation_id": "revoke_service_account_access_token", "http_method": "DELETE", "version": "v2", @@ -310,10 +310,10 @@ def __init__(self, api_client=None): "attribute": "service_account_id", "location": "path", }, - "pat_id": { + "pat_uuid": { "required": True, "openapi_types": (str,), - "attribute": "pat_id", + "attribute": "pat_uuid", "location": "path", }, }, @@ -327,7 +327,7 @@ def __init__(self, api_client=None): settings={ "response_type": (PersonalAccessTokenResponse,), "auth": ["apiKeyAuth", "appKeyAuth"], - "endpoint_path": "/api/v2/service_accounts/{service_account_id}/access_tokens/{pat_id}", + "endpoint_path": "/api/v2/service_accounts/{service_account_id}/access_tokens/{pat_uuid}", "operation_id": "update_service_account_access_token", "http_method": "PATCH", "version": "v2", @@ -339,10 +339,10 @@ def __init__(self, api_client=None): "attribute": "service_account_id", "location": "path", }, - "pat_id": { + "pat_uuid": { "required": True, "openapi_types": (str,), - "attribute": "pat_id", + "attribute": "pat_uuid", "location": "path", }, "body": { @@ -470,7 +470,7 @@ def delete_service_account_application_key( def get_service_account_access_token( self, service_account_id: str, - pat_id: str, + pat_uuid: str, ) -> PersonalAccessTokenResponse: """Get an access token for a service account. @@ -478,14 +478,14 @@ def get_service_account_access_token( :param service_account_id: The ID of the service account. :type service_account_id: str - :param pat_id: The ID of the personal access token. - :type pat_id: str + :param pat_uuid: The UUID of the personal access token. + :type pat_uuid: str :rtype: PersonalAccessTokenResponse """ kwargs: Dict[str, Any] = {} kwargs["service_account_id"] = service_account_id - kwargs["pat_id"] = pat_id + kwargs["pat_uuid"] = pat_uuid return self._get_service_account_access_token_endpoint.call_with_http_info(**kwargs) @@ -614,7 +614,7 @@ def list_service_account_application_keys( def revoke_service_account_access_token( self, service_account_id: str, - pat_id: str, + pat_uuid: str, ) -> None: """Revoke an access token for a service account. @@ -622,21 +622,21 @@ def revoke_service_account_access_token( :param service_account_id: The ID of the service account. :type service_account_id: str - :param pat_id: The ID of the personal access token. - :type pat_id: str + :param pat_uuid: The UUID of the personal access token. + :type pat_uuid: str :rtype: None """ kwargs: Dict[str, Any] = {} kwargs["service_account_id"] = service_account_id - kwargs["pat_id"] = pat_id + kwargs["pat_uuid"] = pat_uuid return self._revoke_service_account_access_token_endpoint.call_with_http_info(**kwargs) def update_service_account_access_token( self, service_account_id: str, - pat_id: str, + pat_uuid: str, body: PersonalAccessTokenUpdateRequest, ) -> PersonalAccessTokenResponse: """Update an access token for a service account. @@ -645,15 +645,15 @@ def update_service_account_access_token( :param service_account_id: The ID of the service account. :type service_account_id: str - :param pat_id: The ID of the personal access token. - :type pat_id: str + :param pat_uuid: The UUID of the personal access token. + :type pat_uuid: str :type body: PersonalAccessTokenUpdateRequest :rtype: PersonalAccessTokenResponse """ kwargs: Dict[str, Any] = {} kwargs["service_account_id"] = service_account_id - kwargs["pat_id"] = pat_id + kwargs["pat_uuid"] = pat_uuid kwargs["body"] = body 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/full_personal_access_token_attributes.py b/src/datadog_api_client/v2/model/full_personal_access_token_attributes.py index 3a21d3e044..92caedc173 100644 --- a/src/datadog_api_client/v2/model/full_personal_access_token_attributes.py +++ b/src/datadog_api_client/v2/model/full_personal_access_token_attributes.py @@ -19,6 +19,7 @@ class FullPersonalAccessTokenAttributes(ModelNormal): @cached_property def openapi_types(_): return { + "alias": (str,), "created_at": (datetime,), "expires_at": (datetime, none_type), "key": (str,), @@ -28,6 +29,7 @@ def openapi_types(_): } attribute_map = { + "alias": "alias", "created_at": "created_at", "expires_at": "expires_at", "key": "key", @@ -36,6 +38,7 @@ def openapi_types(_): "scopes": "scopes", } read_only_vars = { + "alias", "created_at", "expires_at", "key", @@ -44,6 +47,7 @@ def openapi_types(_): def __init__( self_, + alias: Union[str, UnsetType] = unset, created_at: Union[datetime, UnsetType] = unset, expires_at: Union[datetime, none_type, UnsetType] = unset, key: Union[str, UnsetType] = unset, @@ -55,6 +59,9 @@ def __init__( """ Attributes of a full personal access token, including the token key. + :param alias: The alias (short identifier) of the personal access token. + :type alias: str, optional + :param created_at: Creation date of the personal access token. :type created_at: datetime, optional @@ -73,6 +80,8 @@ def __init__( :param scopes: Array of scopes granted to the personal access token. :type scopes: [str], optional """ + if alias is not unset: + kwargs["alias"] = alias if created_at is not unset: kwargs["created_at"] = created_at if expires_at is not unset: 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/org_group_policy_policy_type.py b/src/datadog_api_client/v2/model/managed_orgs_type.py similarity index 57% rename from src/datadog_api_client/v2/model/org_group_policy_policy_type.py rename to src/datadog_api_client/v2/model/managed_orgs_type.py index be5c0bd9ea..1416c7cb0f 100644 --- a/src/datadog_api_client/v2/model/org_group_policy_policy_type.py +++ b/src/datadog_api_client/v2/model/managed_orgs_type.py @@ -12,18 +12,18 @@ from typing import ClassVar -class OrgGroupPolicyPolicyType(ModelSimple): +class ManagedOrgsType(ModelSimple): """ - The type of the policy. Only `org_config` is supported, indicating a policy backed by an organization configuration setting. + The resource type for managed organizations. - :param value: If omitted defaults to "org_config". Must be one of ["org_config"]. + :param value: If omitted defaults to "managed_orgs". Must be one of ["managed_orgs"]. :type value: str """ allowed_values = { - "org_config", + "managed_orgs", } - ORG_CONFIG: ClassVar["OrgGroupPolicyPolicyType"] + MANAGED_ORGS: ClassVar["ManagedOrgsType"] @cached_property def openapi_types(_): @@ -32,4 +32,4 @@ def openapi_types(_): } -OrgGroupPolicyPolicyType.ORG_CONFIG = OrgGroupPolicyPolicyType("org_config") +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_group_policy_attributes.py b/src/datadog_api_client/v2/model/org_group_policy_attributes.py index f4ae193af6..3ad14f7d30 100644 --- a/src/datadog_api_client/v2/model/org_group_policy_attributes.py +++ b/src/datadog_api_client/v2/model/org_group_policy_attributes.py @@ -3,7 +3,7 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations -from typing import Any, Dict, Union, TYPE_CHECKING +from typing import Any, Dict, Union from datadog_api_client.model_utils import ( ModelNormal, @@ -17,17 +17,9 @@ ) -if TYPE_CHECKING: - 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 - - class OrgGroupPolicyAttributes(ModelNormal): @cached_property def openapi_types(_): - 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 - return { "content": ( { @@ -45,26 +37,23 @@ def openapi_types(_): ) }, ), - "enforcement_tier": (OrgGroupPolicyEnforcementTier,), + "enforced_at": (datetime,), "modified_at": (datetime,), "policy_name": (str,), - "policy_type": (OrgGroupPolicyPolicyType,), } attribute_map = { "content": "content", - "enforcement_tier": "enforcement_tier", + "enforced_at": "enforced_at", "modified_at": "modified_at", "policy_name": "policy_name", - "policy_type": "policy_type", } def __init__( self_, - enforcement_tier: OrgGroupPolicyEnforcementTier, + enforced_at: datetime, modified_at: datetime, policy_name: str, - policy_type: OrgGroupPolicyPolicyType, content: Union[Dict[str, Any], UnsetType] = unset, **kwargs, ): @@ -74,23 +63,19 @@ def __init__( :param content: The policy content as key-value pairs. :type content: {str: (bool, date, datetime, dict, float, int, list, str, UUID, none_type,)}, optional - :param enforcement_tier: The enforcement tier of the policy. ``DEFAULT`` means the policy is set but member orgs may mutate it. ``ENFORCE`` means the policy is strictly controlled and mutations are blocked for affected orgs. ``DELEGATE`` means each member org controls its own value. - :type enforcement_tier: OrgGroupPolicyEnforcementTier + :param enforced_at: Timestamp when the policy was enforced. + :type enforced_at: datetime :param modified_at: Timestamp when the policy was last modified. :type modified_at: datetime :param policy_name: The name of the policy. :type policy_name: str - - :param policy_type: The type of the policy. Only ``org_config`` is supported, indicating a policy backed by an organization configuration setting. - :type policy_type: OrgGroupPolicyPolicyType """ if content is not unset: kwargs["content"] = content super().__init__(kwargs) - self_.enforcement_tier = enforcement_tier + self_.enforced_at = enforced_at self_.modified_at = modified_at self_.policy_name = policy_name - self_.policy_type = policy_type diff --git a/src/datadog_api_client/v2/model/org_group_policy_create_attributes.py b/src/datadog_api_client/v2/model/org_group_policy_create_attributes.py index c910a111b1..4430c67ee3 100644 --- a/src/datadog_api_client/v2/model/org_group_policy_create_attributes.py +++ b/src/datadog_api_client/v2/model/org_group_policy_create_attributes.py @@ -3,7 +3,7 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations -from typing import Any, Dict, Union, TYPE_CHECKING +from typing import Any, Dict from datadog_api_client.model_utils import ( ModelNormal, @@ -11,23 +11,13 @@ date, datetime, none_type, - unset, - UnsetType, UUID, ) -if TYPE_CHECKING: - 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 - - class OrgGroupPolicyCreateAttributes(ModelNormal): @cached_property def openapi_types(_): - 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 - return { "content": ( { @@ -45,45 +35,24 @@ def openapi_types(_): ) }, ), - "enforcement_tier": (OrgGroupPolicyEnforcementTier,), "policy_name": (str,), - "policy_type": (OrgGroupPolicyPolicyType,), } attribute_map = { "content": "content", - "enforcement_tier": "enforcement_tier", "policy_name": "policy_name", - "policy_type": "policy_type", } - def __init__( - self_, - content: Dict[str, Any], - policy_name: str, - enforcement_tier: Union[OrgGroupPolicyEnforcementTier, UnsetType] = unset, - policy_type: Union[OrgGroupPolicyPolicyType, UnsetType] = unset, - **kwargs, - ): + def __init__(self_, content: Dict[str, Any], policy_name: str, **kwargs): """ - Attributes for creating an org group policy. If ``policy_type`` or ``enforcement_tier`` are not provided, they default to ``org_config`` and ``DEFAULT`` respectively. + Attributes for creating an org group policy. :param content: The policy content as key-value pairs. :type content: {str: (bool, date, datetime, dict, float, int, list, str, UUID, none_type,)} - :param enforcement_tier: The enforcement tier of the policy. ``DEFAULT`` means the policy is set but member orgs may mutate it. ``ENFORCE`` means the policy is strictly controlled and mutations are blocked for affected orgs. ``DELEGATE`` means each member org controls its own value. - :type enforcement_tier: OrgGroupPolicyEnforcementTier, optional - :param policy_name: The name of the policy. :type policy_name: str - - :param policy_type: The type of the policy. Only ``org_config`` is supported, indicating a policy backed by an organization configuration setting. - :type policy_type: OrgGroupPolicyPolicyType, optional """ - if enforcement_tier is not unset: - kwargs["enforcement_tier"] = enforcement_tier - if policy_type is not unset: - kwargs["policy_type"] = policy_type super().__init__(kwargs) self_.content = content diff --git a/src/datadog_api_client/v2/model/org_group_policy_create_data.py b/src/datadog_api_client/v2/model/org_group_policy_create_data.py index 10e47b136d..5941491198 100644 --- a/src/datadog_api_client/v2/model/org_group_policy_create_data.py +++ b/src/datadog_api_client/v2/model/org_group_policy_create_data.py @@ -46,7 +46,7 @@ def __init__( """ Data for creating an org group policy. - :param attributes: Attributes for creating an org group policy. If ``policy_type`` or ``enforcement_tier`` are not provided, they default to ``org_config`` and ``DEFAULT`` respectively. + :param attributes: Attributes for creating an org group policy. :type attributes: OrgGroupPolicyCreateAttributes :param relationships: Relationships for creating a policy. diff --git a/src/datadog_api_client/v2/model/org_group_policy_enforcement_tier.py b/src/datadog_api_client/v2/model/org_group_policy_enforcement_tier.py deleted file mode 100644 index 8ca3c7f429..0000000000 --- a/src/datadog_api_client/v2/model/org_group_policy_enforcement_tier.py +++ /dev/null @@ -1,41 +0,0 @@ -# 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 OrgGroupPolicyEnforcementTier(ModelSimple): - """ - The enforcement tier of the policy. `DEFAULT` means the policy is set but member orgs may mutate it. `ENFORCE` means the policy is strictly controlled and mutations are blocked for affected orgs. `DELEGATE` means each member org controls its own value. - - :param value: If omitted defaults to "DEFAULT". Must be one of ["DEFAULT", "ENFORCE", "DELEGATE"]. - :type value: str - """ - - allowed_values = { - "DEFAULT", - "ENFORCE", - "DELEGATE", - } - DEFAULT: ClassVar["OrgGroupPolicyEnforcementTier"] - ENFORCE: ClassVar["OrgGroupPolicyEnforcementTier"] - DELEGATE: ClassVar["OrgGroupPolicyEnforcementTier"] - - @cached_property - def openapi_types(_): - return { - "value": (str,), - } - - -OrgGroupPolicyEnforcementTier.DEFAULT = OrgGroupPolicyEnforcementTier("DEFAULT") -OrgGroupPolicyEnforcementTier.ENFORCE = OrgGroupPolicyEnforcementTier("ENFORCE") -OrgGroupPolicyEnforcementTier.DELEGATE = OrgGroupPolicyEnforcementTier("DELEGATE") diff --git a/src/datadog_api_client/v2/model/org_group_policy_override_update_attributes.py b/src/datadog_api_client/v2/model/org_group_policy_override_update_attributes.py index 9cb3bce179..fabd912259 100644 --- a/src/datadog_api_client/v2/model/org_group_policy_override_update_attributes.py +++ b/src/datadog_api_client/v2/model/org_group_policy_override_update_attributes.py @@ -26,7 +26,7 @@ def openapi_types(_): def __init__(self_, org_site: str, org_uuid: UUID, **kwargs): """ - Attributes for updating a policy override. The ``org_uuid`` and ``org_site`` fields must match the existing override and cannot be changed. + Attributes for updating a policy override. :param org_site: The site of the organization. :type org_site: str diff --git a/src/datadog_api_client/v2/model/org_group_policy_override_update_data.py b/src/datadog_api_client/v2/model/org_group_policy_override_update_data.py index c188b0fcc4..4d648f0c8c 100644 --- a/src/datadog_api_client/v2/model/org_group_policy_override_update_data.py +++ b/src/datadog_api_client/v2/model/org_group_policy_override_update_data.py @@ -45,7 +45,7 @@ def __init__( """ Data for updating a policy override. - :param attributes: Attributes for updating a policy override. The ``org_uuid`` and ``org_site`` fields must match the existing override and cannot be changed. + :param attributes: Attributes for updating a policy override. :type attributes: OrgGroupPolicyOverrideUpdateAttributes :param id: The ID of the policy override. diff --git a/src/datadog_api_client/v2/model/org_group_policy_update_attributes.py b/src/datadog_api_client/v2/model/org_group_policy_update_attributes.py index 5c296f1915..eb72272c70 100644 --- a/src/datadog_api_client/v2/model/org_group_policy_update_attributes.py +++ b/src/datadog_api_client/v2/model/org_group_policy_update_attributes.py @@ -3,7 +3,7 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations -from typing import Any, Dict, Union, TYPE_CHECKING +from typing import Any, Dict, Union from datadog_api_client.model_utils import ( ModelNormal, @@ -17,15 +17,9 @@ ) -if TYPE_CHECKING: - from datadog_api_client.v2.model.org_group_policy_enforcement_tier import OrgGroupPolicyEnforcementTier - - class OrgGroupPolicyUpdateAttributes(ModelNormal): @cached_property def openapi_types(_): - from datadog_api_client.v2.model.org_group_policy_enforcement_tier import OrgGroupPolicyEnforcementTier - return { "content": ( { @@ -43,31 +37,19 @@ def openapi_types(_): ) }, ), - "enforcement_tier": (OrgGroupPolicyEnforcementTier,), } attribute_map = { "content": "content", - "enforcement_tier": "enforcement_tier", } - def __init__( - self_, - content: Union[Dict[str, Any], UnsetType] = unset, - enforcement_tier: Union[OrgGroupPolicyEnforcementTier, UnsetType] = unset, - **kwargs, - ): + def __init__(self_, content: Union[Dict[str, Any], UnsetType] = unset, **kwargs): """ Attributes for updating an org group policy. :param content: The policy content as key-value pairs. :type content: {str: (bool, date, datetime, dict, float, int, list, str, UUID, none_type,)}, optional - - :param enforcement_tier: The enforcement tier of the policy. ``DEFAULT`` means the policy is set but member orgs may mutate it. ``ENFORCE`` means the policy is strictly controlled and mutations are blocked for affected orgs. ``DELEGATE`` means each member org controls its own value. - :type enforcement_tier: OrgGroupPolicyEnforcementTier, optional """ if content is not unset: kwargs["content"] = content - if enforcement_tier is not unset: - kwargs["enforcement_tier"] = enforcement_tier super().__init__(kwargs) 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/personal_access_token_attributes.py b/src/datadog_api_client/v2/model/personal_access_token_attributes.py index 94bdf38d93..f6ffe30eaa 100644 --- a/src/datadog_api_client/v2/model/personal_access_token_attributes.py +++ b/src/datadog_api_client/v2/model/personal_access_token_attributes.py @@ -19,6 +19,7 @@ class PersonalAccessTokenAttributes(ModelNormal): @cached_property def openapi_types(_): return { + "alias": (str,), "created_at": (datetime,), "expires_at": (datetime, none_type), "last_used_at": (datetime, none_type), @@ -29,6 +30,7 @@ def openapi_types(_): } attribute_map = { + "alias": "alias", "created_at": "created_at", "expires_at": "expires_at", "last_used_at": "last_used_at", @@ -38,6 +40,7 @@ def openapi_types(_): "scopes": "scopes", } read_only_vars = { + "alias", "created_at", "expires_at", "last_used_at", @@ -47,6 +50,7 @@ def openapi_types(_): def __init__( self_, + alias: Union[str, UnsetType] = unset, created_at: Union[datetime, UnsetType] = unset, expires_at: Union[datetime, none_type, UnsetType] = unset, last_used_at: Union[datetime, none_type, UnsetType] = unset, @@ -59,6 +63,9 @@ def __init__( """ Attributes of a personal access token. + :param alias: The alias (short identifier) of the personal access token. + :type alias: str, optional + :param created_at: Creation date of the personal access token. :type created_at: datetime, optional @@ -80,6 +87,8 @@ def __init__( :param scopes: Array of scopes granted to the personal access token. :type scopes: [str], optional """ + if alias is not unset: + kwargs["alias"] = alias if created_at is not unset: kwargs["created_at"] = created_at if expires_at is not unset: diff --git a/src/datadog_api_client/v2/model/user_attributes.py b/src/datadog_api_client/v2/model/user_attributes.py index 771ce371ad..a4bed717c3 100644 --- a/src/datadog_api_client/v2/model/user_attributes.py +++ b/src/datadog_api_client/v2/model/user_attributes.py @@ -31,7 +31,6 @@ def openapi_types(_): "service_account": (bool,), "status": (str,), "title": (str, none_type), - "uuid": (str,), "verified": (bool,), } @@ -48,13 +47,11 @@ def openapi_types(_): "service_account": "service_account", "status": "status", "title": "title", - "uuid": "uuid", "verified": "verified", } read_only_vars = { "last_login_time", "mfa_enabled", - "uuid", } def __init__( @@ -71,7 +68,6 @@ def __init__( service_account: Union[bool, UnsetType] = unset, status: Union[str, UnsetType] = unset, title: Union[str, none_type, UnsetType] = unset, - uuid: Union[str, UnsetType] = unset, verified: Union[bool, UnsetType] = unset, **kwargs, ): @@ -114,9 +110,6 @@ def __init__( :param title: Title of the user. :type title: str, none_type, optional - :param uuid: UUID of the user. - :type uuid: str, optional - :param verified: Whether the user is verified. :type verified: bool, optional """ @@ -144,8 +137,6 @@ def __init__( kwargs["status"] = status if title is not unset: kwargs["title"] = title - if uuid is not unset: - kwargs["uuid"] = uuid if verified is not unset: kwargs["verified"] = verified super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index f4f9e15305..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 @@ -4682,7 +4690,6 @@ 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_data import OrgGroupPolicyData -from datadog_api_client.v2.model.org_group_policy_enforcement_tier import OrgGroupPolicyEnforcementTier from datadog_api_client.v2.model.org_group_policy_list_response import OrgGroupPolicyListResponse from datadog_api_client.v2.model.org_group_policy_override_attributes import OrgGroupPolicyOverrideAttributes from datadog_api_client.v2.model.org_group_policy_override_create_attributes import ( @@ -4704,7 +4711,6 @@ ) from datadog_api_client.v2.model.org_group_policy_override_update_data import OrgGroupPolicyOverrideUpdateData from datadog_api_client.v2.model.org_group_policy_override_update_request import OrgGroupPolicyOverrideUpdateRequest -from datadog_api_client.v2.model.org_group_policy_policy_type import OrgGroupPolicyPolicyType from datadog_api_client.v2.model.org_group_policy_relationship_to_one import OrgGroupPolicyRelationshipToOne from datadog_api_client.v2.model.org_group_policy_relationship_to_one_data import OrgGroupPolicyRelationshipToOneData from datadog_api_client.v2.model.org_group_policy_relationships import OrgGroupPolicyRelationships @@ -4723,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 @@ -9899,6 +9907,12 @@ "MaintenanceDataRelationshipsLastModifiedByUserData", "MaintenanceDataRelationshipsStatusPage", "MaintenanceDataRelationshipsStatusPageData", + "ManagedOrgsData", + "ManagedOrgsRelationshipToOrg", + "ManagedOrgsRelationshipToOrgs", + "ManagedOrgsRelationships", + "ManagedOrgsResponse", + "ManagedOrgsType", "MemberTeam", "MemberTeamType", "Metadata", @@ -10475,6 +10489,7 @@ "OpsgenieServiceUpdateRequest", "OpsgenieServicesResponse", "OrderDirection", + "OrgAttributes", "OrgConfigGetResponse", "OrgConfigListResponse", "OrgConfigRead", @@ -10505,6 +10520,7 @@ "OrgConnectionUserRelationship", "OrgConnectionUserRelationshipData", "OrgConnectionUserRelationshipDataType", + "OrgData", "OrgGroupAttributes", "OrgGroupCreateAttributes", "OrgGroupCreateData", @@ -10541,7 +10557,6 @@ "OrgGroupPolicyCreateRelationships", "OrgGroupPolicyCreateRequest", "OrgGroupPolicyData", - "OrgGroupPolicyEnforcementTier", "OrgGroupPolicyListResponse", "OrgGroupPolicyOverrideAttributes", "OrgGroupPolicyOverrideCreateAttributes", @@ -10557,7 +10572,6 @@ "OrgGroupPolicyOverrideUpdateAttributes", "OrgGroupPolicyOverrideUpdateData", "OrgGroupPolicyOverrideUpdateRequest", - "OrgGroupPolicyPolicyType", "OrgGroupPolicyRelationshipToOne", "OrgGroupPolicyRelationshipToOneData", "OrgGroupPolicyRelationships", @@ -10576,6 +10590,8 @@ "OrgGroupUpdateAttributes", "OrgGroupUpdateData", "OrgGroupUpdateRequest", + "OrgRelationshipData", + "OrgResourceType", "Organization", "OrganizationAttributes", "OrganizationsType", diff --git a/tests/v2/cassettes/test_scenarios/test_create_an_access_token_for_a_service_account_returns_created_response.frozen b/tests/v2/cassettes/test_scenarios/test_create_an_access_token_for_a_service_account_returns_created_response.frozen index 7ccf87f4bd..b457d0ec92 100644 --- a/tests/v2/cassettes/test_scenarios/test_create_an_access_token_for_a_service_account_returns_created_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_create_an_access_token_for_a_service_account_returns_created_response.frozen @@ -1 +1 @@ -2026-04-16T20:03:06.304Z \ No newline at end of file +2026-04-03T21:02:56.793Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_create_an_access_token_for_a_service_account_returns_created_response.yaml b/tests/v2/cassettes/test_scenarios/test_create_an_access_token_for_a_service_account_returns_created_response.yaml index 9058ede130..438d769c9d 100644 --- a/tests/v2/cassettes/test_scenarios/test_create_an_access_token_for_a_service_account_returns_created_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_create_an_access_token_for_a_service_account_returns_created_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"email":"Test-Create_an_access_token_for_a_service_account_returns_Created_response-1776369786@datadoghq.com","service_account":true,"title":"user + body: '{"data":{"attributes":{"email":"Test-Create_an_access_token_for_a_service_account_returns_Created_response-1775250176@datadoghq.com","service_account":true,"title":"user title"},"type":"users"}}' headers: accept: @@ -11,7 +11,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/service_accounts response: body: - string: '{"data":{"type":"users","id":"498cce13-39cf-11f1-9928-be1871753dee","attributes":{"uuid":"498cce13-39cf-11f1-9928-be1871753dee","name":null,"handle":"498cce13-39cf-11f1-9928-be1871753dee","created_at":"2026-04-16T20:03:08.017467+00:00","modified_at":"2026-04-16T20:03:08.017467+00:00","email":"test-create_an_access_token_for_a_service_account_returns_created_response-1776369786@datadoghq.com","icon":"https://secure.gravatar.com/avatar/ed167ebfacd06c99ea70d4c121f5a7f1?s=48&d=retro","title":"user + string: '{"data":{"type":"users","id":"7d5e5ea9-2fa0-11f1-991f-62f4bfc595d0","attributes":{"name":null,"handle":"7d5e5ea9-2fa0-11f1-991f-62f4bfc595d0","created_at":"2026-04-03T21:02:56.980609+00:00","modified_at":"2026-04-03T21:02:56.980609+00:00","email":"test-create_an_access_token_for_a_service_account_returns_created_response-1775250176@datadoghq.com","icon":"https://secure.gravatar.com/avatar/1a703b50769c96d7b84a5470f474ef74?s=48&d=retro","title":"user title","verified":true,"service_account":true,"disabled":false,"allowed_login_methods":[],"status":"Active","last_login_time":null},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} ' @@ -22,17 +22,17 @@ interactions: code: 201 message: Created - request: - body: '{"data":{"attributes":{"name":"Test-Create_an_access_token_for_a_service_account_returns_Created_response-1776369786","scopes":["dashboards_read"]},"type":"personal_access_tokens"}}' + body: '{"data":{"attributes":{"name":"Test-Create_an_access_token_for_a_service_account_returns_Created_response-1775250176","scopes":["dashboards_read"]},"type":"personal_access_tokens"}}' headers: accept: - application/json content-type: - application/json method: POST - uri: https://api.datadoghq.com/api/v2/service_accounts/498cce13-39cf-11f1-9928-be1871753dee/access_tokens + uri: https://api.datadoghq.com/api/v2/service_accounts/7d5e5ea9-2fa0-11f1-991f-62f4bfc595d0/access_tokens response: body: - string: '{"data":{"id":"88337232-8552-4495-987c-1cfed567d461","type":"personal_access_tokens","attributes":{"created_at":"2026-04-16T20:03:08.381725456Z","expires_at":null,"key":"xxxxx_xxxxxxxxxxxxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","name":"Test-Create_an_access_token_for_a_service_account_returns_Created_response-1776369786","public_portion":"ddpat_490SyfYQqhqnr008BTjQWn","scopes":["dashboards_read"]},"relationships":{"owned_by":{"data":{"id":"498cce13-39cf-11f1-9928-be1871753dee","type":"users"}}}}}' + string: '{"data":{"id":"6f2491f5-8c3f-45a3-962a-5f769b95e806","type":"personal_access_tokens","attributes":{"alias":"3NirNJ5Y2qB4Fmac8B4wnm","created_at":"2026-04-03T21:02:57.288351972Z","expires_at":null,"key":"xxxxx_xxxxxxxxxxxxxxxxxxxxxx_xxxxxxxxxxxxXxxxxxxxxxxxxxxxxxxxxxxx","name":"Test-Create_an_access_token_for_a_service_account_returns_Created_response-1775250176","public_portion":"3NirNJ5Y2qB4Fmac8B4wnm","scopes":["dashboards_read"]},"relationships":{"owned_by":{"data":{"id":"7d5e5ea9-2fa0-11f1-991f-62f4bfc595d0","type":"users"}}}}}' headers: content-type: - application/vnd.api+json @@ -45,7 +45,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/service_accounts/498cce13-39cf-11f1-9928-be1871753dee/access_tokens/88337232-8552-4495-987c-1cfed567d461 + uri: https://api.datadoghq.com/api/v2/service_accounts/7d5e5ea9-2fa0-11f1-991f-62f4bfc595d0/access_tokens/6f2491f5-8c3f-45a3-962a-5f769b95e806 response: body: string: '' @@ -59,7 +59,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/users/498cce13-39cf-11f1-9928-be1871753dee + uri: https://api.datadoghq.com/api/v2/users/7d5e5ea9-2fa0-11f1-991f-62f4bfc595d0 response: body: string: '' diff --git a/tests/v2/cassettes/test_scenarios/test_get_an_access_token_for_a_service_account_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_get_an_access_token_for_a_service_account_returns_ok_response.frozen index 767a9f9c25..55c4828532 100644 --- a/tests/v2/cassettes/test_scenarios/test_get_an_access_token_for_a_service_account_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_get_an_access_token_for_a_service_account_returns_ok_response.frozen @@ -1 +1 @@ -2026-04-16T20:03:09.123Z \ No newline at end of file +2026-04-03T21:03:03.500Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_get_an_access_token_for_a_service_account_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_get_an_access_token_for_a_service_account_returns_ok_response.yaml index f4dd3f079e..6b4dcb3ce6 100644 --- a/tests/v2/cassettes/test_scenarios/test_get_an_access_token_for_a_service_account_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_get_an_access_token_for_a_service_account_returns_ok_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"email":"Test-Get_an_access_token_for_a_service_account_returns_OK_response-1776369789@datadoghq.com","service_account":true,"title":"user + body: '{"data":{"attributes":{"email":"Test-Get_an_access_token_for_a_service_account_returns_OK_response-1775250183@datadoghq.com","service_account":true,"title":"user title"},"type":"users"}}' headers: accept: @@ -11,7 +11,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/service_accounts response: body: - string: '{"data":{"type":"users","id":"4a56376d-39cf-11f1-9a29-2eb65349fc01","attributes":{"uuid":"4a56376d-39cf-11f1-9a29-2eb65349fc01","name":null,"handle":"4a56376d-39cf-11f1-9a29-2eb65349fc01","created_at":"2026-04-16T20:03:09.337439+00:00","modified_at":"2026-04-16T20:03:09.337439+00:00","email":"test-get_an_access_token_for_a_service_account_returns_ok_response-1776369789@datadoghq.com","icon":"https://secure.gravatar.com/avatar/7473377b9dced0689feddb50f5d82d29?s=48&d=retro","title":"user + string: '{"data":{"type":"users","id":"8161ef90-2fa0-11f1-991f-62f4bfc595d0","attributes":{"name":null,"handle":"8161ef90-2fa0-11f1-991f-62f4bfc595d0","created_at":"2026-04-03T21:03:03.714879+00:00","modified_at":"2026-04-03T21:03:03.714879+00:00","email":"test-get_an_access_token_for_a_service_account_returns_ok_response-1775250183@datadoghq.com","icon":"https://secure.gravatar.com/avatar/bb3c6df0d99066bbe05cf7dff99b5561?s=48&d=retro","title":"user title","verified":true,"service_account":true,"disabled":false,"allowed_login_methods":[],"status":"Active","last_login_time":null},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} ' @@ -22,17 +22,17 @@ interactions: code: 201 message: Created - request: - body: '{"data":{"attributes":{"name":"Test-Get_an_access_token_for_a_service_account_returns_OK_response-1776369789","scopes":["dashboards_read"]},"type":"personal_access_tokens"}}' + body: '{"data":{"attributes":{"name":"Test-Get_an_access_token_for_a_service_account_returns_OK_response-1775250183","scopes":["dashboards_read"]},"type":"personal_access_tokens"}}' headers: accept: - application/json content-type: - application/json method: POST - uri: https://api.datadoghq.com/api/v2/service_accounts/4a56376d-39cf-11f1-9a29-2eb65349fc01/access_tokens + uri: https://api.datadoghq.com/api/v2/service_accounts/8161ef90-2fa0-11f1-991f-62f4bfc595d0/access_tokens response: body: - string: '{"data":{"id":"b84d8c2c-b88c-4f72-82ef-fc09dddd1153","type":"personal_access_tokens","attributes":{"created_at":"2026-04-16T20:03:09.695802251Z","expires_at":null,"key":"xxxxx_xxxxxxxxxxxxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","name":"Test-Get_an_access_token_for_a_service_account_returns_OK_response-1776369789","public_portion":"ddpat_5bm1hhcTKQzH22hPiJgkEN","scopes":["dashboards_read"]},"relationships":{"owned_by":{"data":{"id":"4a56376d-39cf-11f1-9a29-2eb65349fc01","type":"users"}}}}}' + string: '{"data":{"id":"f2362958-1e67-414b-985d-d3196afd9315","type":"personal_access_tokens","attributes":{"alias":"7N2tUOwxIjSF8QziOBIpVd","created_at":"2026-04-03T21:03:04.002376467Z","expires_at":null,"key":"xxxxx_xxxxxxxxxxxxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","name":"Test-Get_an_access_token_for_a_service_account_returns_OK_response-1775250183","public_portion":"7N2tUOwxIjSF8QziOBIpVd","scopes":["dashboards_read"]},"relationships":{"owned_by":{"data":{"id":"8161ef90-2fa0-11f1-991f-62f4bfc595d0","type":"users"}}}}}' headers: content-type: - application/vnd.api+json @@ -45,10 +45,10 @@ interactions: accept: - application/json method: GET - uri: https://api.datadoghq.com/api/v2/service_accounts/4a56376d-39cf-11f1-9a29-2eb65349fc01/access_tokens/b84d8c2c-b88c-4f72-82ef-fc09dddd1153 + uri: https://api.datadoghq.com/api/v2/service_accounts/8161ef90-2fa0-11f1-991f-62f4bfc595d0/access_tokens/f2362958-1e67-414b-985d-d3196afd9315 response: body: - string: '{"data":{"id":"b84d8c2c-b88c-4f72-82ef-fc09dddd1153","type":"personal_access_tokens","attributes":{"created_at":"2026-04-16T20:03:09.695802Z","expires_at":null,"last_used_at":null,"name":"Test-Get_an_access_token_for_a_service_account_returns_OK_response-1776369789","public_portion":"ddpat_5bm1hhcTKQzH22hPiJgkEN","scopes":["dashboards_read"]},"relationships":{"owned_by":{"data":{"id":"4a56376d-39cf-11f1-9a29-2eb65349fc01","type":"users"}}}}}' + string: '{"data":{"id":"f2362958-1e67-414b-985d-d3196afd9315","type":"personal_access_tokens","attributes":{"alias":"7N2tUOwxIjSF8QziOBIpVd","created_at":"2026-04-03T21:03:04.002376Z","expires_at":null,"last_used_at":null,"name":"Test-Get_an_access_token_for_a_service_account_returns_OK_response-1775250183","public_portion":"7N2tUOwxIjSF8QziOBIpVd","scopes":["dashboards_read"]},"relationships":{"owned_by":{"data":{"id":"8161ef90-2fa0-11f1-991f-62f4bfc595d0","type":"users"}}}}}' headers: content-type: - application/vnd.api+json @@ -61,7 +61,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/service_accounts/4a56376d-39cf-11f1-9a29-2eb65349fc01/access_tokens/b84d8c2c-b88c-4f72-82ef-fc09dddd1153 + uri: https://api.datadoghq.com/api/v2/service_accounts/8161ef90-2fa0-11f1-991f-62f4bfc595d0/access_tokens/f2362958-1e67-414b-985d-d3196afd9315 response: body: string: '' @@ -75,7 +75,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/users/4a56376d-39cf-11f1-9a29-2eb65349fc01 + uri: https://api.datadoghq.com/api/v2/users/8161ef90-2fa0-11f1-991f-62f4bfc595d0 response: body: string: '' diff --git a/tests/v2/cassettes/test_scenarios/test_list_access_tokens_for_a_service_account_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_list_access_tokens_for_a_service_account_returns_ok_response.frozen index db15643c3b..6234af8a3e 100644 --- a/tests/v2/cassettes/test_scenarios/test_list_access_tokens_for_a_service_account_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_list_access_tokens_for_a_service_account_returns_ok_response.frozen @@ -1 +1 @@ -2026-04-16T20:03:10.610Z \ No newline at end of file +2026-04-03T21:03:09.026Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_list_access_tokens_for_a_service_account_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_list_access_tokens_for_a_service_account_returns_ok_response.yaml index cadcd8a6fb..b70d2504dd 100644 --- a/tests/v2/cassettes/test_scenarios/test_list_access_tokens_for_a_service_account_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_list_access_tokens_for_a_service_account_returns_ok_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"email":"Test-List_access_tokens_for_a_service_account_returns_OK_response-1776369790@datadoghq.com","service_account":true,"title":"user + body: '{"data":{"attributes":{"email":"Test-List_access_tokens_for_a_service_account_returns_OK_response-1775250189@datadoghq.com","service_account":true,"title":"user title"},"type":"users"}}' headers: accept: @@ -11,10 +11,8 @@ interactions: uri: https://api.datadoghq.com/api/v2/service_accounts response: body: - string: '{"data":{"type":"users","id":"4b3b0a2c-39cf-11f1-bf73-ce6d1c25b9b4","attributes":{"uuid":"4b3b0a2c-39cf-11f1-bf73-ce6d1c25b9b4","name":null,"handle":"4b3b0a2c-39cf-11f1-bf73-ce6d1c25b9b4","created_at":"2026-04-16T20:03:10.837056+00:00","modified_at":"2026-04-16T20:03:10.837056+00:00","email":"test-list_access_tokens_for_a_service_account_returns_ok_response-1776369790@datadoghq.com","icon":"https://secure.gravatar.com/avatar/0a5772e4c2381e3c1061e55142e2281a?s=48&d=retro","title":"user - title","verified":true,"service_account":true,"disabled":false,"allowed_login_methods":[],"status":"Active","last_login_time":null},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} - - ' + string: '{"data":{"type":"users","id":"84a7b33b-2fa0-11f1-96b6-7a9b8860a1d7","attributes":{"name":null,"handle":"84a7b33b-2fa0-11f1-96b6-7a9b8860a1d7","created_at":"2026-04-03T21:03:09.205232+00:00","modified_at":"2026-04-03T21:03:09.205232+00:00","email":"test-list_access_tokens_for_a_service_account_returns_ok_response-1775250189@datadoghq.com","icon":"https://secure.gravatar.com/avatar/816e106f74328dd4c20e98c116a9edeb?s=48&d=retro","title":"user + title","verified":true,"service_account":true,"disabled":false,"allowed_login_methods":[],"status":"Active","last_login_time":null},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}}' headers: content-type: - application/json @@ -27,7 +25,7 @@ interactions: accept: - application/json method: GET - uri: https://api.datadoghq.com/api/v2/service_accounts/4b3b0a2c-39cf-11f1-bf73-ce6d1c25b9b4/access_tokens + uri: https://api.datadoghq.com/api/v2/service_accounts/84a7b33b-2fa0-11f1-96b6-7a9b8860a1d7/access_tokens response: body: string: '{"data":[],"meta":{"page":{"total_filtered_count":0}}}' @@ -43,7 +41,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/users/4b3b0a2c-39cf-11f1-bf73-ce6d1c25b9b4 + uri: https://api.datadoghq.com/api/v2/users/84a7b33b-2fa0-11f1-96b6-7a9b8860a1d7 response: body: string: '' diff --git a/tests/v2/cassettes/test_scenarios/test_revoke_an_access_token_for_a_service_account_returns_no_content_response.frozen b/tests/v2/cassettes/test_scenarios/test_revoke_an_access_token_for_a_service_account_returns_no_content_response.frozen index 4a8602fd91..fa38ba91a9 100644 --- a/tests/v2/cassettes/test_scenarios/test_revoke_an_access_token_for_a_service_account_returns_no_content_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_revoke_an_access_token_for_a_service_account_returns_no_content_response.frozen @@ -1 +1 @@ -2026-04-16T20:03:12.932Z \ No newline at end of file +2026-04-03T21:03:10.520Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_revoke_an_access_token_for_a_service_account_returns_no_content_response.yaml b/tests/v2/cassettes/test_scenarios/test_revoke_an_access_token_for_a_service_account_returns_no_content_response.yaml index 73008a5d7b..fd92701ebd 100644 --- a/tests/v2/cassettes/test_scenarios/test_revoke_an_access_token_for_a_service_account_returns_no_content_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_revoke_an_access_token_for_a_service_account_returns_no_content_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"email":"Test-Revoke_an_access_token_for_a_service_account_returns_No_Content_response-1776369792@datadoghq.com","service_account":true,"title":"user + body: '{"data":{"attributes":{"email":"Test-Revoke_an_access_token_for_a_service_account_returns_No_Content_response-1775250190@datadoghq.com","service_account":true,"title":"user title"},"type":"users"}}' headers: accept: @@ -11,7 +11,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/service_accounts response: body: - string: '{"data":{"type":"users","id":"4c99fbee-39cf-11f1-beb2-cad70c641dfa","attributes":{"uuid":"4c99fbee-39cf-11f1-beb2-cad70c641dfa","name":null,"handle":"4c99fbee-39cf-11f1-beb2-cad70c641dfa","created_at":"2026-04-16T20:03:13.136998+00:00","modified_at":"2026-04-16T20:03:13.136998+00:00","email":"test-revoke_an_access_token_for_a_service_account_returns_no_content_response-1776369792@datadoghq.com","icon":"https://secure.gravatar.com/avatar/7586d09a6a08e32a963f425a34463a4d?s=48&d=retro","title":"user + string: '{"data":{"type":"users","id":"860878b5-2fa0-11f1-991f-62f4bfc595d0","attributes":{"name":null,"handle":"860878b5-2fa0-11f1-991f-62f4bfc595d0","created_at":"2026-04-03T21:03:11.517157+00:00","modified_at":"2026-04-03T21:03:11.517157+00:00","email":"test-revoke_an_access_token_for_a_service_account_returns_no_content_response-1775250190@datadoghq.com","icon":"https://secure.gravatar.com/avatar/7d18813f3cbc71a5e46b1184fc3ad8fb?s=48&d=retro","title":"user title","verified":true,"service_account":true,"disabled":false,"allowed_login_methods":[],"status":"Active","last_login_time":null},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} ' @@ -22,17 +22,17 @@ interactions: code: 201 message: Created - request: - body: '{"data":{"attributes":{"name":"Test-Revoke_an_access_token_for_a_service_account_returns_No_Content_response-1776369792","scopes":["dashboards_read"]},"type":"personal_access_tokens"}}' + body: '{"data":{"attributes":{"name":"Test-Revoke_an_access_token_for_a_service_account_returns_No_Content_response-1775250190","scopes":["dashboards_read"]},"type":"personal_access_tokens"}}' headers: accept: - application/json content-type: - application/json method: POST - uri: https://api.datadoghq.com/api/v2/service_accounts/4c99fbee-39cf-11f1-beb2-cad70c641dfa/access_tokens + uri: https://api.datadoghq.com/api/v2/service_accounts/860878b5-2fa0-11f1-991f-62f4bfc595d0/access_tokens response: body: - string: '{"data":{"id":"a5b5e3c3-2b58-448b-a1b1-5c97f16837a6","type":"personal_access_tokens","attributes":{"created_at":"2026-04-16T20:03:13.505344652Z","expires_at":null,"key":"xxxxx_xxxxxxxxxxxxxxxxxxxxxx_xxxxxxxxxXxxxxxxxxxxxxxxxxxxxxxxxxxx","name":"Test-Revoke_an_access_token_for_a_service_account_returns_No_Content_response-1776369792","public_portion":"ddpat_52grBIAi4zKGY0uxhjLVVW","scopes":["dashboards_read"]},"relationships":{"owned_by":{"data":{"id":"4c99fbee-39cf-11f1-beb2-cad70c641dfa","type":"users"}}}}}' + string: '{"data":{"id":"7346d75b-83f3-48ba-9186-899fc80bce16","type":"personal_access_tokens","attributes":{"alias":"3VWUVmuRsjFIKue2Uq9ii6","created_at":"2026-04-03T21:03:11.782016283Z","expires_at":null,"key":"xxxxx_xxxxxxxxxxxxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","name":"Test-Revoke_an_access_token_for_a_service_account_returns_No_Content_response-1775250190","public_portion":"3VWUVmuRsjFIKue2Uq9ii6","scopes":["dashboards_read"]},"relationships":{"owned_by":{"data":{"id":"860878b5-2fa0-11f1-991f-62f4bfc595d0","type":"users"}}}}}' headers: content-type: - application/vnd.api+json @@ -45,7 +45,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/service_accounts/4c99fbee-39cf-11f1-beb2-cad70c641dfa/access_tokens/a5b5e3c3-2b58-448b-a1b1-5c97f16837a6 + uri: https://api.datadoghq.com/api/v2/service_accounts/860878b5-2fa0-11f1-991f-62f4bfc595d0/access_tokens/7346d75b-83f3-48ba-9186-899fc80bce16 response: body: string: '' @@ -59,7 +59,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/service_accounts/4c99fbee-39cf-11f1-beb2-cad70c641dfa/access_tokens/a5b5e3c3-2b58-448b-a1b1-5c97f16837a6 + uri: https://api.datadoghq.com/api/v2/service_accounts/860878b5-2fa0-11f1-991f-62f4bfc595d0/access_tokens/7346d75b-83f3-48ba-9186-899fc80bce16 response: body: string: '' @@ -73,7 +73,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/users/4c99fbee-39cf-11f1-beb2-cad70c641dfa + uri: https://api.datadoghq.com/api/v2/users/860878b5-2fa0-11f1-991f-62f4bfc595d0 response: body: string: '' diff --git a/tests/v2/cassettes/test_scenarios/test_update_an_access_token_for_a_service_account_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_update_an_access_token_for_a_service_account_returns_ok_response.frozen index 58278ff6c0..6a894d59da 100644 --- a/tests/v2/cassettes/test_scenarios/test_update_an_access_token_for_a_service_account_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_update_an_access_token_for_a_service_account_returns_ok_response.frozen @@ -1 +1 @@ -2026-04-16T20:03:14.527Z \ No newline at end of file +2026-04-03T21:03:12.499Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_update_an_access_token_for_a_service_account_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_update_an_access_token_for_a_service_account_returns_ok_response.yaml index 260224fe85..168e92229f 100644 --- a/tests/v2/cassettes/test_scenarios/test_update_an_access_token_for_a_service_account_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_update_an_access_token_for_a_service_account_returns_ok_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"email":"Test-Update_an_access_token_for_a_service_account_returns_OK_response-1776369794@datadoghq.com","service_account":true,"title":"user + body: '{"data":{"attributes":{"email":"Test-Update_an_access_token_for_a_service_account_returns_OK_response-1775250192@datadoghq.com","service_account":true,"title":"user title"},"type":"users"}}' headers: accept: @@ -11,7 +11,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/service_accounts response: body: - string: '{"data":{"type":"users","id":"4d8efdef-39cf-11f1-bf73-ce6d1c25b9b4","attributes":{"uuid":"4d8efdef-39cf-11f1-bf73-ce6d1c25b9b4","name":null,"handle":"4d8efdef-39cf-11f1-bf73-ce6d1c25b9b4","created_at":"2026-04-16T20:03:14.742691+00:00","modified_at":"2026-04-16T20:03:14.742691+00:00","email":"test-update_an_access_token_for_a_service_account_returns_ok_response-1776369794@datadoghq.com","icon":"https://secure.gravatar.com/avatar/05aacae415f13819561258b03c973881?s=48&d=retro","title":"user + string: '{"data":{"type":"users","id":"86bdf0d7-2fa0-11f1-991f-62f4bfc595d0","attributes":{"name":null,"handle":"86bdf0d7-2fa0-11f1-991f-62f4bfc595d0","created_at":"2026-04-03T21:03:12.706435+00:00","modified_at":"2026-04-03T21:03:12.706435+00:00","email":"test-update_an_access_token_for_a_service_account_returns_ok_response-1775250192@datadoghq.com","icon":"https://secure.gravatar.com/avatar/8ef25c203ebdbe5e11acb74bd99ba7da?s=48&d=retro","title":"user title","verified":true,"service_account":true,"disabled":false,"allowed_login_methods":[],"status":"Active","last_login_time":null},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} ' @@ -22,17 +22,17 @@ interactions: code: 201 message: Created - request: - body: '{"data":{"attributes":{"name":"Test-Update_an_access_token_for_a_service_account_returns_OK_response-1776369794","scopes":["dashboards_read"]},"type":"personal_access_tokens"}}' + body: '{"data":{"attributes":{"name":"Test-Update_an_access_token_for_a_service_account_returns_OK_response-1775250192","scopes":["dashboards_read"]},"type":"personal_access_tokens"}}' headers: accept: - application/json content-type: - application/json method: POST - uri: https://api.datadoghq.com/api/v2/service_accounts/4d8efdef-39cf-11f1-bf73-ce6d1c25b9b4/access_tokens + uri: https://api.datadoghq.com/api/v2/service_accounts/86bdf0d7-2fa0-11f1-991f-62f4bfc595d0/access_tokens response: body: - string: '{"data":{"id":"eafa3dd9-430d-4075-a183-63171c7f3de5","type":"personal_access_tokens","attributes":{"created_at":"2026-04-16T20:03:15.138533237Z","expires_at":null,"key":"xxxxx_xxxxxxxxxxxxxxxxxxxxxx_xxxxxxxxxxxxxxxXxxxxxxxxxxxxxxxxxxxx","name":"Test-Update_an_access_token_for_a_service_account_returns_OK_response-1776369794","public_portion":"ddpat_79OZ2nUHcB3McO399ZaVVt","scopes":["dashboards_read"]},"relationships":{"owned_by":{"data":{"id":"4d8efdef-39cf-11f1-bf73-ce6d1c25b9b4","type":"users"}}}}}' + string: '{"data":{"id":"9a7d27cc-4969-4a57-990c-03c23a9f2adc","type":"personal_access_tokens","attributes":{"alias":"4hW0tyOpjf5Dj84mZaXqwe","created_at":"2026-04-03T21:03:12.978132411Z","expires_at":null,"key":"xxxxx_xxxxxxxxxxxxxxxxxxXxxx_xxxxxXxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","name":"Test-Update_an_access_token_for_a_service_account_returns_OK_response-1775250192","public_portion":"4hW0tyOpjf5Dj84mZaXqwe","scopes":["dashboards_read"]},"relationships":{"owned_by":{"data":{"id":"86bdf0d7-2fa0-11f1-991f-62f4bfc595d0","type":"users"}}}}}' headers: content-type: - application/vnd.api+json @@ -40,17 +40,17 @@ interactions: code: 201 message: Created - request: - body: '{"data":{"attributes":{"name":"Test-Update_an_access_token_for_a_service_account_returns_OK_response-1776369794-updated"},"id":"eafa3dd9-430d-4075-a183-63171c7f3de5","type":"personal_access_tokens"}}' + body: '{"data":{"attributes":{"name":"Test-Update_an_access_token_for_a_service_account_returns_OK_response-1775250192-updated"},"id":"9a7d27cc-4969-4a57-990c-03c23a9f2adc","type":"personal_access_tokens"}}' headers: accept: - application/json content-type: - application/json method: PATCH - uri: https://api.datadoghq.com/api/v2/service_accounts/4d8efdef-39cf-11f1-bf73-ce6d1c25b9b4/access_tokens/eafa3dd9-430d-4075-a183-63171c7f3de5 + uri: https://api.datadoghq.com/api/v2/service_accounts/86bdf0d7-2fa0-11f1-991f-62f4bfc595d0/access_tokens/9a7d27cc-4969-4a57-990c-03c23a9f2adc response: body: - string: '{"data":{"id":"eafa3dd9-430d-4075-a183-63171c7f3de5","type":"personal_access_tokens","attributes":{"created_at":"2026-04-16T20:03:15.138533Z","expires_at":null,"last_used_at":null,"modified_at":"2026-04-16T20:03:15.375809Z","name":"Test-Update_an_access_token_for_a_service_account_returns_OK_response-1776369794-updated","public_portion":"ddpat_79OZ2nUHcB3McO399ZaVVt","scopes":["dashboards_read"]},"relationships":{"owned_by":{"data":{"id":"4d8efdef-39cf-11f1-bf73-ce6d1c25b9b4","type":"users"}}}}}' + string: '{"data":{"id":"9a7d27cc-4969-4a57-990c-03c23a9f2adc","type":"personal_access_tokens","attributes":{"alias":"4hW0tyOpjf5Dj84mZaXqwe","created_at":"2026-04-03T21:03:12.978132Z","expires_at":null,"last_used_at":null,"modified_at":"2026-04-03T21:03:13.152078Z","name":"Test-Update_an_access_token_for_a_service_account_returns_OK_response-1775250192-updated","public_portion":"4hW0tyOpjf5Dj84mZaXqwe","scopes":["dashboards_read"]},"relationships":{"owned_by":{"data":{"id":"86bdf0d7-2fa0-11f1-991f-62f4bfc595d0","type":"users"}}}}}' headers: content-type: - application/vnd.api+json @@ -63,7 +63,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/service_accounts/4d8efdef-39cf-11f1-bf73-ce6d1c25b9b4/access_tokens/eafa3dd9-430d-4075-a183-63171c7f3de5 + uri: https://api.datadoghq.com/api/v2/service_accounts/86bdf0d7-2fa0-11f1-991f-62f4bfc595d0/access_tokens/9a7d27cc-4969-4a57-990c-03c23a9f2adc response: body: string: '' @@ -77,7 +77,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/users/4d8efdef-39cf-11f1-bf73-ce6d1c25b9b4 + uri: https://api.datadoghq.com/api/v2/users/86bdf0d7-2fa0-11f1-991f-62f4bfc595d0 response: body: string: '' diff --git a/tests/v2/features/key_management.feature b/tests/v2/features/key_management.feature index 365c53ed7c..6c46484556 100644 --- a/tests/v2/features/key_management.feature +++ b/tests/v2/features/key_management.feature @@ -221,7 +221,7 @@ Feature: Key Management @generated @skip @team:DataDog/credentials-management Scenario: Get a personal access token returns "Not Found" response Given new "GetPersonalAccessToken" request - And request contains "pat_id" parameter from "REPLACE.ME" + And request contains "pat_uuid" parameter from "REPLACE.ME" When the request is sent Then the response status is 404 Not Found @@ -229,7 +229,7 @@ Feature: Key Management Scenario: Get a personal access token returns "OK" response Given there is a valid "personal_access_token" in the system And new "GetPersonalAccessToken" request - And request contains "pat_id" parameter from "personal_access_token.data.id" + And request contains "pat_uuid" parameter from "personal_access_token.data.id" When the request is sent Then the response status is 200 OK And the response "data.type" is equal to "personal_access_tokens" @@ -355,21 +355,21 @@ Feature: Key Management Scenario: Revoke a personal access token returns "No Content" response Given there is a valid "personal_access_token" in the system And new "RevokePersonalAccessToken" request - And request contains "pat_id" parameter from "personal_access_token.data.id" + And request contains "pat_uuid" parameter from "personal_access_token.data.id" When the request is sent Then the response status is 204 No Content @generated @skip @team:DataDog/credentials-management Scenario: Revoke a personal access token returns "Not Found" response Given new "RevokePersonalAccessToken" request - And request contains "pat_id" parameter from "REPLACE.ME" + And request contains "pat_uuid" parameter from "REPLACE.ME" When the request is sent Then the response status is 404 Not Found @generated @skip @team:DataDog/credentials-management Scenario: Update a personal access token returns "Bad Request" response Given new "UpdatePersonalAccessToken" request - And request contains "pat_id" parameter from "REPLACE.ME" + And request contains "pat_uuid" parameter from "REPLACE.ME" And body with value {"data": {"attributes": {"name": "Updated Personal Access Token", "scopes": ["dashboards_read", "dashboards_write"]}, "id": "00112233-4455-6677-8899-aabbccddeeff", "type": "personal_access_tokens"}} When the request is sent Then the response status is 400 Bad Request @@ -377,7 +377,7 @@ Feature: Key Management @generated @skip @team:DataDog/credentials-management Scenario: Update a personal access token returns "Not Found" response Given new "UpdatePersonalAccessToken" request - And request contains "pat_id" parameter from "REPLACE.ME" + And request contains "pat_uuid" parameter from "REPLACE.ME" And body with value {"data": {"attributes": {"name": "Updated Personal Access Token", "scopes": ["dashboards_read", "dashboards_write"]}, "id": "00112233-4455-6677-8899-aabbccddeeff", "type": "personal_access_tokens"}} When the request is sent Then the response status is 404 Not Found @@ -386,7 +386,7 @@ Feature: Key Management Scenario: Update a personal access token returns "OK" response Given there is a valid "personal_access_token" in the system And new "UpdatePersonalAccessToken" request - And request contains "pat_id" parameter from "personal_access_token.data.id" + And request contains "pat_uuid" parameter from "personal_access_token.data.id" And body with value {"data": {"type": "personal_access_tokens", "id": "{{ personal_access_token.data.id }}", "attributes": {"name": "{{ unique }}-updated"}}} When the request is sent Then the response status is 200 OK diff --git a/tests/v2/features/org_groups.feature b/tests/v2/features/org_groups.feature index b8c5fe1b61..73cce63cd8 100644 --- a/tests/v2/features/org_groups.feature +++ b/tests/v2/features/org_groups.feature @@ -12,7 +12,7 @@ Feature: Org Groups Scenario: Bulk update org group memberships returns "Bad Request" response Given operation "BulkUpdateOrgGroupMemberships" enabled And new "BulkUpdateOrgGroupMemberships" request - And body with value {"data": {"attributes": {"orgs": [{"org_site": "us1", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}]}, "relationships": {"source_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "target_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_membership_bulk_updates"}} + And body with value {"data": {"attributes": {"orgs": [{"org_site": "datadoghq.com", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}]}, "relationships": {"source_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "target_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_membership_bulk_updates"}} When the request is sent Then the response status is 400 Bad Request @@ -20,7 +20,7 @@ Feature: Org Groups Scenario: Bulk update org group memberships returns "Not Found" response Given operation "BulkUpdateOrgGroupMemberships" enabled And new "BulkUpdateOrgGroupMemberships" request - And body with value {"data": {"attributes": {"orgs": [{"org_site": "us1", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}]}, "relationships": {"source_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "target_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_membership_bulk_updates"}} + And body with value {"data": {"attributes": {"orgs": [{"org_site": "datadoghq.com", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}]}, "relationships": {"source_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "target_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_membership_bulk_updates"}} When the request is sent Then the response status is 404 Not Found @@ -28,7 +28,7 @@ Feature: Org Groups Scenario: Bulk update org group memberships returns "OK" response Given operation "BulkUpdateOrgGroupMemberships" enabled And new "BulkUpdateOrgGroupMemberships" request - And body with value {"data": {"attributes": {"orgs": [{"org_site": "us1", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}]}, "relationships": {"source_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "target_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_membership_bulk_updates"}} + And body with value {"data": {"attributes": {"orgs": [{"org_site": "datadoghq.com", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}]}, "relationships": {"source_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "target_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_membership_bulk_updates"}} When the request is sent Then the response status is 200 OK @@ -36,7 +36,7 @@ Feature: Org Groups Scenario: Create an org group policy override returns "Bad Request" response Given operation "CreateOrgGroupPolicyOverride" enabled And new "CreateOrgGroupPolicyOverride" request - And body with value {"data": {"attributes": {"org_site": "us1", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "org_group_policy": {"data": {"id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}}}, "type": "org_group_policy_overrides"}} + And body with value {"data": {"attributes": {"org_site": "datadoghq.com", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "org_group_policy": {"data": {"id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}}}, "type": "org_group_policy_overrides"}} When the request is sent Then the response status is 400 Bad Request @@ -44,7 +44,7 @@ Feature: Org Groups Scenario: Create an org group policy override returns "Conflict" response Given operation "CreateOrgGroupPolicyOverride" enabled And new "CreateOrgGroupPolicyOverride" request - And body with value {"data": {"attributes": {"org_site": "us1", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "org_group_policy": {"data": {"id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}}}, "type": "org_group_policy_overrides"}} + And body with value {"data": {"attributes": {"org_site": "datadoghq.com", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "org_group_policy": {"data": {"id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}}}, "type": "org_group_policy_overrides"}} When the request is sent Then the response status is 409 Conflict @@ -52,7 +52,7 @@ Feature: Org Groups Scenario: Create an org group policy override returns "Created" response Given operation "CreateOrgGroupPolicyOverride" enabled And new "CreateOrgGroupPolicyOverride" request - And body with value {"data": {"attributes": {"org_site": "us1", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "org_group_policy": {"data": {"id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}}}, "type": "org_group_policy_overrides"}} + And body with value {"data": {"attributes": {"org_site": "datadoghq.com", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "org_group_policy": {"data": {"id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}}}, "type": "org_group_policy_overrides"}} When the request is sent Then the response status is 201 Created @@ -60,7 +60,7 @@ Feature: Org Groups Scenario: Create an org group policy returns "Bad Request" response Given operation "CreateOrgGroupPolicy" enabled And new "CreateOrgGroupPolicy" request - And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "enforcement_tier": "DEFAULT", "policy_name": "monitor_timezone", "policy_type": "org_config"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_policies"}} + And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "policy_name": "monitor_timezone"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_policies"}} When the request is sent Then the response status is 400 Bad Request @@ -68,7 +68,7 @@ Feature: Org Groups Scenario: Create an org group policy returns "Conflict" response Given operation "CreateOrgGroupPolicy" enabled And new "CreateOrgGroupPolicy" request - And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "enforcement_tier": "DEFAULT", "policy_name": "monitor_timezone", "policy_type": "org_config"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_policies"}} + And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "policy_name": "monitor_timezone"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_policies"}} When the request is sent Then the response status is 409 Conflict @@ -76,7 +76,7 @@ Feature: Org Groups Scenario: Create an org group policy returns "Created" response Given operation "CreateOrgGroupPolicy" enabled And new "CreateOrgGroupPolicy" request - And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "enforcement_tier": "DEFAULT", "policy_name": "monitor_timezone", "policy_type": "org_config"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_policies"}} + And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "policy_name": "monitor_timezone"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_policies"}} When the request is sent Then the response status is 201 Created @@ -200,54 +200,6 @@ Feature: Org Groups When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/org-management - Scenario: Get an org group policy override returns "Bad Request" response - Given operation "GetOrgGroupPolicyOverride" enabled - And new "GetOrgGroupPolicyOverride" request - And request contains "org_group_policy_override_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/org-management - Scenario: Get an org group policy override returns "Not Found" response - Given operation "GetOrgGroupPolicyOverride" enabled - And new "GetOrgGroupPolicyOverride" request - And request contains "org_group_policy_override_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: Get an org group policy override returns "OK" response - Given operation "GetOrgGroupPolicyOverride" enabled - And new "GetOrgGroupPolicyOverride" request - And request contains "org_group_policy_override_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/org-management - Scenario: Get an org group policy returns "Bad Request" response - Given operation "GetOrgGroupPolicy" enabled - And new "GetOrgGroupPolicy" request - And request contains "org_group_policy_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/org-management - Scenario: Get an org group policy returns "Not Found" response - Given operation "GetOrgGroupPolicy" enabled - And new "GetOrgGroupPolicy" request - And request contains "org_group_policy_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: Get an org group policy returns "OK" response - Given operation "GetOrgGroupPolicy" enabled - And new "GetOrgGroupPolicy" request - And request contains "org_group_policy_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 200 OK - @generated @skip @team:DataDog/org-management Scenario: Get an org group returns "Bad Request" response Given operation "GetOrgGroup" enabled @@ -371,7 +323,7 @@ Feature: Org Groups Given operation "UpdateOrgGroupPolicyOverride" enabled And new "UpdateOrgGroupPolicyOverride" request And request contains "org_group_policy_override_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"org_site": "us1", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "id": "9f8e7d6c-5b4a-3210-fedc-ba0987654321", "type": "org_group_policy_overrides"}} + And body with value {"data": {"attributes": {"org_site": "datadoghq.com", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "id": "9f8e7d6c-5b4a-3210-fedc-ba0987654321", "type": "org_group_policy_overrides"}} When the request is sent Then the response status is 400 Bad Request @@ -380,7 +332,7 @@ Feature: Org Groups Given operation "UpdateOrgGroupPolicyOverride" enabled And new "UpdateOrgGroupPolicyOverride" request And request contains "org_group_policy_override_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"org_site": "us1", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "id": "9f8e7d6c-5b4a-3210-fedc-ba0987654321", "type": "org_group_policy_overrides"}} + And body with value {"data": {"attributes": {"org_site": "datadoghq.com", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "id": "9f8e7d6c-5b4a-3210-fedc-ba0987654321", "type": "org_group_policy_overrides"}} When the request is sent Then the response status is 404 Not Found @@ -389,7 +341,7 @@ Feature: Org Groups Given operation "UpdateOrgGroupPolicyOverride" enabled And new "UpdateOrgGroupPolicyOverride" request And request contains "org_group_policy_override_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"org_site": "us1", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "id": "9f8e7d6c-5b4a-3210-fedc-ba0987654321", "type": "org_group_policy_overrides"}} + And body with value {"data": {"attributes": {"org_site": "datadoghq.com", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "id": "9f8e7d6c-5b4a-3210-fedc-ba0987654321", "type": "org_group_policy_overrides"}} When the request is sent Then the response status is 200 OK @@ -398,7 +350,7 @@ Feature: Org Groups Given operation "UpdateOrgGroupPolicy" enabled And new "UpdateOrgGroupPolicy" request And request contains "org_group_policy_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "enforcement_tier": "DEFAULT"}, "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}} + And body with value {"data": {"attributes": {"content": {"value": "UTC"}}, "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}} When the request is sent Then the response status is 400 Bad Request @@ -407,7 +359,7 @@ Feature: Org Groups Given operation "UpdateOrgGroupPolicy" enabled And new "UpdateOrgGroupPolicy" request And request contains "org_group_policy_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "enforcement_tier": "DEFAULT"}, "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}} + And body with value {"data": {"attributes": {"content": {"value": "UTC"}}, "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}} When the request is sent Then the response status is 404 Not Found @@ -416,7 +368,7 @@ Feature: Org Groups Given operation "UpdateOrgGroupPolicy" enabled And new "UpdateOrgGroupPolicy" request And request contains "org_group_policy_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "enforcement_tier": "DEFAULT"}, "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}} + And body with value {"data": {"attributes": {"content": {"value": "UTC"}}, "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}} When the request is sent Then the response status is 200 OK 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/service_accounts.feature b/tests/v2/features/service_accounts.feature index fa8c81440e..25744abc83 100644 --- a/tests/v2/features/service_accounts.feature +++ b/tests/v2/features/service_accounts.feature @@ -142,7 +142,7 @@ Feature: Service Accounts Scenario: Get an access token for a service account returns "Not Found" response Given new "GetServiceAccountAccessToken" request And request contains "service_account_id" parameter from "REPLACE.ME" - And request contains "pat_id" parameter from "REPLACE.ME" + And request contains "pat_uuid" parameter from "REPLACE.ME" When the request is sent Then the response status is 404 Not Found @@ -152,7 +152,7 @@ Feature: Service Accounts And there is a valid "service_account_access_token" for "service_account_user" And new "GetServiceAccountAccessToken" request And request contains "service_account_id" parameter from "service_account_user.data.id" - And request contains "pat_id" parameter from "service_account_access_token.data.id" + And request contains "pat_uuid" parameter from "service_account_access_token.data.id" When the request is sent Then the response status is 200 OK And the response "data.attributes.name" has the same value as "service_account_access_token.data.attributes.name" @@ -232,7 +232,7 @@ Feature: Service Accounts And there is a valid "service_account_access_token" for "service_account_user" And new "RevokeServiceAccountAccessToken" request And request contains "service_account_id" parameter from "service_account_user.data.id" - And request contains "pat_id" parameter from "service_account_access_token.data.id" + And request contains "pat_uuid" parameter from "service_account_access_token.data.id" When the request is sent Then the response status is 204 No Content @@ -240,7 +240,7 @@ Feature: Service Accounts Scenario: Revoke an access token for a service account returns "Not Found" response Given new "RevokeServiceAccountAccessToken" request And request contains "service_account_id" parameter from "REPLACE.ME" - And request contains "pat_id" parameter from "REPLACE.ME" + And request contains "pat_uuid" parameter from "REPLACE.ME" When the request is sent Then the response status is 404 Not Found @@ -248,7 +248,7 @@ Feature: Service Accounts Scenario: Update an access token for a service account returns "Bad Request" response Given new "UpdateServiceAccountAccessToken" request And request contains "service_account_id" parameter from "REPLACE.ME" - And request contains "pat_id" parameter from "REPLACE.ME" + And request contains "pat_uuid" parameter from "REPLACE.ME" And body with value {"data": {"attributes": {"name": "Updated Personal Access Token", "scopes": ["dashboards_read", "dashboards_write"]}, "id": "00112233-4455-6677-8899-aabbccddeeff", "type": "personal_access_tokens"}} When the request is sent Then the response status is 400 Bad Request @@ -257,7 +257,7 @@ Feature: Service Accounts Scenario: Update an access token for a service account returns "Not Found" response Given new "UpdateServiceAccountAccessToken" request And request contains "service_account_id" parameter from "REPLACE.ME" - And request contains "pat_id" parameter from "REPLACE.ME" + And request contains "pat_uuid" parameter from "REPLACE.ME" And body with value {"data": {"attributes": {"name": "Updated Personal Access Token", "scopes": ["dashboards_read", "dashboards_write"]}, "id": "00112233-4455-6677-8899-aabbccddeeff", "type": "personal_access_tokens"}} When the request is sent Then the response status is 404 Not Found @@ -268,7 +268,7 @@ Feature: Service Accounts And there is a valid "service_account_access_token" for "service_account_user" And new "UpdateServiceAccountAccessToken" request And request contains "service_account_id" parameter from "service_account_user.data.id" - And request contains "pat_id" parameter from "service_account_access_token.data.id" + And request contains "pat_uuid" parameter from "service_account_access_token.data.id" And body with value {"data": {"id": "{{ service_account_access_token.data.id }}", "type": "personal_access_tokens", "attributes": {"name": "{{ service_account_access_token.data.attributes.name }}-updated"}}} When the request is sent Then the response status is 200 OK diff --git a/tests/v2/features/undo.json b/tests/v2/features/undo.json index 994abc2524..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": { @@ -4222,12 +4228,6 @@ "type": "unsafe" } }, - "GetOrgGroupPolicy": { - "tag": "Org Groups", - "undo": { - "type": "safe" - } - }, "UpdateOrgGroupPolicy": { "tag": "Org Groups", "undo": { @@ -4264,12 +4264,6 @@ "type": "unsafe" } }, - "GetOrgGroupPolicyOverride": { - "tag": "Org Groups", - "undo": { - "type": "safe" - } - }, "UpdateOrgGroupPolicyOverride": { "tag": "Org Groups", "undo": { @@ -4330,7 +4324,7 @@ "operationId": "RevokePersonalAccessToken", "parameters": [ { - "name": "pat_id", + "name": "pat_uuid", "source": "data.id" } ], @@ -5895,7 +5889,7 @@ "source": "data.relationships.owned_by.data.id" }, { - "name": "pat_id", + "name": "pat_uuid", "source": "data.id" } ], @@ -6975,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