forked from cloud-toolkit/cloud-toolkit-aws
/
accountIam.go
199 lines (155 loc) · 6.26 KB
/
accountIam.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
197
198
199
// Code generated by Pulumi SDK Generator DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package landingzone
import (
"context"
"reflect"
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/iam"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Cluster is a component that configure the IAM service for a given account.
type AccountIam struct {
pulumi.ResourceState
// The IAM Account Alias.
Alias iam.AccountAliasOutput `pulumi:"alias"`
// The IAM Account Password policy.
PasswordPolicy iam.AccountPasswordPolicyOutput `pulumi:"passwordPolicy"`
}
// NewAccountIam registers a new resource with the given unique name, arguments, and options.
func NewAccountIam(ctx *pulumi.Context,
name string, args *AccountIamArgs, opts ...pulumi.ResourceOption) (*AccountIam, error) {
if args == nil {
args = &AccountIamArgs{}
}
opts = pkgResourceDefaultOpts(opts)
var resource AccountIam
err := ctx.RegisterRemoteComponentResource("cloud-toolkit-aws:landingzone:AccountIam", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
type accountIamArgs struct {
// The alias to be used for IAM.
Alias *string `pulumi:"alias"`
// The IAM password policy configuration.
PasswordPolicy *AccountPasswordPolicy `pulumi:"passwordPolicy"`
}
// The set of arguments for constructing a AccountIam resource.
type AccountIamArgs struct {
// The alias to be used for IAM.
Alias pulumi.StringPtrInput
// The IAM password policy configuration.
PasswordPolicy AccountPasswordPolicyPtrInput
}
func (AccountIamArgs) ElementType() reflect.Type {
return reflect.TypeOf((*accountIamArgs)(nil)).Elem()
}
type AccountIamInput interface {
pulumi.Input
ToAccountIamOutput() AccountIamOutput
ToAccountIamOutputWithContext(ctx context.Context) AccountIamOutput
}
func (*AccountIam) ElementType() reflect.Type {
return reflect.TypeOf((**AccountIam)(nil)).Elem()
}
func (i *AccountIam) ToAccountIamOutput() AccountIamOutput {
return i.ToAccountIamOutputWithContext(context.Background())
}
func (i *AccountIam) ToAccountIamOutputWithContext(ctx context.Context) AccountIamOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountIamOutput)
}
// AccountIamArrayInput is an input type that accepts AccountIamArray and AccountIamArrayOutput values.
// You can construct a concrete instance of `AccountIamArrayInput` via:
//
// AccountIamArray{ AccountIamArgs{...} }
type AccountIamArrayInput interface {
pulumi.Input
ToAccountIamArrayOutput() AccountIamArrayOutput
ToAccountIamArrayOutputWithContext(context.Context) AccountIamArrayOutput
}
type AccountIamArray []AccountIamInput
func (AccountIamArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AccountIam)(nil)).Elem()
}
func (i AccountIamArray) ToAccountIamArrayOutput() AccountIamArrayOutput {
return i.ToAccountIamArrayOutputWithContext(context.Background())
}
func (i AccountIamArray) ToAccountIamArrayOutputWithContext(ctx context.Context) AccountIamArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountIamArrayOutput)
}
// AccountIamMapInput is an input type that accepts AccountIamMap and AccountIamMapOutput values.
// You can construct a concrete instance of `AccountIamMapInput` via:
//
// AccountIamMap{ "key": AccountIamArgs{...} }
type AccountIamMapInput interface {
pulumi.Input
ToAccountIamMapOutput() AccountIamMapOutput
ToAccountIamMapOutputWithContext(context.Context) AccountIamMapOutput
}
type AccountIamMap map[string]AccountIamInput
func (AccountIamMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AccountIam)(nil)).Elem()
}
func (i AccountIamMap) ToAccountIamMapOutput() AccountIamMapOutput {
return i.ToAccountIamMapOutputWithContext(context.Background())
}
func (i AccountIamMap) ToAccountIamMapOutputWithContext(ctx context.Context) AccountIamMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccountIamMapOutput)
}
type AccountIamOutput struct{ *pulumi.OutputState }
func (AccountIamOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AccountIam)(nil)).Elem()
}
func (o AccountIamOutput) ToAccountIamOutput() AccountIamOutput {
return o
}
func (o AccountIamOutput) ToAccountIamOutputWithContext(ctx context.Context) AccountIamOutput {
return o
}
// The IAM Account Alias.
func (o AccountIamOutput) Alias() iam.AccountAliasOutput {
return o.ApplyT(func(v *AccountIam) iam.AccountAliasOutput { return v.Alias }).(iam.AccountAliasOutput)
}
// The IAM Account Password policy.
func (o AccountIamOutput) PasswordPolicy() iam.AccountPasswordPolicyOutput {
return o.ApplyT(func(v *AccountIam) iam.AccountPasswordPolicyOutput { return v.PasswordPolicy }).(iam.AccountPasswordPolicyOutput)
}
type AccountIamArrayOutput struct{ *pulumi.OutputState }
func (AccountIamArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AccountIam)(nil)).Elem()
}
func (o AccountIamArrayOutput) ToAccountIamArrayOutput() AccountIamArrayOutput {
return o
}
func (o AccountIamArrayOutput) ToAccountIamArrayOutputWithContext(ctx context.Context) AccountIamArrayOutput {
return o
}
func (o AccountIamArrayOutput) Index(i pulumi.IntInput) AccountIamOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AccountIam {
return vs[0].([]*AccountIam)[vs[1].(int)]
}).(AccountIamOutput)
}
type AccountIamMapOutput struct{ *pulumi.OutputState }
func (AccountIamMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AccountIam)(nil)).Elem()
}
func (o AccountIamMapOutput) ToAccountIamMapOutput() AccountIamMapOutput {
return o
}
func (o AccountIamMapOutput) ToAccountIamMapOutputWithContext(ctx context.Context) AccountIamMapOutput {
return o
}
func (o AccountIamMapOutput) MapIndex(k pulumi.StringInput) AccountIamOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AccountIam {
return vs[0].(map[string]*AccountIam)[vs[1].(string)]
}).(AccountIamOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AccountIamInput)(nil)).Elem(), &AccountIam{})
pulumi.RegisterInputType(reflect.TypeOf((*AccountIamArrayInput)(nil)).Elem(), AccountIamArray{})
pulumi.RegisterInputType(reflect.TypeOf((*AccountIamMapInput)(nil)).Elem(), AccountIamMap{})
pulumi.RegisterOutputType(AccountIamOutput{})
pulumi.RegisterOutputType(AccountIamArrayOutput{})
pulumi.RegisterOutputType(AccountIamMapOutput{})
}