Start of change

Add a classification rule

Use this operation to add a classification rule in a WLM Policy with service level agreement specified in a resource pool.

HTTP method and URI path

POST /zosmf/resource-mgmt/rest/<version>/rdp/wlm/clrule/actions/add
In this request:
<version>
Is the URI path variable that identifies the version of the z/OSMF service. The following value is valid: 1.0.

Query parameters

None.

Description

This operation adds a classification rule in a WLM policy for a middleware instance with a service level agreement specified in the tenant's resource pool.

On successful completion, HTTP status code 200 (OK) is returned, indicating that the request resulted in a classification rule being added.

Request content

The request content is expected to contain a JSON object. See Table 1.

Table 1. Request content for the add classification rule request
Field name Type Required or optional Description
template-name String Required Name of the template that is associated with the tenant. Derived from a workflow internal variable, ${_workflow-templateName}.
tenant-id String Required ID of the tenant that is associated with the resource pool. Derived from a workflow internal variable, ${_workflow-tenantID}.
registry-id Array Required ID of the software services registry. Derived from a workflow internal variable, ${_workflow-registryID}.See Table 2.
Table 2. WLM parameters fields
Field Type Optional/Required Description
qualifier String Required The started task name. In most cases it can be derived from workflow internal variable ${_workflow-softwareServiceInstanceName}

Authorization requirements

The user must be a consumer in the tenant, or a WLM administrator in the domain that the tenant is associated with.

The user must also be the owner of the software services registry entry for the software services instance.

For more information, see Authorization requirements.

HTTP status codes

On successful completion, HTTP status code 200 (OK) is returned.

Otherwise, the following HTTP status codes are returned for the indicated errors. The response body is a standard error response body that provides the reason code that is indicated and associated error message.

Table 3. HTTP error response codes for a release SNA application name request
HTTP error status code Description
HTTP 500 Internal server error The server encountered an error. See the response body for a JSON object with information about the error.

Response content

On successful completion, the service returns a response body, which contains a JSON object with details about the request. See Table 4.

Table 4. Response from an add classification rule request
Field Type Description
cl-rule-id String Required. Identifier of the classification rule.
report-class-name String Report class that is associated with the resource pool.
service-class-name String Service class that is associated with the SLA that is defined in the resource pool.

Example HTTP interaction

In Figure 1, a request is submitted to add a classification rule.
Figure 1. Sample request to add a classification rule
POST https://localhost:4444/zosmf/resource-mgmt/rest/1.0/rdp/wlm/clrule/actions/add
{
   "template-name":"CICSBasic",
   "tenant-id":"IYU102",
   "resistry-id":"0d375584-305d-4bd5-b26e-88ac74c8171a",
   "wlm-parms":
    {
      "qualifier":"CICSA001"
    }
}
The following is the response body for the request:
{
     "cl-rule-id" : "82346",                                                               
     "report-class-name":"RPTCLASS",                                      
     "service-class-name":"SCGOLD",                                      
}

End of change