Locking a resource group

REST API Reference Guide for Virtual Storage Platform 5000, Virtual Storage Platform E Series, and Virtual Storage Platform G/F Series

Version
93-07-0x
90-09-0x
88-08-10
Audience
anonymous
Part Number
MK-98RD9014-17
The following request locks resources of a resource group allocated to the user who runs API requests, preventing other users from performing operations on the resources. Exclusive control by locking is performed on a session basis. To run requests on the locked resources, specify as the Authorization header the token of the session that was specified when the resources were locked.

Execution permission

Storage Administrator (View Only)

Request line

POST base-URL/v1/services/resource-group-service/actions/lock/invoke

Request message

Object ID
None.
Query parameters
None.
Body
{
  "parameters": {
    "waitTime": 30
  }
}

Attribute

Type

Description

waitTime

int

The time that elapses before a lock timeout (in seconds)

Specify a value from 0 to 7200 for the maximum wait time that elapses before a lock timeout occurs, for cases such as when the target resource is already locked by other sessions.

If this value is omitted, 0 is specified.

Response message

Body

A job object is returned. For details on attributes other than affectedResources, see the description on job objects.

Attribute

Description

affectedResources

URL of the resource group that obtained a lock

Status codes

For details on the status codes of the request for this operation, see the description on HTTP status codes.

Status code

Message

Description

503

Service unavailable

The operation cannot be performed because an API operation that locks or unlocks resources is being run by using the same session.

Coding example

curl -v -H "Accept:application/json" -H "Content-Type:application/json" -H "Authorization:Session d7b673af189048468c5af9bcf3bbbb6f" -X POST --data-binary @./InputParameters.json https://192.0.2.100/ConfigurationManager/v1/services/resource-group-service/actions/lock/invoke