Yandex Cloud Marketplace License Manager, gRPC: LockService
A set of methods for managing subscription locks.
Call | Description |
---|---|
Get | Returns the specified subscription lock. |
GetByInstanceAndResource | Returns the subscription lock for specified subscription instance and resource. |
List | Returns subscriptions locks for specified resource and folder. |
Create | Locks the specified subscription instance to the resource. |
Ensure | Checks if the she specified subscription is already locked to the specified resource. |
Delete | Unlocks the specified subscription lock. |
Calls LockService
Get
Returns the specified subscription lock.
rpc Get (GetLockRequest) returns (Lock)
GetLockRequest
Field | Description |
---|---|
lock_id | string Required. ID of the subscription lock. |
Lock
Field | Description |
---|---|
id | string ID of the subscription lock. |
instance_id | string ID of the subscription instance. |
resource_id | string ID of the resource. |
start_time | google.protobuf.Timestamp Timestamp of the start of the subscription lock. |
end_time | google.protobuf.Timestamp Timestamp of the end of the subscription lock. |
created_at | google.protobuf.Timestamp Creation timestamp. |
updated_at | google.protobuf.Timestamp Update timestamp. |
state | enum State Subscription lock state.
|
template_id | string ID of the subscription template. |
GetByInstanceAndResource
Returns the subscription lock for specified subscription instance and resource.
rpc GetByInstanceAndResource (GetLockByInstanceAndResourceRequest) returns (Lock)
GetLockByInstanceAndResourceRequest
Field | Description |
---|---|
instance_id | string Required. ID of the subscription instance. |
resource_id | string Required. ID of the resource to which the subscription will be locked. |
Lock
Field | Description |
---|---|
id | string ID of the subscription lock. |
instance_id | string ID of the subscription instance. |
resource_id | string ID of the resource. |
start_time | google.protobuf.Timestamp Timestamp of the start of the subscription lock. |
end_time | google.protobuf.Timestamp Timestamp of the end of the subscription lock. |
created_at | google.protobuf.Timestamp Creation timestamp. |
updated_at | google.protobuf.Timestamp Update timestamp. |
state | enum State Subscription lock state.
|
template_id | string ID of the subscription template. |
List
Returns subscriptions locks for specified resource and folder.
rpc List (ListLocksRequest) returns (ListLocksResponse)
ListLocksRequest
Field | Description |
---|---|
resource_id | string Required. ID of the resource that the subscription locks belong to. |
folder_id | string Required. ID of the folder that the subscription locks belong to. |
page_size | int64 The maximum number of results per page to return. If the number of available results is larger than page_size , the service returns a ListLocksResponse.next_page_token that can be used to get the next page of results in subsequent list requests. Default value: 100. Acceptable values are 0 to 1000, inclusive. |
page_token | string Page token. To get the next page of results, set page_token to the ListLocksResponse.next_page_token returned by a previous list request. The maximum string length in characters is 100. |
filter | string A filter expression that filters subscription locks listed in the response. The expression must specify:
product_id="my-product-id" . The maximum string length in characters is 1000. |
order_by | string Sorting order for the list of subscription locks. The maximum string length in characters is 100. |
ListLocksResponse
Field | Description |
---|---|
locks[] | Lock List of subscription locks. |
next_page_token | string Token for getting the next page of the list. If the number of results is greater than the specified ListLocksRequest.page_size, use next_page_token as the value for the ListLocksRequest.page_token parameter in the next list request. Each subsequent page will have its own next_page_token to continue paging through the results. |
Lock
Field | Description |
---|---|
id | string ID of the subscription lock. |
instance_id | string ID of the subscription instance. |
resource_id | string ID of the resource. |
start_time | google.protobuf.Timestamp Timestamp of the start of the subscription lock. |
end_time | google.protobuf.Timestamp Timestamp of the end of the subscription lock. |
created_at | google.protobuf.Timestamp Creation timestamp. |
updated_at | google.protobuf.Timestamp Update timestamp. |
state | enum State Subscription lock state.
|
template_id | string ID of the subscription template. |
Create
Locks the specified subscription instance to the resource.
rpc Create (CreateLockRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:CreateLockMetadata
Operation.response:Lock
CreateLockRequest
Field | Description |
---|---|
instance_id | string Required. ID of the subscription instance. |
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. |
CreateLockMetadata
Field | Description |
---|---|
lock_id | string ID of the subscription lock. |
Lock
Field | Description |
---|---|
id | string ID of the subscription lock. |
instance_id | string ID of the subscription instance. |
resource_id | string ID of the resource. |
start_time | google.protobuf.Timestamp Timestamp of the start of the subscription lock. |
end_time | google.protobuf.Timestamp Timestamp of the end of the subscription lock. |
created_at | google.protobuf.Timestamp Creation timestamp. |
updated_at | google.protobuf.Timestamp Update timestamp. |
state | enum State Subscription lock state.
|
template_id | string ID of the subscription template. |
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:Lock
EnsureLockRequest
Field | Description |
---|---|
instance_id | string Required. ID of the subscription instance. |
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. |
Lock
Field | Description |
---|---|
id | string ID of the subscription lock. |
instance_id | string ID of the subscription instance. |
resource_id | string ID of the resource. |
start_time | google.protobuf.Timestamp Timestamp of the start of the subscription lock. |
end_time | google.protobuf.Timestamp Timestamp of the end of the subscription lock. |
created_at | google.protobuf.Timestamp Creation timestamp. |
updated_at | google.protobuf.Timestamp Update timestamp. |
state | enum State Subscription lock state.
|
template_id | string ID of the subscription template. |
Delete
Unlocks the specified subscription lock.
rpc Delete (DeleteLockRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:DeleteLockMetadata
Operation.response:google.protobuf.Empty
DeleteLockRequest
Field | Description |
---|---|
lock_id | string Required. ID of the subscription lock. |
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. |
DeleteLockMetadata
Field | Description |
---|---|
lock_id | string ID of the subscription lock. |