Get
Returns the specified subscription lock.
- TypeScript
- Python
import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";
const GetLockRequest =
cloudApi.marketplace.licensemanager_saas_lock_service.GetLockRequest;
(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.LockServiceClient);
const result = await client.get(
GetLockRequest.fromPartial({
lockId: "lockId",
})
);
console.log(result);
})();
import os
import grpc
import yandexcloud
from yandex.cloud.marketplace.licensemanager.saas.v1.lock_service_pb2 import GetLockRequest
from yandex.cloud.marketplace.licensemanager.saas.v1.lock_service_pb2_grpc import LockServiceStub
token = os.getenv("YC_OAUTH_TOKEN")
sdk = yandexcloud.SDK(token=token)
service = sdk.client(LockServiceStub)
response = service.Get(GetLockRequest(lock_id="lockId"))
print(response)
GetLockRequest
lockId
: string
ID of the subscription lock.
Lock
State
STATE_UNSPECIFIED
UNLOCKED
Subscription unlocked.
LOCKED
Subscription locked to the resource.
DELETED
Subscription lock deleted.
id
: string
ID of the subscription lock.
instanceId
: string
ID of the subscription instance.
resourceId
: string
ID of the resource.
startTime
: google.protobuf.Timestamp
Timestamp of the start of the subscription lock.
endTime
: google.protobuf.Timestamp
Timestamp of the end of the subscription lock.
createdAt
: google.protobuf.Timestamp
Creation timestamp.
updatedAt
: google.protobuf.Timestamp
Update timestamp.
state
: State
Subscription lock state.
templateId
: string
ID of the subscription template.