Skip to content

Commit 9df6e69

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 5b233d5 of spec repo
1 parent 803fc7b commit 9df6e69

21 files changed

Lines changed: 3462 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 717 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Get a governance control returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.get_governance_control".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::GovernanceControlsAPI.new
8+
p api_instance.get_governance_control("detection_type")
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# List governance controls returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.list_governance_controls".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::GovernanceControlsAPI.new
8+
p api_instance.list_governance_controls()
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Update a governance control returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.update_governance_control".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::GovernanceControlsAPI.new
8+
9+
body = DatadogAPIClient::V2::GovernanceControlUpdateRequest.new({
10+
data: DatadogAPIClient::V2::GovernanceControlUpdateData.new({
11+
attributes: DatadogAPIClient::V2::GovernanceControlUpdateAttributes.new({
12+
detection_frequency: "daily",
13+
mitigation_type: "revoke_api_key",
14+
name: "Unused API Keys",
15+
notification_frequency: "daily",
16+
notification_type: "slack",
17+
}),
18+
id: "0d4e6f8a-1b2c-3d4e-5f6a-7b8c9d0e1f2a",
19+
type: DatadogAPIClient::V2::GovernanceControlResourceType::GOVERNANCE_CONTROL,
20+
}),
21+
})
22+
p api_instance.update_governance_control("detection_type", body)

