Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
863 changes: 863 additions & 0 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Delete a Cloud Cost Management tag description returns "No Content" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new
api_instance.delete_cost_tag_description_by_key("tag_key")
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Generate a Cloud Cost Management tag description returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new
p api_instance.generate_cost_tag_description_by_key("tag_key")
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Get a Cloud Cost Management tag description returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new
p api_instance.get_cost_tag_description_by_key("tag_key")
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Upsert a Cloud Cost Management tag description returns "No Content" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new

body = DatadogAPIClient::V2::CostTagDescriptionUpsertRequest.new({
data: DatadogAPIClient::V2::CostTagDescriptionUpsertRequestData.new({
attributes: DatadogAPIClient::V2::CostTagDescriptionUpsertRequestDataAttributes.new({
cloud: "aws",
description: "AWS account that owns this cost.",
}),
id: "account_id",
type: DatadogAPIClient::V2::CostTagDescriptionType::COST_TAG_DESCRIPTION,
}),
})
api_instance.upsert_cost_tag_description_by_key("tag_key", body)
8 changes: 8 additions & 0 deletions examples/v2/oauth2-client-public/DeleteScopesRestriction.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Delete an OAuth2 client scopes restriction returns "No Content" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.delete_scopes_restriction".to_sym] = true
end
api_instance = DatadogAPIClient::V2::OAuth2ClientPublicAPI.new
api_instance.delete_scopes_restriction("fafa8e1c-36a5-11f0-a83d-da7ad0900001")
8 changes: 8 additions & 0 deletions examples/v2/oauth2-client-public/GetScopesRestriction.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Get an OAuth2 client scopes restriction returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.get_scopes_restriction".to_sym] = true
end
api_instance = DatadogAPIClient::V2::OAuth2ClientPublicAPI.new
p api_instance.get_scopes_restriction("fafa8e1c-36a5-11f0-a83d-da7ad0900001")
29 changes: 29 additions & 0 deletions examples/v2/oauth2-client-public/RegisterOAuthClient.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Register an OAuth2 client returns "Created" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.register_o_auth_client".to_sym] = true
end
api_instance = DatadogAPIClient::V2::OAuth2ClientPublicAPI.new

