CreateTagNamespace
post
/20160918/tagNamespaces
Create a new tag namespace in the specified compartment. Specify the tenancy OCID for the compartment OCID in the request.
Specify a name for the tag namespace, which must be unique across all tag namespaces in your tenancy and cannot be changed. The name can contain any ASCII character except the space character or period (.). Names are case insensitive. For example, "myNamespace" and "mynamespace" are not allowed in the same tenancy. If you specify a name that is already in use in the tenancy, a 409 error is returned.
Specify a description for the namespace. It does not need to be unique, and you can change it.
Request
Supported Media Types
- application/json
Header Parameters
-
opc-retry-token: string
Minimum Length:
1
Maximum Length:64
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 (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).
Request object for creating a new tag namespace.
Root Schema : CreateTagNamespaceDetails
Type:
Show Source
object
-
compartmentId(required):
string
The OCID of the tenancy containing the tag namespace.
-
definedTags:
object definedTags
Additional Properties Allowed: additionalPropertiesDefined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"Operations": {"CostCenter": "42"}}
-
description(required):
string
Minimum Length:
1
Maximum Length:400
The description you assign to the tag namespace during creation. -
freeformTags:
object freeformTags
Additional Properties Allowed: additionalPropertiesFree-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. Example: {"Department": "Finance"}
-
locks:
array locks
Maximum Number of Items:
1
Locks associated with this resource. -
name(required):
string
Minimum Length:
1
Maximum Length:100
The name you assign to the tag namespace during creation. It must be unique across all tag namespaces in the tenancy and cannot be changed.
Nested Schema : definedTags
Type:
object
Additional Properties Allowed
Show Source
-
object additionalProperties
Additional Properties Allowed: additionalPropertiesKey-value pair representing a defined tag key and value, scoped to a namespace. Example: {"CostCenter": "42"}
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"Operations": {"CostCenter": "42"}}
Nested Schema : freeformTags
Type:
object
Additional Properties Allowed
Show Source
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. Example: {"Department": "Finance"}
Nested Schema : locks
Type:
array
Maximum Number of Items:
1
Locks associated with this resource.
Show Source
-
Array of:
object AddLockDetails
Request payload to add lock to the resource.
Nested Schema : additionalProperties
Type:
object
Additional Properties Allowed
Show Source
-
object additionalProperties
The value of the tag. Only the String type is supported.
Key-value pair representing a defined tag key and value, scoped to a namespace. Example: {"CostCenter": "42"}
Nested Schema : additionalProperties
Type:
object
The value of the tag. Only the String type is supported.
Nested Schema : AddLockDetails
Type:
object
Request payload to add lock to the resource.
Show Source
-
compartmentId:
string
The compartment OCID of the lock.
-
message:
string
A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked.
- relatedResourceId: string
-
type(required):
string
Allowed Values:
[ "FULL", "DELETE" ]
Type of the lock.
Response
Supported Media Types
- application/json
200 Response
The tagNamespace is being created.
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Root Schema : TagNamespace
Type:
object
A managed container for defined tags. A tag namespace is unique in a tenancy. Avoid entering confidential information when you supply string values using the API.
Show Source
-
compartmentId(required):
string
Minimum Length:
1
Maximum Length:100
The OCID of the compartment that contains the tag namespace. -
definedTags:
object definedTags
Additional Properties Allowed: additionalPropertiesDefined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"Operations": {"CostCenter": "42"}}
-
description(required):
string
Minimum Length:
1
Maximum Length:400
The description you assign to the tag namespace. -
freeformTags:
object freeformTags
Additional Properties Allowed: additionalPropertiesFree-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. Example: {"Department": "Finance"}
-
id(required):
string
Minimum Length:
1
Maximum Length:100
The OCID of the tag namespace. -
isRetired(required):
boolean
Whether the tag namespace is retired.
-
lifecycleState:
string
Allowed Values:
[ "ACTIVE", "INACTIVE", "DELETING", "DELETED" ]
The tagnamespace's current state. After creating a tagnamespace, make sure its lifecycleState is ACTIVE before using it. After retiring a tagnamespace, make sure its lifecycleState is INACTIVE before using it. -
locks:
array locks
Locks associated with this resource.
-
name(required):
string
Minimum Length:
1
Maximum Length:100
The name of the tag namespace. It must be unique across all tag namespaces in the tenancy and cannot be changed. -
timeCreated(required):
string(date-time)
Date and time the tagNamespace was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
Nested Schema : definedTags
Type:
object
Additional Properties Allowed
Show Source
-
object additionalProperties
Additional Properties Allowed: additionalPropertiesKey-value pair representing a defined tag key and value, scoped to a namespace. Example: {"CostCenter": "42"}
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"Operations": {"CostCenter": "42"}}
Nested Schema : freeformTags
Type:
object
Additional Properties Allowed
Show Source
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. Example: {"Department": "Finance"}
Nested Schema : locks
Type:
array
Locks associated with this resource.
Show Source
-
Array of:
object ResourceLock
Resource locks are used to prevent certain APIs from being called for the resource. A full lock prevents both updating the resource and deleting the resource. A delete lock prevents deleting the resource.
Nested Schema : additionalProperties
Type:
object
Additional Properties Allowed
Show Source
-
object additionalProperties
The value of the tag. Only the String type is supported.
Key-value pair representing a defined tag key and value, scoped to a namespace. Example: {"CostCenter": "42"}
Nested Schema : additionalProperties
Type:
object
The value of the tag. Only the String type is supported.
Nested Schema : ResourceLock
Type:
object
Resource locks are used to prevent certain APIs from being called for the resource. A full lock prevents both updating the resource and deleting the resource. A delete lock prevents deleting the resource.
Show Source
-
compartmentId:
string
The compartment OCID of the lock.
-
isActive:
boolean
Indicates if the lock is active or not. For example, if there are mutliple FULL locks, the first-created FULL lock will be effective.
-
message:
string
A message added by the creator of the lock. This is typically used to give an indication of why the resource is locked.
- relatedResourceId: string
-
timeCreated:
string(date-time)
When the lock was created.
-
type(required):
string
Allowed Values:
[ "FULL", "DELETE" ]
Type of the lock.
Example Response (application-json)
{ "id": "ocid1.namespace.aaaaaaaaqexampleuniqueID", "compartmentId": "ocid1.tenancy.aaaaaaaabaexampleuniqueID", "name": "BillingTags", "description": "This namespace contains tags that will be used in billing.", "isRetired": "false", "lifecycleState": "ACTIVE", "timeCreated": "2017-09-01T18:13:12.210Z" }
400 Response
Bad Request
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Root Schema : Error
Type:
object
The properties that define an error.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing..Example:
UnknownError
-
message(required):
string
A human-readable error string.Example:
error validating payload
401 Response
Unauthorized
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Root Schema : Error
Type:
object
The properties that define an error.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing..Example:
UnknownError
-
message(required):
string
A human-readable error string.Example:
error validating payload
404 Response
Not Found
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Root Schema : Error
Type:
object
The properties that define an error.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing..Example:
UnknownError
-
message(required):
string
A human-readable error string.Example:
error validating payload
409 Response
Conflict
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Root Schema : Error
Type:
object
The properties that define an error.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing..Example:
UnknownError
-
message(required):
string
A human-readable error string.Example:
error validating payload
429 Response
Too Many Requests
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Root Schema : Error
Type:
object
The properties that define an error.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing..Example:
UnknownError
-
message(required):
string
A human-readable error string.Example:
error validating payload
500 Response
Internal Server Error
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Root Schema : Error
Type:
object
The properties that define an error.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing..Example:
UnknownError
-
message(required):
string
A human-readable error string.Example:
error validating payload
Default Response
An error has occurred.
Headers
-
opc-request-id: string
Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Root Schema : Error
Type:
object
The properties that define an error.
Show Source
-
code(required):
string
A short error code that defines the error, meant for programmatic parsing..Example:
UnknownError
-
message(required):
string
A human-readable error string.Example:
error validating payload