Skip to content

Commit ce770a6

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 1e9d9ba of spec repo (DataDog#3400)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent f3e737c commit ce770a6

29 files changed

Lines changed: 2589 additions & 246 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 531 additions & 101 deletions
Large diffs are not rendered by default.

examples/v2/cloud-cost-management/ListCostTagMetadataMonths.rb

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Delete an OAuth2 client scopes restriction returns "No Content" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.delete_scopes_restriction".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::OAuth2ClientPublicAPI.new
8+
api_instance.delete_scopes_restriction("fafa8e1c-36a5-11f0-a83d-da7ad0900001")
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Get an OAuth2 client scopes restriction returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.get_scopes_restriction".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::OAuth2ClientPublicAPI.new
8+
p api_instance.get_scopes_restriction("fafa8e1c-36a5-11f0-a83d-da7ad0900001")
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Register an OAuth2 client returns "Created" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.register_o_auth_client".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::OAuth2ClientPublicAPI.new
8+
9+
body = DatadogAPIClient::V2::OAuthClientRegistrationRequest.new({
10+
client_name: "Example MCP Client",
11+
client_uri: "https://example.com",
12+
grant_types: [
13+
DatadogAPIClient::V2::OAuthClientRegistrationGrantType::AUTHORIZATION_CODE,
14+
DatadogAPIClient::V2::OAuthClientRegistrationGrantType::REFRESH_TOKEN,
15+
],
16+
jwks_uri: "https://example.com/.well-known/jwks.json",
17+
logo_uri: "https://example.com/logo.png",
18+
policy_uri: "https://example.com/privacy",
19+
redirect_uris: [
20+
"https://example.com/oauth/callback",
21+
],
22+
response_types: [
23+
DatadogAPIClient::V2::OAuthClientRegistrationResponseType::CODE,
24+
],
25+
scope: "openid profile",
26+
token_endpoint_auth_method: "none",
27+
tos_uri: "https://example.com/tos",
28+
})
29+
p api_instance.register_o_auth_client(body)
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Upsert an OAuth2 client scopes restriction returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.upsert_scopes_restriction".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::OAuth2ClientPublicAPI.new
8+
9+
body = DatadogAPIClient::V2::UpsertOAuthScopesRestrictionRequest.new({
10+
data: DatadogAPIClient::V2::UpsertOAuthScopesRestrictionData.new({
11+
attributes: DatadogAPIClient::V2::UpsertOAuthScopesRestrictionDataAttributes.new({
12+
oidc_scopes: [
13+
DatadogAPIClient::V2::OAuthOidcScope::OPENID,
14+
DatadogAPIClient::V2::OAuthOidcScope::EMAIL,
15+
],
16+
permission_scopes: [
17+
"dashboards_read",
18+
"metrics_read",
19+
],
20+
}),
21+
type: DatadogAPIClient::V2::UpsertOAuthScopesRestrictionType::UPSERT_SCOPES_RESTRICTION,
22+
}),
23+
})
24+
p api_instance.upsert_scopes_restriction("fafa8e1c-36a5-11f0-a83d-da7ad0900001", body)

features/scenarios_model_mapping.rb

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2643,9 +2643,6 @@
26432643
"filter_month" => "String",
26442644
"filter_provider" => "String",
26452645
},
2646-
"v2.ListCostTagMetadataMonths" => {
2647-
"filter_provider" => "String",
2648-
},
26492646
"v2.ListCostTagMetadataOrchestrators" => {
26502647
"filter_month" => "String",
26512648
"filter_provider" => "String",
@@ -3878,6 +3875,19 @@
38783875
"tags" => "String",
38793876
"limit" => "Integer",
38803877
},
3878+
"v2.DeleteScopesRestriction" => {
3879+
"client_uuid" => "UUID",
3880+
},
3881+
"v2.GetScopesRestriction" => {
3882+
"client_uuid" => "UUID",
3883+
},
3884+
"v2.UpsertScopesRestriction" => {
3885+
"client_uuid" => "UUID",
3886+
"body" => "UpsertOAuthScopesRestrictionRequest",
3887+
},
3888+
"v2.RegisterOAuthClient" => {
3889+
"body" => "OAuthClientRegistrationRequest",
3890+
},
38813891
"v2.ListPipelines" => {
38823892
"page_size" => "Integer",
38833893
"page_number" => "Integer",

features/v2/cloud_cost_management.feature

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -606,22 +606,6 @@ Feature: Cloud Cost Management
606606
When the request is sent
607607
Then the response status is 200 OK
608608

609-
@generated @skip @team:DataDog/cloud-cost-management
610-
Scenario: List Cloud Cost Management tag metadata months returns "Bad Request" response
611-
Given operation "ListCostTagMetadataMonths" enabled
612-
And new "ListCostTagMetadataMonths" request
613-
And request contains "filter[provider]" parameter from "REPLACE.ME"
614-
When the request is sent
615-
Then the response status is 400 Bad Request
616-
617-
@generated @skip @team:DataDog/cloud-cost-management
618-
Scenario: List Cloud Cost Management tag metadata months returns "OK" response
619-
Given operation "ListCostTagMetadataMonths" enabled
620-
And new "ListCostTagMetadataMonths" request
621-
And request contains "filter[provider]" parameter from "REPLACE.ME"
622-
When the request is sent
623-
Then the response status is 200 OK
624-
625609
@generated @skip @team:DataDog/cloud-cost-management
626610
Scenario: List Cloud Cost Management tag sources returns "Bad Request" response
627611
Given operation "ListCostTagKeySources" enabled
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
@endpoint(oauth2-client-public) @endpoint(oauth2-client-public-v2)
2+
Feature: OAuth2 Client Public
3+
Configure OAuth2 clients for Datadog. Supports RFC 7591 Dynamic Client
4+
Registration and management of OAuth2 client scopes restrictions.
5+
6+
Background:
7+
Given a valid "apiKeyAuth" key in the system
8+
And a valid "appKeyAuth" key in the system
9+
And an instance of "OAuth2ClientPublic" API
10+
11+
@generated @skip @team:DataDog/delegated-auth-login
12+
Scenario: Delete an OAuth2 client scopes restriction returns "Bad Request" response
13+
Given operation "DeleteScopesRestriction" enabled
14+
And new "DeleteScopesRestriction" request
15+
And request contains "client_uuid" parameter from "REPLACE.ME"
16+
When the request is sent
17+
Then the response status is 400 Bad Request
18+
19+
@generated @skip @team:DataDog/delegated-auth-login
20+
Scenario: Delete an OAuth2 client scopes restriction returns "No Content" response
21+
Given operation "DeleteScopesRestriction" enabled
22+
And new "DeleteScopesRestriction" request
23+
And request contains "client_uuid" parameter from "REPLACE.ME"
24+
When the request is sent
25+
Then the response status is 204 No Content
26+
27+
@generated @skip @team:DataDog/delegated-auth-login
28+
Scenario: Delete an OAuth2 client scopes restriction returns "Not Found" response
29+
Given operation "DeleteScopesRestriction" enabled
30+
And new "DeleteScopesRestriction" request
31+
And request contains "client_uuid" parameter from "REPLACE.ME"
32+
When the request is sent
33+
Then the response status is 404 Not Found
34+
35+
@generated @skip @team:DataDog/delegated-auth-login
36+
Scenario: Get an OAuth2 client scopes restriction returns "Bad Request" response
37+
Given operation "GetScopesRestriction" enabled
38+
And new "GetScopesRestriction" request
39+
And request contains "client_uuid" parameter from "REPLACE.ME"
40+
When the request is sent
41+
Then the response status is 400 Bad Request
42+
43+
@generated @skip @team:DataDog/delegated-auth-login
44+
Scenario: Get an OAuth2 client scopes restriction returns "Not Found" response
45+
Given operation "GetScopesRestriction" enabled
46+
And new "GetScopesRestriction" request
47+
And request contains "client_uuid" parameter from "REPLACE.ME"
48+
When the request is sent
49+
Then the response status is 404 Not Found
50+
51+
@generated @skip @team:DataDog/delegated-auth-login
52+
Scenario: Get an OAuth2 client scopes restriction returns "OK" response
53+
Given operation "GetScopesRestriction" enabled
54+
And new "GetScopesRestriction" request
55+
And request contains "client_uuid" parameter from "REPLACE.ME"
56+
When the request is sent
57+
Then the response status is 200 OK
58+
59+
@generated @skip @team:DataDog/delegated-auth-login
60+
Scenario: Register an OAuth2 client returns "Bad Request" response
61+
Given operation "RegisterOAuthClient" enabled
62+
And new "RegisterOAuthClient" request
63+
And body with value {"client_name": "Example MCP Client", "client_uri": "https://example.com", "grant_types": ["authorization_code", "refresh_token"], "jwks_uri": "https://example.com/.well-known/jwks.json", "logo_uri": "https://example.com/logo.png", "policy_uri": "https://example.com/privacy", "redirect_uris": ["https://example.com/oauth/callback"], "response_types": ["code"], "scope": "openid profile", "token_endpoint_auth_method": "none", "tos_uri": "https://example.com/tos"}
64+
When the request is sent
65+
Then the response status is 400 Bad Request
66+
67+
@generated @skip @team:DataDog/delegated-auth-login
68+
Scenario: Register an OAuth2 client returns "Created" response
69+
Given operation "RegisterOAuthClient" enabled
70+
And new "RegisterOAuthClient" request
71+
And body with value {"client_name": "Example MCP Client", "client_uri": "https://example.com", "grant_types": ["authorization_code", "refresh_token"], "jwks_uri": "https://example.com/.well-known/jwks.json", "logo_uri": "https://example.com/logo.png", "policy_uri": "https://example.com/privacy", "redirect_uris": ["https://example.com/oauth/callback"], "response_types": ["code"], "scope": "openid profile", "token_endpoint_auth_method": "none", "tos_uri": "https://example.com/tos"}
72+
When the request is sent
73+
Then the response status is 201 Created
74+
75+
@generated @skip @team:DataDog/delegated-auth-login
76+
Scenario: Upsert an OAuth2 client scopes restriction returns "Bad Request" response
77+
Given operation "UpsertScopesRestriction" enabled
78+
And new "UpsertScopesRestriction" request
79+
And request contains "client_uuid" parameter from "REPLACE.ME"
80+
And body with value {"data": {"attributes": {"oidc_scopes": ["openid", "email"], "permission_scopes": ["dashboards_read", "metrics_read"]}, "type": "upsert_scopes_restriction"}}
81+
When the request is sent
82+
Then the response status is 400 Bad Request
83+
84+
@generated @skip @team:DataDog/delegated-auth-login
85+
Scenario: Upsert an OAuth2 client scopes restriction returns "Not Found" response
86+
Given operation "UpsertScopesRestriction" enabled
87+
And new "UpsertScopesRestriction" request
88+
And request contains "client_uuid" parameter from "REPLACE.ME"
89+
And body with value {"data": {"attributes": {"oidc_scopes": ["openid", "email"], "permission_scopes": ["dashboards_read", "metrics_read"]}, "type": "upsert_scopes_restriction"}}
90+
When the request is sent
91+
Then the response status is 404 Not Found
92+
93+
@generated @skip @team:DataDog/delegated-auth-login
94+
Scenario: Upsert an OAuth2 client scopes restriction returns "OK" response
95+
Given operation "UpsertScopesRestriction" enabled
96+
And new "UpsertScopesRestriction" request
97+
And request contains "client_uuid" parameter from "REPLACE.ME"
98+
And body with value {"data": {"attributes": {"oidc_scopes": ["openid", "email"], "permission_scopes": ["dashboards_read", "metrics_read"]}, "type": "upsert_scopes_restriction"}}
99+
When the request is sent
100+
Then the response status is 200 OK

features/v2/undo.json

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1898,12 +1898,6 @@
18981898
"type": "safe"
18991899
}
19001900
},
1901-
"ListCostTagMetadataMonths": {
1902-
"tag": "Cloud Cost Management",
1903-
"undo": {
1904-
"type": "safe"
1905-
}
1906-
},
19071901
"ListCostTagMetadataOrchestrators": {
19081902
"tag": "Cloud Cost Management",
19091903
"undo": {
@@ -4672,6 +4666,30 @@
46724666
"type": "safe"
46734667
}
46744668
},
4669+
"DeleteScopesRestriction": {
4670+
"tag": "OAuth2 Client Public",
4671+
"undo": {
4672+
"type": "idempotent"
4673+
}
4674+
},
4675+
"GetScopesRestriction": {
4676+
"tag": "OAuth2 Client Public",
4677+
"undo": {
4678+
"type": "safe"
4679+
}
4680+
},
4681+
"UpsertScopesRestriction": {
4682+
"tag": "OAuth2 Client Public",
4683+
"undo": {
4684+
"type": "idempotent"
4685+
}
4686+
},
4687+
"RegisterOAuthClient": {
4688+
"tag": "OAuth2 Client Public",
4689+
"undo": {
4690+
"type": "idempotent"
4691+
}
4692+
},
46754693
"ListPipelines": {
46764694
"tag": "Observability Pipelines",
46774695
"undo": {

0 commit comments

Comments
 (0)