This repository has been archived by the owner on Oct 6, 2023. It is now read-only.
generated from pulumi/pulumi-tf-provider-boilerplate
/
organizationmanagerSamlFederation.go
362 lines (316 loc) · 19.4 KB
/
organizationmanagerSamlFederation.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
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
// *** 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 yandex
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Allows management of a single SAML Federation within an existing Yandex.Cloud Organization.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-yandex/sdk/go/yandex"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := yandex.NewOrganizationmanagerSamlFederation(ctx, "federation", &yandex.OrganizationmanagerSamlFederationArgs{
// Description: pulumi.String("My new SAML federation"),
// Issuer: pulumi.String("my-issuer"),
// OrganizationId: pulumi.String("sdf4*********3fr"),
// SsoBinding: pulumi.String("POST"),
// SsoUrl: pulumi.String("https://my-sso.url"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
//
// ## Import
//
// A Yandex SAML Federation can be imported using the `id` of the resource, e.g.
//
// ```sh
// $ pulumi import yandex:index/organizationmanagerSamlFederation:OrganizationmanagerSamlFederation federation "federation_id"
// ```
type OrganizationmanagerSamlFederation struct {
pulumi.CustomResourceState
// Add new users automatically on successful authentication. The user will get the `resource-manager.clouds.member` role automatically, but you need to grant other roles to them. If the value is `false`, users who aren't added to the cloud can't log in, even if they have authenticated on your server.
AutoCreateAccountOnLogin pulumi.BoolOutput `pulumi:"autoCreateAccountOnLogin"`
// Use case-insensitive name ids.
CaseInsensitiveNameIds pulumi.BoolOutput `pulumi:"caseInsensitiveNameIds"`
// The lifetime of a Browser cookie in seconds. If the cookie is still valid, the management console authenticates the user immediately and redirects them to the home page. The default value is `8h`.
CookieMaxAge pulumi.StringOutput `pulumi:"cookieMaxAge"`
// (Computed) The SAML Federation creation timestamp.
CreatedAt pulumi.StringOutput `pulumi:"createdAt"`
// The description of the SAML Federation.
Description pulumi.StringPtrOutput `pulumi:"description"`
// The ID of the IdP server to be used for authentication. The IdP server also responds to IAM with this ID after the user authenticates.
Issuer pulumi.StringOutput `pulumi:"issuer"`
// A set of key/value label pairs assigned to the SAML Federation.
Labels pulumi.StringMapOutput `pulumi:"labels"`
// The name of the SAML Federation.
Name pulumi.StringOutput `pulumi:"name"`
// The organization to attach this SAML Federation to.
OrganizationId pulumi.StringOutput `pulumi:"organizationId"`
// Federation security settings, structure is documented below.
SecuritySettings OrganizationmanagerSamlFederationSecuritySettingsOutput `pulumi:"securitySettings"`
// Single sign-on endpoint binding type. Most Identity Providers support the `POST` binding type. SAML Binding is a mapping of a SAML protocol message onto standard messaging formats and/or communications protocols.
SsoBinding pulumi.StringOutput `pulumi:"ssoBinding"`
// Single sign-on endpoint URL. Specify the link to the IdP login page here.
SsoUrl pulumi.StringOutput `pulumi:"ssoUrl"`
}
// NewOrganizationmanagerSamlFederation registers a new resource with the given unique name, arguments, and options.
func NewOrganizationmanagerSamlFederation(ctx *pulumi.Context,
name string, args *OrganizationmanagerSamlFederationArgs, opts ...pulumi.ResourceOption) (*OrganizationmanagerSamlFederation, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Issuer == nil {
return nil, errors.New("invalid value for required argument 'Issuer'")
}
if args.OrganizationId == nil {
return nil, errors.New("invalid value for required argument 'OrganizationId'")
}
if args.SsoBinding == nil {
return nil, errors.New("invalid value for required argument 'SsoBinding'")
}
if args.SsoUrl == nil {
return nil, errors.New("invalid value for required argument 'SsoUrl'")
}
var resource OrganizationmanagerSamlFederation
err := ctx.RegisterResource("yandex:index/organizationmanagerSamlFederation:OrganizationmanagerSamlFederation", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetOrganizationmanagerSamlFederation gets an existing OrganizationmanagerSamlFederation 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 GetOrganizationmanagerSamlFederation(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *OrganizationmanagerSamlFederationState, opts ...pulumi.ResourceOption) (*OrganizationmanagerSamlFederation, error) {
var resource OrganizationmanagerSamlFederation
err := ctx.ReadResource("yandex:index/organizationmanagerSamlFederation:OrganizationmanagerSamlFederation", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering OrganizationmanagerSamlFederation resources.
type organizationmanagerSamlFederationState struct {
// Add new users automatically on successful authentication. The user will get the `resource-manager.clouds.member` role automatically, but you need to grant other roles to them. If the value is `false`, users who aren't added to the cloud can't log in, even if they have authenticated on your server.
AutoCreateAccountOnLogin *bool `pulumi:"autoCreateAccountOnLogin"`
// Use case-insensitive name ids.
CaseInsensitiveNameIds *bool `pulumi:"caseInsensitiveNameIds"`
// The lifetime of a Browser cookie in seconds. If the cookie is still valid, the management console authenticates the user immediately and redirects them to the home page. The default value is `8h`.
CookieMaxAge *string `pulumi:"cookieMaxAge"`
// (Computed) The SAML Federation creation timestamp.
CreatedAt *string `pulumi:"createdAt"`
// The description of the SAML Federation.
Description *string `pulumi:"description"`
// The ID of the IdP server to be used for authentication. The IdP server also responds to IAM with this ID after the user authenticates.
Issuer *string `pulumi:"issuer"`
// A set of key/value label pairs assigned to the SAML Federation.
Labels map[string]string `pulumi:"labels"`
// The name of the SAML Federation.
Name *string `pulumi:"name"`
// The organization to attach this SAML Federation to.
OrganizationId *string `pulumi:"organizationId"`
// Federation security settings, structure is documented below.
SecuritySettings *OrganizationmanagerSamlFederationSecuritySettings `pulumi:"securitySettings"`
// Single sign-on endpoint binding type. Most Identity Providers support the `POST` binding type. SAML Binding is a mapping of a SAML protocol message onto standard messaging formats and/or communications protocols.
SsoBinding *string `pulumi:"ssoBinding"`
// Single sign-on endpoint URL. Specify the link to the IdP login page here.
SsoUrl *string `pulumi:"ssoUrl"`
}
type OrganizationmanagerSamlFederationState struct {
// Add new users automatically on successful authentication. The user will get the `resource-manager.clouds.member` role automatically, but you need to grant other roles to them. If the value is `false`, users who aren't added to the cloud can't log in, even if they have authenticated on your server.
AutoCreateAccountOnLogin pulumi.BoolPtrInput
// Use case-insensitive name ids.
CaseInsensitiveNameIds pulumi.BoolPtrInput
// The lifetime of a Browser cookie in seconds. If the cookie is still valid, the management console authenticates the user immediately and redirects them to the home page. The default value is `8h`.
CookieMaxAge pulumi.StringPtrInput
// (Computed) The SAML Federation creation timestamp.
CreatedAt pulumi.StringPtrInput
// The description of the SAML Federation.
Description pulumi.StringPtrInput
// The ID of the IdP server to be used for authentication. The IdP server also responds to IAM with this ID after the user authenticates.
Issuer pulumi.StringPtrInput
// A set of key/value label pairs assigned to the SAML Federation.
Labels pulumi.StringMapInput
// The name of the SAML Federation.
Name pulumi.StringPtrInput
// The organization to attach this SAML Federation to.
OrganizationId pulumi.StringPtrInput
// Federation security settings, structure is documented below.
SecuritySettings OrganizationmanagerSamlFederationSecuritySettingsPtrInput
// Single sign-on endpoint binding type. Most Identity Providers support the `POST` binding type. SAML Binding is a mapping of a SAML protocol message onto standard messaging formats and/or communications protocols.
SsoBinding pulumi.StringPtrInput
// Single sign-on endpoint URL. Specify the link to the IdP login page here.
SsoUrl pulumi.StringPtrInput
}
func (OrganizationmanagerSamlFederationState) ElementType() reflect.Type {
return reflect.TypeOf((*organizationmanagerSamlFederationState)(nil)).Elem()
}
type organizationmanagerSamlFederationArgs struct {
// Add new users automatically on successful authentication. The user will get the `resource-manager.clouds.member` role automatically, but you need to grant other roles to them. If the value is `false`, users who aren't added to the cloud can't log in, even if they have authenticated on your server.
AutoCreateAccountOnLogin *bool `pulumi:"autoCreateAccountOnLogin"`
// Use case-insensitive name ids.
CaseInsensitiveNameIds *bool `pulumi:"caseInsensitiveNameIds"`
// The lifetime of a Browser cookie in seconds. If the cookie is still valid, the management console authenticates the user immediately and redirects them to the home page. The default value is `8h`.
CookieMaxAge *string `pulumi:"cookieMaxAge"`
// The description of the SAML Federation.
Description *string `pulumi:"description"`
// The ID of the IdP server to be used for authentication. The IdP server also responds to IAM with this ID after the user authenticates.
Issuer string `pulumi:"issuer"`
// A set of key/value label pairs assigned to the SAML Federation.
Labels map[string]string `pulumi:"labels"`
// The name of the SAML Federation.
Name *string `pulumi:"name"`
// The organization to attach this SAML Federation to.
OrganizationId string `pulumi:"organizationId"`
// Federation security settings, structure is documented below.
SecuritySettings *OrganizationmanagerSamlFederationSecuritySettings `pulumi:"securitySettings"`
// Single sign-on endpoint binding type. Most Identity Providers support the `POST` binding type. SAML Binding is a mapping of a SAML protocol message onto standard messaging formats and/or communications protocols.
SsoBinding string `pulumi:"ssoBinding"`
// Single sign-on endpoint URL. Specify the link to the IdP login page here.
SsoUrl string `pulumi:"ssoUrl"`
}
// The set of arguments for constructing a OrganizationmanagerSamlFederation resource.
type OrganizationmanagerSamlFederationArgs struct {
// Add new users automatically on successful authentication. The user will get the `resource-manager.clouds.member` role automatically, but you need to grant other roles to them. If the value is `false`, users who aren't added to the cloud can't log in, even if they have authenticated on your server.
AutoCreateAccountOnLogin pulumi.BoolPtrInput
// Use case-insensitive name ids.
CaseInsensitiveNameIds pulumi.BoolPtrInput
// The lifetime of a Browser cookie in seconds. If the cookie is still valid, the management console authenticates the user immediately and redirects them to the home page. The default value is `8h`.
CookieMaxAge pulumi.StringPtrInput
// The description of the SAML Federation.
Description pulumi.StringPtrInput
// The ID of the IdP server to be used for authentication. The IdP server also responds to IAM with this ID after the user authenticates.
Issuer pulumi.StringInput
// A set of key/value label pairs assigned to the SAML Federation.
Labels pulumi.StringMapInput
// The name of the SAML Federation.
Name pulumi.StringPtrInput
// The organization to attach this SAML Federation to.
OrganizationId pulumi.StringInput
// Federation security settings, structure is documented below.
SecuritySettings OrganizationmanagerSamlFederationSecuritySettingsPtrInput
// Single sign-on endpoint binding type. Most Identity Providers support the `POST` binding type. SAML Binding is a mapping of a SAML protocol message onto standard messaging formats and/or communications protocols.
SsoBinding pulumi.StringInput
// Single sign-on endpoint URL. Specify the link to the IdP login page here.
SsoUrl pulumi.StringInput
}
func (OrganizationmanagerSamlFederationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*organizationmanagerSamlFederationArgs)(nil)).Elem()
}
type OrganizationmanagerSamlFederationInput interface {
pulumi.Input
ToOrganizationmanagerSamlFederationOutput() OrganizationmanagerSamlFederationOutput
ToOrganizationmanagerSamlFederationOutputWithContext(ctx context.Context) OrganizationmanagerSamlFederationOutput
}
func (*OrganizationmanagerSamlFederation) ElementType() reflect.Type {
return reflect.TypeOf((**OrganizationmanagerSamlFederation)(nil)).Elem()
}
func (i *OrganizationmanagerSamlFederation) ToOrganizationmanagerSamlFederationOutput() OrganizationmanagerSamlFederationOutput {
return i.ToOrganizationmanagerSamlFederationOutputWithContext(context.Background())
}
func (i *OrganizationmanagerSamlFederation) ToOrganizationmanagerSamlFederationOutputWithContext(ctx context.Context) OrganizationmanagerSamlFederationOutput {
return pulumi.ToOutputWithContext(ctx, i).(OrganizationmanagerSamlFederationOutput)
}
// OrganizationmanagerSamlFederationArrayInput is an input type that accepts OrganizationmanagerSamlFederationArray and OrganizationmanagerSamlFederationArrayOutput values.
// You can construct a concrete instance of `OrganizationmanagerSamlFederationArrayInput` via:
//
// OrganizationmanagerSamlFederationArray{ OrganizationmanagerSamlFederationArgs{...} }
type OrganizationmanagerSamlFederationArrayInput interface {
pulumi.Input
ToOrganizationmanagerSamlFederationArrayOutput() OrganizationmanagerSamlFederationArrayOutput
ToOrganizationmanagerSamlFederationArrayOutputWithContext(context.Context) OrganizationmanagerSamlFederationArrayOutput
}
type OrganizationmanagerSamlFederationArray []OrganizationmanagerSamlFederationInput
func (OrganizationmanagerSamlFederationArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*OrganizationmanagerSamlFederation)(nil)).Elem()
}
func (i OrganizationmanagerSamlFederationArray) ToOrganizationmanagerSamlFederationArrayOutput() OrganizationmanagerSamlFederationArrayOutput {
return i.ToOrganizationmanagerSamlFederationArrayOutputWithContext(context.Background())
}
func (i OrganizationmanagerSamlFederationArray) ToOrganizationmanagerSamlFederationArrayOutputWithContext(ctx context.Context) OrganizationmanagerSamlFederationArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(OrganizationmanagerSamlFederationArrayOutput)
}
// OrganizationmanagerSamlFederationMapInput is an input type that accepts OrganizationmanagerSamlFederationMap and OrganizationmanagerSamlFederationMapOutput values.
// You can construct a concrete instance of `OrganizationmanagerSamlFederationMapInput` via:
//
// OrganizationmanagerSamlFederationMap{ "key": OrganizationmanagerSamlFederationArgs{...} }
type OrganizationmanagerSamlFederationMapInput interface {
pulumi.Input
ToOrganizationmanagerSamlFederationMapOutput() OrganizationmanagerSamlFederationMapOutput
ToOrganizationmanagerSamlFederationMapOutputWithContext(context.Context) OrganizationmanagerSamlFederationMapOutput
}
type OrganizationmanagerSamlFederationMap map[string]OrganizationmanagerSamlFederationInput
func (OrganizationmanagerSamlFederationMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*OrganizationmanagerSamlFederation)(nil)).Elem()
}
func (i OrganizationmanagerSamlFederationMap) ToOrganizationmanagerSamlFederationMapOutput() OrganizationmanagerSamlFederationMapOutput {
return i.ToOrganizationmanagerSamlFederationMapOutputWithContext(context.Background())
}
func (i OrganizationmanagerSamlFederationMap) ToOrganizationmanagerSamlFederationMapOutputWithContext(ctx context.Context) OrganizationmanagerSamlFederationMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(OrganizationmanagerSamlFederationMapOutput)
}
type OrganizationmanagerSamlFederationOutput struct{ *pulumi.OutputState }
func (OrganizationmanagerSamlFederationOutput) ElementType() reflect.Type {
return reflect.TypeOf((**OrganizationmanagerSamlFederation)(nil)).Elem()
}
func (o OrganizationmanagerSamlFederationOutput) ToOrganizationmanagerSamlFederationOutput() OrganizationmanagerSamlFederationOutput {
return o
}
func (o OrganizationmanagerSamlFederationOutput) ToOrganizationmanagerSamlFederationOutputWithContext(ctx context.Context) OrganizationmanagerSamlFederationOutput {
return o
}
type OrganizationmanagerSamlFederationArrayOutput struct{ *pulumi.OutputState }
func (OrganizationmanagerSamlFederationArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*OrganizationmanagerSamlFederation)(nil)).Elem()
}
func (o OrganizationmanagerSamlFederationArrayOutput) ToOrganizationmanagerSamlFederationArrayOutput() OrganizationmanagerSamlFederationArrayOutput {
return o
}
func (o OrganizationmanagerSamlFederationArrayOutput) ToOrganizationmanagerSamlFederationArrayOutputWithContext(ctx context.Context) OrganizationmanagerSamlFederationArrayOutput {
return o
}
func (o OrganizationmanagerSamlFederationArrayOutput) Index(i pulumi.IntInput) OrganizationmanagerSamlFederationOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *OrganizationmanagerSamlFederation {
return vs[0].([]*OrganizationmanagerSamlFederation)[vs[1].(int)]
}).(OrganizationmanagerSamlFederationOutput)
}
type OrganizationmanagerSamlFederationMapOutput struct{ *pulumi.OutputState }
func (OrganizationmanagerSamlFederationMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*OrganizationmanagerSamlFederation)(nil)).Elem()
}
func (o OrganizationmanagerSamlFederationMapOutput) ToOrganizationmanagerSamlFederationMapOutput() OrganizationmanagerSamlFederationMapOutput {
return o
}
func (o OrganizationmanagerSamlFederationMapOutput) ToOrganizationmanagerSamlFederationMapOutputWithContext(ctx context.Context) OrganizationmanagerSamlFederationMapOutput {
return o
}
func (o OrganizationmanagerSamlFederationMapOutput) MapIndex(k pulumi.StringInput) OrganizationmanagerSamlFederationOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *OrganizationmanagerSamlFederation {
return vs[0].(map[string]*OrganizationmanagerSamlFederation)[vs[1].(string)]
}).(OrganizationmanagerSamlFederationOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*OrganizationmanagerSamlFederationInput)(nil)).Elem(), &OrganizationmanagerSamlFederation{})
pulumi.RegisterInputType(reflect.TypeOf((*OrganizationmanagerSamlFederationArrayInput)(nil)).Elem(), OrganizationmanagerSamlFederationArray{})
pulumi.RegisterInputType(reflect.TypeOf((*OrganizationmanagerSamlFederationMapInput)(nil)).Elem(), OrganizationmanagerSamlFederationMap{})
pulumi.RegisterOutputType(OrganizationmanagerSamlFederationOutput{})
pulumi.RegisterOutputType(OrganizationmanagerSamlFederationArrayOutput{})
pulumi.RegisterOutputType(OrganizationmanagerSamlFederationMapOutput{})
}