/
lakeEnvironmentIamBinding.go
195 lines (165 loc) · 9.51 KB
/
lakeEnvironmentIamBinding.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
// Code generated by the Pulumi SDK Generator DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package v1
import (
"context"
"reflect"
"errors"
iam "github.com/pulumi/pulumi-google-native/sdk/go/google/iam/v1"
"github.com/pulumi/pulumi-google-native/sdk/go/google/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.
type LakeEnvironmentIamBinding struct {
pulumi.CustomResourceState
// An IAM Condition for a given binding. See https://cloud.google.com/iam/docs/conditions-overview for additional details.
Condition iam.ConditionPtrOutput `pulumi:"condition"`
// The etag of the resource's IAM policy.
Etag pulumi.StringOutput `pulumi:"etag"`
// Identities that will be granted the privilege in role. Each entry can have one of the following values:
//
// * user:{emailid}: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
// * serviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
// * group:{emailid}: An email address that represents a Google group. For example, admins@example.com.
// * domain:{domain}: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
Members pulumi.StringArrayOutput `pulumi:"members"`
// The name of the resource to manage IAM policies for.
Name pulumi.StringOutput `pulumi:"name"`
// The project in which the resource belongs. If it is not provided, a default will be supplied.
Project pulumi.StringOutput `pulumi:"project"`
// The role that should be applied. Only one `IamBinding` can be used per role.
Role pulumi.StringOutput `pulumi:"role"`
}
// NewLakeEnvironmentIamBinding registers a new resource with the given unique name, arguments, and options.
func NewLakeEnvironmentIamBinding(ctx *pulumi.Context,
name string, args *LakeEnvironmentIamBindingArgs, opts ...pulumi.ResourceOption) (*LakeEnvironmentIamBinding, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Members == nil {
return nil, errors.New("invalid value for required argument 'Members'")
}
if args.Name == nil {
return nil, errors.New("invalid value for required argument 'Name'")
}
if args.Role == nil {
return nil, errors.New("invalid value for required argument 'Role'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource LakeEnvironmentIamBinding
err := ctx.RegisterResource("google-native:dataplex/v1:LakeEnvironmentIamBinding", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetLakeEnvironmentIamBinding gets an existing LakeEnvironmentIamBinding 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 GetLakeEnvironmentIamBinding(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *LakeEnvironmentIamBindingState, opts ...pulumi.ResourceOption) (*LakeEnvironmentIamBinding, error) {
var resource LakeEnvironmentIamBinding
err := ctx.ReadResource("google-native:dataplex/v1:LakeEnvironmentIamBinding", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering LakeEnvironmentIamBinding resources.
type lakeEnvironmentIamBindingState struct {
}
type LakeEnvironmentIamBindingState struct {
}
func (LakeEnvironmentIamBindingState) ElementType() reflect.Type {
return reflect.TypeOf((*lakeEnvironmentIamBindingState)(nil)).Elem()
}
type lakeEnvironmentIamBindingArgs struct {
// An IAM Condition for a given binding.
Condition *iam.Condition `pulumi:"condition"`
// Identities that will be granted the privilege in role. Each entry can have one of the following values:
//
// * user:{emailid}: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
// * serviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
// * group:{emailid}: An email address that represents a Google group. For example, admins@example.com.
// * domain:{domain}: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
Members []string `pulumi:"members"`
// The name of the resource to manage IAM policies for.
Name string `pulumi:"name"`
// The role that should be applied. Only one `IamBinding` can be used per role.
Role string `pulumi:"role"`
}
// The set of arguments for constructing a LakeEnvironmentIamBinding resource.
type LakeEnvironmentIamBindingArgs struct {
// An IAM Condition for a given binding.
Condition iam.ConditionPtrInput
// Identities that will be granted the privilege in role. Each entry can have one of the following values:
//
// * user:{emailid}: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
// * serviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
// * group:{emailid}: An email address that represents a Google group. For example, admins@example.com.
// * domain:{domain}: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
Members pulumi.StringArrayInput
// The name of the resource to manage IAM policies for.
Name pulumi.StringInput
// The role that should be applied. Only one `IamBinding` can be used per role.
Role pulumi.StringInput
}
func (LakeEnvironmentIamBindingArgs) ElementType() reflect.Type {
return reflect.TypeOf((*lakeEnvironmentIamBindingArgs)(nil)).Elem()
}
type LakeEnvironmentIamBindingInput interface {
pulumi.Input
ToLakeEnvironmentIamBindingOutput() LakeEnvironmentIamBindingOutput
ToLakeEnvironmentIamBindingOutputWithContext(ctx context.Context) LakeEnvironmentIamBindingOutput
}
func (*LakeEnvironmentIamBinding) ElementType() reflect.Type {
return reflect.TypeOf((**LakeEnvironmentIamBinding)(nil)).Elem()
}
func (i *LakeEnvironmentIamBinding) ToLakeEnvironmentIamBindingOutput() LakeEnvironmentIamBindingOutput {
return i.ToLakeEnvironmentIamBindingOutputWithContext(context.Background())
}
func (i *LakeEnvironmentIamBinding) ToLakeEnvironmentIamBindingOutputWithContext(ctx context.Context) LakeEnvironmentIamBindingOutput {
return pulumi.ToOutputWithContext(ctx, i).(LakeEnvironmentIamBindingOutput)
}
type LakeEnvironmentIamBindingOutput struct{ *pulumi.OutputState }
func (LakeEnvironmentIamBindingOutput) ElementType() reflect.Type {
return reflect.TypeOf((**LakeEnvironmentIamBinding)(nil)).Elem()
}
func (o LakeEnvironmentIamBindingOutput) ToLakeEnvironmentIamBindingOutput() LakeEnvironmentIamBindingOutput {
return o
}
func (o LakeEnvironmentIamBindingOutput) ToLakeEnvironmentIamBindingOutputWithContext(ctx context.Context) LakeEnvironmentIamBindingOutput {
return o
}
// An IAM Condition for a given binding. See https://cloud.google.com/iam/docs/conditions-overview for additional details.
func (o LakeEnvironmentIamBindingOutput) Condition() iam.ConditionPtrOutput {
return o.ApplyT(func(v *LakeEnvironmentIamBinding) iam.ConditionPtrOutput { return v.Condition }).(iam.ConditionPtrOutput)
}
// The etag of the resource's IAM policy.
func (o LakeEnvironmentIamBindingOutput) Etag() pulumi.StringOutput {
return o.ApplyT(func(v *LakeEnvironmentIamBinding) pulumi.StringOutput { return v.Etag }).(pulumi.StringOutput)
}
// Identities that will be granted the privilege in role. Each entry can have one of the following values:
//
// - user:{emailid}: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.
// - serviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.
// - group:{emailid}: An email address that represents a Google group. For example, admins@example.com.
// - domain:{domain}: A G Suite domain (primary, instead of alias) name that represents all the users of that domain. For example, google.com or example.com.
func (o LakeEnvironmentIamBindingOutput) Members() pulumi.StringArrayOutput {
return o.ApplyT(func(v *LakeEnvironmentIamBinding) pulumi.StringArrayOutput { return v.Members }).(pulumi.StringArrayOutput)
}
// The name of the resource to manage IAM policies for.
func (o LakeEnvironmentIamBindingOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *LakeEnvironmentIamBinding) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The project in which the resource belongs. If it is not provided, a default will be supplied.
func (o LakeEnvironmentIamBindingOutput) Project() pulumi.StringOutput {
return o.ApplyT(func(v *LakeEnvironmentIamBinding) pulumi.StringOutput { return v.Project }).(pulumi.StringOutput)
}
// The role that should be applied. Only one `IamBinding` can be used per role.
func (o LakeEnvironmentIamBindingOutput) Role() pulumi.StringOutput {
return o.ApplyT(func(v *LakeEnvironmentIamBinding) pulumi.StringOutput { return v.Role }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*LakeEnvironmentIamBindingInput)(nil)).Elem(), &LakeEnvironmentIamBinding{})
pulumi.RegisterOutputType(LakeEnvironmentIamBindingOutput{})
}