resourcemanager

package
v7.20.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Lien

type Lien struct {
	pulumi.CustomResourceState

	// Time of creation
	CreateTime pulumi.StringOutput `pulumi:"createTime"`
	// A system-generated unique identifier for this Lien.
	Name pulumi.StringOutput `pulumi:"name"`
	// A stable, user-visible/meaningful string identifying the origin
	// of the Lien, intended to be inspected programmatically. Maximum length of
	// 200 characters.
	Origin pulumi.StringOutput `pulumi:"origin"`
	// 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.StringOutput `pulumi:"parent"`
	// Concise user-visible strings indicating why an action cannot be performed
	// on a resource. Maximum length of 200 characters.
	Reason pulumi.StringOutput `pulumi:"reason"`
	// 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.StringArrayOutput `pulumi:"restrictions"`
}

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

## Example Usage

### Resource Manager Lien

```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
	})
}

```

## 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}} ```

func GetLien

func GetLien(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *LienState, opts ...pulumi.ResourceOption) (*Lien, error)

GetLien gets an existing Lien resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewLien

func NewLien(ctx *pulumi.Context,
	name string, args *LienArgs, opts ...pulumi.ResourceOption) (*Lien, error)

NewLien registers a new resource with the given unique name, arguments, and options.

func (*Lien) ElementType

func (*Lien) ElementType() reflect.Type

func (*Lien) ToLienOutput

func (i *Lien) ToLienOutput() LienOutput

func (*Lien) ToLienOutputWithContext

func (i *Lien) ToLienOutputWithContext(ctx context.Context) LienOutput

type LienArgs

type LienArgs struct {
	// A stable, user-visible/meaningful string identifying the origin
	// of the Lien, intended to be inspected programmatically. Maximum length of
	// 200 characters.
	Origin pulumi.StringInput
	// 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.StringInput
	// Concise user-visible strings indicating why an action cannot be performed
	// on a resource. Maximum length of 200 characters.
	Reason pulumi.StringInput
	// 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.StringArrayInput
}

The set of arguments for constructing a Lien resource.

func (LienArgs) ElementType

func (LienArgs) ElementType() reflect.Type

type LienArray

type LienArray []LienInput

func (LienArray) ElementType

func (LienArray) ElementType() reflect.Type

func (LienArray) ToLienArrayOutput

func (i LienArray) ToLienArrayOutput() LienArrayOutput

func (LienArray) ToLienArrayOutputWithContext

func (i LienArray) ToLienArrayOutputWithContext(ctx context.Context) LienArrayOutput

type LienArrayInput

type LienArrayInput interface {
	pulumi.Input

	ToLienArrayOutput() LienArrayOutput
	ToLienArrayOutputWithContext(context.Context) LienArrayOutput
}

LienArrayInput is an input type that accepts LienArray and LienArrayOutput values. You can construct a concrete instance of `LienArrayInput` via:

LienArray{ LienArgs{...} }

type LienArrayOutput

type LienArrayOutput struct{ *pulumi.OutputState }

func (LienArrayOutput) ElementType

func (LienArrayOutput) ElementType() reflect.Type

func (LienArrayOutput) Index

func (LienArrayOutput) ToLienArrayOutput

func (o LienArrayOutput) ToLienArrayOutput() LienArrayOutput

func (LienArrayOutput) ToLienArrayOutputWithContext

func (o LienArrayOutput) ToLienArrayOutputWithContext(ctx context.Context) LienArrayOutput

type LienInput

type LienInput interface {
	pulumi.Input

	ToLienOutput() LienOutput
	ToLienOutputWithContext(ctx context.Context) LienOutput
}

type LienMap

type LienMap map[string]LienInput

func (LienMap) ElementType

func (LienMap) ElementType() reflect.Type

func (LienMap) ToLienMapOutput

func (i LienMap) ToLienMapOutput() LienMapOutput

func (LienMap) ToLienMapOutputWithContext

func (i LienMap) ToLienMapOutputWithContext(ctx context.Context) LienMapOutput

type LienMapInput

type LienMapInput interface {
	pulumi.Input

	ToLienMapOutput() LienMapOutput
	ToLienMapOutputWithContext(context.Context) LienMapOutput
}

LienMapInput is an input type that accepts LienMap and LienMapOutput values. You can construct a concrete instance of `LienMapInput` via:

LienMap{ "key": LienArgs{...} }

type LienMapOutput

type LienMapOutput struct{ *pulumi.OutputState }

func (LienMapOutput) ElementType

func (LienMapOutput) ElementType() reflect.Type

func (LienMapOutput) MapIndex

func (LienMapOutput) ToLienMapOutput

func (o LienMapOutput) ToLienMapOutput() LienMapOutput

func (LienMapOutput) ToLienMapOutputWithContext

func (o LienMapOutput) ToLienMapOutputWithContext(ctx context.Context) LienMapOutput

type LienOutput

type LienOutput struct{ *pulumi.OutputState }

func (LienOutput) CreateTime

func (o LienOutput) CreateTime() pulumi.StringOutput

Time of creation

func (LienOutput) ElementType

func (LienOutput) ElementType() reflect.Type

func (LienOutput) Name

func (o LienOutput) Name() pulumi.StringOutput

A system-generated unique identifier for this Lien.

func (LienOutput) Origin

func (o LienOutput) Origin() pulumi.StringOutput

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

func (LienOutput) Parent

func (o LienOutput) Parent() pulumi.StringOutput

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

func (LienOutput) Reason

func (o LienOutput) Reason() pulumi.StringOutput

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

func (LienOutput) Restrictions

func (o LienOutput) Restrictions() pulumi.StringArrayOutput

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']

***

func (LienOutput) ToLienOutput

func (o LienOutput) ToLienOutput() LienOutput

func (LienOutput) ToLienOutputWithContext

func (o LienOutput) ToLienOutputWithContext(ctx context.Context) LienOutput

type LienState

type LienState struct {
	// Time of creation
	CreateTime pulumi.StringPtrInput
	// A system-generated unique identifier for this Lien.
	Name pulumi.StringPtrInput
	// A stable, user-visible/meaningful string identifying the origin
	// of the Lien, intended to be inspected programmatically. Maximum length of
	// 200 characters.
	Origin pulumi.StringPtrInput
	// 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.StringPtrInput
	// Concise user-visible strings indicating why an action cannot be performed
	// on a resource. Maximum length of 200 characters.
	Reason pulumi.StringPtrInput
	// 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.StringArrayInput
}

func (LienState) ElementType

func (LienState) ElementType() reflect.Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL