lib/oci/identity/identity_client.rb
# Updates the specified tag definition.
#
# Setting a 'validator' will enable enforcement of additional validation on values contained in the specified for
# this definedTag. Any values that were previously set will not be changed, but any new value set for the
# definedTag must pass validation.
#
# @param [String] tag_namespace_id The OCID of the tag namespace.
#
# @param [String] tag_name The name of the tag.
#
# @param [OCI::Identity::Models::UpdateTagDetails] update_tag_details Request object for updating a tag.
# @param [Hash] opts the optional parameters
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
#   retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
#   parameter to the value of the etag from a previous GET or POST response for that resource.  The resource
#   will be updated or deleted only if the etag you provide matches the resource's current etag value.
#
# @return [Response] A Response object with data of type {OCI::Identity::Models::Tag Tag}
Updates the specified tag definition.
Setting a 'validator' will enable enforcement of additional validation on values contained in the specified for
this definedTag. Any values that were previously set will not be changed, but any new value set for the
definedTag must pass validation.
Updates the specified tag definition . Setting a ' validator ' will enable enforcement of additional validation on values contained in the specified for this definedTag . Any values that were previously set will not be changed but any new value set for the definedTag must pass validation .
def update_tag(tag_namespace_id, tag_name, update_tag_details, opts = {})
      logger.debug 'Calling operation IdentityClient#update_tag.' if logger
      raise "Missing the required parameter 'tag_namespace_id' when calling update_tag." if tag_namespace_id.nil?
      raise "Missing the required parameter 'tag_name' when calling update_tag." if tag_name.nil?
      raise "Missing the required parameter 'update_tag_details' when calling update_tag." if update_tag_details.nil?
      raise "Parameter value for 'tag_namespace_id' must not be blank" if OCI::Internal::Util.blank_string?(tag_namespace_id)
      raise "Parameter value for 'tag_name' must not be blank" if OCI::Internal::Util.blank_string?(tag_name)
      path = '/tagNamespaces/{tagNamespaceId}/tags/{tagName}'.sub('{tagNamespaceId}', tag_namespace_id.to_s).sub('{tagName}', tag_name.to_s)
      operation_signing_strategy = :standard
      query_params = {}
      header_params = {}
      header_params[:accept] = 'application/json'
      header_params[:'content-type'] = 'application/json'
      header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
      post_body = @api_client.object_to_http_body(update_tag_details)
      OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#update_tag') do
        @api_client.call_api(
          :PUT,
          path,
          endpoint,
          header_params: header_params,
          query_params: query_params,
          operation_signing_strategy: operation_signing_strategy,
          body: post_body,
          return_type: 'OCI::Identity::Models::Tag'
        )
      end
    end
def update_tag ( tag_namespace_id , tag_name , update_tag_details , opts = { } ) logger . debug 'Calling operation IdentityClient#update_tag.' if logger raise "Missing the required parameter 'tag_namespace_id' when calling update_tag." if tag_namespace_id . nil? raise "Missing the required parameter 'tag_name' when calling update_tag." if tag_name . nil? raise "Missing the required parameter 'update_tag_details' when calling update_tag." if update_tag_details . nil? raise "Parameter value for 'tag_namespace_id' must not be blank" if OCI :: Internal :: Util . blank_string? ( tag_namespace_id ) raise "Parameter value for 'tag_name' must not be blank" if OCI :: Internal :: Util . blank_string? ( tag_name ) path = '/tagNamespaces/{tagNamespaceId}/tags/{tagName}' . sub ( '{tagNamespaceId}' , tag_namespace_id . to_s ) . sub ( '{tagName}' , tag_name . to_s ) operation_signing_strategy = :standard query_params = { } header_params = { } header_params [ :accept ] = 'application/json' header_params [ :' content-type ' ] = 'application/json' header_params [ :' if-match ' ] = opts [ :if_match ] if opts [ :if_match ] post_body = @api_client . object_to_http_body ( update_tag_details ) OCI :: Retry . make_retrying_call ( applicable_retry_config ( opts ) , call_name : 'IdentityClient#update_tag' ) do @api_client . call_api ( :PUT , path , endpoint , header_params : header_params , query_params : query_params , operation_signing_strategy : operation_signing_strategy , body : post_body , return_type : 'OCI::Identity::Models::Tag' ) end end
Updates the specified tag definition.
Updates the specified tag definition .
# rubocop:disable Style/NegatedIf # Query Params # Header Params # rubocop:enable Style/NegatedIf # rubocop:disable Metrics/BlockLength # rubocop:enable Metrics/BlockLength
A Response object with data of type {OCI::Identity::Models::Tag Tag}
A Response object with data of type { OCI :: Identity :: Models :: Tag Tag }
Response
tag_namespace_id
<not_specific>
tag_name
<not_specific>
update_tag_details
<not_specific>
opts
:if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.
: if_match For optimistic concurrency control . In the PUT or DELETE call for a resource set the ` if - match ` parameter to the value of the etag from a previous GET or POST response for that resource . The resource will be updated or deleted only if the etag you provide matches the resource ' s current etag value .
<not_specific>
opts the optional parameters
opts the optional parameters