Sha256: 30eabc7ebc8376dc285d6b978f7e4a65f7c21434edb9f2d09506d7f42d9b039c

Contents?: true

Size: 801 Bytes

Versions: 7

Compression:

Stored size: 801 Bytes

Contents

# Add resource to Confluent account returns "OK" response

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

# there is a valid "confluent_account" in the system
CONFLUENT_ACCOUNT_DATA_ID = ENV["CONFLUENT_ACCOUNT_DATA_ID"]

body = DatadogAPIClient::V2::ConfluentResourceRequest.new({
  data: DatadogAPIClient::V2::ConfluentResourceRequestData.new({
    attributes: DatadogAPIClient::V2::ConfluentResourceRequestAttributes.new({
      resource_type: "kafka",
      tags: [
        "myTag",
        "myTag2:myValue",
      ],
    }),
    id: "exampleaddresourcetoconfluentaccountreturnsokresponse",
    type: DatadogAPIClient::V2::ConfluentResourceType::CONFLUENT_CLOUD_RESOURCES,
  }),
})
p api_instance.create_confluent_resource(CONFLUENT_ACCOUNT_DATA_ID, body)

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
datadog_api_client-2.9.0 examples/v2/confluent-cloud/CreateConfluentResource.rb
datadog_api_client-2.8.0 examples/v2/confluent-cloud/CreateConfluentResource.rb
datadog_api_client-2.7.0 examples/v2/confluent-cloud/CreateConfluentResource.rb
datadog_api_client-2.6.0 examples/v2/confluent-cloud/CreateConfluentResource.rb
datadog_api_client-2.5.0 examples/v2/confluent-cloud/CreateConfluentResource.rb
datadog_api_client-2.4.0 examples/v2/confluent-cloud/CreateConfluentResource.rb
datadog_api_client-2.3.0 examples/v2/confluent-cloud/CreateConfluentResource.rb