Documentation ¶
Index ¶
- type ManangementLockdeprecated
- func (*ManangementLock) ElementType() reflect.Type
- func (i *ManangementLock) ToManangementLockOutput() ManangementLockOutput
- func (i *ManangementLock) ToManangementLockOutputWithContext(ctx context.Context) ManangementLockOutput
- func (i *ManangementLock) ToManangementLockPtrOutput() ManangementLockPtrOutput
- func (i *ManangementLock) ToManangementLockPtrOutputWithContext(ctx context.Context) ManangementLockPtrOutput
- type ManangementLockArgs
- type ManangementLockArray
- type ManangementLockArrayInput
- type ManangementLockArrayOutput
- func (ManangementLockArrayOutput) ElementType() reflect.Type
- func (o ManangementLockArrayOutput) Index(i pulumi.IntInput) ManangementLockOutput
- func (o ManangementLockArrayOutput) ToManangementLockArrayOutput() ManangementLockArrayOutput
- func (o ManangementLockArrayOutput) ToManangementLockArrayOutputWithContext(ctx context.Context) ManangementLockArrayOutput
- type ManangementLockInput
- type ManangementLockMap
- type ManangementLockMapInput
- type ManangementLockMapOutput
- func (ManangementLockMapOutput) ElementType() reflect.Type
- func (o ManangementLockMapOutput) MapIndex(k pulumi.StringInput) ManangementLockOutput
- func (o ManangementLockMapOutput) ToManangementLockMapOutput() ManangementLockMapOutput
- func (o ManangementLockMapOutput) ToManangementLockMapOutputWithContext(ctx context.Context) ManangementLockMapOutput
- type ManangementLockOutput
- func (ManangementLockOutput) ElementType() reflect.Type
- func (o ManangementLockOutput) ToManangementLockOutput() ManangementLockOutput
- func (o ManangementLockOutput) ToManangementLockOutputWithContext(ctx context.Context) ManangementLockOutput
- func (o ManangementLockOutput) ToManangementLockPtrOutput() ManangementLockPtrOutput
- func (o ManangementLockOutput) ToManangementLockPtrOutputWithContext(ctx context.Context) ManangementLockPtrOutput
- type ManangementLockPtrInput
- type ManangementLockPtrOutput
- type ManangementLockState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ManangementLock
deprecated
type ManangementLock 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/v4/go/azure/core" "github.com/pulumi/pulumi-azure/sdk/v4/go/azure/management" "github.com/pulumi/pulumi/sdk/v3/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/v4/go/azure/core" "github.com/pulumi/pulumi-azure/sdk/v4/go/azure/management" "github.com/pulumi/pulumi/sdk/v3/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/v4/go/azure/core" "github.com/pulumi/pulumi-azure/sdk/v4/go/azure/management" "github.com/pulumi/pulumi-azure/sdk/v4/go/azure/network" "github.com/pulumi/pulumi/sdk/v3/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:managementresource/manangementLock:ManangementLock lock1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Authorization/locks/lock1
```
Deprecated: azure.managementresource.ManangementLock has been deprecated in favor of azure.management.Lock
func GetManangementLock ¶
func GetManangementLock(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ManangementLockState, opts ...pulumi.ResourceOption) (*ManangementLock, error)
GetManangementLock gets an existing ManangementLock 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 NewManangementLock ¶
func NewManangementLock(ctx *pulumi.Context, name string, args *ManangementLockArgs, opts ...pulumi.ResourceOption) (*ManangementLock, error)
NewManangementLock registers a new resource with the given unique name, arguments, and options.
func (*ManangementLock) ElementType ¶
func (*ManangementLock) ElementType() reflect.Type
func (*ManangementLock) ToManangementLockOutput ¶
func (i *ManangementLock) ToManangementLockOutput() ManangementLockOutput
func (*ManangementLock) ToManangementLockOutputWithContext ¶
func (i *ManangementLock) ToManangementLockOutputWithContext(ctx context.Context) ManangementLockOutput
func (*ManangementLock) ToManangementLockPtrOutput ¶
func (i *ManangementLock) ToManangementLockPtrOutput() ManangementLockPtrOutput
func (*ManangementLock) ToManangementLockPtrOutputWithContext ¶
func (i *ManangementLock) ToManangementLockPtrOutputWithContext(ctx context.Context) ManangementLockPtrOutput
type ManangementLockArgs ¶
type ManangementLockArgs 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 ManangementLock resource.
func (ManangementLockArgs) ElementType ¶
func (ManangementLockArgs) ElementType() reflect.Type
type ManangementLockArray ¶
type ManangementLockArray []ManangementLockInput
func (ManangementLockArray) ElementType ¶
func (ManangementLockArray) ElementType() reflect.Type
func (ManangementLockArray) ToManangementLockArrayOutput ¶
func (i ManangementLockArray) ToManangementLockArrayOutput() ManangementLockArrayOutput
func (ManangementLockArray) ToManangementLockArrayOutputWithContext ¶
func (i ManangementLockArray) ToManangementLockArrayOutputWithContext(ctx context.Context) ManangementLockArrayOutput
type ManangementLockArrayInput ¶
type ManangementLockArrayInput interface { pulumi.Input ToManangementLockArrayOutput() ManangementLockArrayOutput ToManangementLockArrayOutputWithContext(context.Context) ManangementLockArrayOutput }
ManangementLockArrayInput is an input type that accepts ManangementLockArray and ManangementLockArrayOutput values. You can construct a concrete instance of `ManangementLockArrayInput` via:
ManangementLockArray{ ManangementLockArgs{...} }
type ManangementLockArrayOutput ¶
type ManangementLockArrayOutput struct{ *pulumi.OutputState }
func (ManangementLockArrayOutput) ElementType ¶
func (ManangementLockArrayOutput) ElementType() reflect.Type
func (ManangementLockArrayOutput) Index ¶
func (o ManangementLockArrayOutput) Index(i pulumi.IntInput) ManangementLockOutput
func (ManangementLockArrayOutput) ToManangementLockArrayOutput ¶
func (o ManangementLockArrayOutput) ToManangementLockArrayOutput() ManangementLockArrayOutput
func (ManangementLockArrayOutput) ToManangementLockArrayOutputWithContext ¶
func (o ManangementLockArrayOutput) ToManangementLockArrayOutputWithContext(ctx context.Context) ManangementLockArrayOutput
type ManangementLockInput ¶
type ManangementLockInput interface { pulumi.Input ToManangementLockOutput() ManangementLockOutput ToManangementLockOutputWithContext(ctx context.Context) ManangementLockOutput }
type ManangementLockMap ¶
type ManangementLockMap map[string]ManangementLockInput
func (ManangementLockMap) ElementType ¶
func (ManangementLockMap) ElementType() reflect.Type
func (ManangementLockMap) ToManangementLockMapOutput ¶
func (i ManangementLockMap) ToManangementLockMapOutput() ManangementLockMapOutput
func (ManangementLockMap) ToManangementLockMapOutputWithContext ¶
func (i ManangementLockMap) ToManangementLockMapOutputWithContext(ctx context.Context) ManangementLockMapOutput
type ManangementLockMapInput ¶
type ManangementLockMapInput interface { pulumi.Input ToManangementLockMapOutput() ManangementLockMapOutput ToManangementLockMapOutputWithContext(context.Context) ManangementLockMapOutput }
ManangementLockMapInput is an input type that accepts ManangementLockMap and ManangementLockMapOutput values. You can construct a concrete instance of `ManangementLockMapInput` via:
ManangementLockMap{ "key": ManangementLockArgs{...} }
type ManangementLockMapOutput ¶
type ManangementLockMapOutput struct{ *pulumi.OutputState }
func (ManangementLockMapOutput) ElementType ¶
func (ManangementLockMapOutput) ElementType() reflect.Type
func (ManangementLockMapOutput) MapIndex ¶
func (o ManangementLockMapOutput) MapIndex(k pulumi.StringInput) ManangementLockOutput
func (ManangementLockMapOutput) ToManangementLockMapOutput ¶
func (o ManangementLockMapOutput) ToManangementLockMapOutput() ManangementLockMapOutput
func (ManangementLockMapOutput) ToManangementLockMapOutputWithContext ¶
func (o ManangementLockMapOutput) ToManangementLockMapOutputWithContext(ctx context.Context) ManangementLockMapOutput
type ManangementLockOutput ¶
type ManangementLockOutput struct {
*pulumi.OutputState
}
func (ManangementLockOutput) ElementType ¶
func (ManangementLockOutput) ElementType() reflect.Type
func (ManangementLockOutput) ToManangementLockOutput ¶
func (o ManangementLockOutput) ToManangementLockOutput() ManangementLockOutput
func (ManangementLockOutput) ToManangementLockOutputWithContext ¶
func (o ManangementLockOutput) ToManangementLockOutputWithContext(ctx context.Context) ManangementLockOutput
func (ManangementLockOutput) ToManangementLockPtrOutput ¶
func (o ManangementLockOutput) ToManangementLockPtrOutput() ManangementLockPtrOutput
func (ManangementLockOutput) ToManangementLockPtrOutputWithContext ¶
func (o ManangementLockOutput) ToManangementLockPtrOutputWithContext(ctx context.Context) ManangementLockPtrOutput
type ManangementLockPtrInput ¶
type ManangementLockPtrInput interface { pulumi.Input ToManangementLockPtrOutput() ManangementLockPtrOutput ToManangementLockPtrOutputWithContext(ctx context.Context) ManangementLockPtrOutput }
type ManangementLockPtrOutput ¶
type ManangementLockPtrOutput struct {
*pulumi.OutputState
}
func (ManangementLockPtrOutput) ElementType ¶
func (ManangementLockPtrOutput) ElementType() reflect.Type
func (ManangementLockPtrOutput) ToManangementLockPtrOutput ¶
func (o ManangementLockPtrOutput) ToManangementLockPtrOutput() ManangementLockPtrOutput
func (ManangementLockPtrOutput) ToManangementLockPtrOutputWithContext ¶
func (o ManangementLockPtrOutput) ToManangementLockPtrOutputWithContext(ctx context.Context) ManangementLockPtrOutput
type ManangementLockState ¶
type ManangementLockState 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 (ManangementLockState) ElementType ¶
func (ManangementLockState) ElementType() reflect.Type