management

package
v3.50.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2021 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 Group

type Group struct {
	pulumi.CustomResourceState

	// A friendly name for this Management Group. If not specified, this'll be the same as the `name`.
	DisplayName pulumi.StringOutput `pulumi:"displayName"`
	// The name or UUID for this Management Group, which needs to be unique across your tenant. A new UUID will be generated if not provided. Changing this forces a new resource to be created.
	//
	// Deprecated: Deprecated in favour of `name`
	GroupId pulumi.StringOutput `pulumi:"groupId"`
	// The name or UUID for this Management Group, which needs to be unique across your tenant. A new UUID will be generated if not provided. Changing this forces a new resource to be created.
	Name pulumi.StringOutput `pulumi:"name"`
	// The ID of the Parent Management Group. Changing this forces a new resource to be created.
	ParentManagementGroupId pulumi.StringOutput `pulumi:"parentManagementGroupId"`
	// A list of Subscription GUIDs which should be assigned to the Management Group.
	SubscriptionIds pulumi.StringArrayOutput `pulumi:"subscriptionIds"`
}

Manages a Management Group.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/management"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		current, err := core.LookupSubscription(ctx, nil, nil)
		if err != nil {
			return err
		}
		exampleParent, err := management.NewGroup(ctx, "exampleParent", &management.GroupArgs{
			DisplayName: pulumi.String("ParentGroup"),
			SubscriptionIds: pulumi.StringArray{
				pulumi.String(current.SubscriptionId),
			},
		})
		if err != nil {
			return err
		}
		_, err = management.NewGroup(ctx, "exampleChild", &management.GroupArgs{
			DisplayName:             pulumi.String("ChildGroup"),
			ParentManagementGroupId: exampleParent.ID(),
			SubscriptionIds: pulumi.StringArray{
				pulumi.String(current.SubscriptionId),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

Management Groups can be imported using the `management group resource id`, e.g.

```sh

$ pulumi import azure:management/group:Group example /providers/Microsoft.Management/managementGroups/group1

```

func GetGroup

func GetGroup(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *GroupState, opts ...pulumi.ResourceOption) (*Group, error)

GetGroup gets an existing Group 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 NewGroup

func NewGroup(ctx *pulumi.Context,
	name string, args *GroupArgs, opts ...pulumi.ResourceOption) (*Group, error)

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

func (*Group) ElementType added in v3.31.1

func (*Group) ElementType() reflect.Type

func (*Group) ToGroupOutput added in v3.31.1

func (i *Group) ToGroupOutput() GroupOutput

func (*Group) ToGroupOutputWithContext added in v3.31.1

func (i *Group) ToGroupOutputWithContext(ctx context.Context) GroupOutput

func (*Group) ToGroupPtrOutput added in v3.47.1

func (i *Group) ToGroupPtrOutput() GroupPtrOutput

func (*Group) ToGroupPtrOutputWithContext added in v3.47.1

func (i *Group) ToGroupPtrOutputWithContext(ctx context.Context) GroupPtrOutput

type GroupArgs

type GroupArgs struct {
	// A friendly name for this Management Group. If not specified, this'll be the same as the `name`.
	DisplayName pulumi.StringPtrInput
	// The name or UUID for this Management Group, which needs to be unique across your tenant. A new UUID will be generated if not provided. Changing this forces a new resource to be created.
	//
	// Deprecated: Deprecated in favour of `name`
	GroupId pulumi.StringPtrInput
	// The name or UUID for this Management Group, which needs to be unique across your tenant. A new UUID will be generated if not provided. Changing this forces a new resource to be created.
	Name pulumi.StringPtrInput
	// The ID of the Parent Management Group. Changing this forces a new resource to be created.
	ParentManagementGroupId pulumi.StringPtrInput
	// A list of Subscription GUIDs which should be assigned to the Management Group.
	SubscriptionIds pulumi.StringArrayInput
}

The set of arguments for constructing a Group resource.

func (GroupArgs) ElementType

func (GroupArgs) ElementType() reflect.Type

type GroupArray added in v3.47.1

type GroupArray []GroupInput

func (GroupArray) ElementType added in v3.47.1

func (GroupArray) ElementType() reflect.Type

func (GroupArray) ToGroupArrayOutput added in v3.47.1

func (i GroupArray) ToGroupArrayOutput() GroupArrayOutput

func (GroupArray) ToGroupArrayOutputWithContext added in v3.47.1

func (i GroupArray) ToGroupArrayOutputWithContext(ctx context.Context) GroupArrayOutput

type GroupArrayInput added in v3.47.1

type GroupArrayInput interface {
	pulumi.Input

	ToGroupArrayOutput() GroupArrayOutput
	ToGroupArrayOutputWithContext(context.Context) GroupArrayOutput
}

GroupArrayInput is an input type that accepts GroupArray and GroupArrayOutput values. You can construct a concrete instance of `GroupArrayInput` via:

GroupArray{ GroupArgs{...} }

type GroupArrayOutput added in v3.47.1

type GroupArrayOutput struct{ *pulumi.OutputState }

func (GroupArrayOutput) ElementType added in v3.47.1

func (GroupArrayOutput) ElementType() reflect.Type

func (GroupArrayOutput) Index added in v3.47.1

func (GroupArrayOutput) ToGroupArrayOutput added in v3.47.1

func (o GroupArrayOutput) ToGroupArrayOutput() GroupArrayOutput

func (GroupArrayOutput) ToGroupArrayOutputWithContext added in v3.47.1

func (o GroupArrayOutput) ToGroupArrayOutputWithContext(ctx context.Context) GroupArrayOutput

type GroupInput added in v3.31.1

type GroupInput interface {
	pulumi.Input

	ToGroupOutput() GroupOutput
	ToGroupOutputWithContext(ctx context.Context) GroupOutput
}

type GroupMap added in v3.47.1

type GroupMap map[string]GroupInput

func (GroupMap) ElementType added in v3.47.1

func (GroupMap) ElementType() reflect.Type

func (GroupMap) ToGroupMapOutput added in v3.47.1

func (i GroupMap) ToGroupMapOutput() GroupMapOutput

func (GroupMap) ToGroupMapOutputWithContext added in v3.47.1

func (i GroupMap) ToGroupMapOutputWithContext(ctx context.Context) GroupMapOutput

type GroupMapInput added in v3.47.1

type GroupMapInput interface {
	pulumi.Input

	ToGroupMapOutput() GroupMapOutput
	ToGroupMapOutputWithContext(context.Context) GroupMapOutput
}

GroupMapInput is an input type that accepts GroupMap and GroupMapOutput values. You can construct a concrete instance of `GroupMapInput` via:

GroupMap{ "key": GroupArgs{...} }

type GroupMapOutput added in v3.47.1

type GroupMapOutput struct{ *pulumi.OutputState }

func (GroupMapOutput) ElementType added in v3.47.1

func (GroupMapOutput) ElementType() reflect.Type

func (GroupMapOutput) MapIndex added in v3.47.1

func (GroupMapOutput) ToGroupMapOutput added in v3.47.1

func (o GroupMapOutput) ToGroupMapOutput() GroupMapOutput

func (GroupMapOutput) ToGroupMapOutputWithContext added in v3.47.1

func (o GroupMapOutput) ToGroupMapOutputWithContext(ctx context.Context) GroupMapOutput

type GroupOutput added in v3.31.1

type GroupOutput struct {
	*pulumi.OutputState
}

func (GroupOutput) ElementType added in v3.31.1

func (GroupOutput) ElementType() reflect.Type

func (GroupOutput) ToGroupOutput added in v3.31.1

func (o GroupOutput) ToGroupOutput() GroupOutput

func (GroupOutput) ToGroupOutputWithContext added in v3.31.1

func (o GroupOutput) ToGroupOutputWithContext(ctx context.Context) GroupOutput

func (GroupOutput) ToGroupPtrOutput added in v3.47.1

func (o GroupOutput) ToGroupPtrOutput() GroupPtrOutput

func (GroupOutput) ToGroupPtrOutputWithContext added in v3.47.1

func (o GroupOutput) ToGroupPtrOutputWithContext(ctx context.Context) GroupPtrOutput

type GroupPtrInput added in v3.47.1

type GroupPtrInput interface {
	pulumi.Input

	ToGroupPtrOutput() GroupPtrOutput
	ToGroupPtrOutputWithContext(ctx context.Context) GroupPtrOutput
}

type GroupPtrOutput added in v3.47.1

type GroupPtrOutput struct {
	*pulumi.OutputState
}

func (GroupPtrOutput) ElementType added in v3.47.1

func (GroupPtrOutput) ElementType() reflect.Type

func (GroupPtrOutput) ToGroupPtrOutput added in v3.47.1

func (o GroupPtrOutput) ToGroupPtrOutput() GroupPtrOutput

func (GroupPtrOutput) ToGroupPtrOutputWithContext added in v3.47.1

func (o GroupPtrOutput) ToGroupPtrOutputWithContext(ctx context.Context) GroupPtrOutput

type GroupState

type GroupState struct {
	// A friendly name for this Management Group. If not specified, this'll be the same as the `name`.
	DisplayName pulumi.StringPtrInput
	// The name or UUID for this Management Group, which needs to be unique across your tenant. A new UUID will be generated if not provided. Changing this forces a new resource to be created.
	//
	// Deprecated: Deprecated in favour of `name`
	GroupId pulumi.StringPtrInput
	// The name or UUID for this Management Group, which needs to be unique across your tenant. A new UUID will be generated if not provided. Changing this forces a new resource to be created.
	Name pulumi.StringPtrInput
	// The ID of the Parent Management Group. Changing this forces a new resource to be created.
	ParentManagementGroupId pulumi.StringPtrInput
	// A list of Subscription GUIDs which should be assigned to the Management Group.
	SubscriptionIds pulumi.StringArrayInput
}

func (GroupState) ElementType

func (GroupState) ElementType() reflect.Type

type Lock

type Lock struct {
	pulumi.CustomResourceState

	// Specifies the Level to be used for this Lock. Possible values are `CanNotDelete` and `ReadOnly`. Changing this forces a new resource to be created.
	LockLevel pulumi.StringOutput `pulumi:"lockLevel"`
	// Specifies the name of the Management Lock. Changing this forces a new resource to be created.
	Name pulumi.StringOutput `pulumi:"name"`
	// Specifies some notes about the lock. Maximum of 512 characters. Changing this forces a new resource to be created.
	Notes pulumi.StringPtrOutput `pulumi:"notes"`
	// Specifies the scope at which the Management Lock should be created. Changing this forces a new resource to be created.
	Scope pulumi.StringOutput `pulumi:"scope"`
}

Manages a Management Lock which is scoped to a Subscription, Resource Group or Resource.

## Example Usage ### Subscription Level Lock)

```go package main

import (

"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/management"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		current, err := core.LookupSubscription(ctx, nil, nil)
		if err != nil {
			return err
		}
		_, err = management.NewLock(ctx, "subscription_level", &management.LockArgs{
			Scope:     pulumi.String(current.Id),
			LockLevel: pulumi.String("CanNotDelete"),
			Notes:     pulumi.String("Items can't be deleted in this subscription!"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Example Usage (Resource Group Level Lock)

```go package main

import (

"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/management"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		_, err = management.NewLock(ctx, "resource_group_level", &management.LockArgs{
			Scope:     example.ID(),
			LockLevel: pulumi.String("ReadOnly"),
			Notes:     pulumi.String("This Resource Group is Read-Only"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

``` ### Resource Level Lock)

```go package main

import (

"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/management"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/network"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		examplePublicIp, err := network.NewPublicIp(ctx, "examplePublicIp", &network.PublicIpArgs{
			Location:             exampleResourceGroup.Location,
			ResourceGroupName:    exampleResourceGroup.Name,
			AllocationMethod:     pulumi.String("Static"),
			IdleTimeoutInMinutes: pulumi.Int(30),
		})
		if err != nil {
			return err
		}
		_, err = management.NewLock(ctx, "public_ip", &management.LockArgs{
			Scope:     examplePublicIp.ID(),
			LockLevel: pulumi.String("CanNotDelete"),
			Notes:     pulumi.String("Locked because it's needed by a third-party"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

Management Locks can be imported using the `resource id`, e.g.

```sh

$ pulumi import azure:management/lock:Lock lock1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Authorization/locks/lock1

```

func GetLock

func GetLock(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *LockState, opts ...pulumi.ResourceOption) (*Lock, error)

GetLock gets an existing Lock 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 NewLock

func NewLock(ctx *pulumi.Context,
	name string, args *LockArgs, opts ...pulumi.ResourceOption) (*Lock, error)

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

func (*Lock) ElementType added in v3.31.1

func (*Lock) ElementType() reflect.Type

func (*Lock) ToLockOutput added in v3.31.1

func (i *Lock) ToLockOutput() LockOutput

func (*Lock) ToLockOutputWithContext added in v3.31.1

func (i *Lock) ToLockOutputWithContext(ctx context.Context) LockOutput

func (*Lock) ToLockPtrOutput added in v3.47.1

func (i *Lock) ToLockPtrOutput() LockPtrOutput

func (*Lock) ToLockPtrOutputWithContext added in v3.47.1

func (i *Lock) ToLockPtrOutputWithContext(ctx context.Context) LockPtrOutput

type LockArgs

type LockArgs struct {
	// Specifies the Level to be used for this Lock. Possible values are `CanNotDelete` and `ReadOnly`. Changing this forces a new resource to be created.
	LockLevel pulumi.StringInput
	// Specifies the name of the Management Lock. Changing this forces a new resource to be created.
	Name pulumi.StringPtrInput
	// Specifies some notes about the lock. Maximum of 512 characters. Changing this forces a new resource to be created.
	Notes pulumi.StringPtrInput
	// Specifies the scope at which the Management Lock should be created. Changing this forces a new resource to be created.
	Scope pulumi.StringInput
}

The set of arguments for constructing a Lock resource.

func (LockArgs) ElementType

func (LockArgs) ElementType() reflect.Type

type LockArray added in v3.47.1

type LockArray []LockInput

func (LockArray) ElementType added in v3.47.1

func (LockArray) ElementType() reflect.Type

func (LockArray) ToLockArrayOutput added in v3.47.1

func (i LockArray) ToLockArrayOutput() LockArrayOutput

func (LockArray) ToLockArrayOutputWithContext added in v3.47.1

func (i LockArray) ToLockArrayOutputWithContext(ctx context.Context) LockArrayOutput

type LockArrayInput added in v3.47.1

type LockArrayInput interface {
	pulumi.Input

	ToLockArrayOutput() LockArrayOutput
	ToLockArrayOutputWithContext(context.Context) LockArrayOutput
}

LockArrayInput is an input type that accepts LockArray and LockArrayOutput values. You can construct a concrete instance of `LockArrayInput` via:

LockArray{ LockArgs{...} }

type LockArrayOutput added in v3.47.1

type LockArrayOutput struct{ *pulumi.OutputState }

func (LockArrayOutput) ElementType added in v3.47.1

func (LockArrayOutput) ElementType() reflect.Type

func (LockArrayOutput) Index added in v3.47.1

func (LockArrayOutput) ToLockArrayOutput added in v3.47.1

func (o LockArrayOutput) ToLockArrayOutput() LockArrayOutput

func (LockArrayOutput) ToLockArrayOutputWithContext added in v3.47.1

func (o LockArrayOutput) ToLockArrayOutputWithContext(ctx context.Context) LockArrayOutput

type LockInput added in v3.31.1

type LockInput interface {
	pulumi.Input

	ToLockOutput() LockOutput
	ToLockOutputWithContext(ctx context.Context) LockOutput
}

type LockMap added in v3.47.1

type LockMap map[string]LockInput

func (LockMap) ElementType added in v3.47.1

func (LockMap) ElementType() reflect.Type

func (LockMap) ToLockMapOutput added in v3.47.1

func (i LockMap) ToLockMapOutput() LockMapOutput

func (LockMap) ToLockMapOutputWithContext added in v3.47.1

func (i LockMap) ToLockMapOutputWithContext(ctx context.Context) LockMapOutput

type LockMapInput added in v3.47.1

type LockMapInput interface {
	pulumi.Input

	ToLockMapOutput() LockMapOutput
	ToLockMapOutputWithContext(context.Context) LockMapOutput
}

LockMapInput is an input type that accepts LockMap and LockMapOutput values. You can construct a concrete instance of `LockMapInput` via:

LockMap{ "key": LockArgs{...} }

type LockMapOutput added in v3.47.1

type LockMapOutput struct{ *pulumi.OutputState }

func (LockMapOutput) ElementType added in v3.47.1

func (LockMapOutput) ElementType() reflect.Type

func (LockMapOutput) MapIndex added in v3.47.1

func (LockMapOutput) ToLockMapOutput added in v3.47.1

func (o LockMapOutput) ToLockMapOutput() LockMapOutput

func (LockMapOutput) ToLockMapOutputWithContext added in v3.47.1

func (o LockMapOutput) ToLockMapOutputWithContext(ctx context.Context) LockMapOutput

type LockOutput added in v3.31.1

type LockOutput struct {
	*pulumi.OutputState
}

func (LockOutput) ElementType added in v3.31.1

func (LockOutput) ElementType() reflect.Type

func (LockOutput) ToLockOutput added in v3.31.1

func (o LockOutput) ToLockOutput() LockOutput

func (LockOutput) ToLockOutputWithContext added in v3.31.1

func (o LockOutput) ToLockOutputWithContext(ctx context.Context) LockOutput

func (LockOutput) ToLockPtrOutput added in v3.47.1

func (o LockOutput) ToLockPtrOutput() LockPtrOutput

func (LockOutput) ToLockPtrOutputWithContext added in v3.47.1

func (o LockOutput) ToLockPtrOutputWithContext(ctx context.Context) LockPtrOutput

type LockPtrInput added in v3.47.1

type LockPtrInput interface {
	pulumi.Input

	ToLockPtrOutput() LockPtrOutput
	ToLockPtrOutputWithContext(ctx context.Context) LockPtrOutput
}

type LockPtrOutput added in v3.47.1

type LockPtrOutput struct {
	*pulumi.OutputState
}

func (LockPtrOutput) ElementType added in v3.47.1

func (LockPtrOutput) ElementType() reflect.Type

func (LockPtrOutput) ToLockPtrOutput added in v3.47.1

func (o LockPtrOutput) ToLockPtrOutput() LockPtrOutput

func (LockPtrOutput) ToLockPtrOutputWithContext added in v3.47.1

func (o LockPtrOutput) ToLockPtrOutputWithContext(ctx context.Context) LockPtrOutput

type LockState

type LockState struct {
	// Specifies the Level to be used for this Lock. Possible values are `CanNotDelete` and `ReadOnly`. Changing this forces a new resource to be created.
	LockLevel pulumi.StringPtrInput
	// Specifies the name of the Management Lock. Changing this forces a new resource to be created.
	Name pulumi.StringPtrInput
	// Specifies some notes about the lock. Maximum of 512 characters. Changing this forces a new resource to be created.
	Notes pulumi.StringPtrInput
	// Specifies the scope at which the Management Lock should be created. Changing this forces a new resource to be created.
	Scope pulumi.StringPtrInput
}

func (LockState) ElementType

func (LockState) ElementType() reflect.Type

type LookupGroupArgs

type LookupGroupArgs struct {
	// Specifies the display name of this Management Group.
	DisplayName *string `pulumi:"displayName"`
	// Specifies the name or UUID of this Management Group.
	//
	// Deprecated: Deprecated in favour of `name`
	GroupId *string `pulumi:"groupId"`
	// Specifies the name or UUID of this Management Group.
	Name *string `pulumi:"name"`
}

A collection of arguments for invoking getGroup.

type LookupGroupResult

type LookupGroupResult struct {
	DisplayName string `pulumi:"displayName"`
	// Deprecated: Deprecated in favour of `name`
	GroupId string `pulumi:"groupId"`
	// The provider-assigned unique ID for this managed resource.
	Id   string `pulumi:"id"`
	Name string `pulumi:"name"`
	// The ID of any Parent Management Group.
	ParentManagementGroupId string `pulumi:"parentManagementGroupId"`
	// A list of Subscription IDs which are assigned to the Management Group.
	SubscriptionIds []string `pulumi:"subscriptionIds"`
}

A collection of values returned by getGroup.

func LookupGroup

func LookupGroup(ctx *pulumi.Context, args *LookupGroupArgs, opts ...pulumi.InvokeOption) (*LookupGroupResult, error)

Use this data source to access information about an existing Management Group.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/management"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		opt0 := "00000000-0000-0000-0000-000000000000"
		example, err := management.LookupGroup(ctx, &management.LookupGroupArgs{
			Name: &opt0,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("displayName", example.DisplayName)
		return nil
	})
}

```

Jump to

Keyboard shortcuts

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