Skip to main content

Get

Returns the specified subscription lock.

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);
})();

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.