Sha256: b77aa516abe7281107a75dc8525452c268703e312c28512d9c191ced94d9a0a2

Contents?: true

Size: 661 Bytes

Versions: 3

Compression:

Stored size: 661 Bytes

Contents

# Add Cloudflare account returns "CREATED" response

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

body = DatadogAPIClient::V2::CloudflareAccountCreateRequest.new({
  data: DatadogAPIClient::V2::CloudflareAccountCreateRequestData.new({
    attributes: DatadogAPIClient::V2::CloudflareAccountCreateRequestAttributes.new({
      api_key: "6Zm7WEgKzAlCnt_4exfEK0mSoeHHAaDf41O1AAfu",
      email: "new@email",
      name: "exampleaddcloudflareaccountreturnscreatedresponse",
    }),
    type: DatadogAPIClient::V2::CloudflareAccountType::CLOUDFLARE_ACCOUNTS,
  }),
})
p api_instance.create_cloudflare_account(body)

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
datadog_api_client-2.9.0 examples/v2/cloudflare-integration/CreateCloudflareAccount.rb
datadog_api_client-2.8.0 examples/v2/cloudflare-integration/CreateCloudflareAccount.rb
datadog_api_client-2.7.0 examples/v2/cloudflare-integration/CreateCloudflareAccount.rb