This repository has been archived by the owner on Mar 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
apiManagementService.go
364 lines (340 loc) · 20.7 KB
/
apiManagementService.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
363
364
// *** 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 v20170301
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
// A single API Management service resource in List or Get response.
type ApiManagementService struct {
pulumi.CustomResourceState
// Additional datacenter locations of the API Management service.
AdditionalLocations AdditionalLocationResponseArrayOutput `pulumi:"additionalLocations"`
// List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10.
Certificates CertificateConfigurationResponseArrayOutput `pulumi:"certificates"`
// Creation UTC date of the API Management service.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
CreatedAtUtc pulumi.StringOutput `pulumi:"createdAtUtc"`
// Custom properties of the API Management service. Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2). Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1 and setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.
CustomProperties pulumi.StringMapOutput `pulumi:"customProperties"`
// ETag of the resource.
Etag pulumi.StringOutput `pulumi:"etag"`
// Gateway URL of the API Management service in the Default Region.
GatewayRegionalUrl pulumi.StringOutput `pulumi:"gatewayRegionalUrl"`
// Gateway URL of the API Management service.
GatewayUrl pulumi.StringOutput `pulumi:"gatewayUrl"`
// Custom hostname configuration of the API Management service.
HostnameConfigurations HostnameConfigurationResponseArrayOutput `pulumi:"hostnameConfigurations"`
// Managed service identity of the Api Management service.
Identity ApiManagementServiceIdentityResponsePtrOutput `pulumi:"identity"`
// Resource location.
Location pulumi.StringOutput `pulumi:"location"`
// Management API endpoint URL of the API Management service.
ManagementApiUrl pulumi.StringOutput `pulumi:"managementApiUrl"`
// Resource name.
Name pulumi.StringOutput `pulumi:"name"`
// Email address from which the notification will be sent.
NotificationSenderEmail pulumi.StringPtrOutput `pulumi:"notificationSenderEmail"`
// Publisher portal endpoint Url of the API Management service.
PortalUrl pulumi.StringOutput `pulumi:"portalUrl"`
// The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted.
ProvisioningState pulumi.StringOutput `pulumi:"provisioningState"`
// Publisher email.
PublisherEmail pulumi.StringOutput `pulumi:"publisherEmail"`
// Publisher name.
PublisherName pulumi.StringOutput `pulumi:"publisherName"`
// SCM endpoint URL of the API Management service.
ScmUrl pulumi.StringOutput `pulumi:"scmUrl"`
// SKU properties of the API Management service.
Sku ApiManagementServiceSkuPropertiesResponseOutput `pulumi:"sku"`
// Static IP addresses of the API Management service virtual machines. Available only for Standard and Premium SKU.
StaticIps pulumi.StringArrayOutput `pulumi:"staticIps"`
// Resource tags.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// The provisioning state of the API Management service, which is targeted by the long running operation started on the service.
TargetProvisioningState pulumi.StringOutput `pulumi:"targetProvisioningState"`
// Resource type for API Management resource is set to Microsoft.ApiManagement.
Type pulumi.StringOutput `pulumi:"type"`
// Virtual network configuration of the API Management service.
VirtualNetworkConfiguration VirtualNetworkConfigurationResponsePtrOutput `pulumi:"virtualNetworkConfiguration"`
// The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only.
VirtualNetworkType pulumi.StringPtrOutput `pulumi:"virtualNetworkType"`
}
// NewApiManagementService registers a new resource with the given unique name, arguments, and options.
func NewApiManagementService(ctx *pulumi.Context,
name string, args *ApiManagementServiceArgs, opts ...pulumi.ResourceOption) (*ApiManagementService, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.PublisherEmail == nil {
return nil, errors.New("invalid value for required argument 'PublisherEmail'")
}
if args.PublisherName == nil {
return nil, errors.New("invalid value for required argument 'PublisherName'")
}
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'")
}
if args.Sku == nil {
return nil, errors.New("invalid value for required argument 'Sku'")
}
if args.VirtualNetworkType == nil {
args.VirtualNetworkType = pulumi.StringPtr("None")
}
aliases := pulumi.Aliases([]pulumi.Alias{
{
Type: pulumi.String("azure-nextgen:apimanagement/latest:ApiManagementService"),
},
{
Type: pulumi.String("azure-nextgen:apimanagement/v20160707:ApiManagementService"),
},
{
Type: pulumi.String("azure-nextgen:apimanagement/v20161010:ApiManagementService"),
},
{
Type: pulumi.String("azure-nextgen:apimanagement/v20180101:ApiManagementService"),
},
{
Type: pulumi.String("azure-nextgen:apimanagement/v20180601preview:ApiManagementService"),
},
{
Type: pulumi.String("azure-nextgen:apimanagement/v20190101:ApiManagementService"),
},
{
Type: pulumi.String("azure-nextgen:apimanagement/v20191201:ApiManagementService"),
},
{
Type: pulumi.String("azure-nextgen:apimanagement/v20191201preview:ApiManagementService"),
},
{
Type: pulumi.String("azure-nextgen:apimanagement/v20200601preview:ApiManagementService"),
},
})
opts = append(opts, aliases)
var resource ApiManagementService
err := ctx.RegisterResource("azure-nextgen:apimanagement/v20170301:ApiManagementService", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetApiManagementService gets an existing ApiManagementService 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 GetApiManagementService(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ApiManagementServiceState, opts ...pulumi.ResourceOption) (*ApiManagementService, error) {
var resource ApiManagementService
err := ctx.ReadResource("azure-nextgen:apimanagement/v20170301:ApiManagementService", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ApiManagementService resources.
type apiManagementServiceState struct {
// Additional datacenter locations of the API Management service.
AdditionalLocations []AdditionalLocationResponse `pulumi:"additionalLocations"`
// List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10.
Certificates []CertificateConfigurationResponse `pulumi:"certificates"`
// Creation UTC date of the API Management service.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
CreatedAtUtc *string `pulumi:"createdAtUtc"`
// Custom properties of the API Management service. Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2). Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1 and setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.
CustomProperties map[string]string `pulumi:"customProperties"`
// ETag of the resource.
Etag *string `pulumi:"etag"`
// Gateway URL of the API Management service in the Default Region.
GatewayRegionalUrl *string `pulumi:"gatewayRegionalUrl"`
// Gateway URL of the API Management service.
GatewayUrl *string `pulumi:"gatewayUrl"`
// Custom hostname configuration of the API Management service.
HostnameConfigurations []HostnameConfigurationResponse `pulumi:"hostnameConfigurations"`
// Managed service identity of the Api Management service.
Identity *ApiManagementServiceIdentityResponse `pulumi:"identity"`
// Resource location.
Location *string `pulumi:"location"`
// Management API endpoint URL of the API Management service.
ManagementApiUrl *string `pulumi:"managementApiUrl"`
// Resource name.
Name *string `pulumi:"name"`
// Email address from which the notification will be sent.
NotificationSenderEmail *string `pulumi:"notificationSenderEmail"`
// Publisher portal endpoint Url of the API Management service.
PortalUrl *string `pulumi:"portalUrl"`
// The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted.
ProvisioningState *string `pulumi:"provisioningState"`
// Publisher email.
PublisherEmail *string `pulumi:"publisherEmail"`
// Publisher name.
PublisherName *string `pulumi:"publisherName"`
// SCM endpoint URL of the API Management service.
ScmUrl *string `pulumi:"scmUrl"`
// SKU properties of the API Management service.
Sku *ApiManagementServiceSkuPropertiesResponse `pulumi:"sku"`
// Static IP addresses of the API Management service virtual machines. Available only for Standard and Premium SKU.
StaticIps []string `pulumi:"staticIps"`
// Resource tags.
Tags map[string]string `pulumi:"tags"`
// The provisioning state of the API Management service, which is targeted by the long running operation started on the service.
TargetProvisioningState *string `pulumi:"targetProvisioningState"`
// Resource type for API Management resource is set to Microsoft.ApiManagement.
Type *string `pulumi:"type"`
// Virtual network configuration of the API Management service.
VirtualNetworkConfiguration *VirtualNetworkConfigurationResponse `pulumi:"virtualNetworkConfiguration"`
// The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only.
VirtualNetworkType *string `pulumi:"virtualNetworkType"`
}
type ApiManagementServiceState struct {
// Additional datacenter locations of the API Management service.
AdditionalLocations AdditionalLocationResponseArrayInput
// List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10.
Certificates CertificateConfigurationResponseArrayInput
// Creation UTC date of the API Management service.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
CreatedAtUtc pulumi.StringPtrInput
// Custom properties of the API Management service. Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2). Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1 and setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.
CustomProperties pulumi.StringMapInput
// ETag of the resource.
Etag pulumi.StringPtrInput
// Gateway URL of the API Management service in the Default Region.
GatewayRegionalUrl pulumi.StringPtrInput
// Gateway URL of the API Management service.
GatewayUrl pulumi.StringPtrInput
// Custom hostname configuration of the API Management service.
HostnameConfigurations HostnameConfigurationResponseArrayInput
// Managed service identity of the Api Management service.
Identity ApiManagementServiceIdentityResponsePtrInput
// Resource location.
Location pulumi.StringPtrInput
// Management API endpoint URL of the API Management service.
ManagementApiUrl pulumi.StringPtrInput
// Resource name.
Name pulumi.StringPtrInput
// Email address from which the notification will be sent.
NotificationSenderEmail pulumi.StringPtrInput
// Publisher portal endpoint Url of the API Management service.
PortalUrl pulumi.StringPtrInput
// The current provisioning state of the API Management service which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted.
ProvisioningState pulumi.StringPtrInput
// Publisher email.
PublisherEmail pulumi.StringPtrInput
// Publisher name.
PublisherName pulumi.StringPtrInput
// SCM endpoint URL of the API Management service.
ScmUrl pulumi.StringPtrInput
// SKU properties of the API Management service.
Sku ApiManagementServiceSkuPropertiesResponsePtrInput
// Static IP addresses of the API Management service virtual machines. Available only for Standard and Premium SKU.
StaticIps pulumi.StringArrayInput
// Resource tags.
Tags pulumi.StringMapInput
// The provisioning state of the API Management service, which is targeted by the long running operation started on the service.
TargetProvisioningState pulumi.StringPtrInput
// Resource type for API Management resource is set to Microsoft.ApiManagement.
Type pulumi.StringPtrInput
// Virtual network configuration of the API Management service.
VirtualNetworkConfiguration VirtualNetworkConfigurationResponsePtrInput
// The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only.
VirtualNetworkType pulumi.StringPtrInput
}
func (ApiManagementServiceState) ElementType() reflect.Type {
return reflect.TypeOf((*apiManagementServiceState)(nil)).Elem()
}
type apiManagementServiceArgs struct {
// Additional datacenter locations of the API Management service.
AdditionalLocations []AdditionalLocation `pulumi:"additionalLocations"`
// List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10.
Certificates []CertificateConfiguration `pulumi:"certificates"`
// Custom properties of the API Management service. Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2). Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1 and setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.
CustomProperties map[string]string `pulumi:"customProperties"`
// Custom hostname configuration of the API Management service.
HostnameConfigurations []HostnameConfiguration `pulumi:"hostnameConfigurations"`
// Managed service identity of the Api Management service.
Identity *ApiManagementServiceIdentity `pulumi:"identity"`
// Resource location.
Location *string `pulumi:"location"`
// Email address from which the notification will be sent.
NotificationSenderEmail *string `pulumi:"notificationSenderEmail"`
// Publisher email.
PublisherEmail string `pulumi:"publisherEmail"`
// Publisher name.
PublisherName string `pulumi:"publisherName"`
// The name of the resource group.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The name of the API Management service.
ServiceName string `pulumi:"serviceName"`
// SKU properties of the API Management service.
Sku ApiManagementServiceSkuProperties `pulumi:"sku"`
// Resource tags.
Tags map[string]string `pulumi:"tags"`
// Virtual network configuration of the API Management service.
VirtualNetworkConfiguration *VirtualNetworkConfiguration `pulumi:"virtualNetworkConfiguration"`
// The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only.
VirtualNetworkType *string `pulumi:"virtualNetworkType"`
}
// The set of arguments for constructing a ApiManagementService resource.
type ApiManagementServiceArgs struct {
// Additional datacenter locations of the API Management service.
AdditionalLocations AdditionalLocationArrayInput
// List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10.
Certificates CertificateConfigurationArrayInput
// Custom properties of the API Management service. Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168` will disable the cipher TLS_RSA_WITH_3DES_EDE_CBC_SHA for all TLS(1.0, 1.1 and 1.2). Setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11` can be used to disable just TLS 1.1 and setting `Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10` can be used to disable TLS 1.0 on an API Management service.
CustomProperties pulumi.StringMapInput
// Custom hostname configuration of the API Management service.
HostnameConfigurations HostnameConfigurationArrayInput
// Managed service identity of the Api Management service.
Identity ApiManagementServiceIdentityPtrInput
// Resource location.
Location pulumi.StringPtrInput
// Email address from which the notification will be sent.
NotificationSenderEmail pulumi.StringPtrInput
// Publisher email.
PublisherEmail pulumi.StringInput
// Publisher name.
PublisherName pulumi.StringInput
// The name of the resource group.
ResourceGroupName pulumi.StringInput
// The name of the API Management service.
ServiceName pulumi.StringInput
// SKU properties of the API Management service.
Sku ApiManagementServiceSkuPropertiesInput
// Resource tags.
Tags pulumi.StringMapInput
// Virtual network configuration of the API Management service.
VirtualNetworkConfiguration VirtualNetworkConfigurationPtrInput
// The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only.
VirtualNetworkType pulumi.StringPtrInput
}
func (ApiManagementServiceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*apiManagementServiceArgs)(nil)).Elem()
}
type ApiManagementServiceInput interface {
pulumi.Input
ToApiManagementServiceOutput() ApiManagementServiceOutput
ToApiManagementServiceOutputWithContext(ctx context.Context) ApiManagementServiceOutput
}
func (*ApiManagementService) ElementType() reflect.Type {
return reflect.TypeOf((*ApiManagementService)(nil))
}
func (i *ApiManagementService) ToApiManagementServiceOutput() ApiManagementServiceOutput {
return i.ToApiManagementServiceOutputWithContext(context.Background())
}
func (i *ApiManagementService) ToApiManagementServiceOutputWithContext(ctx context.Context) ApiManagementServiceOutput {
return pulumi.ToOutputWithContext(ctx, i).(ApiManagementServiceOutput)
}
type ApiManagementServiceOutput struct {
*pulumi.OutputState
}
func (ApiManagementServiceOutput) ElementType() reflect.Type {
return reflect.TypeOf((*ApiManagementService)(nil))
}
func (o ApiManagementServiceOutput) ToApiManagementServiceOutput() ApiManagementServiceOutput {
return o
}
func (o ApiManagementServiceOutput) ToApiManagementServiceOutputWithContext(ctx context.Context) ApiManagementServiceOutput {
return o
}
func init() {
pulumi.RegisterOutputType(ApiManagementServiceOutput{})
}