This repository has been archived by the owner on Mar 11, 2021. It is now read-only.
/
identityProvider.go
249 lines (225 loc) · 10.8 KB
/
identityProvider.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
// *** WARNING: this file was generated by the Pulumi SDK Generator. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package v20180101
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
// Identity Provider details.
type IdentityProvider struct {
pulumi.CustomResourceState
// List of Allowed Tenants when configuring Azure Active Directory login.
AllowedTenants pulumi.StringArrayOutput `pulumi:"allowedTenants"`
// Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft.
ClientId pulumi.StringOutput `pulumi:"clientId"`
// Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft.
ClientSecret pulumi.StringOutput `pulumi:"clientSecret"`
// Resource name.
Name pulumi.StringOutput `pulumi:"name"`
// Password Reset Policy Name. Only applies to AAD B2C Identity Provider.
PasswordResetPolicyName pulumi.StringPtrOutput `pulumi:"passwordResetPolicyName"`
// Profile Editing Policy Name. Only applies to AAD B2C Identity Provider.
ProfileEditingPolicyName pulumi.StringPtrOutput `pulumi:"profileEditingPolicyName"`
// Signin Policy Name. Only applies to AAD B2C Identity Provider.
SigninPolicyName pulumi.StringPtrOutput `pulumi:"signinPolicyName"`
// Signup Policy Name. Only applies to AAD B2C Identity Provider.
SignupPolicyName pulumi.StringPtrOutput `pulumi:"signupPolicyName"`
// Resource type for API Management resource.
Type pulumi.StringOutput `pulumi:"type"`
}
// NewIdentityProvider registers a new resource with the given unique name, arguments, and options.
func NewIdentityProvider(ctx *pulumi.Context,
name string, args *IdentityProviderArgs, opts ...pulumi.ResourceOption) (*IdentityProvider, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ClientId == nil {
return nil, errors.New("invalid value for required argument 'ClientId'")
}
if args.ClientSecret == nil {
return nil, errors.New("invalid value for required argument 'ClientSecret'")
}
if args.IdentityProviderName == nil {
return nil, errors.New("invalid value for required argument 'IdentityProviderName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
if args.ServiceName == nil {
return nil, errors.New("invalid value for required argument 'ServiceName'")
}
aliases := pulumi.Aliases([]pulumi.Alias{
{
Type: pulumi.String("azure-nextgen:apimanagement/latest:IdentityProvider"),
},
{
Type: pulumi.String("azure-nextgen:apimanagement/v20160707:IdentityProvider"),
},
{
Type: pulumi.String("azure-nextgen:apimanagement/v20161010:IdentityProvider"),
},
{
Type: pulumi.String("azure-nextgen:apimanagement/v20170301:IdentityProvider"),
},
{
Type: pulumi.String("azure-nextgen:apimanagement/v20180601preview:IdentityProvider"),
},
{
Type: pulumi.String("azure-nextgen:apimanagement/v20190101:IdentityProvider"),
},
{
Type: pulumi.String("azure-nextgen:apimanagement/v20191201:IdentityProvider"),
},
{
Type: pulumi.String("azure-nextgen:apimanagement/v20191201preview:IdentityProvider"),
},
{
Type: pulumi.String("azure-nextgen:apimanagement/v20200601preview:IdentityProvider"),
},
})
opts = append(opts, aliases)
var resource IdentityProvider
err := ctx.RegisterResource("azure-nextgen:apimanagement/v20180101:IdentityProvider", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetIdentityProvider gets an existing IdentityProvider 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 GetIdentityProvider(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *IdentityProviderState, opts ...pulumi.ResourceOption) (*IdentityProvider, error) {
var resource IdentityProvider
err := ctx.ReadResource("azure-nextgen:apimanagement/v20180101:IdentityProvider", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering IdentityProvider resources.
type identityProviderState struct {
// List of Allowed Tenants when configuring Azure Active Directory login.
AllowedTenants []string `pulumi:"allowedTenants"`
// Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft.
ClientId *string `pulumi:"clientId"`
// Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft.
ClientSecret *string `pulumi:"clientSecret"`
// Resource name.
Name *string `pulumi:"name"`
// Password Reset Policy Name. Only applies to AAD B2C Identity Provider.
PasswordResetPolicyName *string `pulumi:"passwordResetPolicyName"`
// Profile Editing Policy Name. Only applies to AAD B2C Identity Provider.
ProfileEditingPolicyName *string `pulumi:"profileEditingPolicyName"`
// Signin Policy Name. Only applies to AAD B2C Identity Provider.
SigninPolicyName *string `pulumi:"signinPolicyName"`
// Signup Policy Name. Only applies to AAD B2C Identity Provider.
SignupPolicyName *string `pulumi:"signupPolicyName"`
// Resource type for API Management resource.
Type *string `pulumi:"type"`
}
type IdentityProviderState struct {
// List of Allowed Tenants when configuring Azure Active Directory login.
AllowedTenants pulumi.StringArrayInput
// Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft.
ClientId pulumi.StringPtrInput
// Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft.
ClientSecret pulumi.StringPtrInput
// Resource name.
Name pulumi.StringPtrInput
// Password Reset Policy Name. Only applies to AAD B2C Identity Provider.
PasswordResetPolicyName pulumi.StringPtrInput
// Profile Editing Policy Name. Only applies to AAD B2C Identity Provider.
ProfileEditingPolicyName pulumi.StringPtrInput
// Signin Policy Name. Only applies to AAD B2C Identity Provider.
SigninPolicyName pulumi.StringPtrInput
// Signup Policy Name. Only applies to AAD B2C Identity Provider.
SignupPolicyName pulumi.StringPtrInput
// Resource type for API Management resource.
Type pulumi.StringPtrInput
}
func (IdentityProviderState) ElementType() reflect.Type {
return reflect.TypeOf((*identityProviderState)(nil)).Elem()
}
type identityProviderArgs struct {
// List of Allowed Tenants when configuring Azure Active Directory login.
AllowedTenants []string `pulumi:"allowedTenants"`
// Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft.
ClientId string `pulumi:"clientId"`
// Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft.
ClientSecret string `pulumi:"clientSecret"`
// Identity Provider Type identifier.
IdentityProviderName string `pulumi:"identityProviderName"`
// Password Reset Policy Name. Only applies to AAD B2C Identity Provider.
PasswordResetPolicyName *string `pulumi:"passwordResetPolicyName"`
// Profile Editing Policy Name. Only applies to AAD B2C Identity Provider.
ProfileEditingPolicyName *string `pulumi:"profileEditingPolicyName"`
// The name of the resource group.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The name of the API Management service.
ServiceName string `pulumi:"serviceName"`
// Signin Policy Name. Only applies to AAD B2C Identity Provider.
SigninPolicyName *string `pulumi:"signinPolicyName"`
// Signup Policy Name. Only applies to AAD B2C Identity Provider.
SignupPolicyName *string `pulumi:"signupPolicyName"`
// Identity Provider Type identifier.
Type *string `pulumi:"type"`
}
// The set of arguments for constructing a IdentityProvider resource.
type IdentityProviderArgs struct {
// List of Allowed Tenants when configuring Azure Active Directory login.
AllowedTenants pulumi.StringArrayInput
// Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft.
ClientId pulumi.StringInput
// Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft.
ClientSecret pulumi.StringInput
// Identity Provider Type identifier.
IdentityProviderName pulumi.StringInput
// Password Reset Policy Name. Only applies to AAD B2C Identity Provider.
PasswordResetPolicyName pulumi.StringPtrInput
// Profile Editing Policy Name. Only applies to AAD B2C Identity Provider.
ProfileEditingPolicyName pulumi.StringPtrInput
// The name of the resource group.
ResourceGroupName pulumi.StringInput
// The name of the API Management service.
ServiceName pulumi.StringInput
// Signin Policy Name. Only applies to AAD B2C Identity Provider.
SigninPolicyName pulumi.StringPtrInput
// Signup Policy Name. Only applies to AAD B2C Identity Provider.
SignupPolicyName pulumi.StringPtrInput
// Identity Provider Type identifier.
Type pulumi.StringPtrInput
}
func (IdentityProviderArgs) ElementType() reflect.Type {
return reflect.TypeOf((*identityProviderArgs)(nil)).Elem()
}
type IdentityProviderInput interface {
pulumi.Input
ToIdentityProviderOutput() IdentityProviderOutput
ToIdentityProviderOutputWithContext(ctx context.Context) IdentityProviderOutput
}
func (*IdentityProvider) ElementType() reflect.Type {
return reflect.TypeOf((*IdentityProvider)(nil))
}
func (i *IdentityProvider) ToIdentityProviderOutput() IdentityProviderOutput {
return i.ToIdentityProviderOutputWithContext(context.Background())
}
func (i *IdentityProvider) ToIdentityProviderOutputWithContext(ctx context.Context) IdentityProviderOutput {
return pulumi.ToOutputWithContext(ctx, i).(IdentityProviderOutput)
}
type IdentityProviderOutput struct {
*pulumi.OutputState
}
func (IdentityProviderOutput) ElementType() reflect.Type {
return reflect.TypeOf((*IdentityProvider)(nil))
}
func (o IdentityProviderOutput) ToIdentityProviderOutput() IdentityProviderOutput {
return o
}
func (o IdentityProviderOutput) ToIdentityProviderOutputWithContext(ctx context.Context) IdentityProviderOutput {
return o
}
func init() {
pulumi.RegisterOutputType(IdentityProviderOutput{})
}