UNPKG

@pulumi/gcp

Version:

A Pulumi package for creating and managing Google Cloud Platform resources.

173 lines (172 loc) 6.7 kB
import * as pulumi from "@pulumi/pulumi"; /** * A Lien represents an encumbrance on the actions that can be performed on a resource. * * To get more information about Lien, see: * * * [API documentation](https://cloud.google.com/resource-manager/reference/rest) * * How-to Guides * * [Create a Lien](https://cloud.google.com/resource-manager/docs/project-liens) * * ## Example Usage * * ### Resource Manager Lien * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const project = new gcp.organizations.Project("project", { * projectId: "staging-project", * name: "A very important project!", * deletionPolicy: "DELETE", * }); * const lien = new gcp.resourcemanager.Lien("lien", { * parent: pulumi.interpolate`projects/${project.number}`, * restrictions: ["resourcemanager.projects.delete"], * origin: "machine-readable-explanation", * reason: "This project is an important environment", * }); * ``` * * ## Import * * Lien can be imported using any of these accepted formats: * * * `{{parent}}/{{name}}` * * When using the `pulumi import` command, Lien can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:resourcemanager/lien:Lien default {{parent}}/{{name}} * ``` */ export declare class Lien extends pulumi.CustomResource { /** * Get an existing Lien resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: LienState, opts?: pulumi.CustomResourceOptions): Lien; /** * Returns true if the given object is an instance of Lien. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Lien; /** * Time of creation */ readonly createTime: pulumi.Output<string>; /** * A system-generated unique identifier for this Lien. */ readonly name: pulumi.Output<string>; /** * A stable, user-visible/meaningful string identifying the origin * of the Lien, intended to be inspected programmatically. Maximum length of * 200 characters. */ readonly origin: pulumi.Output<string>; /** * A reference to the resource this Lien is attached to. * The server will validate the parent against those for which Liens are supported. * Since a variety of objects can have Liens against them, you must provide the type * prefix (e.g. "projects/my-project-name"). */ readonly parent: pulumi.Output<string>; /** * Concise user-visible strings indicating why an action cannot be performed * on a resource. Maximum length of 200 characters. */ readonly reason: pulumi.Output<string>; /** * The types of operations which should be blocked as a result of this Lien. * Each value should correspond to an IAM permission. The server will validate * the permissions against those for which Liens are supported. An empty * list is meaningless and will be rejected. * e.g. ['resourcemanager.projects.delete'] */ readonly restrictions: pulumi.Output<string[]>; /** * Create a Lien resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: LienArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Lien resources. */ export interface LienState { /** * Time of creation */ createTime?: pulumi.Input<string>; /** * A system-generated unique identifier for this Lien. */ name?: pulumi.Input<string>; /** * A stable, user-visible/meaningful string identifying the origin * of the Lien, intended to be inspected programmatically. Maximum length of * 200 characters. */ origin?: pulumi.Input<string>; /** * A reference to the resource this Lien is attached to. * The server will validate the parent against those for which Liens are supported. * Since a variety of objects can have Liens against them, you must provide the type * prefix (e.g. "projects/my-project-name"). */ parent?: pulumi.Input<string>; /** * Concise user-visible strings indicating why an action cannot be performed * on a resource. Maximum length of 200 characters. */ reason?: pulumi.Input<string>; /** * The types of operations which should be blocked as a result of this Lien. * Each value should correspond to an IAM permission. The server will validate * the permissions against those for which Liens are supported. An empty * list is meaningless and will be rejected. * e.g. ['resourcemanager.projects.delete'] */ restrictions?: pulumi.Input<pulumi.Input<string>[]>; } /** * The set of arguments for constructing a Lien resource. */ export interface LienArgs { /** * A stable, user-visible/meaningful string identifying the origin * of the Lien, intended to be inspected programmatically. Maximum length of * 200 characters. */ origin: pulumi.Input<string>; /** * A reference to the resource this Lien is attached to. * The server will validate the parent against those for which Liens are supported. * Since a variety of objects can have Liens against them, you must provide the type * prefix (e.g. "projects/my-project-name"). */ parent: pulumi.Input<string>; /** * Concise user-visible strings indicating why an action cannot be performed * on a resource. Maximum length of 200 characters. */ reason: pulumi.Input<string>; /** * The types of operations which should be blocked as a result of this Lien. * Each value should correspond to an IAM permission. The server will validate * the permissions against those for which Liens are supported. An empty * list is meaningless and will be rejected. * e.g. ['resourcemanager.projects.delete'] */ restrictions: pulumi.Input<pulumi.Input<string>[]>; }