datadog_api_client 2.34.0 → 2.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.apigentools-info +4 -4
- data/.generator/schemas/v1/openapi.yaml +59 -6
- data/.generator/schemas/v2/openapi.yaml +1093 -69
- data/.generator/src/generator/formatter.py +2 -2
- data/.generator/src/generator/openapi.py +1 -1
- data/.github/workflows/release.yml +1 -1
- data/CHANGELOG.md +36 -0
- data/Gemfile +1 -0
- data/examples/v1/monitors/CreateMonitor_1539578087.rb +1 -0
- data/examples/v1/monitors/CreateMonitor_440013737.rb +1 -0
- data/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.rb +142 -0
- data/examples/v2/csm-threats/CreateCSMThreatsAgentRule_1295653933.rb +35 -0
- data/examples/v2/dora-metrics/CreateDORADeployment.rb +0 -3
- data/examples/v2/dora-metrics/CreateDORAFailure.rb +30 -0
- data/examples/v2/dora-metrics/CreateDORAIncident.rb +11 -9
- data/examples/v2/dora-metrics/CreateDORAIncident_1768887482.rb +25 -0
- data/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_1735989579.rb +30 -0
- data/examples/v2/microsoft-teams-integration/CreateWorkflowsWebhookHandle_1716851881.rb +1 -1
- data/examples/v2/on-call/GetTeamOnCallUsers.rb +11 -0
- data/examples/v2/security-monitoring/ListFindings_2932019633.rb +11 -0
- data/examples/v2/software-catalog/DeleteCatalogKind.rb +5 -0
- data/examples/v2/software-catalog/ListCatalogKind.rb +5 -0
- data/examples/v2/software-catalog/ListCatalogKind_3806205775.rb +5 -0
- data/examples/v2/software-catalog/UpsertCatalogKind.rb +9 -0
- data/examples/v2/teams/AddMemberTeam.rb +15 -0
- data/examples/v2/teams/ListMemberTeams.rb +8 -0
- data/examples/v2/teams/ListMemberTeams_1662850354.rb +8 -0
- data/examples/v2/teams/RemoveMemberTeam.rb +8 -0
- data/lib/datadog_api_client/configuration.rb +3 -2
- data/lib/datadog_api_client/inflector.rb +42 -6
- data/lib/datadog_api_client/v1/api/snapshots_api.rb +2 -1
- data/lib/datadog_api_client/v1/models/monitor.rb +17 -1
- data/lib/datadog_api_client/v1/models/monitor_draft_status.rb +32 -0
- data/lib/datadog_api_client/v1/models/monitor_options.rb +1 -1
- data/lib/datadog_api_client/v1/models/monitor_update_request.rb +17 -1
- data/lib/datadog_api_client/v1/models/synthetics_api_test_step_subtype.rb +6 -0
- data/lib/datadog_api_client/v1/models/synthetics_basic_auth_web.rb +2 -31
- data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +32 -2
- data/lib/datadog_api_client/v2/api/dora_metrics_api.rb +79 -15
- data/lib/datadog_api_client/v2/api/on_call_api.rb +67 -0
- data/lib/datadog_api_client/v2/api/restriction_policies_api.rb +5 -3
- data/lib/datadog_api_client/v2/api/security_monitoring_api.rb +13 -0
- data/lib/datadog_api_client/v2/api/software_catalog_api.rb +221 -0
- data/lib/datadog_api_client/v2/api/teams_api.rb +254 -0
- data/lib/datadog_api_client/v2/models/action_query_spec_inputs.rb +1 -1
- data/lib/datadog_api_client/v2/models/{dora_incident_response.rb → add_member_team_request.rb} +5 -5
- data/lib/datadog_api_client/v2/models/change_event_custom_attributes_author_type.rb +2 -0
- data/lib/datadog_api_client/v2/models/cloud_configuration_rule_payload.rb +21 -1
- data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_action.rb +33 -3
- data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_action_metadata.rb +125 -0
- data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_action_set.rb +165 -0
- data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_attributes.rb +37 -1
- data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_create_attributes.rb +57 -1
- data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_update_attributes.rb +57 -1
- data/lib/datadog_api_client/v2/models/custom_destination_forward_destination.rb +2 -1
- data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_microsoft_sentinel.rb +228 -0
- data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_microsoft_sentinel_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination.rb +2 -1
- data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_microsoft_sentinel.rb +228 -0
- data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_microsoft_sentinel_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/dora_deployment_request_attributes.rb +21 -1
- data/lib/datadog_api_client/v2/models/{dora_incident_request.rb → dora_failure_request.rb} +4 -4
- data/lib/datadog_api_client/v2/models/{dora_incident_request_attributes.rb → dora_failure_request_attributes.rb} +31 -11
- data/lib/datadog_api_client/v2/models/{dora_incident_request_data.rb → dora_failure_request_data.rb} +4 -4
- data/lib/datadog_api_client/v2/models/dora_failure_response.rb +123 -0
- data/lib/datadog_api_client/v2/models/{dora_incident_response_data.rb → dora_failure_response_data.rb} +6 -6
- data/lib/datadog_api_client/v2/models/{dora_incident_type.rb → dora_failure_type.rb} +3 -3
- data/lib/datadog_api_client/v2/models/escalation.rb +143 -0
- data/lib/datadog_api_client/v2/models/escalation_relationships.rb +105 -0
- data/lib/datadog_api_client/v2/models/escalation_relationships_responders.rb +107 -0
- data/lib/datadog_api_client/v2/models/escalation_relationships_responders_data_items.rb +144 -0
- data/lib/datadog_api_client/v2/models/escalation_relationships_responders_data_items_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/escalation_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/finding_attributes.rb +31 -1
- data/lib/datadog_api_client/v2/models/kind_attributes.rb +143 -0
- data/lib/datadog_api_client/v2/models/kind_data.rb +153 -0
- data/lib/datadog_api_client/v2/models/kind_metadata.rb +115 -0
- data/lib/datadog_api_client/v2/models/kind_obj.rb +143 -0
- data/lib/datadog_api_client/v2/models/kind_response_meta.rb +105 -0
- data/lib/datadog_api_client/v2/models/list_kind_catalog_response.rb +117 -0
- data/lib/datadog_api_client/v2/models/member_team.rb +144 -0
- data/lib/datadog_api_client/v2/models/member_team_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_case.rb +11 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_type_create.rb +1 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_type_read.rb +1 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_update_payload.rb +21 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_payload.rb +21 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_signal_rule_response.rb +21 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_payload.rb +21 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_query.rb +11 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_response.rb +21 -1
- data/lib/datadog_api_client/v2/models/security_monitoring_third_party_rule_case.rb +11 -1
- data/lib/datadog_api_client/v2/models/sensitive_data_scanner_group_attributes.rb +15 -3
- data/lib/datadog_api_client/v2/models/sensitive_data_scanner_samplings.rb +137 -0
- data/lib/datadog_api_client/v2/models/team_on_call_responders.rb +117 -0
- data/lib/datadog_api_client/v2/models/team_on_call_responders_data.rb +143 -0
- data/lib/datadog_api_client/v2/models/team_on_call_responders_data_relationships.rb +115 -0
- data/lib/datadog_api_client/v2/models/team_on_call_responders_data_relationships_escalations.rb +107 -0
- data/lib/datadog_api_client/v2/models/team_on_call_responders_data_relationships_escalations_data_items.rb +144 -0
- data/lib/datadog_api_client/v2/models/team_on_call_responders_data_relationships_escalations_data_items_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/team_on_call_responders_data_relationships_responders.rb +107 -0
- data/lib/datadog_api_client/v2/models/team_on_call_responders_data_relationships_responders_data_items.rb +144 -0
- data/lib/datadog_api_client/v2/models/team_on_call_responders_data_relationships_responders_data_items_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/team_on_call_responders_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/team_on_call_responders_included.rb +63 -0
- data/lib/datadog_api_client/v2/models/upsert_catalog_kind_request.rb +63 -0
- data/lib/datadog_api_client/v2/models/upsert_catalog_kind_response.rb +117 -0
- data/lib/datadog_api_client/version.rb +1 -1
- data/repository.datadog.yaml +8 -0
- metadata +57 -7
@@ -561,6 +561,73 @@ module DatadogAPIClient::V2
|
|
561
561
|
return data, status_code, headers
|
562
562
|
end
|
563
563
|
|
564
|
+
# Get team on-call users.
|
565
|
+
#
|
566
|
+
# @see #get_team_on_call_users_with_http_info
|
567
|
+
def get_team_on_call_users(team_id, opts = {})
|
568
|
+
data, _status_code, _headers = get_team_on_call_users_with_http_info(team_id, opts)
|
569
|
+
data
|
570
|
+
end
|
571
|
+
|
572
|
+
# Get team on-call users.
|
573
|
+
#
|
574
|
+
# Get a team's on-call users at a given time
|
575
|
+
#
|
576
|
+
# @param team_id [String] The team ID
|
577
|
+
# @param opts [Hash] the optional parameters
|
578
|
+
# @option opts [String] :include Comma-separated list of included relationships to be returned. Allowed values: `responders`, `escalations`, `escalations.responders`.
|
579
|
+
# @return [Array<(TeamOnCallResponders, Integer, Hash)>] TeamOnCallResponders data, response status code and response headers
|
580
|
+
def get_team_on_call_users_with_http_info(team_id, opts = {})
|
581
|
+
|
582
|
+
if @api_client.config.debugging
|
583
|
+
@api_client.config.logger.debug 'Calling API: OnCallAPI.get_team_on_call_users ...'
|
584
|
+
end
|
585
|
+
# verify the required parameter 'team_id' is set
|
586
|
+
if @api_client.config.client_side_validation && team_id.nil?
|
587
|
+
fail ArgumentError, "Missing the required parameter 'team_id' when calling OnCallAPI.get_team_on_call_users"
|
588
|
+
end
|
589
|
+
# resource path
|
590
|
+
local_var_path = '/api/v2/on-call/teams/{team_id}/on-call'.sub('{team_id}', CGI.escape(team_id.to_s).gsub('%2F', '/'))
|
591
|
+
|
592
|
+
# query parameters
|
593
|
+
query_params = opts[:query_params] || {}
|
594
|
+
query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil?
|
595
|
+
|
596
|
+
# header parameters
|
597
|
+
header_params = opts[:header_params] || {}
|
598
|
+
# HTTP header 'Accept' (if needed)
|
599
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
600
|
+
|
601
|
+
# form parameters
|
602
|
+
form_params = opts[:form_params] || {}
|
603
|
+
|
604
|
+
# http body (model)
|
605
|
+
post_body = opts[:debug_body]
|
606
|
+
|
607
|
+
# return_type
|
608
|
+
return_type = opts[:debug_return_type] || 'TeamOnCallResponders'
|
609
|
+
|
610
|
+
# auth_names
|
611
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
612
|
+
|
613
|
+
new_options = opts.merge(
|
614
|
+
:operation => :get_team_on_call_users,
|
615
|
+
:header_params => header_params,
|
616
|
+
:query_params => query_params,
|
617
|
+
:form_params => form_params,
|
618
|
+
:body => post_body,
|
619
|
+
:auth_names => auth_names,
|
620
|
+
:return_type => return_type,
|
621
|
+
:api_version => "V2"
|
622
|
+
)
|
623
|
+
|
624
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
625
|
+
if @api_client.config.debugging
|
626
|
+
@api_client.config.logger.debug "API called: OnCallAPI#get_team_on_call_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
627
|
+
end
|
628
|
+
return data, status_code, headers
|
629
|
+
end
|
630
|
+
|
564
631
|
# Set On-Call team routing rules.
|
565
632
|
#
|
566
633
|
# @see #set_on_call_team_routing_rules_with_http_info
|
@@ -35,7 +35,7 @@ module DatadogAPIClient::V2
|
|
35
35
|
#
|
36
36
|
# Deletes the restriction policy associated with a specified resource.
|
37
37
|
#
|
38
|
-
# @param resource_id [String] Identifier, formatted as `type:id`. Supported types: `connection`, `dashboard`, `integration-account`, `integration-service`, `integration-webhook`, `notebook`, `reference-table`, `security-rule`, `slo`, `workflow`, `app-builder-app`, `connection`, `connection-group`.
|
38
|
+
# @param resource_id [String] Identifier, formatted as `type:id`. Supported types: `connection`, `dashboard`, `integration-account`, `integration-service`, `integration-webhook`, `notebook`, `reference-table`, `security-rule`, `slo`, `workflow`, `app-builder-app`, `connection`, `connection-group`, `rum-application`.
|
39
39
|
# @param opts [Hash] the optional parameters
|
40
40
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
41
41
|
def delete_restriction_policy_with_http_info(resource_id, opts = {})
|
@@ -100,7 +100,7 @@ module DatadogAPIClient::V2
|
|
100
100
|
#
|
101
101
|
# Retrieves the restriction policy associated with a specified resource.
|
102
102
|
#
|
103
|
-
# @param resource_id [String] Identifier, formatted as `type:id`. Supported types: `connection`, `dashboard`, `integration-account`, `integration-service`, `integration-webhook`, `notebook`, `reference-table`, `security-rule`, `slo`, `workflow`, `app-builder-app`, `connection`, `connection-group`.
|
103
|
+
# @param resource_id [String] Identifier, formatted as `type:id`. Supported types: `connection`, `dashboard`, `integration-account`, `integration-service`, `integration-webhook`, `notebook`, `reference-table`, `security-rule`, `slo`, `workflow`, `app-builder-app`, `connection`, `connection-group`, `rum-application`.
|
104
104
|
# @param opts [Hash] the optional parameters
|
105
105
|
# @return [Array<(RestrictionPolicyResponse, Integer, Hash)>] RestrictionPolicyResponse data, response status code and response headers
|
106
106
|
def get_restriction_policy_with_http_info(resource_id, opts = {})
|
@@ -184,6 +184,7 @@ module DatadogAPIClient::V2
|
|
184
184
|
# - App Builder Apps: `app-builder-app`
|
185
185
|
# - Connections: `connection`
|
186
186
|
# - Connection Groups: `connection-group`
|
187
|
+
# - RUM Applications: `rum-application`
|
187
188
|
#
|
188
189
|
# #### Supported relations for resources
|
189
190
|
# Resource Type | Supported Relations
|
@@ -205,8 +206,9 @@ module DatadogAPIClient::V2
|
|
205
206
|
# App Builder Apps | `viewer`, `editor`
|
206
207
|
# Connections | `viewer`, `resolver`, `editor`
|
207
208
|
# Connection Groups | `viewer`, `editor`
|
209
|
+
# RUM Application | `viewer`, `editor`
|
208
210
|
#
|
209
|
-
# @param resource_id [String] Identifier, formatted as `type:id`. Supported types: `connection`, `dashboard`, `integration-account`, `integration-service`, `integration-webhook`, `notebook`, `reference-table`, `security-rule`, `slo`, `workflow`, `app-builder-app`, `connection`, `connection-group`.
|
211
|
+
# @param resource_id [String] Identifier, formatted as `type:id`. Supported types: `connection`, `dashboard`, `integration-account`, `integration-service`, `integration-webhook`, `notebook`, `reference-table`, `security-rule`, `slo`, `workflow`, `app-builder-app`, `connection`, `connection-group`, `rum-application`.
|
210
212
|
# @param body [RestrictionPolicyUpdateRequest] Restriction policy payload
|
211
213
|
# @param opts [Hash] the optional parameters
|
212
214
|
# @option opts [Boolean] :allow_self_lockout Allows admins (users with the `user_access_manage` permission) to remove their own access from the resource if set to `true`. By default, this is set to `false`, preventing admins from locking themselves out.
|
@@ -2376,6 +2376,17 @@ module DatadogAPIClient::V2
|
|
2376
2376
|
#
|
2377
2377
|
# Query parameters must be only among the documented ones and with values of correct types. Duplicated query parameters (e.g. `filter[status]=low&filter[status]=info`) are not allowed.
|
2378
2378
|
#
|
2379
|
+
# ### Additional extension fields
|
2380
|
+
#
|
2381
|
+
# Additional extension fields are available for some findings.
|
2382
|
+
#
|
2383
|
+
# The data is available when you include the query parameter `?detailed_findings=true` in the request.
|
2384
|
+
#
|
2385
|
+
# The following fields are available for findings:
|
2386
|
+
# - `external_id`: The resource external ID related to the finding.
|
2387
|
+
# - `description`: The description and remediation steps for the finding.
|
2388
|
+
# - `datadog_link`: The Datadog relative link for the finding.
|
2389
|
+
#
|
2379
2390
|
# ### Response
|
2380
2391
|
#
|
2381
2392
|
# The response includes an array of finding objects, pagination metadata, and a count of items that match the query.
|
@@ -2402,6 +2413,7 @@ module DatadogAPIClient::V2
|
|
2402
2413
|
# @option opts [FindingEvaluation] :filter_evaluation Return only `pass` or `fail` findings.
|
2403
2414
|
# @option opts [FindingStatus] :filter_status Return only findings with the specified status.
|
2404
2415
|
# @option opts [Array<FindingVulnerabilityType>] :filter_vulnerability_type Return findings that match the selected vulnerability types (repeatable).
|
2416
|
+
# @option opts [Boolean] :detailed_findings Return additional fields for some findings.
|
2405
2417
|
# @return [Array<(ListFindingsResponse, Integer, Hash)>] ListFindingsResponse data, response status code and response headers
|
2406
2418
|
def list_findings_with_http_info(opts = {})
|
2407
2419
|
unstable_enabled = @api_client.config.unstable_operations["v2.list_findings".to_sym]
|
@@ -2449,6 +2461,7 @@ module DatadogAPIClient::V2
|
|
2449
2461
|
query_params[:'filter[evaluation]'] = opts[:'filter_evaluation'] if !opts[:'filter_evaluation'].nil?
|
2450
2462
|
query_params[:'filter[status]'] = opts[:'filter_status'] if !opts[:'filter_status'].nil?
|
2451
2463
|
query_params[:'filter[vulnerability_type]'] = @api_client.build_collection_param(opts[:'filter_vulnerability_type'], :multi) if !opts[:'filter_vulnerability_type'].nil?
|
2464
|
+
query_params[:'detailed_findings'] = opts[:'detailed_findings'] if !opts[:'detailed_findings'].nil?
|
2452
2465
|
|
2453
2466
|
# header parameters
|
2454
2467
|
header_params = opts[:header_params] || {}
|
@@ -88,6 +88,71 @@ module DatadogAPIClient::V2
|
|
88
88
|
return data, status_code, headers
|
89
89
|
end
|
90
90
|
|
91
|
+
# Delete a single kind.
|
92
|
+
#
|
93
|
+
# @see #delete_catalog_kind_with_http_info
|
94
|
+
def delete_catalog_kind(kind_id, opts = {})
|
95
|
+
delete_catalog_kind_with_http_info(kind_id, opts)
|
96
|
+
nil
|
97
|
+
end
|
98
|
+
|
99
|
+
# Delete a single kind.
|
100
|
+
#
|
101
|
+
# Delete a single kind in Software Catalog.
|
102
|
+
#
|
103
|
+
# @param kind_id [String] Entity kind.
|
104
|
+
# @param opts [Hash] the optional parameters
|
105
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
106
|
+
def delete_catalog_kind_with_http_info(kind_id, opts = {})
|
107
|
+
|
108
|
+
if @api_client.config.debugging
|
109
|
+
@api_client.config.logger.debug 'Calling API: SoftwareCatalogAPI.delete_catalog_kind ...'
|
110
|
+
end
|
111
|
+
# verify the required parameter 'kind_id' is set
|
112
|
+
if @api_client.config.client_side_validation && kind_id.nil?
|
113
|
+
fail ArgumentError, "Missing the required parameter 'kind_id' when calling SoftwareCatalogAPI.delete_catalog_kind"
|
114
|
+
end
|
115
|
+
# resource path
|
116
|
+
local_var_path = '/api/v2/catalog/kind/{kind_id}'.sub('{kind_id}', CGI.escape(kind_id.to_s).gsub('%2F', '/'))
|
117
|
+
|
118
|
+
# query parameters
|
119
|
+
query_params = opts[:query_params] || {}
|
120
|
+
|
121
|
+
# header parameters
|
122
|
+
header_params = opts[:header_params] || {}
|
123
|
+
# HTTP header 'Accept' (if needed)
|
124
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
125
|
+
|
126
|
+
# form parameters
|
127
|
+
form_params = opts[:form_params] || {}
|
128
|
+
|
129
|
+
# http body (model)
|
130
|
+
post_body = opts[:debug_body]
|
131
|
+
|
132
|
+
# return_type
|
133
|
+
return_type = opts[:debug_return_type]
|
134
|
+
|
135
|
+
# auth_names
|
136
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
137
|
+
|
138
|
+
new_options = opts.merge(
|
139
|
+
:operation => :delete_catalog_kind,
|
140
|
+
:header_params => header_params,
|
141
|
+
:query_params => query_params,
|
142
|
+
:form_params => form_params,
|
143
|
+
:body => post_body,
|
144
|
+
:auth_names => auth_names,
|
145
|
+
:return_type => return_type,
|
146
|
+
:api_version => "V2"
|
147
|
+
)
|
148
|
+
|
149
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
|
150
|
+
if @api_client.config.debugging
|
151
|
+
@api_client.config.logger.debug "API called: SoftwareCatalogAPI#delete_catalog_kind\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
152
|
+
end
|
153
|
+
return data, status_code, headers
|
154
|
+
end
|
155
|
+
|
91
156
|
# Get a list of entities.
|
92
157
|
#
|
93
158
|
# @see #list_catalog_entity_with_http_info
|
@@ -197,6 +262,95 @@ module DatadogAPIClient::V2
|
|
197
262
|
end
|
198
263
|
end
|
199
264
|
|
265
|
+
# Get a list of entity kinds.
|
266
|
+
#
|
267
|
+
# @see #list_catalog_kind_with_http_info
|
268
|
+
def list_catalog_kind(opts = {})
|
269
|
+
data, _status_code, _headers = list_catalog_kind_with_http_info(opts)
|
270
|
+
data
|
271
|
+
end
|
272
|
+
|
273
|
+
# Get a list of entity kinds.
|
274
|
+
#
|
275
|
+
# Get a list of entity kinds from Software Catalog.
|
276
|
+
#
|
277
|
+
# @param opts [Hash] the optional parameters
|
278
|
+
# @option opts [Integer] :page_offset Specific offset to use as the beginning of the returned page.
|
279
|
+
# @option opts [Integer] :page_limit Maximum number of kinds in the response.
|
280
|
+
# @option opts [String] :filter_id Filter entities by UUID.
|
281
|
+
# @option opts [String] :filter_name Filter entities by name.
|
282
|
+
# @return [Array<(ListKindCatalogResponse, Integer, Hash)>] ListKindCatalogResponse data, response status code and response headers
|
283
|
+
def list_catalog_kind_with_http_info(opts = {})
|
284
|
+
|
285
|
+
if @api_client.config.debugging
|
286
|
+
@api_client.config.logger.debug 'Calling API: SoftwareCatalogAPI.list_catalog_kind ...'
|
287
|
+
end
|
288
|
+
# resource path
|
289
|
+
local_var_path = '/api/v2/catalog/kind'
|
290
|
+
|
291
|
+
# query parameters
|
292
|
+
query_params = opts[:query_params] || {}
|
293
|
+
query_params[:'page[offset]'] = opts[:'page_offset'] if !opts[:'page_offset'].nil?
|
294
|
+
query_params[:'page[limit]'] = opts[:'page_limit'] if !opts[:'page_limit'].nil?
|
295
|
+
query_params[:'filter[id]'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
|
296
|
+
query_params[:'filter[name]'] = opts[:'filter_name'] if !opts[:'filter_name'].nil?
|
297
|
+
|
298
|
+
# header parameters
|
299
|
+
header_params = opts[:header_params] || {}
|
300
|
+
# HTTP header 'Accept' (if needed)
|
301
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
302
|
+
|
303
|
+
# form parameters
|
304
|
+
form_params = opts[:form_params] || {}
|
305
|
+
|
306
|
+
# http body (model)
|
307
|
+
post_body = opts[:debug_body]
|
308
|
+
|
309
|
+
# return_type
|
310
|
+
return_type = opts[:debug_return_type] || 'ListKindCatalogResponse'
|
311
|
+
|
312
|
+
# auth_names
|
313
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
314
|
+
|
315
|
+
new_options = opts.merge(
|
316
|
+
:operation => :list_catalog_kind,
|
317
|
+
:header_params => header_params,
|
318
|
+
:query_params => query_params,
|
319
|
+
:form_params => form_params,
|
320
|
+
:body => post_body,
|
321
|
+
:auth_names => auth_names,
|
322
|
+
:return_type => return_type,
|
323
|
+
:api_version => "V2"
|
324
|
+
)
|
325
|
+
|
326
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
327
|
+
if @api_client.config.debugging
|
328
|
+
@api_client.config.logger.debug "API called: SoftwareCatalogAPI#list_catalog_kind\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
329
|
+
end
|
330
|
+
return data, status_code, headers
|
331
|
+
end
|
332
|
+
|
333
|
+
# Get a list of entity kinds.
|
334
|
+
#
|
335
|
+
# Provide a paginated version of {#list_catalog_kind}, returning all items.
|
336
|
+
#
|
337
|
+
# To use it you need to use a block: list_catalog_kind_with_pagination { |item| p item }
|
338
|
+
#
|
339
|
+
# @yield [KindData] Paginated items
|
340
|
+
def list_catalog_kind_with_pagination(opts = {})
|
341
|
+
api_version = "V2"
|
342
|
+
page_size = @api_client.get_attribute_from_path(opts, "page_limit", 100)
|
343
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_limit", Integer, page_size)
|
344
|
+
while true do
|
345
|
+
response = list_catalog_kind(opts)
|
346
|
+
@api_client.get_attribute_from_path(response, "data").each { |item| yield(item) }
|
347
|
+
if @api_client.get_attribute_from_path(response, "data").length < page_size
|
348
|
+
break
|
349
|
+
end
|
350
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_offset", Integer, @api_client.get_attribute_from_path(opts, "page_offset", 0) + page_size)
|
351
|
+
end
|
352
|
+
end
|
353
|
+
|
200
354
|
# Get a list of entity relations.
|
201
355
|
#
|
202
356
|
# @see #list_catalog_relation_with_http_info
|
@@ -364,5 +518,72 @@ module DatadogAPIClient::V2
|
|
364
518
|
end
|
365
519
|
return data, status_code, headers
|
366
520
|
end
|
521
|
+
|
522
|
+
# Create or update kinds.
|
523
|
+
#
|
524
|
+
# @see #upsert_catalog_kind_with_http_info
|
525
|
+
def upsert_catalog_kind(body, opts = {})
|
526
|
+
data, _status_code, _headers = upsert_catalog_kind_with_http_info(body, opts)
|
527
|
+
data
|
528
|
+
end
|
529
|
+
|
530
|
+
# Create or update kinds.
|
531
|
+
#
|
532
|
+
# Create or update kinds in Software Catalog.
|
533
|
+
#
|
534
|
+
# @param body [UpsertCatalogKindRequest] Kind YAML or JSON.
|
535
|
+
# @param opts [Hash] the optional parameters
|
536
|
+
# @return [Array<(UpsertCatalogKindResponse, Integer, Hash)>] UpsertCatalogKindResponse data, response status code and response headers
|
537
|
+
def upsert_catalog_kind_with_http_info(body, opts = {})
|
538
|
+
|
539
|
+
if @api_client.config.debugging
|
540
|
+
@api_client.config.logger.debug 'Calling API: SoftwareCatalogAPI.upsert_catalog_kind ...'
|
541
|
+
end
|
542
|
+
# verify the required parameter 'body' is set
|
543
|
+
if @api_client.config.client_side_validation && body.nil?
|
544
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling SoftwareCatalogAPI.upsert_catalog_kind"
|
545
|
+
end
|
546
|
+
# resource path
|
547
|
+
local_var_path = '/api/v2/catalog/kind'
|
548
|
+
|
549
|
+
# query parameters
|
550
|
+
query_params = opts[:query_params] || {}
|
551
|
+
|
552
|
+
# header parameters
|
553
|
+
header_params = opts[:header_params] || {}
|
554
|
+
# HTTP header 'Accept' (if needed)
|
555
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
556
|
+
# HTTP header 'Content-Type'
|
557
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
558
|
+
|
559
|
+
# form parameters
|
560
|
+
form_params = opts[:form_params] || {}
|
561
|
+
|
562
|
+
# http body (model)
|
563
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
564
|
+
|
565
|
+
# return_type
|
566
|
+
return_type = opts[:debug_return_type] || 'UpsertCatalogKindResponse'
|
567
|
+
|
568
|
+
# auth_names
|
569
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
570
|
+
|
571
|
+
new_options = opts.merge(
|
572
|
+
:operation => :upsert_catalog_kind,
|
573
|
+
:header_params => header_params,
|
574
|
+
:query_params => query_params,
|
575
|
+
:form_params => form_params,
|
576
|
+
:body => post_body,
|
577
|
+
:auth_names => auth_names,
|
578
|
+
:return_type => return_type,
|
579
|
+
:api_version => "V2"
|
580
|
+
)
|
581
|
+
|
582
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
|
583
|
+
if @api_client.config.debugging
|
584
|
+
@api_client.config.logger.debug "API called: SoftwareCatalogAPI#upsert_catalog_kind\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
585
|
+
end
|
586
|
+
return data, status_code, headers
|
587
|
+
end
|
367
588
|
end
|
368
589
|
end
|
@@ -23,6 +23,85 @@ module DatadogAPIClient::V2
|
|
23
23
|
@api_client = api_client
|
24
24
|
end
|
25
25
|
|
26
|
+
# Add a member team.
|
27
|
+
#
|
28
|
+
# @see #add_member_team_with_http_info
|
29
|
+
def add_member_team(super_team_id, body, opts = {})
|
30
|
+
add_member_team_with_http_info(super_team_id, body, opts)
|
31
|
+
nil
|
32
|
+
end
|
33
|
+
|
34
|
+
# Add a member team.
|
35
|
+
#
|
36
|
+
# Add a member team.
|
37
|
+
# Adds the team given by the `id` in the body as a member team of the super team.
|
38
|
+
#
|
39
|
+
# @param super_team_id [String] None
|
40
|
+
# @param body [AddMemberTeamRequest]
|
41
|
+
# @param opts [Hash] the optional parameters
|
42
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
43
|
+
def add_member_team_with_http_info(super_team_id, body, opts = {})
|
44
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.add_member_team".to_sym]
|
45
|
+
if unstable_enabled
|
46
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.add_member_team")
|
47
|
+
else
|
48
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.add_member_team"))
|
49
|
+
end
|
50
|
+
|
51
|
+
if @api_client.config.debugging
|
52
|
+
@api_client.config.logger.debug 'Calling API: TeamsAPI.add_member_team ...'
|
53
|
+
end
|
54
|
+
# verify the required parameter 'super_team_id' is set
|
55
|
+
if @api_client.config.client_side_validation && super_team_id.nil?
|
56
|
+
fail ArgumentError, "Missing the required parameter 'super_team_id' when calling TeamsAPI.add_member_team"
|
57
|
+
end
|
58
|
+
# verify the required parameter 'body' is set
|
59
|
+
if @api_client.config.client_side_validation && body.nil?
|
60
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling TeamsAPI.add_member_team"
|
61
|
+
end
|
62
|
+
# resource path
|
63
|
+
local_var_path = '/api/v2/team/{super_team_id}/member_teams'.sub('{super_team_id}', CGI.escape(super_team_id.to_s).gsub('%2F', '/'))
|
64
|
+
|
65
|
+
# query parameters
|
66
|
+
query_params = opts[:query_params] || {}
|
67
|
+
|
68
|
+
# header parameters
|
69
|
+
header_params = opts[:header_params] || {}
|
70
|
+
# HTTP header 'Accept' (if needed)
|
71
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
72
|
+
# HTTP header 'Content-Type'
|
73
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
74
|
+
|
75
|
+
# form parameters
|
76
|
+
form_params = opts[:form_params] || {}
|
77
|
+
|
78
|
+
# http body (model)
|
79
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
80
|
+
|
81
|
+
# return_type
|
82
|
+
return_type = opts[:debug_return_type]
|
83
|
+
|
84
|
+
# auth_names
|
85
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
86
|
+
|
87
|
+
new_options = opts.merge(
|
88
|
+
:operation => :add_member_team,
|
89
|
+
:header_params => header_params,
|
90
|
+
:query_params => query_params,
|
91
|
+
:form_params => form_params,
|
92
|
+
:body => post_body,
|
93
|
+
:auth_names => auth_names,
|
94
|
+
:return_type => return_type,
|
95
|
+
:api_version => "V2"
|
96
|
+
)
|
97
|
+
|
98
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
|
99
|
+
if @api_client.config.debugging
|
100
|
+
@api_client.config.logger.debug "API called: TeamsAPI#add_member_team\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
101
|
+
end
|
102
|
+
return data, status_code, headers
|
103
|
+
end
|
104
|
+
|
26
105
|
# Create a team.
|
27
106
|
#
|
28
107
|
# @see #create_team_with_http_info
|
@@ -869,6 +948,105 @@ module DatadogAPIClient::V2
|
|
869
948
|
return data, status_code, headers
|
870
949
|
end
|
871
950
|
|
951
|
+
# Get all member teams.
|
952
|
+
#
|
953
|
+
# @see #list_member_teams_with_http_info
|
954
|
+
def list_member_teams(super_team_id, opts = {})
|
955
|
+
data, _status_code, _headers = list_member_teams_with_http_info(super_team_id, opts)
|
956
|
+
data
|
957
|
+
end
|
958
|
+
|
959
|
+
# Get all member teams.
|
960
|
+
#
|
961
|
+
# Get all member teams.
|
962
|
+
#
|
963
|
+
# @param super_team_id [String] None
|
964
|
+
# @param opts [Hash] the optional parameters
|
965
|
+
# @option opts [Integer] :page_size Size for a given page. The maximum allowed value is 100.
|
966
|
+
# @option opts [Integer] :page_number Specific page number to return.
|
967
|
+
# @option opts [Array<TeamsField>] :fields_team List of fields that need to be fetched.
|
968
|
+
# @return [Array<(TeamsResponse, Integer, Hash)>] TeamsResponse data, response status code and response headers
|
969
|
+
def list_member_teams_with_http_info(super_team_id, opts = {})
|
970
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.list_member_teams".to_sym]
|
971
|
+
if unstable_enabled
|
972
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_member_teams")
|
973
|
+
else
|
974
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_member_teams"))
|
975
|
+
end
|
976
|
+
|
977
|
+
if @api_client.config.debugging
|
978
|
+
@api_client.config.logger.debug 'Calling API: TeamsAPI.list_member_teams ...'
|
979
|
+
end
|
980
|
+
# verify the required parameter 'super_team_id' is set
|
981
|
+
if @api_client.config.client_side_validation && super_team_id.nil?
|
982
|
+
fail ArgumentError, "Missing the required parameter 'super_team_id' when calling TeamsAPI.list_member_teams"
|
983
|
+
end
|
984
|
+
# resource path
|
985
|
+
local_var_path = '/api/v2/team/{super_team_id}/member_teams'.sub('{super_team_id}', CGI.escape(super_team_id.to_s).gsub('%2F', '/'))
|
986
|
+
|
987
|
+
# query parameters
|
988
|
+
query_params = opts[:query_params] || {}
|
989
|
+
query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
990
|
+
query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil?
|
991
|
+
query_params[:'fields[team]'] = @api_client.build_collection_param(opts[:'fields_team'], :csv) if !opts[:'fields_team'].nil?
|
992
|
+
|
993
|
+
# header parameters
|
994
|
+
header_params = opts[:header_params] || {}
|
995
|
+
# HTTP header 'Accept' (if needed)
|
996
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
997
|
+
|
998
|
+
# form parameters
|
999
|
+
form_params = opts[:form_params] || {}
|
1000
|
+
|
1001
|
+
# http body (model)
|
1002
|
+
post_body = opts[:debug_body]
|
1003
|
+
|
1004
|
+
# return_type
|
1005
|
+
return_type = opts[:debug_return_type] || 'TeamsResponse'
|
1006
|
+
|
1007
|
+
# auth_names
|
1008
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
1009
|
+
|
1010
|
+
new_options = opts.merge(
|
1011
|
+
:operation => :list_member_teams,
|
1012
|
+
:header_params => header_params,
|
1013
|
+
:query_params => query_params,
|
1014
|
+
:form_params => form_params,
|
1015
|
+
:body => post_body,
|
1016
|
+
:auth_names => auth_names,
|
1017
|
+
:return_type => return_type,
|
1018
|
+
:api_version => "V2"
|
1019
|
+
)
|
1020
|
+
|
1021
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
1022
|
+
if @api_client.config.debugging
|
1023
|
+
@api_client.config.logger.debug "API called: TeamsAPI#list_member_teams\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1024
|
+
end
|
1025
|
+
return data, status_code, headers
|
1026
|
+
end
|
1027
|
+
|
1028
|
+
# Get all member teams.
|
1029
|
+
#
|
1030
|
+
# Provide a paginated version of {#list_member_teams}, returning all items.
|
1031
|
+
#
|
1032
|
+
# To use it you need to use a block: list_member_teams_with_pagination { |item| p item }
|
1033
|
+
#
|
1034
|
+
# @yield [Team] Paginated items
|
1035
|
+
def list_member_teams_with_pagination(super_team_id, opts = {})
|
1036
|
+
api_version = "V2"
|
1037
|
+
page_size = @api_client.get_attribute_from_path(opts, "page_size", 10)
|
1038
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_size", Integer, page_size)
|
1039
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_number", Integer, 0)
|
1040
|
+
while true do
|
1041
|
+
response = list_member_teams(super_team_id, opts)
|
1042
|
+
@api_client.get_attribute_from_path(response, "data").each { |item| yield(item) }
|
1043
|
+
if @api_client.get_attribute_from_path(response, "data").length < page_size
|
1044
|
+
break
|
1045
|
+
end
|
1046
|
+
@api_client.set_attribute_from_path(api_version, opts, "page_number", Integer, @api_client.get_attribute_from_path(opts, "page_number", 0) + 1)
|
1047
|
+
end
|
1048
|
+
end
|
1049
|
+
|
872
1050
|
# Get all teams.
|
873
1051
|
#
|
874
1052
|
# @see #list_teams_with_http_info
|
@@ -971,6 +1149,82 @@ module DatadogAPIClient::V2
|
|
971
1149
|
end
|
972
1150
|
end
|
973
1151
|
|
1152
|
+
# Remove a member team.
|
1153
|
+
#
|
1154
|
+
# @see #remove_member_team_with_http_info
|
1155
|
+
def remove_member_team(super_team_id, member_team_id, opts = {})
|
1156
|
+
remove_member_team_with_http_info(super_team_id, member_team_id, opts)
|
1157
|
+
nil
|
1158
|
+
end
|
1159
|
+
|
1160
|
+
# Remove a member team.
|
1161
|
+
#
|
1162
|
+
# Remove a super team's member team identified by `member_team_id`.
|
1163
|
+
#
|
1164
|
+
# @param super_team_id [String] None
|
1165
|
+
# @param member_team_id [String] None
|
1166
|
+
# @param opts [Hash] the optional parameters
|
1167
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
1168
|
+
def remove_member_team_with_http_info(super_team_id, member_team_id, opts = {})
|
1169
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.remove_member_team".to_sym]
|
1170
|
+
if unstable_enabled
|
1171
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.remove_member_team")
|
1172
|
+
else
|
1173
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.remove_member_team"))
|
1174
|
+
end
|
1175
|
+
|
1176
|
+
if @api_client.config.debugging
|
1177
|
+
@api_client.config.logger.debug 'Calling API: TeamsAPI.remove_member_team ...'
|
1178
|
+
end
|
1179
|
+
# verify the required parameter 'super_team_id' is set
|
1180
|
+
if @api_client.config.client_side_validation && super_team_id.nil?
|
1181
|
+
fail ArgumentError, "Missing the required parameter 'super_team_id' when calling TeamsAPI.remove_member_team"
|
1182
|
+
end
|
1183
|
+
# verify the required parameter 'member_team_id' is set
|
1184
|
+
if @api_client.config.client_side_validation && member_team_id.nil?
|
1185
|
+
fail ArgumentError, "Missing the required parameter 'member_team_id' when calling TeamsAPI.remove_member_team"
|
1186
|
+
end
|
1187
|
+
# resource path
|
1188
|
+
local_var_path = '/api/v2/team/{super_team_id}/member_teams/{member_team_id}'.sub('{super_team_id}', CGI.escape(super_team_id.to_s).gsub('%2F', '/')).sub('{member_team_id}', CGI.escape(member_team_id.to_s).gsub('%2F', '/'))
|
1189
|
+
|
1190
|
+
# query parameters
|
1191
|
+
query_params = opts[:query_params] || {}
|
1192
|
+
|
1193
|
+
# header parameters
|
1194
|
+
header_params = opts[:header_params] || {}
|
1195
|
+
# HTTP header 'Accept' (if needed)
|
1196
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
1197
|
+
|
1198
|
+
# form parameters
|
1199
|
+
form_params = opts[:form_params] || {}
|
1200
|
+
|
1201
|
+
# http body (model)
|
1202
|
+
post_body = opts[:debug_body]
|
1203
|
+
|
1204
|
+
# return_type
|
1205
|
+
return_type = opts[:debug_return_type]
|
1206
|
+
|
1207
|
+
# auth_names
|
1208
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
1209
|
+
|
1210
|
+
new_options = opts.merge(
|
1211
|
+
:operation => :remove_member_team,
|
1212
|
+
:header_params => header_params,
|
1213
|
+
:query_params => query_params,
|
1214
|
+
:form_params => form_params,
|
1215
|
+
:body => post_body,
|
1216
|
+
:auth_names => auth_names,
|
1217
|
+
:return_type => return_type,
|
1218
|
+
:api_version => "V2"
|
1219
|
+
)
|
1220
|
+
|
1221
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
|
1222
|
+
if @api_client.config.debugging
|
1223
|
+
@api_client.config.logger.debug "API called: TeamsAPI#remove_member_team\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1224
|
+
end
|
1225
|
+
return data, status_code, headers
|
1226
|
+
end
|
1227
|
+
|
974
1228
|
# Update a team.
|
975
1229
|
#
|
976
1230
|
# @see #update_team_with_http_info
|