/
defaultSupportedIdpConfig.go
197 lines (165 loc) · 8.31 KB
/
defaultSupportedIdpConfig.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
// 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 v2
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-google-native/sdk/go/google/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Create a default supported Idp configuration for an Identity Toolkit project.
type DefaultSupportedIdpConfig struct {
pulumi.CustomResourceState
// Additional config for Apple-based projects.
AppleSignInConfig GoogleCloudIdentitytoolkitAdminV2AppleSignInConfigResponseOutput `pulumi:"appleSignInConfig"`
// OAuth client ID.
ClientId pulumi.StringOutput `pulumi:"clientId"`
// OAuth client secret.
ClientSecret pulumi.StringOutput `pulumi:"clientSecret"`
// True if allows the user to sign in with the provider.
Enabled pulumi.BoolOutput `pulumi:"enabled"`
// The id of the Idp to create a config for. Call ListDefaultSupportedIdps for list of all default supported Idps.
IdpId pulumi.StringPtrOutput `pulumi:"idpId"`
// The name of the DefaultSupportedIdpConfig resource, for example: "projects/my-awesome-project/defaultSupportedIdpConfigs/google.com"
Name pulumi.StringOutput `pulumi:"name"`
Project pulumi.StringOutput `pulumi:"project"`
TenantId pulumi.StringOutput `pulumi:"tenantId"`
}
// NewDefaultSupportedIdpConfig registers a new resource with the given unique name, arguments, and options.
func NewDefaultSupportedIdpConfig(ctx *pulumi.Context,
name string, args *DefaultSupportedIdpConfigArgs, opts ...pulumi.ResourceOption) (*DefaultSupportedIdpConfig, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.TenantId == nil {
return nil, errors.New("invalid value for required argument 'TenantId'")
}
replaceOnChanges := pulumi.ReplaceOnChanges([]string{
"project",
"tenantId",
})
opts = append(opts, replaceOnChanges)
opts = internal.PkgResourceDefaultOpts(opts)
var resource DefaultSupportedIdpConfig
err := ctx.RegisterResource("google-native:identitytoolkit/v2:DefaultSupportedIdpConfig", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetDefaultSupportedIdpConfig gets an existing DefaultSupportedIdpConfig 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 GetDefaultSupportedIdpConfig(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *DefaultSupportedIdpConfigState, opts ...pulumi.ResourceOption) (*DefaultSupportedIdpConfig, error) {
var resource DefaultSupportedIdpConfig
err := ctx.ReadResource("google-native:identitytoolkit/v2:DefaultSupportedIdpConfig", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering DefaultSupportedIdpConfig resources.
type defaultSupportedIdpConfigState struct {
}
type DefaultSupportedIdpConfigState struct {
}
func (DefaultSupportedIdpConfigState) ElementType() reflect.Type {
return reflect.TypeOf((*defaultSupportedIdpConfigState)(nil)).Elem()
}
type defaultSupportedIdpConfigArgs struct {
// Additional config for Apple-based projects.
AppleSignInConfig *GoogleCloudIdentitytoolkitAdminV2AppleSignInConfig `pulumi:"appleSignInConfig"`
// OAuth client ID.
ClientId *string `pulumi:"clientId"`
// OAuth client secret.
ClientSecret *string `pulumi:"clientSecret"`
// True if allows the user to sign in with the provider.
Enabled *bool `pulumi:"enabled"`
// The id of the Idp to create a config for. Call ListDefaultSupportedIdps for list of all default supported Idps.
IdpId *string `pulumi:"idpId"`
// The name of the DefaultSupportedIdpConfig resource, for example: "projects/my-awesome-project/defaultSupportedIdpConfigs/google.com"
Name *string `pulumi:"name"`
Project *string `pulumi:"project"`
TenantId string `pulumi:"tenantId"`
}
// The set of arguments for constructing a DefaultSupportedIdpConfig resource.
type DefaultSupportedIdpConfigArgs struct {
// Additional config for Apple-based projects.
AppleSignInConfig GoogleCloudIdentitytoolkitAdminV2AppleSignInConfigPtrInput
// OAuth client ID.
ClientId pulumi.StringPtrInput
// OAuth client secret.
ClientSecret pulumi.StringPtrInput
// True if allows the user to sign in with the provider.
Enabled pulumi.BoolPtrInput
// The id of the Idp to create a config for. Call ListDefaultSupportedIdps for list of all default supported Idps.
IdpId pulumi.StringPtrInput
// The name of the DefaultSupportedIdpConfig resource, for example: "projects/my-awesome-project/defaultSupportedIdpConfigs/google.com"
Name pulumi.StringPtrInput
Project pulumi.StringPtrInput
TenantId pulumi.StringInput
}
func (DefaultSupportedIdpConfigArgs) ElementType() reflect.Type {
return reflect.TypeOf((*defaultSupportedIdpConfigArgs)(nil)).Elem()
}
type DefaultSupportedIdpConfigInput interface {
pulumi.Input
ToDefaultSupportedIdpConfigOutput() DefaultSupportedIdpConfigOutput
ToDefaultSupportedIdpConfigOutputWithContext(ctx context.Context) DefaultSupportedIdpConfigOutput
}
func (*DefaultSupportedIdpConfig) ElementType() reflect.Type {
return reflect.TypeOf((**DefaultSupportedIdpConfig)(nil)).Elem()
}
func (i *DefaultSupportedIdpConfig) ToDefaultSupportedIdpConfigOutput() DefaultSupportedIdpConfigOutput {
return i.ToDefaultSupportedIdpConfigOutputWithContext(context.Background())
}
func (i *DefaultSupportedIdpConfig) ToDefaultSupportedIdpConfigOutputWithContext(ctx context.Context) DefaultSupportedIdpConfigOutput {
return pulumi.ToOutputWithContext(ctx, i).(DefaultSupportedIdpConfigOutput)
}
type DefaultSupportedIdpConfigOutput struct{ *pulumi.OutputState }
func (DefaultSupportedIdpConfigOutput) ElementType() reflect.Type {
return reflect.TypeOf((**DefaultSupportedIdpConfig)(nil)).Elem()
}
func (o DefaultSupportedIdpConfigOutput) ToDefaultSupportedIdpConfigOutput() DefaultSupportedIdpConfigOutput {
return o
}
func (o DefaultSupportedIdpConfigOutput) ToDefaultSupportedIdpConfigOutputWithContext(ctx context.Context) DefaultSupportedIdpConfigOutput {
return o
}
// Additional config for Apple-based projects.
func (o DefaultSupportedIdpConfigOutput) AppleSignInConfig() GoogleCloudIdentitytoolkitAdminV2AppleSignInConfigResponseOutput {
return o.ApplyT(func(v *DefaultSupportedIdpConfig) GoogleCloudIdentitytoolkitAdminV2AppleSignInConfigResponseOutput {
return v.AppleSignInConfig
}).(GoogleCloudIdentitytoolkitAdminV2AppleSignInConfigResponseOutput)
}
// OAuth client ID.
func (o DefaultSupportedIdpConfigOutput) ClientId() pulumi.StringOutput {
return o.ApplyT(func(v *DefaultSupportedIdpConfig) pulumi.StringOutput { return v.ClientId }).(pulumi.StringOutput)
}
// OAuth client secret.
func (o DefaultSupportedIdpConfigOutput) ClientSecret() pulumi.StringOutput {
return o.ApplyT(func(v *DefaultSupportedIdpConfig) pulumi.StringOutput { return v.ClientSecret }).(pulumi.StringOutput)
}
// True if allows the user to sign in with the provider.
func (o DefaultSupportedIdpConfigOutput) Enabled() pulumi.BoolOutput {
return o.ApplyT(func(v *DefaultSupportedIdpConfig) pulumi.BoolOutput { return v.Enabled }).(pulumi.BoolOutput)
}
// The id of the Idp to create a config for. Call ListDefaultSupportedIdps for list of all default supported Idps.
func (o DefaultSupportedIdpConfigOutput) IdpId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DefaultSupportedIdpConfig) pulumi.StringPtrOutput { return v.IdpId }).(pulumi.StringPtrOutput)
}
// The name of the DefaultSupportedIdpConfig resource, for example: "projects/my-awesome-project/defaultSupportedIdpConfigs/google.com"
func (o DefaultSupportedIdpConfigOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *DefaultSupportedIdpConfig) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
func (o DefaultSupportedIdpConfigOutput) Project() pulumi.StringOutput {
return o.ApplyT(func(v *DefaultSupportedIdpConfig) pulumi.StringOutput { return v.Project }).(pulumi.StringOutput)
}
func (o DefaultSupportedIdpConfigOutput) TenantId() pulumi.StringOutput {
return o.ApplyT(func(v *DefaultSupportedIdpConfig) pulumi.StringOutput { return v.TenantId }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*DefaultSupportedIdpConfigInput)(nil)).Elem(), &DefaultSupportedIdpConfig{})
pulumi.RegisterOutputType(DefaultSupportedIdpConfigOutput{})
}