Scale an NsInstance

Use this API to scale an NsInstance.

Request

Table 1. Request
Aspect Value
Endpoint URL /api/etsi/nslcm/v2/ns_instances/<nsInstanceId>/scale
HTTP Method POST

Request headers

Table 2. Request headers
Header Value
Content-Type application/json
Version 2.0.0

Request body

Table 3. Request body
Parameter Type Description Required
scaleType string The type of scaling operation to perform. Only SCALE_NS is supported. Yes
scaleNsData object A ScaleNsData object. Yes
scaleNsData.scaleNsByStepsData object A ScaleNsByStepsData object. Yes
scaleNsData.scaleNsByStepsData.aspectId string The aspectId from the NsInstnace to scale. Yes
scaleNsData.scaleNsByStepsData.numberOfSteps integer The number of steps to scale by. This must be 1. Yes
scaleNsData.scaleNsByStepsData.scalingDirection string SCALE_IN or SCALE_OUT Yes
Where:
nsInstanceId
Corresponds to the assemblyId passed to POST /api/intent/scaleInAssembly or POST /api/intent/scaleOutAssembly.
scaleType
Set to SCALE_NS.
scaleNsData.scaleNsByStepsData.aspectId
Corresponds to the clusterName field used with the object passed to POST /api/intent/scaleInAssembly or POST /api/intent/scaleOutAssembly.
scaleNsData.scaleNsByStepsData.numberOfSteps
This must be set to 1 (as a number not a string).
scaleNsData.scaleNsByStepsData.scalingDirection
This must be set to one of SCALE_IN or SCALE_OUT. This value corresponds to calling POST /api/intent/scaleInAssembly or POST /api/intent/scaleOutAssembly.

Request body example

{
    "scaleType": "SCALE_NS",
    "scaleNsData" : {
        "scaleNsByStepsData": {
            "aspectId": "demo_instance__a_t_simple",
            "numberOfSteps": 1,
            "scalingDirection": "SCALE_OUT"
        }
    }
}

Response codes

Table 4. Response codes
HTTP status code Description
202 When the scale request has been accepted.
404 When an NsInstance with the supplied id is not found.
409 When the NsInstance is in the NOT_INSTANTIATED state or when it has reached the scaling limit for the specified scalingDirection.
4xx/5xx In addition to the response codes defined in this table, any common error response codes.

Response headers

Table 5. Response headers
Header Description
location On success, this contains the URL for the Ns LCM operation occurrence for this operation.

Response body

On success (202) the response body is empty. On failure, it contains an object describing the problem that caused it to fail.