1package containerservice 2 3// Copyright (c) Microsoft and contributors. All rights reserved. 4// 5// Licensed under the Apache License, Version 2.0 (the "License"); 6// you may not use this file except in compliance with the License. 7// You may obtain a copy of the License at 8// http://www.apache.org/licenses/LICENSE-2.0 9// 10// Unless required by applicable law or agreed to in writing, software 11// distributed under the License is distributed on an "AS IS" BASIS, 12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13// 14// See the License for the specific language governing permissions and 15// limitations under the License. 16// 17// Code generated by Microsoft (R) AutoRest Code Generator. 18// Changes may cause incorrect behavior and will be lost if the code is regenerated. 19 20import ( 21 "context" 22 "encoding/json" 23 "github.com/Azure/go-autorest/autorest" 24 "github.com/Azure/go-autorest/autorest/azure" 25 "github.com/Azure/go-autorest/autorest/to" 26 "github.com/Azure/go-autorest/tracing" 27 "net/http" 28) 29 30// The package's fully qualified name. 31const fqdn = "github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2018-03-31/containerservice" 32 33// NetworkPlugin enumerates the values for network plugin. 34type NetworkPlugin string 35 36const ( 37 // Azure ... 38 Azure NetworkPlugin = "azure" 39 // Kubenet ... 40 Kubenet NetworkPlugin = "kubenet" 41) 42 43// PossibleNetworkPluginValues returns an array of possible values for the NetworkPlugin const type. 44func PossibleNetworkPluginValues() []NetworkPlugin { 45 return []NetworkPlugin{Azure, Kubenet} 46} 47 48// NetworkPolicy enumerates the values for network policy. 49type NetworkPolicy string 50 51const ( 52 // Calico ... 53 Calico NetworkPolicy = "calico" 54) 55 56// PossibleNetworkPolicyValues returns an array of possible values for the NetworkPolicy const type. 57func PossibleNetworkPolicyValues() []NetworkPolicy { 58 return []NetworkPolicy{Calico} 59} 60 61// OrchestratorTypes enumerates the values for orchestrator types. 62type OrchestratorTypes string 63 64const ( 65 // Custom ... 66 Custom OrchestratorTypes = "Custom" 67 // DCOS ... 68 DCOS OrchestratorTypes = "DCOS" 69 // DockerCE ... 70 DockerCE OrchestratorTypes = "DockerCE" 71 // Kubernetes ... 72 Kubernetes OrchestratorTypes = "Kubernetes" 73 // Swarm ... 74 Swarm OrchestratorTypes = "Swarm" 75) 76 77// PossibleOrchestratorTypesValues returns an array of possible values for the OrchestratorTypes const type. 78func PossibleOrchestratorTypesValues() []OrchestratorTypes { 79 return []OrchestratorTypes{Custom, DCOS, DockerCE, Kubernetes, Swarm} 80} 81 82// OSType enumerates the values for os type. 83type OSType string 84 85const ( 86 // Linux ... 87 Linux OSType = "Linux" 88 // Windows ... 89 Windows OSType = "Windows" 90) 91 92// PossibleOSTypeValues returns an array of possible values for the OSType const type. 93func PossibleOSTypeValues() []OSType { 94 return []OSType{Linux, Windows} 95} 96 97// StorageProfileTypes enumerates the values for storage profile types. 98type StorageProfileTypes string 99 100const ( 101 // ManagedDisks ... 102 ManagedDisks StorageProfileTypes = "ManagedDisks" 103 // StorageAccount ... 104 StorageAccount StorageProfileTypes = "StorageAccount" 105) 106 107// PossibleStorageProfileTypesValues returns an array of possible values for the StorageProfileTypes const type. 108func PossibleStorageProfileTypesValues() []StorageProfileTypes { 109 return []StorageProfileTypes{ManagedDisks, StorageAccount} 110} 111 112// VMSizeTypes enumerates the values for vm size types. 113type VMSizeTypes string 114 115const ( 116 // StandardA1 ... 117 StandardA1 VMSizeTypes = "Standard_A1" 118 // StandardA10 ... 119 StandardA10 VMSizeTypes = "Standard_A10" 120 // StandardA11 ... 121 StandardA11 VMSizeTypes = "Standard_A11" 122 // StandardA1V2 ... 123 StandardA1V2 VMSizeTypes = "Standard_A1_v2" 124 // StandardA2 ... 125 StandardA2 VMSizeTypes = "Standard_A2" 126 // StandardA2mV2 ... 127 StandardA2mV2 VMSizeTypes = "Standard_A2m_v2" 128 // StandardA2V2 ... 129 StandardA2V2 VMSizeTypes = "Standard_A2_v2" 130 // StandardA3 ... 131 StandardA3 VMSizeTypes = "Standard_A3" 132 // StandardA4 ... 133 StandardA4 VMSizeTypes = "Standard_A4" 134 // StandardA4mV2 ... 135 StandardA4mV2 VMSizeTypes = "Standard_A4m_v2" 136 // StandardA4V2 ... 137 StandardA4V2 VMSizeTypes = "Standard_A4_v2" 138 // StandardA5 ... 139 StandardA5 VMSizeTypes = "Standard_A5" 140 // StandardA6 ... 141 StandardA6 VMSizeTypes = "Standard_A6" 142 // StandardA7 ... 143 StandardA7 VMSizeTypes = "Standard_A7" 144 // StandardA8 ... 145 StandardA8 VMSizeTypes = "Standard_A8" 146 // StandardA8mV2 ... 147 StandardA8mV2 VMSizeTypes = "Standard_A8m_v2" 148 // StandardA8V2 ... 149 StandardA8V2 VMSizeTypes = "Standard_A8_v2" 150 // StandardA9 ... 151 StandardA9 VMSizeTypes = "Standard_A9" 152 // StandardB2ms ... 153 StandardB2ms VMSizeTypes = "Standard_B2ms" 154 // StandardB2s ... 155 StandardB2s VMSizeTypes = "Standard_B2s" 156 // StandardB4ms ... 157 StandardB4ms VMSizeTypes = "Standard_B4ms" 158 // StandardB8ms ... 159 StandardB8ms VMSizeTypes = "Standard_B8ms" 160 // StandardD1 ... 161 StandardD1 VMSizeTypes = "Standard_D1" 162 // StandardD11 ... 163 StandardD11 VMSizeTypes = "Standard_D11" 164 // StandardD11V2 ... 165 StandardD11V2 VMSizeTypes = "Standard_D11_v2" 166 // StandardD11V2Promo ... 167 StandardD11V2Promo VMSizeTypes = "Standard_D11_v2_Promo" 168 // StandardD12 ... 169 StandardD12 VMSizeTypes = "Standard_D12" 170 // StandardD12V2 ... 171 StandardD12V2 VMSizeTypes = "Standard_D12_v2" 172 // StandardD12V2Promo ... 173 StandardD12V2Promo VMSizeTypes = "Standard_D12_v2_Promo" 174 // StandardD13 ... 175 StandardD13 VMSizeTypes = "Standard_D13" 176 // StandardD13V2 ... 177 StandardD13V2 VMSizeTypes = "Standard_D13_v2" 178 // StandardD13V2Promo ... 179 StandardD13V2Promo VMSizeTypes = "Standard_D13_v2_Promo" 180 // StandardD14 ... 181 StandardD14 VMSizeTypes = "Standard_D14" 182 // StandardD14V2 ... 183 StandardD14V2 VMSizeTypes = "Standard_D14_v2" 184 // StandardD14V2Promo ... 185 StandardD14V2Promo VMSizeTypes = "Standard_D14_v2_Promo" 186 // StandardD15V2 ... 187 StandardD15V2 VMSizeTypes = "Standard_D15_v2" 188 // StandardD16sV3 ... 189 StandardD16sV3 VMSizeTypes = "Standard_D16s_v3" 190 // StandardD16V3 ... 191 StandardD16V3 VMSizeTypes = "Standard_D16_v3" 192 // StandardD1V2 ... 193 StandardD1V2 VMSizeTypes = "Standard_D1_v2" 194 // StandardD2 ... 195 StandardD2 VMSizeTypes = "Standard_D2" 196 // StandardD2sV3 ... 197 StandardD2sV3 VMSizeTypes = "Standard_D2s_v3" 198 // StandardD2V2 ... 199 StandardD2V2 VMSizeTypes = "Standard_D2_v2" 200 // StandardD2V2Promo ... 201 StandardD2V2Promo VMSizeTypes = "Standard_D2_v2_Promo" 202 // StandardD2V3 ... 203 StandardD2V3 VMSizeTypes = "Standard_D2_v3" 204 // StandardD3 ... 205 StandardD3 VMSizeTypes = "Standard_D3" 206 // StandardD32sV3 ... 207 StandardD32sV3 VMSizeTypes = "Standard_D32s_v3" 208 // StandardD32V3 ... 209 StandardD32V3 VMSizeTypes = "Standard_D32_v3" 210 // StandardD3V2 ... 211 StandardD3V2 VMSizeTypes = "Standard_D3_v2" 212 // StandardD3V2Promo ... 213 StandardD3V2Promo VMSizeTypes = "Standard_D3_v2_Promo" 214 // StandardD4 ... 215 StandardD4 VMSizeTypes = "Standard_D4" 216 // StandardD4sV3 ... 217 StandardD4sV3 VMSizeTypes = "Standard_D4s_v3" 218 // StandardD4V2 ... 219 StandardD4V2 VMSizeTypes = "Standard_D4_v2" 220 // StandardD4V2Promo ... 221 StandardD4V2Promo VMSizeTypes = "Standard_D4_v2_Promo" 222 // StandardD4V3 ... 223 StandardD4V3 VMSizeTypes = "Standard_D4_v3" 224 // StandardD5V2 ... 225 StandardD5V2 VMSizeTypes = "Standard_D5_v2" 226 // StandardD5V2Promo ... 227 StandardD5V2Promo VMSizeTypes = "Standard_D5_v2_Promo" 228 // StandardD64sV3 ... 229 StandardD64sV3 VMSizeTypes = "Standard_D64s_v3" 230 // StandardD64V3 ... 231 StandardD64V3 VMSizeTypes = "Standard_D64_v3" 232 // StandardD8sV3 ... 233 StandardD8sV3 VMSizeTypes = "Standard_D8s_v3" 234 // StandardD8V3 ... 235 StandardD8V3 VMSizeTypes = "Standard_D8_v3" 236 // StandardDS1 ... 237 StandardDS1 VMSizeTypes = "Standard_DS1" 238 // StandardDS11 ... 239 StandardDS11 VMSizeTypes = "Standard_DS11" 240 // StandardDS11V2 ... 241 StandardDS11V2 VMSizeTypes = "Standard_DS11_v2" 242 // StandardDS11V2Promo ... 243 StandardDS11V2Promo VMSizeTypes = "Standard_DS11_v2_Promo" 244 // StandardDS12 ... 245 StandardDS12 VMSizeTypes = "Standard_DS12" 246 // StandardDS12V2 ... 247 StandardDS12V2 VMSizeTypes = "Standard_DS12_v2" 248 // StandardDS12V2Promo ... 249 StandardDS12V2Promo VMSizeTypes = "Standard_DS12_v2_Promo" 250 // StandardDS13 ... 251 StandardDS13 VMSizeTypes = "Standard_DS13" 252 // StandardDS132V2 ... 253 StandardDS132V2 VMSizeTypes = "Standard_DS13-2_v2" 254 // StandardDS134V2 ... 255 StandardDS134V2 VMSizeTypes = "Standard_DS13-4_v2" 256 // StandardDS13V2 ... 257 StandardDS13V2 VMSizeTypes = "Standard_DS13_v2" 258 // StandardDS13V2Promo ... 259 StandardDS13V2Promo VMSizeTypes = "Standard_DS13_v2_Promo" 260 // StandardDS14 ... 261 StandardDS14 VMSizeTypes = "Standard_DS14" 262 // StandardDS144V2 ... 263 StandardDS144V2 VMSizeTypes = "Standard_DS14-4_v2" 264 // StandardDS148V2 ... 265 StandardDS148V2 VMSizeTypes = "Standard_DS14-8_v2" 266 // StandardDS14V2 ... 267 StandardDS14V2 VMSizeTypes = "Standard_DS14_v2" 268 // StandardDS14V2Promo ... 269 StandardDS14V2Promo VMSizeTypes = "Standard_DS14_v2_Promo" 270 // StandardDS15V2 ... 271 StandardDS15V2 VMSizeTypes = "Standard_DS15_v2" 272 // StandardDS1V2 ... 273 StandardDS1V2 VMSizeTypes = "Standard_DS1_v2" 274 // StandardDS2 ... 275 StandardDS2 VMSizeTypes = "Standard_DS2" 276 // StandardDS2V2 ... 277 StandardDS2V2 VMSizeTypes = "Standard_DS2_v2" 278 // StandardDS2V2Promo ... 279 StandardDS2V2Promo VMSizeTypes = "Standard_DS2_v2_Promo" 280 // StandardDS3 ... 281 StandardDS3 VMSizeTypes = "Standard_DS3" 282 // StandardDS3V2 ... 283 StandardDS3V2 VMSizeTypes = "Standard_DS3_v2" 284 // StandardDS3V2Promo ... 285 StandardDS3V2Promo VMSizeTypes = "Standard_DS3_v2_Promo" 286 // StandardDS4 ... 287 StandardDS4 VMSizeTypes = "Standard_DS4" 288 // StandardDS4V2 ... 289 StandardDS4V2 VMSizeTypes = "Standard_DS4_v2" 290 // StandardDS4V2Promo ... 291 StandardDS4V2Promo VMSizeTypes = "Standard_DS4_v2_Promo" 292 // StandardDS5V2 ... 293 StandardDS5V2 VMSizeTypes = "Standard_DS5_v2" 294 // StandardDS5V2Promo ... 295 StandardDS5V2Promo VMSizeTypes = "Standard_DS5_v2_Promo" 296 // StandardE16sV3 ... 297 StandardE16sV3 VMSizeTypes = "Standard_E16s_v3" 298 // StandardE16V3 ... 299 StandardE16V3 VMSizeTypes = "Standard_E16_v3" 300 // StandardE2sV3 ... 301 StandardE2sV3 VMSizeTypes = "Standard_E2s_v3" 302 // StandardE2V3 ... 303 StandardE2V3 VMSizeTypes = "Standard_E2_v3" 304 // StandardE3216sV3 ... 305 StandardE3216sV3 VMSizeTypes = "Standard_E32-16s_v3" 306 // StandardE328sV3 ... 307 StandardE328sV3 VMSizeTypes = "Standard_E32-8s_v3" 308 // StandardE32sV3 ... 309 StandardE32sV3 VMSizeTypes = "Standard_E32s_v3" 310 // StandardE32V3 ... 311 StandardE32V3 VMSizeTypes = "Standard_E32_v3" 312 // StandardE4sV3 ... 313 StandardE4sV3 VMSizeTypes = "Standard_E4s_v3" 314 // StandardE4V3 ... 315 StandardE4V3 VMSizeTypes = "Standard_E4_v3" 316 // StandardE6416sV3 ... 317 StandardE6416sV3 VMSizeTypes = "Standard_E64-16s_v3" 318 // StandardE6432sV3 ... 319 StandardE6432sV3 VMSizeTypes = "Standard_E64-32s_v3" 320 // StandardE64sV3 ... 321 StandardE64sV3 VMSizeTypes = "Standard_E64s_v3" 322 // StandardE64V3 ... 323 StandardE64V3 VMSizeTypes = "Standard_E64_v3" 324 // StandardE8sV3 ... 325 StandardE8sV3 VMSizeTypes = "Standard_E8s_v3" 326 // StandardE8V3 ... 327 StandardE8V3 VMSizeTypes = "Standard_E8_v3" 328 // StandardF1 ... 329 StandardF1 VMSizeTypes = "Standard_F1" 330 // StandardF16 ... 331 StandardF16 VMSizeTypes = "Standard_F16" 332 // StandardF16s ... 333 StandardF16s VMSizeTypes = "Standard_F16s" 334 // StandardF16sV2 ... 335 StandardF16sV2 VMSizeTypes = "Standard_F16s_v2" 336 // StandardF1s ... 337 StandardF1s VMSizeTypes = "Standard_F1s" 338 // StandardF2 ... 339 StandardF2 VMSizeTypes = "Standard_F2" 340 // StandardF2s ... 341 StandardF2s VMSizeTypes = "Standard_F2s" 342 // StandardF2sV2 ... 343 StandardF2sV2 VMSizeTypes = "Standard_F2s_v2" 344 // StandardF32sV2 ... 345 StandardF32sV2 VMSizeTypes = "Standard_F32s_v2" 346 // StandardF4 ... 347 StandardF4 VMSizeTypes = "Standard_F4" 348 // StandardF4s ... 349 StandardF4s VMSizeTypes = "Standard_F4s" 350 // StandardF4sV2 ... 351 StandardF4sV2 VMSizeTypes = "Standard_F4s_v2" 352 // StandardF64sV2 ... 353 StandardF64sV2 VMSizeTypes = "Standard_F64s_v2" 354 // StandardF72sV2 ... 355 StandardF72sV2 VMSizeTypes = "Standard_F72s_v2" 356 // StandardF8 ... 357 StandardF8 VMSizeTypes = "Standard_F8" 358 // StandardF8s ... 359 StandardF8s VMSizeTypes = "Standard_F8s" 360 // StandardF8sV2 ... 361 StandardF8sV2 VMSizeTypes = "Standard_F8s_v2" 362 // StandardG1 ... 363 StandardG1 VMSizeTypes = "Standard_G1" 364 // StandardG2 ... 365 StandardG2 VMSizeTypes = "Standard_G2" 366 // StandardG3 ... 367 StandardG3 VMSizeTypes = "Standard_G3" 368 // StandardG4 ... 369 StandardG4 VMSizeTypes = "Standard_G4" 370 // StandardG5 ... 371 StandardG5 VMSizeTypes = "Standard_G5" 372 // StandardGS1 ... 373 StandardGS1 VMSizeTypes = "Standard_GS1" 374 // StandardGS2 ... 375 StandardGS2 VMSizeTypes = "Standard_GS2" 376 // StandardGS3 ... 377 StandardGS3 VMSizeTypes = "Standard_GS3" 378 // StandardGS4 ... 379 StandardGS4 VMSizeTypes = "Standard_GS4" 380 // StandardGS44 ... 381 StandardGS44 VMSizeTypes = "Standard_GS4-4" 382 // StandardGS48 ... 383 StandardGS48 VMSizeTypes = "Standard_GS4-8" 384 // StandardGS5 ... 385 StandardGS5 VMSizeTypes = "Standard_GS5" 386 // StandardGS516 ... 387 StandardGS516 VMSizeTypes = "Standard_GS5-16" 388 // StandardGS58 ... 389 StandardGS58 VMSizeTypes = "Standard_GS5-8" 390 // StandardH16 ... 391 StandardH16 VMSizeTypes = "Standard_H16" 392 // StandardH16m ... 393 StandardH16m VMSizeTypes = "Standard_H16m" 394 // StandardH16mr ... 395 StandardH16mr VMSizeTypes = "Standard_H16mr" 396 // StandardH16r ... 397 StandardH16r VMSizeTypes = "Standard_H16r" 398 // StandardH8 ... 399 StandardH8 VMSizeTypes = "Standard_H8" 400 // StandardH8m ... 401 StandardH8m VMSizeTypes = "Standard_H8m" 402 // StandardL16s ... 403 StandardL16s VMSizeTypes = "Standard_L16s" 404 // StandardL32s ... 405 StandardL32s VMSizeTypes = "Standard_L32s" 406 // StandardL4s ... 407 StandardL4s VMSizeTypes = "Standard_L4s" 408 // StandardL8s ... 409 StandardL8s VMSizeTypes = "Standard_L8s" 410 // StandardM12832ms ... 411 StandardM12832ms VMSizeTypes = "Standard_M128-32ms" 412 // StandardM12864ms ... 413 StandardM12864ms VMSizeTypes = "Standard_M128-64ms" 414 // StandardM128ms ... 415 StandardM128ms VMSizeTypes = "Standard_M128ms" 416 // StandardM128s ... 417 StandardM128s VMSizeTypes = "Standard_M128s" 418 // StandardM6416ms ... 419 StandardM6416ms VMSizeTypes = "Standard_M64-16ms" 420 // StandardM6432ms ... 421 StandardM6432ms VMSizeTypes = "Standard_M64-32ms" 422 // StandardM64ms ... 423 StandardM64ms VMSizeTypes = "Standard_M64ms" 424 // StandardM64s ... 425 StandardM64s VMSizeTypes = "Standard_M64s" 426 // StandardNC12 ... 427 StandardNC12 VMSizeTypes = "Standard_NC12" 428 // StandardNC12sV2 ... 429 StandardNC12sV2 VMSizeTypes = "Standard_NC12s_v2" 430 // StandardNC12sV3 ... 431 StandardNC12sV3 VMSizeTypes = "Standard_NC12s_v3" 432 // StandardNC24 ... 433 StandardNC24 VMSizeTypes = "Standard_NC24" 434 // StandardNC24r ... 435 StandardNC24r VMSizeTypes = "Standard_NC24r" 436 // StandardNC24rsV2 ... 437 StandardNC24rsV2 VMSizeTypes = "Standard_NC24rs_v2" 438 // StandardNC24rsV3 ... 439 StandardNC24rsV3 VMSizeTypes = "Standard_NC24rs_v3" 440 // StandardNC24sV2 ... 441 StandardNC24sV2 VMSizeTypes = "Standard_NC24s_v2" 442 // StandardNC24sV3 ... 443 StandardNC24sV3 VMSizeTypes = "Standard_NC24s_v3" 444 // StandardNC6 ... 445 StandardNC6 VMSizeTypes = "Standard_NC6" 446 // StandardNC6sV2 ... 447 StandardNC6sV2 VMSizeTypes = "Standard_NC6s_v2" 448 // StandardNC6sV3 ... 449 StandardNC6sV3 VMSizeTypes = "Standard_NC6s_v3" 450 // StandardND12s ... 451 StandardND12s VMSizeTypes = "Standard_ND12s" 452 // StandardND24rs ... 453 StandardND24rs VMSizeTypes = "Standard_ND24rs" 454 // StandardND24s ... 455 StandardND24s VMSizeTypes = "Standard_ND24s" 456 // StandardND6s ... 457 StandardND6s VMSizeTypes = "Standard_ND6s" 458 // StandardNV12 ... 459 StandardNV12 VMSizeTypes = "Standard_NV12" 460 // StandardNV24 ... 461 StandardNV24 VMSizeTypes = "Standard_NV24" 462 // StandardNV6 ... 463 StandardNV6 VMSizeTypes = "Standard_NV6" 464) 465 466// PossibleVMSizeTypesValues returns an array of possible values for the VMSizeTypes const type. 467func PossibleVMSizeTypesValues() []VMSizeTypes { 468 return []VMSizeTypes{StandardA1, StandardA10, StandardA11, StandardA1V2, StandardA2, StandardA2mV2, StandardA2V2, StandardA3, StandardA4, StandardA4mV2, StandardA4V2, StandardA5, StandardA6, StandardA7, StandardA8, StandardA8mV2, StandardA8V2, StandardA9, StandardB2ms, StandardB2s, StandardB4ms, StandardB8ms, StandardD1, StandardD11, StandardD11V2, StandardD11V2Promo, StandardD12, StandardD12V2, StandardD12V2Promo, StandardD13, StandardD13V2, StandardD13V2Promo, StandardD14, StandardD14V2, StandardD14V2Promo, StandardD15V2, StandardD16sV3, StandardD16V3, StandardD1V2, StandardD2, StandardD2sV3, StandardD2V2, StandardD2V2Promo, StandardD2V3, StandardD3, StandardD32sV3, StandardD32V3, StandardD3V2, StandardD3V2Promo, StandardD4, StandardD4sV3, StandardD4V2, StandardD4V2Promo, StandardD4V3, StandardD5V2, StandardD5V2Promo, StandardD64sV3, StandardD64V3, StandardD8sV3, StandardD8V3, StandardDS1, StandardDS11, StandardDS11V2, StandardDS11V2Promo, StandardDS12, StandardDS12V2, StandardDS12V2Promo, StandardDS13, StandardDS132V2, StandardDS134V2, StandardDS13V2, StandardDS13V2Promo, StandardDS14, StandardDS144V2, StandardDS148V2, StandardDS14V2, StandardDS14V2Promo, StandardDS15V2, StandardDS1V2, StandardDS2, StandardDS2V2, StandardDS2V2Promo, StandardDS3, StandardDS3V2, StandardDS3V2Promo, StandardDS4, StandardDS4V2, StandardDS4V2Promo, StandardDS5V2, StandardDS5V2Promo, StandardE16sV3, StandardE16V3, StandardE2sV3, StandardE2V3, StandardE3216sV3, StandardE328sV3, StandardE32sV3, StandardE32V3, StandardE4sV3, StandardE4V3, StandardE6416sV3, StandardE6432sV3, StandardE64sV3, StandardE64V3, StandardE8sV3, StandardE8V3, StandardF1, StandardF16, StandardF16s, StandardF16sV2, StandardF1s, StandardF2, StandardF2s, StandardF2sV2, StandardF32sV2, StandardF4, StandardF4s, StandardF4sV2, StandardF64sV2, StandardF72sV2, StandardF8, StandardF8s, StandardF8sV2, StandardG1, StandardG2, StandardG3, StandardG4, StandardG5, StandardGS1, StandardGS2, StandardGS3, StandardGS4, StandardGS44, StandardGS48, StandardGS5, StandardGS516, StandardGS58, StandardH16, StandardH16m, StandardH16mr, StandardH16r, StandardH8, StandardH8m, StandardL16s, StandardL32s, StandardL4s, StandardL8s, StandardM12832ms, StandardM12864ms, StandardM128ms, StandardM128s, StandardM6416ms, StandardM6432ms, StandardM64ms, StandardM64s, StandardNC12, StandardNC12sV2, StandardNC12sV3, StandardNC24, StandardNC24r, StandardNC24rsV2, StandardNC24rsV3, StandardNC24sV2, StandardNC24sV3, StandardNC6, StandardNC6sV2, StandardNC6sV3, StandardND12s, StandardND24rs, StandardND24s, StandardND6s, StandardNV12, StandardNV24, StandardNV6} 469} 470 471// AccessProfile profile for enabling a user to access a managed cluster. 472type AccessProfile struct { 473 // KubeConfig - Base64-encoded Kubernetes configuration file. 474 KubeConfig *[]byte `json:"kubeConfig,omitempty"` 475} 476 477// AgentPoolProfile profile for the container service agent pool. 478type AgentPoolProfile struct { 479 // Name - Unique name of the agent pool profile in the context of the subscription and resource group. 480 Name *string `json:"name,omitempty"` 481 // Count - Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. 482 Count *int32 `json:"count,omitempty"` 483 // VMSize - Size of agent VMs. Possible values include: 'StandardA1', 'StandardA10', 'StandardA11', 'StandardA1V2', 'StandardA2', 'StandardA2V2', 'StandardA2mV2', 'StandardA3', 'StandardA4', 'StandardA4V2', 'StandardA4mV2', 'StandardA5', 'StandardA6', 'StandardA7', 'StandardA8', 'StandardA8V2', 'StandardA8mV2', 'StandardA9', 'StandardB2ms', 'StandardB2s', 'StandardB4ms', 'StandardB8ms', 'StandardD1', 'StandardD11', 'StandardD11V2', 'StandardD11V2Promo', 'StandardD12', 'StandardD12V2', 'StandardD12V2Promo', 'StandardD13', 'StandardD13V2', 'StandardD13V2Promo', 'StandardD14', 'StandardD14V2', 'StandardD14V2Promo', 'StandardD15V2', 'StandardD16V3', 'StandardD16sV3', 'StandardD1V2', 'StandardD2', 'StandardD2V2', 'StandardD2V2Promo', 'StandardD2V3', 'StandardD2sV3', 'StandardD3', 'StandardD32V3', 'StandardD32sV3', 'StandardD3V2', 'StandardD3V2Promo', 'StandardD4', 'StandardD4V2', 'StandardD4V2Promo', 'StandardD4V3', 'StandardD4sV3', 'StandardD5V2', 'StandardD5V2Promo', 'StandardD64V3', 'StandardD64sV3', 'StandardD8V3', 'StandardD8sV3', 'StandardDS1', 'StandardDS11', 'StandardDS11V2', 'StandardDS11V2Promo', 'StandardDS12', 'StandardDS12V2', 'StandardDS12V2Promo', 'StandardDS13', 'StandardDS132V2', 'StandardDS134V2', 'StandardDS13V2', 'StandardDS13V2Promo', 'StandardDS14', 'StandardDS144V2', 'StandardDS148V2', 'StandardDS14V2', 'StandardDS14V2Promo', 'StandardDS15V2', 'StandardDS1V2', 'StandardDS2', 'StandardDS2V2', 'StandardDS2V2Promo', 'StandardDS3', 'StandardDS3V2', 'StandardDS3V2Promo', 'StandardDS4', 'StandardDS4V2', 'StandardDS4V2Promo', 'StandardDS5V2', 'StandardDS5V2Promo', 'StandardE16V3', 'StandardE16sV3', 'StandardE2V3', 'StandardE2sV3', 'StandardE3216sV3', 'StandardE328sV3', 'StandardE32V3', 'StandardE32sV3', 'StandardE4V3', 'StandardE4sV3', 'StandardE6416sV3', 'StandardE6432sV3', 'StandardE64V3', 'StandardE64sV3', 'StandardE8V3', 'StandardE8sV3', 'StandardF1', 'StandardF16', 'StandardF16s', 'StandardF16sV2', 'StandardF1s', 'StandardF2', 'StandardF2s', 'StandardF2sV2', 'StandardF32sV2', 'StandardF4', 'StandardF4s', 'StandardF4sV2', 'StandardF64sV2', 'StandardF72sV2', 'StandardF8', 'StandardF8s', 'StandardF8sV2', 'StandardG1', 'StandardG2', 'StandardG3', 'StandardG4', 'StandardG5', 'StandardGS1', 'StandardGS2', 'StandardGS3', 'StandardGS4', 'StandardGS44', 'StandardGS48', 'StandardGS5', 'StandardGS516', 'StandardGS58', 'StandardH16', 'StandardH16m', 'StandardH16mr', 'StandardH16r', 'StandardH8', 'StandardH8m', 'StandardL16s', 'StandardL32s', 'StandardL4s', 'StandardL8s', 'StandardM12832ms', 'StandardM12864ms', 'StandardM128ms', 'StandardM128s', 'StandardM6416ms', 'StandardM6432ms', 'StandardM64ms', 'StandardM64s', 'StandardNC12', 'StandardNC12sV2', 'StandardNC12sV3', 'StandardNC24', 'StandardNC24r', 'StandardNC24rsV2', 'StandardNC24rsV3', 'StandardNC24sV2', 'StandardNC24sV3', 'StandardNC6', 'StandardNC6sV2', 'StandardNC6sV3', 'StandardND12s', 'StandardND24rs', 'StandardND24s', 'StandardND6s', 'StandardNV12', 'StandardNV24', 'StandardNV6' 484 VMSize VMSizeTypes `json:"vmSize,omitempty"` 485 // OsDiskSizeGB - OS Disk Size in GB to be used to specify the disk size for every machine in this master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified. 486 OsDiskSizeGB *int32 `json:"osDiskSizeGB,omitempty"` 487 // DNSPrefix - DNS prefix to be used to create the FQDN for the agent pool. 488 DNSPrefix *string `json:"dnsPrefix,omitempty"` 489 // Fqdn - READ-ONLY; FQDN for the agent pool. 490 Fqdn *string `json:"fqdn,omitempty"` 491 // Ports - Ports number array used to expose on this agent pool. The default opened ports are different based on your choice of orchestrator. 492 Ports *[]int32 `json:"ports,omitempty"` 493 // StorageProfile - Storage profile specifies what kind of storage used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will choose for you based on the orchestrator choice. Possible values include: 'StorageAccount', 'ManagedDisks' 494 StorageProfile StorageProfileTypes `json:"storageProfile,omitempty"` 495 // VnetSubnetID - VNet SubnetID specifies the VNet's subnet identifier. 496 VnetSubnetID *string `json:"vnetSubnetID,omitempty"` 497 // OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows' 498 OsType OSType `json:"osType,omitempty"` 499} 500 501// ContainerService container service. 502type ContainerService struct { 503 autorest.Response `json:"-"` 504 // Properties - Properties of the container service. 505 *Properties `json:"properties,omitempty"` 506 // ID - READ-ONLY; Resource Id 507 ID *string `json:"id,omitempty"` 508 // Name - READ-ONLY; Resource name 509 Name *string `json:"name,omitempty"` 510 // Type - READ-ONLY; Resource type 511 Type *string `json:"type,omitempty"` 512 // Location - Resource location 513 Location *string `json:"location,omitempty"` 514 // Tags - Resource tags 515 Tags map[string]*string `json:"tags"` 516} 517 518// MarshalJSON is the custom marshaler for ContainerService. 519func (cs ContainerService) MarshalJSON() ([]byte, error) { 520 objectMap := make(map[string]interface{}) 521 if cs.Properties != nil { 522 objectMap["properties"] = cs.Properties 523 } 524 if cs.Location != nil { 525 objectMap["location"] = cs.Location 526 } 527 if cs.Tags != nil { 528 objectMap["tags"] = cs.Tags 529 } 530 return json.Marshal(objectMap) 531} 532 533// UnmarshalJSON is the custom unmarshaler for ContainerService struct. 534func (cs *ContainerService) UnmarshalJSON(body []byte) error { 535 var m map[string]*json.RawMessage 536 err := json.Unmarshal(body, &m) 537 if err != nil { 538 return err 539 } 540 for k, v := range m { 541 switch k { 542 case "properties": 543 if v != nil { 544 var properties Properties 545 err = json.Unmarshal(*v, &properties) 546 if err != nil { 547 return err 548 } 549 cs.Properties = &properties 550 } 551 case "id": 552 if v != nil { 553 var ID string 554 err = json.Unmarshal(*v, &ID) 555 if err != nil { 556 return err 557 } 558 cs.ID = &ID 559 } 560 case "name": 561 if v != nil { 562 var name string 563 err = json.Unmarshal(*v, &name) 564 if err != nil { 565 return err 566 } 567 cs.Name = &name 568 } 569 case "type": 570 if v != nil { 571 var typeVar string 572 err = json.Unmarshal(*v, &typeVar) 573 if err != nil { 574 return err 575 } 576 cs.Type = &typeVar 577 } 578 case "location": 579 if v != nil { 580 var location string 581 err = json.Unmarshal(*v, &location) 582 if err != nil { 583 return err 584 } 585 cs.Location = &location 586 } 587 case "tags": 588 if v != nil { 589 var tags map[string]*string 590 err = json.Unmarshal(*v, &tags) 591 if err != nil { 592 return err 593 } 594 cs.Tags = tags 595 } 596 } 597 } 598 599 return nil 600} 601 602// ContainerServicesCreateOrUpdateFutureType an abstraction for monitoring and retrieving the results of a 603// long-running operation. 604type ContainerServicesCreateOrUpdateFutureType struct { 605 azure.Future 606} 607 608// Result returns the result of the asynchronous operation. 609// If the operation has not completed it will return an error. 610func (future *ContainerServicesCreateOrUpdateFutureType) Result(client ContainerServicesClient) (cs ContainerService, err error) { 611 var done bool 612 done, err = future.DoneWithContext(context.Background(), client) 613 if err != nil { 614 err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesCreateOrUpdateFutureType", "Result", future.Response(), "Polling failure") 615 return 616 } 617 if !done { 618 err = azure.NewAsyncOpIncompleteError("containerservice.ContainerServicesCreateOrUpdateFutureType") 619 return 620 } 621 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 622 if cs.Response.Response, err = future.GetResult(sender); err == nil && cs.Response.Response.StatusCode != http.StatusNoContent { 623 cs, err = client.CreateOrUpdateResponder(cs.Response.Response) 624 if err != nil { 625 err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesCreateOrUpdateFutureType", "Result", cs.Response.Response, "Failure responding to request") 626 } 627 } 628 return 629} 630 631// ContainerServicesDeleteFutureType an abstraction for monitoring and retrieving the results of a 632// long-running operation. 633type ContainerServicesDeleteFutureType struct { 634 azure.Future 635} 636 637// Result returns the result of the asynchronous operation. 638// If the operation has not completed it will return an error. 639func (future *ContainerServicesDeleteFutureType) Result(client ContainerServicesClient) (ar autorest.Response, err error) { 640 var done bool 641 done, err = future.DoneWithContext(context.Background(), client) 642 if err != nil { 643 err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesDeleteFutureType", "Result", future.Response(), "Polling failure") 644 return 645 } 646 if !done { 647 err = azure.NewAsyncOpIncompleteError("containerservice.ContainerServicesDeleteFutureType") 648 return 649 } 650 ar.Response = future.Response() 651 return 652} 653 654// CredentialResult the credential result response. 655type CredentialResult struct { 656 // Name - READ-ONLY; The name of the credential. 657 Name *string `json:"name,omitempty"` 658 // Value - READ-ONLY; Base64-encoded Kubernetes configuration file. 659 Value *[]byte `json:"value,omitempty"` 660} 661 662// CredentialResults the list of credential result response. 663type CredentialResults struct { 664 autorest.Response `json:"-"` 665 // Kubeconfigs - READ-ONLY; Base64-encoded Kubernetes configuration file. 666 Kubeconfigs *[]CredentialResult `json:"kubeconfigs,omitempty"` 667} 668 669// CustomProfile properties to configure a custom container service cluster. 670type CustomProfile struct { 671 // Orchestrator - The name of the custom orchestrator to use. 672 Orchestrator *string `json:"orchestrator,omitempty"` 673} 674 675// DiagnosticsProfile profile for diagnostics on the container service cluster. 676type DiagnosticsProfile struct { 677 // VMDiagnostics - Profile for diagnostics on the container service VMs. 678 VMDiagnostics *VMDiagnostics `json:"vmDiagnostics,omitempty"` 679} 680 681// KeyVaultSecretRef reference to a secret stored in Azure Key Vault. 682type KeyVaultSecretRef struct { 683 // VaultID - Key vault identifier. 684 VaultID *string `json:"vaultID,omitempty"` 685 // SecretName - The secret name. 686 SecretName *string `json:"secretName,omitempty"` 687 // Version - The secret version. 688 Version *string `json:"version,omitempty"` 689} 690 691// LinuxProfile profile for Linux VMs in the container service cluster. 692type LinuxProfile struct { 693 // AdminUsername - The administrator username to use for Linux VMs. 694 AdminUsername *string `json:"adminUsername,omitempty"` 695 // SSH - SSH configuration for Linux-based VMs running on Azure. 696 SSH *SSHConfiguration `json:"ssh,omitempty"` 697} 698 699// ListResult the response from the List Container Services operation. 700type ListResult struct { 701 autorest.Response `json:"-"` 702 // Value - The list of container services. 703 Value *[]ContainerService `json:"value,omitempty"` 704 // NextLink - READ-ONLY; The URL to get the next set of container service results. 705 NextLink *string `json:"nextLink,omitempty"` 706} 707 708// ListResultIterator provides access to a complete listing of ContainerService values. 709type ListResultIterator struct { 710 i int 711 page ListResultPage 712} 713 714// NextWithContext advances to the next value. If there was an error making 715// the request the iterator does not advance and the error is returned. 716func (iter *ListResultIterator) NextWithContext(ctx context.Context) (err error) { 717 if tracing.IsEnabled() { 718 ctx = tracing.StartSpan(ctx, fqdn+"/ListResultIterator.NextWithContext") 719 defer func() { 720 sc := -1 721 if iter.Response().Response.Response != nil { 722 sc = iter.Response().Response.Response.StatusCode 723 } 724 tracing.EndSpan(ctx, sc, err) 725 }() 726 } 727 iter.i++ 728 if iter.i < len(iter.page.Values()) { 729 return nil 730 } 731 err = iter.page.NextWithContext(ctx) 732 if err != nil { 733 iter.i-- 734 return err 735 } 736 iter.i = 0 737 return nil 738} 739 740// Next advances to the next value. If there was an error making 741// the request the iterator does not advance and the error is returned. 742// Deprecated: Use NextWithContext() instead. 743func (iter *ListResultIterator) Next() error { 744 return iter.NextWithContext(context.Background()) 745} 746 747// NotDone returns true if the enumeration should be started or is not yet complete. 748func (iter ListResultIterator) NotDone() bool { 749 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 750} 751 752// Response returns the raw server response from the last page request. 753func (iter ListResultIterator) Response() ListResult { 754 return iter.page.Response() 755} 756 757// Value returns the current value or a zero-initialized value if the 758// iterator has advanced beyond the end of the collection. 759func (iter ListResultIterator) Value() ContainerService { 760 if !iter.page.NotDone() { 761 return ContainerService{} 762 } 763 return iter.page.Values()[iter.i] 764} 765 766// Creates a new instance of the ListResultIterator type. 767func NewListResultIterator(page ListResultPage) ListResultIterator { 768 return ListResultIterator{page: page} 769} 770 771// IsEmpty returns true if the ListResult contains no values. 772func (lr ListResult) IsEmpty() bool { 773 return lr.Value == nil || len(*lr.Value) == 0 774} 775 776// listResultPreparer prepares a request to retrieve the next set of results. 777// It returns nil if no more results exist. 778func (lr ListResult) listResultPreparer(ctx context.Context) (*http.Request, error) { 779 if lr.NextLink == nil || len(to.String(lr.NextLink)) < 1 { 780 return nil, nil 781 } 782 return autorest.Prepare((&http.Request{}).WithContext(ctx), 783 autorest.AsJSON(), 784 autorest.AsGet(), 785 autorest.WithBaseURL(to.String(lr.NextLink))) 786} 787 788// ListResultPage contains a page of ContainerService values. 789type ListResultPage struct { 790 fn func(context.Context, ListResult) (ListResult, error) 791 lr ListResult 792} 793 794// NextWithContext advances to the next page of values. If there was an error making 795// the request the page does not advance and the error is returned. 796func (page *ListResultPage) NextWithContext(ctx context.Context) (err error) { 797 if tracing.IsEnabled() { 798 ctx = tracing.StartSpan(ctx, fqdn+"/ListResultPage.NextWithContext") 799 defer func() { 800 sc := -1 801 if page.Response().Response.Response != nil { 802 sc = page.Response().Response.Response.StatusCode 803 } 804 tracing.EndSpan(ctx, sc, err) 805 }() 806 } 807 next, err := page.fn(ctx, page.lr) 808 if err != nil { 809 return err 810 } 811 page.lr = next 812 return nil 813} 814 815// Next advances to the next page of values. If there was an error making 816// the request the page does not advance and the error is returned. 817// Deprecated: Use NextWithContext() instead. 818func (page *ListResultPage) Next() error { 819 return page.NextWithContext(context.Background()) 820} 821 822// NotDone returns true if the page enumeration should be started or is not yet complete. 823func (page ListResultPage) NotDone() bool { 824 return !page.lr.IsEmpty() 825} 826 827// Response returns the raw server response from the last page request. 828func (page ListResultPage) Response() ListResult { 829 return page.lr 830} 831 832// Values returns the slice of values for the current page or nil if there are no values. 833func (page ListResultPage) Values() []ContainerService { 834 if page.lr.IsEmpty() { 835 return nil 836 } 837 return *page.lr.Value 838} 839 840// Creates a new instance of the ListResultPage type. 841func NewListResultPage(getNextPage func(context.Context, ListResult) (ListResult, error)) ListResultPage { 842 return ListResultPage{fn: getNextPage} 843} 844 845// ManagedCluster managed cluster. 846type ManagedCluster struct { 847 autorest.Response `json:"-"` 848 // ManagedClusterProperties - Properties of a managed cluster. 849 *ManagedClusterProperties `json:"properties,omitempty"` 850 // ID - READ-ONLY; Resource Id 851 ID *string `json:"id,omitempty"` 852 // Name - READ-ONLY; Resource name 853 Name *string `json:"name,omitempty"` 854 // Type - READ-ONLY; Resource type 855 Type *string `json:"type,omitempty"` 856 // Location - Resource location 857 Location *string `json:"location,omitempty"` 858 // Tags - Resource tags 859 Tags map[string]*string `json:"tags"` 860} 861 862// MarshalJSON is the custom marshaler for ManagedCluster. 863func (mc ManagedCluster) MarshalJSON() ([]byte, error) { 864 objectMap := make(map[string]interface{}) 865 if mc.ManagedClusterProperties != nil { 866 objectMap["properties"] = mc.ManagedClusterProperties 867 } 868 if mc.Location != nil { 869 objectMap["location"] = mc.Location 870 } 871 if mc.Tags != nil { 872 objectMap["tags"] = mc.Tags 873 } 874 return json.Marshal(objectMap) 875} 876 877// UnmarshalJSON is the custom unmarshaler for ManagedCluster struct. 878func (mc *ManagedCluster) UnmarshalJSON(body []byte) error { 879 var m map[string]*json.RawMessage 880 err := json.Unmarshal(body, &m) 881 if err != nil { 882 return err 883 } 884 for k, v := range m { 885 switch k { 886 case "properties": 887 if v != nil { 888 var managedClusterProperties ManagedClusterProperties 889 err = json.Unmarshal(*v, &managedClusterProperties) 890 if err != nil { 891 return err 892 } 893 mc.ManagedClusterProperties = &managedClusterProperties 894 } 895 case "id": 896 if v != nil { 897 var ID string 898 err = json.Unmarshal(*v, &ID) 899 if err != nil { 900 return err 901 } 902 mc.ID = &ID 903 } 904 case "name": 905 if v != nil { 906 var name string 907 err = json.Unmarshal(*v, &name) 908 if err != nil { 909 return err 910 } 911 mc.Name = &name 912 } 913 case "type": 914 if v != nil { 915 var typeVar string 916 err = json.Unmarshal(*v, &typeVar) 917 if err != nil { 918 return err 919 } 920 mc.Type = &typeVar 921 } 922 case "location": 923 if v != nil { 924 var location string 925 err = json.Unmarshal(*v, &location) 926 if err != nil { 927 return err 928 } 929 mc.Location = &location 930 } 931 case "tags": 932 if v != nil { 933 var tags map[string]*string 934 err = json.Unmarshal(*v, &tags) 935 if err != nil { 936 return err 937 } 938 mc.Tags = tags 939 } 940 } 941 } 942 943 return nil 944} 945 946// ManagedClusterAADProfile aADProfile specifies attributes for Azure Active Directory integration. 947type ManagedClusterAADProfile struct { 948 // ClientAppID - The client AAD application ID. 949 ClientAppID *string `json:"clientAppID,omitempty"` 950 // ServerAppID - The server AAD application ID. 951 ServerAppID *string `json:"serverAppID,omitempty"` 952 // ServerAppSecret - The server AAD application secret. 953 ServerAppSecret *string `json:"serverAppSecret,omitempty"` 954 // TenantID - The AAD tenant ID to use for authentication. If not specified, will use the tenant of the deployment subscription. 955 TenantID *string `json:"tenantID,omitempty"` 956} 957 958// ManagedClusterAccessProfile managed cluster Access Profile. 959type ManagedClusterAccessProfile struct { 960 autorest.Response `json:"-"` 961 // AccessProfile - AccessProfile of a managed cluster. 962 *AccessProfile `json:"properties,omitempty"` 963 // ID - READ-ONLY; Resource Id 964 ID *string `json:"id,omitempty"` 965 // Name - READ-ONLY; Resource name 966 Name *string `json:"name,omitempty"` 967 // Type - READ-ONLY; Resource type 968 Type *string `json:"type,omitempty"` 969 // Location - Resource location 970 Location *string `json:"location,omitempty"` 971 // Tags - Resource tags 972 Tags map[string]*string `json:"tags"` 973} 974 975// MarshalJSON is the custom marshaler for ManagedClusterAccessProfile. 976func (mcap ManagedClusterAccessProfile) MarshalJSON() ([]byte, error) { 977 objectMap := make(map[string]interface{}) 978 if mcap.AccessProfile != nil { 979 objectMap["properties"] = mcap.AccessProfile 980 } 981 if mcap.Location != nil { 982 objectMap["location"] = mcap.Location 983 } 984 if mcap.Tags != nil { 985 objectMap["tags"] = mcap.Tags 986 } 987 return json.Marshal(objectMap) 988} 989 990// UnmarshalJSON is the custom unmarshaler for ManagedClusterAccessProfile struct. 991func (mcap *ManagedClusterAccessProfile) UnmarshalJSON(body []byte) error { 992 var m map[string]*json.RawMessage 993 err := json.Unmarshal(body, &m) 994 if err != nil { 995 return err 996 } 997 for k, v := range m { 998 switch k { 999 case "properties": 1000 if v != nil { 1001 var accessProfile AccessProfile 1002 err = json.Unmarshal(*v, &accessProfile) 1003 if err != nil { 1004 return err 1005 } 1006 mcap.AccessProfile = &accessProfile 1007 } 1008 case "id": 1009 if v != nil { 1010 var ID string 1011 err = json.Unmarshal(*v, &ID) 1012 if err != nil { 1013 return err 1014 } 1015 mcap.ID = &ID 1016 } 1017 case "name": 1018 if v != nil { 1019 var name string 1020 err = json.Unmarshal(*v, &name) 1021 if err != nil { 1022 return err 1023 } 1024 mcap.Name = &name 1025 } 1026 case "type": 1027 if v != nil { 1028 var typeVar string 1029 err = json.Unmarshal(*v, &typeVar) 1030 if err != nil { 1031 return err 1032 } 1033 mcap.Type = &typeVar 1034 } 1035 case "location": 1036 if v != nil { 1037 var location string 1038 err = json.Unmarshal(*v, &location) 1039 if err != nil { 1040 return err 1041 } 1042 mcap.Location = &location 1043 } 1044 case "tags": 1045 if v != nil { 1046 var tags map[string]*string 1047 err = json.Unmarshal(*v, &tags) 1048 if err != nil { 1049 return err 1050 } 1051 mcap.Tags = tags 1052 } 1053 } 1054 } 1055 1056 return nil 1057} 1058 1059// ManagedClusterAddonProfile a Kubernetes add-on profile for a managed cluster. 1060type ManagedClusterAddonProfile struct { 1061 // Enabled - Whether the add-on is enabled or not. 1062 Enabled *bool `json:"enabled,omitempty"` 1063 // Config - Key-value pairs for configuring an add-on. 1064 Config map[string]*string `json:"config"` 1065} 1066 1067// MarshalJSON is the custom marshaler for ManagedClusterAddonProfile. 1068func (mcap ManagedClusterAddonProfile) MarshalJSON() ([]byte, error) { 1069 objectMap := make(map[string]interface{}) 1070 if mcap.Enabled != nil { 1071 objectMap["enabled"] = mcap.Enabled 1072 } 1073 if mcap.Config != nil { 1074 objectMap["config"] = mcap.Config 1075 } 1076 return json.Marshal(objectMap) 1077} 1078 1079// ManagedClusterAgentPoolProfile profile for the container service agent pool. 1080type ManagedClusterAgentPoolProfile struct { 1081 // Name - Unique name of the agent pool profile in the context of the subscription and resource group. 1082 Name *string `json:"name,omitempty"` 1083 // Count - Number of agents (VMs) to host docker containers. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. 1084 Count *int32 `json:"count,omitempty"` 1085 // VMSize - Size of agent VMs. Possible values include: 'StandardA1', 'StandardA10', 'StandardA11', 'StandardA1V2', 'StandardA2', 'StandardA2V2', 'StandardA2mV2', 'StandardA3', 'StandardA4', 'StandardA4V2', 'StandardA4mV2', 'StandardA5', 'StandardA6', 'StandardA7', 'StandardA8', 'StandardA8V2', 'StandardA8mV2', 'StandardA9', 'StandardB2ms', 'StandardB2s', 'StandardB4ms', 'StandardB8ms', 'StandardD1', 'StandardD11', 'StandardD11V2', 'StandardD11V2Promo', 'StandardD12', 'StandardD12V2', 'StandardD12V2Promo', 'StandardD13', 'StandardD13V2', 'StandardD13V2Promo', 'StandardD14', 'StandardD14V2', 'StandardD14V2Promo', 'StandardD15V2', 'StandardD16V3', 'StandardD16sV3', 'StandardD1V2', 'StandardD2', 'StandardD2V2', 'StandardD2V2Promo', 'StandardD2V3', 'StandardD2sV3', 'StandardD3', 'StandardD32V3', 'StandardD32sV3', 'StandardD3V2', 'StandardD3V2Promo', 'StandardD4', 'StandardD4V2', 'StandardD4V2Promo', 'StandardD4V3', 'StandardD4sV3', 'StandardD5V2', 'StandardD5V2Promo', 'StandardD64V3', 'StandardD64sV3', 'StandardD8V3', 'StandardD8sV3', 'StandardDS1', 'StandardDS11', 'StandardDS11V2', 'StandardDS11V2Promo', 'StandardDS12', 'StandardDS12V2', 'StandardDS12V2Promo', 'StandardDS13', 'StandardDS132V2', 'StandardDS134V2', 'StandardDS13V2', 'StandardDS13V2Promo', 'StandardDS14', 'StandardDS144V2', 'StandardDS148V2', 'StandardDS14V2', 'StandardDS14V2Promo', 'StandardDS15V2', 'StandardDS1V2', 'StandardDS2', 'StandardDS2V2', 'StandardDS2V2Promo', 'StandardDS3', 'StandardDS3V2', 'StandardDS3V2Promo', 'StandardDS4', 'StandardDS4V2', 'StandardDS4V2Promo', 'StandardDS5V2', 'StandardDS5V2Promo', 'StandardE16V3', 'StandardE16sV3', 'StandardE2V3', 'StandardE2sV3', 'StandardE3216sV3', 'StandardE328sV3', 'StandardE32V3', 'StandardE32sV3', 'StandardE4V3', 'StandardE4sV3', 'StandardE6416sV3', 'StandardE6432sV3', 'StandardE64V3', 'StandardE64sV3', 'StandardE8V3', 'StandardE8sV3', 'StandardF1', 'StandardF16', 'StandardF16s', 'StandardF16sV2', 'StandardF1s', 'StandardF2', 'StandardF2s', 'StandardF2sV2', 'StandardF32sV2', 'StandardF4', 'StandardF4s', 'StandardF4sV2', 'StandardF64sV2', 'StandardF72sV2', 'StandardF8', 'StandardF8s', 'StandardF8sV2', 'StandardG1', 'StandardG2', 'StandardG3', 'StandardG4', 'StandardG5', 'StandardGS1', 'StandardGS2', 'StandardGS3', 'StandardGS4', 'StandardGS44', 'StandardGS48', 'StandardGS5', 'StandardGS516', 'StandardGS58', 'StandardH16', 'StandardH16m', 'StandardH16mr', 'StandardH16r', 'StandardH8', 'StandardH8m', 'StandardL16s', 'StandardL32s', 'StandardL4s', 'StandardL8s', 'StandardM12832ms', 'StandardM12864ms', 'StandardM128ms', 'StandardM128s', 'StandardM6416ms', 'StandardM6432ms', 'StandardM64ms', 'StandardM64s', 'StandardNC12', 'StandardNC12sV2', 'StandardNC12sV3', 'StandardNC24', 'StandardNC24r', 'StandardNC24rsV2', 'StandardNC24rsV3', 'StandardNC24sV2', 'StandardNC24sV3', 'StandardNC6', 'StandardNC6sV2', 'StandardNC6sV3', 'StandardND12s', 'StandardND24rs', 'StandardND24s', 'StandardND6s', 'StandardNV12', 'StandardNV24', 'StandardNV6' 1086 VMSize VMSizeTypes `json:"vmSize,omitempty"` 1087 // OsDiskSizeGB - OS Disk Size in GB to be used to specify the disk size for every machine in this master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified. 1088 OsDiskSizeGB *int32 `json:"osDiskSizeGB,omitempty"` 1089 // StorageProfile - READ-ONLY; Storage profile specifies what kind of storage used. Defaults to ManagedDisks. Possible values include: 'StorageAccount', 'ManagedDisks' 1090 StorageProfile StorageProfileTypes `json:"storageProfile,omitempty"` 1091 // VnetSubnetID - VNet SubnetID specifies the VNet's subnet identifier. 1092 VnetSubnetID *string `json:"vnetSubnetID,omitempty"` 1093 // MaxPods - Maximum number of pods that can run on a node. 1094 MaxPods *int32 `json:"maxPods,omitempty"` 1095 // OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows' 1096 OsType OSType `json:"osType,omitempty"` 1097} 1098 1099// ManagedClusterListResult the response from the List Managed Clusters operation. 1100type ManagedClusterListResult struct { 1101 autorest.Response `json:"-"` 1102 // Value - The list of managed clusters. 1103 Value *[]ManagedCluster `json:"value,omitempty"` 1104 // NextLink - READ-ONLY; The URL to get the next set of managed cluster results. 1105 NextLink *string `json:"nextLink,omitempty"` 1106} 1107 1108// ManagedClusterListResultIterator provides access to a complete listing of ManagedCluster values. 1109type ManagedClusterListResultIterator struct { 1110 i int 1111 page ManagedClusterListResultPage 1112} 1113 1114// NextWithContext advances to the next value. If there was an error making 1115// the request the iterator does not advance and the error is returned. 1116func (iter *ManagedClusterListResultIterator) NextWithContext(ctx context.Context) (err error) { 1117 if tracing.IsEnabled() { 1118 ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClusterListResultIterator.NextWithContext") 1119 defer func() { 1120 sc := -1 1121 if iter.Response().Response.Response != nil { 1122 sc = iter.Response().Response.Response.StatusCode 1123 } 1124 tracing.EndSpan(ctx, sc, err) 1125 }() 1126 } 1127 iter.i++ 1128 if iter.i < len(iter.page.Values()) { 1129 return nil 1130 } 1131 err = iter.page.NextWithContext(ctx) 1132 if err != nil { 1133 iter.i-- 1134 return err 1135 } 1136 iter.i = 0 1137 return nil 1138} 1139 1140// Next advances to the next value. If there was an error making 1141// the request the iterator does not advance and the error is returned. 1142// Deprecated: Use NextWithContext() instead. 1143func (iter *ManagedClusterListResultIterator) Next() error { 1144 return iter.NextWithContext(context.Background()) 1145} 1146 1147// NotDone returns true if the enumeration should be started or is not yet complete. 1148func (iter ManagedClusterListResultIterator) NotDone() bool { 1149 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 1150} 1151 1152// Response returns the raw server response from the last page request. 1153func (iter ManagedClusterListResultIterator) Response() ManagedClusterListResult { 1154 return iter.page.Response() 1155} 1156 1157// Value returns the current value or a zero-initialized value if the 1158// iterator has advanced beyond the end of the collection. 1159func (iter ManagedClusterListResultIterator) Value() ManagedCluster { 1160 if !iter.page.NotDone() { 1161 return ManagedCluster{} 1162 } 1163 return iter.page.Values()[iter.i] 1164} 1165 1166// Creates a new instance of the ManagedClusterListResultIterator type. 1167func NewManagedClusterListResultIterator(page ManagedClusterListResultPage) ManagedClusterListResultIterator { 1168 return ManagedClusterListResultIterator{page: page} 1169} 1170 1171// IsEmpty returns true if the ListResult contains no values. 1172func (mclr ManagedClusterListResult) IsEmpty() bool { 1173 return mclr.Value == nil || len(*mclr.Value) == 0 1174} 1175 1176// managedClusterListResultPreparer prepares a request to retrieve the next set of results. 1177// It returns nil if no more results exist. 1178func (mclr ManagedClusterListResult) managedClusterListResultPreparer(ctx context.Context) (*http.Request, error) { 1179 if mclr.NextLink == nil || len(to.String(mclr.NextLink)) < 1 { 1180 return nil, nil 1181 } 1182 return autorest.Prepare((&http.Request{}).WithContext(ctx), 1183 autorest.AsJSON(), 1184 autorest.AsGet(), 1185 autorest.WithBaseURL(to.String(mclr.NextLink))) 1186} 1187 1188// ManagedClusterListResultPage contains a page of ManagedCluster values. 1189type ManagedClusterListResultPage struct { 1190 fn func(context.Context, ManagedClusterListResult) (ManagedClusterListResult, error) 1191 mclr ManagedClusterListResult 1192} 1193 1194// NextWithContext advances to the next page of values. If there was an error making 1195// the request the page does not advance and the error is returned. 1196func (page *ManagedClusterListResultPage) NextWithContext(ctx context.Context) (err error) { 1197 if tracing.IsEnabled() { 1198 ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClusterListResultPage.NextWithContext") 1199 defer func() { 1200 sc := -1 1201 if page.Response().Response.Response != nil { 1202 sc = page.Response().Response.Response.StatusCode 1203 } 1204 tracing.EndSpan(ctx, sc, err) 1205 }() 1206 } 1207 next, err := page.fn(ctx, page.mclr) 1208 if err != nil { 1209 return err 1210 } 1211 page.mclr = next 1212 return nil 1213} 1214 1215// Next advances to the next page of values. If there was an error making 1216// the request the page does not advance and the error is returned. 1217// Deprecated: Use NextWithContext() instead. 1218func (page *ManagedClusterListResultPage) Next() error { 1219 return page.NextWithContext(context.Background()) 1220} 1221 1222// NotDone returns true if the page enumeration should be started or is not yet complete. 1223func (page ManagedClusterListResultPage) NotDone() bool { 1224 return !page.mclr.IsEmpty() 1225} 1226 1227// Response returns the raw server response from the last page request. 1228func (page ManagedClusterListResultPage) Response() ManagedClusterListResult { 1229 return page.mclr 1230} 1231 1232// Values returns the slice of values for the current page or nil if there are no values. 1233func (page ManagedClusterListResultPage) Values() []ManagedCluster { 1234 if page.mclr.IsEmpty() { 1235 return nil 1236 } 1237 return *page.mclr.Value 1238} 1239 1240// Creates a new instance of the ManagedClusterListResultPage type. 1241func NewManagedClusterListResultPage(getNextPage func(context.Context, ManagedClusterListResult) (ManagedClusterListResult, error)) ManagedClusterListResultPage { 1242 return ManagedClusterListResultPage{fn: getNextPage} 1243} 1244 1245// ManagedClusterPoolUpgradeProfile the list of available upgrade versions. 1246type ManagedClusterPoolUpgradeProfile struct { 1247 // KubernetesVersion - Kubernetes version (major, minor, patch). 1248 KubernetesVersion *string `json:"kubernetesVersion,omitempty"` 1249 // Name - Pool name. 1250 Name *string `json:"name,omitempty"` 1251 // OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows' 1252 OsType OSType `json:"osType,omitempty"` 1253 // Upgrades - List of orchestrator types and versions available for upgrade. 1254 Upgrades *[]string `json:"upgrades,omitempty"` 1255} 1256 1257// ManagedClusterProperties properties of the managed cluster. 1258type ManagedClusterProperties struct { 1259 // ProvisioningState - READ-ONLY; The current deployment or provisioning state, which only appears in the response. 1260 ProvisioningState *string `json:"provisioningState,omitempty"` 1261 // KubernetesVersion - Version of Kubernetes specified when creating the managed cluster. 1262 KubernetesVersion *string `json:"kubernetesVersion,omitempty"` 1263 // DNSPrefix - DNS prefix specified when creating the managed cluster. 1264 DNSPrefix *string `json:"dnsPrefix,omitempty"` 1265 // Fqdn - READ-ONLY; FQDN for the master pool. 1266 Fqdn *string `json:"fqdn,omitempty"` 1267 // AgentPoolProfiles - Properties of the agent pool. Currently only one agent pool can exist. 1268 AgentPoolProfiles *[]ManagedClusterAgentPoolProfile `json:"agentPoolProfiles,omitempty"` 1269 // LinuxProfile - Profile for Linux VMs in the container service cluster. 1270 LinuxProfile *LinuxProfile `json:"linuxProfile,omitempty"` 1271 // ServicePrincipalProfile - Information about a service principal identity for the cluster to use for manipulating Azure APIs. 1272 ServicePrincipalProfile *ManagedClusterServicePrincipalProfile `json:"servicePrincipalProfile,omitempty"` 1273 // AddonProfiles - Profile of managed cluster add-on. 1274 AddonProfiles map[string]*ManagedClusterAddonProfile `json:"addonProfiles"` 1275 // NodeResourceGroup - READ-ONLY; Name of the resource group containing agent pool nodes. 1276 NodeResourceGroup *string `json:"nodeResourceGroup,omitempty"` 1277 // EnableRBAC - Whether to enable Kubernetes Role-Based Access Control. 1278 EnableRBAC *bool `json:"enableRBAC,omitempty"` 1279 // NetworkProfile - Profile of network configuration. 1280 NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"` 1281 // AadProfile - Profile of Azure Active Directory configuration. 1282 AadProfile *ManagedClusterAADProfile `json:"aadProfile,omitempty"` 1283} 1284 1285// MarshalJSON is the custom marshaler for ManagedClusterProperties. 1286func (mcp ManagedClusterProperties) MarshalJSON() ([]byte, error) { 1287 objectMap := make(map[string]interface{}) 1288 if mcp.KubernetesVersion != nil { 1289 objectMap["kubernetesVersion"] = mcp.KubernetesVersion 1290 } 1291 if mcp.DNSPrefix != nil { 1292 objectMap["dnsPrefix"] = mcp.DNSPrefix 1293 } 1294 if mcp.AgentPoolProfiles != nil { 1295 objectMap["agentPoolProfiles"] = mcp.AgentPoolProfiles 1296 } 1297 if mcp.LinuxProfile != nil { 1298 objectMap["linuxProfile"] = mcp.LinuxProfile 1299 } 1300 if mcp.ServicePrincipalProfile != nil { 1301 objectMap["servicePrincipalProfile"] = mcp.ServicePrincipalProfile 1302 } 1303 if mcp.AddonProfiles != nil { 1304 objectMap["addonProfiles"] = mcp.AddonProfiles 1305 } 1306 if mcp.EnableRBAC != nil { 1307 objectMap["enableRBAC"] = mcp.EnableRBAC 1308 } 1309 if mcp.NetworkProfile != nil { 1310 objectMap["networkProfile"] = mcp.NetworkProfile 1311 } 1312 if mcp.AadProfile != nil { 1313 objectMap["aadProfile"] = mcp.AadProfile 1314 } 1315 return json.Marshal(objectMap) 1316} 1317 1318// ManagedClustersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 1319// long-running operation. 1320type ManagedClustersCreateOrUpdateFuture struct { 1321 azure.Future 1322} 1323 1324// Result returns the result of the asynchronous operation. 1325// If the operation has not completed it will return an error. 1326func (future *ManagedClustersCreateOrUpdateFuture) Result(client ManagedClustersClient) (mc ManagedCluster, err error) { 1327 var done bool 1328 done, err = future.DoneWithContext(context.Background(), client) 1329 if err != nil { 1330 err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 1331 return 1332 } 1333 if !done { 1334 err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersCreateOrUpdateFuture") 1335 return 1336 } 1337 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 1338 if mc.Response.Response, err = future.GetResult(sender); err == nil && mc.Response.Response.StatusCode != http.StatusNoContent { 1339 mc, err = client.CreateOrUpdateResponder(mc.Response.Response) 1340 if err != nil { 1341 err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersCreateOrUpdateFuture", "Result", mc.Response.Response, "Failure responding to request") 1342 } 1343 } 1344 return 1345} 1346 1347// ManagedClustersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 1348// operation. 1349type ManagedClustersDeleteFuture struct { 1350 azure.Future 1351} 1352 1353// Result returns the result of the asynchronous operation. 1354// If the operation has not completed it will return an error. 1355func (future *ManagedClustersDeleteFuture) Result(client ManagedClustersClient) (ar autorest.Response, err error) { 1356 var done bool 1357 done, err = future.DoneWithContext(context.Background(), client) 1358 if err != nil { 1359 err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersDeleteFuture", "Result", future.Response(), "Polling failure") 1360 return 1361 } 1362 if !done { 1363 err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersDeleteFuture") 1364 return 1365 } 1366 ar.Response = future.Response() 1367 return 1368} 1369 1370// ManagedClusterServicePrincipalProfile information about a service principal identity for the cluster to 1371// use for manipulating Azure APIs. 1372type ManagedClusterServicePrincipalProfile struct { 1373 // ClientID - The ID for the service principal. 1374 ClientID *string `json:"clientId,omitempty"` 1375 // Secret - The secret password associated with the service principal in plain text. 1376 Secret *string `json:"secret,omitempty"` 1377} 1378 1379// ManagedClustersResetAADProfileFuture an abstraction for monitoring and retrieving the results of a 1380// long-running operation. 1381type ManagedClustersResetAADProfileFuture struct { 1382 azure.Future 1383} 1384 1385// Result returns the result of the asynchronous operation. 1386// If the operation has not completed it will return an error. 1387func (future *ManagedClustersResetAADProfileFuture) Result(client ManagedClustersClient) (ar autorest.Response, err error) { 1388 var done bool 1389 done, err = future.DoneWithContext(context.Background(), client) 1390 if err != nil { 1391 err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersResetAADProfileFuture", "Result", future.Response(), "Polling failure") 1392 return 1393 } 1394 if !done { 1395 err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersResetAADProfileFuture") 1396 return 1397 } 1398 ar.Response = future.Response() 1399 return 1400} 1401 1402// ManagedClustersResetServicePrincipalProfileFuture an abstraction for monitoring and retrieving the 1403// results of a long-running operation. 1404type ManagedClustersResetServicePrincipalProfileFuture struct { 1405 azure.Future 1406} 1407 1408// Result returns the result of the asynchronous operation. 1409// If the operation has not completed it will return an error. 1410func (future *ManagedClustersResetServicePrincipalProfileFuture) Result(client ManagedClustersClient) (ar autorest.Response, err error) { 1411 var done bool 1412 done, err = future.DoneWithContext(context.Background(), client) 1413 if err != nil { 1414 err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersResetServicePrincipalProfileFuture", "Result", future.Response(), "Polling failure") 1415 return 1416 } 1417 if !done { 1418 err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersResetServicePrincipalProfileFuture") 1419 return 1420 } 1421 ar.Response = future.Response() 1422 return 1423} 1424 1425// ManagedClustersUpdateTagsFuture an abstraction for monitoring and retrieving the results of a 1426// long-running operation. 1427type ManagedClustersUpdateTagsFuture struct { 1428 azure.Future 1429} 1430 1431// Result returns the result of the asynchronous operation. 1432// If the operation has not completed it will return an error. 1433func (future *ManagedClustersUpdateTagsFuture) Result(client ManagedClustersClient) (mc ManagedCluster, err error) { 1434 var done bool 1435 done, err = future.DoneWithContext(context.Background(), client) 1436 if err != nil { 1437 err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersUpdateTagsFuture", "Result", future.Response(), "Polling failure") 1438 return 1439 } 1440 if !done { 1441 err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersUpdateTagsFuture") 1442 return 1443 } 1444 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 1445 if mc.Response.Response, err = future.GetResult(sender); err == nil && mc.Response.Response.StatusCode != http.StatusNoContent { 1446 mc, err = client.UpdateTagsResponder(mc.Response.Response) 1447 if err != nil { 1448 err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersUpdateTagsFuture", "Result", mc.Response.Response, "Failure responding to request") 1449 } 1450 } 1451 return 1452} 1453 1454// ManagedClusterUpgradeProfile the list of available upgrades for compute pools. 1455type ManagedClusterUpgradeProfile struct { 1456 autorest.Response `json:"-"` 1457 // ID - READ-ONLY; Id of upgrade profile. 1458 ID *string `json:"id,omitempty"` 1459 // Name - READ-ONLY; Name of upgrade profile. 1460 Name *string `json:"name,omitempty"` 1461 // Type - READ-ONLY; Type of upgrade profile. 1462 Type *string `json:"type,omitempty"` 1463 // ManagedClusterUpgradeProfileProperties - Properties of upgrade profile. 1464 *ManagedClusterUpgradeProfileProperties `json:"properties,omitempty"` 1465} 1466 1467// MarshalJSON is the custom marshaler for ManagedClusterUpgradeProfile. 1468func (mcup ManagedClusterUpgradeProfile) MarshalJSON() ([]byte, error) { 1469 objectMap := make(map[string]interface{}) 1470 if mcup.ManagedClusterUpgradeProfileProperties != nil { 1471 objectMap["properties"] = mcup.ManagedClusterUpgradeProfileProperties 1472 } 1473 return json.Marshal(objectMap) 1474} 1475 1476// UnmarshalJSON is the custom unmarshaler for ManagedClusterUpgradeProfile struct. 1477func (mcup *ManagedClusterUpgradeProfile) UnmarshalJSON(body []byte) error { 1478 var m map[string]*json.RawMessage 1479 err := json.Unmarshal(body, &m) 1480 if err != nil { 1481 return err 1482 } 1483 for k, v := range m { 1484 switch k { 1485 case "id": 1486 if v != nil { 1487 var ID string 1488 err = json.Unmarshal(*v, &ID) 1489 if err != nil { 1490 return err 1491 } 1492 mcup.ID = &ID 1493 } 1494 case "name": 1495 if v != nil { 1496 var name string 1497 err = json.Unmarshal(*v, &name) 1498 if err != nil { 1499 return err 1500 } 1501 mcup.Name = &name 1502 } 1503 case "type": 1504 if v != nil { 1505 var typeVar string 1506 err = json.Unmarshal(*v, &typeVar) 1507 if err != nil { 1508 return err 1509 } 1510 mcup.Type = &typeVar 1511 } 1512 case "properties": 1513 if v != nil { 1514 var managedClusterUpgradeProfileProperties ManagedClusterUpgradeProfileProperties 1515 err = json.Unmarshal(*v, &managedClusterUpgradeProfileProperties) 1516 if err != nil { 1517 return err 1518 } 1519 mcup.ManagedClusterUpgradeProfileProperties = &managedClusterUpgradeProfileProperties 1520 } 1521 } 1522 } 1523 1524 return nil 1525} 1526 1527// ManagedClusterUpgradeProfileProperties control plane and agent pool upgrade profiles. 1528type ManagedClusterUpgradeProfileProperties struct { 1529 // ControlPlaneProfile - The list of available upgrade versions for the control plane. 1530 ControlPlaneProfile *ManagedClusterPoolUpgradeProfile `json:"controlPlaneProfile,omitempty"` 1531 // AgentPoolProfiles - The list of available upgrade versions for agent pools. 1532 AgentPoolProfiles *[]ManagedClusterPoolUpgradeProfile `json:"agentPoolProfiles,omitempty"` 1533} 1534 1535// MasterProfile profile for the container service master. 1536type MasterProfile struct { 1537 // Count - Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. 1538 Count *int32 `json:"count,omitempty"` 1539 // DNSPrefix - DNS prefix to be used to create the FQDN for the master pool. 1540 DNSPrefix *string `json:"dnsPrefix,omitempty"` 1541 // VMSize - Size of agent VMs. Possible values include: 'StandardA1', 'StandardA10', 'StandardA11', 'StandardA1V2', 'StandardA2', 'StandardA2V2', 'StandardA2mV2', 'StandardA3', 'StandardA4', 'StandardA4V2', 'StandardA4mV2', 'StandardA5', 'StandardA6', 'StandardA7', 'StandardA8', 'StandardA8V2', 'StandardA8mV2', 'StandardA9', 'StandardB2ms', 'StandardB2s', 'StandardB4ms', 'StandardB8ms', 'StandardD1', 'StandardD11', 'StandardD11V2', 'StandardD11V2Promo', 'StandardD12', 'StandardD12V2', 'StandardD12V2Promo', 'StandardD13', 'StandardD13V2', 'StandardD13V2Promo', 'StandardD14', 'StandardD14V2', 'StandardD14V2Promo', 'StandardD15V2', 'StandardD16V3', 'StandardD16sV3', 'StandardD1V2', 'StandardD2', 'StandardD2V2', 'StandardD2V2Promo', 'StandardD2V3', 'StandardD2sV3', 'StandardD3', 'StandardD32V3', 'StandardD32sV3', 'StandardD3V2', 'StandardD3V2Promo', 'StandardD4', 'StandardD4V2', 'StandardD4V2Promo', 'StandardD4V3', 'StandardD4sV3', 'StandardD5V2', 'StandardD5V2Promo', 'StandardD64V3', 'StandardD64sV3', 'StandardD8V3', 'StandardD8sV3', 'StandardDS1', 'StandardDS11', 'StandardDS11V2', 'StandardDS11V2Promo', 'StandardDS12', 'StandardDS12V2', 'StandardDS12V2Promo', 'StandardDS13', 'StandardDS132V2', 'StandardDS134V2', 'StandardDS13V2', 'StandardDS13V2Promo', 'StandardDS14', 'StandardDS144V2', 'StandardDS148V2', 'StandardDS14V2', 'StandardDS14V2Promo', 'StandardDS15V2', 'StandardDS1V2', 'StandardDS2', 'StandardDS2V2', 'StandardDS2V2Promo', 'StandardDS3', 'StandardDS3V2', 'StandardDS3V2Promo', 'StandardDS4', 'StandardDS4V2', 'StandardDS4V2Promo', 'StandardDS5V2', 'StandardDS5V2Promo', 'StandardE16V3', 'StandardE16sV3', 'StandardE2V3', 'StandardE2sV3', 'StandardE3216sV3', 'StandardE328sV3', 'StandardE32V3', 'StandardE32sV3', 'StandardE4V3', 'StandardE4sV3', 'StandardE6416sV3', 'StandardE6432sV3', 'StandardE64V3', 'StandardE64sV3', 'StandardE8V3', 'StandardE8sV3', 'StandardF1', 'StandardF16', 'StandardF16s', 'StandardF16sV2', 'StandardF1s', 'StandardF2', 'StandardF2s', 'StandardF2sV2', 'StandardF32sV2', 'StandardF4', 'StandardF4s', 'StandardF4sV2', 'StandardF64sV2', 'StandardF72sV2', 'StandardF8', 'StandardF8s', 'StandardF8sV2', 'StandardG1', 'StandardG2', 'StandardG3', 'StandardG4', 'StandardG5', 'StandardGS1', 'StandardGS2', 'StandardGS3', 'StandardGS4', 'StandardGS44', 'StandardGS48', 'StandardGS5', 'StandardGS516', 'StandardGS58', 'StandardH16', 'StandardH16m', 'StandardH16mr', 'StandardH16r', 'StandardH8', 'StandardH8m', 'StandardL16s', 'StandardL32s', 'StandardL4s', 'StandardL8s', 'StandardM12832ms', 'StandardM12864ms', 'StandardM128ms', 'StandardM128s', 'StandardM6416ms', 'StandardM6432ms', 'StandardM64ms', 'StandardM64s', 'StandardNC12', 'StandardNC12sV2', 'StandardNC12sV3', 'StandardNC24', 'StandardNC24r', 'StandardNC24rsV2', 'StandardNC24rsV3', 'StandardNC24sV2', 'StandardNC24sV3', 'StandardNC6', 'StandardNC6sV2', 'StandardNC6sV3', 'StandardND12s', 'StandardND24rs', 'StandardND24s', 'StandardND6s', 'StandardNV12', 'StandardNV24', 'StandardNV6' 1542 VMSize VMSizeTypes `json:"vmSize,omitempty"` 1543 // OsDiskSizeGB - OS Disk Size in GB to be used to specify the disk size for every machine in this master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified. 1544 OsDiskSizeGB *int32 `json:"osDiskSizeGB,omitempty"` 1545 // VnetSubnetID - VNet SubnetID specifies the VNet's subnet identifier. 1546 VnetSubnetID *string `json:"vnetSubnetID,omitempty"` 1547 // FirstConsecutiveStaticIP - FirstConsecutiveStaticIP used to specify the first static ip of masters. 1548 FirstConsecutiveStaticIP *string `json:"firstConsecutiveStaticIP,omitempty"` 1549 // StorageProfile - Storage profile specifies what kind of storage used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will choose for you based on the orchestrator choice. Possible values include: 'StorageAccount', 'ManagedDisks' 1550 StorageProfile StorageProfileTypes `json:"storageProfile,omitempty"` 1551 // Fqdn - READ-ONLY; FQDN for the master pool. 1552 Fqdn *string `json:"fqdn,omitempty"` 1553} 1554 1555// NetworkProfile profile of network configuration. 1556type NetworkProfile struct { 1557 // NetworkPlugin - Network plugin used for building Kubernetes network. Possible values include: 'Azure', 'Kubenet' 1558 NetworkPlugin NetworkPlugin `json:"networkPlugin,omitempty"` 1559 // NetworkPolicy - Network policy used for building Kubernetes network. Possible values include: 'Calico' 1560 NetworkPolicy NetworkPolicy `json:"networkPolicy,omitempty"` 1561 // PodCidr - A CIDR notation IP range from which to assign pod IPs when kubenet is used. 1562 PodCidr *string `json:"podCidr,omitempty"` 1563 // ServiceCidr - A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP ranges. 1564 ServiceCidr *string `json:"serviceCidr,omitempty"` 1565 // DNSServiceIP - An IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified in serviceCidr. 1566 DNSServiceIP *string `json:"dnsServiceIP,omitempty"` 1567 // DockerBridgeCidr - A CIDR notation IP range assigned to the Docker bridge network. It must not overlap with any Subnet IP ranges or the Kubernetes service address range. 1568 DockerBridgeCidr *string `json:"dockerBridgeCidr,omitempty"` 1569} 1570 1571// OperationListResult the List Compute Operation operation response. 1572type OperationListResult struct { 1573 autorest.Response `json:"-"` 1574 // Value - READ-ONLY; The list of compute operations 1575 Value *[]OperationValue `json:"value,omitempty"` 1576} 1577 1578// OperationValue describes the properties of a Compute Operation value. 1579type OperationValue struct { 1580 // Origin - READ-ONLY; The origin of the compute operation. 1581 Origin *string `json:"origin,omitempty"` 1582 // Name - READ-ONLY; The name of the compute operation. 1583 Name *string `json:"name,omitempty"` 1584 // OperationValueDisplay - Describes the properties of a Compute Operation Value Display. 1585 *OperationValueDisplay `json:"display,omitempty"` 1586} 1587 1588// MarshalJSON is the custom marshaler for OperationValue. 1589func (ov OperationValue) MarshalJSON() ([]byte, error) { 1590 objectMap := make(map[string]interface{}) 1591 if ov.OperationValueDisplay != nil { 1592 objectMap["display"] = ov.OperationValueDisplay 1593 } 1594 return json.Marshal(objectMap) 1595} 1596 1597// UnmarshalJSON is the custom unmarshaler for OperationValue struct. 1598func (ov *OperationValue) UnmarshalJSON(body []byte) error { 1599 var m map[string]*json.RawMessage 1600 err := json.Unmarshal(body, &m) 1601 if err != nil { 1602 return err 1603 } 1604 for k, v := range m { 1605 switch k { 1606 case "origin": 1607 if v != nil { 1608 var origin string 1609 err = json.Unmarshal(*v, &origin) 1610 if err != nil { 1611 return err 1612 } 1613 ov.Origin = &origin 1614 } 1615 case "name": 1616 if v != nil { 1617 var name string 1618 err = json.Unmarshal(*v, &name) 1619 if err != nil { 1620 return err 1621 } 1622 ov.Name = &name 1623 } 1624 case "display": 1625 if v != nil { 1626 var operationValueDisplay OperationValueDisplay 1627 err = json.Unmarshal(*v, &operationValueDisplay) 1628 if err != nil { 1629 return err 1630 } 1631 ov.OperationValueDisplay = &operationValueDisplay 1632 } 1633 } 1634 } 1635 1636 return nil 1637} 1638 1639// OperationValueDisplay describes the properties of a Compute Operation Value Display. 1640type OperationValueDisplay struct { 1641 // Operation - READ-ONLY; The display name of the compute operation. 1642 Operation *string `json:"operation,omitempty"` 1643 // Resource - READ-ONLY; The display name of the resource the operation applies to. 1644 Resource *string `json:"resource,omitempty"` 1645 // Description - READ-ONLY; The description of the operation. 1646 Description *string `json:"description,omitempty"` 1647 // Provider - READ-ONLY; The resource provider for the operation. 1648 Provider *string `json:"provider,omitempty"` 1649} 1650 1651// OrchestratorProfile contains information about orchestrator. 1652type OrchestratorProfile struct { 1653 // OrchestratorType - Orchestrator type. 1654 OrchestratorType *string `json:"orchestratorType,omitempty"` 1655 // OrchestratorVersion - Orchestrator version (major, minor, patch). 1656 OrchestratorVersion *string `json:"orchestratorVersion,omitempty"` 1657} 1658 1659// OrchestratorProfileType profile for the container service orchestrator. 1660type OrchestratorProfileType struct { 1661 // OrchestratorType - The orchestrator to use to manage container service cluster resources. Valid values are Kubernetes, Swarm, DCOS, DockerCE and Custom. Possible values include: 'Kubernetes', 'Swarm', 'DCOS', 'DockerCE', 'Custom' 1662 OrchestratorType OrchestratorTypes `json:"orchestratorType,omitempty"` 1663 // OrchestratorVersion - The version of the orchestrator to use. You can specify the major.minor.patch part of the actual version.For example, you can specify version as "1.6.11". 1664 OrchestratorVersion *string `json:"orchestratorVersion,omitempty"` 1665} 1666 1667// OrchestratorVersionProfile the profile of an orchestrator and its available versions. 1668type OrchestratorVersionProfile struct { 1669 // OrchestratorType - Orchestrator type. 1670 OrchestratorType *string `json:"orchestratorType,omitempty"` 1671 // OrchestratorVersion - Orchestrator version (major, minor, patch). 1672 OrchestratorVersion *string `json:"orchestratorVersion,omitempty"` 1673 // Default - Installed by default if version is not specified. 1674 Default *bool `json:"default,omitempty"` 1675 // Upgrades - The list of available upgrade versions. 1676 Upgrades *[]OrchestratorProfile `json:"upgrades,omitempty"` 1677} 1678 1679// OrchestratorVersionProfileListResult the list of versions for supported orchestrators. 1680type OrchestratorVersionProfileListResult struct { 1681 autorest.Response `json:"-"` 1682 // ID - READ-ONLY; Id of the orchestrator version profile list result. 1683 ID *string `json:"id,omitempty"` 1684 // Name - READ-ONLY; Name of the orchestrator version profile list result. 1685 Name *string `json:"name,omitempty"` 1686 // Type - READ-ONLY; Type of the orchestrator version profile list result. 1687 Type *string `json:"type,omitempty"` 1688 // OrchestratorVersionProfileProperties - The properties of an orchestrator version profile. 1689 *OrchestratorVersionProfileProperties `json:"properties,omitempty"` 1690} 1691 1692// MarshalJSON is the custom marshaler for OrchestratorVersionProfileListResult. 1693func (ovplr OrchestratorVersionProfileListResult) MarshalJSON() ([]byte, error) { 1694 objectMap := make(map[string]interface{}) 1695 if ovplr.OrchestratorVersionProfileProperties != nil { 1696 objectMap["properties"] = ovplr.OrchestratorVersionProfileProperties 1697 } 1698 return json.Marshal(objectMap) 1699} 1700 1701// UnmarshalJSON is the custom unmarshaler for OrchestratorVersionProfileListResult struct. 1702func (ovplr *OrchestratorVersionProfileListResult) UnmarshalJSON(body []byte) error { 1703 var m map[string]*json.RawMessage 1704 err := json.Unmarshal(body, &m) 1705 if err != nil { 1706 return err 1707 } 1708 for k, v := range m { 1709 switch k { 1710 case "id": 1711 if v != nil { 1712 var ID string 1713 err = json.Unmarshal(*v, &ID) 1714 if err != nil { 1715 return err 1716 } 1717 ovplr.ID = &ID 1718 } 1719 case "name": 1720 if v != nil { 1721 var name string 1722 err = json.Unmarshal(*v, &name) 1723 if err != nil { 1724 return err 1725 } 1726 ovplr.Name = &name 1727 } 1728 case "type": 1729 if v != nil { 1730 var typeVar string 1731 err = json.Unmarshal(*v, &typeVar) 1732 if err != nil { 1733 return err 1734 } 1735 ovplr.Type = &typeVar 1736 } 1737 case "properties": 1738 if v != nil { 1739 var orchestratorVersionProfileProperties OrchestratorVersionProfileProperties 1740 err = json.Unmarshal(*v, &orchestratorVersionProfileProperties) 1741 if err != nil { 1742 return err 1743 } 1744 ovplr.OrchestratorVersionProfileProperties = &orchestratorVersionProfileProperties 1745 } 1746 } 1747 } 1748 1749 return nil 1750} 1751 1752// OrchestratorVersionProfileProperties the properties of an orchestrator version profile. 1753type OrchestratorVersionProfileProperties struct { 1754 // Orchestrators - List of orchestrator version profiles. 1755 Orchestrators *[]OrchestratorVersionProfile `json:"orchestrators,omitempty"` 1756} 1757 1758// Properties properties of the container service. 1759type Properties struct { 1760 // ProvisioningState - READ-ONLY; The current deployment or provisioning state, which only appears in the response. 1761 ProvisioningState *string `json:"provisioningState,omitempty"` 1762 // OrchestratorProfile - Profile for the container service orchestrator. 1763 OrchestratorProfile *OrchestratorProfileType `json:"orchestratorProfile,omitempty"` 1764 // CustomProfile - Properties to configure a custom container service cluster. 1765 CustomProfile *CustomProfile `json:"customProfile,omitempty"` 1766 // ServicePrincipalProfile - Information about a service principal identity for the cluster to use for manipulating Azure APIs. Exact one of secret or keyVaultSecretRef need to be specified. 1767 ServicePrincipalProfile *ServicePrincipalProfile `json:"servicePrincipalProfile,omitempty"` 1768 // MasterProfile - Profile for the container service master. 1769 MasterProfile *MasterProfile `json:"masterProfile,omitempty"` 1770 // AgentPoolProfiles - Properties of the agent pool. 1771 AgentPoolProfiles *[]AgentPoolProfile `json:"agentPoolProfiles,omitempty"` 1772 // WindowsProfile - Profile for Windows VMs in the container service cluster. 1773 WindowsProfile *WindowsProfile `json:"windowsProfile,omitempty"` 1774 // LinuxProfile - Profile for Linux VMs in the container service cluster. 1775 LinuxProfile *LinuxProfile `json:"linuxProfile,omitempty"` 1776 // DiagnosticsProfile - Profile for diagnostics in the container service cluster. 1777 DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"` 1778} 1779 1780// Resource the Resource model definition. 1781type Resource struct { 1782 // ID - READ-ONLY; Resource Id 1783 ID *string `json:"id,omitempty"` 1784 // Name - READ-ONLY; Resource name 1785 Name *string `json:"name,omitempty"` 1786 // Type - READ-ONLY; Resource type 1787 Type *string `json:"type,omitempty"` 1788 // Location - Resource location 1789 Location *string `json:"location,omitempty"` 1790 // Tags - Resource tags 1791 Tags map[string]*string `json:"tags"` 1792} 1793 1794// MarshalJSON is the custom marshaler for Resource. 1795func (r Resource) MarshalJSON() ([]byte, error) { 1796 objectMap := make(map[string]interface{}) 1797 if r.Location != nil { 1798 objectMap["location"] = r.Location 1799 } 1800 if r.Tags != nil { 1801 objectMap["tags"] = r.Tags 1802 } 1803 return json.Marshal(objectMap) 1804} 1805 1806// ServicePrincipalProfile information about a service principal identity for the cluster to use for 1807// manipulating Azure APIs. Either secret or keyVaultSecretRef must be specified. 1808type ServicePrincipalProfile struct { 1809 // ClientID - The ID for the service principal. 1810 ClientID *string `json:"clientId,omitempty"` 1811 // Secret - The secret password associated with the service principal in plain text. 1812 Secret *string `json:"secret,omitempty"` 1813 // KeyVaultSecretRef - Reference to a secret stored in Azure Key Vault. 1814 KeyVaultSecretRef *KeyVaultSecretRef `json:"keyVaultSecretRef,omitempty"` 1815} 1816 1817// SSHConfiguration SSH configuration for Linux-based VMs running on Azure. 1818type SSHConfiguration struct { 1819 // PublicKeys - The list of SSH public keys used to authenticate with Linux-based VMs. Only expect one key specified. 1820 PublicKeys *[]SSHPublicKey `json:"publicKeys,omitempty"` 1821} 1822 1823// SSHPublicKey contains information about SSH certificate public key data. 1824type SSHPublicKey struct { 1825 // KeyData - Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. 1826 KeyData *string `json:"keyData,omitempty"` 1827} 1828 1829// TagsObject tags object for patch operations. 1830type TagsObject struct { 1831 // Tags - Resource tags. 1832 Tags map[string]*string `json:"tags"` 1833} 1834 1835// MarshalJSON is the custom marshaler for TagsObject. 1836func (toVar TagsObject) MarshalJSON() ([]byte, error) { 1837 objectMap := make(map[string]interface{}) 1838 if toVar.Tags != nil { 1839 objectMap["tags"] = toVar.Tags 1840 } 1841 return json.Marshal(objectMap) 1842} 1843 1844// VMDiagnostics profile for diagnostics on the container service VMs. 1845type VMDiagnostics struct { 1846 // Enabled - Whether the VM diagnostic agent is provisioned on the VM. 1847 Enabled *bool `json:"enabled,omitempty"` 1848 // StorageURI - READ-ONLY; The URI of the storage account where diagnostics are stored. 1849 StorageURI *string `json:"storageUri,omitempty"` 1850} 1851 1852// WindowsProfile profile for Windows VMs in the container service cluster. 1853type WindowsProfile struct { 1854 // AdminUsername - The administrator username to use for Windows VMs. 1855 AdminUsername *string `json:"adminUsername,omitempty"` 1856 // AdminPassword - The administrator password to use for Windows VMs. 1857 AdminPassword *string `json:"adminPassword,omitempty"` 1858} 1859