@@ -347,6 +347,15 @@ components:
347
347
example: 10
348
348
format: int64
349
349
type: integer
350
+ ResourceID:
351
+ description: 'Identifier, formatted as `type:id`. Supported types: `connection`,
352
+ `dashboard`, `notebook`, `security-rule`.'
353
+ example: dashboard:abc-def-ghi
354
+ in: path
355
+ name: resource_id
356
+ required: true
357
+ schema:
358
+ type: string
350
359
RoleID:
351
360
description: The unique identifier of the role.
352
361
in: path
@@ -9010,6 +9019,91 @@ components:
9010
9019
page:
9011
9020
$ref: '#/components/schemas/Pagination'
9012
9021
type: object
9022
+ RestrictionPolicy:
9023
+ description: Restriction policy object.
9024
+ properties:
9025
+ attributes:
9026
+ $ref: '#/components/schemas/RestrictionPolicyAttributes'
9027
+ id:
9028
+ description: The identifier, always equivalent to the value specified in
9029
+ the `resource_id` path parameter.
9030
+ example: dashboard:abc-def-ghi
9031
+ type: string
9032
+ type:
9033
+ $ref: '#/components/schemas/RestrictionPolicyType'
9034
+ required:
9035
+ - type
9036
+ - id
9037
+ - attributes
9038
+ type: object
9039
+ RestrictionPolicyAttributes:
9040
+ description: Restriction policy attributes.
9041
+ example:
9042
+ bindings: []
9043
+ properties:
9044
+ bindings:
9045
+ description: An array of bindings.
9046
+ items:
9047
+ $ref: '#/components/schemas/RestrictionPolicyBinding'
9048
+ type: array
9049
+ required:
9050
+ - bindings
9051
+ type: object
9052
+ RestrictionPolicyBinding:
9053
+ description: Specifies which principals are associated with a relation.
9054
+ properties:
9055
+ principals:
9056
+ description: 'An array of principals. A principal is a subject or group
9057
+ of subjects.
9058
+
9059
+ Each principal is formatted as `type:id`. Supported types: `role`, `user`,
9060
+ `org`.
9061
+
9062
+ The org ID can be obtained through the api/v2/current_user API.'
9063
+ example:
9064
+ - role:00000000-0000-1111-0000-000000000000
9065
+ items:
9066
+ description: 'Subject or group of subjects. Each principal is formatted
9067
+ as `type:id`.
9068
+
9069
+ Supported types: `role`, `user`, `org`.
9070
+
9071
+ The org ID can be obtained through the api/v2/current_user API.'
9072
+ type: string
9073
+ type: array
9074
+ relation:
9075
+ description: The role/level of access.
9076
+ example: editor
9077
+ type: string
9078
+ required:
9079
+ - relation
9080
+ - principals
9081
+ type: object
9082
+ RestrictionPolicyResponse:
9083
+ description: Response containing information about a single restriction policy.
9084
+ properties:
9085
+ data:
9086
+ $ref: '#/components/schemas/RestrictionPolicy'
9087
+ required:
9088
+ - data
9089
+ type: object
9090
+ RestrictionPolicyType:
9091
+ default: restriction_policy
9092
+ description: Restriction policy type.
9093
+ enum:
9094
+ - restriction_policy
9095
+ example: restriction_policy
9096
+ type: string
9097
+ x-enum-varnames:
9098
+ - RESTRICTION_POLICY
9099
+ RestrictionPolicyUpdateRequest:
9100
+ description: Update request for a restriction policy.
9101
+ properties:
9102
+ data:
9103
+ $ref: '#/components/schemas/RestrictionPolicy'
9104
+ required:
9105
+ - data
9106
+ type: object
9013
9107
Role:
9014
9108
description: Role object returned by the API.
9015
9109
properties:
@@ -16998,6 +17092,96 @@ paths:
16998
17092
any
16999
17093
17000
17094
feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
17095
+ /api/v2/restriction_policy/{resource_id}:
17096
+ delete:
17097
+ description: Deletes the restriction policy associated with a specified resource.
17098
+ operationId: DeleteRestrictionPolicy
17099
+ parameters:
17100
+ - $ref: '#/components/parameters/ResourceID'
17101
+ responses:
17102
+ '204':
17103
+ description: No Content
17104
+ '400':
17105
+ $ref: '#/components/responses/BadRequestResponse'
17106
+ '403':
17107
+ $ref: '#/components/responses/NotAuthorizedResponse'
17108
+ '429':
17109
+ $ref: '#/components/responses/TooManyRequestsResponse'
17110
+ security:
17111
+ - apiKeyAuth: []
17112
+ appKeyAuth: []
17113
+ summary: Delete a restriction policy
17114
+ tags:
17115
+ - Restriction Policies
17116
+ get:
17117
+ description: Retrieves the restriction policy associated with a specified resource.
17118
+ operationId: GetRestrictionPolicy
17119
+ parameters:
17120
+ - $ref: '#/components/parameters/ResourceID'
17121
+ responses:
17122
+ '200':
17123
+ content:
17124
+ application/json:
17125
+ schema:
17126
+ $ref: '#/components/schemas/RestrictionPolicyResponse'
17127
+ description: OK
17128
+ '400':
17129
+ $ref: '#/components/responses/BadRequestResponse'
17130
+ '403':
17131
+ $ref: '#/components/responses/NotAuthorizedResponse'
17132
+ '429':
17133
+ $ref: '#/components/responses/TooManyRequestsResponse'
17134
+ security:
17135
+ - apiKeyAuth: []
17136
+ appKeyAuth: []
17137
+ summary: Get a restriction policy
17138
+ tags:
17139
+ - Restriction Policies
17140
+ post:
17141
+ description: 'Updates the restriction policy associated with a resource.
17142
+
17143
+
17144
+ #### Supported resources
17145
+
17146
+ Restriction policies can be applied to the following resources:
17147
+
17148
+ - Connections: `connection`
17149
+
17150
+ - Dashboards: `dashboard`
17151
+
17152
+ - Notebooks: `notebook`
17153
+
17154
+ - Security Rules: `security-rule`'
17155
+ operationId: UpdateRestrictionPolicy
17156
+ parameters:
17157
+ - $ref: '#/components/parameters/ResourceID'
17158
+ requestBody:
17159
+ content:
17160
+ application/json:
17161
+ schema:
17162
+ $ref: '#/components/schemas/RestrictionPolicyUpdateRequest'
17163
+ description: Restriction policy payload
17164
+ required: true
17165
+ responses:
17166
+ '200':
17167
+ content:
17168
+ application/json:
17169
+ schema:
17170
+ $ref: '#/components/schemas/RestrictionPolicyResponse'
17171
+ description: OK
17172
+ '400':
17173
+ $ref: '#/components/responses/BadRequestResponse'
17174
+ '403':
17175
+ $ref: '#/components/responses/NotAuthorizedResponse'
17176
+ '429':
17177
+ $ref: '#/components/responses/TooManyRequestsResponse'
17178
+ security:
17179
+ - apiKeyAuth: []
17180
+ appKeyAuth: []
17181
+ summary: Update a restriction policy
17182
+ tags:
17183
+ - Restriction Policies
17184
+ x-codegen-request-body-name: body
17001
17185
/api/v2/roles:
17002
17186
get:
17003
17187
description: Returns all roles, including their names and their unique identifiers.
@@ -20733,6 +20917,14 @@ tags:
20733
20917
name: Processes
20734
20918
- description: Search or aggregate your RUM events over HTTP.
20735
20919
name: RUM
20920
+ - description: 'A restriction policy defines the access control rules for a resource,
20921
+ mapping a set of relations
20922
+
20923
+ (such as editor and viewer) to a set of allowed principals (such as roles). The
20924
+ restriction policy
20925
+
20926
+ determines who is authorized to perform what actions on the resource.'
20927
+ name: Restriction Policies
20736
20928
- description: 'The Roles API is used to create and manage Datadog roles, what
20737
20929
20738
20930
[global permissions](https://docs.datadoghq.com/account_management/rbac/)
0 commit comments