@linode/api-v4
Version:
JavaScript wrapper around the Linode APIv4
39 lines • 1.43 kB
TypeScript
import type { Filter, ResourcePage as Page, Params } from '../types';
import type { CreateLockPayload, ResourceLock } from './types';
/**
* getLocks
*
* Returns a paginated list of resource locks on your Account.
*
* @param params { Params } Pagination parameters
* @param filters { Filter } X-Filter for API
*/
export declare const getLocks: (params?: Params, filters?: Filter) => Promise<Page<ResourceLock>>;
/**
* getLock
*
* Returns information about a single resource lock.
*
* @param lockId { number } The ID of the lock to retrieve.
*/
export declare const getLock: (lockId: number) => Promise<ResourceLock>;
/**
* createLock
*
* Creates a new resource lock to prevent accidental deletion or modification.
*
* @param payload { CreateLockPayload } The lock creation payload
* @param payload.entity_type { string } The type of entity to lock (e.g., 'linode')
* @param payload.entity_id { number | string } The ID of the entity to lock
* @param payload.lock_type { string } The type of lock ('cannot_delete', 'cannot_delete_with_subresources')
*/
export declare const createLock: (payload: CreateLockPayload) => Promise<ResourceLock>;
/**
* deleteLock
*
* Deletes a resource lock, allowing the resource to be deleted or modified.
*
* @param lockId { number } The ID of the lock to delete.
*/
export declare const deleteLock: (lockId: number) => Promise<{}>;
//# sourceMappingURL=locks.d.ts.map