datadog_api_client 2.47.0 → 2.48.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/.generator/schemas/v1/openapi.yaml +96 -5
- data/.generator/schemas/v2/openapi.yaml +2453 -707
- data/CHANGELOG.md +20 -0
- data/examples/v2/incidents/CreateIncidentAttachment.rb +22 -0
- data/examples/v2/incidents/DeleteIncidentAttachment.rb +8 -0
- data/examples/v2/incidents/ListIncidentAttachments.rb +1 -1
- data/examples/v2/incidents/UpdateIncidentAttachment.rb +20 -0
- data/examples/v2/on-call/CreateUserNotificationRule.rb +29 -0
- data/examples/v2/on-call/DeleteUserNotificationRule.rb +11 -0
- data/examples/v2/on-call/GetUserNotificationRule.rb +14 -0
- data/examples/v2/on-call/ListUserNotificationRules.rb +11 -0
- data/examples/v2/on-call/UpdateUserNotificationRule.rb +36 -0
- data/examples/v2/product-analytics/SubmitProductAnalyticsEvent.rb +24 -0
- data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_2323193894.rb +48 -0
- data/examples/v2/synthetics/PatchGlobalVariable.rb +19 -0
- data/examples/v2/teams/CreateTeamNotificationRule.rb +23 -0
- data/examples/v2/teams/DeleteTeamConnections.rb +0 -3
- data/examples/v2/teams/DeleteTeamNotificationRule.rb +11 -0
- data/examples/v2/teams/GetTeamNotificationRule.rb +11 -0
- data/examples/v2/teams/GetTeamNotificationRules.rb +8 -0
- data/examples/v2/teams/GetTeamSync.rb +0 -3
- data/examples/v2/teams/ListTeamConnections.rb +0 -3
- data/examples/v2/teams/ListTeamConnections_2418873869.rb +0 -3
- data/examples/v2/teams/SyncTeams.rb +0 -3
- data/examples/v2/teams/SyncTeams_3215592344.rb +0 -3
- data/examples/v2/teams/UpdateTeamNotificationRule.rb +27 -0
- data/lib/datadog_api_client/configuration.rb +55 -6
- data/lib/datadog_api_client/inflector.rb +92 -20
- data/lib/datadog_api_client/v1/api/synthetics_api.rb +3 -3
- data/lib/datadog_api_client/v1/api/usage_metering_api.rb +6 -4
- data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +3 -0
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +6 -0
- data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +61 -1
- data/lib/datadog_api_client/v1/models/synthetics_list_tests_response.rb +1 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_details.rb +1 -1
- data/lib/datadog_api_client/v1/models/synthetics_test_details_without_steps.rb +221 -0
- data/lib/datadog_api_client/v2/api/dora_metrics_api.rb +8 -8
- data/lib/datadog_api_client/v2/api/incidents_api.rb +188 -36
- data/lib/datadog_api_client/v2/api/on_call_api.rb +360 -0
- data/lib/datadog_api_client/v2/api/product_analytics_api.rb +121 -0
- data/lib/datadog_api_client/v2/api/software_catalog_api.rb +4 -0
- data/lib/datadog_api_client/v2/api/synthetics_api.rb +79 -0
- data/lib/datadog_api_client/v2/api/teams_api.rb +339 -30
- data/lib/datadog_api_client/v2/models/attachment.rb +117 -0
- data/lib/datadog_api_client/v2/models/{incident_attachments_response.rb → attachment_array.rb} +7 -7
- data/lib/datadog_api_client/v2/models/{incident_attachment_data.rb → attachment_data.rb} +8 -8
- data/lib/datadog_api_client/v2/models/attachment_data_attributes.rb +125 -0
- data/lib/datadog_api_client/v2/models/attachment_data_attributes_attachment.rb +115 -0
- data/lib/datadog_api_client/v2/models/{incident_attachment_attachment_type.rb → attachment_data_attributes_attachment_type.rb} +3 -3
- data/lib/datadog_api_client/v2/models/{incident_attachment_relationships.rb → attachment_data_relationships.rb} +5 -5
- data/lib/datadog_api_client/v2/models/{incident_attachment_update_request.rb → attachment_data_relationships_last_modified_by_user.rb} +6 -11
- data/lib/datadog_api_client/v2/models/attachment_data_relationships_last_modified_by_user_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/{incident_attachments_response_included_item.rb → attachment_included.rb} +3 -3
- data/lib/datadog_api_client/v2/models/case_create_attributes.rb +11 -1
- data/lib/datadog_api_client/v2/models/{dora_fetch_response.rb → create_attachment_request.rb} +5 -5
- data/lib/datadog_api_client/v2/models/{incident_attachment_update_data.rb → create_attachment_request_data.rb} +6 -6
- data/lib/datadog_api_client/v2/models/create_attachment_request_data_attributes.rb +115 -0
- data/lib/datadog_api_client/v2/models/create_attachment_request_data_attributes_attachment.rb +115 -0
- data/lib/datadog_api_client/v2/models/create_on_call_notification_rule_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/create_on_call_notification_rule_request_data.rb +143 -0
- data/lib/datadog_api_client/v2/models/custom_attribute_type.rb +1 -0
- data/lib/datadog_api_client/v2/models/dora_deployment_fetch_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/dora_deployment_object.rb +125 -0
- data/lib/datadog_api_client/v2/models/dora_deployment_object_attributes.rb +225 -0
- data/lib/datadog_api_client/v2/models/dora_deployment_request_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/dora_deployments_list_response.rb +107 -0
- data/lib/datadog_api_client/v2/models/dora_failure_fetch_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/dora_failure_request_attributes.rb +1 -1
- data/lib/datadog_api_client/v2/models/{dora_list_response.rb → dora_failures_list_response.rb} +5 -5
- data/lib/datadog_api_client/v2/models/{dora_event.rb → dora_incident_object.rb} +8 -8
- data/lib/datadog_api_client/v2/models/dora_incident_object_attributes.rb +225 -0
- data/lib/datadog_api_client/v2/models/global_variable_data.rb +125 -0
- data/lib/datadog_api_client/v2/models/global_variable_json_patch_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/global_variable_json_patch_request_data.rb +115 -0
- data/lib/datadog_api_client/v2/models/global_variable_json_patch_request_data_attributes.rb +107 -0
- data/lib/datadog_api_client/v2/models/global_variable_json_patch_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/global_variable_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/{incident_attachment_link_attachment_type.rb → global_variable_type.rb} +3 -3
- data/lib/datadog_api_client/v2/models/incident_response_included_item.rb +1 -1
- data/lib/datadog_api_client/v2/models/{incident_attachments_postmortem_attributes_attachment_object.rb → json_patch_operation.rb} +40 -30
- data/lib/datadog_api_client/v2/models/json_patch_operation_op.rb +31 -0
- data/lib/datadog_api_client/v2/models/list_on_call_notification_rules_response.rb +119 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_add_env_vars_processor.rb +11 -1
- data/lib/datadog_api_client/v2/models/observability_pipeline_add_fields_processor.rb +11 -1
- data/lib/datadog_api_client/v2/models/observability_pipeline_config_processor_group.rb +11 -1
- data/lib/datadog_api_client/v2/models/observability_pipeline_custom_processor.rb +11 -1
- data/lib/datadog_api_client/v2/models/observability_pipeline_datadog_tags_processor.rb +11 -1
- data/lib/datadog_api_client/v2/models/observability_pipeline_dedupe_processor.rb +11 -1
- data/lib/datadog_api_client/v2/models/observability_pipeline_enrichment_table_processor.rb +11 -1
- data/lib/datadog_api_client/v2/models/observability_pipeline_filter_processor.rb +11 -1
- data/lib/datadog_api_client/v2/models/observability_pipeline_generate_metrics_processor.rb +11 -1
- data/lib/datadog_api_client/v2/models/observability_pipeline_ocsf_mapper_processor.rb +11 -1
- data/lib/datadog_api_client/v2/models/observability_pipeline_parse_grok_processor.rb +11 -1
- data/lib/datadog_api_client/v2/models/observability_pipeline_parse_json_processor.rb +11 -1
- data/lib/datadog_api_client/v2/models/observability_pipeline_quota_processor.rb +11 -1
- data/lib/datadog_api_client/v2/models/observability_pipeline_reduce_processor.rb +11 -1
- data/lib/datadog_api_client/v2/models/observability_pipeline_remove_fields_processor.rb +11 -1
- data/lib/datadog_api_client/v2/models/observability_pipeline_rename_fields_processor.rb +11 -1
- data/lib/datadog_api_client/v2/models/observability_pipeline_sample_processor.rb +11 -1
- data/lib/datadog_api_client/v2/models/observability_pipeline_sensitive_data_scanner_processor.rb +11 -1
- data/lib/datadog_api_client/v2/models/observability_pipeline_throttle_processor.rb +11 -1
- data/lib/datadog_api_client/v2/models/{incident_attachment_update_response.rb → on_call_notification_rule.rb} +8 -11
- data/lib/datadog_api_client/v2/models/on_call_notification_rule_attributes.rb +125 -0
- data/lib/datadog_api_client/v2/models/on_call_notification_rule_category.rb +27 -0
- data/lib/datadog_api_client/v2/models/on_call_notification_rule_channel_relationship.rb +123 -0
- data/lib/datadog_api_client/v2/models/on_call_notification_rule_channel_relationship_data.rb +115 -0
- data/lib/datadog_api_client/v2/models/{incident_attachment_update_attributes.rb → on_call_notification_rule_channel_settings.rb} +3 -4
- data/lib/datadog_api_client/v2/models/on_call_notification_rule_data.rb +153 -0
- data/lib/datadog_api_client/v2/models/on_call_notification_rule_relationships.rb +105 -0
- data/lib/datadog_api_client/v2/models/on_call_notification_rule_request_attributes.rb +125 -0
- data/lib/datadog_api_client/v2/models/on_call_notification_rule_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/{incident_attachment_attributes.rb → on_call_notification_rules_included.rb} +3 -4
- data/lib/datadog_api_client/v2/models/on_call_phone_notification_rule_method.rb +27 -0
- data/lib/datadog_api_client/v2/models/{incident_attachment_link_attributes_attachment_object.rb → on_call_phone_notification_rule_settings.rb} +30 -30
- data/lib/datadog_api_client/v2/models/patch_attachment_request.rb +105 -0
- data/lib/datadog_api_client/v2/models/patch_attachment_request_data.rb +143 -0
- data/lib/datadog_api_client/v2/models/patch_attachment_request_data_attributes.rb +105 -0
- data/lib/datadog_api_client/v2/models/patch_attachment_request_data_attributes_attachment.rb +115 -0
- data/lib/datadog_api_client/v2/models/product_analytics_server_side_event_error.rb +125 -0
- data/lib/datadog_api_client/v2/models/product_analytics_server_side_event_errors.rb +107 -0
- data/lib/datadog_api_client/v2/models/product_analytics_server_side_event_item.rb +195 -0
- data/lib/datadog_api_client/v2/models/product_analytics_server_side_event_item_account.rb +123 -0
- data/lib/datadog_api_client/v2/models/product_analytics_server_side_event_item_application.rb +124 -0
- data/lib/datadog_api_client/v2/models/product_analytics_server_side_event_item_event.rb +123 -0
- data/lib/datadog_api_client/v2/models/product_analytics_server_side_event_item_session.rb +123 -0
- data/lib/datadog_api_client/v2/models/product_analytics_server_side_event_item_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/product_analytics_server_side_event_item_usr.rb +123 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_anomaly_detection_options.rb +155 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_anomaly_detection_options_bucket_duration.rb +32 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_anomaly_detection_options_detection_tolerance.rb +31 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_anomaly_detection_options_learning_duration.rb +32 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_options.rb +11 -1
- data/lib/datadog_api_client/v2/models/synthetics_global_variable.rb +248 -0
- data/lib/datadog_api_client/v2/models/synthetics_global_variable_attributes.rb +107 -0
- data/lib/datadog_api_client/v2/models/synthetics_global_variable_options.rb +105 -0
- data/lib/datadog_api_client/v2/models/{incident_attachment_postmortem_attributes.rb → synthetics_global_variable_parse_test_options.rb} +44 -35
- data/lib/datadog_api_client/v2/models/synthetics_global_variable_parse_test_options_type.rb +29 -0
- data/lib/datadog_api_client/v2/models/synthetics_global_variable_parser_type.rb +29 -0
- data/lib/datadog_api_client/v2/models/{incident_attachment_link_attributes.rb → synthetics_global_variable_totp_parameters.rb} +38 -40
- data/lib/datadog_api_client/v2/models/synthetics_global_variable_value.rb +126 -0
- data/lib/datadog_api_client/v2/models/synthetics_variable_parser.rb +133 -0
- data/lib/datadog_api_client/v2/models/team_notification_rule.rb +154 -0
- data/lib/datadog_api_client/v2/models/team_notification_rule_attributes.rb +135 -0
- data/lib/datadog_api_client/v2/models/team_notification_rule_attributes_email.rb +105 -0
- data/lib/datadog_api_client/v2/models/team_notification_rule_attributes_ms_teams.rb +105 -0
- data/lib/datadog_api_client/v2/models/team_notification_rule_attributes_pagerduty.rb +105 -0
- data/lib/datadog_api_client/v2/models/team_notification_rule_attributes_slack.rb +115 -0
- data/lib/datadog_api_client/v2/models/team_notification_rule_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/team_notification_rule_response.rb +105 -0
- data/lib/datadog_api_client/v2/models/{incident_attachment_postmortem_attachment_type.rb → team_notification_rule_type.rb} +3 -3
- data/lib/datadog_api_client/v2/models/team_notification_rules_response.rb +117 -0
- data/lib/datadog_api_client/v2/models/team_notification_rules_response_meta.rb +105 -0
- data/lib/datadog_api_client/v2/models/team_notification_rules_response_meta_page.rb +184 -0
- data/lib/datadog_api_client/v2/models/threat_hunting_job_options.rb +11 -1
- data/lib/datadog_api_client/v2/models/update_on_call_notification_rule_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/update_on_call_notification_rule_request_attributes.rb +125 -0
- data/lib/datadog_api_client/v2/models/update_on_call_notification_rule_request_data.rb +153 -0
- data/lib/datadog_api_client/v2/models/user140420082644000.rb +143 -0
- data/lib/datadog_api_client/v2/models/{incident_attachment_related_object.rb → user_type.rb} +2 -2
- data/lib/datadog_api_client/version.rb +1 -1
- metadata +109 -24
- data/examples/v2/incidents/ListIncidentAttachments_2457735435.rb +0 -11
- data/examples/v2/incidents/UpdateIncidentAttachments.rb +0 -38
- data/examples/v2/incidents/UpdateIncidentAttachments_3881702075.rb +0 -26
|
@@ -96,6 +96,86 @@ module DatadogAPIClient::V2
|
|
|
96
96
|
return data, status_code, headers
|
|
97
97
|
end
|
|
98
98
|
|
|
99
|
+
# Create incident attachment.
|
|
100
|
+
#
|
|
101
|
+
# @see #create_incident_attachment_with_http_info
|
|
102
|
+
def create_incident_attachment(incident_id, body, opts = {})
|
|
103
|
+
data, _status_code, _headers = create_incident_attachment_with_http_info(incident_id, body, opts)
|
|
104
|
+
data
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Create incident attachment.
|
|
108
|
+
#
|
|
109
|
+
# Create an incident attachment.
|
|
110
|
+
#
|
|
111
|
+
# @param incident_id [String] The UUID of the incident.
|
|
112
|
+
# @param body [CreateAttachmentRequest]
|
|
113
|
+
# @param opts [Hash] the optional parameters
|
|
114
|
+
# @option opts [String] :include Resource to include in the response. Supported value: `last_modified_by_user`.
|
|
115
|
+
# @return [Array<(Attachment, Integer, Hash)>] Attachment data, response status code and response headers
|
|
116
|
+
def create_incident_attachment_with_http_info(incident_id, body, opts = {})
|
|
117
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.create_incident_attachment".to_sym]
|
|
118
|
+
if unstable_enabled
|
|
119
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_incident_attachment")
|
|
120
|
+
else
|
|
121
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_incident_attachment"))
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
if @api_client.config.debugging
|
|
125
|
+
@api_client.config.logger.debug 'Calling API: IncidentsAPI.create_incident_attachment ...'
|
|
126
|
+
end
|
|
127
|
+
# verify the required parameter 'incident_id' is set
|
|
128
|
+
if @api_client.config.client_side_validation && incident_id.nil?
|
|
129
|
+
fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.create_incident_attachment"
|
|
130
|
+
end
|
|
131
|
+
# verify the required parameter 'body' is set
|
|
132
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
133
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling IncidentsAPI.create_incident_attachment"
|
|
134
|
+
end
|
|
135
|
+
# resource path
|
|
136
|
+
local_var_path = '/api/v2/incidents/{incident_id}/attachments'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/'))
|
|
137
|
+
|
|
138
|
+
# query parameters
|
|
139
|
+
query_params = opts[:query_params] || {}
|
|
140
|
+
query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil?
|
|
141
|
+
|
|
142
|
+
# header parameters
|
|
143
|
+
header_params = opts[:header_params] || {}
|
|
144
|
+
# HTTP header 'Accept' (if needed)
|
|
145
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
146
|
+
# HTTP header 'Content-Type'
|
|
147
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
148
|
+
|
|
149
|
+
# form parameters
|
|
150
|
+
form_params = opts[:form_params] || {}
|
|
151
|
+
|
|
152
|
+
# http body (model)
|
|
153
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
154
|
+
|
|
155
|
+
# return_type
|
|
156
|
+
return_type = opts[:debug_return_type] || 'Attachment'
|
|
157
|
+
|
|
158
|
+
# auth_names
|
|
159
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
|
160
|
+
|
|
161
|
+
new_options = opts.merge(
|
|
162
|
+
:operation => :create_incident_attachment,
|
|
163
|
+
:header_params => header_params,
|
|
164
|
+
:query_params => query_params,
|
|
165
|
+
:form_params => form_params,
|
|
166
|
+
:body => post_body,
|
|
167
|
+
:auth_names => auth_names,
|
|
168
|
+
:return_type => return_type,
|
|
169
|
+
:api_version => "V2"
|
|
170
|
+
)
|
|
171
|
+
|
|
172
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
|
|
173
|
+
if @api_client.config.debugging
|
|
174
|
+
@api_client.config.logger.debug "API called: IncidentsAPI#create_incident_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
175
|
+
end
|
|
176
|
+
return data, status_code, headers
|
|
177
|
+
end
|
|
178
|
+
|
|
99
179
|
# Create an incident impact.
|
|
100
180
|
#
|
|
101
181
|
# @see #create_incident_impact_with_http_info
|
|
@@ -616,6 +696,79 @@ module DatadogAPIClient::V2
|
|
|
616
696
|
return data, status_code, headers
|
|
617
697
|
end
|
|
618
698
|
|
|
699
|
+
# Delete incident attachment.
|
|
700
|
+
#
|
|
701
|
+
# @see #delete_incident_attachment_with_http_info
|
|
702
|
+
def delete_incident_attachment(incident_id, attachment_id, opts = {})
|
|
703
|
+
delete_incident_attachment_with_http_info(incident_id, attachment_id, opts)
|
|
704
|
+
nil
|
|
705
|
+
end
|
|
706
|
+
|
|
707
|
+
# Delete incident attachment.
|
|
708
|
+
# @param incident_id [String] The UUID of the incident.
|
|
709
|
+
# @param attachment_id [Object] The ID of the attachment.
|
|
710
|
+
# @param opts [Hash] the optional parameters
|
|
711
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
712
|
+
def delete_incident_attachment_with_http_info(incident_id, attachment_id, opts = {})
|
|
713
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.delete_incident_attachment".to_sym]
|
|
714
|
+
if unstable_enabled
|
|
715
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_incident_attachment")
|
|
716
|
+
else
|
|
717
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_incident_attachment"))
|
|
718
|
+
end
|
|
719
|
+
|
|
720
|
+
if @api_client.config.debugging
|
|
721
|
+
@api_client.config.logger.debug 'Calling API: IncidentsAPI.delete_incident_attachment ...'
|
|
722
|
+
end
|
|
723
|
+
# verify the required parameter 'incident_id' is set
|
|
724
|
+
if @api_client.config.client_side_validation && incident_id.nil?
|
|
725
|
+
fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.delete_incident_attachment"
|
|
726
|
+
end
|
|
727
|
+
# verify the required parameter 'attachment_id' is set
|
|
728
|
+
if @api_client.config.client_side_validation && attachment_id.nil?
|
|
729
|
+
fail ArgumentError, "Missing the required parameter 'attachment_id' when calling IncidentsAPI.delete_incident_attachment"
|
|
730
|
+
end
|
|
731
|
+
# resource path
|
|
732
|
+
local_var_path = '/api/v2/incidents/{incident_id}/attachments/{attachment_id}'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')).sub('{attachment_id}', CGI.escape(attachment_id.to_s).gsub('%2F', '/'))
|
|
733
|
+
|
|
734
|
+
# query parameters
|
|
735
|
+
query_params = opts[:query_params] || {}
|
|
736
|
+
|
|
737
|
+
# header parameters
|
|
738
|
+
header_params = opts[:header_params] || {}
|
|
739
|
+
# HTTP header 'Accept' (if needed)
|
|
740
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
|
741
|
+
|
|
742
|
+
# form parameters
|
|
743
|
+
form_params = opts[:form_params] || {}
|
|
744
|
+
|
|
745
|
+
# http body (model)
|
|
746
|
+
post_body = opts[:debug_body]
|
|
747
|
+
|
|
748
|
+
# return_type
|
|
749
|
+
return_type = opts[:debug_return_type]
|
|
750
|
+
|
|
751
|
+
# auth_names
|
|
752
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
|
753
|
+
|
|
754
|
+
new_options = opts.merge(
|
|
755
|
+
:operation => :delete_incident_attachment,
|
|
756
|
+
:header_params => header_params,
|
|
757
|
+
:query_params => query_params,
|
|
758
|
+
:form_params => form_params,
|
|
759
|
+
:body => post_body,
|
|
760
|
+
:auth_names => auth_names,
|
|
761
|
+
:return_type => return_type,
|
|
762
|
+
:api_version => "V2"
|
|
763
|
+
)
|
|
764
|
+
|
|
765
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
|
|
766
|
+
if @api_client.config.debugging
|
|
767
|
+
@api_client.config.logger.debug "API called: IncidentsAPI#delete_incident_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
768
|
+
end
|
|
769
|
+
return data, status_code, headers
|
|
770
|
+
end
|
|
771
|
+
|
|
619
772
|
# Delete an incident impact.
|
|
620
773
|
#
|
|
621
774
|
# @see #delete_incident_impact_with_http_info
|
|
@@ -1497,7 +1650,7 @@ module DatadogAPIClient::V2
|
|
|
1497
1650
|
return data, status_code, headers
|
|
1498
1651
|
end
|
|
1499
1652
|
|
|
1500
|
-
#
|
|
1653
|
+
# List incident attachments.
|
|
1501
1654
|
#
|
|
1502
1655
|
# @see #list_incident_attachments_with_http_info
|
|
1503
1656
|
def list_incident_attachments(incident_id, opts = {})
|
|
@@ -1505,15 +1658,15 @@ module DatadogAPIClient::V2
|
|
|
1505
1658
|
data
|
|
1506
1659
|
end
|
|
1507
1660
|
|
|
1508
|
-
#
|
|
1661
|
+
# List incident attachments.
|
|
1509
1662
|
#
|
|
1510
|
-
#
|
|
1663
|
+
# List incident attachments.
|
|
1511
1664
|
#
|
|
1512
1665
|
# @param incident_id [String] The UUID of the incident.
|
|
1513
1666
|
# @param opts [Hash] the optional parameters
|
|
1514
|
-
# @option opts [
|
|
1515
|
-
# @option opts [
|
|
1516
|
-
# @return [Array<(
|
|
1667
|
+
# @option opts [String] :filter_attachment_type Filter attachments by type. Supported values are `1` (`postmortem`) and `2` (`link`).
|
|
1668
|
+
# @option opts [String] :include Resource to include in the response. Supported value: `last_modified_by_user`.
|
|
1669
|
+
# @return [Array<(AttachmentArray, Integer, Hash)>] AttachmentArray data, response status code and response headers
|
|
1517
1670
|
def list_incident_attachments_with_http_info(incident_id, opts = {})
|
|
1518
1671
|
unstable_enabled = @api_client.config.unstable_operations["v2.list_incident_attachments".to_sym]
|
|
1519
1672
|
if unstable_enabled
|
|
@@ -1534,8 +1687,8 @@ module DatadogAPIClient::V2
|
|
|
1534
1687
|
|
|
1535
1688
|
# query parameters
|
|
1536
1689
|
query_params = opts[:query_params] || {}
|
|
1537
|
-
query_params[:'
|
|
1538
|
-
query_params[:'
|
|
1690
|
+
query_params[:'filter[attachment_type]'] = opts[:'filter_attachment_type'] if !opts[:'filter_attachment_type'].nil?
|
|
1691
|
+
query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil?
|
|
1539
1692
|
|
|
1540
1693
|
# header parameters
|
|
1541
1694
|
header_params = opts[:header_params] || {}
|
|
@@ -1549,7 +1702,7 @@ module DatadogAPIClient::V2
|
|
|
1549
1702
|
post_body = opts[:debug_body]
|
|
1550
1703
|
|
|
1551
1704
|
# return_type
|
|
1552
|
-
return_type = opts[:debug_return_type] || '
|
|
1705
|
+
return_type = opts[:debug_return_type] || 'AttachmentArray'
|
|
1553
1706
|
|
|
1554
1707
|
# auth_names
|
|
1555
1708
|
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
@@ -2269,51 +2422,50 @@ module DatadogAPIClient::V2
|
|
|
2269
2422
|
return data, status_code, headers
|
|
2270
2423
|
end
|
|
2271
2424
|
|
|
2272
|
-
#
|
|
2425
|
+
# Update incident attachment.
|
|
2273
2426
|
#
|
|
2274
|
-
# @see #
|
|
2275
|
-
def
|
|
2276
|
-
data, _status_code, _headers =
|
|
2427
|
+
# @see #update_incident_attachment_with_http_info
|
|
2428
|
+
def update_incident_attachment(incident_id, attachment_id, body, opts = {})
|
|
2429
|
+
data, _status_code, _headers = update_incident_attachment_with_http_info(incident_id, attachment_id, body, opts)
|
|
2277
2430
|
data
|
|
2278
2431
|
end
|
|
2279
2432
|
|
|
2280
|
-
#
|
|
2281
|
-
#
|
|
2282
|
-
# The bulk update endpoint for creating, updating, and deleting attachments for a given incident.
|
|
2283
|
-
#
|
|
2284
|
-
# @deprecated This API is deprecated.
|
|
2285
|
-
#
|
|
2433
|
+
# Update incident attachment.
|
|
2286
2434
|
# @param incident_id [String] The UUID of the incident.
|
|
2287
|
-
# @param
|
|
2435
|
+
# @param attachment_id [Object] The ID of the attachment.
|
|
2436
|
+
# @param body [PatchAttachmentRequest]
|
|
2288
2437
|
# @param opts [Hash] the optional parameters
|
|
2289
|
-
# @option opts [
|
|
2290
|
-
# @return [Array<(
|
|
2291
|
-
def
|
|
2292
|
-
|
|
2293
|
-
unstable_enabled = @api_client.config.unstable_operations["v2.update_incident_attachments".to_sym]
|
|
2438
|
+
# @option opts [String] :include Resource to include in the response. Supported value: `last_modified_by_user`.
|
|
2439
|
+
# @return [Array<(Attachment, Integer, Hash)>] Attachment data, response status code and response headers
|
|
2440
|
+
def update_incident_attachment_with_http_info(incident_id, attachment_id, body, opts = {})
|
|
2441
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.update_incident_attachment".to_sym]
|
|
2294
2442
|
if unstable_enabled
|
|
2295
|
-
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.
|
|
2443
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_incident_attachment")
|
|
2296
2444
|
else
|
|
2297
|
-
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.
|
|
2445
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_incident_attachment"))
|
|
2298
2446
|
end
|
|
2299
2447
|
|
|
2300
2448
|
if @api_client.config.debugging
|
|
2301
|
-
@api_client.config.logger.debug 'Calling API: IncidentsAPI.
|
|
2449
|
+
@api_client.config.logger.debug 'Calling API: IncidentsAPI.update_incident_attachment ...'
|
|
2302
2450
|
end
|
|
2303
2451
|
# verify the required parameter 'incident_id' is set
|
|
2304
2452
|
if @api_client.config.client_side_validation && incident_id.nil?
|
|
2305
|
-
fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.
|
|
2453
|
+
fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.update_incident_attachment"
|
|
2454
|
+
end
|
|
2455
|
+
# verify the required parameter 'attachment_id' is set
|
|
2456
|
+
if @api_client.config.client_side_validation && attachment_id.nil?
|
|
2457
|
+
fail ArgumentError, "Missing the required parameter 'attachment_id' when calling IncidentsAPI.update_incident_attachment"
|
|
2306
2458
|
end
|
|
2307
2459
|
# verify the required parameter 'body' is set
|
|
2308
2460
|
if @api_client.config.client_side_validation && body.nil?
|
|
2309
|
-
fail ArgumentError, "Missing the required parameter 'body' when calling IncidentsAPI.
|
|
2461
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling IncidentsAPI.update_incident_attachment"
|
|
2310
2462
|
end
|
|
2311
2463
|
# resource path
|
|
2312
|
-
local_var_path = '/api/v2/incidents/{incident_id}/attachments'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/'))
|
|
2464
|
+
local_var_path = '/api/v2/incidents/{incident_id}/attachments/{attachment_id}'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')).sub('{attachment_id}', CGI.escape(attachment_id.to_s).gsub('%2F', '/'))
|
|
2313
2465
|
|
|
2314
2466
|
# query parameters
|
|
2315
2467
|
query_params = opts[:query_params] || {}
|
|
2316
|
-
query_params[:'include'] =
|
|
2468
|
+
query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil?
|
|
2317
2469
|
|
|
2318
2470
|
# header parameters
|
|
2319
2471
|
header_params = opts[:header_params] || {}
|
|
@@ -2329,13 +2481,13 @@ module DatadogAPIClient::V2
|
|
|
2329
2481
|
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
2330
2482
|
|
|
2331
2483
|
# return_type
|
|
2332
|
-
return_type = opts[:debug_return_type] || '
|
|
2484
|
+
return_type = opts[:debug_return_type] || 'Attachment'
|
|
2333
2485
|
|
|
2334
2486
|
# auth_names
|
|
2335
|
-
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
|
2487
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
|
2336
2488
|
|
|
2337
2489
|
new_options = opts.merge(
|
|
2338
|
-
:operation => :
|
|
2490
|
+
:operation => :update_incident_attachment,
|
|
2339
2491
|
:header_params => header_params,
|
|
2340
2492
|
:query_params => query_params,
|
|
2341
2493
|
:form_params => form_params,
|
|
@@ -2347,7 +2499,7 @@ module DatadogAPIClient::V2
|
|
|
2347
2499
|
|
|
2348
2500
|
data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options)
|
|
2349
2501
|
if @api_client.config.debugging
|
|
2350
|
-
@api_client.config.logger.debug "API called: IncidentsAPI#
|
|
2502
|
+
@api_client.config.logger.debug "API called: IncidentsAPI#update_incident_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2351
2503
|
end
|
|
2352
2504
|
return data, status_code, headers
|
|
2353
2505
|
end
|