body = DatadogAPIClient::V2::OAuthClientRegistrationRequest.new({
client_name: "Example MCP Client",
client_uri: "https://example.com",
grant_types: [
DatadogAPIClient::V2::OAuthClientRegistrationGrantType::AUTHORIZATION_CODE,
DatadogAPIClient::V2::OAuthClientRegistrationGrantType::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: [
DatadogAPIClient::V2::OAuthClientRegistrationResponseType::CODE,
],
scope: "openid profile",
token_endpoint_auth_method: "none",
tos_uri: "https://example.com/tos",
})
p api_instance.register_o_auth_client(body)
24 changes: 24 additions & 0 deletions examples/v2/oauth2-client-public/UpsertScopesRestriction.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Upsert an OAuth2 client scopes restriction returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.upsert_scopes_restriction".to_sym] = true
end
api_instance = DatadogAPIClient::V2::OAuth2ClientPublicAPI.new

body = DatadogAPIClient::V2::UpsertOAuthScopesRestrictionRequest.new({
data: DatadogAPIClient::V2::UpsertOAuthScopesRestrictionData.new({
attributes: DatadogAPIClient::V2::UpsertOAuthScopesRestrictionDataAttributes.new({
oidc_scopes: [
DatadogAPIClient::V2::OAuthOidcScope::OPENID,
DatadogAPIClient::V2::OAuthOidcScope::EMAIL,
],
permission_scopes: [
"dashboards_read",
"metrics_read",
],
}),
type: DatadogAPIClient::V2::UpsertOAuthScopesRestrictionType::UPSERT_SCOPES_RESTRICTION,
}),
})
p api_instance.upsert_scopes_restriction("fafa8e1c-36a5-11f0-a83d-da7ad0900001", body)
28 changes: 28 additions & 0 deletions features/scenarios_model_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2622,6 +2622,21 @@
"v2.ListCostTagDescriptions" => {
"filter_cloud" => "String",
},
"v2.DeleteCostTagDescriptionByKey" => {
"tag_key" => "String",
"cloud" => "String",
},
"v2.GetCostTagDescriptionByKey" => {
"tag_key" => "String",
"filter_cloud" => "String",
},
"v2.UpsertCostTagDescriptionByKey" => {
"tag_key" => "String",
"body" => "CostTagDescriptionUpsertRequest",
},
"v2.GenerateCostTagDescriptionByKey" => {
"tag_key" => "String",
},
"v2.ListCostTagKeys" => {
"filter_metric" => "String",
"filter_tags" => "Array<String>",
Expand Down Expand Up @@ -3881,6 +3896,19 @@
"tags" => "String",
"limit" => "Integer",
},
"v2.DeleteScopesRestriction" => {
"client_uuid" => "UUID",
},
"v2.GetScopesRestriction" => {
"client_uuid" => "UUID",
},
"v2.UpsertScopesRestriction" => {
"client_uuid" => "UUID",
"body" => "UpsertOAuthScopesRestrictionRequest",
},
"v2.RegisterOAuthClient" => {
"body" => "OAuthClientRegistrationRequest",
},
"v2.ListPipelines" => {
"page_size" => "Integer",
"page_number" => "Integer",
Expand Down
65 changes: 65 additions & 0 deletions features/v2/cloud_cost_management.feature
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,20 @@ Feature: Cloud Cost Management
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/cloud-cost-management
Scenario: Delete a Cloud Cost Management tag description returns "Bad Request" response
Given new "DeleteCostTagDescriptionByKey" request
And request contains "tag_key" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/cloud-cost-management
Scenario: Delete a Cloud Cost Management tag description returns "No Content" response
Given new "DeleteCostTagDescriptionByKey" request
And request contains "tag_key" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 204 No Content

@team:DataDog/cloud-cost-management
Scenario: Delete a budget returns "Bad Request" response
Given new "DeleteBudget" request
Expand Down Expand Up @@ -218,6 +232,20 @@ Feature: Cloud Cost Management
When the request is sent
Then the response status is 204 No Content

@generated @skip @team:DataDog/cloud-cost-management
Scenario: Generate a Cloud Cost Management tag description returns "Bad Request" response
Given new "GenerateCostTagDescriptionByKey" request
And request contains "tag_key" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/cloud-cost-management
Scenario: Generate a Cloud Cost Management tag description returns "OK" response
Given new "GenerateCostTagDescriptionByKey" request
And request contains "tag_key" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK

@replay-only @team:DataDog/cloud-cost-management
Scenario: Get Custom Costs File returns "OK" response
Given new "GetCustomCostsFile" request
Expand Down Expand Up @@ -250,6 +278,27 @@ Feature: Cloud Cost Management
And the response "data.type" is equal to "gcp_uc_config"
And the response "data.attributes.account_id" is equal to "123456_ABCDEF_123ABC"

@generated @skip @team:DataDog/cloud-cost-management
Scenario: Get a Cloud Cost Management tag description returns "Bad Request" response
Given new "GetCostTagDescriptionByKey" request
And request contains "tag_key" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/cloud-cost-management
Scenario: Get a Cloud Cost Management tag description returns "Not Found" response
Given new "GetCostTagDescriptionByKey" request
And request contains "tag_key" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/cloud-cost-management
Scenario: Get a Cloud Cost Management tag description returns "OK" response
Given new "GetCostTagDescriptionByKey" request
And request contains "tag_key" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/cloud-cost-management
Scenario: Get a Cloud Cost Management tag key returns "Bad Request" response
Given new "GetCostTagKey" request
Expand Down Expand Up @@ -873,6 +922,22 @@ Feature: Cloud Cost Management
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/cloud-cost-management
Scenario: Upsert a Cloud Cost Management tag description returns "Bad Request" response
Given new "UpsertCostTagDescriptionByKey" request
And request contains "tag_key" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"cloud": "aws", "description": "AWS account that owns this cost."}, "id": "account_id", "type": "cost_tag_description"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/cloud-cost-management
Scenario: Upsert a Cloud Cost Management tag description returns "No Content" response
Given new "UpsertCostTagDescriptionByKey" request
And request contains "tag_key" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"cloud": "aws", "description": "AWS account that owns this cost."}, "id": "account_id", "type": "cost_tag_description"}}
When the request is sent
Then the response status is 204 No Content

