/
realm.ts
359 lines (350 loc) · 19.7 KB
/
realm.ts
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
// *** 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! ***
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
import * as utilities from "./utilities";
export class Realm extends pulumi.CustomResource {
/**
* Get an existing Realm resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
*/
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: RealmState, opts?: pulumi.CustomResourceOptions): Realm {
return new Realm(name, <any>state, { ...opts, id: id });
}
/** @internal */
public static readonly __pulumiType = 'keycloak:index/realm:Realm';
/**
* Returns true if the given object is an instance of Realm. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
public static isInstance(obj: any): obj is Realm {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === Realm.__pulumiType;
}
public readonly accessCodeLifespan!: pulumi.Output<string>;
public readonly accessCodeLifespanLogin!: pulumi.Output<string>;
public readonly accessCodeLifespanUserAction!: pulumi.Output<string>;
public readonly accessTokenLifespan!: pulumi.Output<string>;
public readonly accessTokenLifespanForImplicitFlow!: pulumi.Output<string>;
public readonly accountTheme!: pulumi.Output<string | undefined>;
public readonly actionTokenGeneratedByAdminLifespan!: pulumi.Output<string>;
public readonly actionTokenGeneratedByUserLifespan!: pulumi.Output<string>;
public readonly adminTheme!: pulumi.Output<string | undefined>;
public readonly attributes!: pulumi.Output<{[key: string]: any} | undefined>;
/**
* Which flow should be used for BrowserFlow
*/
public readonly browserFlow!: pulumi.Output<string | undefined>;
/**
* Which flow should be used for ClientAuthenticationFlow
*/
public readonly clientAuthenticationFlow!: pulumi.Output<string | undefined>;
/**
* Which flow should be used for DirectGrantFlow
*/
public readonly directGrantFlow!: pulumi.Output<string | undefined>;
public readonly displayName!: pulumi.Output<string | undefined>;
public readonly displayNameHtml!: pulumi.Output<string | undefined>;
/**
* Which flow should be used for DockerAuthenticationFlow
*/
public readonly dockerAuthenticationFlow!: pulumi.Output<string | undefined>;
public readonly duplicateEmailsAllowed!: pulumi.Output<boolean>;
public readonly editUsernameAllowed!: pulumi.Output<boolean>;
public readonly emailTheme!: pulumi.Output<string | undefined>;
public readonly enabled!: pulumi.Output<boolean | undefined>;
public readonly internationalization!: pulumi.Output<outputs.RealmInternationalization | undefined>;
public readonly loginTheme!: pulumi.Output<string | undefined>;
public readonly loginWithEmailAllowed!: pulumi.Output<boolean>;
public readonly offlineSessionIdleTimeout!: pulumi.Output<string>;
public readonly offlineSessionMaxLifespan!: pulumi.Output<string>;
/**
* String that represents the passwordPolicies that are in place. Each policy is separated with " and ". Supported
* policies can be found in the server-info providers page. example: "upperCase(1) and length(8) and
* forceExpiredPasswordChange(365) and notUsername(undefined)"
*/
public readonly passwordPolicy!: pulumi.Output<string | undefined>;
public readonly realm!: pulumi.Output<string>;
public readonly refreshTokenMaxReuse!: pulumi.Output<number | undefined>;
public readonly registrationAllowed!: pulumi.Output<boolean>;
public readonly registrationEmailAsUsername!: pulumi.Output<boolean>;
/**
* Which flow should be used for RegistrationFlow
*/
public readonly registrationFlow!: pulumi.Output<string | undefined>;
public readonly rememberMe!: pulumi.Output<boolean>;
/**
* Which flow should be used for ResetCredentialsFlow
*/
public readonly resetCredentialsFlow!: pulumi.Output<string | undefined>;
public readonly resetPasswordAllowed!: pulumi.Output<boolean>;
public readonly revokeRefreshToken!: pulumi.Output<boolean | undefined>;
public readonly securityDefenses!: pulumi.Output<outputs.RealmSecurityDefenses | undefined>;
public readonly smtpServer!: pulumi.Output<outputs.RealmSmtpServer | undefined>;
/**
* SSL Required: Values can be 'none', 'external' or 'all'.
*/
public readonly sslRequired!: pulumi.Output<string | undefined>;
public readonly ssoSessionIdleTimeout!: pulumi.Output<string>;
public readonly ssoSessionMaxLifespan!: pulumi.Output<string>;
public readonly verifyEmail!: pulumi.Output<boolean>;
/**
* Create a Realm resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: RealmArgs, opts?: pulumi.CustomResourceOptions)
constructor(name: string, argsOrState?: RealmArgs | RealmState, opts?: pulumi.CustomResourceOptions) {
let inputs: pulumi.Inputs = {};
if (opts && opts.id) {
const state = argsOrState as RealmState | undefined;
inputs["accessCodeLifespan"] = state ? state.accessCodeLifespan : undefined;
inputs["accessCodeLifespanLogin"] = state ? state.accessCodeLifespanLogin : undefined;
inputs["accessCodeLifespanUserAction"] = state ? state.accessCodeLifespanUserAction : undefined;
inputs["accessTokenLifespan"] = state ? state.accessTokenLifespan : undefined;
inputs["accessTokenLifespanForImplicitFlow"] = state ? state.accessTokenLifespanForImplicitFlow : undefined;
inputs["accountTheme"] = state ? state.accountTheme : undefined;
inputs["actionTokenGeneratedByAdminLifespan"] = state ? state.actionTokenGeneratedByAdminLifespan : undefined;
inputs["actionTokenGeneratedByUserLifespan"] = state ? state.actionTokenGeneratedByUserLifespan : undefined;
inputs["adminTheme"] = state ? state.adminTheme : undefined;
inputs["attributes"] = state ? state.attributes : undefined;
inputs["browserFlow"] = state ? state.browserFlow : undefined;
inputs["clientAuthenticationFlow"] = state ? state.clientAuthenticationFlow : undefined;
inputs["directGrantFlow"] = state ? state.directGrantFlow : undefined;
inputs["displayName"] = state ? state.displayName : undefined;
inputs["displayNameHtml"] = state ? state.displayNameHtml : undefined;
inputs["dockerAuthenticationFlow"] = state ? state.dockerAuthenticationFlow : undefined;
inputs["duplicateEmailsAllowed"] = state ? state.duplicateEmailsAllowed : undefined;
inputs["editUsernameAllowed"] = state ? state.editUsernameAllowed : undefined;
inputs["emailTheme"] = state ? state.emailTheme : undefined;
inputs["enabled"] = state ? state.enabled : undefined;
inputs["internationalization"] = state ? state.internationalization : undefined;
inputs["loginTheme"] = state ? state.loginTheme : undefined;
inputs["loginWithEmailAllowed"] = state ? state.loginWithEmailAllowed : undefined;
inputs["offlineSessionIdleTimeout"] = state ? state.offlineSessionIdleTimeout : undefined;
inputs["offlineSessionMaxLifespan"] = state ? state.offlineSessionMaxLifespan : undefined;
inputs["passwordPolicy"] = state ? state.passwordPolicy : undefined;
inputs["realm"] = state ? state.realm : undefined;
inputs["refreshTokenMaxReuse"] = state ? state.refreshTokenMaxReuse : undefined;
inputs["registrationAllowed"] = state ? state.registrationAllowed : undefined;
inputs["registrationEmailAsUsername"] = state ? state.registrationEmailAsUsername : undefined;
inputs["registrationFlow"] = state ? state.registrationFlow : undefined;
inputs["rememberMe"] = state ? state.rememberMe : undefined;
inputs["resetCredentialsFlow"] = state ? state.resetCredentialsFlow : undefined;
inputs["resetPasswordAllowed"] = state ? state.resetPasswordAllowed : undefined;
inputs["revokeRefreshToken"] = state ? state.revokeRefreshToken : undefined;
inputs["securityDefenses"] = state ? state.securityDefenses : undefined;
inputs["smtpServer"] = state ? state.smtpServer : undefined;
inputs["sslRequired"] = state ? state.sslRequired : undefined;
inputs["ssoSessionIdleTimeout"] = state ? state.ssoSessionIdleTimeout : undefined;
inputs["ssoSessionMaxLifespan"] = state ? state.ssoSessionMaxLifespan : undefined;
inputs["verifyEmail"] = state ? state.verifyEmail : undefined;
} else {
const args = argsOrState as RealmArgs | undefined;
if (!args || args.realm === undefined) {
throw new Error("Missing required property 'realm'");
}
inputs["accessCodeLifespan"] = args ? args.accessCodeLifespan : undefined;
inputs["accessCodeLifespanLogin"] = args ? args.accessCodeLifespanLogin : undefined;
inputs["accessCodeLifespanUserAction"] = args ? args.accessCodeLifespanUserAction : undefined;
inputs["accessTokenLifespan"] = args ? args.accessTokenLifespan : undefined;
inputs["accessTokenLifespanForImplicitFlow"] = args ? args.accessTokenLifespanForImplicitFlow : undefined;
inputs["accountTheme"] = args ? args.accountTheme : undefined;
inputs["actionTokenGeneratedByAdminLifespan"] = args ? args.actionTokenGeneratedByAdminLifespan : undefined;
inputs["actionTokenGeneratedByUserLifespan"] = args ? args.actionTokenGeneratedByUserLifespan : undefined;
inputs["adminTheme"] = args ? args.adminTheme : undefined;
inputs["attributes"] = args ? args.attributes : undefined;
inputs["browserFlow"] = args ? args.browserFlow : undefined;
inputs["clientAuthenticationFlow"] = args ? args.clientAuthenticationFlow : undefined;
inputs["directGrantFlow"] = args ? args.directGrantFlow : undefined;
inputs["displayName"] = args ? args.displayName : undefined;
inputs["displayNameHtml"] = args ? args.displayNameHtml : undefined;
inputs["dockerAuthenticationFlow"] = args ? args.dockerAuthenticationFlow : undefined;
inputs["duplicateEmailsAllowed"] = args ? args.duplicateEmailsAllowed : undefined;
inputs["editUsernameAllowed"] = args ? args.editUsernameAllowed : undefined;
inputs["emailTheme"] = args ? args.emailTheme : undefined;
inputs["enabled"] = args ? args.enabled : undefined;
inputs["internationalization"] = args ? args.internationalization : undefined;
inputs["loginTheme"] = args ? args.loginTheme : undefined;
inputs["loginWithEmailAllowed"] = args ? args.loginWithEmailAllowed : undefined;
inputs["offlineSessionIdleTimeout"] = args ? args.offlineSessionIdleTimeout : undefined;
inputs["offlineSessionMaxLifespan"] = args ? args.offlineSessionMaxLifespan : undefined;
inputs["passwordPolicy"] = args ? args.passwordPolicy : undefined;
inputs["realm"] = args ? args.realm : undefined;
inputs["refreshTokenMaxReuse"] = args ? args.refreshTokenMaxReuse : undefined;
inputs["registrationAllowed"] = args ? args.registrationAllowed : undefined;
inputs["registrationEmailAsUsername"] = args ? args.registrationEmailAsUsername : undefined;
inputs["registrationFlow"] = args ? args.registrationFlow : undefined;
inputs["rememberMe"] = args ? args.rememberMe : undefined;
inputs["resetCredentialsFlow"] = args ? args.resetCredentialsFlow : undefined;
inputs["resetPasswordAllowed"] = args ? args.resetPasswordAllowed : undefined;
inputs["revokeRefreshToken"] = args ? args.revokeRefreshToken : undefined;
inputs["securityDefenses"] = args ? args.securityDefenses : undefined;
inputs["smtpServer"] = args ? args.smtpServer : undefined;
inputs["sslRequired"] = args ? args.sslRequired : undefined;
inputs["ssoSessionIdleTimeout"] = args ? args.ssoSessionIdleTimeout : undefined;
inputs["ssoSessionMaxLifespan"] = args ? args.ssoSessionMaxLifespan : undefined;
inputs["verifyEmail"] = args ? args.verifyEmail : undefined;
}
if (!opts) {
opts = {}
}
if (!opts.version) {
opts.version = utilities.getVersion();
}
super(Realm.__pulumiType, name, inputs, opts);
}
}
/**
* Input properties used for looking up and filtering Realm resources.
*/
export interface RealmState {
readonly accessCodeLifespan?: pulumi.Input<string>;
readonly accessCodeLifespanLogin?: pulumi.Input<string>;
readonly accessCodeLifespanUserAction?: pulumi.Input<string>;
readonly accessTokenLifespan?: pulumi.Input<string>;
readonly accessTokenLifespanForImplicitFlow?: pulumi.Input<string>;
readonly accountTheme?: pulumi.Input<string>;
readonly actionTokenGeneratedByAdminLifespan?: pulumi.Input<string>;
readonly actionTokenGeneratedByUserLifespan?: pulumi.Input<string>;
readonly adminTheme?: pulumi.Input<string>;
readonly attributes?: pulumi.Input<{[key: string]: any}>;
/**
* Which flow should be used for BrowserFlow
*/
readonly browserFlow?: pulumi.Input<string>;
/**
* Which flow should be used for ClientAuthenticationFlow
*/
readonly clientAuthenticationFlow?: pulumi.Input<string>;
/**
* Which flow should be used for DirectGrantFlow
*/
readonly directGrantFlow?: pulumi.Input<string>;
readonly displayName?: pulumi.Input<string>;
readonly displayNameHtml?: pulumi.Input<string>;
/**
* Which flow should be used for DockerAuthenticationFlow
*/
readonly dockerAuthenticationFlow?: pulumi.Input<string>;
readonly duplicateEmailsAllowed?: pulumi.Input<boolean>;
readonly editUsernameAllowed?: pulumi.Input<boolean>;
readonly emailTheme?: pulumi.Input<string>;
readonly enabled?: pulumi.Input<boolean>;
readonly internationalization?: pulumi.Input<inputs.RealmInternationalization>;
readonly loginTheme?: pulumi.Input<string>;
readonly loginWithEmailAllowed?: pulumi.Input<boolean>;
readonly offlineSessionIdleTimeout?: pulumi.Input<string>;
readonly offlineSessionMaxLifespan?: pulumi.Input<string>;
/**
* String that represents the passwordPolicies that are in place. Each policy is separated with " and ". Supported
* policies can be found in the server-info providers page. example: "upperCase(1) and length(8) and
* forceExpiredPasswordChange(365) and notUsername(undefined)"
*/
readonly passwordPolicy?: pulumi.Input<string>;
readonly realm?: pulumi.Input<string>;
readonly refreshTokenMaxReuse?: pulumi.Input<number>;
readonly registrationAllowed?: pulumi.Input<boolean>;
readonly registrationEmailAsUsername?: pulumi.Input<boolean>;
/**
* Which flow should be used for RegistrationFlow
*/
readonly registrationFlow?: pulumi.Input<string>;
readonly rememberMe?: pulumi.Input<boolean>;
/**
* Which flow should be used for ResetCredentialsFlow
*/
readonly resetCredentialsFlow?: pulumi.Input<string>;
readonly resetPasswordAllowed?: pulumi.Input<boolean>;
readonly revokeRefreshToken?: pulumi.Input<boolean>;
readonly securityDefenses?: pulumi.Input<inputs.RealmSecurityDefenses>;
readonly smtpServer?: pulumi.Input<inputs.RealmSmtpServer>;
/**
* SSL Required: Values can be 'none', 'external' or 'all'.
*/
readonly sslRequired?: pulumi.Input<string>;
readonly ssoSessionIdleTimeout?: pulumi.Input<string>;
readonly ssoSessionMaxLifespan?: pulumi.Input<string>;
readonly verifyEmail?: pulumi.Input<boolean>;
}
/**
* The set of arguments for constructing a Realm resource.
*/
export interface RealmArgs {
readonly accessCodeLifespan?: pulumi.Input<string>;
readonly accessCodeLifespanLogin?: pulumi.Input<string>;
readonly accessCodeLifespanUserAction?: pulumi.Input<string>;
readonly accessTokenLifespan?: pulumi.Input<string>;
readonly accessTokenLifespanForImplicitFlow?: pulumi.Input<string>;
readonly accountTheme?: pulumi.Input<string>;
readonly actionTokenGeneratedByAdminLifespan?: pulumi.Input<string>;
readonly actionTokenGeneratedByUserLifespan?: pulumi.Input<string>;
readonly adminTheme?: pulumi.Input<string>;
readonly attributes?: pulumi.Input<{[key: string]: any}>;
/**
* Which flow should be used for BrowserFlow
*/
readonly browserFlow?: pulumi.Input<string>;
/**
* Which flow should be used for ClientAuthenticationFlow
*/
readonly clientAuthenticationFlow?: pulumi.Input<string>;
/**
* Which flow should be used for DirectGrantFlow
*/
readonly directGrantFlow?: pulumi.Input<string>;
readonly displayName?: pulumi.Input<string>;
readonly displayNameHtml?: pulumi.Input<string>;
/**
* Which flow should be used for DockerAuthenticationFlow
*/
readonly dockerAuthenticationFlow?: pulumi.Input<string>;
readonly duplicateEmailsAllowed?: pulumi.Input<boolean>;
readonly editUsernameAllowed?: pulumi.Input<boolean>;
readonly emailTheme?: pulumi.Input<string>;
readonly enabled?: pulumi.Input<boolean>;
readonly internationalization?: pulumi.Input<inputs.RealmInternationalization>;
readonly loginTheme?: pulumi.Input<string>;
readonly loginWithEmailAllowed?: pulumi.Input<boolean>;
readonly offlineSessionIdleTimeout?: pulumi.Input<string>;
readonly offlineSessionMaxLifespan?: pulumi.Input<string>;
/**
* String that represents the passwordPolicies that are in place. Each policy is separated with " and ". Supported
* policies can be found in the server-info providers page. example: "upperCase(1) and length(8) and
* forceExpiredPasswordChange(365) and notUsername(undefined)"
*/
readonly passwordPolicy?: pulumi.Input<string>;
readonly realm: pulumi.Input<string>;
readonly refreshTokenMaxReuse?: pulumi.Input<number>;
readonly registrationAllowed?: pulumi.Input<boolean>;
readonly registrationEmailAsUsername?: pulumi.Input<boolean>;
/**
* Which flow should be used for RegistrationFlow
*/
readonly registrationFlow?: pulumi.Input<string>;
readonly rememberMe?: pulumi.Input<boolean>;
/**
* Which flow should be used for ResetCredentialsFlow
*/
readonly resetCredentialsFlow?: pulumi.Input<string>;
readonly resetPasswordAllowed?: pulumi.Input<boolean>;
readonly revokeRefreshToken?: pulumi.Input<boolean>;
readonly securityDefenses?: pulumi.Input<inputs.RealmSecurityDefenses>;
readonly smtpServer?: pulumi.Input<inputs.RealmSmtpServer>;
/**
* SSL Required: Values can be 'none', 'external' or 'all'.
*/
readonly sslRequired?: pulumi.Input<string>;
readonly ssoSessionIdleTimeout?: pulumi.Input<string>;
readonly ssoSessionMaxLifespan?: pulumi.Input<string>;
readonly verifyEmail?: pulumi.Input<boolean>;
}