Create a service policy for network interfaces
Creates a service policy for network interfaces to define how network traffic is managed across your ONTAP environment. Use this to customize traffic handling and ensure optimal network performance for specific workloads.
HTTP method and endpoint
POST /network/ip/service-policies
Introduced in
ONTAP 9.8
Related ONTAP commands
-
network interface service-policy create
Required properties
-
name- Name of the service policy to create. -
ipspace.nameoripspace.uuid-
Required for cluster-scoped service policies.
-
Optional for SVM-scoped service policies.
-
-
svm.nameorsvm.uuid-
Required for SVM-scoped service policies.
-
Not valid for cluster-scoped service policies.
-
Default property values
If not specified in POST, the following default property values are assigned:
-
scope-
svm if the svm parameter is specified
-
cluster if the svm parameter is not specified
-
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 |
|---|---|---|
ipspace |
||
is_built_in |
boolean |
|
name |
string |
|
scope |
string |
Set to "svm" for interfaces owned by an SVM. Otherwise, set to "cluster". |
services |
array[string] |
|
svm |
SVM, applies only to SVM-scoped objects. |
|
uuid |
string |
Example request
{
"ipspace": {
"name": "Default",
"uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
},
"name": "default-intercluster",
"scope": "string",
"services": [
"data_nfs"
],
"svm": {
"name": "svm1",
"uuid": "02c9e252-41be-11e9-81d5-00a0986138f7"
},
"uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
}
Response
Status: 200, Ok
Response
Status: 201, Created
Error
Status: Default
ONTAP Error Response Codes
| Error Code | Description |
|---|---|
1966373 |
Port must reside in the same IPspace as the interface's SVM. |
1967146 |
Svm.name does not exist. |
1967147 |
Svm.uuid does not exist. |
2621740 |
An unexpected error when trying to determine whether the target Vserver was locked or not on this cluster. |
53281895 |
Custom service policies cannot be created on the specified svm |
53281929 |
Service policies cannot combine block and file services. |
53281931 |
Service policy names cannot start with "default-". |
53281932 |
Service cannot be added because the service does not exist for the specified SVM or IPspace. |
53281933 |
A Cluster-scoped service cannot be added to a SVM-scoped service policy. |
53281934 |
An SVM-scoped service cannot be added to a Cluster-scoped service policy. |
53281935 |
Scope is set to "svm" and svm.uuid or svm.name have not been specified. |
53281936 |
The SVM is not in the specified IPspace. |
53281937 |
Svm.uuid and svm.name are not valid parameters when scope is cluster. |
53281938 |
Svm.uuid or svm.name specify a vserver that does not exist. |
53281939 |
One or more of the svm.uuid, svm.name, ipspace.uuid, and ipspace.name have invalid values. |
53281940 |
SVM or IPspace has not been specified. |
53281941 |
SVM does not exist. |
53281942 |
Service policy cannot be created because the specified SVM does not exist. |
53281944 |
Ipspace.name does not exist. |
53281945 |
Ipspace.uuid is not an IPspace. |
53281946 |
Service policy already exists. |
53281958 |
Service policies cannot contain multiple block-oriented services. |
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
ipspace
| Name | Type | Description |
|---|---|---|
name |
string |
IPspace name |
uuid |
string |
IPspace UUID |
svm
SVM, applies only to SVM-scoped objects.
| 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. |
ip_service_policy
| Name | Type | Description |
|---|---|---|
ipspace |
||
is_built_in |
boolean |
|
name |
string |
|
scope |
string |
Set to "svm" for interfaces owned by an SVM. Otherwise, set to "cluster". |
services |
array[string] |
|
svm |
SVM, applies only to SVM-scoped objects. |
|
uuid |
string |
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. |