UNPKG

@pulumi/linode

Version:

A Pulumi package for creating and managing linode cloud resources.

110 lines 3.42 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.getLocksOutput = exports.getLocks = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * > **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` */ function getLocks(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("linode:index/getLocks:getLocks", { "filters": args.filters, "order": args.order, "orderBy": args.orderBy, }, opts); } exports.getLocks = getLocks; /** * > **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` */ function getLocksOutput(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("linode:index/getLocks:getLocks", { "filters": args.filters, "order": args.order, "orderBy": args.orderBy, }, opts); } exports.getLocksOutput = getLocksOutput; //# sourceMappingURL=getLocks.js.map