diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 5861fba12e8a..8d66d8407cc0 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/cassettes/features/v2/service_accounts/Create-an-access-token-for-a-service-account-returns-Created-response.frozen b/cassettes/features/v2/service_accounts/Create-an-access-token-for-a-service-account-returns-Created-response.frozen index 7ccf87f4bd58..b457d0ec92cf 100644 --- a/cassettes/features/v2/service_accounts/Create-an-access-token-for-a-service-account-returns-Created-response.frozen +++ b/cassettes/features/v2/service_accounts/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/cassettes/features/v2/service_accounts/Create-an-access-token-for-a-service-account-returns-Created-response.yml b/cassettes/features/v2/service_accounts/Create-an-access-token-for-a-service-account-returns-Created-response.yml index b7dbeb9a60d3..2964b70349fb 100644 --- a/cassettes/features/v2/service_accounts/Create-an-access-token-for-a-service-account-returns-Created-response.yml +++ b/cassettes/features/v2/service_accounts/Create-an-access-token-for-a-service-account-returns-Created-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Thu, 16 Apr 2026 20:03:06 GMT +- recorded_at: Fri, 03 Apr 2026 21:02:56 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"email":"Test-Create_an_access_token_for_a_service_account_returns_Created_response-1776369786@datadoghq.com","service_account":true,"title":"user + string: '{"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: @@ -15,7 +15,7 @@ http_interactions: response: body: encoding: UTF-8 - 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"}}}}} ' @@ -25,36 +25,36 @@ http_interactions: status: code: 201 message: Created -- recorded_at: Thu, 16 Apr 2026 20:03:06 GMT +- recorded_at: Fri, 03 Apr 2026 21:02:56 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"name":"Test-Create_an_access_token_for_a_service_account_returns_Created_response-1776369786","scopes":["dashboards_read"]},"type":"personal_access_tokens"}}' + string: '{"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: encoding: UTF-8 - 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 status: code: 201 message: Created -- recorded_at: Thu, 16 Apr 2026 20:03:06 GMT +- recorded_at: Fri, 03 Apr 2026 21:02:56 GMT request: body: null headers: 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: encoding: UTF-8 @@ -63,14 +63,14 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Thu, 16 Apr 2026 20:03:06 GMT +- recorded_at: Fri, 03 Apr 2026 21:02:56 GMT request: body: null headers: 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: encoding: UTF-8 diff --git a/cassettes/features/v2/service_accounts/Get-an-access-token-for-a-service-account-returns-OK-response.frozen b/cassettes/features/v2/service_accounts/Get-an-access-token-for-a-service-account-returns-OK-response.frozen index 767a9f9c2502..55c4828532cb 100644 --- a/cassettes/features/v2/service_accounts/Get-an-access-token-for-a-service-account-returns-OK-response.frozen +++ b/cassettes/features/v2/service_accounts/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/cassettes/features/v2/service_accounts/Get-an-access-token-for-a-service-account-returns-OK-response.yml b/cassettes/features/v2/service_accounts/Get-an-access-token-for-a-service-account-returns-OK-response.yml index df8615ef834c..9c7f35598c0a 100644 --- a/cassettes/features/v2/service_accounts/Get-an-access-token-for-a-service-account-returns-OK-response.yml +++ b/cassettes/features/v2/service_accounts/Get-an-access-token-for-a-service-account-returns-OK-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Thu, 16 Apr 2026 20:03:09 GMT +- recorded_at: Fri, 03 Apr 2026 21:03:03 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"email":"Test-Get_an_access_token_for_a_service_account_returns_OK_response-1776369789@datadoghq.com","service_account":true,"title":"user + string: '{"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: @@ -15,7 +15,7 @@ http_interactions: response: body: encoding: UTF-8 - 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"}}}}} ' @@ -25,54 +25,54 @@ http_interactions: status: code: 201 message: Created -- recorded_at: Thu, 16 Apr 2026 20:03:09 GMT +- recorded_at: Fri, 03 Apr 2026 21:03:03 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"name":"Test-Get_an_access_token_for_a_service_account_returns_OK_response-1776369789","scopes":["dashboards_read"]},"type":"personal_access_tokens"}}' + string: '{"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: encoding: UTF-8 - 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 status: code: 201 message: Created -- recorded_at: Thu, 16 Apr 2026 20:03:09 GMT +- recorded_at: Fri, 03 Apr 2026 21:03:03 GMT request: body: null headers: 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: encoding: UTF-8 - 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 status: code: 200 message: OK -- recorded_at: Thu, 16 Apr 2026 20:03:09 GMT +- recorded_at: Fri, 03 Apr 2026 21:03:03 GMT request: body: null headers: 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: encoding: UTF-8 @@ -81,14 +81,14 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Thu, 16 Apr 2026 20:03:09 GMT +- recorded_at: Fri, 03 Apr 2026 21:03:03 GMT request: body: null headers: 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: encoding: UTF-8 diff --git a/cassettes/features/v2/service_accounts/List-access-tokens-for-a-service-account-returns-OK-response.frozen b/cassettes/features/v2/service_accounts/List-access-tokens-for-a-service-account-returns-OK-response.frozen index db15643c3b71..6234af8a3e4b 100644 --- a/cassettes/features/v2/service_accounts/List-access-tokens-for-a-service-account-returns-OK-response.frozen +++ b/cassettes/features/v2/service_accounts/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/cassettes/features/v2/service_accounts/List-access-tokens-for-a-service-account-returns-OK-response.yml b/cassettes/features/v2/service_accounts/List-access-tokens-for-a-service-account-returns-OK-response.yml index e72127e401aa..2ffc4b46ca58 100644 --- a/cassettes/features/v2/service_accounts/List-access-tokens-for-a-service-account-returns-OK-response.yml +++ b/cassettes/features/v2/service_accounts/List-access-tokens-for-a-service-account-returns-OK-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Thu, 16 Apr 2026 20:03:10 GMT +- recorded_at: Fri, 03 Apr 2026 21:03:09 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"email":"Test-List_access_tokens_for_a_service_account_returns_OK_response-1776369790@datadoghq.com","service_account":true,"title":"user + string: '{"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: @@ -15,24 +15,22 @@ http_interactions: response: body: encoding: UTF-8 - 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 status: code: 201 message: Created -- recorded_at: Thu, 16 Apr 2026 20:03:10 GMT +- recorded_at: Fri, 03 Apr 2026 21:03:09 GMT request: body: null headers: 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: encoding: UTF-8 @@ -43,14 +41,14 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Thu, 16 Apr 2026 20:03:10 GMT +- recorded_at: Fri, 03 Apr 2026 21:03:09 GMT request: body: null headers: 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: encoding: UTF-8 diff --git a/cassettes/features/v2/service_accounts/Revoke-an-access-token-for-a-service-account-returns-No-Content-response.frozen b/cassettes/features/v2/service_accounts/Revoke-an-access-token-for-a-service-account-returns-No-Content-response.frozen index 4a8602fd9133..fa38ba91a95f 100644 --- a/cassettes/features/v2/service_accounts/Revoke-an-access-token-for-a-service-account-returns-No-Content-response.frozen +++ b/cassettes/features/v2/service_accounts/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/cassettes/features/v2/service_accounts/Revoke-an-access-token-for-a-service-account-returns-No-Content-response.yml b/cassettes/features/v2/service_accounts/Revoke-an-access-token-for-a-service-account-returns-No-Content-response.yml index f0f819471571..09cd39263394 100644 --- a/cassettes/features/v2/service_accounts/Revoke-an-access-token-for-a-service-account-returns-No-Content-response.yml +++ b/cassettes/features/v2/service_accounts/Revoke-an-access-token-for-a-service-account-returns-No-Content-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Thu, 16 Apr 2026 20:03:12 GMT +- recorded_at: Fri, 03 Apr 2026 21:03:10 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"email":"Test-Revoke_an_access_token_for_a_service_account_returns_No_Content_response-1776369792@datadoghq.com","service_account":true,"title":"user + string: '{"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: @@ -15,7 +15,7 @@ http_interactions: response: body: encoding: UTF-8 - 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"}}}}} ' @@ -25,36 +25,36 @@ http_interactions: status: code: 201 message: Created -- recorded_at: Thu, 16 Apr 2026 20:03:12 GMT +- recorded_at: Fri, 03 Apr 2026 21:03:10 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"name":"Test-Revoke_an_access_token_for_a_service_account_returns_No_Content_response-1776369792","scopes":["dashboards_read"]},"type":"personal_access_tokens"}}' + string: '{"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: encoding: UTF-8 - 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 status: code: 201 message: Created -- recorded_at: Thu, 16 Apr 2026 20:03:12 GMT +- recorded_at: Fri, 03 Apr 2026 21:03:10 GMT request: body: null headers: 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: encoding: UTF-8 @@ -63,14 +63,14 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Thu, 16 Apr 2026 20:03:12 GMT +- recorded_at: Fri, 03 Apr 2026 21:03:10 GMT request: body: null headers: 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: encoding: UTF-8 @@ -79,14 +79,14 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Thu, 16 Apr 2026 20:03:12 GMT +- recorded_at: Fri, 03 Apr 2026 21:03:10 GMT request: body: null headers: 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: encoding: UTF-8 diff --git a/cassettes/features/v2/service_accounts/Update-an-access-token-for-a-service-account-returns-OK-response.frozen b/cassettes/features/v2/service_accounts/Update-an-access-token-for-a-service-account-returns-OK-response.frozen index 58278ff6c0fe..6a894d59da19 100644 --- a/cassettes/features/v2/service_accounts/Update-an-access-token-for-a-service-account-returns-OK-response.frozen +++ b/cassettes/features/v2/service_accounts/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/cassettes/features/v2/service_accounts/Update-an-access-token-for-a-service-account-returns-OK-response.yml b/cassettes/features/v2/service_accounts/Update-an-access-token-for-a-service-account-returns-OK-response.yml index 55be92bbc34a..95f7be33a040 100644 --- a/cassettes/features/v2/service_accounts/Update-an-access-token-for-a-service-account-returns-OK-response.yml +++ b/cassettes/features/v2/service_accounts/Update-an-access-token-for-a-service-account-returns-OK-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Thu, 16 Apr 2026 20:03:14 GMT +- recorded_at: Fri, 03 Apr 2026 21:03:12 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"email":"Test-Update_an_access_token_for_a_service_account_returns_OK_response-1776369794@datadoghq.com","service_account":true,"title":"user + string: '{"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: @@ -15,7 +15,7 @@ http_interactions: response: body: encoding: UTF-8 - 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"}}}}} ' @@ -25,58 +25,58 @@ http_interactions: status: code: 201 message: Created -- recorded_at: Thu, 16 Apr 2026 20:03:14 GMT +- recorded_at: Fri, 03 Apr 2026 21:03:12 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"name":"Test-Update_an_access_token_for_a_service_account_returns_OK_response-1776369794","scopes":["dashboards_read"]},"type":"personal_access_tokens"}}' + string: '{"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: encoding: UTF-8 - 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 status: code: 201 message: Created -- recorded_at: Thu, 16 Apr 2026 20:03:14 GMT +- recorded_at: Fri, 03 Apr 2026 21:03:12 GMT request: body: encoding: UTF-8 - string: '{"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"}}' + string: '{"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: encoding: UTF-8 - 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 status: code: 200 message: OK -- recorded_at: Thu, 16 Apr 2026 20:03:14 GMT +- recorded_at: Fri, 03 Apr 2026 21:03:12 GMT request: body: null headers: 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: encoding: UTF-8 @@ -85,14 +85,14 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Thu, 16 Apr 2026 20:03:14 GMT +- recorded_at: Fri, 03 Apr 2026 21:03:12 GMT request: body: null headers: 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: encoding: UTF-8 diff --git a/examples/v2/org-groups/BulkUpdateOrgGroupMemberships.rb b/examples/v2/org-groups/BulkUpdateOrgGroupMemberships.rb index c3128154964a..35672135b9a5 100644 --- a/examples/v2/org-groups/BulkUpdateOrgGroupMemberships.rb +++ b/examples/v2/org-groups/BulkUpdateOrgGroupMemberships.rb @@ -11,7 +11,7 @@ attributes: DatadogAPIClient::V2::OrgGroupMembershipBulkUpdateAttributes.new({ orgs: [ DatadogAPIClient::V2::GlobalOrgIdentifier.new({ - org_site: "us1", + org_site: "datadoghq.com", org_uuid: "c3d4e5f6-a7b8-9012-cdef-012345678901", }), ], diff --git a/examples/v2/org-groups/CreateOrgGroupPolicy.rb b/examples/v2/org-groups/CreateOrgGroupPolicy.rb index f39901d82005..e4b2a2a9c671 100644 --- a/examples/v2/org-groups/CreateOrgGroupPolicy.rb +++ b/examples/v2/org-groups/CreateOrgGroupPolicy.rb @@ -12,9 +12,7 @@ content: { "value": "UTC", }, - enforcement_tier: DatadogAPIClient::V2::OrgGroupPolicyEnforcementTier::DEFAULT, policy_name: "monitor_timezone", - policy_type: DatadogAPIClient::V2::OrgGroupPolicyPolicyType::ORG_CONFIG, }), relationships: DatadogAPIClient::V2::OrgGroupPolicyCreateRelationships.new({ org_group: DatadogAPIClient::V2::OrgGroupRelationshipToOne.new({ diff --git a/examples/v2/org-groups/CreateOrgGroupPolicyOverride.rb b/examples/v2/org-groups/CreateOrgGroupPolicyOverride.rb index 16736de9efdf..a3f0884dc637 100644 --- a/examples/v2/org-groups/CreateOrgGroupPolicyOverride.rb +++ b/examples/v2/org-groups/CreateOrgGroupPolicyOverride.rb @@ -9,7 +9,7 @@ body = DatadogAPIClient::V2::OrgGroupPolicyOverrideCreateRequest.new({ data: DatadogAPIClient::V2::OrgGroupPolicyOverrideCreateData.new({ attributes: DatadogAPIClient::V2::OrgGroupPolicyOverrideCreateAttributes.new({ - org_site: "us1", + org_site: "datadoghq.com", org_uuid: "c3d4e5f6-a7b8-9012-cdef-012345678901", }), relationships: DatadogAPIClient::V2::OrgGroupPolicyOverrideCreateRelationships.new({ diff --git a/examples/v2/org-groups/GetOrgGroupPolicy.rb b/examples/v2/org-groups/GetOrgGroupPolicy.rb deleted file mode 100644 index 82cbabb2f764..000000000000 --- a/examples/v2/org-groups/GetOrgGroupPolicy.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Get an org group policy returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.get_org_group_policy".to_sym] = true -end -api_instance = DatadogAPIClient::V2::OrgGroupsAPI.new -p api_instance.get_org_group_policy("1a2b3c4d-5e6f-7890-abcd-ef0123456789") diff --git a/examples/v2/org-groups/GetOrgGroupPolicyOverride.rb b/examples/v2/org-groups/GetOrgGroupPolicyOverride.rb deleted file mode 100644 index d3e89c51e6d7..000000000000 --- a/examples/v2/org-groups/GetOrgGroupPolicyOverride.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Get an org group policy override returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.get_org_group_policy_override".to_sym] = true -end -api_instance = DatadogAPIClient::V2::OrgGroupsAPI.new -p api_instance.get_org_group_policy_override("9f8e7d6c-5b4a-3210-fedc-ba0987654321") diff --git a/examples/v2/org-groups/UpdateOrgGroupPolicy.rb b/examples/v2/org-groups/UpdateOrgGroupPolicy.rb index 12c658ee0b7f..8e4940120833 100644 --- a/examples/v2/org-groups/UpdateOrgGroupPolicy.rb +++ b/examples/v2/org-groups/UpdateOrgGroupPolicy.rb @@ -12,7 +12,6 @@ content: { "value": "UTC", }, - enforcement_tier: DatadogAPIClient::V2::OrgGroupPolicyEnforcementTier::DEFAULT, }), id: "1a2b3c4d-5e6f-7890-abcd-ef0123456789", type: DatadogAPIClient::V2::OrgGroupPolicyType::ORG_GROUP_POLICIES, diff --git a/examples/v2/org-groups/UpdateOrgGroupPolicyOverride.rb b/examples/v2/org-groups/UpdateOrgGroupPolicyOverride.rb index d4c9afbd9bf3..08feccf9e7f1 100644 --- a/examples/v2/org-groups/UpdateOrgGroupPolicyOverride.rb +++ b/examples/v2/org-groups/UpdateOrgGroupPolicyOverride.rb @@ -9,7 +9,7 @@ body = DatadogAPIClient::V2::OrgGroupPolicyOverrideUpdateRequest.new({ data: DatadogAPIClient::V2::OrgGroupPolicyOverrideUpdateData.new({ attributes: DatadogAPIClient::V2::OrgGroupPolicyOverrideUpdateAttributes.new({ - org_site: "us1", + org_site: "datadoghq.com", org_uuid: "c3d4e5f6-a7b8-9012-cdef-012345678901", }), id: "9f8e7d6c-5b4a-3210-fedc-ba0987654321", diff --git a/examples/v2/organizations/ListOrgs.rb b/examples/v2/organizations/ListOrgs.rb new file mode 100644 index 000000000000..efd03d6b5e87 --- /dev/null +++ b/examples/v2/organizations/ListOrgs.rb @@ -0,0 +1,5 @@ +# List your managed organizations returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::OrganizationsAPI.new +p api_instance.list_orgs() diff --git a/examples/v2/users/DeleteUserInvitations.rb b/examples/v2/users/DeleteUserInvitations.rb new file mode 100644 index 000000000000..35bb316263c4 --- /dev/null +++ b/examples/v2/users/DeleteUserInvitations.rb @@ -0,0 +1,5 @@ +# Delete a pending user's invitations returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::UsersAPI.new +p api_instance.delete_user_invitations("4dee724d-00cc-11ea-a77b-570c9d03c6c5") diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index 8490276de584..eed679de7054 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -1211,13 +1211,13 @@ "body" => "PersonalAccessTokenCreateRequest", }, "v2.RevokePersonalAccessToken" => { - "pat_id" => "String", + "pat_uuid" => "String", }, "v2.GetPersonalAccessToken" => { - "pat_id" => "String", + "pat_uuid" => "String", }, "v2.UpdatePersonalAccessToken" => { - "pat_id" => "String", + "pat_uuid" => "String", "body" => "PersonalAccessTokenUpdateRequest", }, "v2.ListAPIs" => { @@ -3378,6 +3378,9 @@ "v2.ResolveOnCallPage" => { "page_id" => "UUID", }, + "v2.ListOrgs" => { + "filter_name" => "String", + }, "v2.GetOrgConfig" => { "org_config_name" => "String", }, @@ -3434,9 +3437,6 @@ "v2.DeleteOrgGroupPolicy" => { "org_group_policy_id" => "UUID", }, - "v2.GetOrgGroupPolicy" => { - "org_group_policy_id" => "UUID", - }, "v2.UpdateOrgGroupPolicy" => { "org_group_policy_id" => "UUID", "body" => "OrgGroupPolicyUpdateRequest", @@ -3454,9 +3454,6 @@ "v2.DeleteOrgGroupPolicyOverride" => { "org_group_policy_override_id" => "UUID", }, - "v2.GetOrgGroupPolicyOverride" => { - "org_group_policy_override_id" => "UUID", - }, "v2.UpdateOrgGroupPolicyOverride" => { "org_group_policy_override_id" => "UUID", "body" => "OrgGroupPolicyOverrideUpdateRequest", @@ -3996,15 +3993,15 @@ }, "v2.RevokeServiceAccountAccessToken" => { "service_account_id" => "String", - "pat_id" => "String", + "pat_uuid" => "String", }, "v2.GetServiceAccountAccessToken" => { "service_account_id" => "String", - "pat_id" => "String", + "pat_uuid" => "String", }, "v2.UpdateServiceAccountAccessToken" => { "service_account_id" => "String", - "pat_id" => "String", + "pat_uuid" => "String", "body" => "PersonalAccessTokenUpdateRequest", }, "v2.ListServiceAccountApplicationKeys" => { @@ -4536,6 +4533,9 @@ "user_id" => "String", "body" => "UserUpdateRequest", }, + "v2.DeleteUserInvitations" => { + "user_id" => "UUID", + }, "v2.ListUserOrganizations" => { "user_id" => "String", }, diff --git a/features/v2/key_management.feature b/features/v2/key_management.feature index 365c53ed7c27..6c4648455625 100644 --- a/features/v2/key_management.feature +++ b/features/v2/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/features/v2/org_groups.feature b/features/v2/org_groups.feature index b8c5fe1b61d1..73cce63cd8eb 100644 --- a/features/v2/org_groups.feature +++ b/features/v2/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/features/v2/organizations.feature b/features/v2/organizations.feature index 45e56056c24f..d50c9a305d59 100644 --- a/features/v2/organizations.feature +++ b/features/v2/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/features/v2/service_accounts.feature b/features/v2/service_accounts.feature index fa8c81440e26..25744abc832d 100644 --- a/features/v2/service_accounts.feature +++ b/features/v2/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/features/v2/undo.json b/features/v2/undo.json index 994abc25242e..c154e02a9a20 100644 --- a/features/v2/undo.json +++ b/features/v2/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/features/v2/users.feature b/features/v2/users.feature index f64d3b894634..6e4f65eb57db 100644 --- a/features/v2/users.feature +++ b/features/v2/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 diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index 7275d82599ee..742cdd19b191 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -414,8 +414,6 @@ def initialize "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/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 0b2afd9c0965..0ebdd35ad794 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -3686,6 +3686,12 @@ def overrides "v2.maintenance_data_relationships_last_modified_by_user_data" => "MaintenanceDataRelationshipsLastModifiedByUserData", "v2.maintenance_data_relationships_status_page" => "MaintenanceDataRelationshipsStatusPage", "v2.maintenance_data_relationships_status_page_data" => "MaintenanceDataRelationshipsStatusPageData", + "v2.managed_orgs_data" => "ManagedOrgsData", + "v2.managed_orgs_relationships" => "ManagedOrgsRelationships", + "v2.managed_orgs_relationship_to_org" => "ManagedOrgsRelationshipToOrg", + "v2.managed_orgs_relationship_to_orgs" => "ManagedOrgsRelationshipToOrgs", + "v2.managed_orgs_response" => "ManagedOrgsResponse", + "v2.managed_orgs_type" => "ManagedOrgsType", "v2.member_team" => "MemberTeam", "v2.member_team_type" => "MemberTeamType", "v2.metadata" => "Metadata", @@ -4263,6 +4269,7 @@ def overrides "v2.organization" => "Organization", "v2.organization_attributes" => "OrganizationAttributes", "v2.organizations_type" => "OrganizationsType", + "v2.org_attributes" => "OrgAttributes", "v2.org_config_get_response" => "OrgConfigGetResponse", "v2.org_config_list_response" => "OrgConfigListResponse", "v2.org_config_read" => "OrgConfigRead", @@ -4293,6 +4300,7 @@ def overrides "v2.org_connection_user_relationship" => "OrgConnectionUserRelationship", "v2.org_connection_user_relationship_data" => "OrgConnectionUserRelationshipData", "v2.org_connection_user_relationship_data_type" => "OrgConnectionUserRelationshipDataType", + "v2.org_data" => "OrgData", "v2.org_group_attributes" => "OrgGroupAttributes", "v2.org_group_create_attributes" => "OrgGroupCreateAttributes", "v2.org_group_create_data" => "OrgGroupCreateData", @@ -4329,7 +4337,6 @@ def overrides "v2.org_group_policy_create_relationships" => "OrgGroupPolicyCreateRelationships", "v2.org_group_policy_create_request" => "OrgGroupPolicyCreateRequest", "v2.org_group_policy_data" => "OrgGroupPolicyData", - "v2.org_group_policy_enforcement_tier" => "OrgGroupPolicyEnforcementTier", "v2.org_group_policy_list_response" => "OrgGroupPolicyListResponse", "v2.org_group_policy_override_attributes" => "OrgGroupPolicyOverrideAttributes", "v2.org_group_policy_override_create_attributes" => "OrgGroupPolicyOverrideCreateAttributes", @@ -4345,7 +4352,6 @@ def overrides "v2.org_group_policy_override_update_attributes" => "OrgGroupPolicyOverrideUpdateAttributes", "v2.org_group_policy_override_update_data" => "OrgGroupPolicyOverrideUpdateData", "v2.org_group_policy_override_update_request" => "OrgGroupPolicyOverrideUpdateRequest", - "v2.org_group_policy_policy_type" => "OrgGroupPolicyPolicyType", "v2.org_group_policy_relationships" => "OrgGroupPolicyRelationships", "v2.org_group_policy_relationship_to_one" => "OrgGroupPolicyRelationshipToOne", "v2.org_group_policy_relationship_to_one_data" => "OrgGroupPolicyRelationshipToOneData", @@ -4364,6 +4370,8 @@ def overrides "v2.org_group_update_attributes" => "OrgGroupUpdateAttributes", "v2.org_group_update_data" => "OrgGroupUpdateData", "v2.org_group_update_request" => "OrgGroupUpdateRequest", + "v2.org_relationship_data" => "OrgRelationshipData", + "v2.org_resource_type" => "OrgResourceType", "v2.outbound_edge" => "OutboundEdge", "v2.outcomes_batch_attributes" => "OutcomesBatchAttributes", "v2.outcomes_batch_request" => "OutcomesBatchRequest", diff --git a/lib/datadog_api_client/v2/api/key_management_api.rb b/lib/datadog_api_client/v2/api/key_management_api.rb index a27d81dbfd96..8a6d256738c4 100644 --- a/lib/datadog_api_client/v2/api/key_management_api.rb +++ b/lib/datadog_api_client/v2/api/key_management_api.rb @@ -622,8 +622,8 @@ def get_current_user_application_key_with_http_info(app_key_id, opts = {}) # Get a personal access token. # # @see #get_personal_access_token_with_http_info - def get_personal_access_token(pat_id, opts = {}) - data, _status_code, _headers = get_personal_access_token_with_http_info(pat_id, opts) + def get_personal_access_token(pat_uuid, opts = {}) + data, _status_code, _headers = get_personal_access_token_with_http_info(pat_uuid, opts) data end @@ -631,20 +631,20 @@ def get_personal_access_token(pat_id, opts = {}) # # Get a specific personal access token by its UUID. # - # @param pat_id [String] The ID of the personal access token. + # @param pat_uuid [String] The UUID of the personal access token. # @param opts [Hash] the optional parameters # @return [Array<(PersonalAccessTokenResponse, Integer, Hash)>] PersonalAccessTokenResponse data, response status code and response headers - def get_personal_access_token_with_http_info(pat_id, opts = {}) + def get_personal_access_token_with_http_info(pat_uuid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: KeyManagementAPI.get_personal_access_token ...' end - # verify the required parameter 'pat_id' is set - if @api_client.config.client_side_validation && pat_id.nil? - fail ArgumentError, "Missing the required parameter 'pat_id' when calling KeyManagementAPI.get_personal_access_token" + # verify the required parameter 'pat_uuid' is set + if @api_client.config.client_side_validation && pat_uuid.nil? + fail ArgumentError, "Missing the required parameter 'pat_uuid' when calling KeyManagementAPI.get_personal_access_token" end # resource path - local_var_path = '/api/v2/personal_access_tokens/{pat_id}'.sub('{pat_id}', CGI.escape(pat_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/personal_access_tokens/{pat_uuid}'.sub('{pat_uuid}', CGI.escape(pat_uuid.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -1004,8 +1004,8 @@ def list_personal_access_tokens_with_http_info(opts = {}) # Revoke a personal access token. # # @see #revoke_personal_access_token_with_http_info - def revoke_personal_access_token(pat_id, opts = {}) - revoke_personal_access_token_with_http_info(pat_id, opts) + def revoke_personal_access_token(pat_uuid, opts = {}) + revoke_personal_access_token_with_http_info(pat_uuid, opts) nil end @@ -1013,20 +1013,20 @@ def revoke_personal_access_token(pat_id, opts = {}) # # Revoke a specific personal access token. # - # @param pat_id [String] The ID of the personal access token. + # @param pat_uuid [String] The UUID of the personal access token. # @param opts [Hash] the optional parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def revoke_personal_access_token_with_http_info(pat_id, opts = {}) + def revoke_personal_access_token_with_http_info(pat_uuid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: KeyManagementAPI.revoke_personal_access_token ...' end - # verify the required parameter 'pat_id' is set - if @api_client.config.client_side_validation && pat_id.nil? - fail ArgumentError, "Missing the required parameter 'pat_id' when calling KeyManagementAPI.revoke_personal_access_token" + # verify the required parameter 'pat_uuid' is set + if @api_client.config.client_side_validation && pat_uuid.nil? + fail ArgumentError, "Missing the required parameter 'pat_uuid' when calling KeyManagementAPI.revoke_personal_access_token" end # resource path - local_var_path = '/api/v2/personal_access_tokens/{pat_id}'.sub('{pat_id}', CGI.escape(pat_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/personal_access_tokens/{pat_uuid}'.sub('{pat_uuid}', CGI.escape(pat_uuid.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -1286,8 +1286,8 @@ def update_current_user_application_key_with_http_info(app_key_id, body, opts = # Update a personal access token. # # @see #update_personal_access_token_with_http_info - def update_personal_access_token(pat_id, body, opts = {}) - data, _status_code, _headers = update_personal_access_token_with_http_info(pat_id, body, opts) + def update_personal_access_token(pat_uuid, body, opts = {}) + data, _status_code, _headers = update_personal_access_token_with_http_info(pat_uuid, body, opts) data end @@ -1295,25 +1295,25 @@ def update_personal_access_token(pat_id, body, opts = {}) # # Update a specific personal access token. # - # @param pat_id [String] The ID of the personal access token. + # @param pat_uuid [String] The UUID of the personal access token. # @param body [PersonalAccessTokenUpdateRequest] # @param opts [Hash] the optional parameters # @return [Array<(PersonalAccessTokenResponse, Integer, Hash)>] PersonalAccessTokenResponse data, response status code and response headers - def update_personal_access_token_with_http_info(pat_id, body, opts = {}) + def update_personal_access_token_with_http_info(pat_uuid, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: KeyManagementAPI.update_personal_access_token ...' end - # verify the required parameter 'pat_id' is set - if @api_client.config.client_side_validation && pat_id.nil? - fail ArgumentError, "Missing the required parameter 'pat_id' when calling KeyManagementAPI.update_personal_access_token" + # verify the required parameter 'pat_uuid' is set + if @api_client.config.client_side_validation && pat_uuid.nil? + fail ArgumentError, "Missing the required parameter 'pat_uuid' when calling KeyManagementAPI.update_personal_access_token" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling KeyManagementAPI.update_personal_access_token" end # resource path - local_var_path = '/api/v2/personal_access_tokens/{pat_id}'.sub('{pat_id}', CGI.escape(pat_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/personal_access_tokens/{pat_uuid}'.sub('{pat_uuid}', CGI.escape(pat_uuid.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} diff --git a/lib/datadog_api_client/v2/api/org_groups_api.rb b/lib/datadog_api_client/v2/api/org_groups_api.rb index b413a33ecf84..cba0dbff0544 100644 --- a/lib/datadog_api_client/v2/api/org_groups_api.rb +++ b/lib/datadog_api_client/v2/api/org_groups_api.rb @@ -670,148 +670,6 @@ def get_org_group_membership_with_http_info(org_group_membership_id, opts = {}) return data, status_code, headers end - # Get an org group policy. - # - # @see #get_org_group_policy_with_http_info - def get_org_group_policy(org_group_policy_id, opts = {}) - data, _status_code, _headers = get_org_group_policy_with_http_info(org_group_policy_id, opts) - data - end - - # Get an org group policy. - # - # Get a specific organization group policy by its ID. - # - # @param org_group_policy_id [UUID] The ID of the org group policy. - # @param opts [Hash] the optional parameters - # @return [Array<(OrgGroupPolicyResponse, Integer, Hash)>] OrgGroupPolicyResponse data, response status code and response headers - def get_org_group_policy_with_http_info(org_group_policy_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.get_org_group_policy".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_org_group_policy") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_org_group_policy")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: OrgGroupsAPI.get_org_group_policy ...' - end - # verify the required parameter 'org_group_policy_id' is set - if @api_client.config.client_side_validation && org_group_policy_id.nil? - fail ArgumentError, "Missing the required parameter 'org_group_policy_id' when calling OrgGroupsAPI.get_org_group_policy" - end - # resource path - local_var_path = '/api/v2/org_group_policies/{org_group_policy_id}'.sub('{org_group_policy_id}', CGI.escape(org_group_policy_id.to_s).gsub('%2F', '/')) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'OrgGroupPolicyResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] - - new_options = opts.merge( - :operation => :get_org_group_policy, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: OrgGroupsAPI#get_org_group_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Get an org group policy override. - # - # @see #get_org_group_policy_override_with_http_info - def get_org_group_policy_override(org_group_policy_override_id, opts = {}) - data, _status_code, _headers = get_org_group_policy_override_with_http_info(org_group_policy_override_id, opts) - data - end - - # Get an org group policy override. - # - # Get a specific organization group policy override by its ID. - # - # @param org_group_policy_override_id [UUID] The ID of the org group policy override. - # @param opts [Hash] the optional parameters - # @return [Array<(OrgGroupPolicyOverrideResponse, Integer, Hash)>] OrgGroupPolicyOverrideResponse data, response status code and response headers - def get_org_group_policy_override_with_http_info(org_group_policy_override_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.get_org_group_policy_override".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_org_group_policy_override") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_org_group_policy_override")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: OrgGroupsAPI.get_org_group_policy_override ...' - end - # verify the required parameter 'org_group_policy_override_id' is set - if @api_client.config.client_side_validation && org_group_policy_override_id.nil? - fail ArgumentError, "Missing the required parameter 'org_group_policy_override_id' when calling OrgGroupsAPI.get_org_group_policy_override" - end - # resource path - local_var_path = '/api/v2/org_group_policy_overrides/{org_group_policy_override_id}'.sub('{org_group_policy_override_id}', CGI.escape(org_group_policy_override_id.to_s).gsub('%2F', '/')) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'OrgGroupPolicyOverrideResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] - - new_options = opts.merge( - :operation => :get_org_group_policy_override, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: OrgGroupsAPI#get_org_group_policy_override\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - # List org group memberships. # # @see #list_org_group_memberships_with_http_info @@ -1406,7 +1264,7 @@ def update_org_group_policy(org_group_policy_id, body, opts = {}) # 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 [UUID] The ID of the org group policy. # @param body [OrgGroupPolicyUpdateRequest] diff --git a/lib/datadog_api_client/v2/api/organizations_api.rb b/lib/datadog_api_client/v2/api/organizations_api.rb index 81c96e3eb18d..ea537b66bfef 100644 --- a/lib/datadog_api_client/v2/api/organizations_api.rb +++ b/lib/datadog_api_client/v2/api/organizations_api.rb @@ -148,6 +148,68 @@ def list_org_configs_with_http_info(opts = {}) return data, status_code, headers end + # List your managed organizations. + # + # @see #list_orgs_with_http_info + def list_orgs(opts = {}) + data, _status_code, _headers = list_orgs_with_http_info(opts) + data + end + + # List your managed organizations. + # + # Returns the current organization and its managed organizations in JSON:API format. + # + # @param opts [Hash] the optional parameters + # @option opts [String] :filter_name Filter managed organizations by name. + # @return [Array<(ManagedOrgsResponse, Integer, Hash)>] ManagedOrgsResponse data, response status code and response headers + def list_orgs_with_http_info(opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OrganizationsAPI.list_orgs ...' + end + # resource path + local_var_path = '/api/v2/org' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'filter[name]'] = opts[:'filter_name'] if !opts[:'filter_name'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ManagedOrgsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :list_orgs, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OrganizationsAPI#list_orgs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Update a specific Org Config. # # @see #update_org_config_with_http_info diff --git a/lib/datadog_api_client/v2/api/service_accounts_api.rb b/lib/datadog_api_client/v2/api/service_accounts_api.rb index ef823b7d407f..b4f6aa2afaea 100644 --- a/lib/datadog_api_client/v2/api/service_accounts_api.rb +++ b/lib/datadog_api_client/v2/api/service_accounts_api.rb @@ -307,8 +307,8 @@ def delete_service_account_application_key_with_http_info(service_account_id, ap # Get an access token for a service account. # # @see #get_service_account_access_token_with_http_info - def get_service_account_access_token(service_account_id, pat_id, opts = {}) - data, _status_code, _headers = get_service_account_access_token_with_http_info(service_account_id, pat_id, opts) + def get_service_account_access_token(service_account_id, pat_uuid, opts = {}) + data, _status_code, _headers = get_service_account_access_token_with_http_info(service_account_id, pat_uuid, opts) data end @@ -317,10 +317,10 @@ def get_service_account_access_token(service_account_id, pat_id, opts = {}) # Get a specific access token for a service account by its UUID. # # @param service_account_id [String] The ID of the service account. - # @param pat_id [String] The ID of the personal access token. + # @param pat_uuid [String] The UUID of the personal access token. # @param opts [Hash] the optional parameters # @return [Array<(PersonalAccessTokenResponse, Integer, Hash)>] PersonalAccessTokenResponse data, response status code and response headers - def get_service_account_access_token_with_http_info(service_account_id, pat_id, opts = {}) + def get_service_account_access_token_with_http_info(service_account_id, pat_uuid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ServiceAccountsAPI.get_service_account_access_token ...' @@ -329,12 +329,12 @@ def get_service_account_access_token_with_http_info(service_account_id, pat_id, if @api_client.config.client_side_validation && service_account_id.nil? fail ArgumentError, "Missing the required parameter 'service_account_id' when calling ServiceAccountsAPI.get_service_account_access_token" end - # verify the required parameter 'pat_id' is set - if @api_client.config.client_side_validation && pat_id.nil? - fail ArgumentError, "Missing the required parameter 'pat_id' when calling ServiceAccountsAPI.get_service_account_access_token" + # verify the required parameter 'pat_uuid' is set + if @api_client.config.client_side_validation && pat_uuid.nil? + fail ArgumentError, "Missing the required parameter 'pat_uuid' when calling ServiceAccountsAPI.get_service_account_access_token" end # resource path - local_var_path = '/api/v2/service_accounts/{service_account_id}/access_tokens/{pat_id}'.sub('{service_account_id}', CGI.escape(service_account_id.to_s).gsub('%2F', '/')).sub('{pat_id}', CGI.escape(pat_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/service_accounts/{service_account_id}/access_tokens/{pat_uuid}'.sub('{service_account_id}', CGI.escape(service_account_id.to_s).gsub('%2F', '/')).sub('{pat_uuid}', CGI.escape(pat_uuid.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -605,8 +605,8 @@ def list_service_account_application_keys_with_http_info(service_account_id, opt # Revoke an access token for a service account. # # @see #revoke_service_account_access_token_with_http_info - def revoke_service_account_access_token(service_account_id, pat_id, opts = {}) - revoke_service_account_access_token_with_http_info(service_account_id, pat_id, opts) + def revoke_service_account_access_token(service_account_id, pat_uuid, opts = {}) + revoke_service_account_access_token_with_http_info(service_account_id, pat_uuid, opts) nil end @@ -615,10 +615,10 @@ def revoke_service_account_access_token(service_account_id, pat_id, opts = {}) # Revoke a specific access token for a service account. # # @param service_account_id [String] The ID of the service account. - # @param pat_id [String] The ID of the personal access token. + # @param pat_uuid [String] The UUID of the personal access token. # @param opts [Hash] the optional parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def revoke_service_account_access_token_with_http_info(service_account_id, pat_id, opts = {}) + def revoke_service_account_access_token_with_http_info(service_account_id, pat_uuid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ServiceAccountsAPI.revoke_service_account_access_token ...' @@ -627,12 +627,12 @@ def revoke_service_account_access_token_with_http_info(service_account_id, pat_i if @api_client.config.client_side_validation && service_account_id.nil? fail ArgumentError, "Missing the required parameter 'service_account_id' when calling ServiceAccountsAPI.revoke_service_account_access_token" end - # verify the required parameter 'pat_id' is set - if @api_client.config.client_side_validation && pat_id.nil? - fail ArgumentError, "Missing the required parameter 'pat_id' when calling ServiceAccountsAPI.revoke_service_account_access_token" + # verify the required parameter 'pat_uuid' is set + if @api_client.config.client_side_validation && pat_uuid.nil? + fail ArgumentError, "Missing the required parameter 'pat_uuid' when calling ServiceAccountsAPI.revoke_service_account_access_token" end # resource path - local_var_path = '/api/v2/service_accounts/{service_account_id}/access_tokens/{pat_id}'.sub('{service_account_id}', CGI.escape(service_account_id.to_s).gsub('%2F', '/')).sub('{pat_id}', CGI.escape(pat_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/service_accounts/{service_account_id}/access_tokens/{pat_uuid}'.sub('{service_account_id}', CGI.escape(service_account_id.to_s).gsub('%2F', '/')).sub('{pat_uuid}', CGI.escape(pat_uuid.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -675,8 +675,8 @@ def revoke_service_account_access_token_with_http_info(service_account_id, pat_i # Update an access token for a service account. # # @see #update_service_account_access_token_with_http_info - def update_service_account_access_token(service_account_id, pat_id, body, opts = {}) - data, _status_code, _headers = update_service_account_access_token_with_http_info(service_account_id, pat_id, body, opts) + def update_service_account_access_token(service_account_id, pat_uuid, body, opts = {}) + data, _status_code, _headers = update_service_account_access_token_with_http_info(service_account_id, pat_uuid, body, opts) data end @@ -685,11 +685,11 @@ def update_service_account_access_token(service_account_id, pat_id, body, opts = # Update a specific access token for a service account. # # @param service_account_id [String] The ID of the service account. - # @param pat_id [String] The ID of the personal access token. + # @param pat_uuid [String] The UUID of the personal access token. # @param body [PersonalAccessTokenUpdateRequest] # @param opts [Hash] the optional parameters # @return [Array<(PersonalAccessTokenResponse, Integer, Hash)>] PersonalAccessTokenResponse data, response status code and response headers - def update_service_account_access_token_with_http_info(service_account_id, pat_id, body, opts = {}) + def update_service_account_access_token_with_http_info(service_account_id, pat_uuid, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ServiceAccountsAPI.update_service_account_access_token ...' @@ -698,16 +698,16 @@ def update_service_account_access_token_with_http_info(service_account_id, pat_i if @api_client.config.client_side_validation && service_account_id.nil? fail ArgumentError, "Missing the required parameter 'service_account_id' when calling ServiceAccountsAPI.update_service_account_access_token" end - # verify the required parameter 'pat_id' is set - if @api_client.config.client_side_validation && pat_id.nil? - fail ArgumentError, "Missing the required parameter 'pat_id' when calling ServiceAccountsAPI.update_service_account_access_token" + # verify the required parameter 'pat_uuid' is set + if @api_client.config.client_side_validation && pat_uuid.nil? + fail ArgumentError, "Missing the required parameter 'pat_uuid' when calling ServiceAccountsAPI.update_service_account_access_token" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling ServiceAccountsAPI.update_service_account_access_token" end # resource path - local_var_path = '/api/v2/service_accounts/{service_account_id}/access_tokens/{pat_id}'.sub('{service_account_id}', CGI.escape(service_account_id.to_s).gsub('%2F', '/')).sub('{pat_id}', CGI.escape(pat_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/service_accounts/{service_account_id}/access_tokens/{pat_uuid}'.sub('{service_account_id}', CGI.escape(service_account_id.to_s).gsub('%2F', '/')).sub('{pat_uuid}', CGI.escape(pat_uuid.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} diff --git a/lib/datadog_api_client/v2/api/users_api.rb b/lib/datadog_api_client/v2/api/users_api.rb index 71cb5bfe4bf3..fd7534d096f0 100644 --- a/lib/datadog_api_client/v2/api/users_api.rb +++ b/lib/datadog_api_client/v2/api/users_api.rb @@ -90,6 +90,72 @@ def create_user_with_http_info(body, opts = {}) return data, status_code, headers end + # Delete a pending user's invitations. + # + # @see #delete_user_invitations_with_http_info + def delete_user_invitations(user_id, opts = {}) + delete_user_invitations_with_http_info(user_id, opts) + nil + end + + # Delete a pending user's invitations. + # + # Cancel all pending invitations for a specified user. + # Requires the `user_access_invite` permission. + # + # @param user_id [UUID] The UUID of the user whose pending invitations should be canceled. + # @param opts [Hash] the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_user_invitations_with_http_info(user_id, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: UsersAPI.delete_user_invitations ...' + end + # verify the required parameter 'user_id' is set + if @api_client.config.client_side_validation && user_id.nil? + fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersAPI.delete_user_invitations" + end + # resource path + local_var_path = '/api/v2/users/{user_id}/invitations'.sub('{user_id}', CGI.escape(user_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :delete_user_invitations, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: UsersAPI#delete_user_invitations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Disable a user. # # @see #disable_user_with_http_info diff --git a/lib/datadog_api_client/v2/models/full_personal_access_token_attributes.rb b/lib/datadog_api_client/v2/models/full_personal_access_token_attributes.rb index 6052e702996d..023240d058c4 100644 --- a/lib/datadog_api_client/v2/models/full_personal_access_token_attributes.rb +++ b/lib/datadog_api_client/v2/models/full_personal_access_token_attributes.rb @@ -21,6 +21,9 @@ module DatadogAPIClient::V2 class FullPersonalAccessTokenAttributes include BaseGenericModel + # The alias (short identifier) of the personal access token. + attr_accessor :_alias + # Creation date of the personal access token. attr_accessor :created_at @@ -45,6 +48,7 @@ class FullPersonalAccessTokenAttributes # @!visibility private def self.attribute_map { + :'_alias' => :'alias', :'created_at' => :'created_at', :'expires_at' => :'expires_at', :'key' => :'key', @@ -58,6 +62,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'_alias' => :'String', :'created_at' => :'Time', :'expires_at' => :'Time', :'key' => :'String', @@ -93,6 +98,10 @@ def initialize(attributes = {}) end } + if attributes.key?(:'_alias') + self._alias = attributes[:'_alias'] + end + if attributes.key?(:'created_at') self.created_at = attributes[:'created_at'] end @@ -146,6 +155,7 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && + _alias == o._alias && created_at == o.created_at && expires_at == o.expires_at && key == o.key && @@ -159,7 +169,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [created_at, expires_at, key, name, public_portion, scopes, additional_properties].hash + [_alias, created_at, expires_at, key, name, public_portion, scopes, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/managed_orgs_data.rb b/lib/datadog_api_client/v2/models/managed_orgs_data.rb new file mode 100644 index 000000000000..9378adbe4657 --- /dev/null +++ b/lib/datadog_api_client/v2/models/managed_orgs_data.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The managed organizations resource. + class ManagedOrgsData + include BaseGenericModel + + # The UUID of the current organization. + attr_reader :id + + # Relationships of the managed organizations resource. + attr_reader :relationships + + # The resource type for managed organizations. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'relationships' => :'relationships', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'UUID', + :'relationships' => :'ManagedOrgsRelationships', + :'type' => :'ManagedOrgsType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ManagedOrgsData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'relationships') + self.relationships = attributes[:'relationships'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @id.nil? + return false if @relationships.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param relationships [Object] Object to be assigned + # @!visibility private + def relationships=(relationships) + if relationships.nil? + fail ArgumentError, 'invalid value for "relationships", relationships cannot be nil.' + end + @relationships = relationships + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + relationships == o.relationships && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, relationships, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/managed_orgs_relationship_to_org.rb b/lib/datadog_api_client/v2/models/managed_orgs_relationship_to_org.rb new file mode 100644 index 000000000000..5a676085ef68 --- /dev/null +++ b/lib/datadog_api_client/v2/models/managed_orgs_relationship_to_org.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Relationship to the current organization. + class ManagedOrgsRelationshipToOrg + include BaseGenericModel + + # Reference to an organization resource. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'OrgRelationshipData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ManagedOrgsRelationshipToOrg` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/managed_orgs_relationship_to_orgs.rb b/lib/datadog_api_client/v2/models/managed_orgs_relationship_to_orgs.rb new file mode 100644 index 000000000000..7fde595f0675 --- /dev/null +++ b/lib/datadog_api_client/v2/models/managed_orgs_relationship_to_orgs.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Relationship to the managed organizations. + class ManagedOrgsRelationshipToOrgs + include BaseGenericModel + + # List of managed organization references. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ManagedOrgsRelationshipToOrgs` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/managed_orgs_relationships.rb b/lib/datadog_api_client/v2/models/managed_orgs_relationships.rb new file mode 100644 index 000000000000..0be17f9ed0bb --- /dev/null +++ b/lib/datadog_api_client/v2/models/managed_orgs_relationships.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Relationships of the managed organizations resource. + class ManagedOrgsRelationships + include BaseGenericModel + + # Relationship to the current organization. + attr_reader :current_org + + # Relationship to the managed organizations. + attr_reader :managed_orgs + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'current_org' => :'current_org', + :'managed_orgs' => :'managed_orgs' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'current_org' => :'ManagedOrgsRelationshipToOrg', + :'managed_orgs' => :'ManagedOrgsRelationshipToOrgs' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ManagedOrgsRelationships` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'current_org') + self.current_org = attributes[:'current_org'] + end + + if attributes.key?(:'managed_orgs') + self.managed_orgs = attributes[:'managed_orgs'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @current_org.nil? + return false if @managed_orgs.nil? + true + end + + # Custom attribute writer method with validation + # @param current_org [Object] Object to be assigned + # @!visibility private + def current_org=(current_org) + if current_org.nil? + fail ArgumentError, 'invalid value for "current_org", current_org cannot be nil.' + end + @current_org = current_org + end + + # Custom attribute writer method with validation + # @param managed_orgs [Object] Object to be assigned + # @!visibility private + def managed_orgs=(managed_orgs) + if managed_orgs.nil? + fail ArgumentError, 'invalid value for "managed_orgs", managed_orgs cannot be nil.' + end + @managed_orgs = managed_orgs + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + current_org == o.current_org && + managed_orgs == o.managed_orgs && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [current_org, managed_orgs, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/managed_orgs_response.rb b/lib/datadog_api_client/v2/models/managed_orgs_response.rb new file mode 100644 index 000000000000..2426f97835c4 --- /dev/null +++ b/lib/datadog_api_client/v2/models/managed_orgs_response.rb @@ -0,0 +1,146 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response containing the current organization and its managed organizations. + class ManagedOrgsResponse + include BaseGenericModel + + # The managed organizations resource. + attr_reader :data + + # Included organization resources. + attr_reader :included + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data', + :'included' => :'included' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'ManagedOrgsData', + :'included' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ManagedOrgsResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + + if attributes.key?(:'included') + if (value = attributes[:'included']).is_a?(Array) + self.included = value + end + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + return false if @included.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Custom attribute writer method with validation + # @param included [Object] Object to be assigned + # @!visibility private + def included=(included) + if included.nil? + fail ArgumentError, 'invalid value for "included", included cannot be nil.' + end + @included = included + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + included == o.included && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, included, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/org_group_policy_policy_type.rb b/lib/datadog_api_client/v2/models/managed_orgs_type.rb similarity index 74% rename from lib/datadog_api_client/v2/models/org_group_policy_policy_type.rb rename to lib/datadog_api_client/v2/models/managed_orgs_type.rb index 6d19923037d1..9c6d8b863961 100644 --- a/lib/datadog_api_client/v2/models/org_group_policy_policy_type.rb +++ b/lib/datadog_api_client/v2/models/managed_orgs_type.rb @@ -17,10 +17,10 @@ require 'time' module DatadogAPIClient::V2 - # The type of the policy. Only `org_config` is supported, indicating a policy backed by an organization configuration setting. - class OrgGroupPolicyPolicyType + # The resource type for managed organizations. + class ManagedOrgsType include BaseEnumModel - ORG_CONFIG = "org_config".freeze + MANAGED_ORGS = "managed_orgs".freeze end end diff --git a/lib/datadog_api_client/v2/models/org_attributes.rb b/lib/datadog_api_client/v2/models/org_attributes.rb new file mode 100644 index 000000000000..57c6c2e6fb3f --- /dev/null +++ b/lib/datadog_api_client/v2/models/org_attributes.rb @@ -0,0 +1,270 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of an organization. + class OrgAttributes + include BaseGenericModel + + # The creation timestamp of the organization. + attr_reader :created_at + + # A description of the organization. + attr_reader :description + + # Whether the organization is disabled. + attr_reader :disabled + + # The last modification timestamp of the organization. + attr_reader :modified_at + + # The name of the organization. + attr_reader :name + + # The public identifier of the organization. + attr_reader :public_id + + # The sharing setting of the organization. + attr_reader :sharing + + # The URL of the organization. + attr_reader :url + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'created_at' => :'created_at', + :'description' => :'description', + :'disabled' => :'disabled', + :'modified_at' => :'modified_at', + :'name' => :'name', + :'public_id' => :'public_id', + :'sharing' => :'sharing', + :'url' => :'url' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'created_at' => :'Time', + :'description' => :'String', + :'disabled' => :'Boolean', + :'modified_at' => :'Time', + :'name' => :'String', + :'public_id' => :'String', + :'sharing' => :'String', + :'url' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'disabled') + self.disabled = attributes[:'disabled'] + end + + if attributes.key?(:'modified_at') + self.modified_at = attributes[:'modified_at'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'public_id') + self.public_id = attributes[:'public_id'] + end + + if attributes.key?(:'sharing') + self.sharing = attributes[:'sharing'] + end + + if attributes.key?(:'url') + self.url = attributes[:'url'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @created_at.nil? + return false if @description.nil? + return false if @disabled.nil? + return false if @modified_at.nil? + return false if @name.nil? + return false if @public_id.nil? + return false if @sharing.nil? + return false if @url.nil? + true + end + + # Custom attribute writer method with validation + # @param created_at [Object] Object to be assigned + # @!visibility private + def created_at=(created_at) + if created_at.nil? + fail ArgumentError, 'invalid value for "created_at", created_at cannot be nil.' + end + @created_at = created_at + end + + # Custom attribute writer method with validation + # @param description [Object] Object to be assigned + # @!visibility private + def description=(description) + if description.nil? + fail ArgumentError, 'invalid value for "description", description cannot be nil.' + end + @description = description + end + + # Custom attribute writer method with validation + # @param disabled [Object] Object to be assigned + # @!visibility private + def disabled=(disabled) + if disabled.nil? + fail ArgumentError, 'invalid value for "disabled", disabled cannot be nil.' + end + @disabled = disabled + end + + # Custom attribute writer method with validation + # @param modified_at [Object] Object to be assigned + # @!visibility private + def modified_at=(modified_at) + if modified_at.nil? + fail ArgumentError, 'invalid value for "modified_at", modified_at cannot be nil.' + end + @modified_at = modified_at + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Custom attribute writer method with validation + # @param public_id [Object] Object to be assigned + # @!visibility private + def public_id=(public_id) + if public_id.nil? + fail ArgumentError, 'invalid value for "public_id", public_id cannot be nil.' + end + @public_id = public_id + end + + # Custom attribute writer method with validation + # @param sharing [Object] Object to be assigned + # @!visibility private + def sharing=(sharing) + if sharing.nil? + fail ArgumentError, 'invalid value for "sharing", sharing cannot be nil.' + end + @sharing = sharing + end + + # Custom attribute writer method with validation + # @param url [Object] Object to be assigned + # @!visibility private + def url=(url) + if url.nil? + fail ArgumentError, 'invalid value for "url", url cannot be nil.' + end + @url = url + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + created_at == o.created_at && + description == o.description && + disabled == o.disabled && + modified_at == o.modified_at && + name == o.name && + public_id == o.public_id && + sharing == o.sharing && + url == o.url && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [created_at, description, disabled, modified_at, name, public_id, sharing, url, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/org_data.rb b/lib/datadog_api_client/v2/models/org_data.rb new file mode 100644 index 000000000000..26647e9672c0 --- /dev/null +++ b/lib/datadog_api_client/v2/models/org_data.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # An organization resource. + class OrgData + include BaseGenericModel + + # Attributes of an organization. + attr_reader :attributes + + # The UUID of the organization. + attr_reader :id + + # The resource type for organizations. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'OrgAttributes', + :'id' => :'UUID', + :'type' => :'OrgResourceType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/org_group_policy_attributes.rb b/lib/datadog_api_client/v2/models/org_group_policy_attributes.rb index 5e2e80bc59ae..2c9ad6b9c8b7 100644 --- a/lib/datadog_api_client/v2/models/org_group_policy_attributes.rb +++ b/lib/datadog_api_client/v2/models/org_group_policy_attributes.rb @@ -24,8 +24,8 @@ class OrgGroupPolicyAttributes # The policy content as key-value pairs. attr_accessor :content - # 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. - attr_reader :enforcement_tier + # Timestamp when the policy was enforced. + attr_reader :enforced_at # Timestamp when the policy was last modified. attr_reader :modified_at @@ -33,9 +33,6 @@ class OrgGroupPolicyAttributes # The name of the policy. attr_reader :policy_name - # The type of the policy. Only `org_config` is supported, indicating a policy backed by an organization configuration setting. - attr_reader :policy_type - attr_accessor :additional_properties # Attribute mapping from ruby-style variable name to JSON key. @@ -43,10 +40,9 @@ class OrgGroupPolicyAttributes def self.attribute_map { :'content' => :'content', - :'enforcement_tier' => :'enforcement_tier', + :'enforced_at' => :'enforced_at', :'modified_at' => :'modified_at', - :'policy_name' => :'policy_name', - :'policy_type' => :'policy_type' + :'policy_name' => :'policy_name' } end @@ -55,10 +51,9 @@ def self.attribute_map def self.openapi_types { :'content' => :'Hash', - :'enforcement_tier' => :'OrgGroupPolicyEnforcementTier', + :'enforced_at' => :'Time', :'modified_at' => :'Time', - :'policy_name' => :'String', - :'policy_type' => :'OrgGroupPolicyPolicyType' + :'policy_name' => :'String' } end @@ -84,8 +79,8 @@ def initialize(attributes = {}) self.content = attributes[:'content'] end - if attributes.key?(:'enforcement_tier') - self.enforcement_tier = attributes[:'enforcement_tier'] + if attributes.key?(:'enforced_at') + self.enforced_at = attributes[:'enforced_at'] end if attributes.key?(:'modified_at') @@ -95,31 +90,26 @@ def initialize(attributes = {}) if attributes.key?(:'policy_name') self.policy_name = attributes[:'policy_name'] end - - if attributes.key?(:'policy_type') - self.policy_type = attributes[:'policy_type'] - end end # Check to see if the all the properties in the model are valid # @return true if the model is valid # @!visibility private def valid? - return false if @enforcement_tier.nil? + return false if @enforced_at.nil? return false if @modified_at.nil? return false if @policy_name.nil? - return false if @policy_type.nil? true end # Custom attribute writer method with validation - # @param enforcement_tier [Object] Object to be assigned + # @param enforced_at [Object] Object to be assigned # @!visibility private - def enforcement_tier=(enforcement_tier) - if enforcement_tier.nil? - fail ArgumentError, 'invalid value for "enforcement_tier", enforcement_tier cannot be nil.' + def enforced_at=(enforced_at) + if enforced_at.nil? + fail ArgumentError, 'invalid value for "enforced_at", enforced_at cannot be nil.' end - @enforcement_tier = enforcement_tier + @enforced_at = enforced_at end # Custom attribute writer method with validation @@ -142,16 +132,6 @@ def policy_name=(policy_name) @policy_name = policy_name end - # Custom attribute writer method with validation - # @param policy_type [Object] Object to be assigned - # @!visibility private - def policy_type=(policy_type) - if policy_type.nil? - fail ArgumentError, 'invalid value for "policy_type", policy_type cannot be nil.' - end - @policy_type = policy_type - end - # Returns the object in the form of hash, with additionalProperties support. # @return [Hash] Returns the object in the form of hash # @!visibility private @@ -179,10 +159,9 @@ def ==(o) return true if self.equal?(o) self.class == o.class && content == o.content && - enforcement_tier == o.enforcement_tier && + enforced_at == o.enforced_at && modified_at == o.modified_at && policy_name == o.policy_name && - policy_type == o.policy_type && additional_properties == o.additional_properties end @@ -190,7 +169,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [content, enforcement_tier, modified_at, policy_name, policy_type, additional_properties].hash + [content, enforced_at, modified_at, policy_name, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/org_group_policy_create_attributes.rb b/lib/datadog_api_client/v2/models/org_group_policy_create_attributes.rb index 67ed3baa68df..0fd04ad95d72 100644 --- a/lib/datadog_api_client/v2/models/org_group_policy_create_attributes.rb +++ b/lib/datadog_api_client/v2/models/org_group_policy_create_attributes.rb @@ -17,22 +17,16 @@ require 'time' module DatadogAPIClient::V2 - # 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. class OrgGroupPolicyCreateAttributes include BaseGenericModel # The policy content as key-value pairs. attr_reader :content - # 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. - attr_accessor :enforcement_tier - # The name of the policy. attr_reader :policy_name - # The type of the policy. Only `org_config` is supported, indicating a policy backed by an organization configuration setting. - attr_accessor :policy_type - attr_accessor :additional_properties # Attribute mapping from ruby-style variable name to JSON key. @@ -40,9 +34,7 @@ class OrgGroupPolicyCreateAttributes def self.attribute_map { :'content' => :'content', - :'enforcement_tier' => :'enforcement_tier', - :'policy_name' => :'policy_name', - :'policy_type' => :'policy_type' + :'policy_name' => :'policy_name' } end @@ -51,9 +43,7 @@ def self.attribute_map def self.openapi_types { :'content' => :'Hash', - :'enforcement_tier' => :'OrgGroupPolicyEnforcementTier', - :'policy_name' => :'String', - :'policy_type' => :'OrgGroupPolicyPolicyType' + :'policy_name' => :'String' } end @@ -79,17 +69,9 @@ def initialize(attributes = {}) self.content = attributes[:'content'] end - if attributes.key?(:'enforcement_tier') - self.enforcement_tier = attributes[:'enforcement_tier'] - end - if attributes.key?(:'policy_name') self.policy_name = attributes[:'policy_name'] end - - if attributes.key?(:'policy_type') - self.policy_type = attributes[:'policy_type'] - end end # Check to see if the all the properties in the model are valid @@ -148,9 +130,7 @@ def ==(o) return true if self.equal?(o) self.class == o.class && content == o.content && - enforcement_tier == o.enforcement_tier && policy_name == o.policy_name && - policy_type == o.policy_type && additional_properties == o.additional_properties end @@ -158,7 +138,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [content, enforcement_tier, policy_name, policy_type, additional_properties].hash + [content, policy_name, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/org_group_policy_create_data.rb b/lib/datadog_api_client/v2/models/org_group_policy_create_data.rb index f1c29034fbb0..f809cb844117 100644 --- a/lib/datadog_api_client/v2/models/org_group_policy_create_data.rb +++ b/lib/datadog_api_client/v2/models/org_group_policy_create_data.rb @@ -21,7 +21,7 @@ module DatadogAPIClient::V2 class OrgGroupPolicyCreateData include BaseGenericModel - # 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. attr_reader :attributes # Relationships for creating a policy. diff --git a/lib/datadog_api_client/v2/models/org_group_policy_override_update_attributes.rb b/lib/datadog_api_client/v2/models/org_group_policy_override_update_attributes.rb index 2d03db55af33..9b6342aa50df 100644 --- a/lib/datadog_api_client/v2/models/org_group_policy_override_update_attributes.rb +++ b/lib/datadog_api_client/v2/models/org_group_policy_override_update_attributes.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # 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. class OrgGroupPolicyOverrideUpdateAttributes include BaseGenericModel diff --git a/lib/datadog_api_client/v2/models/org_group_policy_override_update_data.rb b/lib/datadog_api_client/v2/models/org_group_policy_override_update_data.rb index 3fabee09c684..7f94fdad98ba 100644 --- a/lib/datadog_api_client/v2/models/org_group_policy_override_update_data.rb +++ b/lib/datadog_api_client/v2/models/org_group_policy_override_update_data.rb @@ -21,7 +21,7 @@ module DatadogAPIClient::V2 class OrgGroupPolicyOverrideUpdateData include BaseGenericModel - # 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. attr_reader :attributes # The ID of the policy override. diff --git a/lib/datadog_api_client/v2/models/org_group_policy_update_attributes.rb b/lib/datadog_api_client/v2/models/org_group_policy_update_attributes.rb index 9ec9b8cc9b3e..e61b52039899 100644 --- a/lib/datadog_api_client/v2/models/org_group_policy_update_attributes.rb +++ b/lib/datadog_api_client/v2/models/org_group_policy_update_attributes.rb @@ -24,17 +24,13 @@ class OrgGroupPolicyUpdateAttributes # The policy content as key-value pairs. attr_accessor :content - # 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. - attr_accessor :enforcement_tier - attr_accessor :additional_properties # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map { - :'content' => :'content', - :'enforcement_tier' => :'enforcement_tier' + :'content' => :'content' } end @@ -42,8 +38,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'content' => :'Hash', - :'enforcement_tier' => :'OrgGroupPolicyEnforcementTier' + :'content' => :'Hash' } end @@ -68,10 +63,6 @@ def initialize(attributes = {}) if attributes.key?(:'content') self.content = attributes[:'content'] end - - if attributes.key?(:'enforcement_tier') - self.enforcement_tier = attributes[:'enforcement_tier'] - end end # Returns the object in the form of hash, with additionalProperties support. @@ -101,7 +92,6 @@ def ==(o) return true if self.equal?(o) self.class == o.class && content == o.content && - enforcement_tier == o.enforcement_tier && additional_properties == o.additional_properties end @@ -109,7 +99,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [content, enforcement_tier, additional_properties].hash + [content, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/org_relationship_data.rb b/lib/datadog_api_client/v2/models/org_relationship_data.rb new file mode 100644 index 000000000000..7708542abfa4 --- /dev/null +++ b/lib/datadog_api_client/v2/models/org_relationship_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Reference to an organization resource. + class OrgRelationshipData + include BaseGenericModel + + # The UUID of the organization. + attr_reader :id + + # The resource type for organizations. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'UUID', + :'type' => :'OrgResourceType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OrgRelationshipData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/org_group_policy_enforcement_tier.rb b/lib/datadog_api_client/v2/models/org_resource_type.rb similarity index 59% rename from lib/datadog_api_client/v2/models/org_group_policy_enforcement_tier.rb rename to lib/datadog_api_client/v2/models/org_resource_type.rb index b9bdbc49997e..3358410c8a11 100644 --- a/lib/datadog_api_client/v2/models/org_group_policy_enforcement_tier.rb +++ b/lib/datadog_api_client/v2/models/org_resource_type.rb @@ -17,12 +17,10 @@ require 'time' module DatadogAPIClient::V2 - # 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. - class OrgGroupPolicyEnforcementTier + # The resource type for organizations. + class OrgResourceType include BaseEnumModel - DEFAULT = "DEFAULT".freeze - ENFORCE = "ENFORCE".freeze - DELEGATE = "DELEGATE".freeze + ORGS = "orgs".freeze end end diff --git a/lib/datadog_api_client/v2/models/personal_access_token_attributes.rb b/lib/datadog_api_client/v2/models/personal_access_token_attributes.rb index 118f6c7514b8..76dcff50d4b8 100644 --- a/lib/datadog_api_client/v2/models/personal_access_token_attributes.rb +++ b/lib/datadog_api_client/v2/models/personal_access_token_attributes.rb @@ -21,6 +21,9 @@ module DatadogAPIClient::V2 class PersonalAccessTokenAttributes include BaseGenericModel + # The alias (short identifier) of the personal access token. + attr_accessor :_alias + # Creation date of the personal access token. attr_accessor :created_at @@ -48,6 +51,7 @@ class PersonalAccessTokenAttributes # @!visibility private def self.attribute_map { + :'_alias' => :'alias', :'created_at' => :'created_at', :'expires_at' => :'expires_at', :'last_used_at' => :'last_used_at', @@ -62,6 +66,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'_alias' => :'String', :'created_at' => :'Time', :'expires_at' => :'Time', :'last_used_at' => :'Time', @@ -100,6 +105,10 @@ def initialize(attributes = {}) end } + if attributes.key?(:'_alias') + self._alias = attributes[:'_alias'] + end + if attributes.key?(:'created_at') self.created_at = attributes[:'created_at'] end @@ -157,6 +166,7 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && + _alias == o._alias && created_at == o.created_at && expires_at == o.expires_at && last_used_at == o.last_used_at && @@ -171,7 +181,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [created_at, expires_at, last_used_at, modified_at, name, public_portion, scopes, additional_properties].hash + [_alias, created_at, expires_at, last_used_at, modified_at, name, public_portion, scopes, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/user_attributes.rb b/lib/datadog_api_client/v2/models/user_attributes.rb index f15a2014c001..a62ccc455cec 100644 --- a/lib/datadog_api_client/v2/models/user_attributes.rb +++ b/lib/datadog_api_client/v2/models/user_attributes.rb @@ -57,9 +57,6 @@ class UserAttributes # Title of the user. attr_accessor :title - # UUID of the user. - attr_accessor :uuid - # Whether the user is verified. attr_accessor :verified @@ -81,7 +78,6 @@ def self.attribute_map :'service_account' => :'service_account', :'status' => :'status', :'title' => :'title', - :'uuid' => :'uuid', :'verified' => :'verified' } end @@ -102,7 +98,6 @@ def self.openapi_types :'service_account' => :'Boolean', :'status' => :'String', :'title' => :'String', - :'uuid' => :'String', :'verified' => :'Boolean' } end @@ -183,10 +178,6 @@ def initialize(attributes = {}) self.title = attributes[:'title'] end - if attributes.key?(:'uuid') - self.uuid = attributes[:'uuid'] - end - if attributes.key?(:'verified') self.verified = attributes[:'verified'] end @@ -230,7 +221,6 @@ def ==(o) service_account == o.service_account && status == o.status && title == o.title && - uuid == o.uuid && verified == o.verified && additional_properties == o.additional_properties end @@ -239,7 +229,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [created_at, disabled, email, handle, icon, last_login_time, mfa_enabled, modified_at, name, service_account, status, title, uuid, verified, additional_properties].hash + [created_at, disabled, email, handle, icon, last_login_time, mfa_enabled, modified_at, name, service_account, status, title, verified, additional_properties].hash end end end