@generated @skip @team:DataDog/cloud-cost-management
Scenario: Validate CSV budget returns "OK" response
Given new "ValidateCsvBudget" request
Expand Down
100 changes: 100 additions & 0 deletions features/v2/oauth2_client_public.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
@endpoint(oauth2-client-public) @endpoint(oauth2-client-public-v2)
Feature: OAuth2 Client Public
Configure OAuth2 clients for Datadog. Supports RFC 7591 Dynamic Client
Registration and management of OAuth2 client scopes restrictions.

Background:
Given a valid "apiKeyAuth" key in the system
And a valid "appKeyAuth" key in the system
And an instance of "OAuth2ClientPublic" API

@generated @skip @team:DataDog/delegated-auth-login
Scenario: Delete an OAuth2 client scopes restriction returns "Bad Request" response
Given operation "DeleteScopesRestriction" enabled
And new "DeleteScopesRestriction" request
And request contains "client_uuid" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/delegated-auth-login
Scenario: Delete an OAuth2 client scopes restriction returns "No Content" response
Given operation "DeleteScopesRestriction" enabled
And new "DeleteScopesRestriction" request
And request contains "client_uuid" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 204 No Content

@generated @skip @team:DataDog/delegated-auth-login
Scenario: Delete an OAuth2 client scopes restriction returns "Not Found" response
Given operation "DeleteScopesRestriction" enabled
And new "DeleteScopesRestriction" request
And request contains "client_uuid" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/delegated-auth-login
Scenario: Get an OAuth2 client scopes restriction returns "Bad Request" response
Given operation "GetScopesRestriction" enabled
And new "GetScopesRestriction" request
And request contains "client_uuid" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/delegated-auth-login
Scenario: Get an OAuth2 client scopes restriction returns "Not Found" response
Given operation "GetScopesRestriction" enabled
And new "GetScopesRestriction" request
And request contains "client_uuid" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/delegated-auth-login
Scenario: Get an OAuth2 client scopes restriction returns "OK" response
Given operation "GetScopesRestriction" enabled
And new "GetScopesRestriction" request
And request contains "client_uuid" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/delegated-auth-login
Scenario: Register an OAuth2 client returns "Bad Request" response
Given operation "RegisterOAuthClient" enabled
And new "RegisterOAuthClient" request
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"}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/delegated-auth-login
Scenario: Register an OAuth2 client returns "Created" response
Given operation "RegisterOAuthClient" enabled
And new "RegisterOAuthClient" request
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"}
When the request is sent
Then the response status is 201 Created

@generated @skip @team:DataDog/delegated-auth-login
Scenario: Upsert an OAuth2 client scopes restriction returns "Bad Request" response
Given operation "UpsertScopesRestriction" enabled
And new "UpsertScopesRestriction" request
And request contains "client_uuid" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"oidc_scopes": ["openid", "email"], "permission_scopes": ["dashboards_read", "metrics_read"]}, "type": "upsert_scopes_restriction"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/delegated-auth-login
Scenario: Upsert an OAuth2 client scopes restriction returns "Not Found" response
Given operation "UpsertScopesRestriction" enabled
And new "UpsertScopesRestriction" request
And request contains "client_uuid" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"oidc_scopes": ["openid", "email"], "permission_scopes": ["dashboards_read", "metrics_read"]}, "type": "upsert_scopes_restriction"}}
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/delegated-auth-login
Scenario: Upsert an OAuth2 client scopes restriction returns "OK" response
Given operation "UpsertScopesRestriction" enabled
And new "UpsertScopesRestriction" request
And request contains "client_uuid" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"oidc_scopes": ["openid", "email"], "permission_scopes": ["dashboards_read", "metrics_read"]}, "type": "upsert_scopes_restriction"}}
When the request is sent
Then the response status is 200 OK
Loading
Loading