This repository has been archived by the owner on Mar 11, 2021. It is now read-only.
/
scopeMap.go
196 lines (172 loc) · 6.58 KB
/
scopeMap.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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
// *** 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 v20190501preview
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
// An object that represents a scope map for a container registry.
type ScopeMap struct {
pulumi.CustomResourceState
// The list of scoped permissions for registry artifacts.
// E.g. repositories/repository-name/content/read,
// repositories/repository-name/metadata/write
Actions pulumi.StringArrayOutput `pulumi:"actions"`
// The creation date of scope map.
CreationDate pulumi.StringOutput `pulumi:"creationDate"`
// The user friendly description of the scope map.
Description pulumi.StringPtrOutput `pulumi:"description"`
// The name of the resource.
Name pulumi.StringOutput `pulumi:"name"`
// Provisioning state of the resource.
ProvisioningState pulumi.StringOutput `pulumi:"provisioningState"`
// Metadata pertaining to creation and last modification of the resource.
SystemData SystemDataResponseOutput `pulumi:"systemData"`
// The type of the resource.
Type pulumi.StringOutput `pulumi:"type"`
}
// NewScopeMap registers a new resource with the given unique name, arguments, and options.
func NewScopeMap(ctx *pulumi.Context,
name string, args *ScopeMapArgs, opts ...pulumi.ResourceOption) (*ScopeMap, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Actions == nil {
return nil, errors.New("invalid value for required argument 'Actions'")
}
if args.RegistryName == nil {
return nil, errors.New("invalid value for required argument 'RegistryName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.ScopeMapName == nil {
return nil, errors.New("invalid value for required argument 'ScopeMapName'")
}
aliases := pulumi.Aliases([]pulumi.Alias{
{
Type: pulumi.String("azure-nextgen:containerregistry/v20201101preview:ScopeMap"),
},
})
opts = append(opts, aliases)
var resource ScopeMap
err := ctx.RegisterResource("azure-nextgen:containerregistry/v20190501preview:ScopeMap", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetScopeMap gets an existing ScopeMap 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 GetScopeMap(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ScopeMapState, opts ...pulumi.ResourceOption) (*ScopeMap, error) {
var resource ScopeMap
err := ctx.ReadResource("azure-nextgen:containerregistry/v20190501preview:ScopeMap", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ScopeMap resources.
type scopeMapState struct {
// The list of scoped permissions for registry artifacts.
// E.g. repositories/repository-name/content/read,
// repositories/repository-name/metadata/write
Actions []string `pulumi:"actions"`
// The creation date of scope map.
CreationDate *string `pulumi:"creationDate"`
// The user friendly description of the scope map.
Description *string `pulumi:"description"`
// The name of the resource.
Name *string `pulumi:"name"`
// Provisioning state of the resource.
ProvisioningState *string `pulumi:"provisioningState"`
// Metadata pertaining to creation and last modification of the resource.
SystemData *SystemDataResponse `pulumi:"systemData"`
// The type of the resource.
Type *string `pulumi:"type"`
}
type ScopeMapState struct {
// The list of scoped permissions for registry artifacts.
// E.g. repositories/repository-name/content/read,
// repositories/repository-name/metadata/write
Actions pulumi.StringArrayInput
// The creation date of scope map.
CreationDate pulumi.StringPtrInput
// The user friendly description of the scope map.
Description pulumi.StringPtrInput
// The name of the resource.
Name pulumi.StringPtrInput
// Provisioning state of the resource.
ProvisioningState pulumi.StringPtrInput
// Metadata pertaining to creation and last modification of the resource.
SystemData SystemDataResponsePtrInput
// The type of the resource.
Type pulumi.StringPtrInput
}
func (ScopeMapState) ElementType() reflect.Type {
return reflect.TypeOf((*scopeMapState)(nil)).Elem()
}
type scopeMapArgs struct {
// The list of scoped permissions for registry artifacts.
// E.g. repositories/repository-name/content/read,
// repositories/repository-name/metadata/write
Actions []string `pulumi:"actions"`
// The user friendly description of the scope map.
Description *string `pulumi:"description"`
// The name of the container registry.
RegistryName string `pulumi:"registryName"`
// The name of the resource group to which the container registry belongs.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The name of the scope map.
ScopeMapName string `pulumi:"scopeMapName"`
}
// The set of arguments for constructing a ScopeMap resource.
type ScopeMapArgs struct {
// The list of scoped permissions for registry artifacts.
// E.g. repositories/repository-name/content/read,
// repositories/repository-name/metadata/write
Actions pulumi.StringArrayInput
// The user friendly description of the scope map.
Description pulumi.StringPtrInput
// The name of the container registry.
RegistryName pulumi.StringInput
// The name of the resource group to which the container registry belongs.
ResourceGroupName pulumi.StringInput
// The name of the scope map.
ScopeMapName pulumi.StringInput
}
func (ScopeMapArgs) ElementType() reflect.Type {
return reflect.TypeOf((*scopeMapArgs)(nil)).Elem()
}
type ScopeMapInput interface {
pulumi.Input
ToScopeMapOutput() ScopeMapOutput
ToScopeMapOutputWithContext(ctx context.Context) ScopeMapOutput
}
func (*ScopeMap) ElementType() reflect.Type {
return reflect.TypeOf((*ScopeMap)(nil))
}
func (i *ScopeMap) ToScopeMapOutput() ScopeMapOutput {
return i.ToScopeMapOutputWithContext(context.Background())
}
func (i *ScopeMap) ToScopeMapOutputWithContext(ctx context.Context) ScopeMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ScopeMapOutput)
}
type ScopeMapOutput struct {
*pulumi.OutputState
}
func (ScopeMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ScopeMap)(nil))
}
func (o ScopeMapOutput) ToScopeMapOutput() ScopeMapOutput {
return o
}
func (o ScopeMapOutput) ToScopeMapOutputWithContext(ctx context.Context) ScopeMapOutput {
return o
}
func init() {
pulumi.RegisterOutputType(ScopeMapOutput{})
}