lib/oci/identity/identity_client.rb
# Lists the tag definitions in the specified tag namespace.
#
# @param [String] tag_namespace_id The OCID of the tag namespace.
#
# @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] :page The value of the `opc-next-page` response header from the previous \"List\" call.
#
# @option opts [Integer] :limit The maximum number of items to return in a paginated \"List\" call.
#    (default to 20)
# @option opts [String] :lifecycle_state A filter to only return resources that match the given lifecycle state.  The state value is case-insensitive.
#
# @return [Response] A Response object with data of type Array<{OCI::Identity::Models::TagSummary TagSummary}>
# @note Click [here](https://docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/identity/list_tags.rb.html) to see an example of how to use list_tags API.
Lists the tag definitions in the specified tag namespace.
Lists the tag definitions in the specified tag namespace .
def list_tags(tag_namespace_id, opts = {})
      logger.debug 'Calling operation IdentityClient#list_tags.' if logger
      raise "Missing the required parameter 'tag_namespace_id' when calling list_tags." if tag_namespace_id.nil?
      if opts[:lifecycle_state] && !OCI::Identity::Models::Tag::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
        raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Identity::Models::Tag::LIFECYCLE_STATE_ENUM.'
      end
      raise "Parameter value for 'tag_namespace_id' must not be blank" if OCI::Internal::Util.blank_string?(tag_namespace_id)
      path = '/tagNamespaces/{tagNamespaceId}/tags'.sub('{tagNamespaceId}', tag_namespace_id.to_s)
      operation_signing_strategy = :standard
      query_params = {}
      query_params[:page] = opts[:page] if opts[:page]
      query_params[:limit] = opts[:limit] if opts[:limit]
      query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
      header_params = {}
      header_params[:accept] = 'application/json'
      header_params[:'content-type'] = 'application/json'
      post_body = nil
      OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#list_tags') do
        @api_client.call_api(
          :GET,
          path,
          endpoint,
          header_params: header_params,
          query_params: query_params,
          operation_signing_strategy: operation_signing_strategy,
          body: post_body,
          return_type: 'Array<OCI::Identity::Models::TagSummary>'
        )
      end
    end
def list_tags ( tag_namespace_id , opts = { } ) logger . debug 'Calling operation IdentityClient#list_tags.' if logger raise "Missing the required parameter 'tag_namespace_id' when calling list_tags." if tag_namespace_id . nil? if opts [ :lifecycle_state ] && ! OCI :: Identity :: Models :: Tag :: LIFECYCLE_STATE_ENUM . include? ( opts [ :lifecycle_state ] ) raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Identity::Models::Tag::LIFECYCLE_STATE_ENUM.' end raise "Parameter value for 'tag_namespace_id' must not be blank" if OCI :: Internal :: Util . blank_string? ( tag_namespace_id ) path = '/tagNamespaces/{tagNamespaceId}/tags' . sub ( '{tagNamespaceId}' , tag_namespace_id . to_s ) operation_signing_strategy = :standard query_params = { } query_params [ :page ] = opts [ :page ] if opts [ :page ] query_params [ :limit ] = opts [ :limit ] if opts [ :limit ] query_params [ :lifecycleState ] = opts [ :lifecycle_state ] if opts [ :lifecycle_state ] header_params = { } header_params [ :accept ] = 'application/json' header_params [ :' content-type ' ] = 'application/json' post_body = nil OCI :: Retry . make_retrying_call ( applicable_retry_config ( opts ) , call_name : 'IdentityClient#list_tags' ) do @api_client . call_api ( :GET , path , endpoint , header_params : header_params , query_params : query_params , operation_signing_strategy : operation_signing_strategy , body : post_body , return_type : 'Array<OCI::Identity::Models::TagSummary>' ) end end
Lists the tag definitions in the specified tag namespace.
Lists the tag definitions in the specified tag namespace .
# 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 Array<{OCI::Identity::Models::TagSummary TagSummary}>
A Response object with data of type Array< { OCI :: Identity :: Models :: TagSummary TagSummary } >
Response
tag_namespace_id
<not_specific>
opts
:lifecycle_state A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
: lifecycle_state A filter to only return resources that match the given lifecycle state . The state value is case - insensitive .
<not_specific>
opts the optional parameters
opts the optional parameters
note
Click [here] to see an example of how to use list_tags API.
Click [ here ] to see an example of how to use list_tags API .