Skip to content

Commit 5d042de

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 697149a of spec repo
1 parent 95ff630 commit 5d042de

28 files changed

Lines changed: 1830 additions & 90 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 288 additions & 68 deletions
Large diffs are not rendered by default.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# List your managed organizations returns "OK" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::OrganizationsAPI.new
5+
p api_instance.list_orgs()
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Delete a pending user's invitations returns "OK" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::UsersAPI.new
5+
p api_instance.delete_user_invitations("4dee724d-00cc-11ea-a77b-570c9d03c6c5")

features/scenarios_model_mapping.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3378,6 +3378,9 @@
33783378
"v2.ResolveOnCallPage" => {
33793379
"page_id" => "UUID",
33803380
},
3381+
"v2.ListOrgs" => {
3382+
"filter_name" => "String",
3383+
},
33813384
"v2.GetOrgConfig" => {
33823385
"org_config_name" => "String",
33833386
},
@@ -4530,6 +4533,9 @@
45304533
"user_id" => "String",
45314534
"body" => "UserUpdateRequest",
45324535
},
4536+
"v2.DeleteUserInvitations" => {
4537+
"user_id" => "UUID",
4538+
},
45334539
"v2.ListUserOrganizations" => {
45344540
"user_id" => "String",
45354541
},

features/v2/organizations.feature

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ Feature: Organizations
4141
When the request is sent
4242
Then the response status is 200 OK
4343

44+
@generated @skip @team:DataDog/org-management
45+
Scenario: List your managed organizations returns "OK" response
46+
Given new "ListOrgs" request
47+
When the request is sent
48+
Then the response status is 200 OK
49+
4450
@team:DataDog/org-management
4551
Scenario: Update a specific Org Config returns "Bad Request" response
4652
Given new "UpdateOrgConfig" request

