Skip to content

Commit 5341528

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 59a45be of spec repo
1 parent cc9c4b5 commit 5341528

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
@@ -3366,6 +3366,13 @@
33663366
"saml_config_uuid" => "String",
33673367
"body" => "SAMLConfigurationUpdateRequest",
33683368
},
3369+
"v2.GetGovernanceControl" => {
3370+
"detection_type" => "String",
3371+
},
3372+
"v2.UpdateGovernanceControl" => {
3373+
"detection_type" => "String",
3374+
"body" => "GovernanceControlUpdateRequest",
3375+
},
33693376
"v2.ListGovernanceInsights" => {
33703377
"with_values" => "Boolean",
33713378
"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
@@ -2780,6 +2780,24 @@
27802780
"type": "safe"
27812781
}
27822782
},
2783+
"ListGovernanceControls": {
2784+
"tag": "Governance Controls",
2785+
"undo": {
2786+
"type": "safe"
2787+
}
2788+
},
2789+
"GetGovernanceControl": {
2790+
"tag": "Governance Controls",
2791+
"undo": {
2792+
"type": "safe"
2793+
}
2794+
},
2795+
"UpdateGovernanceControl": {
2796+
"tag": "Governance Controls",
2797+
"undo": {
2798+
"type": "idempotent"
2799+
}
2800+
},
27832801
"ListGovernanceInsights": {
27842802
"tag": "Governance Insights",
27852803
"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
@@ -3547,6 +3547,17 @@ def overrides
35473547
"v2.google_meet_configuration_reference" => "GoogleMeetConfigurationReference",
35483548
"v2.google_meet_configuration_reference_data" => "GoogleMeetConfigurationReferenceData",
35493549
"v2.governance_best_practice_definition" => "GovernanceBestPracticeDefinition",
3550+
"v2.governance_control_attributes" => "GovernanceControlAttributes",
3551+
"v2.governance_control_data" => "GovernanceControlData",
3552+
"v2.governance_control_mitigation_definition" => "GovernanceControlMitigationDefinition",
3553+
"v2.governance_control_parameter_definition" => "GovernanceControlParameterDefinition",
3554+
"v2.governance_control_resource_type" => "GovernanceControlResourceType",
3555+
"v2.governance_control_response" => "GovernanceControlResponse",
3556+
"v2.governance_controls_response" => "GovernanceControlsResponse",
3557+
"v2.governance_control_supported_value" => "GovernanceControlSupportedValue",
3558+
"v2.governance_control_update_attributes" => "GovernanceControlUpdateAttributes",
3559+
"v2.governance_control_update_data" => "GovernanceControlUpdateData",
3560+
"v2.governance_control_update_request" => "GovernanceControlUpdateRequest",
35503561
"v2.governance_insight_attributes" => "GovernanceInsightAttributes",
35513562
"v2.governance_insight_audit_compute" => "GovernanceInsightAuditCompute",
35523563
"v2.governance_insight_audit_query" => "GovernanceInsightAuditQuery",
@@ -7895,6 +7906,7 @@ def overrides
78957906
"v2.forms_api" => "FormsAPI",
78967907
"v2.gcp_integration_api" => "GCPIntegrationAPI",
78977908
"v2.google_chat_integration_api" => "GoogleChatIntegrationAPI",
7909+
"v2.governance_controls_api" => "GovernanceControlsAPI",
78987910
"v2.governance_insights_api" => "GovernanceInsightsAPI",
78997911
"v2.high_availability_multi_region_api" => "HighAvailabilityMultiRegionAPI",
79007912
"v2.incidents_api" => "IncidentsAPI",

0 commit comments

Comments
 (0)