LienArgs

data class LienArgs(val origin: Output<String>? = null, val parent: Output<String>? = null, val reason: Output<String>? = null, val restrictions: Output<List<String>>? = null) : ConvertibleToJava<LienArgs>

A Lien represents an encumbrance on the actions that can be performed on a resource.

Example Usage

Resource Manager Lien

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.organizations.Project;
import com.pulumi.gcp.organizations.ProjectArgs;
import com.pulumi.gcp.resourcemanager.Lien;
import com.pulumi.gcp.resourcemanager.LienArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var project = new Project("project", ProjectArgs.builder()
.projectId("staging-project")
.build());
var lien = new Lien("lien", LienArgs.builder()
.origin("machine-readable-explanation")
.parent(project.number().applyValue(number -> String.format("projects/%s", number)))
.reason("This project is an important environment")
.restrictions("resourcemanager.projects.delete")
.build());
}
}

Import

Lien can be imported using any of these accepted formats:

$ pulumi import gcp:resourcemanager/lien:Lien default {{parent}}/{{name}}

Constructors

Link copied to clipboard
constructor(origin: Output<String>? = null, parent: Output<String>? = null, reason: Output<String>? = null, restrictions: Output<List<String>>? = null)

Properties

Link copied to clipboard
val origin: Output<String>? = null

A stable, user-visible/meaningful string identifying the origin of the Lien, intended to be inspected programmatically. Maximum length of 200 characters.

Link copied to clipboard
val parent: Output<String>? = null

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").

Link copied to clipboard
val reason: Output<String>? = null

Concise user-visible strings indicating why an action cannot be performed on a resource. Maximum length of 200 characters.

Link copied to clipboard
val restrictions: Output<List<String>>? = null

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'

Functions

Link copied to clipboard
open override fun toJava(): LienArgs