UNPKG

@pulumi/linode

Version:

A Pulumi package for creating and managing linode cloud resources.

132 lines (131 loc) 3.94 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * > **Early Access:** Lock functionality is in early access and may not be available to all users. * * > **Important** Only unrestricted users can view locks. Restricted users cannot access lock information even if they have permissions for the resources. * * Provides information about Linode Locks that match a set of filters. Locks prevent accidental deletion, rebuild operations, and service transfers of resources. * * For more information, see the Linode APIv4 docs (TBD). * * ## Example Usage * * Get all locks in a type: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as linode from "@pulumi/linode"; * * const myInstanceLocks = linode.getLocks({ * filters: [{ * name: "lock_type", * values: ["cannot_delete"], * }], * }); * ``` * * Get information about all locks: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as linode from "@pulumi/linode"; * * const all = linode.getLocks({}); * export const allLockIds = all.then(all => all.locks.map(__item => __item.id)); * ``` * * ## Filterable Fields * * * `id` * * * `lockType` */ export declare function getLocks(args?: GetLocksArgs, opts?: pulumi.InvokeOptions): Promise<GetLocksResult>; /** * A collection of arguments for invoking getLocks. */ export interface GetLocksArgs { filters?: inputs.GetLocksFilter[]; /** * The order in which results should be returned. (`asc`, `desc`; default `asc`) */ order?: string; /** * The attribute to order the results by. See the Filterable Fields section for a list of valid fields. */ orderBy?: string; } /** * A collection of values returned by getLocks. */ export interface GetLocksResult { readonly filters?: outputs.GetLocksFilter[]; /** * The unique ID of the Lock. */ readonly id: string; /** * A list of Linode Locks that match the filter criteria. */ readonly locks: outputs.GetLocksLock[]; readonly order?: string; readonly orderBy?: string; } /** * > **Early Access:** Lock functionality is in early access and may not be available to all users. * * > **Important** Only unrestricted users can view locks. Restricted users cannot access lock information even if they have permissions for the resources. * * Provides information about Linode Locks that match a set of filters. Locks prevent accidental deletion, rebuild operations, and service transfers of resources. * * For more information, see the Linode APIv4 docs (TBD). * * ## Example Usage * * Get all locks in a type: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as linode from "@pulumi/linode"; * * const myInstanceLocks = linode.getLocks({ * filters: [{ * name: "lock_type", * values: ["cannot_delete"], * }], * }); * ``` * * Get information about all locks: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as linode from "@pulumi/linode"; * * const all = linode.getLocks({}); * export const allLockIds = all.then(all => all.locks.map(__item => __item.id)); * ``` * * ## Filterable Fields * * * `id` * * * `lockType` */ export declare function getLocksOutput(args?: GetLocksOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetLocksResult>; /** * A collection of arguments for invoking getLocks. */ export interface GetLocksOutputArgs { filters?: pulumi.Input<pulumi.Input<inputs.GetLocksFilterArgs>[]>; /** * The order in which results should be returned. (`asc`, `desc`; default `asc`) */ order?: pulumi.Input<string>; /** * The attribute to order the results by. See the Filterable Fields section for a list of valid fields. */ orderBy?: pulumi.Input<string>; }