Create a new tag for a resource
- PDF of this doc site
Collection of separate PDF docs
Creating your file...
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 |
---|---|---|---|---|
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. |
Example request
{
"href": "string",
"label": "volume",
"svm": {
"_links": {
"self": {
"href": "/api/resourcelink"
}
},
"name": "svm1",
"uuid": "02c9e252-41be-11e9-81d5-00a0986138f7"
}
}
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. |
Also see the table of common errors in the Response body overview section of this documentation.
Name | Type | Description |
---|---|---|
error |
Example error
{
"error": {
"arguments": [
{
"code": "string",
"message": "string"
}
],
"code": "4",
"message": "entry doesn't exist",
"target": "uuid"
}
}
Definitions
See Definitions
href
Name | Type | Description |
---|---|---|
href |
string |
_links
Name | Type | Description |
---|---|---|
self |
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 |
---|---|---|
_links |
||
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. |
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. |