/
openIdConnectProvider.go
166 lines (153 loc) · 8.12 KB
/
openIdConnectProvider.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
// *** 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! ***
// nolint: lll
package apimanagement
import (
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/go/pulumi"
)
// Manages an OpenID Connect Provider within a API Management Service.
//
// > This content is derived from https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/website/docs/r/api_management_openid_connect_provider.html.markdown.
type OpenIdConnectProvider struct {
pulumi.CustomResourceState
// The name of the API Management Service in which this OpenID Connect Provider should be created. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringOutput `pulumi:"apiManagementName"`
// The Client ID used for the Client Application.
ClientId pulumi.StringOutput `pulumi:"clientId"`
// The Client Secret used for the Client Application.
ClientSecret pulumi.StringOutput `pulumi:"clientSecret"`
// A description of this OpenID Connect Provider.
Description pulumi.StringPtrOutput `pulumi:"description"`
// A user-friendly name for this OpenID Connect Provider.
DisplayName pulumi.StringOutput `pulumi:"displayName"`
// The URI of the Metadata endpoint.
MetadataEndpoint pulumi.StringOutput `pulumi:"metadataEndpoint"`
// the Name of the OpenID Connect Provider which should be created within the API Management Service. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
}
// NewOpenIdConnectProvider registers a new resource with the given unique name, arguments, and options.
func NewOpenIdConnectProvider(ctx *pulumi.Context,
name string, args *OpenIdConnectProviderArgs, opts ...pulumi.ResourceOption) (*OpenIdConnectProvider, error) {
if args == nil || args.ApiManagementName == nil {
return nil, errors.New("missing required argument 'ApiManagementName'")
}
if args == nil || args.ClientId == nil {
return nil, errors.New("missing required argument 'ClientId'")
}
if args == nil || args.ClientSecret == nil {
return nil, errors.New("missing required argument 'ClientSecret'")
}
if args == nil || args.DisplayName == nil {
return nil, errors.New("missing required argument 'DisplayName'")
}
if args == nil || args.MetadataEndpoint == nil {
return nil, errors.New("missing required argument 'MetadataEndpoint'")
}
if args == nil || args.ResourceGroupName == nil {
return nil, errors.New("missing required argument 'ResourceGroupName'")
}
if args == nil {
args = &OpenIdConnectProviderArgs{}
}
var resource OpenIdConnectProvider
err := ctx.RegisterResource("azure:apimanagement/openIdConnectProvider:OpenIdConnectProvider", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetOpenIdConnectProvider gets an existing OpenIdConnectProvider 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 GetOpenIdConnectProvider(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *OpenIdConnectProviderState, opts ...pulumi.ResourceOption) (*OpenIdConnectProvider, error) {
var resource OpenIdConnectProvider
err := ctx.ReadResource("azure:apimanagement/openIdConnectProvider:OpenIdConnectProvider", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering OpenIdConnectProvider resources.
type openIdConnectProviderState struct {
// The name of the API Management Service in which this OpenID Connect Provider should be created. Changing this forces a new resource to be created.
ApiManagementName *string `pulumi:"apiManagementName"`
// The Client ID used for the Client Application.
ClientId *string `pulumi:"clientId"`
// The Client Secret used for the Client Application.
ClientSecret *string `pulumi:"clientSecret"`
// A description of this OpenID Connect Provider.
Description *string `pulumi:"description"`
// A user-friendly name for this OpenID Connect Provider.
DisplayName *string `pulumi:"displayName"`
// The URI of the Metadata endpoint.
MetadataEndpoint *string `pulumi:"metadataEndpoint"`
// the Name of the OpenID Connect Provider which should be created within the API Management Service. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
}
type OpenIdConnectProviderState struct {
// The name of the API Management Service in which this OpenID Connect Provider should be created. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringPtrInput
// The Client ID used for the Client Application.
ClientId pulumi.StringPtrInput
// The Client Secret used for the Client Application.
ClientSecret pulumi.StringPtrInput
// A description of this OpenID Connect Provider.
Description pulumi.StringPtrInput
// A user-friendly name for this OpenID Connect Provider.
DisplayName pulumi.StringPtrInput
// The URI of the Metadata endpoint.
MetadataEndpoint pulumi.StringPtrInput
// the Name of the OpenID Connect Provider which should be created within the API Management Service. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
}
func (OpenIdConnectProviderState) ElementType() reflect.Type {
return reflect.TypeOf((*openIdConnectProviderState)(nil)).Elem()
}
type openIdConnectProviderArgs struct {
// The name of the API Management Service in which this OpenID Connect Provider should be created. Changing this forces a new resource to be created.
ApiManagementName string `pulumi:"apiManagementName"`
// The Client ID used for the Client Application.
ClientId string `pulumi:"clientId"`
// The Client Secret used for the Client Application.
ClientSecret string `pulumi:"clientSecret"`
// A description of this OpenID Connect Provider.
Description *string `pulumi:"description"`
// A user-friendly name for this OpenID Connect Provider.
DisplayName string `pulumi:"displayName"`
// The URI of the Metadata endpoint.
MetadataEndpoint string `pulumi:"metadataEndpoint"`
// the Name of the OpenID Connect Provider which should be created within the API Management Service. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// The set of arguments for constructing a OpenIdConnectProvider resource.
type OpenIdConnectProviderArgs struct {
// The name of the API Management Service in which this OpenID Connect Provider should be created. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringInput
// The Client ID used for the Client Application.
ClientId pulumi.StringInput
// The Client Secret used for the Client Application.
ClientSecret pulumi.StringInput
// A description of this OpenID Connect Provider.
Description pulumi.StringPtrInput
// A user-friendly name for this OpenID Connect Provider.
DisplayName pulumi.StringInput
// The URI of the Metadata endpoint.
MetadataEndpoint pulumi.StringInput
// the Name of the OpenID Connect Provider which should be created within the API Management Service. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
}
func (OpenIdConnectProviderArgs) ElementType() reflect.Type {
return reflect.TypeOf((*openIdConnectProviderArgs)(nil)).Elem()
}