Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gcp.resourcemanager.kotlin
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.resourcemanager.LienArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* A Lien represents an encumbrance on the actions that can be performed on a resource.
* ## 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!",
* });
* 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",
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* project = gcp.organizations.Project("project",
* project_id="staging-project",
* name="A very important project!")
* lien = gcp.resourcemanager.Lien("lien",
* parent=project.number.apply(lambda number: f"projects/{number}"),
* restrictions=["resourcemanager.projects.delete"],
* origin="machine-readable-explanation",
* reason="This project is an important environment")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var project = new Gcp.Organizations.Project("project", new()
* {
* ProjectId = "staging-project",
* Name = "A very important project!",
* });
* var lien = new Gcp.ResourceManager.Lien("lien", new()
* {
* Parent = project.Number.Apply(number => $"projects/{number}"),
* Restrictions = new[]
* {
* "resourcemanager.projects.delete",
* },
* Origin = "machine-readable-explanation",
* Reason = "This project is an important environment",
* });
* });
* ```
* ```go
* package main
* import (
* "fmt"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/organizations"
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/resourcemanager"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* project, err := organizations.NewProject(ctx, "project", &organizations.ProjectArgs{
* ProjectId: pulumi.String("staging-project"),
* Name: pulumi.String("A very important project!"),
* })
* if err != nil {
* return err
* }
* _, err = resourcemanager.NewLien(ctx, "lien", &resourcemanager.LienArgs{
* Parent: project.Number.ApplyT(func(number string) (string, error) {
* return fmt.Sprintf("projects/%v", number), nil
* }).(pulumi.StringOutput),
* Restrictions: pulumi.StringArray{
* pulumi.String("resourcemanager.projects.delete"),
* },
* Origin: pulumi.String("machine-readable-explanation"),
* Reason: pulumi.String("This project is an important environment"),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* 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")
* .name("A very important project!")
* .build());
* var lien = new Lien("lien", LienArgs.builder()
* .parent(project.number().applyValue(number -> String.format("projects/%s", number)))
* .restrictions("resourcemanager.projects.delete")
* .origin("machine-readable-explanation")
* .reason("This project is an important environment")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* lien:
* type: gcp:resourcemanager:Lien
* properties:
* parent: projects/${project.number}
* restrictions:
* - resourcemanager.projects.delete
* origin: machine-readable-explanation
* reason: This project is an important environment
* project:
* type: gcp:organizations:Project
* properties:
* projectId: staging-project
* name: A very important project!
* ```
*
* ## 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}}
* ```
* @property origin A stable, user-visible/meaningful string identifying the origin
* of the Lien, intended to be inspected programmatically. Maximum length of
* 200 characters.
* @property parent 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").
* @property reason Concise user-visible strings indicating why an action cannot be performed
* on a resource. Maximum length of 200 characters.
* @property restrictions 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']
* - - -
*/
public data class LienArgs(
public val origin: Output? = null,
public val parent: Output? = null,
public val reason: Output? = null,
public val restrictions: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.resourcemanager.LienArgs =
com.pulumi.gcp.resourcemanager.LienArgs.builder()
.origin(origin?.applyValue({ args0 -> args0 }))
.parent(parent?.applyValue({ args0 -> args0 }))
.reason(reason?.applyValue({ args0 -> args0 }))
.restrictions(restrictions?.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}
/**
* Builder for [LienArgs].
*/
@PulumiTagMarker
public class LienArgsBuilder internal constructor() {
private var origin: Output? = null
private var parent: Output? = null
private var reason: Output? = null
private var restrictions: Output>? = null
/**
* @param value A stable, user-visible/meaningful string identifying the origin
* of the Lien, intended to be inspected programmatically. Maximum length of
* 200 characters.
*/
@JvmName("jopnpfxrsiyildkd")
public suspend fun origin(`value`: Output) {
this.origin = value
}
/**
* @param value 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").
*/
@JvmName("hpmrvhxmjyskcjyl")
public suspend fun parent(`value`: Output) {
this.parent = value
}
/**
* @param value Concise user-visible strings indicating why an action cannot be performed
* on a resource. Maximum length of 200 characters.
*/
@JvmName("dojbdxqqpjkaxoqc")
public suspend fun reason(`value`: Output) {
this.reason = value
}
/**
* @param value 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']
* - - -
*/
@JvmName("gpavljgjownrbanl")
public suspend fun restrictions(`value`: Output>) {
this.restrictions = value
}
@JvmName("wkweygitqmanyljg")
public suspend fun restrictions(vararg values: Output) {
this.restrictions = Output.all(values.asList())
}
/**
* @param values 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']
* - - -
*/
@JvmName("jdfwcrnemegulmex")
public suspend fun restrictions(values: List