Yandex Cloud Marketplace License Manager for SaaS, gRPC: LockService
Статья создана
Обновлена 29 января 2024 г.
A set of methods for managing subscription locks.
Call | Description |
---|---|
Ensure | Checks if the she specified subscription is already locked to the specified resource. |
Get | Returns the specified subscription lock. |
Calls LockService
Ensure
Checks if the she specified subscription is already locked to the specified resource. If it is not locked, locks the subscription to the resource.
rpc Ensure (EnsureLockRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:EnsureLockMetadata
Operation.response:licensemanager.v1.Lock
EnsureLockRequest
Field | Description |
---|---|
instance_token | string Required. Signed JWT token which contains information about subscription. |
resource_id | string Required. ID of the resource to which the subscription will be locked. |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool If the value is false , it means the operation is still in progress. If true , the operation is completed, and either error or response is available. |
metadata | google.protobuf.Any Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any if operation finished successfully. |
EnsureLockMetadata
Field | Description |
---|---|
lock_id | string ID of the subscription lock. |
Get
Returns the specified subscription lock.
rpc Get (GetLockRequest) returns (licensemanager.v1.Lock)
GetLockRequest
Field | Description |
---|---|
lock_id | string Required. ID of the subscription lock. |