Skip to content

Commit 2b64fc4

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 9ba78ad of spec repo
1 parent 42f8411 commit 2b64fc4

43 files changed

Lines changed: 5853 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.generator/schemas/v2/openapi.yaml

Lines changed: 1058 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Submit feedback on an ownership inference returns "Created" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.create_ownership_feedback".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::CSMOwnershipAPI.new
8+
9+
body = DatadogAPIClient::V2::OwnershipFeedbackRequest.new({
10+
data: DatadogAPIClient::V2::OwnershipFeedbackRequestData.new({
11+
attributes: DatadogAPIClient::V2::OwnershipFeedbackRequestAttributes.new({
12+
action: DatadogAPIClient::V2::OwnershipFeedbackAction::CONFIRM,
13+
actor_handle: "user@example.com",
14+
actor_type: "user",
15+
corrected_owner_handle: "team-b",
16+
corrected_owner_type: "team",
17+
inference_checksum: "abc123",
18+
reason: "Confirmed by team lead.",
19+
}),
20+
type: DatadogAPIClient::V2::OwnershipFeedbackType::OWNERSHIP_FEEDBACK,
21+
}),
22+
})
23+
p api_instance.create_ownership_feedback("res-1", OwnershipOwnerType::TEAM, body)
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Get the evidence for an ownership inference returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.get_ownership_evidence".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::CSMOwnershipAPI.new
8+
p api_instance.get_ownership_evidence("test-resource", OwnershipOwnerType::TEAM)
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Get an ownership inference by owner type returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.get_ownership_inference".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::CSMOwnershipAPI.new
8+
p api_instance.get_ownership_inference("test-resource", OwnershipOwnerType::TEAM)
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# List ownership inference history for a resource returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.list_ownership_history".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::CSMOwnershipAPI.new
8+
p api_instance.list_ownership_history("res-1")
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# List ownership history by owner type returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.list_ownership_history_by_owner_type".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::CSMOwnershipAPI.new
8+
p api_instance.list_ownership_history_by_owner_type("res-1", OwnershipOwnerType::TEAM)
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# List ownership inferences for a resource returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.list_ownership_inferences".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::CSMOwnershipAPI.new
8+
p api_instance.list_ownership_inferences("test-resource")

