-
Notifications
You must be signed in to change notification settings - Fork 50
/
manangementLock.go
114 lines (101 loc) · 4.59 KB
/
manangementLock.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
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package managementresource
import (
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/go/pulumi"
)
// Manages a Management Lock which is scoped to a Subscription, Resource Group or Resource.
type ManangementLock struct {
s *pulumi.ResourceState
}
// NewManangementLock registers a new resource with the given unique name, arguments, and options.
func NewManangementLock(ctx *pulumi.Context,
name string, args *ManangementLockArgs, opts ...pulumi.ResourceOpt) (*ManangementLock, error) {
if args == nil || args.LockLevel == nil {
return nil, errors.New("missing required argument 'LockLevel'")
}
if args == nil || args.Scope == nil {
return nil, errors.New("missing required argument 'Scope'")
}
inputs := make(map[string]interface{})
if args == nil {
inputs["lockLevel"] = nil
inputs["name"] = nil
inputs["notes"] = nil
inputs["scope"] = nil
} else {
inputs["lockLevel"] = args.LockLevel
inputs["name"] = args.Name
inputs["notes"] = args.Notes
inputs["scope"] = args.Scope
}
s, err := ctx.RegisterResource("azure:managementresource/manangementLock:ManangementLock", name, true, inputs, opts...)
if err != nil {
return nil, err
}
return &ManangementLock{s: s}, nil
}
// 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 GetManangementLock(ctx *pulumi.Context,
name string, id pulumi.ID, state *ManangementLockState, opts ...pulumi.ResourceOpt) (*ManangementLock, error) {
inputs := make(map[string]interface{})
if state != nil {
inputs["lockLevel"] = state.LockLevel
inputs["name"] = state.Name
inputs["notes"] = state.Notes
inputs["scope"] = state.Scope
}
s, err := ctx.ReadResource("azure:managementresource/manangementLock:ManangementLock", name, id, inputs, opts...)
if err != nil {
return nil, err
}
return &ManangementLock{s: s}, nil
}
// URN is this resource's unique name assigned by Pulumi.
func (r *ManangementLock) URN() *pulumi.URNOutput {
return r.s.URN()
}
// ID is this resource's unique identifier assigned by its provider.
func (r *ManangementLock) ID() *pulumi.IDOutput {
return r.s.ID()
}
// 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 (r *ManangementLock) LockLevel() *pulumi.StringOutput {
return (*pulumi.StringOutput)(r.s.State["lockLevel"])
}
// Specifies the name of the Management Lock. Changing this forces a new resource to be created.
func (r *ManangementLock) Name() *pulumi.StringOutput {
return (*pulumi.StringOutput)(r.s.State["name"])
}
// Specifies some notes about the lock. Maximum of 512 characters. Changing this forces a new resource to be created.
func (r *ManangementLock) Notes() *pulumi.StringOutput {
return (*pulumi.StringOutput)(r.s.State["notes"])
}
// Specifies the scope at which the Management Lock should be created. Changing this forces a new resource to be created.
func (r *ManangementLock) Scope() *pulumi.StringOutput {
return (*pulumi.StringOutput)(r.s.State["scope"])
}
// Input properties used for looking up and filtering ManangementLock resources.
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 interface{}
// Specifies the name of the Management Lock. Changing this forces a new resource to be created.
Name interface{}
// Specifies some notes about the lock. Maximum of 512 characters. Changing this forces a new resource to be created.
Notes interface{}
// Specifies the scope at which the Management Lock should be created. Changing this forces a new resource to be created.
Scope interface{}
}
// The set of arguments for constructing a ManangementLock resource.
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 interface{}
// Specifies the name of the Management Lock. Changing this forces a new resource to be created.
Name interface{}
// Specifies some notes about the lock. Maximum of 512 characters. Changing this forces a new resource to be created.
Notes interface{}
// Specifies the scope at which the Management Lock should be created. Changing this forces a new resource to be created.
Scope interface{}
}