features/v2/undo.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4125,6 +4125,12 @@
41254125
"type": "safe"
41264126
}
41274127
},
4128+
"ListOrgs": {
4129+
"tag": "Organizations",
4130+
"undo": {
4131+
"type": "safe"
4132+
}
4133+
},
41284134
"ListOrgConfigs": {
41294135
"tag": "Organizations",
41304136
"undo": {
@@ -6963,6 +6969,12 @@
69636969
"type": "idempotent"
69646970
}
69656971
},
6972+
"DeleteUserInvitations": {
6973+
"tag": "Users",
6974+
"undo": {
6975+
"type": "safe"
6976+
}
6977+
},
69666978
"ListUserOrganizations": {
69676979
"tag": "Users",
69686980
"undo": {

features/v2/users.feature

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,20 @@ Feature: Users
2525
And the response "data.attributes.disabled" is false
2626
And the response "data.attributes.service_account" is false
2727

28+
@generated @skip @team:DataDog/org-management
29+
Scenario: Delete a pending user's invitations returns "Not found" response
30+
Given new "DeleteUserInvitations" request
31+
And request contains "user_id" parameter from "REPLACE.ME"
32+
When the request is sent
33+
Then the response status is 404 Not found
34+
35+
@generated @skip @team:DataDog/org-management
36+
Scenario: Delete a pending user's invitations returns "OK" response
37+
Given new "DeleteUserInvitations" request
38+
And request contains "user_id" parameter from "REPLACE.ME"
39+
When the request is sent
40+
Then the response status is 200 OK
41+
2842
@generated @skip @team:DataDog/org-management
2943
Scenario: Disable a user returns "Not found" response
3044
Given new "DisableUser" request

lib/datadog_api_client/inflector.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3686,6 +3686,12 @@ def overrides
36863686
"v2.maintenance_data_relationships_last_modified_by_user_data" => "MaintenanceDataRelationshipsLastModifiedByUserData",
36873687
"v2.maintenance_data_relationships_status_page" => "MaintenanceDataRelationshipsStatusPage",
36883688
"v2.maintenance_data_relationships_status_page_data" => "MaintenanceDataRelationshipsStatusPageData",
3689+
"v2.managed_orgs_data" => "ManagedOrgsData",
3690+
"v2.managed_orgs_relationships" => "ManagedOrgsRelationships",
3691+
"v2.managed_orgs_relationship_to_org" => "ManagedOrgsRelationshipToOrg",
3692+
"v2.managed_orgs_relationship_to_orgs" => "ManagedOrgsRelationshipToOrgs",
3693+
"v2.managed_orgs_response" => "ManagedOrgsResponse",
3694+
"v2.managed_orgs_type" => "ManagedOrgsType",
36893695
"v2.member_team" => "MemberTeam",
36903696
"v2.member_team_type" => "MemberTeamType",
36913697
"v2.metadata" => "Metadata",
@@ -4263,6 +4269,7 @@ def overrides
42634269
"v2.organization" => "Organization",
42644270
"v2.organization_attributes" => "OrganizationAttributes",
42654271
"v2.organizations_type" => "OrganizationsType",
4272+
"v2.org_attributes" => "OrgAttributes",
42664273
"v2.org_config_get_response" => "OrgConfigGetResponse",
42674274
"v2.org_config_list_response" => "OrgConfigListResponse",
42684275
"v2.org_config_read" => "OrgConfigRead",
@@ -4293,6 +4300,7 @@ def overrides
42934300
"v2.org_connection_user_relationship" => "OrgConnectionUserRelationship",
42944301
"v2.org_connection_user_relationship_data" => "OrgConnectionUserRelationshipData",
42954302
"v2.org_connection_user_relationship_data_type" => "OrgConnectionUserRelationshipDataType",
4303+
"v2.org_data" => "OrgData",
42964304
"v2.org_group_attributes" => "OrgGroupAttributes",
42974305
"v2.org_group_create_attributes" => "OrgGroupCreateAttributes",
42984306
"v2.org_group_create_data" => "OrgGroupCreateData",
@@ -4362,6 +4370,8 @@ def overrides
43624370
"v2.org_group_update_attributes" => "OrgGroupUpdateAttributes",
43634371
"v2.org_group_update_data" => "OrgGroupUpdateData",
43644372
"v2.org_group_update_request" => "OrgGroupUpdateRequest",
4373+
"v2.org_relationship_data" => "OrgRelationshipData",
4374+
"v2.org_resource_type" => "OrgResourceType",
43654375
"v2.outbound_edge" => "OutboundEdge",
43664376
"v2.outcomes_batch_attributes" => "OutcomesBatchAttributes",
43674377
"v2.outcomes_batch_request" => "OutcomesBatchRequest",

lib/datadog_api_client/v2/api/organizations_api.rb

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,68 @@ def list_org_configs_with_http_info(opts = {})
148148
return data, status_code, headers
149149
end
150150

151+
# List your managed organizations.
152+
#
153+
# @see #list_orgs_with_http_info
154+
def list_orgs(opts = {})
155+
data, _status_code, _headers = list_orgs_with_http_info(opts)
156+
data
157+
end
158+
159+
# List your managed organizations.
160+
#
161+
# Returns the current organization and its managed organizations in JSON:API format.
162+
#
163+
# @param opts [Hash] the optional parameters
164+
# @option opts [String] :filter_name Filter managed organizations by name.
165+
# @return [Array<(ManagedOrgsResponse, Integer, Hash)>] ManagedOrgsResponse data, response status code and response headers
166+
def list_orgs_with_http_info(opts = {})
167+
168+
if @api_client.config.debugging
169+
@api_client.config.logger.debug 'Calling API: OrganizationsAPI.list_orgs ...'
170+
end
171+
# resource path
172+
local_var_path = '/api/v2/org'
173+
174+
# query parameters
175+
query_params = opts[:query_params] || {}
176+
query_params[:'filter[name]'] = opts[:'filter_name'] if !opts[:'filter_name'].nil?
177+
178+
# header parameters
179+
header_params = opts[:header_params] || {}
180+
# HTTP header 'Accept' (if needed)
181+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
182+
183+
# form parameters
184+
form_params = opts[:form_params] || {}
185+
186+
# http body (model)
187+
post_body = opts[:debug_body]
188+
189+
# return_type
190+
return_type = opts[:debug_return_type] || 'ManagedOrgsResponse'
191+
192+
# auth_names
193+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
194+
195+
new_options = opts.merge(
196+
:operation => :list_orgs,
197+
:header_params => header_params,
198+
:query_params => query_params,
199+
:form_params => form_params,
200+
:body => post_body,
201+
:auth_names => auth_names,
202+
:return_type => return_type,
203+
:api_version => "V2"
204+
)
205+
206+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
207+
if @api_client.config.debugging
208+
@api_client.config.logger.debug "API called: OrganizationsAPI#list_orgs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
209+
end
210+
return data, status_code, headers
211+
end
212+
151213
# Update a specific Org Config.
152214
#
153215
# @see #update_org_config_with_http_info

lib/datadog_api_client/v2/api/security_monitoring_api.rb

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ def activate_content_pack(content_pack_id, opts = {})
3333

3434
# Activate content pack.
3535
#
36-
# Activate a Cloud SIEM content pack. This operation configures the necessary
36+
# Activate a security monitoring content pack. This operation configures the necessary
3737
# log filters or security filters depending on the pricing model and updates the content
3838
# pack activation state.
3939
#
40-
# @param content_pack_id [String] The ID of the content pack to activate (for example, `aws-cloudtrail`).
40+
# @param content_pack_id [String] The ID of the content pack to activate.
4141
# @param opts [Hash] the optional parameters
4242
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
4343
def activate_content_pack_with_http_info(content_pack_id, opts = {})
@@ -76,7 +76,7 @@ def activate_content_pack_with_http_info(content_pack_id, opts = {})
7676
return_type = opts[:debug_return_type]
7777

7878
# auth_names
79-
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
79+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
8080

8181
new_options = opts.merge(
8282
:operation => :activate_content_pack,
@@ -1587,10 +1587,10 @@ def deactivate_content_pack(content_pack_id, opts = {})
15871587

15881588
# Deactivate content pack.
15891589
#
1590-
# Deactivate a Cloud SIEM content pack. This operation removes the content pack's
1590+
# Deactivate a security monitoring content pack. This operation removes the content pack's
15911591
# configuration from log filters or security filters and updates the content pack activation state.
15921592
#
1593-
# @param content_pack_id [String] The ID of the content pack to deactivate (for example, `aws-cloudtrail`).
1593+
# @param content_pack_id [String] The ID of the content pack to deactivate.
15941594
# @param opts [Hash] the optional parameters
15951595
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
15961596
def deactivate_content_pack_with_http_info(content_pack_id, opts = {})
@@ -1629,7 +1629,7 @@ def deactivate_content_pack_with_http_info(content_pack_id, opts = {})
16291629
return_type = opts[:debug_return_type]
16301630

16311631
# auth_names
1632-
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
1632+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
16331633

16341634
new_options = opts.merge(
16351635
:operation => :deactivate_content_pack,
@@ -2629,8 +2629,9 @@ def get_content_packs_states(opts = {})
26292629

26302630
# Get content pack states.
26312631
#
2632-
# Get the activation state, integration status, and log collection status
2633-
# for all Cloud SIEM content packs.
2632+
# Get the activation and configuration states for all security monitoring content packs.
2633+
# This endpoint returns status information about each content pack including activation state,
2634+
# integration status, and log collection status.
26342635
#
26352636
# @param opts [Hash] the optional parameters
26362637
# @return [Array<(SecurityMonitoringContentPackStatesResponse, Integer, Hash)>] SecurityMonitoringContentPackStatesResponse data, response status code and response headers
@@ -2666,7 +2667,7 @@ def get_content_packs_states_with_http_info(opts = {})
26662667
return_type = opts[:debug_return_type] || 'SecurityMonitoringContentPackStatesResponse'
26672668

26682669
# auth_names
2669-
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
2670+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
26702671

26712672
new_options = opts.merge(
26722673
:operation => :get_content_packs_states,

0 commit comments

Comments
 (0)