features/scenarios_model_mapping.rb

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2855,6 +2855,35 @@
28552855
"query" => "String",
28562856
"order_direction" => "OrderDirection",
28572857
},
2858+
"v2.ListOwnershipInferences" => {
2859+
"resource_id" => "String",
2860+
},
2861+
"v2.ListOwnershipHistory" => {
2862+
"resource_id" => "String",
2863+
"cursor" => "String",
2864+
"limit" => "Integer",
2865+
},
2866+
"v2.GetOwnershipInference" => {
2867+
"resource_id" => "String",
2868+
"owner_type" => "OwnershipOwnerType",
2869+
"if_none_match" => "String",
2870+
},
2871+
"v2.GetOwnershipEvidence" => {
2872+
"resource_id" => "String",
2873+
"owner_type" => "OwnershipOwnerType",
2874+
"if_none_match" => "String",
2875+
},
2876+
"v2.CreateOwnershipFeedback" => {
2877+
"resource_id" => "String",
2878+
"owner_type" => "OwnershipOwnerType",
2879+
"body" => "OwnershipFeedbackRequest",
2880+
},
2881+
"v2.ListOwnershipHistoryByOwnerType" => {
2882+
"resource_id" => "String",
2883+
"owner_type" => "OwnershipOwnerType",
2884+
"cursor" => "String",
2885+
"limit" => "Integer",
2886+
},
28582887
"v2.DeleteDashboardListItems" => {
28592888
"dashboard_list_id" => "Integer",
28602889
"body" => "DashboardListDeleteItemsRequest",

features/v2/csm_ownership.feature

Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
@endpoint(csm-ownership) @endpoint(csm-ownership-v2)
2+
Feature: CSM Ownership
3+
Datadog Cloud Security Management (CSM) Ownership infers the most likely
4+
owner for a cloud resource by combining ownership signals from across the
5+
platform, and lets you review the inference, inspect its evidence, and
6+
submit feedback to persist, override, or correct the inferred owner. For
7+
more information, see [Cloud Security Management](https://docs.datadoghq.c
8+
om/security/cloud_security_management).
9+
10+
Background:
11+
Given a valid "apiKeyAuth" key in the system
12+
And a valid "appKeyAuth" key in the system
13+
And an instance of "CSMOwnership" API
14+
15+
@generated @skip @team:DataDog/k9-misconfigs
16+
Scenario: Get an ownership inference by owner type returns "Bad Request" response
17+
Given operation "GetOwnershipInference" enabled
18+
And new "GetOwnershipInference" request
19+
And request contains "resource_id" parameter from "REPLACE.ME"
20+
And request contains "owner_type" parameter from "REPLACE.ME"
21+
When the request is sent
22+
Then the response status is 400 Bad Request
23+
24+
@generated @skip @team:DataDog/k9-misconfigs
25+
Scenario: Get an ownership inference by owner type returns "Not Found" response
26+
Given operation "GetOwnershipInference" enabled
27+
And new "GetOwnershipInference" request
28+
And request contains "resource_id" parameter from "REPLACE.ME"
29+
And request contains "owner_type" parameter from "REPLACE.ME"
30+
When the request is sent
31+
Then the response status is 404 Not Found
32+
33+
@generated @skip @team:DataDog/k9-misconfigs
34+
Scenario: Get an ownership inference by owner type returns "OK" response
35+
Given operation "GetOwnershipInference" enabled
36+
And new "GetOwnershipInference" request
37+
And request contains "resource_id" parameter from "REPLACE.ME"
38+
And request contains "owner_type" parameter from "REPLACE.ME"
39+
When the request is sent
40+
Then the response status is 200 OK
41+
42+
@generated @skip @team:DataDog/k9-misconfigs
43+
Scenario: Get the evidence for an ownership inference returns "Bad Request" response
44+
Given operation "GetOwnershipEvidence" enabled
45+
And new "GetOwnershipEvidence" request
46+
And request contains "resource_id" parameter from "REPLACE.ME"
47+
And request contains "owner_type" parameter from "REPLACE.ME"
48+
When the request is sent
49+
Then the response status is 400 Bad Request
50+
51+
@generated @skip @team:DataDog/k9-misconfigs
52+
Scenario: Get the evidence for an ownership inference returns "Not Found" response
53+
Given operation "GetOwnershipEvidence" enabled
54+
And new "GetOwnershipEvidence" request
55+
And request contains "resource_id" parameter from "REPLACE.ME"
56+
And request contains "owner_type" parameter from "REPLACE.ME"
57+
When the request is sent
58+
Then the response status is 404 Not Found
59+
60+
@generated @skip @team:DataDog/k9-misconfigs
61+
Scenario: Get the evidence for an ownership inference returns "OK" response
62+
Given operation "GetOwnershipEvidence" enabled
63+
And new "GetOwnershipEvidence" request
64+
And request contains "resource_id" parameter from "REPLACE.ME"
65+
And request contains "owner_type" parameter from "REPLACE.ME"
66+
When the request is sent
67+
Then the response status is 200 OK
68+
69+
@generated @skip @team:DataDog/k9-misconfigs
70+
Scenario: List ownership history by owner type returns "Bad Request" response
71+
Given operation "ListOwnershipHistoryByOwnerType" enabled
72+
And new "ListOwnershipHistoryByOwnerType" request
73+
And request contains "resource_id" parameter from "REPLACE.ME"
74+
And request contains "owner_type" parameter from "REPLACE.ME"
75+
When the request is sent
76+
Then the response status is 400 Bad Request
77+
78+
@generated @skip @team:DataDog/k9-misconfigs
79+
Scenario: List ownership history by owner type returns "OK" response
80+
Given operation "ListOwnershipHistoryByOwnerType" enabled
81+
And new "ListOwnershipHistoryByOwnerType" request
82+
And request contains "resource_id" parameter from "REPLACE.ME"
83+
And request contains "owner_type" parameter from "REPLACE.ME"
84+
When the request is sent
85+
Then the response status is 200 OK
86+
87+
@generated @skip @team:DataDog/k9-misconfigs
88+
Scenario: List ownership inference history for a resource returns "Bad Request" response
89+
Given operation "ListOwnershipHistory" enabled
90+
And new "ListOwnershipHistory" request
91+
And request contains "resource_id" parameter from "REPLACE.ME"
92+
When the request is sent
93+
Then the response status is 400 Bad Request
94+
95+
@generated @skip @team:DataDog/k9-misconfigs
96+
Scenario: List ownership inference history for a resource returns "OK" response
97+
Given operation "ListOwnershipHistory" enabled
98+
And new "ListOwnershipHistory" request
99+
And request contains "resource_id" parameter from "REPLACE.ME"
100+
When the request is sent
101+
Then the response status is 200 OK
102+
103+
@generated @skip @team:DataDog/k9-misconfigs
104+
Scenario: List ownership inferences for a resource returns "Bad Request" response
105+
Given operation "ListOwnershipInferences" enabled
106+
And new "ListOwnershipInferences" request
107+
And request contains "resource_id" parameter from "REPLACE.ME"
108+
When the request is sent
109+
Then the response status is 400 Bad Request
110+
111+
@generated @skip @team:DataDog/k9-misconfigs
112+
Scenario: List ownership inferences for a resource returns "Not Found" response
113+
Given operation "ListOwnershipInferences" enabled
114+
And new "ListOwnershipInferences" request
115+
And request contains "resource_id" parameter from "REPLACE.ME"
116+
When the request is sent
117+
Then the response status is 404 Not Found
118+
119+
@generated @skip @team:DataDog/k9-misconfigs
120+
Scenario: List ownership inferences for a resource returns "OK" response
121+
Given operation "ListOwnershipInferences" enabled
122+
And new "ListOwnershipInferences" request
123+
And request contains "resource_id" parameter from "REPLACE.ME"
124+
When the request is sent
125+
Then the response status is 200 OK
126+
127+
@generated @skip @team:DataDog/k9-misconfigs
128+
Scenario: Submit feedback on an ownership inference returns "Bad Request" response
129+
Given operation "CreateOwnershipFeedback" enabled
130+
And new "CreateOwnershipFeedback" request
131+
And request contains "resource_id" parameter from "REPLACE.ME"
132+
And request contains "owner_type" parameter from "REPLACE.ME"
133+
And body with value {"data": {"attributes": {"action": "confirm", "actor_handle": "user@example.com", "actor_type": "user", "corrected_owner_handle": "team-b", "corrected_owner_type": "team", "inference_checksum": "abc123", "reason": "Confirmed by team lead."}, "type": "ownership_feedback"}}
134+
When the request is sent
135+
Then the response status is 400 Bad Request
136+
137+
@generated @skip @team:DataDog/k9-misconfigs
138+
Scenario: Submit feedback on an ownership inference returns "Conflict" response
139+
Given operation "CreateOwnershipFeedback" enabled
140+
And new "CreateOwnershipFeedback" request
141+
And request contains "resource_id" parameter from "REPLACE.ME"
142+
And request contains "owner_type" parameter from "REPLACE.ME"
143+
And body with value {"data": {"attributes": {"action": "confirm", "actor_handle": "user@example.com", "actor_type": "user", "corrected_owner_handle": "team-b", "corrected_owner_type": "team", "inference_checksum": "abc123", "reason": "Confirmed by team lead."}, "type": "ownership_feedback"}}
144+
When the request is sent
145+
Then the response status is 409 Conflict
146+
147+
@generated @skip @team:DataDog/k9-misconfigs
148+
Scenario: Submit feedback on an ownership inference returns "Created" response
149+
Given operation "CreateOwnershipFeedback" enabled
150+
And new "CreateOwnershipFeedback" request
151+
And request contains "resource_id" parameter from "REPLACE.ME"
152+
And request contains "owner_type" parameter from "REPLACE.ME"
153+
And body with value {"data": {"attributes": {"action": "confirm", "actor_handle": "user@example.com", "actor_type": "user", "corrected_owner_handle": "team-b", "corrected_owner_type": "team", "inference_checksum": "abc123", "reason": "Confirmed by team lead."}, "type": "ownership_feedback"}}
154+
When the request is sent
155+
Then the response status is 201 Created
156+
157+
@generated @skip @team:DataDog/k9-misconfigs
158+
Scenario: Submit feedback on an ownership inference returns "Not Found" response
159+
Given operation "CreateOwnershipFeedback" enabled
160+
And new "CreateOwnershipFeedback" request
161+
And request contains "resource_id" parameter from "REPLACE.ME"
162+
And request contains "owner_type" parameter from "REPLACE.ME"
163+
And body with value {"data": {"attributes": {"action": "confirm", "actor_handle": "user@example.com", "actor_type": "user", "corrected_owner_handle": "team-b", "corrected_owner_type": "team", "inference_checksum": "abc123", "reason": "Confirmed by team lead."}, "type": "ownership_feedback"}}
164+
When the request is sent
165+
Then the response status is 404 Not Found

features/v2/undo.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2031,6 +2031,42 @@
20312031
"type": "safe"
20322032
}
20332033
},
2034+
"ListOwnershipInferences": {
2035+
"tag": "CSM Ownership",
2036+
"undo": {
2037+
"type": "safe"
2038+
}
2039+
},
2040+
"ListOwnershipHistory": {
2041+
"tag": "CSM Ownership",
2042+
"undo": {
2043+
"type": "safe"
2044+
}
2045+
},
2046+
"GetOwnershipInference": {
2047+
"tag": "CSM Ownership",
2048+
"undo": {
2049+
"type": "safe"
2050+
}
2051+
},
2052+
"GetOwnershipEvidence": {
2053+
"tag": "CSM Ownership",
2054+
"undo": {
2055+
"type": "safe"
2056+
}
2057+
},
2058+
"CreateOwnershipFeedback": {
2059+
"tag": "CSM Ownership",
2060+
"undo": {
2061+
"type": "idempotent"
2062+
}
2063+
},
2064+
"ListOwnershipHistoryByOwnerType": {
2065+
"tag": "CSM Ownership",
2066+
"undo": {
2067+
"type": "safe"
2068+
}
2069+
},
20342070
"GetCurrentUser": {
20352071
"tag": "Users",
20362072
"undo": {

0 commit comments

Comments
 (0)