This repository has been archived by the owner on Mar 11, 2021. It is now read-only.
/
managementLockAtResourceGroupLevel.go
175 lines (151 loc) · 7.87 KB
/
managementLockAtResourceGroupLevel.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
// *** WARNING: this file was generated by the Pulumi SDK Generator. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package latest
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
// The lock information.
// Latest API Version: 2016-09-01.
type ManagementLockAtResourceGroupLevel struct {
pulumi.CustomResourceState
// The level of the lock. Possible values are: NotSpecified, CanNotDelete, ReadOnly. CanNotDelete means authorized users are able to read and modify the resources, but not delete. ReadOnly means authorized users can only read from a resource, but they can't modify or delete it.
Level pulumi.StringOutput `pulumi:"level"`
// The name of the lock.
Name pulumi.StringOutput `pulumi:"name"`
// Notes about the lock. Maximum of 512 characters.
Notes pulumi.StringPtrOutput `pulumi:"notes"`
// The owners of the lock.
Owners ManagementLockOwnerResponseArrayOutput `pulumi:"owners"`
// The resource type of the lock - Microsoft.Authorization/locks.
Type pulumi.StringOutput `pulumi:"type"`
}
// NewManagementLockAtResourceGroupLevel registers a new resource with the given unique name, arguments, and options.
func NewManagementLockAtResourceGroupLevel(ctx *pulumi.Context,
name string, args *ManagementLockAtResourceGroupLevelArgs, opts ...pulumi.ResourceOption) (*ManagementLockAtResourceGroupLevel, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Level == nil {
return nil, errors.New("invalid value for required argument 'Level'")
}
if args.LockName == nil {
return nil, errors.New("invalid value for required argument 'LockName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
aliases := pulumi.Aliases([]pulumi.Alias{
{
Type: pulumi.String("azure-nextgen:authorization/v20150101:ManagementLockAtResourceGroupLevel"),
},
{
Type: pulumi.String("azure-nextgen:authorization/v20160901:ManagementLockAtResourceGroupLevel"),
},
})
opts = append(opts, aliases)
var resource ManagementLockAtResourceGroupLevel
err := ctx.RegisterResource("azure-nextgen:authorization/latest:ManagementLockAtResourceGroupLevel", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetManagementLockAtResourceGroupLevel gets an existing ManagementLockAtResourceGroupLevel 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 GetManagementLockAtResourceGroupLevel(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ManagementLockAtResourceGroupLevelState, opts ...pulumi.ResourceOption) (*ManagementLockAtResourceGroupLevel, error) {
var resource ManagementLockAtResourceGroupLevel
err := ctx.ReadResource("azure-nextgen:authorization/latest:ManagementLockAtResourceGroupLevel", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ManagementLockAtResourceGroupLevel resources.
type managementLockAtResourceGroupLevelState struct {
// The level of the lock. Possible values are: NotSpecified, CanNotDelete, ReadOnly. CanNotDelete means authorized users are able to read and modify the resources, but not delete. ReadOnly means authorized users can only read from a resource, but they can't modify or delete it.
Level *string `pulumi:"level"`
// The name of the lock.
Name *string `pulumi:"name"`
// Notes about the lock. Maximum of 512 characters.
Notes *string `pulumi:"notes"`
// The owners of the lock.
Owners []ManagementLockOwnerResponse `pulumi:"owners"`
// The resource type of the lock - Microsoft.Authorization/locks.
Type *string `pulumi:"type"`
}
type ManagementLockAtResourceGroupLevelState struct {
// The level of the lock. Possible values are: NotSpecified, CanNotDelete, ReadOnly. CanNotDelete means authorized users are able to read and modify the resources, but not delete. ReadOnly means authorized users can only read from a resource, but they can't modify or delete it.
Level pulumi.StringPtrInput
// The name of the lock.
Name pulumi.StringPtrInput
// Notes about the lock. Maximum of 512 characters.
Notes pulumi.StringPtrInput
// The owners of the lock.
Owners ManagementLockOwnerResponseArrayInput
// The resource type of the lock - Microsoft.Authorization/locks.
Type pulumi.StringPtrInput
}
func (ManagementLockAtResourceGroupLevelState) ElementType() reflect.Type {
return reflect.TypeOf((*managementLockAtResourceGroupLevelState)(nil)).Elem()
}
type managementLockAtResourceGroupLevelArgs struct {
// The level of the lock. Possible values are: NotSpecified, CanNotDelete, ReadOnly. CanNotDelete means authorized users are able to read and modify the resources, but not delete. ReadOnly means authorized users can only read from a resource, but they can't modify or delete it.
Level string `pulumi:"level"`
// The lock name. The lock name can be a maximum of 260 characters. It cannot contain <, > %, &, :, \, ?, /, or any control characters.
LockName string `pulumi:"lockName"`
// Notes about the lock. Maximum of 512 characters.
Notes *string `pulumi:"notes"`
// The owners of the lock.
Owners []ManagementLockOwner `pulumi:"owners"`
// The name of the resource group to lock.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// The set of arguments for constructing a ManagementLockAtResourceGroupLevel resource.
type ManagementLockAtResourceGroupLevelArgs struct {
// The level of the lock. Possible values are: NotSpecified, CanNotDelete, ReadOnly. CanNotDelete means authorized users are able to read and modify the resources, but not delete. ReadOnly means authorized users can only read from a resource, but they can't modify or delete it.
Level pulumi.StringInput
// The lock name. The lock name can be a maximum of 260 characters. It cannot contain <, > %, &, :, \, ?, /, or any control characters.
LockName pulumi.StringInput
// Notes about the lock. Maximum of 512 characters.
Notes pulumi.StringPtrInput
// The owners of the lock.
Owners ManagementLockOwnerArrayInput
// The name of the resource group to lock.
ResourceGroupName pulumi.StringInput
}
func (ManagementLockAtResourceGroupLevelArgs) ElementType() reflect.Type {
return reflect.TypeOf((*managementLockAtResourceGroupLevelArgs)(nil)).Elem()
}
type ManagementLockAtResourceGroupLevelInput interface {
pulumi.Input
ToManagementLockAtResourceGroupLevelOutput() ManagementLockAtResourceGroupLevelOutput
ToManagementLockAtResourceGroupLevelOutputWithContext(ctx context.Context) ManagementLockAtResourceGroupLevelOutput
}
func (*ManagementLockAtResourceGroupLevel) ElementType() reflect.Type {
return reflect.TypeOf((*ManagementLockAtResourceGroupLevel)(nil))
}
func (i *ManagementLockAtResourceGroupLevel) ToManagementLockAtResourceGroupLevelOutput() ManagementLockAtResourceGroupLevelOutput {
return i.ToManagementLockAtResourceGroupLevelOutputWithContext(context.Background())
}
func (i *ManagementLockAtResourceGroupLevel) ToManagementLockAtResourceGroupLevelOutputWithContext(ctx context.Context) ManagementLockAtResourceGroupLevelOutput {
return pulumi.ToOutputWithContext(ctx, i).(ManagementLockAtResourceGroupLevelOutput)
}
type ManagementLockAtResourceGroupLevelOutput struct {
*pulumi.OutputState
}
func (ManagementLockAtResourceGroupLevelOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ManagementLockAtResourceGroupLevel)(nil))
}
func (o ManagementLockAtResourceGroupLevelOutput) ToManagementLockAtResourceGroupLevelOutput() ManagementLockAtResourceGroupLevelOutput {
return o
}
func (o ManagementLockAtResourceGroupLevelOutput) ToManagementLockAtResourceGroupLevelOutputWithContext(ctx context.Context) ManagementLockAtResourceGroupLevelOutput {
return o
}
func init() {
pulumi.RegisterOutputType(ManagementLockAtResourceGroupLevelOutput{})
}