Method: Aws::Drs::Client#tag_resource

Defined in:
lib/aws-sdk-drs/client.rb

#tag_resource(params = {}) ⇒ Struct

Adds or overwrites only the specified tags for the specified Elastic Disaster Recovery resource or resources. When you specify an existing tag key, the value is overwritten with the new value. Each resource can have a maximum of 50 tags. Each tag consists of a key and optional value.

Examples:

Request syntax with placeholder values


resp = client.tag_resource({
  resource_arn: "ARN", # required
  tags: { # required
    "TagKey" => "TagValue",
  },
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    ARN of the resource for which tags are to be added or updated.

  • :tags (required, Hash<String,String>)

    Array of tags to be added or updated.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2951
2952
2953
2954
# File 'lib/aws-sdk-drs/client.rb', line 2951

def tag_resource(params = {}, options = {})
  req = build_request(:tag_resource, params)
  req.send_request(options)
end