Skip to content

Commit 52a66e5

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Update rotation interval (#2678)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent e719b40 commit 52a66e5

11 files changed

+41
-34
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.6",
7-
"regenerated": "2025-07-07 12:19:28.111174",
8-
"spec_repo_commit": "fa2473ca"
7+
"regenerated": "2025-07-08 07:28:58.334886",
8+
"spec_repo_commit": "d9879085"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-07-07 12:19:28.209312",
13-
"spec_repo_commit": "fa2473ca"
12+
"regenerated": "2025-07-08 07:28:58.350439",
13+
"spec_repo_commit": "d9879085"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ components:
758758
description: 'Identifier, formatted as `type:id`. Supported types: `connection`,
759759
`dashboard`, `integration-account`, `integration-service`, `integration-webhook`,
760760
`notebook`, `reference-table`, `security-rule`, `slo`, `workflow`, `app-builder-app`,
761-
`connection`, `connection-group`, `rum-application`.'
761+
`connection`, `connection-group`, `rum-application`, `cross-org-connection`.'
762762
example: dashboard:abc-def-ghi
763763
in: path
764764
name: resource_id
@@ -20008,7 +20008,7 @@ components:
2000820008
type: object
2000920009
LayerAttributesInterval:
2001020010
description: Defines how often the rotation repeats, using a combination of
20011-
days and optional seconds.
20011+
days and optional seconds. Should be at least 1 hour.
2001220012
properties:
2001320013
days:
2001420014
description: The number of days in each rotation cycle.
@@ -33143,7 +33143,7 @@ components:
3314333143
- effective_date: '2025-02-03T05:00:00Z'
3314433144
end_date: '2025-12-31T00:00:00Z'
3314533145
interval:
33146-
seconds: 300
33146+
seconds: 3600
3314733147
members:
3314833148
- user:
3314933149
id: 00000000-aba1-0000-0000-000000000000
@@ -56502,6 +56502,8 @@ paths:
5650256502

5650356503
- RUM Applications: `rum-application`
5650456504

56505+
- Cross Org Connections: `cross-org-connection`
56506+
5650556507

5650656508
#### Supported relations for resources
5650756509

@@ -56543,7 +56545,9 @@ paths:
5654356545

5654456546
Connection Groups | `viewer`, `editor`
5654556547

56546-
RUM Application | `viewer`, `editor`'
56548+
RUM Application | `viewer`, `editor`
56549+
56550+
Cross Org Connections | `viewer`, `editor`'
5654756551
operationId: UpdateRestrictionPolicy
5654856552
parameters:
5654956553
- $ref: '#/components/parameters/ResourceID'

examples/v2/on-call/UpdateOnCallSchedule.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
effective_date=(datetime.now() + relativedelta(days=-10)),
5151
end_date=(datetime.now() + relativedelta(days=10)),
5252
interval=LayerAttributesInterval(
53-
seconds=300,
53+
seconds=3600,
5454
),
5555
members=[
5656
ScheduleRequestDataAttributesLayersItemsMembersItems(

src/datadog_api_client/v2/api/restriction_policies_api.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def delete_restriction_policy(
112112
113113
Deletes the restriction policy associated with a specified resource.
114114
115-
:param resource_id: Identifier, formatted as ``type:id``. Supported types: ``connection`` , ``dashboard`` , ``integration-account`` , ``integration-service`` , ``integration-webhook`` , ``notebook`` , ``reference-table`` , ``security-rule`` , ``slo`` , ``workflow`` , ``app-builder-app`` , ``connection`` , ``connection-group`` , ``rum-application``.
115+
:param resource_id: Identifier, formatted as ``type:id``. Supported types: ``connection`` , ``dashboard`` , ``integration-account`` , ``integration-service`` , ``integration-webhook`` , ``notebook`` , ``reference-table`` , ``security-rule`` , ``slo`` , ``workflow`` , ``app-builder-app`` , ``connection`` , ``connection-group`` , ``rum-application`` , ``cross-org-connection``.
116116
:type resource_id: str
117117
:rtype: None
118118
"""
@@ -129,7 +129,7 @@ def get_restriction_policy(
129129
130130
Retrieves the restriction policy associated with a specified resource.
131131
132-
:param resource_id: Identifier, formatted as ``type:id``. Supported types: ``connection`` , ``dashboard`` , ``integration-account`` , ``integration-service`` , ``integration-webhook`` , ``notebook`` , ``reference-table`` , ``security-rule`` , ``slo`` , ``workflow`` , ``app-builder-app`` , ``connection`` , ``connection-group`` , ``rum-application``.
132+
:param resource_id: Identifier, formatted as ``type:id``. Supported types: ``connection`` , ``dashboard`` , ``integration-account`` , ``integration-service`` , ``integration-webhook`` , ``notebook`` , ``reference-table`` , ``security-rule`` , ``slo`` , ``workflow`` , ``app-builder-app`` , ``connection`` , ``connection-group`` , ``rum-application`` , ``cross-org-connection``.
133133
:type resource_id: str
134134
:rtype: RestrictionPolicyResponse
135135
"""
@@ -171,6 +171,7 @@ def update_restriction_policy(
171171
* Connections: ``connection``
172172
* Connection Groups: ``connection-group``
173173
* RUM Applications: ``rum-application``
174+
* Cross Org Connections: ``cross-org-connection``
174175
175176
**Supported relations for resources**
176177
@@ -215,9 +216,11 @@ def update_restriction_policy(
215216
- ``viewer`` , ``editor``
216217
* - RUM Application
217218
- ``viewer`` , ``editor``
219+
* - Cross Org Connections
220+
- ``viewer`` , ``editor``
218221
219222
220-
:param resource_id: Identifier, formatted as ``type:id``. Supported types: ``connection`` , ``dashboard`` , ``integration-account`` , ``integration-service`` , ``integration-webhook`` , ``notebook`` , ``reference-table`` , ``security-rule`` , ``slo`` , ``workflow`` , ``app-builder-app`` , ``connection`` , ``connection-group`` , ``rum-application``.
223+
:param resource_id: Identifier, formatted as ``type:id``. Supported types: ``connection`` , ``dashboard`` , ``integration-account`` , ``integration-service`` , ``integration-webhook`` , ``notebook`` , ``reference-table`` , ``security-rule`` , ``slo`` , ``workflow`` , ``app-builder-app`` , ``connection`` , ``connection-group`` , ``rum-application`` , ``cross-org-connection``.
221224
:type resource_id: str
222225
:param body: Restriction policy payload
223226
:type body: RestrictionPolicyUpdateRequest

src/datadog_api_client/v2/model/layer_attributes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def __init__(
6262
:param end_date: When the layer ceases to be active (ISO 8601).
6363
:type end_date: datetime, optional
6464
65-
:param interval: Defines how often the rotation repeats, using a combination of days and optional seconds.
65+
:param interval: Defines how often the rotation repeats, using a combination of days and optional seconds. Should be at least 1 hour.
6666
:type interval: LayerAttributesInterval, optional
6767
6868
:param name: The name of this layer.

src/datadog_api_client/v2/model/layer_attributes_interval.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def openapi_types(_):
3737

3838
def __init__(self_, days: Union[int, UnsetType] = unset, seconds: Union[int, UnsetType] = unset, **kwargs):
3939
"""
40-
Defines how often the rotation repeats, using a combination of days and optional seconds.
40+
Defines how often the rotation repeats, using a combination of days and optional seconds. Should be at least 1 hour.
4141
4242
:param days: The number of days in each rotation cycle.
4343
:type days: int, optional

src/datadog_api_client/v2/model/schedule_create_request_data_attributes_layers_items.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def __init__(
7171
:param end_date: The date/time after which this layer no longer applies (in ISO 8601).
7272
:type end_date: datetime, optional
7373
74-
:param interval: Defines how often the rotation repeats, using a combination of days and optional seconds.
74+
:param interval: Defines how often the rotation repeats, using a combination of days and optional seconds. Should be at least 1 hour.
7575
:type interval: LayerAttributesInterval
7676
7777
:param members: A list of members who participate in this layer's rotation.

src/datadog_api_client/v2/model/schedule_update_request_data_attributes_layers_items.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def __init__(
7878
:param id: A unique identifier for the layer being updated.
7979
:type id: str, optional
8080
81-
:param interval: Defines how often the rotation repeats, using a combination of days and optional seconds.
81+
:param interval: Defines how often the rotation repeats, using a combination of days and optional seconds. Should be at least 1 hour.
8282
:type interval: LayerAttributesInterval
8383
8484
:param members: The members assigned to this layer.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2025-05-29T04:54:24.605Z
1+
2025-07-03T14:30:45.232Z

tests/v2/cassettes/test_scenarios/test_update_oncall_schedule_returns_ok_response.yaml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
interactions:
22
- request:
3-
body: '{"data":{"attributes":{"email":"Test-Update_On_Call_schedule_returns_OK_response-1748494464@datadoghq.com","title":"user
3+
body: '{"data":{"attributes":{"email":"Test-Update_On_Call_schedule_returns_OK_response-1751553045@datadoghq.com","title":"user
44
title"},"type":"users"}}'
55
headers:
66
accept:
@@ -11,7 +11,7 @@ interactions:
1111
uri: https://api.datadoghq.com/api/v2/users
1212
response:
1313
body:
14-
string: '{"data":{"type":"users","id":"fe6b1fbd-3c48-11f0-90c9-4ad2f0f8c382","attributes":{"name":null,"handle":"test-update_on_call_schedule_returns_ok_response-1748494464@datadoghq.com","created_at":"2025-05-29T04:54:25.223093+00:00","modified_at":"2025-05-29T04:54:25.223093+00:00","email":"test-update_on_call_schedule_returns_ok_response-1748494464@datadoghq.com","icon":"https://secure.gravatar.com/avatar/6bc23e301121dc7a0a2d1adc71bbbc54?s=48&d=retro","title":"user
14+
string: '{"data":{"type":"users","id":"4ea279a2-581a-11f0-bb4d-bed6e06a25e4","attributes":{"name":null,"handle":"test-update_on_call_schedule_returns_ok_response-1751553045@datadoghq.com","created_at":"2025-07-03T14:30:46.015046+00:00","modified_at":"2025-07-03T14:30:46.015046+00:00","email":"test-update_on_call_schedule_returns_ok_response-1751553045@datadoghq.com","icon":"https://secure.gravatar.com/avatar/8c4a38455f71bb12d82add5157f105a0?s=48&d=retro","title":"user
1515
title","verified":false,"service_account":false,"disabled":false,"allowed_login_methods":[],"status":"Pending"},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}}
1616
1717
'
@@ -22,8 +22,8 @@ interactions:
2222
code: 201
2323
message: Created
2424
- request:
25-
body: '{"data":{"attributes":{"layers":[{"effective_date":"2025-05-19T04:54:24.605Z","end_date":"2025-06-08T04:54:24.605Z","interval":{"days":1},"members":[{"user":{"id":"fe6b1fbd-3c48-11f0-90c9-4ad2f0f8c382"}}],"name":"Layer
26-
1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-05-24T04:54:24.605Z"}],"name":"Test-Update_On_Call_schedule_returns_OK_response-1748494464","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}},"type":"schedules"}}'
25+
body: '{"data":{"attributes":{"layers":[{"effective_date":"2025-06-23T14:30:45.232Z","end_date":"2025-07-13T14:30:45.232Z","interval":{"days":1},"members":[{"user":{"id":"4ea279a2-581a-11f0-bb4d-bed6e06a25e4"}}],"name":"Layer
26+
1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-06-28T14:30:45.232Z"}],"name":"Test-Update_On_Call_schedule_returns_OK_response-1751553045","time_zone":"America/New_York"},"relationships":{"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}},"type":"schedules"}}'
2727
headers:
2828
accept:
2929
- application/json
@@ -33,15 +33,15 @@ interactions:
3333
uri: https://api.datadoghq.com/api/v2/on-call/schedules
3434
response:
3535
body:
36-
string: '{"data":{"id":"f12650c6-beae-40fd-a686-7e57d72216c6","type":"schedules","attributes":{"name":"Test-Update_On_Call_schedule_returns_OK_response-1748494464","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"b9dca7b6-b083-44d3-9971-6c2c796fb352","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}'
36+
string: '{"data":{"id":"3cb80fa4-f506-4b2f-9187-2af6c2253698","type":"schedules","attributes":{"name":"Test-Update_On_Call_schedule_returns_OK_response-1751553045","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"70f75d0e-19d0-46a1-9c1c-19d2de171744","type":"layers"}]},"teams":{"data":[{"id":"65aea9d0-941c-4607-bf8a-14fc0dac2820","type":"teams"}]}}}}'
3737
headers:
3838
content-type:
3939
- application/vnd.api+json
4040
status:
4141
code: 201
4242
message: Created
4343
- request:
44-
body: '{"data":{"attributes":{"handle":"test-handle-ed2e958dacae5dbc","name":"test-name-ed2e958dacae5dbc"},"type":"team"}}'
44+
body: '{"data":{"attributes":{"handle":"test-handle-001d7ca9284aa632","name":"test-name-001d7ca9284aa632"},"type":"team"}}'
4545
headers:
4646
accept:
4747
- application/json
@@ -51,7 +51,7 @@ interactions:
5151
uri: https://api.datadoghq.com/api/v2/team
5252
response:
5353
body:
54-
string: '{"data":{"type":"team","id":"522c3ff2-76b4-41db-8cfa-9bb9876145e4","attributes":{"name":"test-name-ed2e958dacae5dbc","handle":"test-handle-ed2e958dacae5dbc","summary":null,"description":null,"avatar":null,"banner":13,"visible_modules":[],"hidden_modules":[],"created_at":"2025-05-29T04:54:26.535052+00:00","modified_at":"2025-05-29T04:54:26.535061+00:00","user_count":0,"link_count":0},"relationships":{"team_links":{"links":{"related":"/api/v2/team/522c3ff2-76b4-41db-8cfa-9bb9876145e4/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/522c3ff2-76b4-41db-8cfa-9bb9876145e4/permission-settings"}}}}}
54+
string: '{"data":{"type":"team","id":"9ca20f11-ede5-4147-addb-25b7f91ce508","attributes":{"name":"test-name-001d7ca9284aa632","handle":"test-handle-001d7ca9284aa632","summary":null,"description":null,"avatar":null,"banner":13,"visible_modules":[],"hidden_modules":[],"created_at":"2025-07-03T14:30:46.275583+00:00","modified_at":"2025-07-03T14:30:46.275594+00:00","user_count":0,"link_count":0},"relationships":{"team_links":{"links":{"related":"/api/v2/team/9ca20f11-ede5-4147-addb-25b7f91ce508/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/9ca20f11-ede5-4147-addb-25b7f91ce508/permission-settings"}}}}}
5555
5656
'
5757
headers:
@@ -61,18 +61,18 @@ interactions:
6161
code: 201
6262
message: Created
6363
- request:
64-
body: '{"data":{"attributes":{"layers":[{"effective_date":"2025-05-19T04:54:24.605Z","end_date":"2025-06-08T04:54:24.605Z","id":"b9dca7b6-b083-44d3-9971-6c2c796fb352","interval":{"seconds":300},"members":[{"user":{"id":"fe6b1fbd-3c48-11f0-90c9-4ad2f0f8c382"}}],"name":"Layer
65-
1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-05-24T04:54:24.605Z"}],"name":"Test-Update_On_Call_schedule_returns_OK_response-1748494464","time_zone":"America/New_York"},"id":"f12650c6-beae-40fd-a686-7e57d72216c6","relationships":{"teams":{"data":[{"id":"522c3ff2-76b4-41db-8cfa-9bb9876145e4","type":"teams"}]}},"type":"schedules"}}'
64+
body: '{"data":{"attributes":{"layers":[{"effective_date":"2025-06-23T14:30:45.232Z","end_date":"2025-07-13T14:30:45.232Z","id":"70f75d0e-19d0-46a1-9c1c-19d2de171744","interval":{"seconds":3600},"members":[{"user":{"id":"4ea279a2-581a-11f0-bb4d-bed6e06a25e4"}}],"name":"Layer
65+
1","restrictions":[{"end_day":"friday","end_time":"17:00:00","start_day":"monday","start_time":"09:00:00"}],"rotation_start":"2025-06-28T14:30:45.232Z"}],"name":"Test-Update_On_Call_schedule_returns_OK_response-1751553045","time_zone":"America/New_York"},"id":"3cb80fa4-f506-4b2f-9187-2af6c2253698","relationships":{"teams":{"data":[{"id":"9ca20f11-ede5-4147-addb-25b7f91ce508","type":"teams"}]}},"type":"schedules"}}'
6666
headers:
6767
accept:
6868
- application/json
6969
content-type:
7070
- application/json
7171
method: PUT
72-
uri: https://api.datadoghq.com/api/v2/on-call/schedules/f12650c6-beae-40fd-a686-7e57d72216c6
72+
uri: https://api.datadoghq.com/api/v2/on-call/schedules/3cb80fa4-f506-4b2f-9187-2af6c2253698
7373
response:
7474
body:
75-
string: '{"data":{"id":"f12650c6-beae-40fd-a686-7e57d72216c6","type":"schedules","attributes":{"name":"Test-Update_On_Call_schedule_returns_OK_response-1748494464","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"b9dca7b6-b083-44d3-9971-6c2c796fb352","type":"layers"}]},"teams":{"data":[{"id":"522c3ff2-76b4-41db-8cfa-9bb9876145e4","type":"teams"}]}}}}'
75+
string: '{"data":{"id":"3cb80fa4-f506-4b2f-9187-2af6c2253698","type":"schedules","attributes":{"name":"Test-Update_On_Call_schedule_returns_OK_response-1751553045","time_zone":"America/New_York"},"relationships":{"layers":{"data":[{"id":"70f75d0e-19d0-46a1-9c1c-19d2de171744","type":"layers"}]},"teams":{"data":[{"id":"9ca20f11-ede5-4147-addb-25b7f91ce508","type":"teams"}]}}}}'
7676
headers:
7777
content-type:
7878
- application/vnd.api+json
@@ -85,7 +85,7 @@ interactions:
8585
accept:
8686
- '*/*'
8787
method: DELETE
88-
uri: https://api.datadoghq.com/api/v2/team/522c3ff2-76b4-41db-8cfa-9bb9876145e4
88+
uri: https://api.datadoghq.com/api/v2/team/9ca20f11-ede5-4147-addb-25b7f91ce508
8989
response:
9090
body:
9191
string: ''
@@ -99,7 +99,7 @@ interactions:
9999
accept:
100100
- '*/*'
101101
method: DELETE
102-
uri: https://api.datadoghq.com/api/v2/on-call/schedules/f12650c6-beae-40fd-a686-7e57d72216c6
102+
uri: https://api.datadoghq.com/api/v2/on-call/schedules/3cb80fa4-f506-4b2f-9187-2af6c2253698
103103
response:
104104
body:
105105
string: ''
@@ -113,7 +113,7 @@ interactions:
113113
accept:
114114
- '*/*'
115115
method: DELETE
116-
uri: https://api.datadoghq.com/api/v2/users/fe6b1fbd-3c48-11f0-90c9-4ad2f0f8c382
116+
uri: https://api.datadoghq.com/api/v2/users/4ea279a2-581a-11f0-bb4d-bed6e06a25e4
117117
response:
118118
body:
119119
string: ''

0 commit comments

Comments
 (0)