Sha256: 97408c91ee7da76fab89c8b7ed96e6e151125434fbf3c9a3b154478fb89bf21a

Contents?: true

Size: 707 Bytes

Versions: 9

Compression:

Stored size: 707 Bytes

Contents

# Update Cloudflare account returns "OK" response

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

# there is a valid "cloudflare_account" in the system
CLOUDFLARE_ACCOUNT_DATA_ID = ENV["CLOUDFLARE_ACCOUNT_DATA_ID"]

body = DatadogAPIClient::V2::CloudflareAccountUpdateRequest.new({
  data: DatadogAPIClient::V2::CloudflareAccountUpdateRequestData.new({
    attributes: DatadogAPIClient::V2::CloudflareAccountUpdateRequestAttributes.new({
      api_key: "fakekey",
      email: "new@email",
    }),
    type: DatadogAPIClient::V2::CloudflareAccountType::CLOUDFLARE_ACCOUNTS,
  }),
})
p api_instance.update_cloudflare_account(CLOUDFLARE_ACCOUNT_DATA_ID, body)

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
datadog_api_client-2.18.0 examples/v2/cloudflare-integration/UpdateCloudflareAccount.rb
datadog_api_client-2.17.0 examples/v2/cloudflare-integration/UpdateCloudflareAccount.rb
datadog_api_client-2.16.0 examples/v2/cloudflare-integration/UpdateCloudflareAccount.rb
datadog_api_client-2.15.0 examples/v2/cloudflare-integration/UpdateCloudflareAccount.rb
datadog_api_client-2.14.0 examples/v2/cloudflare-integration/UpdateCloudflareAccount.rb
datadog_api_client-2.13.0 examples/v2/cloudflare-integration/UpdateCloudflareAccount.rb
datadog_api_client-2.12.0 examples/v2/cloudflare-integration/UpdateCloudflareAccount.rb
datadog_api_client-2.11.0 examples/v2/cloudflare-integration/UpdateCloudflareAccount.rb
datadog_api_client-2.10.0 examples/v2/cloudflare-integration/UpdateCloudflareAccount.rb