diff --git a/.apigentools-info b/.apigentools-info index ca396cfeb0..bc8516680a 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2024-10-01 14:24:20.132650", - "spec_repo_commit": "d90ee2ef" + "regenerated": "2024-10-01 16:33:14.500953", + "spec_repo_commit": "763d3bd7" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2024-10-01 14:24:20.146026", - "spec_repo_commit": "d90ee2ef" + "regenerated": "2024-10-01 16:33:14.514982", + "spec_repo_commit": "763d3bd7" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index ce325fb628..bbc9b8df3a 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -520,6 +520,27 @@ components: required: true schema: type: string + RestrictionQueryID: + description: The ID of the restriction query. + in: path + name: restriction_query_id + required: true + schema: + type: string + RestrictionQueryRoleID: + description: The ID of the role. + in: path + name: role_id + required: true + schema: + type: string + RestrictionQueryUserID: + description: The ID of the user. + in: path + name: user_id + required: true + schema: + type: string RetentionFilterIdParam: description: The ID of the retention filter. in: path @@ -13505,6 +13526,15 @@ components: example: eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ== type: string type: object + LogsRestrictionQueriesType: + default: logs_restriction_queries + description: Restriction query resource type. + enum: + - logs_restriction_queries + example: logs_restriction_queries + type: string + x-enum-varnames: + - LOGS_RESTRICTION_QUERIES LogsSort: description: Sort parameters when querying logs. enum: @@ -17972,6 +18002,175 @@ components: required: - data type: object + RestrictionQueryAttributes: + description: Attributes of the restriction query. + properties: + created_at: + description: Creation time of the restriction query. + example: '2020-03-17T21:06:44.000Z' + format: date-time + readOnly: true + type: string + modified_at: + description: Time of last restriction query modification. + example: '2020-03-17T21:15:15.000Z' + format: date-time + readOnly: true + type: string + restriction_query: + description: The query that defines the restriction. Only the content matching + the query can be returned. + example: env:sandbox + type: string + type: object + RestrictionQueryCreateAttributes: + description: Attributes of the created restriction query. + properties: + restriction_query: + description: The restriction query. + example: env:sandbox + type: string + type: object + RestrictionQueryCreateData: + description: Data related to the creation of a restriction query. + properties: + attributes: + $ref: '#/components/schemas/RestrictionQueryCreateAttributes' + type: + $ref: '#/components/schemas/LogsRestrictionQueriesType' + type: object + RestrictionQueryCreatePayload: + description: Create a restriction query. + properties: + data: + $ref: '#/components/schemas/RestrictionQueryCreateData' + type: object + RestrictionQueryListResponse: + description: Response containing information about multiple restriction queries. + properties: + data: + description: Array of returned restriction queries. + items: + $ref: '#/components/schemas/RestrictionQueryWithoutRelationships' + type: array + type: object + RestrictionQueryRelationships: + description: Relationships of the restriction query object. + properties: + roles: + $ref: '#/components/schemas/RelationshipToRoles' + type: object + RestrictionQueryResponseIncludedItem: + description: An object related to a restriction query. + discriminator: + mapping: + roles: '#/components/schemas/RestrictionQueryRole' + propertyName: type + oneOf: + - $ref: '#/components/schemas/RestrictionQueryRole' + RestrictionQueryRole: + description: Partial role object. + properties: + attributes: + $ref: '#/components/schemas/RestrictionQueryRoleAttribute' + id: + description: ID of the role. + example: <ROLE_ID> + type: string + type: + default: roles + description: Role resource type. + example: roles + readOnly: true + type: string + type: object + RestrictionQueryRoleAttribute: + description: Attributes of the role for a restriction query. + properties: + name: + description: The role name. + example: Datadog Admin Role + type: string + type: object + RestrictionQueryRolesResponse: + description: Response containing information about roles attached to a restriction + query. + properties: + data: + description: Array of roles. + items: + $ref: '#/components/schemas/RestrictionQueryRole' + type: array + type: object + RestrictionQueryUpdateAttributes: + description: Attributes of the edited restriction query. + properties: + restriction_query: + description: The restriction query. + example: env:sandbox + type: string + type: object + RestrictionQueryUpdateData: + description: Data related to the update of a restriction query. + properties: + attributes: + $ref: '#/components/schemas/RestrictionQueryUpdateAttributes' + type: + $ref: '#/components/schemas/LogsRestrictionQueriesType' + type: object + RestrictionQueryUpdatePayload: + description: Update a restriction query. + properties: + data: + $ref: '#/components/schemas/RestrictionQueryUpdateData' + type: object + RestrictionQueryWithRelationships: + description: Restriction query object returned by the API. + properties: + attributes: + $ref: '#/components/schemas/RestrictionQueryAttributes' + id: + description: ID of the restriction query. + example: 79a0e60a-644a-11ea-ad29-43329f7f58b5 + type: string + relationships: + $ref: '#/components/schemas/RestrictionQueryRelationships' + type: + $ref: '#/components/schemas/LogsRestrictionQueriesType' + type: object + RestrictionQueryWithRelationshipsResponse: + description: Response containing information about a single restriction query. + properties: + data: + $ref: '#/components/schemas/RestrictionQueryWithRelationships' + included: + description: Array of objects related to the restriction query. + items: + $ref: '#/components/schemas/RestrictionQueryResponseIncludedItem' + type: array + type: object + RestrictionQueryWithoutRelationships: + description: Restriction query object returned by the API. + properties: + attributes: + $ref: '#/components/schemas/RestrictionQueryAttributes' + id: + description: ID of the restriction query. + example: 79a0e60a-644a-11ea-ad29-43329f7f58b5 + type: string + type: + default: logs_restriction_queries + description: Restriction queries type. + example: logs_restriction_queries + readOnly: true + type: string + type: object + RestrictionQueryWithoutRelationshipsResponse: + description: Response containing information about a single restriction query. + properties: + data: + $ref: '#/components/schemas/RestrictionQueryWithoutRelationships' + type: object RetentionFilter: description: The definition of the retention filter. properties: @@ -32264,6 +32463,417 @@ paths: operator: OR permissions: - logs_generate_metrics + /api/v2/logs/config/restriction_queries: + get: + description: Returns all restriction queries, including their names and IDs. + operationId: ListRestrictionQueries + parameters: + - $ref: '#/components/parameters/PageSize' + - $ref: '#/components/parameters/PageNumber' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RestrictionQueryListResponse' + description: OK + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication error + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: List restriction queries + tags: + - Logs Restriction Queries + x-permission: + operator: OPEN + permissions: [] + x-unstable: '**Note**: This endpoint is in public beta. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + post: + description: Create a new restriction query for your organization. + operationId: CreateRestrictionQuery + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RestrictionQueryCreatePayload' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RestrictionQueryWithoutRelationshipsResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication error + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Create a restriction query + tags: + - Logs Restriction Queries + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - user_access_manage + x-unstable: '**Note**: This endpoint is in public beta. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/v2/logs/config/restriction_queries/role/{role_id}: + get: + description: Get restriction query for a given role. + operationId: GetRoleRestrictionQuery + parameters: + - $ref: '#/components/parameters/RestrictionQueryRoleID' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RestrictionQueryListResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication error + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get restriction query for a given role + tags: + - Logs Restriction Queries + x-permission: + operator: OPEN + permissions: [] + x-unstable: '**Note**: This endpoint is in public beta. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/v2/logs/config/restriction_queries/user/{user_id}: + get: + description: Get all restriction queries for a given user. + operationId: ListUserRestrictionQueries + parameters: + - $ref: '#/components/parameters/RestrictionQueryUserID' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RestrictionQueryListResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Authentication error + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Get all restriction queries for a given user + tags: + - Logs Restriction Queries + x-permission: + operator: OPEN + permissions: [] + x-unstable: '**Note**: This endpoint is in public beta. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/v2/logs/config/restriction_queries/{restriction_query_id}: + delete: + description: Deletes a restriction query. + operationId: DeleteRestrictionQuery + parameters: + - $ref: '#/components/parameters/RestrictionQueryID' + responses: + '204': + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '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' + summary: Delete a restriction query + tags: + - Logs Restriction Queries + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - user_access_manage + x-unstable: '**Note**: This endpoint is in public beta. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + get: + description: Get a restriction query in the organization specified by the restriction + query's `restriction_query_id`. + operationId: GetRestrictionQuery + parameters: + - $ref: '#/components/parameters/RestrictionQueryID' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RestrictionQueryWithRelationshipsResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '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' + summary: Get a restriction query + tags: + - Logs Restriction Queries + x-codegen-request-body-name: body + x-permission: + operator: OPEN + permissions: [] + x-unstable: '**Note**: This endpoint is in public beta. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + patch: + description: Edit a restriction query. + operationId: UpdateRestrictionQuery + parameters: + - $ref: '#/components/parameters/RestrictionQueryID' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RestrictionQueryUpdatePayload' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RestrictionQueryWithoutRelationshipsResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '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' + summary: Update a restriction query + tags: + - Logs Restriction Queries + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - user_access_manage + x-unstable: '**Note**: This endpoint is in public beta. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/v2/logs/config/restriction_queries/{restriction_query_id}/roles: + delete: + description: Removes a role from a restriction query. + operationId: RemoveRoleFromRestrictionQuery + parameters: + - $ref: '#/components/parameters/RestrictionQueryID' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RelationshipToRole' + required: true + responses: + '204': + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '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' + summary: Revoke role from a restriction query + tags: + - Logs Restriction Queries + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - user_access_manage + x-unstable: '**Note**: This endpoint is in public beta. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + get: + description: Returns all roles that have a given restriction query. + operationId: ListRestrictionQueryRoles + parameters: + - $ref: '#/components/parameters/RestrictionQueryID' + - $ref: '#/components/parameters/PageSize' + - $ref: '#/components/parameters/PageNumber' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/RestrictionQueryRolesResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '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' + summary: List roles for a restriction query + tags: + - Logs Restriction Queries + x-codegen-request-body-name: body + x-permission: + operator: OPEN + permissions: [] + x-unstable: '**Note**: This endpoint is in public beta. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + post: + description: Adds a role to a restriction query. + operationId: AddRoleToRestrictionQuery + parameters: + - $ref: '#/components/parameters/RestrictionQueryID' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RelationshipToRole' + required: true + responses: + '204': + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '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' + summary: Grant role to a restriction query + tags: + - Logs Restriction Queries + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - user_access_manage + x-unstable: '**Note**: This endpoint is in public beta. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' /api/v2/logs/events: get: description: 'List endpoint returns logs that match a log search query. @@ -40880,6 +41490,47 @@ tags: description: Find out more at url: https://docs.datadoghq.com/logs/logs_to_metrics/ name: Logs Metrics +- description: '**Note: This endpoint is in public beta. If you have any feedback, + contact [Datadog support](https://docs.datadoghq.com/help/).** + + + A Restriction Query is a logs query that restricts which logs the `logs_read_data` + permission grants read access to. + + For users whose roles have Restriction Queries, any log query they make only returns + those log events that also match + + one of their Restriction Queries. This is true whether the user queries log events + from any log-related feature, including + + the log explorer, Live Tail, re-hydration, or a dashboard widget. + + + Restriction Queries currently only support use of the following components of + log events: + + + - Reserved attributes + + - The log message + + - Tags + + + To restrict read access on log data, add a team tag to log events to indicate + which teams own them, and then scope Restriction Queries to the relevant values + of the team tag. Tags can be applied to log events in many ways, and a log event + can have multiple tags with the same key (like team) and different values. This + means the same log event can be visible to roles whose restriction queries are + scoped to different team values. + + + You need an API and application key with Admin rights to interact with this endpoint. + + + See [How to Set Up RBAC for Logs](https://docs.datadoghq.com/logs/guide/logs-rbac/?tab=api#restrict-access-to-logs) + for details on how to add restriction queries.' + name: Logs Restriction Queries - description: "The metrics endpoint allows you to:\n\n- Post metrics data so it can be graphed on Datadog\u2019s dashboards\n- Query metrics from any time period (timeseries and scalar)\n- Modify tag configurations for metrics\n- View tags diff --git a/docs/datadog_api_client.v2.api.rst b/docs/datadog_api_client.v2.api.rst index 3c9dd039a5..d9f599f19f 100644 --- a/docs/datadog_api_client.v2.api.rst +++ b/docs/datadog_api_client.v2.api.rst @@ -200,6 +200,13 @@ datadog\_api\_client.v2.api.logs\_metrics\_api module :members: :show-inheritance: +datadog\_api\_client.v2.api.logs\_restriction\_queries\_api module +------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.api.logs_restriction_queries_api + :members: + :show-inheritance: + datadog\_api\_client.v2.api.metrics\_api module ----------------------------------------------- diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index 75f3bdab4b..1f11be1278 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -5723,6 +5723,13 @@ datadog\_api\_client.v2.model.logs\_response\_metadata\_page module :members: :show-inheritance: +datadog\_api\_client.v2.model.logs\_restriction\_queries\_type module +--------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.logs_restriction_queries_type + :members: + :show-inheritance: + datadog\_api\_client.v2.model.logs\_sort module ----------------------------------------------- @@ -7627,6 +7634,125 @@ datadog\_api\_client.v2.model.restriction\_policy\_update\_request module :members: :show-inheritance: +datadog\_api\_client.v2.model.restriction\_query\_attributes module +------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.restriction_query_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.restriction\_query\_create\_attributes module +--------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.restriction_query_create_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.restriction\_query\_create\_data module +--------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.restriction_query_create_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.restriction\_query\_create\_payload module +------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.restriction_query_create_payload + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.restriction\_query\_list\_response module +----------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.restriction_query_list_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.restriction\_query\_relationships module +---------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.restriction_query_relationships + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.restriction\_query\_response\_included\_item module +--------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.restriction_query_response_included_item + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.restriction\_query\_role module +------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.restriction_query_role + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.restriction\_query\_role\_attribute module +------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.restriction_query_role_attribute + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.restriction\_query\_roles\_response module +------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.restriction_query_roles_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.restriction\_query\_update\_attributes module +--------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.restriction_query_update_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.restriction\_query\_update\_data module +--------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.restriction_query_update_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.restriction\_query\_update\_payload module +------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.restriction_query_update_payload + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.restriction\_query\_with\_relationships module +---------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.restriction_query_with_relationships + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.restriction\_query\_with\_relationships\_response module +-------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.restriction_query_with_relationships_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.restriction\_query\_without\_relationships module +------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.restriction_query_without_relationships + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.restriction\_query\_without\_relationships\_response module +----------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.restriction_query_without_relationships_response + :members: + :show-inheritance: + datadog\_api\_client.v2.model.retention\_filter module ------------------------------------------------------ diff --git a/src/datadog_api_client/configuration.py b/src/datadog_api_client/configuration.py index b56efd790d..4006ce2f76 100644 --- a/src/datadog_api_client/configuration.py +++ b/src/datadog_api_client/configuration.py @@ -263,6 +263,16 @@ def __init__( "v2.update_incident_attachments": False, "v2.update_incident_integration": False, "v2.update_incident_todo": False, + "v2.add_role_to_restriction_query": False, + "v2.create_restriction_query": False, + "v2.delete_restriction_query": False, + "v2.get_restriction_query": False, + "v2.get_role_restriction_query": False, + "v2.list_restriction_queries": False, + "v2.list_restriction_query_roles": False, + "v2.list_user_restriction_queries": False, + "v2.remove_role_from_restriction_query": False, + "v2.update_restriction_query": False, "v2.query_scalar_data": False, "v2.query_timeseries_data": False, "v2.get_finding": False, diff --git a/src/datadog_api_client/v2/api/logs_restriction_queries_api.py b/src/datadog_api_client/v2/api/logs_restriction_queries_api.py new file mode 100644 index 0000000000..0416a49eba --- /dev/null +++ b/src/datadog_api_client/v2/api/logs_restriction_queries_api.py @@ -0,0 +1,504 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Any, Dict, Union + +from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint +from datadog_api_client.configuration import Configuration +from datadog_api_client.model_utils import ( + UnsetType, + unset, +) +from datadog_api_client.v2.model.restriction_query_list_response import RestrictionQueryListResponse +from datadog_api_client.v2.model.restriction_query_without_relationships_response import ( + RestrictionQueryWithoutRelationshipsResponse, +) +from datadog_api_client.v2.model.restriction_query_create_payload import RestrictionQueryCreatePayload +from datadog_api_client.v2.model.restriction_query_with_relationships_response import ( + RestrictionQueryWithRelationshipsResponse, +) +from datadog_api_client.v2.model.restriction_query_update_payload import RestrictionQueryUpdatePayload +from datadog_api_client.v2.model.relationship_to_role import RelationshipToRole +from datadog_api_client.v2.model.restriction_query_roles_response import RestrictionQueryRolesResponse + + +class LogsRestrictionQueriesApi: + """ + Note: This endpoint is in public beta. If you have any feedback, contact `Datadog support <https://docs.datadoghq.com/help/>`_. + + A Restriction Query is a logs query that restricts which logs the ``logs_read_data`` permission grants read access to. + For users whose roles have Restriction Queries, any log query they make only returns those log events that also match + one of their Restriction Queries. This is true whether the user queries log events from any log-related feature, including + the log explorer, Live Tail, re-hydration, or a dashboard widget. + + Restriction Queries currently only support use of the following components of log events: + + * Reserved attributes + * The log message + * Tags + + To restrict read access on log data, add a team tag to log events to indicate which teams own them, and then scope Restriction Queries to the relevant values of the team tag. Tags can be applied to log events in many ways, and a log event can have multiple tags with the same key (like team) and different values. This means the same log event can be visible to roles whose restriction queries are scoped to different team values. + + You need an API and application key with Admin rights to interact with this endpoint. + + See `How to Set Up RBAC for Logs <https://docs.datadoghq.com/logs/guide/logs-rbac/?tab=api#restrict-access-to-logs>`_ for details on how to add restriction queries. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient(Configuration()) + self.api_client = api_client + + self._add_role_to_restriction_query_endpoint = _Endpoint( + settings={ + "response_type": None, + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/logs/config/restriction_queries/{restriction_query_id}/roles", + "operation_id": "add_role_to_restriction_query", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "restriction_query_id": { + "required": True, + "openapi_types": (str,), + "attribute": "restriction_query_id", + "location": "path", + }, + "body": { + "required": True, + "openapi_types": (RelationshipToRole,), + "location": "body", + }, + }, + headers_map={"accept": ["*/*"], "content_type": ["application/json"]}, + api_client=api_client, + ) + + self._create_restriction_query_endpoint = _Endpoint( + settings={ + "response_type": (RestrictionQueryWithoutRelationshipsResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/logs/config/restriction_queries", + "operation_id": "create_restriction_query", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "body": { + "required": True, + "openapi_types": (RestrictionQueryCreatePayload,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + + self._delete_restriction_query_endpoint = _Endpoint( + settings={ + "response_type": None, + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/logs/config/restriction_queries/{restriction_query_id}", + "operation_id": "delete_restriction_query", + "http_method": "DELETE", + "version": "v2", + }, + params_map={ + "restriction_query_id": { + "required": True, + "openapi_types": (str,), + "attribute": "restriction_query_id", + "location": "path", + }, + }, + headers_map={ + "accept": ["*/*"], + }, + api_client=api_client, + ) + + self._get_restriction_query_endpoint = _Endpoint( + settings={ + "response_type": (RestrictionQueryWithRelationshipsResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/logs/config/restriction_queries/{restriction_query_id}", + "operation_id": "get_restriction_query", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "restriction_query_id": { + "required": True, + "openapi_types": (str,), + "attribute": "restriction_query_id", + "location": "path", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + self._get_role_restriction_query_endpoint = _Endpoint( + settings={ + "response_type": (RestrictionQueryListResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/logs/config/restriction_queries/role/{role_id}", + "operation_id": "get_role_restriction_query", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "role_id": { + "required": True, + "openapi_types": (str,), + "attribute": "role_id", + "location": "path", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + self._list_restriction_queries_endpoint = _Endpoint( + settings={ + "response_type": (RestrictionQueryListResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/logs/config/restriction_queries", + "operation_id": "list_restriction_queries", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "page_size": { + "openapi_types": (int,), + "attribute": "page[size]", + "location": "query", + }, + "page_number": { + "openapi_types": (int,), + "attribute": "page[number]", + "location": "query", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + self._list_restriction_query_roles_endpoint = _Endpoint( + settings={ + "response_type": (RestrictionQueryRolesResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/logs/config/restriction_queries/{restriction_query_id}/roles", + "operation_id": "list_restriction_query_roles", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "restriction_query_id": { + "required": True, + "openapi_types": (str,), + "attribute": "restriction_query_id", + "location": "path", + }, + "page_size": { + "openapi_types": (int,), + "attribute": "page[size]", + "location": "query", + }, + "page_number": { + "openapi_types": (int,), + "attribute": "page[number]", + "location": "query", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + self._list_user_restriction_queries_endpoint = _Endpoint( + settings={ + "response_type": (RestrictionQueryListResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/logs/config/restriction_queries/user/{user_id}", + "operation_id": "list_user_restriction_queries", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "user_id": { + "required": True, + "openapi_types": (str,), + "attribute": "user_id", + "location": "path", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + self._remove_role_from_restriction_query_endpoint = _Endpoint( + settings={ + "response_type": None, + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/logs/config/restriction_queries/{restriction_query_id}/roles", + "operation_id": "remove_role_from_restriction_query", + "http_method": "DELETE", + "version": "v2", + }, + params_map={ + "restriction_query_id": { + "required": True, + "openapi_types": (str,), + "attribute": "restriction_query_id", + "location": "path", + }, + "body": { + "required": True, + "openapi_types": (RelationshipToRole,), + "location": "body", + }, + }, + headers_map={"accept": ["*/*"], "content_type": ["application/json"]}, + api_client=api_client, + ) + + self._update_restriction_query_endpoint = _Endpoint( + settings={ + "response_type": (RestrictionQueryWithoutRelationshipsResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/logs/config/restriction_queries/{restriction_query_id}", + "operation_id": "update_restriction_query", + "http_method": "PATCH", + "version": "v2", + }, + params_map={ + "restriction_query_id": { + "required": True, + "openapi_types": (str,), + "attribute": "restriction_query_id", + "location": "path", + }, + "body": { + "required": True, + "openapi_types": (RestrictionQueryUpdatePayload,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + + def add_role_to_restriction_query( + self, + restriction_query_id: str, + body: RelationshipToRole, + ) -> None: + """Grant role to a restriction query. + + Adds a role to a restriction query. + + :param restriction_query_id: The ID of the restriction query. + :type restriction_query_id: str + :type body: RelationshipToRole + :rtype: None + """ + kwargs: Dict[str, Any] = {} + kwargs["restriction_query_id"] = restriction_query_id + + kwargs["body"] = body + + return self._add_role_to_restriction_query_endpoint.call_with_http_info(**kwargs) + + def create_restriction_query( + self, + body: RestrictionQueryCreatePayload, + ) -> RestrictionQueryWithoutRelationshipsResponse: + """Create a restriction query. + + Create a new restriction query for your organization. + + :type body: RestrictionQueryCreatePayload + :rtype: RestrictionQueryWithoutRelationshipsResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["body"] = body + + return self._create_restriction_query_endpoint.call_with_http_info(**kwargs) + + def delete_restriction_query( + self, + restriction_query_id: str, + ) -> None: + """Delete a restriction query. + + Deletes a restriction query. + + :param restriction_query_id: The ID of the restriction query. + :type restriction_query_id: str + :rtype: None + """ + kwargs: Dict[str, Any] = {} + kwargs["restriction_query_id"] = restriction_query_id + + return self._delete_restriction_query_endpoint.call_with_http_info(**kwargs) + + def get_restriction_query( + self, + restriction_query_id: str, + ) -> RestrictionQueryWithRelationshipsResponse: + """Get a restriction query. + + Get a restriction query in the organization specified by the restriction query's ``restriction_query_id``. + + :param restriction_query_id: The ID of the restriction query. + :type restriction_query_id: str + :rtype: RestrictionQueryWithRelationshipsResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["restriction_query_id"] = restriction_query_id + + return self._get_restriction_query_endpoint.call_with_http_info(**kwargs) + + def get_role_restriction_query( + self, + role_id: str, + ) -> RestrictionQueryListResponse: + """Get restriction query for a given role. + + Get restriction query for a given role. + + :param role_id: The ID of the role. + :type role_id: str + :rtype: RestrictionQueryListResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["role_id"] = role_id + + return self._get_role_restriction_query_endpoint.call_with_http_info(**kwargs) + + def list_restriction_queries( + self, + *, + page_size: Union[int, UnsetType] = unset, + page_number: Union[int, UnsetType] = unset, + ) -> RestrictionQueryListResponse: + """List restriction queries. + + Returns all restriction queries, including their names and IDs. + + :param page_size: Size for a given page. The maximum allowed value is 100. + :type page_size: int, optional + :param page_number: Specific page number to return. + :type page_number: int, optional + :rtype: RestrictionQueryListResponse + """ + kwargs: Dict[str, Any] = {} + if page_size is not unset: + kwargs["page_size"] = page_size + + if page_number is not unset: + kwargs["page_number"] = page_number + + return self._list_restriction_queries_endpoint.call_with_http_info(**kwargs) + + def list_restriction_query_roles( + self, + restriction_query_id: str, + *, + page_size: Union[int, UnsetType] = unset, + page_number: Union[int, UnsetType] = unset, + ) -> RestrictionQueryRolesResponse: + """List roles for a restriction query. + + Returns all roles that have a given restriction query. + + :param restriction_query_id: The ID of the restriction query. + :type restriction_query_id: str + :param page_size: Size for a given page. The maximum allowed value is 100. + :type page_size: int, optional + :param page_number: Specific page number to return. + :type page_number: int, optional + :rtype: RestrictionQueryRolesResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["restriction_query_id"] = restriction_query_id + + if page_size is not unset: + kwargs["page_size"] = page_size + + if page_number is not unset: + kwargs["page_number"] = page_number + + return self._list_restriction_query_roles_endpoint.call_with_http_info(**kwargs) + + def list_user_restriction_queries( + self, + user_id: str, + ) -> RestrictionQueryListResponse: + """Get all restriction queries for a given user. + + Get all restriction queries for a given user. + + :param user_id: The ID of the user. + :type user_id: str + :rtype: RestrictionQueryListResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["user_id"] = user_id + + return self._list_user_restriction_queries_endpoint.call_with_http_info(**kwargs) + + def remove_role_from_restriction_query( + self, + restriction_query_id: str, + body: RelationshipToRole, + ) -> None: + """Revoke role from a restriction query. + + Removes a role from a restriction query. + + :param restriction_query_id: The ID of the restriction query. + :type restriction_query_id: str + :type body: RelationshipToRole + :rtype: None + """ + kwargs: Dict[str, Any] = {} + kwargs["restriction_query_id"] = restriction_query_id + + kwargs["body"] = body + + return self._remove_role_from_restriction_query_endpoint.call_with_http_info(**kwargs) + + def update_restriction_query( + self, + restriction_query_id: str, + body: RestrictionQueryUpdatePayload, + ) -> RestrictionQueryWithoutRelationshipsResponse: + """Update a restriction query. + + Edit a restriction query. + + :param restriction_query_id: The ID of the restriction query. + :type restriction_query_id: str + :type body: RestrictionQueryUpdatePayload + :rtype: RestrictionQueryWithoutRelationshipsResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["restriction_query_id"] = restriction_query_id + + kwargs["body"] = body + + return self._update_restriction_query_endpoint.call_with_http_info(**kwargs) diff --git a/src/datadog_api_client/v2/apis/__init__.py b/src/datadog_api_client/v2/apis/__init__.py index d946e2eaf0..3c7fdfbee4 100644 --- a/src/datadog_api_client/v2/apis/__init__.py +++ b/src/datadog_api_client/v2/apis/__init__.py @@ -26,6 +26,7 @@ from datadog_api_client.v2.api.logs_archives_api import LogsArchivesApi from datadog_api_client.v2.api.logs_custom_destinations_api import LogsCustomDestinationsApi from datadog_api_client.v2.api.logs_metrics_api import LogsMetricsApi +from datadog_api_client.v2.api.logs_restriction_queries_api import LogsRestrictionQueriesApi from datadog_api_client.v2.api.metrics_api import MetricsApi from datadog_api_client.v2.api.monitors_api import MonitorsApi from datadog_api_client.v2.api.network_device_monitoring_api import NetworkDeviceMonitoringApi @@ -82,6 +83,7 @@ "LogsArchivesApi", "LogsCustomDestinationsApi", "LogsMetricsApi", + "LogsRestrictionQueriesApi", "MetricsApi", "MonitorsApi", "NetworkDeviceMonitoringApi", diff --git a/src/datadog_api_client/v2/model/logs_restriction_queries_type.py b/src/datadog_api_client/v2/model/logs_restriction_queries_type.py new file mode 100644 index 0000000000..e5c09b37d4 --- /dev/null +++ b/src/datadog_api_client/v2/model/logs_restriction_queries_type.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class LogsRestrictionQueriesType(ModelSimple): + """ + Restriction query resource type. + + :param value: If omitted defaults to "logs_restriction_queries". Must be one of ["logs_restriction_queries"]. + :type value: str + """ + + allowed_values = { + "logs_restriction_queries", + } + LOGS_RESTRICTION_QUERIES: ClassVar["LogsRestrictionQueriesType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +LogsRestrictionQueriesType.LOGS_RESTRICTION_QUERIES = LogsRestrictionQueriesType("logs_restriction_queries") diff --git a/src/datadog_api_client/v2/model/restriction_query_attributes.py b/src/datadog_api_client/v2/model/restriction_query_attributes.py new file mode 100644 index 0000000000..0eae145c97 --- /dev/null +++ b/src/datadog_api_client/v2/model/restriction_query_attributes.py @@ -0,0 +1,61 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + datetime, + unset, + UnsetType, +) + + +class RestrictionQueryAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "created_at": (datetime,), + "modified_at": (datetime,), + "restriction_query": (str,), + } + + attribute_map = { + "created_at": "created_at", + "modified_at": "modified_at", + "restriction_query": "restriction_query", + } + read_only_vars = { + "created_at", + "modified_at", + } + + def __init__( + self_, + created_at: Union[datetime, UnsetType] = unset, + modified_at: Union[datetime, UnsetType] = unset, + restriction_query: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Attributes of the restriction query. + + :param created_at: Creation time of the restriction query. + :type created_at: datetime, optional + + :param modified_at: Time of last restriction query modification. + :type modified_at: datetime, optional + + :param restriction_query: The query that defines the restriction. Only the content matching the query can be returned. + :type restriction_query: str, optional + """ + if created_at is not unset: + kwargs["created_at"] = created_at + if modified_at is not unset: + kwargs["modified_at"] = modified_at + if restriction_query is not unset: + kwargs["restriction_query"] = restriction_query + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/restriction_query_create_attributes.py b/src/datadog_api_client/v2/model/restriction_query_create_attributes.py new file mode 100644 index 0000000000..ea71726a58 --- /dev/null +++ b/src/datadog_api_client/v2/model/restriction_query_create_attributes.py @@ -0,0 +1,36 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class RestrictionQueryCreateAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "restriction_query": (str,), + } + + attribute_map = { + "restriction_query": "restriction_query", + } + + def __init__(self_, restriction_query: Union[str, UnsetType] = unset, **kwargs): + """ + Attributes of the created restriction query. + + :param restriction_query: The restriction query. + :type restriction_query: str, optional + """ + if restriction_query is not unset: + kwargs["restriction_query"] = restriction_query + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/restriction_query_create_data.py b/src/datadog_api_client/v2/model/restriction_query_create_data.py new file mode 100644 index 0000000000..d532d0b0b6 --- /dev/null +++ b/src/datadog_api_client/v2/model/restriction_query_create_data.py @@ -0,0 +1,56 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.restriction_query_create_attributes import RestrictionQueryCreateAttributes + from datadog_api_client.v2.model.logs_restriction_queries_type import LogsRestrictionQueriesType + + +class RestrictionQueryCreateData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.restriction_query_create_attributes import RestrictionQueryCreateAttributes + from datadog_api_client.v2.model.logs_restriction_queries_type import LogsRestrictionQueriesType + + return { + "attributes": (RestrictionQueryCreateAttributes,), + "type": (LogsRestrictionQueriesType,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__( + self_, + attributes: Union[RestrictionQueryCreateAttributes, UnsetType] = unset, + type: Union[LogsRestrictionQueriesType, UnsetType] = unset, + **kwargs, + ): + """ + Data related to the creation of a restriction query. + + :param attributes: Attributes of the created restriction query. + :type attributes: RestrictionQueryCreateAttributes, optional + + :param type: Restriction query resource type. + :type type: LogsRestrictionQueriesType, optional + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if type is not unset: + kwargs["type"] = type + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/restriction_query_create_payload.py b/src/datadog_api_client/v2/model/restriction_query_create_payload.py new file mode 100644 index 0000000000..9eb6c44b5a --- /dev/null +++ b/src/datadog_api_client/v2/model/restriction_query_create_payload.py @@ -0,0 +1,42 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.restriction_query_create_data import RestrictionQueryCreateData + + +class RestrictionQueryCreatePayload(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.restriction_query_create_data import RestrictionQueryCreateData + + return { + "data": (RestrictionQueryCreateData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[RestrictionQueryCreateData, UnsetType] = unset, **kwargs): + """ + Create a restriction query. + + :param data: Data related to the creation of a restriction query. + :type data: RestrictionQueryCreateData, optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/restriction_query_list_response.py b/src/datadog_api_client/v2/model/restriction_query_list_response.py new file mode 100644 index 0000000000..9318bce64e --- /dev/null +++ b/src/datadog_api_client/v2/model/restriction_query_list_response.py @@ -0,0 +1,44 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.restriction_query_without_relationships import RestrictionQueryWithoutRelationships + + +class RestrictionQueryListResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.restriction_query_without_relationships import ( + RestrictionQueryWithoutRelationships, + ) + + return { + "data": ([RestrictionQueryWithoutRelationships],), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[List[RestrictionQueryWithoutRelationships], UnsetType] = unset, **kwargs): + """ + Response containing information about multiple restriction queries. + + :param data: Array of returned restriction queries. + :type data: [RestrictionQueryWithoutRelationships], optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/restriction_query_relationships.py b/src/datadog_api_client/v2/model/restriction_query_relationships.py new file mode 100644 index 0000000000..e627774f45 --- /dev/null +++ b/src/datadog_api_client/v2/model/restriction_query_relationships.py @@ -0,0 +1,42 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.relationship_to_roles import RelationshipToRoles + + +class RestrictionQueryRelationships(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.relationship_to_roles import RelationshipToRoles + + return { + "roles": (RelationshipToRoles,), + } + + attribute_map = { + "roles": "roles", + } + + def __init__(self_, roles: Union[RelationshipToRoles, UnsetType] = unset, **kwargs): + """ + Relationships of the restriction query object. + + :param roles: Relationship to roles. + :type roles: RelationshipToRoles, optional + """ + if roles is not unset: + kwargs["roles"] = roles + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/restriction_query_response_included_item.py b/src/datadog_api_client/v2/model/restriction_query_response_included_item.py new file mode 100644 index 0000000000..dbdd939b89 --- /dev/null +++ b/src/datadog_api_client/v2/model/restriction_query_response_included_item.py @@ -0,0 +1,44 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelComposed, + cached_property, +) + + +class RestrictionQueryResponseIncludedItem(ModelComposed): + def __init__(self, **kwargs): + """ + An object related to a restriction query. + + :param attributes: Attributes of the role for a restriction query. + :type attributes: RestrictionQueryRoleAttribute, optional + + :param id: ID of the role. + :type id: str, optional + + :param type: Role resource type. + :type type: str, optional + """ + super().__init__(kwargs) + + @cached_property + def _composed_schemas(_): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + from datadog_api_client.v2.model.restriction_query_role import RestrictionQueryRole + + return { + "oneOf": [ + RestrictionQueryRole, + ], + } diff --git a/src/datadog_api_client/v2/model/restriction_query_role.py b/src/datadog_api_client/v2/model/restriction_query_role.py new file mode 100644 index 0000000000..89e48d77ff --- /dev/null +++ b/src/datadog_api_client/v2/model/restriction_query_role.py @@ -0,0 +1,65 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.restriction_query_role_attribute import RestrictionQueryRoleAttribute + + +class RestrictionQueryRole(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.restriction_query_role_attribute import RestrictionQueryRoleAttribute + + return { + "attributes": (RestrictionQueryRoleAttribute,), + "id": (str,), + "type": (str,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + read_only_vars = { + "type", + } + + def __init__( + self_, + attributes: Union[RestrictionQueryRoleAttribute, UnsetType] = unset, + id: Union[str, UnsetType] = unset, + type: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Partial role object. + + :param attributes: Attributes of the role for a restriction query. + :type attributes: RestrictionQueryRoleAttribute, optional + + :param id: ID of the role. + :type id: str, optional + + :param type: Role resource type. + :type type: str, optional + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if id is not unset: + kwargs["id"] = id + if type is not unset: + kwargs["type"] = type + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/restriction_query_role_attribute.py b/src/datadog_api_client/v2/model/restriction_query_role_attribute.py new file mode 100644 index 0000000000..76b5bb24f2 --- /dev/null +++ b/src/datadog_api_client/v2/model/restriction_query_role_attribute.py @@ -0,0 +1,36 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class RestrictionQueryRoleAttribute(ModelNormal): + @cached_property + def openapi_types(_): + return { + "name": (str,), + } + + attribute_map = { + "name": "name", + } + + def __init__(self_, name: Union[str, UnsetType] = unset, **kwargs): + """ + Attributes of the role for a restriction query. + + :param name: The role name. + :type name: str, optional + """ + if name is not unset: + kwargs["name"] = name + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/restriction_query_roles_response.py b/src/datadog_api_client/v2/model/restriction_query_roles_response.py new file mode 100644 index 0000000000..cffd5c9f77 --- /dev/null +++ b/src/datadog_api_client/v2/model/restriction_query_roles_response.py @@ -0,0 +1,42 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.restriction_query_role import RestrictionQueryRole + + +class RestrictionQueryRolesResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.restriction_query_role import RestrictionQueryRole + + return { + "data": ([RestrictionQueryRole],), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[List[RestrictionQueryRole], UnsetType] = unset, **kwargs): + """ + Response containing information about roles attached to a restriction query. + + :param data: Array of roles. + :type data: [RestrictionQueryRole], optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/restriction_query_update_attributes.py b/src/datadog_api_client/v2/model/restriction_query_update_attributes.py new file mode 100644 index 0000000000..67fc407044 --- /dev/null +++ b/src/datadog_api_client/v2/model/restriction_query_update_attributes.py @@ -0,0 +1,36 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class RestrictionQueryUpdateAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "restriction_query": (str,), + } + + attribute_map = { + "restriction_query": "restriction_query", + } + + def __init__(self_, restriction_query: Union[str, UnsetType] = unset, **kwargs): + """ + Attributes of the edited restriction query. + + :param restriction_query: The restriction query. + :type restriction_query: str, optional + """ + if restriction_query is not unset: + kwargs["restriction_query"] = restriction_query + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/restriction_query_update_data.py b/src/datadog_api_client/v2/model/restriction_query_update_data.py new file mode 100644 index 0000000000..4fb14adf32 --- /dev/null +++ b/src/datadog_api_client/v2/model/restriction_query_update_data.py @@ -0,0 +1,56 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.restriction_query_update_attributes import RestrictionQueryUpdateAttributes + from datadog_api_client.v2.model.logs_restriction_queries_type import LogsRestrictionQueriesType + + +class RestrictionQueryUpdateData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.restriction_query_update_attributes import RestrictionQueryUpdateAttributes + from datadog_api_client.v2.model.logs_restriction_queries_type import LogsRestrictionQueriesType + + return { + "attributes": (RestrictionQueryUpdateAttributes,), + "type": (LogsRestrictionQueriesType,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__( + self_, + attributes: Union[RestrictionQueryUpdateAttributes, UnsetType] = unset, + type: Union[LogsRestrictionQueriesType, UnsetType] = unset, + **kwargs, + ): + """ + Data related to the update of a restriction query. + + :param attributes: Attributes of the edited restriction query. + :type attributes: RestrictionQueryUpdateAttributes, optional + + :param type: Restriction query resource type. + :type type: LogsRestrictionQueriesType, optional + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if type is not unset: + kwargs["type"] = type + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/restriction_query_update_payload.py b/src/datadog_api_client/v2/model/restriction_query_update_payload.py new file mode 100644 index 0000000000..6f028ae11c --- /dev/null +++ b/src/datadog_api_client/v2/model/restriction_query_update_payload.py @@ -0,0 +1,42 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.restriction_query_update_data import RestrictionQueryUpdateData + + +class RestrictionQueryUpdatePayload(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.restriction_query_update_data import RestrictionQueryUpdateData + + return { + "data": (RestrictionQueryUpdateData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[RestrictionQueryUpdateData, UnsetType] = unset, **kwargs): + """ + Update a restriction query. + + :param data: Data related to the update of a restriction query. + :type data: RestrictionQueryUpdateData, optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/restriction_query_with_relationships.py b/src/datadog_api_client/v2/model/restriction_query_with_relationships.py new file mode 100644 index 0000000000..3f9204926b --- /dev/null +++ b/src/datadog_api_client/v2/model/restriction_query_with_relationships.py @@ -0,0 +1,74 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.restriction_query_attributes import RestrictionQueryAttributes + from datadog_api_client.v2.model.restriction_query_relationships import RestrictionQueryRelationships + from datadog_api_client.v2.model.logs_restriction_queries_type import LogsRestrictionQueriesType + + +class RestrictionQueryWithRelationships(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.restriction_query_attributes import RestrictionQueryAttributes + from datadog_api_client.v2.model.restriction_query_relationships import RestrictionQueryRelationships + from datadog_api_client.v2.model.logs_restriction_queries_type import LogsRestrictionQueriesType + + return { + "attributes": (RestrictionQueryAttributes,), + "id": (str,), + "relationships": (RestrictionQueryRelationships,), + "type": (LogsRestrictionQueriesType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "relationships": "relationships", + "type": "type", + } + + def __init__( + self_, + attributes: Union[RestrictionQueryAttributes, UnsetType] = unset, + id: Union[str, UnsetType] = unset, + relationships: Union[RestrictionQueryRelationships, UnsetType] = unset, + type: Union[LogsRestrictionQueriesType, UnsetType] = unset, + **kwargs, + ): + """ + Restriction query object returned by the API. + + :param attributes: Attributes of the restriction query. + :type attributes: RestrictionQueryAttributes, optional + + :param id: ID of the restriction query. + :type id: str, optional + + :param relationships: Relationships of the restriction query object. + :type relationships: RestrictionQueryRelationships, optional + + :param type: Restriction query resource type. + :type type: LogsRestrictionQueriesType, optional + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if id is not unset: + kwargs["id"] = id + if relationships is not unset: + kwargs["relationships"] = relationships + if type is not unset: + kwargs["type"] = type + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/restriction_query_with_relationships_response.py b/src/datadog_api_client/v2/model/restriction_query_with_relationships_response.py new file mode 100644 index 0000000000..b77017573a --- /dev/null +++ b/src/datadog_api_client/v2/model/restriction_query_with_relationships_response.py @@ -0,0 +1,61 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.restriction_query_with_relationships import RestrictionQueryWithRelationships + from datadog_api_client.v2.model.restriction_query_response_included_item import ( + RestrictionQueryResponseIncludedItem, + ) + from datadog_api_client.v2.model.restriction_query_role import RestrictionQueryRole + + +class RestrictionQueryWithRelationshipsResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.restriction_query_with_relationships import RestrictionQueryWithRelationships + from datadog_api_client.v2.model.restriction_query_response_included_item import ( + RestrictionQueryResponseIncludedItem, + ) + + return { + "data": (RestrictionQueryWithRelationships,), + "included": ([RestrictionQueryResponseIncludedItem],), + } + + attribute_map = { + "data": "data", + "included": "included", + } + + def __init__( + self_, + data: Union[RestrictionQueryWithRelationships, UnsetType] = unset, + included: Union[List[Union[RestrictionQueryResponseIncludedItem, RestrictionQueryRole]], UnsetType] = unset, + **kwargs, + ): + """ + Response containing information about a single restriction query. + + :param data: Restriction query object returned by the API. + :type data: RestrictionQueryWithRelationships, optional + + :param included: Array of objects related to the restriction query. + :type included: [RestrictionQueryResponseIncludedItem], optional + """ + if data is not unset: + kwargs["data"] = data + if included is not unset: + kwargs["included"] = included + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/restriction_query_without_relationships.py b/src/datadog_api_client/v2/model/restriction_query_without_relationships.py new file mode 100644 index 0000000000..9d361b4ad5 --- /dev/null +++ b/src/datadog_api_client/v2/model/restriction_query_without_relationships.py @@ -0,0 +1,65 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.restriction_query_attributes import RestrictionQueryAttributes + + +class RestrictionQueryWithoutRelationships(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.restriction_query_attributes import RestrictionQueryAttributes + + return { + "attributes": (RestrictionQueryAttributes,), + "id": (str,), + "type": (str,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + read_only_vars = { + "type", + } + + def __init__( + self_, + attributes: Union[RestrictionQueryAttributes, UnsetType] = unset, + id: Union[str, UnsetType] = unset, + type: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Restriction query object returned by the API. + + :param attributes: Attributes of the restriction query. + :type attributes: RestrictionQueryAttributes, optional + + :param id: ID of the restriction query. + :type id: str, optional + + :param type: Restriction queries type. + :type type: str, optional + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if id is not unset: + kwargs["id"] = id + if type is not unset: + kwargs["type"] = type + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/restriction_query_without_relationships_response.py b/src/datadog_api_client/v2/model/restriction_query_without_relationships_response.py new file mode 100644 index 0000000000..da5fdd0382 --- /dev/null +++ b/src/datadog_api_client/v2/model/restriction_query_without_relationships_response.py @@ -0,0 +1,44 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.restriction_query_without_relationships import RestrictionQueryWithoutRelationships + + +class RestrictionQueryWithoutRelationshipsResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.restriction_query_without_relationships import ( + RestrictionQueryWithoutRelationships, + ) + + return { + "data": (RestrictionQueryWithoutRelationships,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[RestrictionQueryWithoutRelationships, UnsetType] = unset, **kwargs): + """ + Response containing information about a single restriction query. + + :param data: Restriction query object returned by the API. + :type data: RestrictionQueryWithoutRelationships, optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 7478f2fe9e..8f9122740a 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -984,6 +984,7 @@ from datadog_api_client.v2.model.logs_query_options import LogsQueryOptions from datadog_api_client.v2.model.logs_response_metadata import LogsResponseMetadata from datadog_api_client.v2.model.logs_response_metadata_page import LogsResponseMetadataPage +from datadog_api_client.v2.model.logs_restriction_queries_type import LogsRestrictionQueriesType from datadog_api_client.v2.model.logs_sort import LogsSort from datadog_api_client.v2.model.logs_sort_order import LogsSortOrder from datadog_api_client.v2.model.logs_storage_tier import LogsStorageTier @@ -1337,6 +1338,27 @@ from datadog_api_client.v2.model.restriction_policy_response import RestrictionPolicyResponse from datadog_api_client.v2.model.restriction_policy_type import RestrictionPolicyType from datadog_api_client.v2.model.restriction_policy_update_request import RestrictionPolicyUpdateRequest +from datadog_api_client.v2.model.restriction_query_attributes import RestrictionQueryAttributes +from datadog_api_client.v2.model.restriction_query_create_attributes import RestrictionQueryCreateAttributes +from datadog_api_client.v2.model.restriction_query_create_data import RestrictionQueryCreateData +from datadog_api_client.v2.model.restriction_query_create_payload import RestrictionQueryCreatePayload +from datadog_api_client.v2.model.restriction_query_list_response import RestrictionQueryListResponse +from datadog_api_client.v2.model.restriction_query_relationships import RestrictionQueryRelationships +from datadog_api_client.v2.model.restriction_query_response_included_item import RestrictionQueryResponseIncludedItem +from datadog_api_client.v2.model.restriction_query_role import RestrictionQueryRole +from datadog_api_client.v2.model.restriction_query_role_attribute import RestrictionQueryRoleAttribute +from datadog_api_client.v2.model.restriction_query_roles_response import RestrictionQueryRolesResponse +from datadog_api_client.v2.model.restriction_query_update_attributes import RestrictionQueryUpdateAttributes +from datadog_api_client.v2.model.restriction_query_update_data import RestrictionQueryUpdateData +from datadog_api_client.v2.model.restriction_query_update_payload import RestrictionQueryUpdatePayload +from datadog_api_client.v2.model.restriction_query_with_relationships import RestrictionQueryWithRelationships +from datadog_api_client.v2.model.restriction_query_with_relationships_response import ( + RestrictionQueryWithRelationshipsResponse, +) +from datadog_api_client.v2.model.restriction_query_without_relationships import RestrictionQueryWithoutRelationships +from datadog_api_client.v2.model.restriction_query_without_relationships_response import ( + RestrictionQueryWithoutRelationshipsResponse, +) from datadog_api_client.v2.model.retention_filter import RetentionFilter from datadog_api_client.v2.model.retention_filter_all import RetentionFilterAll from datadog_api_client.v2.model.retention_filter_all_attributes import RetentionFilterAllAttributes @@ -2778,6 +2800,7 @@ "LogsQueryOptions", "LogsResponseMetadata", "LogsResponseMetadataPage", + "LogsRestrictionQueriesType", "LogsSort", "LogsSortOrder", "LogsStorageTier", @@ -3097,6 +3120,23 @@ "RestrictionPolicyResponse", "RestrictionPolicyType", "RestrictionPolicyUpdateRequest", + "RestrictionQueryAttributes", + "RestrictionQueryCreateAttributes", + "RestrictionQueryCreateData", + "RestrictionQueryCreatePayload", + "RestrictionQueryListResponse", + "RestrictionQueryRelationships", + "RestrictionQueryResponseIncludedItem", + "RestrictionQueryRole", + "RestrictionQueryRoleAttribute", + "RestrictionQueryRolesResponse", + "RestrictionQueryUpdateAttributes", + "RestrictionQueryUpdateData", + "RestrictionQueryUpdatePayload", + "RestrictionQueryWithRelationships", + "RestrictionQueryWithRelationshipsResponse", + "RestrictionQueryWithoutRelationships", + "RestrictionQueryWithoutRelationshipsResponse", "RetentionFilter", "RetentionFilterAll", "RetentionFilterAllAttributes",