Sha256: af7b9285aba6a6d0f2684e10256ae002f664d2519813c141a655fb9274e219a7

Contents?: true

Size: 924 Bytes

Versions: 33

Compression:

Stored size: 924 Bytes

Contents

# Update a single service object returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::OpsgenieIntegrationAPI.new

# there is a valid "opsgenie_service" in the system
OPSGENIE_SERVICE_DATA_ATTRIBUTES_NAME = ENV["OPSGENIE_SERVICE_DATA_ATTRIBUTES_NAME"]
OPSGENIE_SERVICE_DATA_ID = ENV["OPSGENIE_SERVICE_DATA_ID"]

body = DatadogAPIClient::V2::OpsgenieServiceUpdateRequest.new({
  data: DatadogAPIClient::V2::OpsgenieServiceUpdateData.new({
    attributes: DatadogAPIClient::V2::OpsgenieServiceUpdateAttributes.new({
      name: "fake-opsgenie-service-name--updated",
      opsgenie_api_key: "00000000-0000-0000-0000-000000000000",
      region: DatadogAPIClient::V2::OpsgenieServiceRegionType::EU,
    }),
    id: OPSGENIE_SERVICE_DATA_ID,
    type: DatadogAPIClient::V2::OpsgenieServiceType::OPSGENIE_SERVICE,
  }),
})
p api_instance.update_opsgenie_service(OPSGENIE_SERVICE_DATA_ID, body)

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
datadog_api_client-2.29.1 examples/v2/opsgenie-integration/UpdateOpsgenieService.rb
datadog_api_client-2.28.1 examples/v2/opsgenie-integration/UpdateOpsgenieService.rb
datadog_api_client-2.27.1 examples/v2/opsgenie-integration/UpdateOpsgenieService.rb
datadog_api_client-2.26.1 examples/v2/opsgenie-integration/UpdateOpsgenieService.rb
datadog_api_client-2.26.0 examples/v2/opsgenie-integration/UpdateOpsgenieService.rb
datadog_api_client-2.25.0 examples/v2/opsgenie-integration/UpdateOpsgenieService.rb
datadog_api_client-2.24.0 examples/v2/opsgenie-integration/UpdateOpsgenieService.rb
datadog_api_client-2.22.0 examples/v2/opsgenie-integration/UpdateOpsgenieService.rb
datadog_api_client-2.21.0 examples/v2/opsgenie-integration/UpdateOpsgenieService.rb
datadog_api_client-2.20.0 examples/v2/opsgenie-integration/UpdateOpsgenieService.rb
datadog_api_client-2.19.0 examples/v2/opsgenie-integration/UpdateOpsgenieService.rb
datadog_api_client-2.18.0 examples/v2/opsgenie-integration/UpdateOpsgenieService.rb
datadog_api_client-2.17.0 examples/v2/opsgenie-integration/UpdateOpsgenieService.rb
datadog_api_client-2.16.0 examples/v2/opsgenie-integration/UpdateOpsgenieService.rb
datadog_api_client-2.15.0 examples/v2/opsgenie-integration/UpdateOpsgenieService.rb
datadog_api_client-2.14.0 examples/v2/opsgenie-integration/UpdateOpsgenieService.rb
datadog_api_client-2.13.0 examples/v2/opsgenie-integration/UpdateOpsgenieService.rb
datadog_api_client-2.12.0 examples/v2/opsgenie-integration/UpdateOpsgenieService.rb
datadog_api_client-2.11.0 examples/v2/opsgenie-integration/UpdateOpsgenieService.rb
datadog_api_client-2.10.0 examples/v2/opsgenie-integration/UpdateOpsgenieService.rb