Sha256: 890348351f18dfbc581aa97dd4dcf7ff97edd7ae0f92cc564db951399ca5b68a

Contents?: true

Size: 760 Bytes

Versions: 10

Compression:

Stored size: 760 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: "dev@datadoghq.com",
      zones: [
        "zone-id-3",
      ],
    }),
    type: DatadogAPIClient::V2::CloudflareAccountType::CLOUDFLARE_ACCOUNTS,
  }),
})
p api_instance.update_cloudflare_account(CLOUDFLARE_ACCOUNT_DATA_ID, body)

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
datadog_api_client-2.28.1 examples/v2/cloudflare-integration/UpdateCloudflareAccount.rb
datadog_api_client-2.27.1 examples/v2/cloudflare-integration/UpdateCloudflareAccount.rb
datadog_api_client-2.26.1 examples/v2/cloudflare-integration/UpdateCloudflareAccount.rb
datadog_api_client-2.26.0 examples/v2/cloudflare-integration/UpdateCloudflareAccount.rb
datadog_api_client-2.25.0 examples/v2/cloudflare-integration/UpdateCloudflareAccount.rb
datadog_api_client-2.24.0 examples/v2/cloudflare-integration/UpdateCloudflareAccount.rb
datadog_api_client-2.22.0 examples/v2/cloudflare-integration/UpdateCloudflareAccount.rb
datadog_api_client-2.21.0 examples/v2/cloudflare-integration/UpdateCloudflareAccount.rb
datadog_api_client-2.20.0 examples/v2/cloudflare-integration/UpdateCloudflareAccount.rb
datadog_api_client-2.19.0 examples/v2/cloudflare-integration/UpdateCloudflareAccount.rb