Sha256: d56dba3fe80e3c71a966b164a0a295f89b0c83f9c794006ec2fecaa9272b17cc

Contents?: true

Size: 707 Bytes

Versions: 1

Compression:

Stored size: 707 Bytes

Contents

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::TagsAPI.new
host_name = "host_name_example" # String | This endpoint allows you to add new tags to a host, optionally specifying where the tags came from.
body = DatadogAPIClient::V1::HostTags.new # HostTags | Update host tags request body.
opts = {
  source: "chef", # String | The source of the tags. [Complete list of source attribute values](https://docs.datadoghq.com/integrations/faq/list-of-api-source-attribute-value).
}

begin
  # Add tags to a host
  result = api_instance.create_host_tags(host_name, body, opts)
  p result
rescue DatadogAPIClient::V1::APIError => e
  puts "Error when calling TagsAPI->create_host_tags: #{e}"
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
datadog_api_client-1.7.0 examples/generated/v1/tags/CreateHostTags.rb