/
database_account_status_arm_types_gen.go
357 lines (277 loc) · 17.2 KB
/
database_account_status_arm_types_gen.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
// Code generated by azure-service-operator-codegen. DO NOT EDIT.
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
package v1api20210515
import "encoding/json"
type DatabaseAccount_STATUS_ARM struct {
// Id: The unique resource identifier of the ARM resource.
Id *string `json:"id,omitempty"`
// Identity: Identity for the resource.
Identity *ManagedServiceIdentity_STATUS_ARM `json:"identity,omitempty"`
// Kind: Indicates the type of database account. This can only be set at database account creation.
Kind *DatabaseAccount_Kind_STATUS `json:"kind,omitempty"`
// Location: The location of the resource group to which the resource belongs.
Location *string `json:"location,omitempty"`
// Name: The name of the ARM resource.
Name *string `json:"name,omitempty"`
// Properties: Properties for the database account.
Properties *DatabaseAccountGetProperties_STATUS_ARM `json:"properties,omitempty"`
Tags map[string]string `json:"tags,omitempty"`
// Type: The type of Azure resource.
Type *string `json:"type,omitempty"`
}
type DatabaseAccount_Kind_STATUS string
const (
DatabaseAccount_Kind_STATUS_GlobalDocumentDB = DatabaseAccount_Kind_STATUS("GlobalDocumentDB")
DatabaseAccount_Kind_STATUS_MongoDB = DatabaseAccount_Kind_STATUS("MongoDB")
DatabaseAccount_Kind_STATUS_Parse = DatabaseAccount_Kind_STATUS("Parse")
)
// Mapping from string to DatabaseAccount_Kind_STATUS
var databaseAccount_Kind_STATUS_Values = map[string]DatabaseAccount_Kind_STATUS{
"globaldocumentdb": DatabaseAccount_Kind_STATUS_GlobalDocumentDB,
"mongodb": DatabaseAccount_Kind_STATUS_MongoDB,
"parse": DatabaseAccount_Kind_STATUS_Parse,
}
// Properties for the database account.
type DatabaseAccountGetProperties_STATUS_ARM struct {
// AnalyticalStorageConfiguration: Analytical storage specific properties.
AnalyticalStorageConfiguration *AnalyticalStorageConfiguration_STATUS_ARM `json:"analyticalStorageConfiguration,omitempty"`
// ApiProperties: API specific properties.
ApiProperties *ApiProperties_STATUS_ARM `json:"apiProperties,omitempty"`
// BackupPolicy: The object representing the policy for taking backups on an account.
BackupPolicy *BackupPolicy_STATUS_ARM `json:"backupPolicy,omitempty"`
// Capabilities: List of Cosmos DB capabilities for the account
Capabilities []Capability_STATUS_ARM `json:"capabilities,omitempty"`
// ConnectorOffer: The cassandra connector offer type for the Cosmos DB database C* account.
ConnectorOffer *ConnectorOffer_STATUS `json:"connectorOffer,omitempty"`
// ConsistencyPolicy: The consistency policy for the Cosmos DB database account.
ConsistencyPolicy *ConsistencyPolicy_STATUS_ARM `json:"consistencyPolicy,omitempty"`
// Cors: The CORS policy for the Cosmos DB database account.
Cors []CorsPolicy_STATUS_ARM `json:"cors,omitempty"`
// DatabaseAccountOfferType: The offer type for the Cosmos DB database account. Default value: Standard.
DatabaseAccountOfferType *DatabaseAccountOfferType_STATUS `json:"databaseAccountOfferType,omitempty"`
// DefaultIdentity: The default identity for accessing key vault used in features like customer managed keys. The default
// identity needs to be explicitly set by the users. It can be "FirstPartyIdentity", "SystemAssignedIdentity" and more.
DefaultIdentity *string `json:"defaultIdentity,omitempty"`
// DisableKeyBasedMetadataWriteAccess: Disable write operations on metadata resources (databases, containers, throughput)
// via account keys
DisableKeyBasedMetadataWriteAccess *bool `json:"disableKeyBasedMetadataWriteAccess,omitempty"`
// DocumentEndpoint: The connection endpoint for the Cosmos DB database account.
DocumentEndpoint *string `json:"documentEndpoint,omitempty"`
// EnableAnalyticalStorage: Flag to indicate whether to enable storage analytics.
EnableAnalyticalStorage *bool `json:"enableAnalyticalStorage,omitempty"`
// EnableAutomaticFailover: Enables automatic failover of the write region in the rare event that the region is unavailable
// due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the
// failover priorities configured for the account.
EnableAutomaticFailover *bool `json:"enableAutomaticFailover,omitempty"`
// EnableCassandraConnector: Enables the cassandra connector on the Cosmos DB C* account
EnableCassandraConnector *bool `json:"enableCassandraConnector,omitempty"`
// EnableFreeTier: Flag to indicate whether Free Tier is enabled.
EnableFreeTier *bool `json:"enableFreeTier,omitempty"`
// EnableMultipleWriteLocations: Enables the account to write in multiple locations
EnableMultipleWriteLocations *bool `json:"enableMultipleWriteLocations,omitempty"`
// FailoverPolicies: An array that contains the regions ordered by their failover priorities.
FailoverPolicies []FailoverPolicy_STATUS_ARM `json:"failoverPolicies,omitempty"`
// IpRules: List of IpRules.
IpRules []IpAddressOrRange_STATUS_ARM `json:"ipRules,omitempty"`
// IsVirtualNetworkFilterEnabled: Flag to indicate whether to enable/disable Virtual Network ACL rules.
IsVirtualNetworkFilterEnabled *bool `json:"isVirtualNetworkFilterEnabled,omitempty"`
// KeyVaultKeyUri: The URI of the key vault
KeyVaultKeyUri *string `json:"keyVaultKeyUri,omitempty"`
// Locations: An array that contains all of the locations enabled for the Cosmos DB account.
Locations []Location_STATUS_ARM `json:"locations,omitempty"`
// NetworkAclBypass: Indicates what services are allowed to bypass firewall checks.
NetworkAclBypass *NetworkAclBypass_STATUS `json:"networkAclBypass,omitempty"`
// NetworkAclBypassResourceIds: An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account.
NetworkAclBypassResourceIds []string `json:"networkAclBypassResourceIds,omitempty"`
// PrivateEndpointConnections: List of Private Endpoint Connections configured for the Cosmos DB account.
PrivateEndpointConnections []PrivateEndpointConnection_STATUS_ARM `json:"privateEndpointConnections,omitempty"`
ProvisioningState *string `json:"provisioningState,omitempty"`
// PublicNetworkAccess: Whether requests from Public Network are allowed
PublicNetworkAccess *PublicNetworkAccess_STATUS `json:"publicNetworkAccess,omitempty"`
// ReadLocations: An array that contains of the read locations enabled for the Cosmos DB account.
ReadLocations []Location_STATUS_ARM `json:"readLocations,omitempty"`
// VirtualNetworkRules: List of Virtual Network ACL rules configured for the Cosmos DB account.
VirtualNetworkRules []VirtualNetworkRule_STATUS_ARM `json:"virtualNetworkRules,omitempty"`
// WriteLocations: An array that contains the write location for the Cosmos DB account.
WriteLocations []Location_STATUS_ARM `json:"writeLocations,omitempty"`
}
// Identity for the resource.
type ManagedServiceIdentity_STATUS_ARM struct {
// PrincipalId: The principal id of the system assigned identity. This property will only be provided for a system assigned
// identity.
PrincipalId *string `json:"principalId,omitempty"`
// TenantId: The tenant id of the system assigned identity. This property will only be provided for a system assigned
// identity.
TenantId *string `json:"tenantId,omitempty"`
// Type: The type of identity used for the resource. The type 'SystemAssigned,UserAssigned' includes both an implicitly
// created identity and a set of user assigned identities. The type 'None' will remove any identities from the service.
Type *ManagedServiceIdentity_Type_STATUS `json:"type,omitempty"`
// UserAssignedIdentities: The list of user identities associated with resource. The user identity dictionary key
// references will be ARM resource ids in the form:
// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
UserAssignedIdentities map[string]ManagedServiceIdentity_UserAssignedIdentities_STATUS_ARM `json:"userAssignedIdentities,omitempty"`
}
// Analytical storage specific properties.
type AnalyticalStorageConfiguration_STATUS_ARM struct {
// SchemaType: Describes the types of schema for analytical storage.
SchemaType *AnalyticalStorageSchemaType_STATUS `json:"schemaType,omitempty"`
}
type ApiProperties_STATUS_ARM struct {
// ServerVersion: Describes the ServerVersion of an a MongoDB account.
ServerVersion *ApiProperties_ServerVersion_STATUS `json:"serverVersion,omitempty"`
}
type BackupPolicy_STATUS_ARM struct {
// Continuous: Mutually exclusive with all other properties
Continuous *ContinuousModeBackupPolicy_STATUS_ARM `json:"continuous,omitempty"`
// Periodic: Mutually exclusive with all other properties
Periodic *PeriodicModeBackupPolicy_STATUS_ARM `json:"periodic,omitempty"`
}
// MarshalJSON defers JSON marshaling to the first non-nil property, because BackupPolicy_STATUS_ARM represents a discriminated union (JSON OneOf)
func (policy BackupPolicy_STATUS_ARM) MarshalJSON() ([]byte, error) {
if policy.Continuous != nil {
return json.Marshal(policy.Continuous)
}
if policy.Periodic != nil {
return json.Marshal(policy.Periodic)
}
return nil, nil
}
// UnmarshalJSON unmarshals the BackupPolicy_STATUS_ARM
func (policy *BackupPolicy_STATUS_ARM) UnmarshalJSON(data []byte) error {
var rawJson map[string]interface{}
err := json.Unmarshal(data, &rawJson)
if err != nil {
return err
}
discriminator := rawJson["type"]
if discriminator == "Continuous" {
policy.Continuous = &ContinuousModeBackupPolicy_STATUS_ARM{}
return json.Unmarshal(data, policy.Continuous)
}
if discriminator == "Periodic" {
policy.Periodic = &PeriodicModeBackupPolicy_STATUS_ARM{}
return json.Unmarshal(data, policy.Periodic)
}
// No error
return nil
}
// Cosmos DB capability object
type Capability_STATUS_ARM struct {
// Name: Name of the Cosmos DB capability. For example, "name": "EnableCassandra". Current values also include
// "EnableTable" and "EnableGremlin".
Name *string `json:"name,omitempty"`
}
// The consistency policy for the Cosmos DB database account.
type ConsistencyPolicy_STATUS_ARM struct {
// DefaultConsistencyLevel: The default consistency level and configuration settings of the Cosmos DB account.
DefaultConsistencyLevel *ConsistencyPolicy_DefaultConsistencyLevel_STATUS `json:"defaultConsistencyLevel,omitempty"`
// MaxIntervalInSeconds: When used with the Bounded Staleness consistency level, this value represents the time amount of
// staleness (in seconds) tolerated. Accepted range for this value is 5 - 86400. Required when defaultConsistencyPolicy is
// set to 'BoundedStaleness'.
MaxIntervalInSeconds *int `json:"maxIntervalInSeconds,omitempty"`
// MaxStalenessPrefix: When used with the Bounded Staleness consistency level, this value represents the number of stale
// requests tolerated. Accepted range for this value is 1 – 2,147,483,647. Required when defaultConsistencyPolicy is set
// to 'BoundedStaleness'.
MaxStalenessPrefix *int `json:"maxStalenessPrefix,omitempty"`
}
// The CORS policy for the Cosmos DB database account.
type CorsPolicy_STATUS_ARM struct {
// AllowedHeaders: The request headers that the origin domain may specify on the CORS request.
AllowedHeaders *string `json:"allowedHeaders,omitempty"`
// AllowedMethods: The methods (HTTP request verbs) that the origin domain may use for a CORS request.
AllowedMethods *string `json:"allowedMethods,omitempty"`
// AllowedOrigins: The origin domains that are permitted to make a request against the service via CORS.
AllowedOrigins *string `json:"allowedOrigins,omitempty"`
// ExposedHeaders: The response headers that may be sent in the response to the CORS request and exposed by the browser to
// the request issuer.
ExposedHeaders *string `json:"exposedHeaders,omitempty"`
// MaxAgeInSeconds: The maximum amount time that a browser should cache the preflight OPTIONS request.
MaxAgeInSeconds *int `json:"maxAgeInSeconds,omitempty"`
}
// The failover policy for a given region of a database account.
type FailoverPolicy_STATUS_ARM struct {
// FailoverPriority: The failover priority of the region. A failover priority of 0 indicates a write region. The maximum
// value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the
// regions in which the database account exists.
FailoverPriority *int `json:"failoverPriority,omitempty"`
// Id: The unique identifier of the region in which the database account replicates to. Example:
// <accountName>-<locationName>.
Id *string `json:"id,omitempty"`
// LocationName: The name of the region in which the database account exists.
LocationName *string `json:"locationName,omitempty"`
}
// IpAddressOrRange object
type IpAddressOrRange_STATUS_ARM struct {
// IpAddressOrRange: A single IPv4 address or a single IPv4 address range in CIDR format. Provided IPs must be
// well-formatted and cannot be contained in one of the following ranges: 10.0.0.0/8, 100.64.0.0/10, 172.16.0.0/12,
// 192.168.0.0/16, since these are not enforceable by the IP address filter. Example of valid inputs: “23.40.210.245”
// or “23.40.210.0/8”.
IpAddressOrRange *string `json:"ipAddressOrRange,omitempty"`
}
// A region in which the Azure Cosmos DB database account is deployed.
type Location_STATUS_ARM struct {
// DocumentEndpoint: The connection endpoint for the specific region. Example:
// https://<accountName>-<locationName>.documents.azure.com:443/
DocumentEndpoint *string `json:"documentEndpoint,omitempty"`
// FailoverPriority: The failover priority of the region. A failover priority of 0 indicates a write region. The maximum
// value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the
// regions in which the database account exists.
FailoverPriority *int `json:"failoverPriority,omitempty"`
// Id: The unique identifier of the region within the database account. Example: <accountName>-<locationName>.
Id *string `json:"id,omitempty"`
// IsZoneRedundant: Flag to indicate whether or not this region is an AvailabilityZone region
IsZoneRedundant *bool `json:"isZoneRedundant,omitempty"`
// LocationName: The name of the region.
LocationName *string `json:"locationName,omitempty"`
ProvisioningState *string `json:"provisioningState,omitempty"`
}
type ManagedServiceIdentity_Type_STATUS string
const (
ManagedServiceIdentity_Type_STATUS_None = ManagedServiceIdentity_Type_STATUS("None")
ManagedServiceIdentity_Type_STATUS_SystemAssigned = ManagedServiceIdentity_Type_STATUS("SystemAssigned")
ManagedServiceIdentity_Type_STATUS_SystemAssignedUserAssigned = ManagedServiceIdentity_Type_STATUS("SystemAssigned,UserAssigned")
ManagedServiceIdentity_Type_STATUS_UserAssigned = ManagedServiceIdentity_Type_STATUS("UserAssigned")
)
// Mapping from string to ManagedServiceIdentity_Type_STATUS
var managedServiceIdentity_Type_STATUS_Values = map[string]ManagedServiceIdentity_Type_STATUS{
"none": ManagedServiceIdentity_Type_STATUS_None,
"systemassigned": ManagedServiceIdentity_Type_STATUS_SystemAssigned,
"systemassigned,userassigned": ManagedServiceIdentity_Type_STATUS_SystemAssignedUserAssigned,
"userassigned": ManagedServiceIdentity_Type_STATUS_UserAssigned,
}
type ManagedServiceIdentity_UserAssignedIdentities_STATUS_ARM struct {
// ClientId: The client id of user assigned identity.
ClientId *string `json:"clientId,omitempty"`
// PrincipalId: The principal id of user assigned identity.
PrincipalId *string `json:"principalId,omitempty"`
}
// A private endpoint connection
type PrivateEndpointConnection_STATUS_ARM struct {
// Id: Fully qualified resource ID for the resource. Ex -
// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
Id *string `json:"id,omitempty"`
}
// Virtual Network ACL Rule object
type VirtualNetworkRule_STATUS_ARM struct {
// Id: Resource ID of a subnet, for example:
// /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}.
Id *string `json:"id,omitempty"`
// IgnoreMissingVNetServiceEndpoint: Create firewall rule before the virtual network has vnet service endpoint enabled.
IgnoreMissingVNetServiceEndpoint *bool `json:"ignoreMissingVNetServiceEndpoint,omitempty"`
}
type ContinuousModeBackupPolicy_STATUS_ARM struct {
Type ContinuousModeBackupPolicy_Type_STATUS `json:"type,omitempty"`
}
type PeriodicModeBackupPolicy_STATUS_ARM struct {
// PeriodicModeProperties: Configuration values for periodic mode backup
PeriodicModeProperties *PeriodicModeProperties_STATUS_ARM `json:"periodicModeProperties,omitempty"`
Type PeriodicModeBackupPolicy_Type_STATUS `json:"type,omitempty"`
}
// Configuration values for periodic mode backup
type PeriodicModeProperties_STATUS_ARM struct {
// BackupIntervalInMinutes: An integer representing the interval in minutes between two backups
BackupIntervalInMinutes *int `json:"backupIntervalInMinutes,omitempty"`
// BackupRetentionIntervalInHours: An integer representing the time (in hours) that each backup is retained
BackupRetentionIntervalInHours *int `json:"backupRetentionIntervalInHours,omitempty"`
}