features/scenarios_model_mapping.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3376,6 +3376,13 @@
33763376
"saml_config_uuid" => "String",
33773377
"body" => "SAMLConfigurationUpdateRequest",
33783378
},
3379+
"v2.GetGovernanceControl" => {
3380+
"detection_type" => "String",
3381+
},
3382+
"v2.UpdateGovernanceControl" => {
3383+
"detection_type" => "String",
3384+
"body" => "GovernanceControlUpdateRequest",
3385+
},
33793386
"v2.ListGovernanceInsights" => {
33803387
"with_values" => "Boolean",
33813388
"org_uuid" => "String",
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
@endpoint(governance-controls) @endpoint(governance-controls-v2)
2+
Feature: Governance Controls
3+
Governance Controls pair a detection definition with an organization's
4+
detection, notification, and mitigation configuration within the
5+
Governance Console. Each control reports how a class of governance issue
6+
(such as unused API keys or unqueried metrics) is detected and remediated,
7+
along with counts of active and mitigated detections.
8+
9+
Background:
10+
Given a valid "apiKeyAuth" key in the system
11+
And a valid "appKeyAuth" key in the system
12+
And an instance of "GovernanceControls" API
13+
14+
@generated @skip @team:DataDog/aaa-governance-console
15+
Scenario: Get a governance control returns "Bad Request" response
16+
Given operation "GetGovernanceControl" enabled
17+
And new "GetGovernanceControl" request
18+
And request contains "detection_type" parameter from "REPLACE.ME"
19+
When the request is sent
20+
Then the response status is 400 Bad Request
21+
22+
@generated @skip @team:DataDog/aaa-governance-console
23+
Scenario: Get a governance control returns "Not Found" response
24+
Given operation "GetGovernanceControl" enabled
25+
And new "GetGovernanceControl" request
26+
And request contains "detection_type" parameter from "REPLACE.ME"
27+
When the request is sent
28+
Then the response status is 404 Not Found
29+
30+
@generated @skip @team:DataDog/aaa-governance-console
31+
Scenario: Get a governance control returns "OK" response
32+
Given operation "GetGovernanceControl" enabled
33+
And new "GetGovernanceControl" request
34+
And request contains "detection_type" parameter from "REPLACE.ME"
35+
When the request is sent
36+
Then the response status is 200 OK
37+
38+
@generated @skip @team:DataDog/aaa-governance-console
39+
Scenario: List governance controls returns "Bad Request" response
40+
Given operation "ListGovernanceControls" enabled
41+
And new "ListGovernanceControls" request
42+
When the request is sent
43+
Then the response status is 400 Bad Request
44+
45+
@generated @skip @team:DataDog/aaa-governance-console
46+
Scenario: List governance controls returns "OK" response
47+
Given operation "ListGovernanceControls" enabled
48+
And new "ListGovernanceControls" request
49+
When the request is sent
50+
Then the response status is 200 OK
51+
52+
@generated @skip @team:DataDog/aaa-governance-console
53+
Scenario: Update a governance control returns "Bad Request" response
54+
Given operation "UpdateGovernanceControl" enabled
55+
And new "UpdateGovernanceControl" request
56+
And request contains "detection_type" parameter from "REPLACE.ME"
57+
And body with value {"data": {"attributes": {"detection_frequency": "daily", "mitigation_type": "revoke_api_key", "name": "Unused API Keys", "notification_frequency": "daily", "notification_type": "slack"}, "id": "0d4e6f8a-1b2c-3d4e-5f6a-7b8c9d0e1f2a", "type": "governance_control"}}
58+
When the request is sent
59+
Then the response status is 400 Bad Request
60+
61+
@generated @skip @team:DataDog/aaa-governance-console
62+
Scenario: Update a governance control returns "Not Found" response
63+
Given operation "UpdateGovernanceControl" enabled
64+
And new "UpdateGovernanceControl" request
65+
And request contains "detection_type" parameter from "REPLACE.ME"
66+
And body with value {"data": {"attributes": {"detection_frequency": "daily", "mitigation_type": "revoke_api_key", "name": "Unused API Keys", "notification_frequency": "daily", "notification_type": "slack"}, "id": "0d4e6f8a-1b2c-3d4e-5f6a-7b8c9d0e1f2a", "type": "governance_control"}}
67+
When the request is sent
68+
Then the response status is 404 Not Found
69+
70+
@generated @skip @team:DataDog/aaa-governance-console
71+
Scenario: Update a governance control returns "OK" response
72+
Given operation "UpdateGovernanceControl" enabled
73+
And new "UpdateGovernanceControl" request
74+
And request contains "detection_type" parameter from "REPLACE.ME"
75+
And body with value {"data": {"attributes": {"detection_frequency": "daily", "mitigation_type": "revoke_api_key", "name": "Unused API Keys", "notification_frequency": "daily", "notification_type": "slack"}, "id": "0d4e6f8a-1b2c-3d4e-5f6a-7b8c9d0e1f2a", "type": "governance_control"}}
76+
When the request is sent
77+
Then the response status is 200 OK

features/v2/undo.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2792,6 +2792,24 @@
27922792
"type": "safe"
27932793
}
27942794
},
2795+
"ListGovernanceControls": {
2796+
"tag": "Governance Controls",
2797+
"undo": {
2798+
"type": "safe"
2799+
}
2800+
},
2801+
"GetGovernanceControl": {
2802+
"tag": "Governance Controls",
2803+
"undo": {
2804+
"type": "safe"
2805+
}
2806+
},
2807+
"UpdateGovernanceControl": {
2808+
"tag": "Governance Controls",
2809+
"undo": {
2810+
"type": "idempotent"
2811+
}
2812+
},
27952813
"ListGovernanceInsights": {
27962814
"tag": "Governance Insights",
27972815
"undo": {

lib/datadog_api_client/configuration.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,9 @@ def initialize
488488
"v2.upsert_and_publish_form_version": false,
489489
"v2.upsert_form_version": false,
490490
"v2.update_org_saml_configurations": false,
491+
"v2.get_governance_control": false,
492+
"v2.list_governance_controls": false,
493+
"v2.update_governance_control": false,
491494
"v2.list_governance_insights": false,
492495
"v2.create_hamr_org_connection": false,
493496
"v2.get_hamr_org_connection": false,

lib/datadog_api_client/inflector.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3559,6 +3559,17 @@ def overrides
35593559
"v2.google_meet_configuration_reference" => "GoogleMeetConfigurationReference",
35603560
"v2.google_meet_configuration_reference_data" => "GoogleMeetConfigurationReferenceData",
35613561
"v2.governance_best_practice_definition" => "GovernanceBestPracticeDefinition",
3562+
"v2.governance_control_attributes" => "GovernanceControlAttributes",
3563+
"v2.governance_control_data" => "GovernanceControlData",
3564+
"v2.governance_control_mitigation_definition" => "GovernanceControlMitigationDefinition",
3565+
"v2.governance_control_parameter_definition" => "GovernanceControlParameterDefinition",
3566+
"v2.governance_control_resource_type" => "GovernanceControlResourceType",
3567+
"v2.governance_control_response" => "GovernanceControlResponse",
3568+
"v2.governance_controls_response" => "GovernanceControlsResponse",
3569+
"v2.governance_control_supported_value" => "GovernanceControlSupportedValue",
3570+
"v2.governance_control_update_attributes" => "GovernanceControlUpdateAttributes",
3571+
"v2.governance_control_update_data" => "GovernanceControlUpdateData",
3572+
"v2.governance_control_update_request" => "GovernanceControlUpdateRequest",
35623573
"v2.governance_insight_attributes" => "GovernanceInsightAttributes",
35633574
"v2.governance_insight_audit_compute" => "GovernanceInsightAuditCompute",
35643575
"v2.governance_insight_audit_query" => "GovernanceInsightAuditQuery",
@@ -7907,6 +7918,7 @@ def overrides
79077918
"v2.forms_api" => "FormsAPI",
79087919
"v2.gcp_integration_api" => "GCPIntegrationAPI",
79097920
"v2.google_chat_integration_api" => "GoogleChatIntegrationAPI",
7921+
"v2.governance_controls_api" => "GovernanceControlsAPI",
79107922
"v2.governance_insights_api" => "GovernanceInsightsAPI",
79117923
"v2.high_availability_multi_region_api" => "HighAvailabilityMultiRegionAPI",
79127924
"v2.incidents_api" => "IncidentsAPI",

0 commit comments

Comments
 (0)