Sha256: af7b9285aba6a6d0f2684e10256ae002f664d2519813c141a655fb9274e219a7

Contents?: true

Size: 924 Bytes

Versions: 34

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

34 entries across 34 versions & 1 rubygems

Version Path
datadog_api_client-2.10.0 examples/v2/opsgenie-integration/UpdateOpsgenieService.rb
datadog_api_client-2.9.0 examples/v2/opsgenie-integration/UpdateOpsgenieService.rb
datadog_api_client-2.8.0 examples/v2/opsgenie-integration/UpdateOpsgenieService.rb
datadog_api_client-2.7.0 examples/v2/opsgenie-integration/UpdateOpsgenieService.rb
datadog_api_client-2.6.0 examples/v2/opsgenie-integration/UpdateOpsgenieService.rb
datadog_api_client-2.5.0 examples/v2/opsgenie-integration/UpdateOpsgenieService.rb
datadog_api_client-2.4.0 examples/v2/opsgenie-integration/UpdateOpsgenieService.rb
datadog_api_client-2.3.0 examples/v2/opsgenie-integration/UpdateOpsgenieService.rb
datadog_api_client-2.2.0 examples/v2/opsgenie-integration/UpdateOpsgenieService.rb
datadog_api_client-2.1.0 examples/v2/opsgenie-integration/UpdateOpsgenieService.rb
datadog_api_client-2.0.2 examples/v2/opsgenie-integration/UpdateOpsgenieService.rb
datadog_api_client-2.0.1 examples/v2/opsgenie-integration/UpdateOpsgenieService.rb
datadog_api_client-2.0.0 examples/v2/opsgenie-integration/UpdateOpsgenieService.rb
datadog_api_client-1.11.0 examples/v2/opsgenie-integration/UpdateOpsgenieService.rb