lib/oci/identity/identity_client.rb
# Creates a new tag namespace in the specified compartment.
#
# You must specify the compartment ID in the request object (remember that the tenancy is simply the root
# compartment).
#
# You must also specify a *name* for the namespace, which must be unique across all namespaces in your tenancy
# and cannot be changed. The name can contain any ASCII character except the space (_) or period (.).
# Names are case insensitive. That means, for example, \"myNamespace\" and \"mynamespace\" are not allowed
# in the same tenancy. Once you created a namespace, you cannot change the name.
# If you specify a name that's already in use in the tenancy, a 409 error is returned.
#
# You must also specify a *description* for the namespace.
# It does not have to be unique, and you can change it with
# {#update_tag_namespace update_tag_namespace}.
#
# @param [OCI::Identity::Models::CreateTagNamespaceDetails] create_tag_namespace_details Request object for creating a new 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] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or
#   server error without risk of executing that same action again. Retry tokens expire after 24
#   hours, but can be invalidated before then due to conflicting operations (e.g., if a resource
#   has been deleted and purged from the system, then a retry of the original creation request
#   may be rejected).
#
# @return [Response] A Response object with data of type {OCI::Identity::Models::TagNamespace TagNamespace}
Creates a new tag namespace in the specified compartment.
You must specify the compartment ID in the request object (remember that the tenancy is simply the root
compartment).

You must also specify a *name* for the namespace, which must be unique across all namespaces in your tenancy
and cannot be changed. The name can contain any ASCII character except the space (_) or period (.).
Names are case insensitive. That means, for example, \"myNamespace\" and \"mynamespace\" are not allowed
in the same tenancy. Once you created a namespace, you cannot change the name.
If you specify a name that's already in use in the tenancy, a 409 error is returned.

You must also specify a *description* for the namespace.
It does not have to be unique, and you can change it with
{#update_tag_namespace update_tag_namespace}.
Creates a new tag namespace in the specified compartment . You must specify the compartment ID in the request object ( remember that the tenancy is simply the root compartment ) . You must also specify a * name * for the namespace which must be unique across all namespaces in your tenancy and cannot be changed . The name can contain any ASCII character except the space ( _ ) or period ( . ) . Names are case insensitive . That means for example \ " myNamespace \ " and \ " mynamespace \ " are not allowed in the same tenancy . Once you created a namespace you cannot change the name . If you specify a name that ' s already in use in the tenancy a 409 error is returned . You must also specify a * description * for the namespace . It does not have to be unique and you can change it with { #update_tag_namespace update_tag_namespace } .
def create_tag_namespace(create_tag_namespace_details, opts = {})
      logger.debug 'Calling operation IdentityClient#create_tag_namespace.' if logger
      raise "Missing the required parameter 'create_tag_namespace_details' when calling create_tag_namespace." if create_tag_namespace_details.nil?
      path = '/tagNamespaces'
      operation_signing_strategy = :standard
      query_params = {}
      header_params = {}
      header_params[:accept] = 'application/json'
      header_params[:'content-type'] = 'application/json'
      header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
      header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
      post_body = @api_client.object_to_http_body(create_tag_namespace_details)
      OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'IdentityClient#create_tag_namespace') do
        @api_client.call_api(
          :POST,
          path,
          endpoint,
          header_params: header_params,
          query_params: query_params,
          operation_signing_strategy: operation_signing_strategy,
          body: post_body,
          return_type: 'OCI::Identity::Models::TagNamespace'
        )
      end
    end
def create_tag_namespace ( create_tag_namespace_details , opts = { } ) logger . debug 'Calling operation IdentityClient#create_tag_namespace.' if logger raise "Missing the required parameter 'create_tag_namespace_details' when calling create_tag_namespace." if create_tag_namespace_details . nil? path = '/tagNamespaces' operation_signing_strategy = :standard query_params = { } header_params = { } header_params [ :accept ] = 'application/json' header_params [ :' content-type ' ] = 'application/json' header_params [ :' opc-retry-token ' ] = opts [ :opc_retry_token ] if opts [ :opc_retry_token ] header_params [ :' opc-retry-token ' ] ||= OCI :: Retry . generate_opc_retry_token post_body = @api_client . object_to_http_body ( create_tag_namespace_details ) OCI :: Retry . make_retrying_call ( applicable_retry_config ( opts ) , call_name : 'IdentityClient#create_tag_namespace' ) do @api_client . call_api ( :POST , path , endpoint , header_params : header_params , query_params : query_params , operation_signing_strategy : operation_signing_strategy , body : post_body , return_type : 'OCI::Identity::Models::TagNamespace' ) end end
Creates a new tag namespace in the specified compartment.
Creates a new tag namespace in the specified compartment .
# 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::TagNamespace TagNamespace}
A Response object with data of type { OCI :: Identity :: Models :: TagNamespace TagNamespace }
Response
create_tag_namespace_details
<not_specific>
opts
:opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations .
: opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again . Retry tokens expire after 24 hours but can be invalidated before then due to conflicting operations .
<not_specific>
opts the optional parameters
opts the optional parameters