This repository has been archived by the owner on Jun 1, 2022. It is now read-only.
generated from pulumi/pulumi-component-provider-go-boilerplate
/
assumableRolesWithSAML.go
217 lines (175 loc) · 8.53 KB
/
assumableRolesWithSAML.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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
// 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 awsiam
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type AssumableRolesWithSAML struct {
pulumi.ResourceState
Admin pulumi.StringMapOutput `pulumi:"admin"`
Poweruser pulumi.StringMapOutput `pulumi:"poweruser"`
Readonly pulumi.StringMapOutput `pulumi:"readonly"`
}
// NewAssumableRolesWithSAML registers a new resource with the given unique name, arguments, and options.
func NewAssumableRolesWithSAML(ctx *pulumi.Context,
name string, args *AssumableRolesWithSAMLArgs, opts ...pulumi.ResourceOption) (*AssumableRolesWithSAML, error) {
if args == nil {
args = &AssumableRolesWithSAMLArgs{}
}
if args.Admin != nil {
args.Admin = args.Admin.ToAdminRolePtrOutput().ApplyT(func(v *AdminRole) *AdminRole { return v.Defaults() }).(AdminRolePtrOutput)
}
if isZero(args.AwsSamlEndpoint) {
args.AwsSamlEndpoint = pulumi.StringPtr("https://signin.aws.amazon.com/saml")
}
if isZero(args.ForceDetachPolicies) {
args.ForceDetachPolicies = pulumi.BoolPtr(false)
}
if isZero(args.MaxSessionDuration) {
args.MaxSessionDuration = pulumi.IntPtr(3600)
}
if args.Poweruser != nil {
args.Poweruser = args.Poweruser.ToPoweruserRolePtrOutput().ApplyT(func(v *PoweruserRole) *PoweruserRole { return v.Defaults() }).(PoweruserRolePtrOutput)
}
if args.Readonly != nil {
args.Readonly = args.Readonly.ToReadonlyRolePtrOutput().ApplyT(func(v *ReadonlyRole) *ReadonlyRole { return v.Defaults() }).(ReadonlyRolePtrOutput)
}
var resource AssumableRolesWithSAML
err := ctx.RegisterRemoteComponentResource("aws-iam:index:AssumableRolesWithSAML", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
type assumableRolesWithSAMLArgs struct {
Admin *AdminRole `pulumi:"admin"`
// AWS SAML Endpoint.
AwsSamlEndpoint *string `pulumi:"awsSamlEndpoint"`
// Whether policies should be detached from this role when destroying.
ForceDetachPolicies *bool `pulumi:"forceDetachPolicies"`
// Maximum CLI/API session duration in seconds between 3600 and 43200.
MaxSessionDuration *int `pulumi:"maxSessionDuration"`
Poweruser *PoweruserRole `pulumi:"poweruser"`
// List of SAML Provider IDs.
ProviderIds []string `pulumi:"providerIds"`
Readonly *ReadonlyRole `pulumi:"readonly"`
}
// The set of arguments for constructing a AssumableRolesWithSAML resource.
type AssumableRolesWithSAMLArgs struct {
Admin AdminRolePtrInput
// AWS SAML Endpoint.
AwsSamlEndpoint pulumi.StringPtrInput
// Whether policies should be detached from this role when destroying.
ForceDetachPolicies pulumi.BoolPtrInput
// Maximum CLI/API session duration in seconds between 3600 and 43200.
MaxSessionDuration pulumi.IntPtrInput
Poweruser PoweruserRolePtrInput
// List of SAML Provider IDs.
ProviderIds pulumi.StringArrayInput
Readonly ReadonlyRolePtrInput
}
func (AssumableRolesWithSAMLArgs) ElementType() reflect.Type {
return reflect.TypeOf((*assumableRolesWithSAMLArgs)(nil)).Elem()
}
type AssumableRolesWithSAMLInput interface {
pulumi.Input
ToAssumableRolesWithSAMLOutput() AssumableRolesWithSAMLOutput
ToAssumableRolesWithSAMLOutputWithContext(ctx context.Context) AssumableRolesWithSAMLOutput
}
func (*AssumableRolesWithSAML) ElementType() reflect.Type {
return reflect.TypeOf((**AssumableRolesWithSAML)(nil)).Elem()
}
func (i *AssumableRolesWithSAML) ToAssumableRolesWithSAMLOutput() AssumableRolesWithSAMLOutput {
return i.ToAssumableRolesWithSAMLOutputWithContext(context.Background())
}
func (i *AssumableRolesWithSAML) ToAssumableRolesWithSAMLOutputWithContext(ctx context.Context) AssumableRolesWithSAMLOutput {
return pulumi.ToOutputWithContext(ctx, i).(AssumableRolesWithSAMLOutput)
}
// AssumableRolesWithSAMLArrayInput is an input type that accepts AssumableRolesWithSAMLArray and AssumableRolesWithSAMLArrayOutput values.
// You can construct a concrete instance of `AssumableRolesWithSAMLArrayInput` via:
//
// AssumableRolesWithSAMLArray{ AssumableRolesWithSAMLArgs{...} }
type AssumableRolesWithSAMLArrayInput interface {
pulumi.Input
ToAssumableRolesWithSAMLArrayOutput() AssumableRolesWithSAMLArrayOutput
ToAssumableRolesWithSAMLArrayOutputWithContext(context.Context) AssumableRolesWithSAMLArrayOutput
}
type AssumableRolesWithSAMLArray []AssumableRolesWithSAMLInput
func (AssumableRolesWithSAMLArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AssumableRolesWithSAML)(nil)).Elem()
}
func (i AssumableRolesWithSAMLArray) ToAssumableRolesWithSAMLArrayOutput() AssumableRolesWithSAMLArrayOutput {
return i.ToAssumableRolesWithSAMLArrayOutputWithContext(context.Background())
}
func (i AssumableRolesWithSAMLArray) ToAssumableRolesWithSAMLArrayOutputWithContext(ctx context.Context) AssumableRolesWithSAMLArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AssumableRolesWithSAMLArrayOutput)
}
// AssumableRolesWithSAMLMapInput is an input type that accepts AssumableRolesWithSAMLMap and AssumableRolesWithSAMLMapOutput values.
// You can construct a concrete instance of `AssumableRolesWithSAMLMapInput` via:
//
// AssumableRolesWithSAMLMap{ "key": AssumableRolesWithSAMLArgs{...} }
type AssumableRolesWithSAMLMapInput interface {
pulumi.Input
ToAssumableRolesWithSAMLMapOutput() AssumableRolesWithSAMLMapOutput
ToAssumableRolesWithSAMLMapOutputWithContext(context.Context) AssumableRolesWithSAMLMapOutput
}
type AssumableRolesWithSAMLMap map[string]AssumableRolesWithSAMLInput
func (AssumableRolesWithSAMLMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AssumableRolesWithSAML)(nil)).Elem()
}
func (i AssumableRolesWithSAMLMap) ToAssumableRolesWithSAMLMapOutput() AssumableRolesWithSAMLMapOutput {
return i.ToAssumableRolesWithSAMLMapOutputWithContext(context.Background())
}
func (i AssumableRolesWithSAMLMap) ToAssumableRolesWithSAMLMapOutputWithContext(ctx context.Context) AssumableRolesWithSAMLMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(AssumableRolesWithSAMLMapOutput)
}
type AssumableRolesWithSAMLOutput struct{ *pulumi.OutputState }
func (AssumableRolesWithSAMLOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AssumableRolesWithSAML)(nil)).Elem()
}
func (o AssumableRolesWithSAMLOutput) ToAssumableRolesWithSAMLOutput() AssumableRolesWithSAMLOutput {
return o
}
func (o AssumableRolesWithSAMLOutput) ToAssumableRolesWithSAMLOutputWithContext(ctx context.Context) AssumableRolesWithSAMLOutput {
return o
}
type AssumableRolesWithSAMLArrayOutput struct{ *pulumi.OutputState }
func (AssumableRolesWithSAMLArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AssumableRolesWithSAML)(nil)).Elem()
}
func (o AssumableRolesWithSAMLArrayOutput) ToAssumableRolesWithSAMLArrayOutput() AssumableRolesWithSAMLArrayOutput {
return o
}
func (o AssumableRolesWithSAMLArrayOutput) ToAssumableRolesWithSAMLArrayOutputWithContext(ctx context.Context) AssumableRolesWithSAMLArrayOutput {
return o
}
func (o AssumableRolesWithSAMLArrayOutput) Index(i pulumi.IntInput) AssumableRolesWithSAMLOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AssumableRolesWithSAML {
return vs[0].([]*AssumableRolesWithSAML)[vs[1].(int)]
}).(AssumableRolesWithSAMLOutput)
}
type AssumableRolesWithSAMLMapOutput struct{ *pulumi.OutputState }
func (AssumableRolesWithSAMLMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AssumableRolesWithSAML)(nil)).Elem()
}
func (o AssumableRolesWithSAMLMapOutput) ToAssumableRolesWithSAMLMapOutput() AssumableRolesWithSAMLMapOutput {
return o
}
func (o AssumableRolesWithSAMLMapOutput) ToAssumableRolesWithSAMLMapOutputWithContext(ctx context.Context) AssumableRolesWithSAMLMapOutput {
return o
}
func (o AssumableRolesWithSAMLMapOutput) MapIndex(k pulumi.StringInput) AssumableRolesWithSAMLOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AssumableRolesWithSAML {
return vs[0].(map[string]*AssumableRolesWithSAML)[vs[1].(string)]
}).(AssumableRolesWithSAMLOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AssumableRolesWithSAMLInput)(nil)).Elem(), &AssumableRolesWithSAML{})
pulumi.RegisterInputType(reflect.TypeOf((*AssumableRolesWithSAMLArrayInput)(nil)).Elem(), AssumableRolesWithSAMLArray{})
pulumi.RegisterInputType(reflect.TypeOf((*AssumableRolesWithSAMLMapInput)(nil)).Elem(), AssumableRolesWithSAMLMap{})
pulumi.RegisterOutputType(AssumableRolesWithSAMLOutput{})
pulumi.RegisterOutputType(AssumableRolesWithSAMLArrayOutput{})
pulumi.RegisterOutputType(AssumableRolesWithSAMLMapOutput{})
}