Skip to content

Commit bbe49da

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Update RestrictionPolicy docs with team and user support (#1570)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 4ed5075 commit bbe49da

File tree

5 files changed

+24
-17
lines changed

5 files changed

+24
-17
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.5",
7-
"regenerated": "2023-07-10 14:43:41.796864",
8-
"spec_repo_commit": "96fb94b8"
7+
"regenerated": "2023-07-10 17:45:18.922571",
8+
"spec_repo_commit": "9e0b471a"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.5",
12-
"regenerated": "2023-07-10 14:43:41.894242",
13-
"spec_repo_commit": "96fb94b8"
12+
"regenerated": "2023-07-10 17:45:18.934746",
13+
"spec_repo_commit": "9e0b471a"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11679,19 +11679,23 @@ components:
1167911679
description: 'An array of principals. A principal is a subject or group
1168011680
of subjects.
1168111681

11682-
Each principal is formatted as `type:id`. Supported types: `role` and
11683-
`org`.
11682+
Each principal is formatted as `type:id`. Supported types: `role`, `team`
11683+
(beta), `user` (beta), and `org`.
1168411684

11685-
The org ID can be obtained through the api/v2/current_user API.'
11685+
The org ID can be obtained through the api/v2/current_user API.
11686+
11687+
The user principal type accepts service account IDs.'
1168611688
example:
1168711689
- role:00000000-0000-1111-0000-000000000000
1168811690
items:
1168911691
description: 'Subject or group of subjects. Each principal is formatted
1169011692
as `type:id`.
1169111693

11692-
Supported types: `role` and `org`.
11694+
Supported types: `role`, `team` (beta), `user` (beta), and `org`.
11695+
11696+
The org ID can be obtained through the api/v2/current_user API.
1169311697

11694-
The org ID can be obtained through the api/v2/current_user API.'
11698+
The user principal type accepts service account IDs.'
1169511699
type: string
1169611700
type: array
1169711701
relation:
@@ -27549,10 +27553,11 @@ tags:
2754927553
- description: 'A restriction policy defines the access control rules for a resource,
2755027554
mapping a set of relations
2755127555

27552-
(such as editor and viewer) to a set of allowed principals (such as roles). The
27553-
restriction policy
27556+
(such as editor and viewer) to a set of allowed principals (such as roles, teams
27557+
(beta), or users (beta)).
2755427558

27555-
determines who is authorized to perform what actions on the resource.'
27559+
The restriction policy determines who is authorized to perform what actions on
27560+
the resource.'
2755627561
name: Restriction Policies
2755727562
- description: 'The Roles API is used to create and manage Datadog roles, what
2755827563

src/datadog_api_client/v2/api/restriction_policies_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
class RestrictionPoliciesApi:
1515
"""
1616
A restriction policy defines the access control rules for a resource, mapping a set of relations
17-
(such as editor and viewer) to a set of allowed principals (such as roles). The restriction policy
18-
determines who is authorized to perform what actions on the resource.
17+
(such as editor and viewer) to a set of allowed principals (such as roles, teams (beta), or users (beta)).
18+
The restriction policy determines who is authorized to perform what actions on the resource.
1919
"""
2020

2121
def __init__(self, api_client=None):

src/datadog_api_client/v2/model/restriction_policy_binding.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ def __init__(self_, principals: List[str], relation: str, **kwargs):
2929
Specifies which principals are associated with a relation.
3030
3131
:param principals: An array of principals. A principal is a subject or group of subjects.
32-
Each principal is formatted as ``type:id``. Supported types: ``role`` and ``org``.
32+
Each principal is formatted as ``type:id``. Supported types: ``role`` , ``team`` (beta), ``user`` (beta), and ``org``.
3333
The org ID can be obtained through the api/v2/current_user API.
34+
The user principal type accepts service account IDs.
3435
:type principals: [str]
3536
3637
:param relation: The role/level of access.

tests/v2/features/restriction_policies.feature

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
Feature: Restriction Policies
33
A restriction policy defines the access control rules for a resource,
44
mapping a set of relations (such as editor and viewer) to a set of allowed
5-
principals (such as roles). The restriction policy determines who is
6-
authorized to perform what actions on the resource.
5+
principals (such as roles, teams (beta), or users (beta)). The restriction
6+
policy determines who is authorized to perform what actions on the
7+
resource.
78

89
Background:
910
Given a valid "apiKeyAuth" key in the system

0 commit comments

Comments
 (0)