Sha256: 0ecd445a3064da780fc17ff19a99fe466b1da9d6a554e2b7facec8fefc07bac0

Contents?: true

Size: 793 Bytes

Versions: 7

Compression:

Stored size: 793 Bytes

Contents

# Update an existing incident service returns "OK" response

require "datadog_api_client"
DatadogAPIClient::V2.configure do |config|
  config.unstable_operations[:update_incident_service] = true
end
api_instance = DatadogAPIClient::V2::IncidentServicesAPI.new

# there is a valid "service" in the system
SERVICE_DATA_ATTRIBUTES_NAME = ENV["SERVICE_DATA_ATTRIBUTES_NAME"]
SERVICE_DATA_ID = ENV["SERVICE_DATA_ID"]

body = DatadogAPIClient::V2::IncidentServiceUpdateRequest.new({
  data: DatadogAPIClient::V2::IncidentServiceUpdateData.new({
    type: DatadogAPIClient::V2::IncidentServiceType::SERVICES,
    attributes: DatadogAPIClient::V2::IncidentServiceUpdateAttributes.new({
      name: "service name-updated",
    }),
  }),
})
p api_instance.update_incident_service(SERVICE_DATA_ID, body)

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
datadog_api_client-1.11.0 examples/v2/incident-services/UpdateIncidentService.rb
datadog_api_client-1.10.0 examples/v2/incident-services/UpdateIncidentService.rb
datadog_api_client-1.9.0 examples/v2/incident-services/UpdateIncidentService.rb
datadog_api_client-1.8.0 examples/v2/incident-services/UpdateIncidentService.rb
datadog_api_client-1.7.0 examples/v2/incident-services/UpdateIncidentService.rb
datadog_api_client-1.6.0 examples/v2/incident-services/UpdateIncidentService.rb
datadog_api_client-1.5.0 examples/v2/incident-services/UpdateIncidentService.rb