Create a new tag for a resource
POST /resource-tags/{resource_tag.value}/resources
Introduced In: 9.13
Creates a new tag on a specific resource.
Parameters
Name | Type | In | Required | Description |
---|---|---|---|---|
resource_tag.value |
string |
path |
True |
|
return_records |
boolean |
query |
False |
The default is false. If set to true, the records are returned.
|
Request Body
Name | Type | Description |
---|---|---|
href |
string |
This property provides the address in the API at which the tagged resource is available. Additional queries can be made on this endpoint to fetch the resource's properties. |
label |
string |
This is a human-readable classifier representing the type of thing that is pointed to by the href. |
svm |
If the tagged resource belongs to an SVM, this property will be set. If the resource does not belong to an SVM (i.e. it belongs to the cluster as a whole), then this property will be empty and unreturned. |
|
value |
string |
The text value of the tag formatted as |
Example request
{
"href": "string",
"label": "volume",
"svm": {
"name": "svm1",
"uuid": "02c9e252-41be-11e9-81d5-00a0986138f7"
},
"value": "string"
}
Response
Status: 201, Created
Headers
Name | Description | Type |
---|---|---|
Location |
Useful for tracking the resource location |
string |
Error
Status: Default
ONTAP Error Response Codes
Error Code | Description |
---|---|
262257 |
The API specified in the href cannot be found. |
262258 |
The resource specified in the href does not support tagging. |
262259 |
The specified href cannot be parsed. |
262260 |
The provided href is missing a key to a specific resource. |
262261 |
The specified href points to a resource that does not exist. |
262262 |
The specified href cannot be an empty string. |
262263 |
Tag key-value pairs cannot be longer than 200 characters. |
263148 |
Specified resource cannot be tagged because it reached allowed tags limit. |
Also see the table of common errors in the Response body overview section of this documentation.
Definitions
See Definitions
href
Name | Type | Description |
---|---|---|
href |
string |
_links
svm
If the tagged resource belongs to an SVM, this property will be set. If the resource does not belong to an SVM (i.e. it belongs to the cluster as a whole), then this property will be empty and unreturned.
Name | Type | Description |
---|---|---|
name |
string |
The name of the SVM. This field cannot be specified in a PATCH method. |
uuid |
string |
The unique identifier of the SVM. This field cannot be specified in a PATCH method. |
resource_tag_resource
This object provides a pointer to the tagged resource in the API. Details about the tagged object are available by querying the address of the href property.
Name | Type | Description |
---|---|---|
href |
string |
This property provides the address in the API at which the tagged resource is available. Additional queries can be made on this endpoint to fetch the resource's properties. |
label |
string |
This is a human-readable classifier representing the type of thing that is pointed to by the href. |
svm |
If the tagged resource belongs to an SVM, this property will be set. If the resource does not belong to an SVM (i.e. it belongs to the cluster as a whole), then this property will be empty and unreturned. |
|
value |
string |
The text value of the tag formatted as |
error_arguments
Name | Type | Description |
---|---|---|
code |
string |
Argument code |
message |
string |
Message argument |
returned_error
Name | Type | Description |
---|---|---|
arguments |
array[error_arguments] |
Message arguments |
code |
string |
Error code |
message |
string |
Error message |
target |
string |
The target parameter that caused the error. |