Documentation
¶
Index ¶
- type ManangementLockdeprecated
- 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) LockLevel() pulumi.StringOutput
- func (o ManangementLockOutput) Name() pulumi.StringOutput
- func (o ManangementLockOutput) Notes() pulumi.StringPtrOutput
- func (o ManangementLockOutput) Scope() pulumi.StringOutput
- func (o ManangementLockOutput) ToManangementLockOutput() ManangementLockOutput
- func (o ManangementLockOutput) ToManangementLockOutputWithContext(ctx context.Context) ManangementLockOutput
- 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/v5/go/azure/core" "github.com/pulumi/pulumi-azure/sdk/v5/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 }) }
``` ### Resource Group Level Lock)
```go package main
import (
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core" "github.com/pulumi/pulumi-azure/sdk/v5/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/v5/go/azure/core" "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/management" "github.com/pulumi/pulumi-azure/sdk/v5/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
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) LockLevel ¶ added in v5.5.0
func (o ManangementLockOutput) LockLevel() pulumi.StringOutput
Specifies the Level to be used for this Lock. Possible values are `CanNotDelete` and `ReadOnly`. Changing this forces a new resource to be created.
func (ManangementLockOutput) Name ¶ added in v5.5.0
func (o ManangementLockOutput) Name() pulumi.StringOutput
Specifies the name of the Management Lock. Changing this forces a new resource to be created.
func (ManangementLockOutput) Notes ¶ added in v5.5.0
func (o ManangementLockOutput) Notes() pulumi.StringPtrOutput
Specifies some notes about the lock. Maximum of 512 characters. Changing this forces a new resource to be created.
func (ManangementLockOutput) Scope ¶ added in v5.5.0
func (o ManangementLockOutput) Scope() pulumi.StringOutput
Specifies the scope at which the Management Lock should be created. Changing this forces a new resource to be created.
func (ManangementLockOutput) ToManangementLockOutput ¶
func (o ManangementLockOutput) ToManangementLockOutput() ManangementLockOutput
func (ManangementLockOutput) ToManangementLockOutputWithContext ¶
func (o ManangementLockOutput) ToManangementLockOutputWithContext(ctx context.Context) ManangementLockOutput
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