Skip to content

Commit ebd3d30

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 6f128c7 of spec repo
1 parent c1f424a commit ebd3d30

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
@@ -3353,6 +3353,13 @@
33533353
"saml_config_uuid" => "String",
33543354
"body" => "SAMLConfigurationUpdateRequest",
33553355
},
3356+
"v2.GetGovernanceControl" => {
3357+
"detection_type" => "String",
3358+
},
3359+
"v2.UpdateGovernanceControl" => {
3360+
"detection_type" => "String",
3361+
"body" => "GovernanceControlUpdateRequest",
3362+
},
33563363
"v2.ListGovernanceInsights" => {
33573364
"with_values" => "Boolean",
33583365
"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
@@ -2762,6 +2762,24 @@
27622762
"type": "safe"
27632763
}
27642764
},
2765+
"ListGovernanceControls": {
2766+
"tag": "Governance Controls",
2767+
"undo": {
2768+
"type": "safe"
2769+
}
2770+
},
2771+
"GetGovernanceControl": {
2772+
"tag": "Governance Controls",
2773+
"undo": {
2774+
"type": "safe"
2775+
}
2776+
},
2777+
"UpdateGovernanceControl": {
2778+
"tag": "Governance Controls",
2779+
"undo": {
2780+
"type": "idempotent"
2781+
}
2782+
},
27652783
"ListGovernanceInsights": {
27662784
"tag": "Governance Insights",
27672785
"undo": {

lib/datadog_api_client/configuration.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,9 @@ def initialize
486486
"v2.upsert_and_publish_form_version": false,
487487
"v2.upsert_form_version": false,
488488
"v2.update_org_saml_configurations": false,
489+
"v2.get_governance_control": false,
490+
"v2.list_governance_controls": false,
491+
"v2.update_governance_control": false,
489492
"v2.list_governance_insights": false,
490493
"v2.create_hamr_org_connection": false,
491494
"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
@@ -3540,6 +3540,17 @@ def overrides
35403540
"v2.google_meet_configuration_reference" => "GoogleMeetConfigurationReference",
35413541
"v2.google_meet_configuration_reference_data" => "GoogleMeetConfigurationReferenceData",
35423542
"v2.governance_best_practice_definition" => "GovernanceBestPracticeDefinition",
3543+
"v2.governance_control_attributes" => "GovernanceControlAttributes",
3544+
"v2.governance_control_data" => "GovernanceControlData",
3545+
"v2.governance_control_mitigation_definition" => "GovernanceControlMitigationDefinition",
3546+
"v2.governance_control_parameter_definition" => "GovernanceControlParameterDefinition",
3547+
"v2.governance_control_resource_type" => "GovernanceControlResourceType",
3548+
"v2.governance_control_response" => "GovernanceControlResponse",
3549+
"v2.governance_controls_response" => "GovernanceControlsResponse",
3550+
"v2.governance_control_supported_value" => "GovernanceControlSupportedValue",
3551+
"v2.governance_control_update_attributes" => "GovernanceControlUpdateAttributes",
3552+
"v2.governance_control_update_data" => "GovernanceControlUpdateData",
3553+
"v2.governance_control_update_request" => "GovernanceControlUpdateRequest",
35433554
"v2.governance_insight_attributes" => "GovernanceInsightAttributes",
35443555
"v2.governance_insight_audit_compute" => "GovernanceInsightAuditCompute",
35453556
"v2.governance_insight_audit_query" => "GovernanceInsightAuditQuery",
@@ -7868,6 +7879,7 @@ def overrides
78687879
"v2.forms_api" => "FormsAPI",
78697880
"v2.gcp_integration_api" => "GCPIntegrationAPI",
78707881
"v2.google_chat_integration_api" => "GoogleChatIntegrationAPI",
7882+
"v2.governance_controls_api" => "GovernanceControlsAPI",
78717883
"v2.governance_insights_api" => "GovernanceInsightsAPI",
78727884
"v2.high_availability_multi_region_api" => "HighAvailabilityMultiRegionAPI",
78737885
"v2.incidents_api" => "IncidentsAPI",

0 commit comments

Comments
 (0)