datadog_api_client 2.31.1 → 2.32.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 +80 -4
- data/.generator/schemas/v2/openapi.yaml +2404 -55
- data/.generator/src/generator/cli.py +1 -1
- data/.generator/src/generator/formatter.py +3 -0
- data/.generator/src/generator/templates/api.j2 +1 -1
- data/.generator/src/generator/templates/inflector.j2 +1 -1
- data/CHANGELOG.md +27 -0
- data/examples/v1/slack-integration/CreateSlackIntegrationChannel.rb +1 -0
- data/examples/v1/slack-integration/UpdateSlackIntegrationChannel.rb +1 -0
- data/examples/v2/action-connection/CreateActionConnection.rb +1 -1
- data/examples/v2/action-connection/DeleteActionConnection.rb +4 -1
- data/examples/v2/apm-retention-filters/CreateApmRetentionFilter_3853850379.rb +21 -0
- data/examples/v2/apm-retention-filters/UpdateApmRetentionFilter_3916044058.rb +25 -0
- data/examples/v2/cloud-network-monitoring/GetAggregatedConnections.rb +8 -0
- data/examples/v2/cloud-network-monitoring/GetAggregatedConnections_3059356111.rb +8 -0
- data/examples/v2/observability-pipelines/CreatePipeline.rb +44 -0
- data/examples/v2/observability-pipelines/DeletePipeline.rb +11 -0
- data/examples/v2/observability-pipelines/GetPipeline.rb +11 -0
- data/examples/v2/observability-pipelines/UpdatePipeline.rb +48 -0
- data/examples/v2/on-call/CreateOnCallSchedule.rb +61 -0
- data/examples/v2/on-call/DeleteOnCallSchedule.rb +8 -0
- data/examples/v2/on-call/GetOnCallSchedule.rb +8 -0
- data/examples/v2/on-call/UpdateOnCallSchedule.rb +68 -0
- data/examples/v2/security-monitoring/CreateSecurityMonitoringRule_1965169892.rb +6 -0
- data/examples/v2/service-definition/CreateOrUpdateServiceDefinitions.rb +1 -1
- data/examples/v2/software-catalog/UpsertCatalogEntity.rb +1 -0
- data/lib/datadog_api_client/configuration.rb +5 -0
- data/lib/datadog_api_client/inflector.rb +122 -1
- data/lib/datadog_api_client/v1/api/monitors_api.rb +1 -1
- data/lib/datadog_api_client/v1/models/formula_and_function_slo_query_type.rb +1 -0
- data/lib/datadog_api_client/v1/models/slack_integration_channel_display.rb +11 -1
- data/lib/datadog_api_client/v1/models/synthetics_step_type.rb +1 -0
- data/lib/datadog_api_client/v1/models/usage_summary_date.rb +41 -1
- data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +41 -1
- data/lib/datadog_api_client/v1/models/usage_summary_response.rb +41 -1
- data/lib/datadog_api_client/v2/api/cloud_network_monitoring_api.rb +108 -0
- data/lib/datadog_api_client/v2/api/downtimes_api.rb +2 -0
- data/lib/datadog_api_client/v2/api/observability_pipelines_api.rb +319 -0
- data/lib/datadog_api_client/v2/api/on_call_api.rb +301 -0
- data/lib/datadog_api_client/v2/api/restriction_policies_api.rb +7 -3
- data/lib/datadog_api_client/v2/models/api_trigger.rb +1 -1
- data/lib/datadog_api_client/v2/models/api_trigger_wrapper.rb +1 -1
- data/lib/datadog_api_client/v2/models/app_trigger_wrapper.rb +1 -1
- data/lib/datadog_api_client/v2/models/application_security_waf_custom_rule_tags_category.rb +1 -1
- data/lib/datadog_api_client/v2/models/case_trigger.rb +1 -1
- data/lib/datadog_api_client/v2/models/case_trigger_wrapper.rb +1 -1
- data/lib/datadog_api_client/v2/models/change_event_trigger_wrapper.rb +1 -1
- data/lib/datadog_api_client/v2/models/dashboard_trigger_wrapper.rb +1 -1
- data/lib/datadog_api_client/v2/models/database_monitoring_trigger_wrapper.rb +135 -0
- data/lib/datadog_api_client/v2/models/entity_response_included_incident.rb +1 -1
- data/lib/datadog_api_client/v2/models/{service_definition_v2_dot2_type.rb → entity_response_included_incident_type.rb} +3 -9
- data/lib/datadog_api_client/v2/models/entity_response_included_oncall.rb +1 -1
- data/lib/datadog_api_client/v2/models/entity_response_included_oncall_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/entity_response_included_raw_schema.rb +1 -1
- data/lib/datadog_api_client/v2/models/entity_response_included_raw_schema_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/entity_response_included_related_entity.rb +1 -1
- data/lib/datadog_api_client/v2/models/entity_response_included_related_entity_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/entity_response_included_schema.rb +1 -1
- data/lib/datadog_api_client/v2/models/entity_response_included_schema_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/entity_v3_datastore_spec.rb +13 -1
- data/lib/datadog_api_client/v2/models/entity_v3_queue_spec.rb +13 -1
- data/lib/datadog_api_client/v2/models/entity_v3_service_spec.rb +13 -1
- data/lib/datadog_api_client/v2/models/github_webhook_trigger.rb +1 -1
- data/lib/datadog_api_client/v2/models/github_webhook_trigger_wrapper.rb +1 -1
- data/lib/datadog_api_client/v2/models/historical_job_query.rb +11 -1
- data/lib/datadog_api_client/v2/models/incident_trigger.rb +1 -1
- data/lib/datadog_api_client/v2/models/incident_trigger_wrapper.rb +1 -1
- data/lib/datadog_api_client/v2/models/interface_attributes.rb +13 -1
- data/lib/datadog_api_client/v2/models/layer.rb +135 -0
- data/lib/datadog_api_client/v2/models/layer_attributes.rb +157 -0
- data/lib/datadog_api_client/v2/models/layer_attributes_interval.rb +144 -0
- data/lib/datadog_api_client/v2/models/layer_attributes_restrictions_items.rb +136 -0
- data/lib/datadog_api_client/v2/models/layer_attributes_restrictions_items_end_day.rb +32 -0
- data/lib/datadog_api_client/v2/models/layer_attributes_restrictions_items_start_day.rb +32 -0
- data/lib/datadog_api_client/v2/models/layer_relationships.rb +105 -0
- data/lib/datadog_api_client/v2/models/layer_relationships_members.rb +107 -0
- data/lib/datadog_api_client/v2/models/layer_relationships_members_data_items.rb +116 -0
- data/lib/datadog_api_client/v2/models/layer_relationships_members_data_items_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/layer_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/logs_aggregate_request.rb +1 -1
- data/lib/datadog_api_client/v2/models/logs_list_request.rb +1 -1
- data/lib/datadog_api_client/v2/models/logs_query_options.rb +4 -1
- data/lib/datadog_api_client/v2/models/monitor_trigger.rb +1 -1
- data/lib/datadog_api_client/v2/models/monitor_trigger_wrapper.rb +1 -1
- data/lib/datadog_api_client/v2/models/notebook_trigger_wrapper.rb +135 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline.rb +123 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_add_fields_processor.rb +211 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_add_fields_processor_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_config.rb +171 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_config_destination_item.rb +62 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_config_processor_item.rb +67 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_config_source_item.rb +63 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_create_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_create_request_data.rb +144 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_data.rb +165 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_data_attributes.rb +144 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_datadog_agent_source.rb +154 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_datadog_agent_source_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_datadog_logs_destination.rb +167 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_datadog_logs_destination_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_field_value.rb +144 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_filter_processor.rb +188 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_filter_processor_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_kafka_source.rb +220 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_kafka_source_librdkafka_option.rb +144 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_kafka_source_sasl.rb +105 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_kafka_source_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_parse_json_processor.rb +209 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_parse_json_processor_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_pipeline_kafka_source_sasl_mechanism.rb +28 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_quota_processor.rb +285 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_quota_processor_limit.rb +144 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_quota_processor_limit_enforce_type.rb +27 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_quota_processor_override.rb +146 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_quota_processor_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_remove_fields_processor.rb +211 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_remove_fields_processor_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_rename_fields_processor.rb +211 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_rename_fields_processor_field.rb +165 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_rename_fields_processor_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/observability_pipeline_tls.rb +143 -0
- data/lib/datadog_api_client/v2/models/retention_filter_all_attributes.rb +16 -5
- data/lib/datadog_api_client/v2/models/retention_filter_attributes.rb +16 -5
- data/lib/datadog_api_client/v2/models/retention_filter_create_attributes.rb +16 -5
- data/lib/datadog_api_client/v2/models/retention_filter_update_attributes.rb +16 -5
- data/lib/datadog_api_client/v2/models/schedule.rb +117 -0
- data/lib/datadog_api_client/v2/models/schedule_create_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/schedule_create_request_data.rb +154 -0
- data/lib/datadog_api_client/v2/models/schedule_create_request_data_attributes.rb +179 -0
- data/lib/datadog_api_client/v2/models/schedule_create_request_data_attributes_layers_items.rb +231 -0
- data/lib/datadog_api_client/v2/models/schedule_create_request_data_attributes_layers_items_interval.rb +144 -0
- data/lib/datadog_api_client/v2/models/schedule_create_request_data_attributes_layers_items_members_items.rb +105 -0
- data/lib/datadog_api_client/v2/models/schedule_create_request_data_attributes_layers_items_members_items_user.rb +105 -0
- data/lib/datadog_api_client/v2/models/schedule_create_request_data_attributes_layers_items_restrictions_items.rb +136 -0
- data/lib/datadog_api_client/v2/models/schedule_create_request_data_attributes_layers_items_restrictions_items_end_day.rb +32 -0
- data/lib/datadog_api_client/v2/models/schedule_create_request_data_attributes_layers_items_restrictions_items_start_day.rb +32 -0
- data/lib/datadog_api_client/v2/models/schedule_create_request_data_relationships.rb +105 -0
- data/lib/datadog_api_client/v2/models/schedule_create_request_data_relationships_teams.rb +107 -0
- data/lib/datadog_api_client/v2/models/schedule_create_request_data_relationships_teams_data_items.rb +116 -0
- data/lib/datadog_api_client/v2/models/schedule_create_request_data_relationships_teams_data_items_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/schedule_create_request_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/schedule_data.rb +135 -0
- data/lib/datadog_api_client/v2/models/schedule_data_attributes.rb +127 -0
- data/lib/datadog_api_client/v2/models/schedule_data_included_item.rb +65 -0
- data/lib/datadog_api_client/v2/models/schedule_data_relationships.rb +115 -0
- data/lib/datadog_api_client/v2/models/schedule_data_relationships_layers.rb +107 -0
- data/lib/datadog_api_client/v2/models/schedule_data_relationships_layers_data_items.rb +115 -0
- data/lib/datadog_api_client/v2/models/schedule_data_relationships_layers_data_items_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/schedule_data_relationships_teams.rb +107 -0
- data/lib/datadog_api_client/v2/models/schedule_data_relationships_teams_data_items.rb +115 -0
- data/lib/datadog_api_client/v2/models/schedule_data_relationships_teams_data_items_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/schedule_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/schedule_member.rb +125 -0
- data/lib/datadog_api_client/v2/models/schedule_member_relationships.rb +105 -0
- data/lib/datadog_api_client/v2/models/schedule_member_relationships_user.rb +105 -0
- data/lib/datadog_api_client/v2/models/schedule_member_relationships_user_data.rb +115 -0
- data/lib/datadog_api_client/v2/models/schedule_member_relationships_user_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/schedule_member_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/schedule_trigger.rb +1 -1
- data/lib/datadog_api_client/v2/models/schedule_trigger_wrapper.rb +1 -1
- data/lib/datadog_api_client/v2/models/schedule_update_request.rb +123 -0
- data/lib/datadog_api_client/v2/models/schedule_update_request_data.rb +175 -0
- data/lib/datadog_api_client/v2/models/schedule_update_request_data_attributes.rb +179 -0
- data/lib/datadog_api_client/v2/models/schedule_update_request_data_attributes_layers_items.rb +180 -0
- data/lib/datadog_api_client/v2/models/schedule_update_request_data_attributes_layers_items_interval.rb +144 -0
- data/lib/datadog_api_client/v2/models/schedule_update_request_data_attributes_layers_items_members_items.rb +106 -0
- data/lib/datadog_api_client/v2/models/schedule_update_request_data_attributes_layers_items_members_items_user.rb +105 -0
- data/lib/datadog_api_client/v2/models/schedule_update_request_data_attributes_layers_items_restrictions_items.rb +136 -0
- data/lib/datadog_api_client/v2/models/schedule_update_request_data_attributes_layers_items_restrictions_items_end_day.rb +32 -0
- data/lib/datadog_api_client/v2/models/schedule_update_request_data_attributes_layers_items_restrictions_items_start_day.rb +32 -0
- data/lib/datadog_api_client/v2/models/schedule_update_request_data_relationships.rb +105 -0
- data/lib/datadog_api_client/v2/models/schedule_update_request_data_relationships_teams.rb +107 -0
- data/lib/datadog_api_client/v2/models/schedule_update_request_data_relationships_teams_data_items.rb +115 -0
- data/lib/datadog_api_client/v2/models/schedule_update_request_data_relationships_teams_data_items_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/schedule_update_request_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/schedule_user.rb +125 -0
- data/lib/datadog_api_client/v2/models/schedule_user_attributes.rb +115 -0
- data/lib/datadog_api_client/v2/models/schedule_user_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_case_action_options.rb +13 -3
- data/lib/datadog_api_client/v2/models/security_monitoring_rule_case_action_type.rb +1 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_data_source.rb +31 -0
- data/lib/datadog_api_client/v2/models/security_monitoring_standard_rule_query.rb +11 -1
- data/lib/datadog_api_client/v2/models/security_trigger.rb +1 -1
- data/lib/datadog_api_client/v2/models/security_trigger_wrapper.rb +1 -1
- data/lib/datadog_api_client/v2/models/self_service_trigger_wrapper.rb +135 -0
- data/lib/datadog_api_client/v2/models/service_definition_v2_dot2.rb +1 -1
- data/lib/datadog_api_client/v2/models/single_aggregated_connection_response_array.rb +107 -0
- data/lib/datadog_api_client/v2/models/single_aggregated_connection_response_data.rb +125 -0
- data/lib/datadog_api_client/v2/models/single_aggregated_connection_response_data_attributes.rb +215 -0
- data/lib/datadog_api_client/v2/models/single_aggregated_connection_response_data_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/slack_trigger_wrapper.rb +1 -1
- data/lib/datadog_api_client/v2/models/software_catalog_trigger_wrapper.rb +135 -0
- data/lib/datadog_api_client/v2/models/team_reference.rb +135 -0
- data/lib/datadog_api_client/v2/models/team_reference_attributes.rb +135 -0
- data/lib/datadog_api_client/v2/models/team_reference_relationships.rb +105 -0
- data/lib/datadog_api_client/v2/models/team_reference_relationships_oncall_users.rb +107 -0
- data/lib/datadog_api_client/v2/models/team_reference_relationships_oncall_users_data_items.rb +115 -0
- data/lib/datadog_api_client/v2/models/team_reference_relationships_oncall_users_data_items_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/team_reference_type.rb +26 -0
- data/lib/datadog_api_client/v2/models/trigger.rb +4 -0
- data/lib/datadog_api_client/v2/models/workflow_trigger_wrapper.rb +1 -1
- data/lib/datadog_api_client/version.rb +1 -1
- metadata +136 -4
- data/examples/v2/action-connection/DeleteActionConnection_2142905164.rb +0 -8
@@ -0,0 +1,319 @@
|
|
1
|
+
=begin
|
2
|
+
#Datadog API V2 Collection
|
3
|
+
|
4
|
+
#Collection of all Datadog Public endpoints.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: support@datadoghq.com
|
8
|
+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
|
9
|
+
|
10
|
+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
|
11
|
+
This product includes software developed at Datadog (https://www.datadoghq.com/).
|
12
|
+
Copyright 2020-Present Datadog, Inc.
|
13
|
+
|
14
|
+
=end
|
15
|
+
|
16
|
+
require 'cgi'
|
17
|
+
|
18
|
+
module DatadogAPIClient::V2
|
19
|
+
class ObservabilityPipelinesAPI
|
20
|
+
attr_accessor :api_client
|
21
|
+
|
22
|
+
def initialize(api_client = DatadogAPIClient::APIClient.default)
|
23
|
+
@api_client = api_client
|
24
|
+
end
|
25
|
+
|
26
|
+
# Create a new pipeline.
|
27
|
+
#
|
28
|
+
# @see #create_pipeline_with_http_info
|
29
|
+
def create_pipeline(body, opts = {})
|
30
|
+
data, _status_code, _headers = create_pipeline_with_http_info(body, opts)
|
31
|
+
data
|
32
|
+
end
|
33
|
+
|
34
|
+
# Create a new pipeline.
|
35
|
+
#
|
36
|
+
# Create a new pipeline.
|
37
|
+
#
|
38
|
+
# @param body [ObservabilityPipelineCreateRequest]
|
39
|
+
# @param opts [Hash] the optional parameters
|
40
|
+
# @return [Array<(ObservabilityPipeline, Integer, Hash)>] ObservabilityPipeline data, response status code and response headers
|
41
|
+
def create_pipeline_with_http_info(body, opts = {})
|
42
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.create_pipeline".to_sym]
|
43
|
+
if unstable_enabled
|
44
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_pipeline")
|
45
|
+
else
|
46
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_pipeline"))
|
47
|
+
end
|
48
|
+
|
49
|
+
if @api_client.config.debugging
|
50
|
+
@api_client.config.logger.debug 'Calling API: ObservabilityPipelinesAPI.create_pipeline ...'
|
51
|
+
end
|
52
|
+
# verify the required parameter 'body' is set
|
53
|
+
if @api_client.config.client_side_validation && body.nil?
|
54
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling ObservabilityPipelinesAPI.create_pipeline"
|
55
|
+
end
|
56
|
+
# resource path
|
57
|
+
local_var_path = '/api/v2/remote_config/products/obs_pipelines/pipelines'
|
58
|
+
|
59
|
+
# query parameters
|
60
|
+
query_params = opts[:query_params] || {}
|
61
|
+
|
62
|
+
# header parameters
|
63
|
+
header_params = opts[:header_params] || {}
|
64
|
+
# HTTP header 'Accept' (if needed)
|
65
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
66
|
+
# HTTP header 'Content-Type'
|
67
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
68
|
+
|
69
|
+
# form parameters
|
70
|
+
form_params = opts[:form_params] || {}
|
71
|
+
|
72
|
+
# http body (model)
|
73
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
74
|
+
|
75
|
+
# return_type
|
76
|
+
return_type = opts[:debug_return_type] || 'ObservabilityPipeline'
|
77
|
+
|
78
|
+
# auth_names
|
79
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
80
|
+
|
81
|
+
new_options = opts.merge(
|
82
|
+
:operation => :create_pipeline,
|
83
|
+
:header_params => header_params,
|
84
|
+
:query_params => query_params,
|
85
|
+
:form_params => form_params,
|
86
|
+
:body => post_body,
|
87
|
+
:auth_names => auth_names,
|
88
|
+
:return_type => return_type,
|
89
|
+
:api_version => "V2"
|
90
|
+
)
|
91
|
+
|
92
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
|
93
|
+
if @api_client.config.debugging
|
94
|
+
@api_client.config.logger.debug "API called: ObservabilityPipelinesAPI#create_pipeline\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
95
|
+
end
|
96
|
+
return data, status_code, headers
|
97
|
+
end
|
98
|
+
|
99
|
+
# Delete a pipeline.
|
100
|
+
#
|
101
|
+
# @see #delete_pipeline_with_http_info
|
102
|
+
def delete_pipeline(pipeline_id, opts = {})
|
103
|
+
delete_pipeline_with_http_info(pipeline_id, opts)
|
104
|
+
nil
|
105
|
+
end
|
106
|
+
|
107
|
+
# Delete a pipeline.
|
108
|
+
#
|
109
|
+
# Delete a pipeline.
|
110
|
+
#
|
111
|
+
# @param pipeline_id [String] The ID of the pipeline to delete.
|
112
|
+
# @param opts [Hash] the optional parameters
|
113
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
114
|
+
def delete_pipeline_with_http_info(pipeline_id, opts = {})
|
115
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.delete_pipeline".to_sym]
|
116
|
+
if unstable_enabled
|
117
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_pipeline")
|
118
|
+
else
|
119
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_pipeline"))
|
120
|
+
end
|
121
|
+
|
122
|
+
if @api_client.config.debugging
|
123
|
+
@api_client.config.logger.debug 'Calling API: ObservabilityPipelinesAPI.delete_pipeline ...'
|
124
|
+
end
|
125
|
+
# verify the required parameter 'pipeline_id' is set
|
126
|
+
if @api_client.config.client_side_validation && pipeline_id.nil?
|
127
|
+
fail ArgumentError, "Missing the required parameter 'pipeline_id' when calling ObservabilityPipelinesAPI.delete_pipeline"
|
128
|
+
end
|
129
|
+
# resource path
|
130
|
+
local_var_path = '/api/v2/remote_config/products/obs_pipelines/pipelines/{pipeline_id}'.sub('{pipeline_id}', CGI.escape(pipeline_id.to_s).gsub('%2F', '/'))
|
131
|
+
|
132
|
+
# query parameters
|
133
|
+
query_params = opts[:query_params] || {}
|
134
|
+
|
135
|
+
# header parameters
|
136
|
+
header_params = opts[:header_params] || {}
|
137
|
+
# HTTP header 'Accept' (if needed)
|
138
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
139
|
+
|
140
|
+
# form parameters
|
141
|
+
form_params = opts[:form_params] || {}
|
142
|
+
|
143
|
+
# http body (model)
|
144
|
+
post_body = opts[:debug_body]
|
145
|
+
|
146
|
+
# return_type
|
147
|
+
return_type = opts[:debug_return_type]
|
148
|
+
|
149
|
+
# auth_names
|
150
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
151
|
+
|
152
|
+
new_options = opts.merge(
|
153
|
+
:operation => :delete_pipeline,
|
154
|
+
:header_params => header_params,
|
155
|
+
:query_params => query_params,
|
156
|
+
:form_params => form_params,
|
157
|
+
:body => post_body,
|
158
|
+
:auth_names => auth_names,
|
159
|
+
:return_type => return_type,
|
160
|
+
:api_version => "V2"
|
161
|
+
)
|
162
|
+
|
163
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
|
164
|
+
if @api_client.config.debugging
|
165
|
+
@api_client.config.logger.debug "API called: ObservabilityPipelinesAPI#delete_pipeline\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
166
|
+
end
|
167
|
+
return data, status_code, headers
|
168
|
+
end
|
169
|
+
|
170
|
+
# Get a specific pipeline.
|
171
|
+
#
|
172
|
+
# @see #get_pipeline_with_http_info
|
173
|
+
def get_pipeline(pipeline_id, opts = {})
|
174
|
+
data, _status_code, _headers = get_pipeline_with_http_info(pipeline_id, opts)
|
175
|
+
data
|
176
|
+
end
|
177
|
+
|
178
|
+
# Get a specific pipeline.
|
179
|
+
#
|
180
|
+
# Get a specific pipeline by its ID.
|
181
|
+
#
|
182
|
+
# @param pipeline_id [String] The ID of the pipeline to retrieve.
|
183
|
+
# @param opts [Hash] the optional parameters
|
184
|
+
# @return [Array<(ObservabilityPipeline, Integer, Hash)>] ObservabilityPipeline data, response status code and response headers
|
185
|
+
def get_pipeline_with_http_info(pipeline_id, opts = {})
|
186
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.get_pipeline".to_sym]
|
187
|
+
if unstable_enabled
|
188
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_pipeline")
|
189
|
+
else
|
190
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_pipeline"))
|
191
|
+
end
|
192
|
+
|
193
|
+
if @api_client.config.debugging
|
194
|
+
@api_client.config.logger.debug 'Calling API: ObservabilityPipelinesAPI.get_pipeline ...'
|
195
|
+
end
|
196
|
+
# verify the required parameter 'pipeline_id' is set
|
197
|
+
if @api_client.config.client_side_validation && pipeline_id.nil?
|
198
|
+
fail ArgumentError, "Missing the required parameter 'pipeline_id' when calling ObservabilityPipelinesAPI.get_pipeline"
|
199
|
+
end
|
200
|
+
# resource path
|
201
|
+
local_var_path = '/api/v2/remote_config/products/obs_pipelines/pipelines/{pipeline_id}'.sub('{pipeline_id}', CGI.escape(pipeline_id.to_s).gsub('%2F', '/'))
|
202
|
+
|
203
|
+
# query parameters
|
204
|
+
query_params = opts[:query_params] || {}
|
205
|
+
|
206
|
+
# header parameters
|
207
|
+
header_params = opts[:header_params] || {}
|
208
|
+
# HTTP header 'Accept' (if needed)
|
209
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
210
|
+
|
211
|
+
# form parameters
|
212
|
+
form_params = opts[:form_params] || {}
|
213
|
+
|
214
|
+
# http body (model)
|
215
|
+
post_body = opts[:debug_body]
|
216
|
+
|
217
|
+
# return_type
|
218
|
+
return_type = opts[:debug_return_type] || 'ObservabilityPipeline'
|
219
|
+
|
220
|
+
# auth_names
|
221
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
222
|
+
|
223
|
+
new_options = opts.merge(
|
224
|
+
:operation => :get_pipeline,
|
225
|
+
:header_params => header_params,
|
226
|
+
:query_params => query_params,
|
227
|
+
:form_params => form_params,
|
228
|
+
:body => post_body,
|
229
|
+
:auth_names => auth_names,
|
230
|
+
:return_type => return_type,
|
231
|
+
:api_version => "V2"
|
232
|
+
)
|
233
|
+
|
234
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
235
|
+
if @api_client.config.debugging
|
236
|
+
@api_client.config.logger.debug "API called: ObservabilityPipelinesAPI#get_pipeline\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
237
|
+
end
|
238
|
+
return data, status_code, headers
|
239
|
+
end
|
240
|
+
|
241
|
+
# Update a pipeline.
|
242
|
+
#
|
243
|
+
# @see #update_pipeline_with_http_info
|
244
|
+
def update_pipeline(pipeline_id, body, opts = {})
|
245
|
+
data, _status_code, _headers = update_pipeline_with_http_info(pipeline_id, body, opts)
|
246
|
+
data
|
247
|
+
end
|
248
|
+
|
249
|
+
# Update a pipeline.
|
250
|
+
#
|
251
|
+
# Update a pipeline.
|
252
|
+
#
|
253
|
+
# @param pipeline_id [String] The ID of the pipeline to update.
|
254
|
+
# @param body [ObservabilityPipeline]
|
255
|
+
# @param opts [Hash] the optional parameters
|
256
|
+
# @return [Array<(ObservabilityPipeline, Integer, Hash)>] ObservabilityPipeline data, response status code and response headers
|
257
|
+
def update_pipeline_with_http_info(pipeline_id, body, opts = {})
|
258
|
+
unstable_enabled = @api_client.config.unstable_operations["v2.update_pipeline".to_sym]
|
259
|
+
if unstable_enabled
|
260
|
+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_pipeline")
|
261
|
+
else
|
262
|
+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_pipeline"))
|
263
|
+
end
|
264
|
+
|
265
|
+
if @api_client.config.debugging
|
266
|
+
@api_client.config.logger.debug 'Calling API: ObservabilityPipelinesAPI.update_pipeline ...'
|
267
|
+
end
|
268
|
+
# verify the required parameter 'pipeline_id' is set
|
269
|
+
if @api_client.config.client_side_validation && pipeline_id.nil?
|
270
|
+
fail ArgumentError, "Missing the required parameter 'pipeline_id' when calling ObservabilityPipelinesAPI.update_pipeline"
|
271
|
+
end
|
272
|
+
# verify the required parameter 'body' is set
|
273
|
+
if @api_client.config.client_side_validation && body.nil?
|
274
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling ObservabilityPipelinesAPI.update_pipeline"
|
275
|
+
end
|
276
|
+
# resource path
|
277
|
+
local_var_path = '/api/v2/remote_config/products/obs_pipelines/pipelines/{pipeline_id}'.sub('{pipeline_id}', CGI.escape(pipeline_id.to_s).gsub('%2F', '/'))
|
278
|
+
|
279
|
+
# query parameters
|
280
|
+
query_params = opts[:query_params] || {}
|
281
|
+
|
282
|
+
# header parameters
|
283
|
+
header_params = opts[:header_params] || {}
|
284
|
+
# HTTP header 'Accept' (if needed)
|
285
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
286
|
+
# HTTP header 'Content-Type'
|
287
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
288
|
+
|
289
|
+
# form parameters
|
290
|
+
form_params = opts[:form_params] || {}
|
291
|
+
|
292
|
+
# http body (model)
|
293
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
294
|
+
|
295
|
+
# return_type
|
296
|
+
return_type = opts[:debug_return_type] || 'ObservabilityPipeline'
|
297
|
+
|
298
|
+
# auth_names
|
299
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
|
300
|
+
|
301
|
+
new_options = opts.merge(
|
302
|
+
:operation => :update_pipeline,
|
303
|
+
:header_params => header_params,
|
304
|
+
:query_params => query_params,
|
305
|
+
:form_params => form_params,
|
306
|
+
:body => post_body,
|
307
|
+
:auth_names => auth_names,
|
308
|
+
:return_type => return_type,
|
309
|
+
:api_version => "V2"
|
310
|
+
)
|
311
|
+
|
312
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Put, local_var_path, new_options)
|
313
|
+
if @api_client.config.debugging
|
314
|
+
@api_client.config.logger.debug "API called: ObservabilityPipelinesAPI#update_pipeline\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
315
|
+
end
|
316
|
+
return data, status_code, headers
|
317
|
+
end
|
318
|
+
end
|
319
|
+
end
|
@@ -0,0 +1,301 @@
|
|
1
|
+
=begin
|
2
|
+
#Datadog API V2 Collection
|
3
|
+
|
4
|
+
#Collection of all Datadog Public endpoints.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: support@datadoghq.com
|
8
|
+
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
|
9
|
+
|
10
|
+
Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
|
11
|
+
This product includes software developed at Datadog (https://www.datadoghq.com/).
|
12
|
+
Copyright 2020-Present Datadog, Inc.
|
13
|
+
|
14
|
+
=end
|
15
|
+
|
16
|
+
require 'cgi'
|
17
|
+
|
18
|
+
module DatadogAPIClient::V2
|
19
|
+
class OnCallAPI
|
20
|
+
attr_accessor :api_client
|
21
|
+
|
22
|
+
def initialize(api_client = DatadogAPIClient::APIClient.default)
|
23
|
+
@api_client = api_client
|
24
|
+
end
|
25
|
+
|
26
|
+
# Create on-call schedule.
|
27
|
+
#
|
28
|
+
# @see #create_on_call_schedule_with_http_info
|
29
|
+
def create_on_call_schedule(body, opts = {})
|
30
|
+
data, _status_code, _headers = create_on_call_schedule_with_http_info(body, opts)
|
31
|
+
data
|
32
|
+
end
|
33
|
+
|
34
|
+
# Create on-call schedule.
|
35
|
+
#
|
36
|
+
# Create a new on-call schedule
|
37
|
+
#
|
38
|
+
# @param body [ScheduleCreateRequest]
|
39
|
+
# @param opts [Hash] the optional parameters
|
40
|
+
# @option opts [String] :include Comma-separated list of included relationships to be returned. Allowed values: `teams`, `layers`, `layers.members`, `layers.members.user`.
|
41
|
+
# @return [Array<(Schedule, Integer, Hash)>] Schedule data, response status code and response headers
|
42
|
+
def create_on_call_schedule_with_http_info(body, opts = {})
|
43
|
+
|
44
|
+
if @api_client.config.debugging
|
45
|
+
@api_client.config.logger.debug 'Calling API: OnCallAPI.create_on_call_schedule ...'
|
46
|
+
end
|
47
|
+
# verify the required parameter 'body' is set
|
48
|
+
if @api_client.config.client_side_validation && body.nil?
|
49
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling OnCallAPI.create_on_call_schedule"
|
50
|
+
end
|
51
|
+
# resource path
|
52
|
+
local_var_path = '/api/v2/on-call/schedules'
|
53
|
+
|
54
|
+
# query parameters
|
55
|
+
query_params = opts[:query_params] || {}
|
56
|
+
query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil?
|
57
|
+
|
58
|
+
# header parameters
|
59
|
+
header_params = opts[:header_params] || {}
|
60
|
+
# HTTP header 'Accept' (if needed)
|
61
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
62
|
+
# HTTP header 'Content-Type'
|
63
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
64
|
+
|
65
|
+
# form parameters
|
66
|
+
form_params = opts[:form_params] || {}
|
67
|
+
|
68
|
+
# http body (model)
|
69
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
70
|
+
|
71
|
+
# return_type
|
72
|
+
return_type = opts[:debug_return_type] || 'Schedule'
|
73
|
+
|
74
|
+
# auth_names
|
75
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
76
|
+
|
77
|
+
new_options = opts.merge(
|
78
|
+
:operation => :create_on_call_schedule,
|
79
|
+
:header_params => header_params,
|
80
|
+
:query_params => query_params,
|
81
|
+
:form_params => form_params,
|
82
|
+
:body => post_body,
|
83
|
+
:auth_names => auth_names,
|
84
|
+
:return_type => return_type,
|
85
|
+
:api_version => "V2"
|
86
|
+
)
|
87
|
+
|
88
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
|
89
|
+
if @api_client.config.debugging
|
90
|
+
@api_client.config.logger.debug "API called: OnCallAPI#create_on_call_schedule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
91
|
+
end
|
92
|
+
return data, status_code, headers
|
93
|
+
end
|
94
|
+
|
95
|
+
# Delete on-call schedule.
|
96
|
+
#
|
97
|
+
# @see #delete_on_call_schedule_with_http_info
|
98
|
+
def delete_on_call_schedule(schedule_id, opts = {})
|
99
|
+
delete_on_call_schedule_with_http_info(schedule_id, opts)
|
100
|
+
nil
|
101
|
+
end
|
102
|
+
|
103
|
+
# Delete on-call schedule.
|
104
|
+
#
|
105
|
+
# Delete an on-call schedule
|
106
|
+
#
|
107
|
+
# @param schedule_id [String] The ID of the schedule
|
108
|
+
# @param opts [Hash] the optional parameters
|
109
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
110
|
+
def delete_on_call_schedule_with_http_info(schedule_id, opts = {})
|
111
|
+
|
112
|
+
if @api_client.config.debugging
|
113
|
+
@api_client.config.logger.debug 'Calling API: OnCallAPI.delete_on_call_schedule ...'
|
114
|
+
end
|
115
|
+
# verify the required parameter 'schedule_id' is set
|
116
|
+
if @api_client.config.client_side_validation && schedule_id.nil?
|
117
|
+
fail ArgumentError, "Missing the required parameter 'schedule_id' when calling OnCallAPI.delete_on_call_schedule"
|
118
|
+
end
|
119
|
+
# resource path
|
120
|
+
local_var_path = '/api/v2/on-call/schedules/{schedule_id}'.sub('{schedule_id}', CGI.escape(schedule_id.to_s).gsub('%2F', '/'))
|
121
|
+
|
122
|
+
# query parameters
|
123
|
+
query_params = opts[:query_params] || {}
|
124
|
+
|
125
|
+
# header parameters
|
126
|
+
header_params = opts[:header_params] || {}
|
127
|
+
# HTTP header 'Accept' (if needed)
|
128
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
129
|
+
|
130
|
+
# form parameters
|
131
|
+
form_params = opts[:form_params] || {}
|
132
|
+
|
133
|
+
# http body (model)
|
134
|
+
post_body = opts[:debug_body]
|
135
|
+
|
136
|
+
# return_type
|
137
|
+
return_type = opts[:debug_return_type]
|
138
|
+
|
139
|
+
# auth_names
|
140
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
141
|
+
|
142
|
+
new_options = opts.merge(
|
143
|
+
:operation => :delete_on_call_schedule,
|
144
|
+
:header_params => header_params,
|
145
|
+
:query_params => query_params,
|
146
|
+
:form_params => form_params,
|
147
|
+
:body => post_body,
|
148
|
+
:auth_names => auth_names,
|
149
|
+
:return_type => return_type,
|
150
|
+
:api_version => "V2"
|
151
|
+
)
|
152
|
+
|
153
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
|
154
|
+
if @api_client.config.debugging
|
155
|
+
@api_client.config.logger.debug "API called: OnCallAPI#delete_on_call_schedule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
156
|
+
end
|
157
|
+
return data, status_code, headers
|
158
|
+
end
|
159
|
+
|
160
|
+
# Get on-call schedule.
|
161
|
+
#
|
162
|
+
# @see #get_on_call_schedule_with_http_info
|
163
|
+
def get_on_call_schedule(schedule_id, opts = {})
|
164
|
+
data, _status_code, _headers = get_on_call_schedule_with_http_info(schedule_id, opts)
|
165
|
+
data
|
166
|
+
end
|
167
|
+
|
168
|
+
# Get on-call schedule.
|
169
|
+
#
|
170
|
+
# Get an on-call schedule
|
171
|
+
#
|
172
|
+
# @param schedule_id [String] The ID of the schedule
|
173
|
+
# @param opts [Hash] the optional parameters
|
174
|
+
# @option opts [String] :include Comma-separated list of included relationships to be returned. Allowed values: `teams`, `layers`, `layers.members`, `layers.members.user`.
|
175
|
+
# @return [Array<(Schedule, Integer, Hash)>] Schedule data, response status code and response headers
|
176
|
+
def get_on_call_schedule_with_http_info(schedule_id, opts = {})
|
177
|
+
|
178
|
+
if @api_client.config.debugging
|
179
|
+
@api_client.config.logger.debug 'Calling API: OnCallAPI.get_on_call_schedule ...'
|
180
|
+
end
|
181
|
+
# verify the required parameter 'schedule_id' is set
|
182
|
+
if @api_client.config.client_side_validation && schedule_id.nil?
|
183
|
+
fail ArgumentError, "Missing the required parameter 'schedule_id' when calling OnCallAPI.get_on_call_schedule"
|
184
|
+
end
|
185
|
+
# resource path
|
186
|
+
local_var_path = '/api/v2/on-call/schedules/{schedule_id}'.sub('{schedule_id}', CGI.escape(schedule_id.to_s).gsub('%2F', '/'))
|
187
|
+
|
188
|
+
# query parameters
|
189
|
+
query_params = opts[:query_params] || {}
|
190
|
+
query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil?
|
191
|
+
|
192
|
+
# header parameters
|
193
|
+
header_params = opts[:header_params] || {}
|
194
|
+
# HTTP header 'Accept' (if needed)
|
195
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
196
|
+
|
197
|
+
# form parameters
|
198
|
+
form_params = opts[:form_params] || {}
|
199
|
+
|
200
|
+
# http body (model)
|
201
|
+
post_body = opts[:debug_body]
|
202
|
+
|
203
|
+
# return_type
|
204
|
+
return_type = opts[:debug_return_type] || 'Schedule'
|
205
|
+
|
206
|
+
# auth_names
|
207
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
208
|
+
|
209
|
+
new_options = opts.merge(
|
210
|
+
:operation => :get_on_call_schedule,
|
211
|
+
:header_params => header_params,
|
212
|
+
:query_params => query_params,
|
213
|
+
:form_params => form_params,
|
214
|
+
:body => post_body,
|
215
|
+
:auth_names => auth_names,
|
216
|
+
:return_type => return_type,
|
217
|
+
:api_version => "V2"
|
218
|
+
)
|
219
|
+
|
220
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
|
221
|
+
if @api_client.config.debugging
|
222
|
+
@api_client.config.logger.debug "API called: OnCallAPI#get_on_call_schedule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
223
|
+
end
|
224
|
+
return data, status_code, headers
|
225
|
+
end
|
226
|
+
|
227
|
+
# Update on-call schedule.
|
228
|
+
#
|
229
|
+
# @see #update_on_call_schedule_with_http_info
|
230
|
+
def update_on_call_schedule(schedule_id, body, opts = {})
|
231
|
+
data, _status_code, _headers = update_on_call_schedule_with_http_info(schedule_id, body, opts)
|
232
|
+
data
|
233
|
+
end
|
234
|
+
|
235
|
+
# Update on-call schedule.
|
236
|
+
#
|
237
|
+
# Update a new on-call schedule
|
238
|
+
#
|
239
|
+
# @param schedule_id [String] The ID of the schedule
|
240
|
+
# @param body [ScheduleUpdateRequest]
|
241
|
+
# @param opts [Hash] the optional parameters
|
242
|
+
# @option opts [String] :include Comma-separated list of included relationships to be returned. Allowed values: `teams`, `layers`, `layers.members`, `layers.members.user`.
|
243
|
+
# @return [Array<(Schedule, Integer, Hash)>] Schedule data, response status code and response headers
|
244
|
+
def update_on_call_schedule_with_http_info(schedule_id, body, opts = {})
|
245
|
+
|
246
|
+
if @api_client.config.debugging
|
247
|
+
@api_client.config.logger.debug 'Calling API: OnCallAPI.update_on_call_schedule ...'
|
248
|
+
end
|
249
|
+
# verify the required parameter 'schedule_id' is set
|
250
|
+
if @api_client.config.client_side_validation && schedule_id.nil?
|
251
|
+
fail ArgumentError, "Missing the required parameter 'schedule_id' when calling OnCallAPI.update_on_call_schedule"
|
252
|
+
end
|
253
|
+
# verify the required parameter 'body' is set
|
254
|
+
if @api_client.config.client_side_validation && body.nil?
|
255
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling OnCallAPI.update_on_call_schedule"
|
256
|
+
end
|
257
|
+
# resource path
|
258
|
+
local_var_path = '/api/v2/on-call/schedules/{schedule_id}'.sub('{schedule_id}', CGI.escape(schedule_id.to_s).gsub('%2F', '/'))
|
259
|
+
|
260
|
+
# query parameters
|
261
|
+
query_params = opts[:query_params] || {}
|
262
|
+
query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil?
|
263
|
+
|
264
|
+
# header parameters
|
265
|
+
header_params = opts[:header_params] || {}
|
266
|
+
# HTTP header 'Accept' (if needed)
|
267
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
268
|
+
# HTTP header 'Content-Type'
|
269
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
270
|
+
|
271
|
+
# form parameters
|
272
|
+
form_params = opts[:form_params] || {}
|
273
|
+
|
274
|
+
# http body (model)
|
275
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
276
|
+
|
277
|
+
# return_type
|
278
|
+
return_type = opts[:debug_return_type] || 'Schedule'
|
279
|
+
|
280
|
+
# auth_names
|
281
|
+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
|
282
|
+
|
283
|
+
new_options = opts.merge(
|
284
|
+
:operation => :update_on_call_schedule,
|
285
|
+
:header_params => header_params,
|
286
|
+
:query_params => query_params,
|
287
|
+
:form_params => form_params,
|
288
|
+
:body => post_body,
|
289
|
+
:auth_names => auth_names,
|
290
|
+
:return_type => return_type,
|
291
|
+
:api_version => "V2"
|
292
|
+
)
|
293
|
+
|
294
|
+
data, status_code, headers = @api_client.call_api(Net::HTTP::Put, local_var_path, new_options)
|
295
|
+
if @api_client.config.debugging
|
296
|
+
@api_client.config.logger.debug "API called: OnCallAPI#update_on_call_schedule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
297
|
+
end
|
298
|
+
return data, status_code, headers
|
299
|
+
end
|
300
|
+
end
|
301
|
+
end
|
@@ -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`, `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-webhook`, `notebook`, `reference-table`, `security-rule`, `slo`, `workflow`, `app-builder-app`, `connection`, `connection-group`.
|
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`, `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-webhook`, `notebook`, `reference-table`, `security-rule`, `slo`, `workflow`, `app-builder-app`, `connection`, `connection-group`.
|
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 = {})
|
@@ -168,6 +168,8 @@ module DatadogAPIClient::V2
|
|
168
168
|
# #### Supported resources
|
169
169
|
# Restriction policies can be applied to the following resources:
|
170
170
|
# - Dashboards: `dashboard`
|
171
|
+
# - Integration Accounts: `integration-account`
|
172
|
+
# - Integration Webhooks: `integration-webhook`
|
171
173
|
# - Notebooks: `notebook`
|
172
174
|
# - Powerpacks: `powerpack`
|
173
175
|
# - Reference Tables: `reference-table`
|
@@ -186,6 +188,8 @@ module DatadogAPIClient::V2
|
|
186
188
|
# Resource Type | Supported Relations
|
187
189
|
# ----------------------------|--------------------------
|
188
190
|
# Dashboards | `viewer`, `editor`
|
191
|
+
# Integration Accounts | `viewer`, `editor`
|
192
|
+
# Integration Webhooks | `viewer`, `editor`
|
189
193
|
# Notebooks | `viewer`, `editor`
|
190
194
|
# Powerpacks | `viewer`, `editor`
|
191
195
|
# Security Rules | `viewer`, `editor`
|
@@ -200,7 +204,7 @@ module DatadogAPIClient::V2
|
|
200
204
|
# Connections | `viewer`, `resolver`, `editor`
|
201
205
|
# Connection Groups | `viewer`, `editor`
|
202
206
|
#
|
203
|
-
# @param resource_id [String] Identifier, formatted as `type:id`. Supported types: `connection`, `dashboard`, `notebook`, `reference-table`, `security-rule`, `slo`, `workflow`, `app-builder-app`, `connection`, `connection-group`.
|
207
|
+
# @param resource_id [String] Identifier, formatted as `type:id`. Supported types: `connection`, `dashboard`, `integration-account`, `integration-webhook`, `notebook`, `reference-table`, `security-rule`, `slo`, `workflow`, `app-builder-app`, `connection`, `connection-group`.
|
204
208
|
# @param body [RestrictionPolicyUpdateRequest] Restriction policy payload
|
205
209
|
# @param opts [Hash] the optional parameters
|
206
210
|
# @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.
|
@@ -17,7 +17,7 @@ require 'date'
|
|
17
17
|
require 'time'
|
18
18
|
|
19
19
|
module DatadogAPIClient::V2
|
20
|
-
# Trigger a workflow
|
20
|
+
# Trigger a workflow from an API request. The workflow must be published.
|
21
21
|
class APITrigger
|
22
22
|
include BaseGenericModel
|
23
23
|
|
@@ -21,7 +21,7 @@ module DatadogAPIClient::V2
|
|
21
21
|
class APITriggerWrapper
|
22
22
|
include BaseGenericModel
|
23
23
|
|
24
|
-
# Trigger a workflow
|
24
|
+
# Trigger a workflow from an API request. The workflow must be published.
|
25
25
|
attr_reader :api_trigger
|
26
26
|
|
27
27
|
# A list of steps that run first after a trigger fires.
|