1package containerservice 2 3// Copyright (c) Microsoft Corporation. All rights reserved. 4// Licensed under the MIT License. See License.txt in the project root for license information. 5// 6// Code generated by Microsoft (R) AutoRest Code Generator. 7// Changes may cause incorrect behavior and will be lost if the code is regenerated. 8 9import ( 10 "context" 11 "encoding/json" 12 "github.com/Azure/go-autorest/autorest" 13 "github.com/Azure/go-autorest/autorest/azure" 14 "github.com/Azure/go-autorest/autorest/to" 15 "github.com/Azure/go-autorest/tracing" 16 "net/http" 17) 18 19// The package's fully qualified name. 20const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/containerservice/mgmt/2018-08-01-preview/containerservice" 21 22// AccessProfile profile for enabling a user to access a managed cluster. 23type AccessProfile struct { 24 // KubeConfig - Base64-encoded Kubernetes configuration file. 25 KubeConfig *[]byte `json:"kubeConfig,omitempty"` 26} 27 28// AgentPoolProfile profile for the container service agent pool. 29type AgentPoolProfile struct { 30 // Name - Unique name of the agent pool profile in the context of the subscription and resource group. 31 Name *string `json:"name,omitempty"` 32 // 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. 33 Count *int32 `json:"count,omitempty"` 34 // VMSize - Size of agent VMs. Possible values include: 'VMSizeTypesStandardA1', 'VMSizeTypesStandardA10', 'VMSizeTypesStandardA11', 'VMSizeTypesStandardA1V2', 'VMSizeTypesStandardA2', 'VMSizeTypesStandardA2V2', 'VMSizeTypesStandardA2mV2', 'VMSizeTypesStandardA3', 'VMSizeTypesStandardA4', 'VMSizeTypesStandardA4V2', 'VMSizeTypesStandardA4mV2', 'VMSizeTypesStandardA5', 'VMSizeTypesStandardA6', 'VMSizeTypesStandardA7', 'VMSizeTypesStandardA8', 'VMSizeTypesStandardA8V2', 'VMSizeTypesStandardA8mV2', 'VMSizeTypesStandardA9', 'VMSizeTypesStandardB2ms', 'VMSizeTypesStandardB2s', 'VMSizeTypesStandardB4ms', 'VMSizeTypesStandardB8ms', 'VMSizeTypesStandardD1', 'VMSizeTypesStandardD11', 'VMSizeTypesStandardD11V2', 'VMSizeTypesStandardD11V2Promo', 'VMSizeTypesStandardD12', 'VMSizeTypesStandardD12V2', 'VMSizeTypesStandardD12V2Promo', 'VMSizeTypesStandardD13', 'VMSizeTypesStandardD13V2', 'VMSizeTypesStandardD13V2Promo', 'VMSizeTypesStandardD14', 'VMSizeTypesStandardD14V2', 'VMSizeTypesStandardD14V2Promo', 'VMSizeTypesStandardD15V2', 'VMSizeTypesStandardD16V3', 'VMSizeTypesStandardD16sV3', 'VMSizeTypesStandardD1V2', 'VMSizeTypesStandardD2', 'VMSizeTypesStandardD2V2', 'VMSizeTypesStandardD2V2Promo', 'VMSizeTypesStandardD2V3', 'VMSizeTypesStandardD2sV3', 'VMSizeTypesStandardD3', 'VMSizeTypesStandardD32V3', 'VMSizeTypesStandardD32sV3', 'VMSizeTypesStandardD3V2', 'VMSizeTypesStandardD3V2Promo', 'VMSizeTypesStandardD4', 'VMSizeTypesStandardD4V2', 'VMSizeTypesStandardD4V2Promo', 'VMSizeTypesStandardD4V3', 'VMSizeTypesStandardD4sV3', 'VMSizeTypesStandardD5V2', 'VMSizeTypesStandardD5V2Promo', 'VMSizeTypesStandardD64V3', 'VMSizeTypesStandardD64sV3', 'VMSizeTypesStandardD8V3', 'VMSizeTypesStandardD8sV3', 'VMSizeTypesStandardDS1', 'VMSizeTypesStandardDS11', 'VMSizeTypesStandardDS11V2', 'VMSizeTypesStandardDS11V2Promo', 'VMSizeTypesStandardDS12', 'VMSizeTypesStandardDS12V2', 'VMSizeTypesStandardDS12V2Promo', 'VMSizeTypesStandardDS13', 'VMSizeTypesStandardDS132V2', 'VMSizeTypesStandardDS134V2', 'VMSizeTypesStandardDS13V2', 'VMSizeTypesStandardDS13V2Promo', 'VMSizeTypesStandardDS14', 'VMSizeTypesStandardDS144V2', 'VMSizeTypesStandardDS148V2', 'VMSizeTypesStandardDS14V2', 'VMSizeTypesStandardDS14V2Promo', 'VMSizeTypesStandardDS15V2', 'VMSizeTypesStandardDS1V2', 'VMSizeTypesStandardDS2', 'VMSizeTypesStandardDS2V2', 'VMSizeTypesStandardDS2V2Promo', 'VMSizeTypesStandardDS3', 'VMSizeTypesStandardDS3V2', 'VMSizeTypesStandardDS3V2Promo', 'VMSizeTypesStandardDS4', 'VMSizeTypesStandardDS4V2', 'VMSizeTypesStandardDS4V2Promo', 'VMSizeTypesStandardDS5V2', 'VMSizeTypesStandardDS5V2Promo', 'VMSizeTypesStandardE16V3', 'VMSizeTypesStandardE16sV3', 'VMSizeTypesStandardE2V3', 'VMSizeTypesStandardE2sV3', 'VMSizeTypesStandardE3216sV3', 'VMSizeTypesStandardE328sV3', 'VMSizeTypesStandardE32V3', 'VMSizeTypesStandardE32sV3', 'VMSizeTypesStandardE4V3', 'VMSizeTypesStandardE4sV3', 'VMSizeTypesStandardE6416sV3', 'VMSizeTypesStandardE6432sV3', 'VMSizeTypesStandardE64V3', 'VMSizeTypesStandardE64sV3', 'VMSizeTypesStandardE8V3', 'VMSizeTypesStandardE8sV3', 'VMSizeTypesStandardF1', 'VMSizeTypesStandardF16', 'VMSizeTypesStandardF16s', 'VMSizeTypesStandardF16sV2', 'VMSizeTypesStandardF1s', 'VMSizeTypesStandardF2', 'VMSizeTypesStandardF2s', 'VMSizeTypesStandardF2sV2', 'VMSizeTypesStandardF32sV2', 'VMSizeTypesStandardF4', 'VMSizeTypesStandardF4s', 'VMSizeTypesStandardF4sV2', 'VMSizeTypesStandardF64sV2', 'VMSizeTypesStandardF72sV2', 'VMSizeTypesStandardF8', 'VMSizeTypesStandardF8s', 'VMSizeTypesStandardF8sV2', 'VMSizeTypesStandardG1', 'VMSizeTypesStandardG2', 'VMSizeTypesStandardG3', 'VMSizeTypesStandardG4', 'VMSizeTypesStandardG5', 'VMSizeTypesStandardGS1', 'VMSizeTypesStandardGS2', 'VMSizeTypesStandardGS3', 'VMSizeTypesStandardGS4', 'VMSizeTypesStandardGS44', 'VMSizeTypesStandardGS48', 'VMSizeTypesStandardGS5', 'VMSizeTypesStandardGS516', 'VMSizeTypesStandardGS58', 'VMSizeTypesStandardH16', 'VMSizeTypesStandardH16m', 'VMSizeTypesStandardH16mr', 'VMSizeTypesStandardH16r', 'VMSizeTypesStandardH8', 'VMSizeTypesStandardH8m', 'VMSizeTypesStandardL16s', 'VMSizeTypesStandardL32s', 'VMSizeTypesStandardL4s', 'VMSizeTypesStandardL8s', 'VMSizeTypesStandardM12832ms', 'VMSizeTypesStandardM12864ms', 'VMSizeTypesStandardM128ms', 'VMSizeTypesStandardM128s', 'VMSizeTypesStandardM6416ms', 'VMSizeTypesStandardM6432ms', 'VMSizeTypesStandardM64ms', 'VMSizeTypesStandardM64s', 'VMSizeTypesStandardNC12', 'VMSizeTypesStandardNC12sV2', 'VMSizeTypesStandardNC12sV3', 'VMSizeTypesStandardNC24', 'VMSizeTypesStandardNC24r', 'VMSizeTypesStandardNC24rsV2', 'VMSizeTypesStandardNC24rsV3', 'VMSizeTypesStandardNC24sV2', 'VMSizeTypesStandardNC24sV3', 'VMSizeTypesStandardNC6', 'VMSizeTypesStandardNC6sV2', 'VMSizeTypesStandardNC6sV3', 'VMSizeTypesStandardND12s', 'VMSizeTypesStandardND24rs', 'VMSizeTypesStandardND24s', 'VMSizeTypesStandardND6s', 'VMSizeTypesStandardNV12', 'VMSizeTypesStandardNV24', 'VMSizeTypesStandardNV6' 35 VMSize VMSizeTypes `json:"vmSize,omitempty"` 36 // 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. 37 OsDiskSizeGB *int32 `json:"osDiskSizeGB,omitempty"` 38 // DNSPrefix - DNS prefix to be used to create the FQDN for the agent pool. 39 DNSPrefix *string `json:"dnsPrefix,omitempty"` 40 // Fqdn - READ-ONLY; FQDN for the agent pool. 41 Fqdn *string `json:"fqdn,omitempty"` 42 // Ports - Ports number array used to expose on this agent pool. The default opened ports are different based on your choice of orchestrator. 43 Ports *[]int32 `json:"ports,omitempty"` 44 // 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' 45 StorageProfile StorageProfileTypes `json:"storageProfile,omitempty"` 46 // VnetSubnetID - VNet SubnetID specifies the VNet's subnet identifier. 47 VnetSubnetID *string `json:"vnetSubnetID,omitempty"` 48 // OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows' 49 OsType OSType `json:"osType,omitempty"` 50} 51 52// MarshalJSON is the custom marshaler for AgentPoolProfile. 53func (app AgentPoolProfile) MarshalJSON() ([]byte, error) { 54 objectMap := make(map[string]interface{}) 55 if app.Name != nil { 56 objectMap["name"] = app.Name 57 } 58 if app.Count != nil { 59 objectMap["count"] = app.Count 60 } 61 if app.VMSize != "" { 62 objectMap["vmSize"] = app.VMSize 63 } 64 if app.OsDiskSizeGB != nil { 65 objectMap["osDiskSizeGB"] = app.OsDiskSizeGB 66 } 67 if app.DNSPrefix != nil { 68 objectMap["dnsPrefix"] = app.DNSPrefix 69 } 70 if app.Ports != nil { 71 objectMap["ports"] = app.Ports 72 } 73 if app.StorageProfile != "" { 74 objectMap["storageProfile"] = app.StorageProfile 75 } 76 if app.VnetSubnetID != nil { 77 objectMap["vnetSubnetID"] = app.VnetSubnetID 78 } 79 if app.OsType != "" { 80 objectMap["osType"] = app.OsType 81 } 82 return json.Marshal(objectMap) 83} 84 85// CloudError an error response from the Container service. 86type CloudError struct { 87 // Error - Details about the error. 88 Error *CloudErrorBody `json:"error,omitempty"` 89} 90 91// CloudErrorBody an error response from the Container service. 92type CloudErrorBody struct { 93 // Code - An identifier for the error. Codes are invariant and are intended to be consumed programmatically. 94 Code *string `json:"code,omitempty"` 95 // Message - A message describing the error, intended to be suitable for display in a user interface. 96 Message *string `json:"message,omitempty"` 97 // Target - The target of the particular error. For example, the name of the property in error. 98 Target *string `json:"target,omitempty"` 99 // Details - A list of additional details about the error. 100 Details *[]CloudErrorBody `json:"details,omitempty"` 101} 102 103// ContainerService container service. 104type ContainerService struct { 105 autorest.Response `json:"-"` 106 // Properties - Properties of the container service. 107 *Properties `json:"properties,omitempty"` 108 // ID - READ-ONLY; Resource Id 109 ID *string `json:"id,omitempty"` 110 // Name - READ-ONLY; Resource name 111 Name *string `json:"name,omitempty"` 112 // Type - READ-ONLY; Resource type 113 Type *string `json:"type,omitempty"` 114 // Location - Resource location 115 Location *string `json:"location,omitempty"` 116 // Tags - Resource tags 117 Tags map[string]*string `json:"tags"` 118} 119 120// MarshalJSON is the custom marshaler for ContainerService. 121func (cs ContainerService) MarshalJSON() ([]byte, error) { 122 objectMap := make(map[string]interface{}) 123 if cs.Properties != nil { 124 objectMap["properties"] = cs.Properties 125 } 126 if cs.Location != nil { 127 objectMap["location"] = cs.Location 128 } 129 if cs.Tags != nil { 130 objectMap["tags"] = cs.Tags 131 } 132 return json.Marshal(objectMap) 133} 134 135// UnmarshalJSON is the custom unmarshaler for ContainerService struct. 136func (cs *ContainerService) UnmarshalJSON(body []byte) error { 137 var m map[string]*json.RawMessage 138 err := json.Unmarshal(body, &m) 139 if err != nil { 140 return err 141 } 142 for k, v := range m { 143 switch k { 144 case "properties": 145 if v != nil { 146 var properties Properties 147 err = json.Unmarshal(*v, &properties) 148 if err != nil { 149 return err 150 } 151 cs.Properties = &properties 152 } 153 case "id": 154 if v != nil { 155 var ID string 156 err = json.Unmarshal(*v, &ID) 157 if err != nil { 158 return err 159 } 160 cs.ID = &ID 161 } 162 case "name": 163 if v != nil { 164 var name string 165 err = json.Unmarshal(*v, &name) 166 if err != nil { 167 return err 168 } 169 cs.Name = &name 170 } 171 case "type": 172 if v != nil { 173 var typeVar string 174 err = json.Unmarshal(*v, &typeVar) 175 if err != nil { 176 return err 177 } 178 cs.Type = &typeVar 179 } 180 case "location": 181 if v != nil { 182 var location string 183 err = json.Unmarshal(*v, &location) 184 if err != nil { 185 return err 186 } 187 cs.Location = &location 188 } 189 case "tags": 190 if v != nil { 191 var tags map[string]*string 192 err = json.Unmarshal(*v, &tags) 193 if err != nil { 194 return err 195 } 196 cs.Tags = tags 197 } 198 } 199 } 200 201 return nil 202} 203 204// ContainerServicesCreateOrUpdateFutureType an abstraction for monitoring and retrieving the results of a 205// long-running operation. 206type ContainerServicesCreateOrUpdateFutureType struct { 207 azure.FutureAPI 208 // Result returns the result of the asynchronous operation. 209 // If the operation has not completed it will return an error. 210 Result func(ContainerServicesClient) (ContainerService, error) 211} 212 213// UnmarshalJSON is the custom unmarshaller for CreateFuture. 214func (future *ContainerServicesCreateOrUpdateFutureType) UnmarshalJSON(body []byte) error { 215 var azFuture azure.Future 216 if err := json.Unmarshal(body, &azFuture); err != nil { 217 return err 218 } 219 future.FutureAPI = &azFuture 220 future.Result = future.result 221 return nil 222} 223 224// result is the default implementation for ContainerServicesCreateOrUpdateFutureType.Result. 225func (future *ContainerServicesCreateOrUpdateFutureType) result(client ContainerServicesClient) (cs ContainerService, err error) { 226 var done bool 227 done, err = future.DoneWithContext(context.Background(), client) 228 if err != nil { 229 err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesCreateOrUpdateFutureType", "Result", future.Response(), "Polling failure") 230 return 231 } 232 if !done { 233 cs.Response.Response = future.Response() 234 err = azure.NewAsyncOpIncompleteError("containerservice.ContainerServicesCreateOrUpdateFutureType") 235 return 236 } 237 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 238 if cs.Response.Response, err = future.GetResult(sender); err == nil && cs.Response.Response.StatusCode != http.StatusNoContent { 239 cs, err = client.CreateOrUpdateResponder(cs.Response.Response) 240 if err != nil { 241 err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesCreateOrUpdateFutureType", "Result", cs.Response.Response, "Failure responding to request") 242 } 243 } 244 return 245} 246 247// ContainerServicesDeleteFutureType an abstraction for monitoring and retrieving the results of a 248// long-running operation. 249type ContainerServicesDeleteFutureType struct { 250 azure.FutureAPI 251 // Result returns the result of the asynchronous operation. 252 // If the operation has not completed it will return an error. 253 Result func(ContainerServicesClient) (autorest.Response, error) 254} 255 256// UnmarshalJSON is the custom unmarshaller for CreateFuture. 257func (future *ContainerServicesDeleteFutureType) UnmarshalJSON(body []byte) error { 258 var azFuture azure.Future 259 if err := json.Unmarshal(body, &azFuture); err != nil { 260 return err 261 } 262 future.FutureAPI = &azFuture 263 future.Result = future.result 264 return nil 265} 266 267// result is the default implementation for ContainerServicesDeleteFutureType.Result. 268func (future *ContainerServicesDeleteFutureType) result(client ContainerServicesClient) (ar autorest.Response, err error) { 269 var done bool 270 done, err = future.DoneWithContext(context.Background(), client) 271 if err != nil { 272 err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesDeleteFutureType", "Result", future.Response(), "Polling failure") 273 return 274 } 275 if !done { 276 ar.Response = future.Response() 277 err = azure.NewAsyncOpIncompleteError("containerservice.ContainerServicesDeleteFutureType") 278 return 279 } 280 ar.Response = future.Response() 281 return 282} 283 284// CredentialResult the credential result response. 285type CredentialResult struct { 286 // Name - READ-ONLY; The name of the credential. 287 Name *string `json:"name,omitempty"` 288 // Value - READ-ONLY; Base64-encoded Kubernetes configuration file. 289 Value *[]byte `json:"value,omitempty"` 290} 291 292// MarshalJSON is the custom marshaler for CredentialResult. 293func (cr CredentialResult) MarshalJSON() ([]byte, error) { 294 objectMap := make(map[string]interface{}) 295 return json.Marshal(objectMap) 296} 297 298// CredentialResults the list of credential result response. 299type CredentialResults struct { 300 autorest.Response `json:"-"` 301 // Kubeconfigs - READ-ONLY; Base64-encoded Kubernetes configuration file. 302 Kubeconfigs *[]CredentialResult `json:"kubeconfigs,omitempty"` 303} 304 305// MarshalJSON is the custom marshaler for CredentialResults. 306func (cr CredentialResults) MarshalJSON() ([]byte, error) { 307 objectMap := make(map[string]interface{}) 308 return json.Marshal(objectMap) 309} 310 311// CustomProfile properties to configure a custom container service cluster. 312type CustomProfile struct { 313 // Orchestrator - The name of the custom orchestrator to use. 314 Orchestrator *string `json:"orchestrator,omitempty"` 315} 316 317// DiagnosticsProfile profile for diagnostics on the container service cluster. 318type DiagnosticsProfile struct { 319 // VMDiagnostics - Profile for diagnostics on the container service VMs. 320 VMDiagnostics *VMDiagnostics `json:"vmDiagnostics,omitempty"` 321} 322 323// KeyVaultSecretRef reference to a secret stored in Azure Key Vault. 324type KeyVaultSecretRef struct { 325 // VaultID - Key vault identifier. 326 VaultID *string `json:"vaultID,omitempty"` 327 // SecretName - The secret name. 328 SecretName *string `json:"secretName,omitempty"` 329 // Version - The secret version. 330 Version *string `json:"version,omitempty"` 331} 332 333// LinuxProfile profile for Linux VMs in the container service cluster. 334type LinuxProfile struct { 335 // AdminUsername - The administrator username to use for Linux VMs. 336 AdminUsername *string `json:"adminUsername,omitempty"` 337 // SSH - SSH configuration for Linux-based VMs running on Azure. 338 SSH *SSHConfiguration `json:"ssh,omitempty"` 339} 340 341// ListResult the response from the List Container Services operation. 342type ListResult struct { 343 autorest.Response `json:"-"` 344 // Value - The list of container services. 345 Value *[]ContainerService `json:"value,omitempty"` 346 // NextLink - READ-ONLY; The URL to get the next set of container service results. 347 NextLink *string `json:"nextLink,omitempty"` 348} 349 350// MarshalJSON is the custom marshaler for ListResult. 351func (lr ListResult) MarshalJSON() ([]byte, error) { 352 objectMap := make(map[string]interface{}) 353 if lr.Value != nil { 354 objectMap["value"] = lr.Value 355 } 356 return json.Marshal(objectMap) 357} 358 359// ListResultIterator provides access to a complete listing of ContainerService values. 360type ListResultIterator struct { 361 i int 362 page ListResultPage 363} 364 365// NextWithContext advances to the next value. If there was an error making 366// the request the iterator does not advance and the error is returned. 367func (iter *ListResultIterator) NextWithContext(ctx context.Context) (err error) { 368 if tracing.IsEnabled() { 369 ctx = tracing.StartSpan(ctx, fqdn+"/ListResultIterator.NextWithContext") 370 defer func() { 371 sc := -1 372 if iter.Response().Response.Response != nil { 373 sc = iter.Response().Response.Response.StatusCode 374 } 375 tracing.EndSpan(ctx, sc, err) 376 }() 377 } 378 iter.i++ 379 if iter.i < len(iter.page.Values()) { 380 return nil 381 } 382 err = iter.page.NextWithContext(ctx) 383 if err != nil { 384 iter.i-- 385 return err 386 } 387 iter.i = 0 388 return nil 389} 390 391// Next advances to the next value. If there was an error making 392// the request the iterator does not advance and the error is returned. 393// Deprecated: Use NextWithContext() instead. 394func (iter *ListResultIterator) Next() error { 395 return iter.NextWithContext(context.Background()) 396} 397 398// NotDone returns true if the enumeration should be started or is not yet complete. 399func (iter ListResultIterator) NotDone() bool { 400 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 401} 402 403// Response returns the raw server response from the last page request. 404func (iter ListResultIterator) Response() ListResult { 405 return iter.page.Response() 406} 407 408// Value returns the current value or a zero-initialized value if the 409// iterator has advanced beyond the end of the collection. 410func (iter ListResultIterator) Value() ContainerService { 411 if !iter.page.NotDone() { 412 return ContainerService{} 413 } 414 return iter.page.Values()[iter.i] 415} 416 417// Creates a new instance of the ListResultIterator type. 418func NewListResultIterator(page ListResultPage) ListResultIterator { 419 return ListResultIterator{page: page} 420} 421 422// IsEmpty returns true if the ListResult contains no values. 423func (lr ListResult) IsEmpty() bool { 424 return lr.Value == nil || len(*lr.Value) == 0 425} 426 427// hasNextLink returns true if the NextLink is not empty. 428func (lr ListResult) hasNextLink() bool { 429 return lr.NextLink != nil && len(*lr.NextLink) != 0 430} 431 432// listResultPreparer prepares a request to retrieve the next set of results. 433// It returns nil if no more results exist. 434func (lr ListResult) listResultPreparer(ctx context.Context) (*http.Request, error) { 435 if !lr.hasNextLink() { 436 return nil, nil 437 } 438 return autorest.Prepare((&http.Request{}).WithContext(ctx), 439 autorest.AsJSON(), 440 autorest.AsGet(), 441 autorest.WithBaseURL(to.String(lr.NextLink))) 442} 443 444// ListResultPage contains a page of ContainerService values. 445type ListResultPage struct { 446 fn func(context.Context, ListResult) (ListResult, error) 447 lr ListResult 448} 449 450// NextWithContext advances to the next page of values. If there was an error making 451// the request the page does not advance and the error is returned. 452func (page *ListResultPage) NextWithContext(ctx context.Context) (err error) { 453 if tracing.IsEnabled() { 454 ctx = tracing.StartSpan(ctx, fqdn+"/ListResultPage.NextWithContext") 455 defer func() { 456 sc := -1 457 if page.Response().Response.Response != nil { 458 sc = page.Response().Response.Response.StatusCode 459 } 460 tracing.EndSpan(ctx, sc, err) 461 }() 462 } 463 for { 464 next, err := page.fn(ctx, page.lr) 465 if err != nil { 466 return err 467 } 468 page.lr = next 469 if !next.hasNextLink() || !next.IsEmpty() { 470 break 471 } 472 } 473 return nil 474} 475 476// Next advances to the next page of values. If there was an error making 477// the request the page does not advance and the error is returned. 478// Deprecated: Use NextWithContext() instead. 479func (page *ListResultPage) Next() error { 480 return page.NextWithContext(context.Background()) 481} 482 483// NotDone returns true if the page enumeration should be started or is not yet complete. 484func (page ListResultPage) NotDone() bool { 485 return !page.lr.IsEmpty() 486} 487 488// Response returns the raw server response from the last page request. 489func (page ListResultPage) Response() ListResult { 490 return page.lr 491} 492 493// Values returns the slice of values for the current page or nil if there are no values. 494func (page ListResultPage) Values() []ContainerService { 495 if page.lr.IsEmpty() { 496 return nil 497 } 498 return *page.lr.Value 499} 500 501// Creates a new instance of the ListResultPage type. 502func NewListResultPage(cur ListResult, getNextPage func(context.Context, ListResult) (ListResult, error)) ListResultPage { 503 return ListResultPage{ 504 fn: getNextPage, 505 lr: cur, 506 } 507} 508 509// ManagedCluster managed cluster. 510type ManagedCluster struct { 511 autorest.Response `json:"-"` 512 // ManagedClusterProperties - Properties of a managed cluster. 513 *ManagedClusterProperties `json:"properties,omitempty"` 514 // ID - READ-ONLY; Resource Id 515 ID *string `json:"id,omitempty"` 516 // Name - READ-ONLY; Resource name 517 Name *string `json:"name,omitempty"` 518 // Type - READ-ONLY; Resource type 519 Type *string `json:"type,omitempty"` 520 // Location - Resource location 521 Location *string `json:"location,omitempty"` 522 // Tags - Resource tags 523 Tags map[string]*string `json:"tags"` 524} 525 526// MarshalJSON is the custom marshaler for ManagedCluster. 527func (mc ManagedCluster) MarshalJSON() ([]byte, error) { 528 objectMap := make(map[string]interface{}) 529 if mc.ManagedClusterProperties != nil { 530 objectMap["properties"] = mc.ManagedClusterProperties 531 } 532 if mc.Location != nil { 533 objectMap["location"] = mc.Location 534 } 535 if mc.Tags != nil { 536 objectMap["tags"] = mc.Tags 537 } 538 return json.Marshal(objectMap) 539} 540 541// UnmarshalJSON is the custom unmarshaler for ManagedCluster struct. 542func (mc *ManagedCluster) UnmarshalJSON(body []byte) error { 543 var m map[string]*json.RawMessage 544 err := json.Unmarshal(body, &m) 545 if err != nil { 546 return err 547 } 548 for k, v := range m { 549 switch k { 550 case "properties": 551 if v != nil { 552 var managedClusterProperties ManagedClusterProperties 553 err = json.Unmarshal(*v, &managedClusterProperties) 554 if err != nil { 555 return err 556 } 557 mc.ManagedClusterProperties = &managedClusterProperties 558 } 559 case "id": 560 if v != nil { 561 var ID string 562 err = json.Unmarshal(*v, &ID) 563 if err != nil { 564 return err 565 } 566 mc.ID = &ID 567 } 568 case "name": 569 if v != nil { 570 var name string 571 err = json.Unmarshal(*v, &name) 572 if err != nil { 573 return err 574 } 575 mc.Name = &name 576 } 577 case "type": 578 if v != nil { 579 var typeVar string 580 err = json.Unmarshal(*v, &typeVar) 581 if err != nil { 582 return err 583 } 584 mc.Type = &typeVar 585 } 586 case "location": 587 if v != nil { 588 var location string 589 err = json.Unmarshal(*v, &location) 590 if err != nil { 591 return err 592 } 593 mc.Location = &location 594 } 595 case "tags": 596 if v != nil { 597 var tags map[string]*string 598 err = json.Unmarshal(*v, &tags) 599 if err != nil { 600 return err 601 } 602 mc.Tags = tags 603 } 604 } 605 } 606 607 return nil 608} 609 610// ManagedClusterAADProfile aADProfile specifies attributes for Azure Active Directory integration. 611type ManagedClusterAADProfile struct { 612 // ClientAppID - The client AAD application ID. 613 ClientAppID *string `json:"clientAppID,omitempty"` 614 // ServerAppID - The server AAD application ID. 615 ServerAppID *string `json:"serverAppID,omitempty"` 616 // ServerAppSecret - The server AAD application secret. 617 ServerAppSecret *string `json:"serverAppSecret,omitempty"` 618 // TenantID - The AAD tenant ID to use for authentication. If not specified, will use the tenant of the deployment subscription. 619 TenantID *string `json:"tenantID,omitempty"` 620} 621 622// ManagedClusterAccessProfile managed cluster Access Profile. 623type ManagedClusterAccessProfile struct { 624 autorest.Response `json:"-"` 625 // AccessProfile - AccessProfile of a managed cluster. 626 *AccessProfile `json:"properties,omitempty"` 627 // ID - READ-ONLY; Resource Id 628 ID *string `json:"id,omitempty"` 629 // Name - READ-ONLY; Resource name 630 Name *string `json:"name,omitempty"` 631 // Type - READ-ONLY; Resource type 632 Type *string `json:"type,omitempty"` 633 // Location - Resource location 634 Location *string `json:"location,omitempty"` 635 // Tags - Resource tags 636 Tags map[string]*string `json:"tags"` 637} 638 639// MarshalJSON is the custom marshaler for ManagedClusterAccessProfile. 640func (mcap ManagedClusterAccessProfile) MarshalJSON() ([]byte, error) { 641 objectMap := make(map[string]interface{}) 642 if mcap.AccessProfile != nil { 643 objectMap["properties"] = mcap.AccessProfile 644 } 645 if mcap.Location != nil { 646 objectMap["location"] = mcap.Location 647 } 648 if mcap.Tags != nil { 649 objectMap["tags"] = mcap.Tags 650 } 651 return json.Marshal(objectMap) 652} 653 654// UnmarshalJSON is the custom unmarshaler for ManagedClusterAccessProfile struct. 655func (mcap *ManagedClusterAccessProfile) UnmarshalJSON(body []byte) error { 656 var m map[string]*json.RawMessage 657 err := json.Unmarshal(body, &m) 658 if err != nil { 659 return err 660 } 661 for k, v := range m { 662 switch k { 663 case "properties": 664 if v != nil { 665 var accessProfile AccessProfile 666 err = json.Unmarshal(*v, &accessProfile) 667 if err != nil { 668 return err 669 } 670 mcap.AccessProfile = &accessProfile 671 } 672 case "id": 673 if v != nil { 674 var ID string 675 err = json.Unmarshal(*v, &ID) 676 if err != nil { 677 return err 678 } 679 mcap.ID = &ID 680 } 681 case "name": 682 if v != nil { 683 var name string 684 err = json.Unmarshal(*v, &name) 685 if err != nil { 686 return err 687 } 688 mcap.Name = &name 689 } 690 case "type": 691 if v != nil { 692 var typeVar string 693 err = json.Unmarshal(*v, &typeVar) 694 if err != nil { 695 return err 696 } 697 mcap.Type = &typeVar 698 } 699 case "location": 700 if v != nil { 701 var location string 702 err = json.Unmarshal(*v, &location) 703 if err != nil { 704 return err 705 } 706 mcap.Location = &location 707 } 708 case "tags": 709 if v != nil { 710 var tags map[string]*string 711 err = json.Unmarshal(*v, &tags) 712 if err != nil { 713 return err 714 } 715 mcap.Tags = tags 716 } 717 } 718 } 719 720 return nil 721} 722 723// ManagedClusterAddonProfile a Kubernetes add-on profile for a managed cluster. 724type ManagedClusterAddonProfile struct { 725 // Enabled - Whether the add-on is enabled or not. 726 Enabled *bool `json:"enabled,omitempty"` 727 // Config - Key-value pairs for configuring an add-on. 728 Config map[string]*string `json:"config"` 729} 730 731// MarshalJSON is the custom marshaler for ManagedClusterAddonProfile. 732func (mcap ManagedClusterAddonProfile) MarshalJSON() ([]byte, error) { 733 objectMap := make(map[string]interface{}) 734 if mcap.Enabled != nil { 735 objectMap["enabled"] = mcap.Enabled 736 } 737 if mcap.Config != nil { 738 objectMap["config"] = mcap.Config 739 } 740 return json.Marshal(objectMap) 741} 742 743// ManagedClusterAgentPoolProfile profile for the container service agent pool. 744type ManagedClusterAgentPoolProfile struct { 745 // Name - Unique name of the agent pool profile in the context of the subscription and resource group. 746 Name *string `json:"name,omitempty"` 747 // 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. 748 Count *int32 `json:"count,omitempty"` 749 // VMSize - Size of agent VMs. Possible values include: 'VMSizeTypesStandardA1', 'VMSizeTypesStandardA10', 'VMSizeTypesStandardA11', 'VMSizeTypesStandardA1V2', 'VMSizeTypesStandardA2', 'VMSizeTypesStandardA2V2', 'VMSizeTypesStandardA2mV2', 'VMSizeTypesStandardA3', 'VMSizeTypesStandardA4', 'VMSizeTypesStandardA4V2', 'VMSizeTypesStandardA4mV2', 'VMSizeTypesStandardA5', 'VMSizeTypesStandardA6', 'VMSizeTypesStandardA7', 'VMSizeTypesStandardA8', 'VMSizeTypesStandardA8V2', 'VMSizeTypesStandardA8mV2', 'VMSizeTypesStandardA9', 'VMSizeTypesStandardB2ms', 'VMSizeTypesStandardB2s', 'VMSizeTypesStandardB4ms', 'VMSizeTypesStandardB8ms', 'VMSizeTypesStandardD1', 'VMSizeTypesStandardD11', 'VMSizeTypesStandardD11V2', 'VMSizeTypesStandardD11V2Promo', 'VMSizeTypesStandardD12', 'VMSizeTypesStandardD12V2', 'VMSizeTypesStandardD12V2Promo', 'VMSizeTypesStandardD13', 'VMSizeTypesStandardD13V2', 'VMSizeTypesStandardD13V2Promo', 'VMSizeTypesStandardD14', 'VMSizeTypesStandardD14V2', 'VMSizeTypesStandardD14V2Promo', 'VMSizeTypesStandardD15V2', 'VMSizeTypesStandardD16V3', 'VMSizeTypesStandardD16sV3', 'VMSizeTypesStandardD1V2', 'VMSizeTypesStandardD2', 'VMSizeTypesStandardD2V2', 'VMSizeTypesStandardD2V2Promo', 'VMSizeTypesStandardD2V3', 'VMSizeTypesStandardD2sV3', 'VMSizeTypesStandardD3', 'VMSizeTypesStandardD32V3', 'VMSizeTypesStandardD32sV3', 'VMSizeTypesStandardD3V2', 'VMSizeTypesStandardD3V2Promo', 'VMSizeTypesStandardD4', 'VMSizeTypesStandardD4V2', 'VMSizeTypesStandardD4V2Promo', 'VMSizeTypesStandardD4V3', 'VMSizeTypesStandardD4sV3', 'VMSizeTypesStandardD5V2', 'VMSizeTypesStandardD5V2Promo', 'VMSizeTypesStandardD64V3', 'VMSizeTypesStandardD64sV3', 'VMSizeTypesStandardD8V3', 'VMSizeTypesStandardD8sV3', 'VMSizeTypesStandardDS1', 'VMSizeTypesStandardDS11', 'VMSizeTypesStandardDS11V2', 'VMSizeTypesStandardDS11V2Promo', 'VMSizeTypesStandardDS12', 'VMSizeTypesStandardDS12V2', 'VMSizeTypesStandardDS12V2Promo', 'VMSizeTypesStandardDS13', 'VMSizeTypesStandardDS132V2', 'VMSizeTypesStandardDS134V2', 'VMSizeTypesStandardDS13V2', 'VMSizeTypesStandardDS13V2Promo', 'VMSizeTypesStandardDS14', 'VMSizeTypesStandardDS144V2', 'VMSizeTypesStandardDS148V2', 'VMSizeTypesStandardDS14V2', 'VMSizeTypesStandardDS14V2Promo', 'VMSizeTypesStandardDS15V2', 'VMSizeTypesStandardDS1V2', 'VMSizeTypesStandardDS2', 'VMSizeTypesStandardDS2V2', 'VMSizeTypesStandardDS2V2Promo', 'VMSizeTypesStandardDS3', 'VMSizeTypesStandardDS3V2', 'VMSizeTypesStandardDS3V2Promo', 'VMSizeTypesStandardDS4', 'VMSizeTypesStandardDS4V2', 'VMSizeTypesStandardDS4V2Promo', 'VMSizeTypesStandardDS5V2', 'VMSizeTypesStandardDS5V2Promo', 'VMSizeTypesStandardE16V3', 'VMSizeTypesStandardE16sV3', 'VMSizeTypesStandardE2V3', 'VMSizeTypesStandardE2sV3', 'VMSizeTypesStandardE3216sV3', 'VMSizeTypesStandardE328sV3', 'VMSizeTypesStandardE32V3', 'VMSizeTypesStandardE32sV3', 'VMSizeTypesStandardE4V3', 'VMSizeTypesStandardE4sV3', 'VMSizeTypesStandardE6416sV3', 'VMSizeTypesStandardE6432sV3', 'VMSizeTypesStandardE64V3', 'VMSizeTypesStandardE64sV3', 'VMSizeTypesStandardE8V3', 'VMSizeTypesStandardE8sV3', 'VMSizeTypesStandardF1', 'VMSizeTypesStandardF16', 'VMSizeTypesStandardF16s', 'VMSizeTypesStandardF16sV2', 'VMSizeTypesStandardF1s', 'VMSizeTypesStandardF2', 'VMSizeTypesStandardF2s', 'VMSizeTypesStandardF2sV2', 'VMSizeTypesStandardF32sV2', 'VMSizeTypesStandardF4', 'VMSizeTypesStandardF4s', 'VMSizeTypesStandardF4sV2', 'VMSizeTypesStandardF64sV2', 'VMSizeTypesStandardF72sV2', 'VMSizeTypesStandardF8', 'VMSizeTypesStandardF8s', 'VMSizeTypesStandardF8sV2', 'VMSizeTypesStandardG1', 'VMSizeTypesStandardG2', 'VMSizeTypesStandardG3', 'VMSizeTypesStandardG4', 'VMSizeTypesStandardG5', 'VMSizeTypesStandardGS1', 'VMSizeTypesStandardGS2', 'VMSizeTypesStandardGS3', 'VMSizeTypesStandardGS4', 'VMSizeTypesStandardGS44', 'VMSizeTypesStandardGS48', 'VMSizeTypesStandardGS5', 'VMSizeTypesStandardGS516', 'VMSizeTypesStandardGS58', 'VMSizeTypesStandardH16', 'VMSizeTypesStandardH16m', 'VMSizeTypesStandardH16mr', 'VMSizeTypesStandardH16r', 'VMSizeTypesStandardH8', 'VMSizeTypesStandardH8m', 'VMSizeTypesStandardL16s', 'VMSizeTypesStandardL32s', 'VMSizeTypesStandardL4s', 'VMSizeTypesStandardL8s', 'VMSizeTypesStandardM12832ms', 'VMSizeTypesStandardM12864ms', 'VMSizeTypesStandardM128ms', 'VMSizeTypesStandardM128s', 'VMSizeTypesStandardM6416ms', 'VMSizeTypesStandardM6432ms', 'VMSizeTypesStandardM64ms', 'VMSizeTypesStandardM64s', 'VMSizeTypesStandardNC12', 'VMSizeTypesStandardNC12sV2', 'VMSizeTypesStandardNC12sV3', 'VMSizeTypesStandardNC24', 'VMSizeTypesStandardNC24r', 'VMSizeTypesStandardNC24rsV2', 'VMSizeTypesStandardNC24rsV3', 'VMSizeTypesStandardNC24sV2', 'VMSizeTypesStandardNC24sV3', 'VMSizeTypesStandardNC6', 'VMSizeTypesStandardNC6sV2', 'VMSizeTypesStandardNC6sV3', 'VMSizeTypesStandardND12s', 'VMSizeTypesStandardND24rs', 'VMSizeTypesStandardND24s', 'VMSizeTypesStandardND6s', 'VMSizeTypesStandardNV12', 'VMSizeTypesStandardNV24', 'VMSizeTypesStandardNV6' 750 VMSize VMSizeTypes `json:"vmSize,omitempty"` 751 // 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. 752 OsDiskSizeGB *int32 `json:"osDiskSizeGB,omitempty"` 753 // VnetSubnetID - VNet SubnetID specifies the VNet's subnet identifier. 754 VnetSubnetID *string `json:"vnetSubnetID,omitempty"` 755 // MaxPods - Maximum number of pods that can run on a node. 756 MaxPods *int32 `json:"maxPods,omitempty"` 757 // OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows' 758 OsType OSType `json:"osType,omitempty"` 759 // MaxCount - Maximum number of nodes for auto-scaling 760 MaxCount *int32 `json:"maxCount,omitempty"` 761 // MinCount - Minimum number of nodes for auto-scaling 762 MinCount *int32 `json:"minCount,omitempty"` 763 // EnableAutoScaling - Whether to enable auto-scaler 764 EnableAutoScaling *bool `json:"enableAutoScaling,omitempty"` 765 // Type - AgentPoolType represents types of an agent pool. Possible values include: 'VirtualMachineScaleSets', 'AvailabilitySet' 766 Type AgentPoolType `json:"type,omitempty"` 767} 768 769// ManagedClusterListResult the response from the List Managed Clusters operation. 770type ManagedClusterListResult struct { 771 autorest.Response `json:"-"` 772 // Value - The list of managed clusters. 773 Value *[]ManagedCluster `json:"value,omitempty"` 774 // NextLink - READ-ONLY; The URL to get the next set of managed cluster results. 775 NextLink *string `json:"nextLink,omitempty"` 776} 777 778// MarshalJSON is the custom marshaler for ManagedClusterListResult. 779func (mclr ManagedClusterListResult) MarshalJSON() ([]byte, error) { 780 objectMap := make(map[string]interface{}) 781 if mclr.Value != nil { 782 objectMap["value"] = mclr.Value 783 } 784 return json.Marshal(objectMap) 785} 786 787// ManagedClusterListResultIterator provides access to a complete listing of ManagedCluster values. 788type ManagedClusterListResultIterator struct { 789 i int 790 page ManagedClusterListResultPage 791} 792 793// NextWithContext advances to the next value. If there was an error making 794// the request the iterator does not advance and the error is returned. 795func (iter *ManagedClusterListResultIterator) NextWithContext(ctx context.Context) (err error) { 796 if tracing.IsEnabled() { 797 ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClusterListResultIterator.NextWithContext") 798 defer func() { 799 sc := -1 800 if iter.Response().Response.Response != nil { 801 sc = iter.Response().Response.Response.StatusCode 802 } 803 tracing.EndSpan(ctx, sc, err) 804 }() 805 } 806 iter.i++ 807 if iter.i < len(iter.page.Values()) { 808 return nil 809 } 810 err = iter.page.NextWithContext(ctx) 811 if err != nil { 812 iter.i-- 813 return err 814 } 815 iter.i = 0 816 return nil 817} 818 819// Next advances to the next value. If there was an error making 820// the request the iterator does not advance and the error is returned. 821// Deprecated: Use NextWithContext() instead. 822func (iter *ManagedClusterListResultIterator) Next() error { 823 return iter.NextWithContext(context.Background()) 824} 825 826// NotDone returns true if the enumeration should be started or is not yet complete. 827func (iter ManagedClusterListResultIterator) NotDone() bool { 828 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 829} 830 831// Response returns the raw server response from the last page request. 832func (iter ManagedClusterListResultIterator) Response() ManagedClusterListResult { 833 return iter.page.Response() 834} 835 836// Value returns the current value or a zero-initialized value if the 837// iterator has advanced beyond the end of the collection. 838func (iter ManagedClusterListResultIterator) Value() ManagedCluster { 839 if !iter.page.NotDone() { 840 return ManagedCluster{} 841 } 842 return iter.page.Values()[iter.i] 843} 844 845// Creates a new instance of the ManagedClusterListResultIterator type. 846func NewManagedClusterListResultIterator(page ManagedClusterListResultPage) ManagedClusterListResultIterator { 847 return ManagedClusterListResultIterator{page: page} 848} 849 850// IsEmpty returns true if the ListResult contains no values. 851func (mclr ManagedClusterListResult) IsEmpty() bool { 852 return mclr.Value == nil || len(*mclr.Value) == 0 853} 854 855// hasNextLink returns true if the NextLink is not empty. 856func (mclr ManagedClusterListResult) hasNextLink() bool { 857 return mclr.NextLink != nil && len(*mclr.NextLink) != 0 858} 859 860// managedClusterListResultPreparer prepares a request to retrieve the next set of results. 861// It returns nil if no more results exist. 862func (mclr ManagedClusterListResult) managedClusterListResultPreparer(ctx context.Context) (*http.Request, error) { 863 if !mclr.hasNextLink() { 864 return nil, nil 865 } 866 return autorest.Prepare((&http.Request{}).WithContext(ctx), 867 autorest.AsJSON(), 868 autorest.AsGet(), 869 autorest.WithBaseURL(to.String(mclr.NextLink))) 870} 871 872// ManagedClusterListResultPage contains a page of ManagedCluster values. 873type ManagedClusterListResultPage struct { 874 fn func(context.Context, ManagedClusterListResult) (ManagedClusterListResult, error) 875 mclr ManagedClusterListResult 876} 877 878// NextWithContext advances to the next page of values. If there was an error making 879// the request the page does not advance and the error is returned. 880func (page *ManagedClusterListResultPage) NextWithContext(ctx context.Context) (err error) { 881 if tracing.IsEnabled() { 882 ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClusterListResultPage.NextWithContext") 883 defer func() { 884 sc := -1 885 if page.Response().Response.Response != nil { 886 sc = page.Response().Response.Response.StatusCode 887 } 888 tracing.EndSpan(ctx, sc, err) 889 }() 890 } 891 for { 892 next, err := page.fn(ctx, page.mclr) 893 if err != nil { 894 return err 895 } 896 page.mclr = next 897 if !next.hasNextLink() || !next.IsEmpty() { 898 break 899 } 900 } 901 return nil 902} 903 904// Next advances to the next page of values. If there was an error making 905// the request the page does not advance and the error is returned. 906// Deprecated: Use NextWithContext() instead. 907func (page *ManagedClusterListResultPage) Next() error { 908 return page.NextWithContext(context.Background()) 909} 910 911// NotDone returns true if the page enumeration should be started or is not yet complete. 912func (page ManagedClusterListResultPage) NotDone() bool { 913 return !page.mclr.IsEmpty() 914} 915 916// Response returns the raw server response from the last page request. 917func (page ManagedClusterListResultPage) Response() ManagedClusterListResult { 918 return page.mclr 919} 920 921// Values returns the slice of values for the current page or nil if there are no values. 922func (page ManagedClusterListResultPage) Values() []ManagedCluster { 923 if page.mclr.IsEmpty() { 924 return nil 925 } 926 return *page.mclr.Value 927} 928 929// Creates a new instance of the ManagedClusterListResultPage type. 930func NewManagedClusterListResultPage(cur ManagedClusterListResult, getNextPage func(context.Context, ManagedClusterListResult) (ManagedClusterListResult, error)) ManagedClusterListResultPage { 931 return ManagedClusterListResultPage{ 932 fn: getNextPage, 933 mclr: cur, 934 } 935} 936 937// ManagedClusterPoolUpgradeProfile the list of available upgrade versions. 938type ManagedClusterPoolUpgradeProfile struct { 939 // KubernetesVersion - Kubernetes version (major, minor, patch). 940 KubernetesVersion *string `json:"kubernetesVersion,omitempty"` 941 // Name - Pool name. 942 Name *string `json:"name,omitempty"` 943 // OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows' 944 OsType OSType `json:"osType,omitempty"` 945 // Upgrades - List of orchestrator types and versions available for upgrade. 946 Upgrades *[]string `json:"upgrades,omitempty"` 947} 948 949// ManagedClusterProperties properties of the managed cluster. 950type ManagedClusterProperties struct { 951 // ProvisioningState - READ-ONLY; The current deployment or provisioning state, which only appears in the response. 952 ProvisioningState *string `json:"provisioningState,omitempty"` 953 // KubernetesVersion - Version of Kubernetes specified when creating the managed cluster. 954 KubernetesVersion *string `json:"kubernetesVersion,omitempty"` 955 // DNSPrefix - DNS prefix specified when creating the managed cluster. 956 DNSPrefix *string `json:"dnsPrefix,omitempty"` 957 // Fqdn - READ-ONLY; FQDN for the master pool. 958 Fqdn *string `json:"fqdn,omitempty"` 959 // AgentPoolProfiles - Properties of the agent pool. 960 AgentPoolProfiles *[]ManagedClusterAgentPoolProfile `json:"agentPoolProfiles,omitempty"` 961 // LinuxProfile - Profile for Linux VMs in the container service cluster. 962 LinuxProfile *LinuxProfile `json:"linuxProfile,omitempty"` 963 // ServicePrincipalProfile - Information about a service principal identity for the cluster to use for manipulating Azure APIs. 964 ServicePrincipalProfile *ManagedClusterServicePrincipalProfile `json:"servicePrincipalProfile,omitempty"` 965 // AddonProfiles - Profile of managed cluster add-on. 966 AddonProfiles map[string]*ManagedClusterAddonProfile `json:"addonProfiles"` 967 // NodeResourceGroup - READ-ONLY; Name of the resource group containing agent pool nodes. 968 NodeResourceGroup *string `json:"nodeResourceGroup,omitempty"` 969 // EnableRBAC - Whether to enable Kubernetes Role-Based Access Control. 970 EnableRBAC *bool `json:"enableRBAC,omitempty"` 971 // NetworkProfile - Profile of network configuration. 972 NetworkProfile *NetworkProfileType `json:"networkProfile,omitempty"` 973 // AadProfile - Profile of Azure Active Directory configuration. 974 AadProfile *ManagedClusterAADProfile `json:"aadProfile,omitempty"` 975} 976 977// MarshalJSON is the custom marshaler for ManagedClusterProperties. 978func (mcp ManagedClusterProperties) MarshalJSON() ([]byte, error) { 979 objectMap := make(map[string]interface{}) 980 if mcp.KubernetesVersion != nil { 981 objectMap["kubernetesVersion"] = mcp.KubernetesVersion 982 } 983 if mcp.DNSPrefix != nil { 984 objectMap["dnsPrefix"] = mcp.DNSPrefix 985 } 986 if mcp.AgentPoolProfiles != nil { 987 objectMap["agentPoolProfiles"] = mcp.AgentPoolProfiles 988 } 989 if mcp.LinuxProfile != nil { 990 objectMap["linuxProfile"] = mcp.LinuxProfile 991 } 992 if mcp.ServicePrincipalProfile != nil { 993 objectMap["servicePrincipalProfile"] = mcp.ServicePrincipalProfile 994 } 995 if mcp.AddonProfiles != nil { 996 objectMap["addonProfiles"] = mcp.AddonProfiles 997 } 998 if mcp.EnableRBAC != nil { 999 objectMap["enableRBAC"] = mcp.EnableRBAC 1000 } 1001 if mcp.NetworkProfile != nil { 1002 objectMap["networkProfile"] = mcp.NetworkProfile 1003 } 1004 if mcp.AadProfile != nil { 1005 objectMap["aadProfile"] = mcp.AadProfile 1006 } 1007 return json.Marshal(objectMap) 1008} 1009 1010// ManagedClustersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a 1011// long-running operation. 1012type ManagedClustersCreateOrUpdateFuture struct { 1013 azure.FutureAPI 1014 // Result returns the result of the asynchronous operation. 1015 // If the operation has not completed it will return an error. 1016 Result func(ManagedClustersClient) (ManagedCluster, error) 1017} 1018 1019// UnmarshalJSON is the custom unmarshaller for CreateFuture. 1020func (future *ManagedClustersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { 1021 var azFuture azure.Future 1022 if err := json.Unmarshal(body, &azFuture); err != nil { 1023 return err 1024 } 1025 future.FutureAPI = &azFuture 1026 future.Result = future.result 1027 return nil 1028} 1029 1030// result is the default implementation for ManagedClustersCreateOrUpdateFuture.Result. 1031func (future *ManagedClustersCreateOrUpdateFuture) result(client ManagedClustersClient) (mc ManagedCluster, err error) { 1032 var done bool 1033 done, err = future.DoneWithContext(context.Background(), client) 1034 if err != nil { 1035 err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 1036 return 1037 } 1038 if !done { 1039 mc.Response.Response = future.Response() 1040 err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersCreateOrUpdateFuture") 1041 return 1042 } 1043 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 1044 if mc.Response.Response, err = future.GetResult(sender); err == nil && mc.Response.Response.StatusCode != http.StatusNoContent { 1045 mc, err = client.CreateOrUpdateResponder(mc.Response.Response) 1046 if err != nil { 1047 err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersCreateOrUpdateFuture", "Result", mc.Response.Response, "Failure responding to request") 1048 } 1049 } 1050 return 1051} 1052 1053// ManagedClustersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running 1054// operation. 1055type ManagedClustersDeleteFuture struct { 1056 azure.FutureAPI 1057 // Result returns the result of the asynchronous operation. 1058 // If the operation has not completed it will return an error. 1059 Result func(ManagedClustersClient) (autorest.Response, error) 1060} 1061 1062// UnmarshalJSON is the custom unmarshaller for CreateFuture. 1063func (future *ManagedClustersDeleteFuture) UnmarshalJSON(body []byte) error { 1064 var azFuture azure.Future 1065 if err := json.Unmarshal(body, &azFuture); err != nil { 1066 return err 1067 } 1068 future.FutureAPI = &azFuture 1069 future.Result = future.result 1070 return nil 1071} 1072 1073// result is the default implementation for ManagedClustersDeleteFuture.Result. 1074func (future *ManagedClustersDeleteFuture) result(client ManagedClustersClient) (ar autorest.Response, err error) { 1075 var done bool 1076 done, err = future.DoneWithContext(context.Background(), client) 1077 if err != nil { 1078 err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersDeleteFuture", "Result", future.Response(), "Polling failure") 1079 return 1080 } 1081 if !done { 1082 ar.Response = future.Response() 1083 err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersDeleteFuture") 1084 return 1085 } 1086 ar.Response = future.Response() 1087 return 1088} 1089 1090// ManagedClusterServicePrincipalProfile information about a service principal identity for the cluster to 1091// use for manipulating Azure APIs. 1092type ManagedClusterServicePrincipalProfile struct { 1093 // ClientID - The ID for the service principal. 1094 ClientID *string `json:"clientId,omitempty"` 1095 // Secret - The secret password associated with the service principal in plain text. 1096 Secret *string `json:"secret,omitempty"` 1097} 1098 1099// ManagedClustersResetAADProfileFuture an abstraction for monitoring and retrieving the results of a 1100// long-running operation. 1101type ManagedClustersResetAADProfileFuture struct { 1102 azure.FutureAPI 1103 // Result returns the result of the asynchronous operation. 1104 // If the operation has not completed it will return an error. 1105 Result func(ManagedClustersClient) (autorest.Response, error) 1106} 1107 1108// UnmarshalJSON is the custom unmarshaller for CreateFuture. 1109func (future *ManagedClustersResetAADProfileFuture) UnmarshalJSON(body []byte) error { 1110 var azFuture azure.Future 1111 if err := json.Unmarshal(body, &azFuture); err != nil { 1112 return err 1113 } 1114 future.FutureAPI = &azFuture 1115 future.Result = future.result 1116 return nil 1117} 1118 1119// result is the default implementation for ManagedClustersResetAADProfileFuture.Result. 1120func (future *ManagedClustersResetAADProfileFuture) result(client ManagedClustersClient) (ar autorest.Response, err error) { 1121 var done bool 1122 done, err = future.DoneWithContext(context.Background(), client) 1123 if err != nil { 1124 err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersResetAADProfileFuture", "Result", future.Response(), "Polling failure") 1125 return 1126 } 1127 if !done { 1128 ar.Response = future.Response() 1129 err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersResetAADProfileFuture") 1130 return 1131 } 1132 ar.Response = future.Response() 1133 return 1134} 1135 1136// ManagedClustersResetServicePrincipalProfileFuture an abstraction for monitoring and retrieving the 1137// results of a long-running operation. 1138type ManagedClustersResetServicePrincipalProfileFuture struct { 1139 azure.FutureAPI 1140 // Result returns the result of the asynchronous operation. 1141 // If the operation has not completed it will return an error. 1142 Result func(ManagedClustersClient) (autorest.Response, error) 1143} 1144 1145// UnmarshalJSON is the custom unmarshaller for CreateFuture. 1146func (future *ManagedClustersResetServicePrincipalProfileFuture) UnmarshalJSON(body []byte) error { 1147 var azFuture azure.Future 1148 if err := json.Unmarshal(body, &azFuture); err != nil { 1149 return err 1150 } 1151 future.FutureAPI = &azFuture 1152 future.Result = future.result 1153 return nil 1154} 1155 1156// result is the default implementation for ManagedClustersResetServicePrincipalProfileFuture.Result. 1157func (future *ManagedClustersResetServicePrincipalProfileFuture) result(client ManagedClustersClient) (ar autorest.Response, err error) { 1158 var done bool 1159 done, err = future.DoneWithContext(context.Background(), client) 1160 if err != nil { 1161 err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersResetServicePrincipalProfileFuture", "Result", future.Response(), "Polling failure") 1162 return 1163 } 1164 if !done { 1165 ar.Response = future.Response() 1166 err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersResetServicePrincipalProfileFuture") 1167 return 1168 } 1169 ar.Response = future.Response() 1170 return 1171} 1172 1173// ManagedClustersUpdateTagsFuture an abstraction for monitoring and retrieving the results of a 1174// long-running operation. 1175type ManagedClustersUpdateTagsFuture struct { 1176 azure.FutureAPI 1177 // Result returns the result of the asynchronous operation. 1178 // If the operation has not completed it will return an error. 1179 Result func(ManagedClustersClient) (ManagedCluster, error) 1180} 1181 1182// UnmarshalJSON is the custom unmarshaller for CreateFuture. 1183func (future *ManagedClustersUpdateTagsFuture) UnmarshalJSON(body []byte) error { 1184 var azFuture azure.Future 1185 if err := json.Unmarshal(body, &azFuture); err != nil { 1186 return err 1187 } 1188 future.FutureAPI = &azFuture 1189 future.Result = future.result 1190 return nil 1191} 1192 1193// result is the default implementation for ManagedClustersUpdateTagsFuture.Result. 1194func (future *ManagedClustersUpdateTagsFuture) result(client ManagedClustersClient) (mc ManagedCluster, err error) { 1195 var done bool 1196 done, err = future.DoneWithContext(context.Background(), client) 1197 if err != nil { 1198 err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersUpdateTagsFuture", "Result", future.Response(), "Polling failure") 1199 return 1200 } 1201 if !done { 1202 mc.Response.Response = future.Response() 1203 err = azure.NewAsyncOpIncompleteError("containerservice.ManagedClustersUpdateTagsFuture") 1204 return 1205 } 1206 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 1207 if mc.Response.Response, err = future.GetResult(sender); err == nil && mc.Response.Response.StatusCode != http.StatusNoContent { 1208 mc, err = client.UpdateTagsResponder(mc.Response.Response) 1209 if err != nil { 1210 err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersUpdateTagsFuture", "Result", mc.Response.Response, "Failure responding to request") 1211 } 1212 } 1213 return 1214} 1215 1216// ManagedClusterUpgradeProfile the list of available upgrades for compute pools. 1217type ManagedClusterUpgradeProfile struct { 1218 autorest.Response `json:"-"` 1219 // ID - READ-ONLY; Id of upgrade profile. 1220 ID *string `json:"id,omitempty"` 1221 // Name - READ-ONLY; Name of upgrade profile. 1222 Name *string `json:"name,omitempty"` 1223 // Type - READ-ONLY; Type of upgrade profile. 1224 Type *string `json:"type,omitempty"` 1225 // ManagedClusterUpgradeProfileProperties - Properties of upgrade profile. 1226 *ManagedClusterUpgradeProfileProperties `json:"properties,omitempty"` 1227} 1228 1229// MarshalJSON is the custom marshaler for ManagedClusterUpgradeProfile. 1230func (mcup ManagedClusterUpgradeProfile) MarshalJSON() ([]byte, error) { 1231 objectMap := make(map[string]interface{}) 1232 if mcup.ManagedClusterUpgradeProfileProperties != nil { 1233 objectMap["properties"] = mcup.ManagedClusterUpgradeProfileProperties 1234 } 1235 return json.Marshal(objectMap) 1236} 1237 1238// UnmarshalJSON is the custom unmarshaler for ManagedClusterUpgradeProfile struct. 1239func (mcup *ManagedClusterUpgradeProfile) UnmarshalJSON(body []byte) error { 1240 var m map[string]*json.RawMessage 1241 err := json.Unmarshal(body, &m) 1242 if err != nil { 1243 return err 1244 } 1245 for k, v := range m { 1246 switch k { 1247 case "id": 1248 if v != nil { 1249 var ID string 1250 err = json.Unmarshal(*v, &ID) 1251 if err != nil { 1252 return err 1253 } 1254 mcup.ID = &ID 1255 } 1256 case "name": 1257 if v != nil { 1258 var name string 1259 err = json.Unmarshal(*v, &name) 1260 if err != nil { 1261 return err 1262 } 1263 mcup.Name = &name 1264 } 1265 case "type": 1266 if v != nil { 1267 var typeVar string 1268 err = json.Unmarshal(*v, &typeVar) 1269 if err != nil { 1270 return err 1271 } 1272 mcup.Type = &typeVar 1273 } 1274 case "properties": 1275 if v != nil { 1276 var managedClusterUpgradeProfileProperties ManagedClusterUpgradeProfileProperties 1277 err = json.Unmarshal(*v, &managedClusterUpgradeProfileProperties) 1278 if err != nil { 1279 return err 1280 } 1281 mcup.ManagedClusterUpgradeProfileProperties = &managedClusterUpgradeProfileProperties 1282 } 1283 } 1284 } 1285 1286 return nil 1287} 1288 1289// ManagedClusterUpgradeProfileProperties control plane and agent pool upgrade profiles. 1290type ManagedClusterUpgradeProfileProperties struct { 1291 // ControlPlaneProfile - The list of available upgrade versions for the control plane. 1292 ControlPlaneProfile *ManagedClusterPoolUpgradeProfile `json:"controlPlaneProfile,omitempty"` 1293 // AgentPoolProfiles - The list of available upgrade versions for agent pools. 1294 AgentPoolProfiles *[]ManagedClusterPoolUpgradeProfile `json:"agentPoolProfiles,omitempty"` 1295} 1296 1297// MasterProfile profile for the container service master. 1298type MasterProfile struct { 1299 // Count - Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. 1300 Count *int32 `json:"count,omitempty"` 1301 // DNSPrefix - DNS prefix to be used to create the FQDN for the master pool. 1302 DNSPrefix *string `json:"dnsPrefix,omitempty"` 1303 // VMSize - Size of agent VMs. Possible values include: 'VMSizeTypesStandardA1', 'VMSizeTypesStandardA10', 'VMSizeTypesStandardA11', 'VMSizeTypesStandardA1V2', 'VMSizeTypesStandardA2', 'VMSizeTypesStandardA2V2', 'VMSizeTypesStandardA2mV2', 'VMSizeTypesStandardA3', 'VMSizeTypesStandardA4', 'VMSizeTypesStandardA4V2', 'VMSizeTypesStandardA4mV2', 'VMSizeTypesStandardA5', 'VMSizeTypesStandardA6', 'VMSizeTypesStandardA7', 'VMSizeTypesStandardA8', 'VMSizeTypesStandardA8V2', 'VMSizeTypesStandardA8mV2', 'VMSizeTypesStandardA9', 'VMSizeTypesStandardB2ms', 'VMSizeTypesStandardB2s', 'VMSizeTypesStandardB4ms', 'VMSizeTypesStandardB8ms', 'VMSizeTypesStandardD1', 'VMSizeTypesStandardD11', 'VMSizeTypesStandardD11V2', 'VMSizeTypesStandardD11V2Promo', 'VMSizeTypesStandardD12', 'VMSizeTypesStandardD12V2', 'VMSizeTypesStandardD12V2Promo', 'VMSizeTypesStandardD13', 'VMSizeTypesStandardD13V2', 'VMSizeTypesStandardD13V2Promo', 'VMSizeTypesStandardD14', 'VMSizeTypesStandardD14V2', 'VMSizeTypesStandardD14V2Promo', 'VMSizeTypesStandardD15V2', 'VMSizeTypesStandardD16V3', 'VMSizeTypesStandardD16sV3', 'VMSizeTypesStandardD1V2', 'VMSizeTypesStandardD2', 'VMSizeTypesStandardD2V2', 'VMSizeTypesStandardD2V2Promo', 'VMSizeTypesStandardD2V3', 'VMSizeTypesStandardD2sV3', 'VMSizeTypesStandardD3', 'VMSizeTypesStandardD32V3', 'VMSizeTypesStandardD32sV3', 'VMSizeTypesStandardD3V2', 'VMSizeTypesStandardD3V2Promo', 'VMSizeTypesStandardD4', 'VMSizeTypesStandardD4V2', 'VMSizeTypesStandardD4V2Promo', 'VMSizeTypesStandardD4V3', 'VMSizeTypesStandardD4sV3', 'VMSizeTypesStandardD5V2', 'VMSizeTypesStandardD5V2Promo', 'VMSizeTypesStandardD64V3', 'VMSizeTypesStandardD64sV3', 'VMSizeTypesStandardD8V3', 'VMSizeTypesStandardD8sV3', 'VMSizeTypesStandardDS1', 'VMSizeTypesStandardDS11', 'VMSizeTypesStandardDS11V2', 'VMSizeTypesStandardDS11V2Promo', 'VMSizeTypesStandardDS12', 'VMSizeTypesStandardDS12V2', 'VMSizeTypesStandardDS12V2Promo', 'VMSizeTypesStandardDS13', 'VMSizeTypesStandardDS132V2', 'VMSizeTypesStandardDS134V2', 'VMSizeTypesStandardDS13V2', 'VMSizeTypesStandardDS13V2Promo', 'VMSizeTypesStandardDS14', 'VMSizeTypesStandardDS144V2', 'VMSizeTypesStandardDS148V2', 'VMSizeTypesStandardDS14V2', 'VMSizeTypesStandardDS14V2Promo', 'VMSizeTypesStandardDS15V2', 'VMSizeTypesStandardDS1V2', 'VMSizeTypesStandardDS2', 'VMSizeTypesStandardDS2V2', 'VMSizeTypesStandardDS2V2Promo', 'VMSizeTypesStandardDS3', 'VMSizeTypesStandardDS3V2', 'VMSizeTypesStandardDS3V2Promo', 'VMSizeTypesStandardDS4', 'VMSizeTypesStandardDS4V2', 'VMSizeTypesStandardDS4V2Promo', 'VMSizeTypesStandardDS5V2', 'VMSizeTypesStandardDS5V2Promo', 'VMSizeTypesStandardE16V3', 'VMSizeTypesStandardE16sV3', 'VMSizeTypesStandardE2V3', 'VMSizeTypesStandardE2sV3', 'VMSizeTypesStandardE3216sV3', 'VMSizeTypesStandardE328sV3', 'VMSizeTypesStandardE32V3', 'VMSizeTypesStandardE32sV3', 'VMSizeTypesStandardE4V3', 'VMSizeTypesStandardE4sV3', 'VMSizeTypesStandardE6416sV3', 'VMSizeTypesStandardE6432sV3', 'VMSizeTypesStandardE64V3', 'VMSizeTypesStandardE64sV3', 'VMSizeTypesStandardE8V3', 'VMSizeTypesStandardE8sV3', 'VMSizeTypesStandardF1', 'VMSizeTypesStandardF16', 'VMSizeTypesStandardF16s', 'VMSizeTypesStandardF16sV2', 'VMSizeTypesStandardF1s', 'VMSizeTypesStandardF2', 'VMSizeTypesStandardF2s', 'VMSizeTypesStandardF2sV2', 'VMSizeTypesStandardF32sV2', 'VMSizeTypesStandardF4', 'VMSizeTypesStandardF4s', 'VMSizeTypesStandardF4sV2', 'VMSizeTypesStandardF64sV2', 'VMSizeTypesStandardF72sV2', 'VMSizeTypesStandardF8', 'VMSizeTypesStandardF8s', 'VMSizeTypesStandardF8sV2', 'VMSizeTypesStandardG1', 'VMSizeTypesStandardG2', 'VMSizeTypesStandardG3', 'VMSizeTypesStandardG4', 'VMSizeTypesStandardG5', 'VMSizeTypesStandardGS1', 'VMSizeTypesStandardGS2', 'VMSizeTypesStandardGS3', 'VMSizeTypesStandardGS4', 'VMSizeTypesStandardGS44', 'VMSizeTypesStandardGS48', 'VMSizeTypesStandardGS5', 'VMSizeTypesStandardGS516', 'VMSizeTypesStandardGS58', 'VMSizeTypesStandardH16', 'VMSizeTypesStandardH16m', 'VMSizeTypesStandardH16mr', 'VMSizeTypesStandardH16r', 'VMSizeTypesStandardH8', 'VMSizeTypesStandardH8m', 'VMSizeTypesStandardL16s', 'VMSizeTypesStandardL32s', 'VMSizeTypesStandardL4s', 'VMSizeTypesStandardL8s', 'VMSizeTypesStandardM12832ms', 'VMSizeTypesStandardM12864ms', 'VMSizeTypesStandardM128ms', 'VMSizeTypesStandardM128s', 'VMSizeTypesStandardM6416ms', 'VMSizeTypesStandardM6432ms', 'VMSizeTypesStandardM64ms', 'VMSizeTypesStandardM64s', 'VMSizeTypesStandardNC12', 'VMSizeTypesStandardNC12sV2', 'VMSizeTypesStandardNC12sV3', 'VMSizeTypesStandardNC24', 'VMSizeTypesStandardNC24r', 'VMSizeTypesStandardNC24rsV2', 'VMSizeTypesStandardNC24rsV3', 'VMSizeTypesStandardNC24sV2', 'VMSizeTypesStandardNC24sV3', 'VMSizeTypesStandardNC6', 'VMSizeTypesStandardNC6sV2', 'VMSizeTypesStandardNC6sV3', 'VMSizeTypesStandardND12s', 'VMSizeTypesStandardND24rs', 'VMSizeTypesStandardND24s', 'VMSizeTypesStandardND6s', 'VMSizeTypesStandardNV12', 'VMSizeTypesStandardNV24', 'VMSizeTypesStandardNV6' 1304 VMSize VMSizeTypes `json:"vmSize,omitempty"` 1305 // 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. 1306 OsDiskSizeGB *int32 `json:"osDiskSizeGB,omitempty"` 1307 // VnetSubnetID - VNet SubnetID specifies the VNet's subnet identifier. 1308 VnetSubnetID *string `json:"vnetSubnetID,omitempty"` 1309 // FirstConsecutiveStaticIP - FirstConsecutiveStaticIP used to specify the first static ip of masters. 1310 FirstConsecutiveStaticIP *string `json:"firstConsecutiveStaticIP,omitempty"` 1311 // 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' 1312 StorageProfile StorageProfileTypes `json:"storageProfile,omitempty"` 1313 // Fqdn - READ-ONLY; FQDN for the master pool. 1314 Fqdn *string `json:"fqdn,omitempty"` 1315} 1316 1317// MarshalJSON is the custom marshaler for MasterProfile. 1318func (mp MasterProfile) MarshalJSON() ([]byte, error) { 1319 objectMap := make(map[string]interface{}) 1320 if mp.Count != nil { 1321 objectMap["count"] = mp.Count 1322 } 1323 if mp.DNSPrefix != nil { 1324 objectMap["dnsPrefix"] = mp.DNSPrefix 1325 } 1326 if mp.VMSize != "" { 1327 objectMap["vmSize"] = mp.VMSize 1328 } 1329 if mp.OsDiskSizeGB != nil { 1330 objectMap["osDiskSizeGB"] = mp.OsDiskSizeGB 1331 } 1332 if mp.VnetSubnetID != nil { 1333 objectMap["vnetSubnetID"] = mp.VnetSubnetID 1334 } 1335 if mp.FirstConsecutiveStaticIP != nil { 1336 objectMap["firstConsecutiveStaticIP"] = mp.FirstConsecutiveStaticIP 1337 } 1338 if mp.StorageProfile != "" { 1339 objectMap["storageProfile"] = mp.StorageProfile 1340 } 1341 return json.Marshal(objectMap) 1342} 1343 1344// NetworkProfile represents the OpenShift networking configuration 1345type NetworkProfile struct { 1346 // VnetCidr - CIDR for the OpenShift Vnet. 1347 VnetCidr *string `json:"vnetCidr,omitempty"` 1348 // PeerVnetID - CIDR of the Vnet to peer. 1349 PeerVnetID *string `json:"peerVnetId,omitempty"` 1350} 1351 1352// NetworkProfileType profile of network configuration. 1353type NetworkProfileType struct { 1354 // NetworkPlugin - Network plugin used for building Kubernetes network. Possible values include: 'Azure', 'Kubenet' 1355 NetworkPlugin NetworkPlugin `json:"networkPlugin,omitempty"` 1356 // NetworkPolicy - Network policy used for building Kubernetes network. Possible values include: 'Calico' 1357 NetworkPolicy NetworkPolicy `json:"networkPolicy,omitempty"` 1358 // PodCidr - A CIDR notation IP range from which to assign pod IPs when kubenet is used. 1359 PodCidr *string `json:"podCidr,omitempty"` 1360 // ServiceCidr - A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP ranges. 1361 ServiceCidr *string `json:"serviceCidr,omitempty"` 1362 // DNSServiceIP - An IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified in serviceCidr. 1363 DNSServiceIP *string `json:"dnsServiceIP,omitempty"` 1364 // 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. 1365 DockerBridgeCidr *string `json:"dockerBridgeCidr,omitempty"` 1366} 1367 1368// OpenShiftManagedCluster openShift Managed cluster. 1369type OpenShiftManagedCluster struct { 1370 autorest.Response `json:"-"` 1371 // Plan - Define the resource plan as required by ARM for billing purposes 1372 Plan *PurchasePlan `json:"plan,omitempty"` 1373 // OpenShiftManagedClusterProperties - Properties of a OpenShift managed cluster. 1374 *OpenShiftManagedClusterProperties `json:"properties,omitempty"` 1375 // ID - READ-ONLY; Resource Id 1376 ID *string `json:"id,omitempty"` 1377 // Name - READ-ONLY; Resource name 1378 Name *string `json:"name,omitempty"` 1379 // Type - READ-ONLY; Resource type 1380 Type *string `json:"type,omitempty"` 1381 // Location - Resource location 1382 Location *string `json:"location,omitempty"` 1383 // Tags - Resource tags 1384 Tags map[string]*string `json:"tags"` 1385} 1386 1387// MarshalJSON is the custom marshaler for OpenShiftManagedCluster. 1388func (osmc OpenShiftManagedCluster) MarshalJSON() ([]byte, error) { 1389 objectMap := make(map[string]interface{}) 1390 if osmc.Plan != nil { 1391 objectMap["plan"] = osmc.Plan 1392 } 1393 if osmc.OpenShiftManagedClusterProperties != nil { 1394 objectMap["properties"] = osmc.OpenShiftManagedClusterProperties 1395 } 1396 if osmc.Location != nil { 1397 objectMap["location"] = osmc.Location 1398 } 1399 if osmc.Tags != nil { 1400 objectMap["tags"] = osmc.Tags 1401 } 1402 return json.Marshal(objectMap) 1403} 1404 1405// UnmarshalJSON is the custom unmarshaler for OpenShiftManagedCluster struct. 1406func (osmc *OpenShiftManagedCluster) UnmarshalJSON(body []byte) error { 1407 var m map[string]*json.RawMessage 1408 err := json.Unmarshal(body, &m) 1409 if err != nil { 1410 return err 1411 } 1412 for k, v := range m { 1413 switch k { 1414 case "plan": 1415 if v != nil { 1416 var plan PurchasePlan 1417 err = json.Unmarshal(*v, &plan) 1418 if err != nil { 1419 return err 1420 } 1421 osmc.Plan = &plan 1422 } 1423 case "properties": 1424 if v != nil { 1425 var openShiftManagedClusterProperties OpenShiftManagedClusterProperties 1426 err = json.Unmarshal(*v, &openShiftManagedClusterProperties) 1427 if err != nil { 1428 return err 1429 } 1430 osmc.OpenShiftManagedClusterProperties = &openShiftManagedClusterProperties 1431 } 1432 case "id": 1433 if v != nil { 1434 var ID string 1435 err = json.Unmarshal(*v, &ID) 1436 if err != nil { 1437 return err 1438 } 1439 osmc.ID = &ID 1440 } 1441 case "name": 1442 if v != nil { 1443 var name string 1444 err = json.Unmarshal(*v, &name) 1445 if err != nil { 1446 return err 1447 } 1448 osmc.Name = &name 1449 } 1450 case "type": 1451 if v != nil { 1452 var typeVar string 1453 err = json.Unmarshal(*v, &typeVar) 1454 if err != nil { 1455 return err 1456 } 1457 osmc.Type = &typeVar 1458 } 1459 case "location": 1460 if v != nil { 1461 var location string 1462 err = json.Unmarshal(*v, &location) 1463 if err != nil { 1464 return err 1465 } 1466 osmc.Location = &location 1467 } 1468 case "tags": 1469 if v != nil { 1470 var tags map[string]*string 1471 err = json.Unmarshal(*v, &tags) 1472 if err != nil { 1473 return err 1474 } 1475 osmc.Tags = tags 1476 } 1477 } 1478 } 1479 1480 return nil 1481} 1482 1483// OpenShiftManagedClusterAADIdentityProvider defines the Identity provider for MS AAD. 1484type OpenShiftManagedClusterAADIdentityProvider struct { 1485 // ClientID - The clientId password associated with the provider. 1486 ClientID *string `json:"clientId,omitempty"` 1487 // Secret - The secret password associated with the provider. 1488 Secret *string `json:"secret,omitempty"` 1489 // TenantID - The tenantId associated with the provider. 1490 TenantID *string `json:"tenantId,omitempty"` 1491 // CustomerAdminGroupID - The groupId to be granted cluster admin role. 1492 CustomerAdminGroupID *string `json:"customerAdminGroupId,omitempty"` 1493 // Kind - Possible values include: 'KindOpenShiftManagedClusterBaseIdentityProvider', 'KindAADIdentityProvider' 1494 Kind Kind `json:"kind,omitempty"` 1495} 1496 1497// MarshalJSON is the custom marshaler for OpenShiftManagedClusterAADIdentityProvider. 1498func (osmcaip OpenShiftManagedClusterAADIdentityProvider) MarshalJSON() ([]byte, error) { 1499 osmcaip.Kind = KindAADIdentityProvider 1500 objectMap := make(map[string]interface{}) 1501 if osmcaip.ClientID != nil { 1502 objectMap["clientId"] = osmcaip.ClientID 1503 } 1504 if osmcaip.Secret != nil { 1505 objectMap["secret"] = osmcaip.Secret 1506 } 1507 if osmcaip.TenantID != nil { 1508 objectMap["tenantId"] = osmcaip.TenantID 1509 } 1510 if osmcaip.CustomerAdminGroupID != nil { 1511 objectMap["customerAdminGroupId"] = osmcaip.CustomerAdminGroupID 1512 } 1513 if osmcaip.Kind != "" { 1514 objectMap["kind"] = osmcaip.Kind 1515 } 1516 return json.Marshal(objectMap) 1517} 1518 1519// AsOpenShiftManagedClusterAADIdentityProvider is the BasicOpenShiftManagedClusterBaseIdentityProvider implementation for OpenShiftManagedClusterAADIdentityProvider. 1520func (osmcaip OpenShiftManagedClusterAADIdentityProvider) AsOpenShiftManagedClusterAADIdentityProvider() (*OpenShiftManagedClusterAADIdentityProvider, bool) { 1521 return &osmcaip, true 1522} 1523 1524// AsOpenShiftManagedClusterBaseIdentityProvider is the BasicOpenShiftManagedClusterBaseIdentityProvider implementation for OpenShiftManagedClusterAADIdentityProvider. 1525func (osmcaip OpenShiftManagedClusterAADIdentityProvider) AsOpenShiftManagedClusterBaseIdentityProvider() (*OpenShiftManagedClusterBaseIdentityProvider, bool) { 1526 return nil, false 1527} 1528 1529// AsBasicOpenShiftManagedClusterBaseIdentityProvider is the BasicOpenShiftManagedClusterBaseIdentityProvider implementation for OpenShiftManagedClusterAADIdentityProvider. 1530func (osmcaip OpenShiftManagedClusterAADIdentityProvider) AsBasicOpenShiftManagedClusterBaseIdentityProvider() (BasicOpenShiftManagedClusterBaseIdentityProvider, bool) { 1531 return &osmcaip, true 1532} 1533 1534// OpenShiftManagedClusterAgentPoolProfile defines the configuration of the OpenShift cluster VMs. 1535type OpenShiftManagedClusterAgentPoolProfile struct { 1536 // Name - Unique name of the pool profile in the context of the subscription and resource group. 1537 Name *string `json:"name,omitempty"` 1538 // Count - Number of agents (VMs) to host docker containers. 1539 Count *int32 `json:"count,omitempty"` 1540 // VMSize - Size of agent VMs. Possible values include: 'StandardD2sV3', 'StandardD4sV3', 'StandardD8sV3', 'StandardD16sV3', 'StandardD32sV3', 'StandardD64sV3', 'StandardDS4V2', 'StandardDS5V2', 'StandardF8sV2', 'StandardF16sV2', 'StandardF32sV2', 'StandardF64sV2', 'StandardF72sV2', 'StandardF8s', 'StandardF16s', 'StandardE4sV3', 'StandardE8sV3', 'StandardE16sV3', 'StandardE20sV3', 'StandardE32sV3', 'StandardE64sV3', 'StandardGS2', 'StandardGS3', 'StandardGS4', 'StandardGS5', 'StandardDS12V2', 'StandardDS13V2', 'StandardDS14V2', 'StandardDS15V2', 'StandardL4s', 'StandardL8s', 'StandardL16s', 'StandardL32s' 1541 VMSize OpenShiftContainerServiceVMSize `json:"vmSize,omitempty"` 1542 // SubnetCidr - Subnet CIDR for the peering. 1543 SubnetCidr *string `json:"subnetCidr,omitempty"` 1544 // OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows' 1545 OsType OSType `json:"osType,omitempty"` 1546 // Role - Define the role of the AgentPoolProfile. Possible values include: 'Compute', 'Infra' 1547 Role OpenShiftAgentPoolProfileRole `json:"role,omitempty"` 1548} 1549 1550// OpenShiftManagedClusterAuthProfile defines all possible authentication profiles for the OpenShift 1551// cluster. 1552type OpenShiftManagedClusterAuthProfile struct { 1553 // IdentityProviders - Type of authentication profile to use. 1554 IdentityProviders *[]OpenShiftManagedClusterIdentityProvider `json:"identityProviders,omitempty"` 1555} 1556 1557// BasicOpenShiftManagedClusterBaseIdentityProvider structure for any Identity provider. 1558type BasicOpenShiftManagedClusterBaseIdentityProvider interface { 1559 AsOpenShiftManagedClusterAADIdentityProvider() (*OpenShiftManagedClusterAADIdentityProvider, bool) 1560 AsOpenShiftManagedClusterBaseIdentityProvider() (*OpenShiftManagedClusterBaseIdentityProvider, bool) 1561} 1562 1563// OpenShiftManagedClusterBaseIdentityProvider structure for any Identity provider. 1564type OpenShiftManagedClusterBaseIdentityProvider struct { 1565 // Kind - Possible values include: 'KindOpenShiftManagedClusterBaseIdentityProvider', 'KindAADIdentityProvider' 1566 Kind Kind `json:"kind,omitempty"` 1567} 1568 1569func unmarshalBasicOpenShiftManagedClusterBaseIdentityProvider(body []byte) (BasicOpenShiftManagedClusterBaseIdentityProvider, error) { 1570 var m map[string]interface{} 1571 err := json.Unmarshal(body, &m) 1572 if err != nil { 1573 return nil, err 1574 } 1575 1576 switch m["kind"] { 1577 case string(KindAADIdentityProvider): 1578 var osmcaip OpenShiftManagedClusterAADIdentityProvider 1579 err := json.Unmarshal(body, &osmcaip) 1580 return osmcaip, err 1581 default: 1582 var osmcbip OpenShiftManagedClusterBaseIdentityProvider 1583 err := json.Unmarshal(body, &osmcbip) 1584 return osmcbip, err 1585 } 1586} 1587func unmarshalBasicOpenShiftManagedClusterBaseIdentityProviderArray(body []byte) ([]BasicOpenShiftManagedClusterBaseIdentityProvider, error) { 1588 var rawMessages []*json.RawMessage 1589 err := json.Unmarshal(body, &rawMessages) 1590 if err != nil { 1591 return nil, err 1592 } 1593 1594 osmcbipArray := make([]BasicOpenShiftManagedClusterBaseIdentityProvider, len(rawMessages)) 1595 1596 for index, rawMessage := range rawMessages { 1597 osmcbip, err := unmarshalBasicOpenShiftManagedClusterBaseIdentityProvider(*rawMessage) 1598 if err != nil { 1599 return nil, err 1600 } 1601 osmcbipArray[index] = osmcbip 1602 } 1603 return osmcbipArray, nil 1604} 1605 1606// MarshalJSON is the custom marshaler for OpenShiftManagedClusterBaseIdentityProvider. 1607func (osmcbip OpenShiftManagedClusterBaseIdentityProvider) MarshalJSON() ([]byte, error) { 1608 osmcbip.Kind = KindOpenShiftManagedClusterBaseIdentityProvider 1609 objectMap := make(map[string]interface{}) 1610 if osmcbip.Kind != "" { 1611 objectMap["kind"] = osmcbip.Kind 1612 } 1613 return json.Marshal(objectMap) 1614} 1615 1616// AsOpenShiftManagedClusterAADIdentityProvider is the BasicOpenShiftManagedClusterBaseIdentityProvider implementation for OpenShiftManagedClusterBaseIdentityProvider. 1617func (osmcbip OpenShiftManagedClusterBaseIdentityProvider) AsOpenShiftManagedClusterAADIdentityProvider() (*OpenShiftManagedClusterAADIdentityProvider, bool) { 1618 return nil, false 1619} 1620 1621// AsOpenShiftManagedClusterBaseIdentityProvider is the BasicOpenShiftManagedClusterBaseIdentityProvider implementation for OpenShiftManagedClusterBaseIdentityProvider. 1622func (osmcbip OpenShiftManagedClusterBaseIdentityProvider) AsOpenShiftManagedClusterBaseIdentityProvider() (*OpenShiftManagedClusterBaseIdentityProvider, bool) { 1623 return &osmcbip, true 1624} 1625 1626// AsBasicOpenShiftManagedClusterBaseIdentityProvider is the BasicOpenShiftManagedClusterBaseIdentityProvider implementation for OpenShiftManagedClusterBaseIdentityProvider. 1627func (osmcbip OpenShiftManagedClusterBaseIdentityProvider) AsBasicOpenShiftManagedClusterBaseIdentityProvider() (BasicOpenShiftManagedClusterBaseIdentityProvider, bool) { 1628 return &osmcbip, true 1629} 1630 1631// OpenShiftManagedClusterIdentityProvider defines the configuration of the identity providers to be used 1632// in the OpenShift cluster. 1633type OpenShiftManagedClusterIdentityProvider struct { 1634 // Name - Name of the provider. 1635 Name *string `json:"name,omitempty"` 1636 // Provider - Configuration of the provider. 1637 Provider BasicOpenShiftManagedClusterBaseIdentityProvider `json:"provider,omitempty"` 1638} 1639 1640// UnmarshalJSON is the custom unmarshaler for OpenShiftManagedClusterIdentityProvider struct. 1641func (osmcip *OpenShiftManagedClusterIdentityProvider) UnmarshalJSON(body []byte) error { 1642 var m map[string]*json.RawMessage 1643 err := json.Unmarshal(body, &m) 1644 if err != nil { 1645 return err 1646 } 1647 for k, v := range m { 1648 switch k { 1649 case "name": 1650 if v != nil { 1651 var name string 1652 err = json.Unmarshal(*v, &name) 1653 if err != nil { 1654 return err 1655 } 1656 osmcip.Name = &name 1657 } 1658 case "provider": 1659 if v != nil { 1660 provider, err := unmarshalBasicOpenShiftManagedClusterBaseIdentityProvider(*v) 1661 if err != nil { 1662 return err 1663 } 1664 osmcip.Provider = provider 1665 } 1666 } 1667 } 1668 1669 return nil 1670} 1671 1672// OpenShiftManagedClusterListResult the response from the List OpenShift Managed Clusters operation. 1673type OpenShiftManagedClusterListResult struct { 1674 autorest.Response `json:"-"` 1675 // Value - The list of OpenShift managed clusters. 1676 Value *[]OpenShiftManagedCluster `json:"value,omitempty"` 1677 // NextLink - READ-ONLY; The URL to get the next set of OpenShift managed cluster results. 1678 NextLink *string `json:"nextLink,omitempty"` 1679} 1680 1681// MarshalJSON is the custom marshaler for OpenShiftManagedClusterListResult. 1682func (osmclr OpenShiftManagedClusterListResult) MarshalJSON() ([]byte, error) { 1683 objectMap := make(map[string]interface{}) 1684 if osmclr.Value != nil { 1685 objectMap["value"] = osmclr.Value 1686 } 1687 return json.Marshal(objectMap) 1688} 1689 1690// OpenShiftManagedClusterListResultIterator provides access to a complete listing of 1691// OpenShiftManagedCluster values. 1692type OpenShiftManagedClusterListResultIterator struct { 1693 i int 1694 page OpenShiftManagedClusterListResultPage 1695} 1696 1697// NextWithContext advances to the next value. If there was an error making 1698// the request the iterator does not advance and the error is returned. 1699func (iter *OpenShiftManagedClusterListResultIterator) NextWithContext(ctx context.Context) (err error) { 1700 if tracing.IsEnabled() { 1701 ctx = tracing.StartSpan(ctx, fqdn+"/OpenShiftManagedClusterListResultIterator.NextWithContext") 1702 defer func() { 1703 sc := -1 1704 if iter.Response().Response.Response != nil { 1705 sc = iter.Response().Response.Response.StatusCode 1706 } 1707 tracing.EndSpan(ctx, sc, err) 1708 }() 1709 } 1710 iter.i++ 1711 if iter.i < len(iter.page.Values()) { 1712 return nil 1713 } 1714 err = iter.page.NextWithContext(ctx) 1715 if err != nil { 1716 iter.i-- 1717 return err 1718 } 1719 iter.i = 0 1720 return nil 1721} 1722 1723// Next advances to the next value. If there was an error making 1724// the request the iterator does not advance and the error is returned. 1725// Deprecated: Use NextWithContext() instead. 1726func (iter *OpenShiftManagedClusterListResultIterator) Next() error { 1727 return iter.NextWithContext(context.Background()) 1728} 1729 1730// NotDone returns true if the enumeration should be started or is not yet complete. 1731func (iter OpenShiftManagedClusterListResultIterator) NotDone() bool { 1732 return iter.page.NotDone() && iter.i < len(iter.page.Values()) 1733} 1734 1735// Response returns the raw server response from the last page request. 1736func (iter OpenShiftManagedClusterListResultIterator) Response() OpenShiftManagedClusterListResult { 1737 return iter.page.Response() 1738} 1739 1740// Value returns the current value or a zero-initialized value if the 1741// iterator has advanced beyond the end of the collection. 1742func (iter OpenShiftManagedClusterListResultIterator) Value() OpenShiftManagedCluster { 1743 if !iter.page.NotDone() { 1744 return OpenShiftManagedCluster{} 1745 } 1746 return iter.page.Values()[iter.i] 1747} 1748 1749// Creates a new instance of the OpenShiftManagedClusterListResultIterator type. 1750func NewOpenShiftManagedClusterListResultIterator(page OpenShiftManagedClusterListResultPage) OpenShiftManagedClusterListResultIterator { 1751 return OpenShiftManagedClusterListResultIterator{page: page} 1752} 1753 1754// IsEmpty returns true if the ListResult contains no values. 1755func (osmclr OpenShiftManagedClusterListResult) IsEmpty() bool { 1756 return osmclr.Value == nil || len(*osmclr.Value) == 0 1757} 1758 1759// hasNextLink returns true if the NextLink is not empty. 1760func (osmclr OpenShiftManagedClusterListResult) hasNextLink() bool { 1761 return osmclr.NextLink != nil && len(*osmclr.NextLink) != 0 1762} 1763 1764// openShiftManagedClusterListResultPreparer prepares a request to retrieve the next set of results. 1765// It returns nil if no more results exist. 1766func (osmclr OpenShiftManagedClusterListResult) openShiftManagedClusterListResultPreparer(ctx context.Context) (*http.Request, error) { 1767 if !osmclr.hasNextLink() { 1768 return nil, nil 1769 } 1770 return autorest.Prepare((&http.Request{}).WithContext(ctx), 1771 autorest.AsJSON(), 1772 autorest.AsGet(), 1773 autorest.WithBaseURL(to.String(osmclr.NextLink))) 1774} 1775 1776// OpenShiftManagedClusterListResultPage contains a page of OpenShiftManagedCluster values. 1777type OpenShiftManagedClusterListResultPage struct { 1778 fn func(context.Context, OpenShiftManagedClusterListResult) (OpenShiftManagedClusterListResult, error) 1779 osmclr OpenShiftManagedClusterListResult 1780} 1781 1782// NextWithContext advances to the next page of values. If there was an error making 1783// the request the page does not advance and the error is returned. 1784func (page *OpenShiftManagedClusterListResultPage) NextWithContext(ctx context.Context) (err error) { 1785 if tracing.IsEnabled() { 1786 ctx = tracing.StartSpan(ctx, fqdn+"/OpenShiftManagedClusterListResultPage.NextWithContext") 1787 defer func() { 1788 sc := -1 1789 if page.Response().Response.Response != nil { 1790 sc = page.Response().Response.Response.StatusCode 1791 } 1792 tracing.EndSpan(ctx, sc, err) 1793 }() 1794 } 1795 for { 1796 next, err := page.fn(ctx, page.osmclr) 1797 if err != nil { 1798 return err 1799 } 1800 page.osmclr = next 1801 if !next.hasNextLink() || !next.IsEmpty() { 1802 break 1803 } 1804 } 1805 return nil 1806} 1807 1808// Next advances to the next page of values. If there was an error making 1809// the request the page does not advance and the error is returned. 1810// Deprecated: Use NextWithContext() instead. 1811func (page *OpenShiftManagedClusterListResultPage) Next() error { 1812 return page.NextWithContext(context.Background()) 1813} 1814 1815// NotDone returns true if the page enumeration should be started or is not yet complete. 1816func (page OpenShiftManagedClusterListResultPage) NotDone() bool { 1817 return !page.osmclr.IsEmpty() 1818} 1819 1820// Response returns the raw server response from the last page request. 1821func (page OpenShiftManagedClusterListResultPage) Response() OpenShiftManagedClusterListResult { 1822 return page.osmclr 1823} 1824 1825// Values returns the slice of values for the current page or nil if there are no values. 1826func (page OpenShiftManagedClusterListResultPage) Values() []OpenShiftManagedCluster { 1827 if page.osmclr.IsEmpty() { 1828 return nil 1829 } 1830 return *page.osmclr.Value 1831} 1832 1833// Creates a new instance of the OpenShiftManagedClusterListResultPage type. 1834func NewOpenShiftManagedClusterListResultPage(cur OpenShiftManagedClusterListResult, getNextPage func(context.Context, OpenShiftManagedClusterListResult) (OpenShiftManagedClusterListResult, error)) OpenShiftManagedClusterListResultPage { 1835 return OpenShiftManagedClusterListResultPage{ 1836 fn: getNextPage, 1837 osmclr: cur, 1838 } 1839} 1840 1841// OpenShiftManagedClusterMasterPoolProfile openShiftManagedClusterMaterPoolProfile contains configuration 1842// for OpenShift master VMs. 1843type OpenShiftManagedClusterMasterPoolProfile struct { 1844 // Name - Unique name of the master pool profile in the context of the subscription and resource group. 1845 Name *string `json:"name,omitempty"` 1846 // Count - Number of masters (VMs) to host docker containers. The default value is 3. 1847 Count *int32 `json:"count,omitempty"` 1848 // VMSize - Size of agent VMs. Possible values include: 'StandardD2sV3', 'StandardD4sV3', 'StandardD8sV3', 'StandardD16sV3', 'StandardD32sV3', 'StandardD64sV3', 'StandardDS4V2', 'StandardDS5V2', 'StandardF8sV2', 'StandardF16sV2', 'StandardF32sV2', 'StandardF64sV2', 'StandardF72sV2', 'StandardF8s', 'StandardF16s', 'StandardE4sV3', 'StandardE8sV3', 'StandardE16sV3', 'StandardE20sV3', 'StandardE32sV3', 'StandardE64sV3', 'StandardGS2', 'StandardGS3', 'StandardGS4', 'StandardGS5', 'StandardDS12V2', 'StandardDS13V2', 'StandardDS14V2', 'StandardDS15V2', 'StandardL4s', 'StandardL8s', 'StandardL16s', 'StandardL32s' 1849 VMSize OpenShiftContainerServiceVMSize `json:"vmSize,omitempty"` 1850 // SubnetCidr - Subnet CIDR for the peering. 1851 SubnetCidr *string `json:"subnetCidr,omitempty"` 1852 // OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows' 1853 OsType OSType `json:"osType,omitempty"` 1854} 1855 1856// OpenShiftManagedClusterProperties properties of the OpenShift managed cluster. 1857type OpenShiftManagedClusterProperties struct { 1858 // ProvisioningState - READ-ONLY; The current deployment or provisioning state, which only appears in the response. 1859 ProvisioningState *string `json:"provisioningState,omitempty"` 1860 // OpenShiftVersion - Version of OpenShift specified when creating the cluster. 1861 OpenShiftVersion *string `json:"openShiftVersion,omitempty"` 1862 // PublicHostname - Optional user-specified FQDN for OpenShift API server. 1863 PublicHostname *string `json:"publicHostname,omitempty"` 1864 // Fqdn - User-specified FQDN for OpenShift API server loadbalancer internal hostname. 1865 Fqdn *string `json:"fqdn,omitempty"` 1866 // NetworkProfile - Configuration for OpenShift networking. 1867 NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"` 1868 // RouterProfiles - Configuration for OpenShift router(s). 1869 RouterProfiles *[]OpenShiftRouterProfile `json:"routerProfiles,omitempty"` 1870 // MasterPoolProfile - Configuration for OpenShift master VMs. 1871 MasterPoolProfile *OpenShiftManagedClusterMasterPoolProfile `json:"masterPoolProfile,omitempty"` 1872 // AgentPoolProfiles - Configuration of OpenShift cluster VMs. 1873 AgentPoolProfiles *[]OpenShiftManagedClusterAgentPoolProfile `json:"agentPoolProfiles,omitempty"` 1874 // AuthProfile - Configures OpenShift authentication. 1875 AuthProfile *OpenShiftManagedClusterAuthProfile `json:"authProfile,omitempty"` 1876} 1877 1878// MarshalJSON is the custom marshaler for OpenShiftManagedClusterProperties. 1879func (osmcp OpenShiftManagedClusterProperties) MarshalJSON() ([]byte, error) { 1880 objectMap := make(map[string]interface{}) 1881 if osmcp.OpenShiftVersion != nil { 1882 objectMap["openShiftVersion"] = osmcp.OpenShiftVersion 1883 } 1884 if osmcp.PublicHostname != nil { 1885 objectMap["publicHostname"] = osmcp.PublicHostname 1886 } 1887 if osmcp.Fqdn != nil { 1888 objectMap["fqdn"] = osmcp.Fqdn 1889 } 1890 if osmcp.NetworkProfile != nil { 1891 objectMap["networkProfile"] = osmcp.NetworkProfile 1892 } 1893 if osmcp.RouterProfiles != nil { 1894 objectMap["routerProfiles"] = osmcp.RouterProfiles 1895 } 1896 if osmcp.MasterPoolProfile != nil { 1897 objectMap["masterPoolProfile"] = osmcp.MasterPoolProfile 1898 } 1899 if osmcp.AgentPoolProfiles != nil { 1900 objectMap["agentPoolProfiles"] = osmcp.AgentPoolProfiles 1901 } 1902 if osmcp.AuthProfile != nil { 1903 objectMap["authProfile"] = osmcp.AuthProfile 1904 } 1905 return json.Marshal(objectMap) 1906} 1907 1908// OpenShiftManagedClustersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of 1909// a long-running operation. 1910type OpenShiftManagedClustersCreateOrUpdateFuture struct { 1911 azure.FutureAPI 1912 // Result returns the result of the asynchronous operation. 1913 // If the operation has not completed it will return an error. 1914 Result func(OpenShiftManagedClustersClient) (OpenShiftManagedCluster, error) 1915} 1916 1917// UnmarshalJSON is the custom unmarshaller for CreateFuture. 1918func (future *OpenShiftManagedClustersCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { 1919 var azFuture azure.Future 1920 if err := json.Unmarshal(body, &azFuture); err != nil { 1921 return err 1922 } 1923 future.FutureAPI = &azFuture 1924 future.Result = future.result 1925 return nil 1926} 1927 1928// result is the default implementation for OpenShiftManagedClustersCreateOrUpdateFuture.Result. 1929func (future *OpenShiftManagedClustersCreateOrUpdateFuture) result(client OpenShiftManagedClustersClient) (osmc OpenShiftManagedCluster, err error) { 1930 var done bool 1931 done, err = future.DoneWithContext(context.Background(), client) 1932 if err != nil { 1933 err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") 1934 return 1935 } 1936 if !done { 1937 osmc.Response.Response = future.Response() 1938 err = azure.NewAsyncOpIncompleteError("containerservice.OpenShiftManagedClustersCreateOrUpdateFuture") 1939 return 1940 } 1941 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 1942 if osmc.Response.Response, err = future.GetResult(sender); err == nil && osmc.Response.Response.StatusCode != http.StatusNoContent { 1943 osmc, err = client.CreateOrUpdateResponder(osmc.Response.Response) 1944 if err != nil { 1945 err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersCreateOrUpdateFuture", "Result", osmc.Response.Response, "Failure responding to request") 1946 } 1947 } 1948 return 1949} 1950 1951// OpenShiftManagedClustersDeleteFuture an abstraction for monitoring and retrieving the results of a 1952// long-running operation. 1953type OpenShiftManagedClustersDeleteFuture struct { 1954 azure.FutureAPI 1955 // Result returns the result of the asynchronous operation. 1956 // If the operation has not completed it will return an error. 1957 Result func(OpenShiftManagedClustersClient) (autorest.Response, error) 1958} 1959 1960// UnmarshalJSON is the custom unmarshaller for CreateFuture. 1961func (future *OpenShiftManagedClustersDeleteFuture) UnmarshalJSON(body []byte) error { 1962 var azFuture azure.Future 1963 if err := json.Unmarshal(body, &azFuture); err != nil { 1964 return err 1965 } 1966 future.FutureAPI = &azFuture 1967 future.Result = future.result 1968 return nil 1969} 1970 1971// result is the default implementation for OpenShiftManagedClustersDeleteFuture.Result. 1972func (future *OpenShiftManagedClustersDeleteFuture) result(client OpenShiftManagedClustersClient) (ar autorest.Response, err error) { 1973 var done bool 1974 done, err = future.DoneWithContext(context.Background(), client) 1975 if err != nil { 1976 err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersDeleteFuture", "Result", future.Response(), "Polling failure") 1977 return 1978 } 1979 if !done { 1980 ar.Response = future.Response() 1981 err = azure.NewAsyncOpIncompleteError("containerservice.OpenShiftManagedClustersDeleteFuture") 1982 return 1983 } 1984 ar.Response = future.Response() 1985 return 1986} 1987 1988// OpenShiftManagedClustersUpdateTagsFuture an abstraction for monitoring and retrieving the results of a 1989// long-running operation. 1990type OpenShiftManagedClustersUpdateTagsFuture struct { 1991 azure.FutureAPI 1992 // Result returns the result of the asynchronous operation. 1993 // If the operation has not completed it will return an error. 1994 Result func(OpenShiftManagedClustersClient) (OpenShiftManagedCluster, error) 1995} 1996 1997// UnmarshalJSON is the custom unmarshaller for CreateFuture. 1998func (future *OpenShiftManagedClustersUpdateTagsFuture) UnmarshalJSON(body []byte) error { 1999 var azFuture azure.Future 2000 if err := json.Unmarshal(body, &azFuture); err != nil { 2001 return err 2002 } 2003 future.FutureAPI = &azFuture 2004 future.Result = future.result 2005 return nil 2006} 2007 2008// result is the default implementation for OpenShiftManagedClustersUpdateTagsFuture.Result. 2009func (future *OpenShiftManagedClustersUpdateTagsFuture) result(client OpenShiftManagedClustersClient) (osmc OpenShiftManagedCluster, err error) { 2010 var done bool 2011 done, err = future.DoneWithContext(context.Background(), client) 2012 if err != nil { 2013 err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersUpdateTagsFuture", "Result", future.Response(), "Polling failure") 2014 return 2015 } 2016 if !done { 2017 osmc.Response.Response = future.Response() 2018 err = azure.NewAsyncOpIncompleteError("containerservice.OpenShiftManagedClustersUpdateTagsFuture") 2019 return 2020 } 2021 sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) 2022 if osmc.Response.Response, err = future.GetResult(sender); err == nil && osmc.Response.Response.StatusCode != http.StatusNoContent { 2023 osmc, err = client.UpdateTagsResponder(osmc.Response.Response) 2024 if err != nil { 2025 err = autorest.NewErrorWithError(err, "containerservice.OpenShiftManagedClustersUpdateTagsFuture", "Result", osmc.Response.Response, "Failure responding to request") 2026 } 2027 } 2028 return 2029} 2030 2031// OpenShiftRouterProfile represents an OpenShift router 2032type OpenShiftRouterProfile struct { 2033 // Name - Name of the router profile. 2034 Name *string `json:"name,omitempty"` 2035 // PublicSubdomain - DNS subdomain for OpenShift router. 2036 PublicSubdomain *string `json:"publicSubdomain,omitempty"` 2037 // Fqdn - READ-ONLY; Auto-allocated FQDN for the OpenShift router. 2038 Fqdn *string `json:"fqdn,omitempty"` 2039} 2040 2041// MarshalJSON is the custom marshaler for OpenShiftRouterProfile. 2042func (osrp OpenShiftRouterProfile) MarshalJSON() ([]byte, error) { 2043 objectMap := make(map[string]interface{}) 2044 if osrp.Name != nil { 2045 objectMap["name"] = osrp.Name 2046 } 2047 if osrp.PublicSubdomain != nil { 2048 objectMap["publicSubdomain"] = osrp.PublicSubdomain 2049 } 2050 return json.Marshal(objectMap) 2051} 2052 2053// OperationListResult the List Compute Operation operation response. 2054type OperationListResult struct { 2055 autorest.Response `json:"-"` 2056 // Value - READ-ONLY; The list of compute operations 2057 Value *[]OperationValue `json:"value,omitempty"` 2058} 2059 2060// MarshalJSON is the custom marshaler for OperationListResult. 2061func (olr OperationListResult) MarshalJSON() ([]byte, error) { 2062 objectMap := make(map[string]interface{}) 2063 return json.Marshal(objectMap) 2064} 2065 2066// OperationValue describes the properties of a Compute Operation value. 2067type OperationValue struct { 2068 // Origin - READ-ONLY; The origin of the compute operation. 2069 Origin *string `json:"origin,omitempty"` 2070 // Name - READ-ONLY; The name of the compute operation. 2071 Name *string `json:"name,omitempty"` 2072 // OperationValueDisplay - Describes the properties of a Compute Operation Value Display. 2073 *OperationValueDisplay `json:"display,omitempty"` 2074} 2075 2076// MarshalJSON is the custom marshaler for OperationValue. 2077func (ov OperationValue) MarshalJSON() ([]byte, error) { 2078 objectMap := make(map[string]interface{}) 2079 if ov.OperationValueDisplay != nil { 2080 objectMap["display"] = ov.OperationValueDisplay 2081 } 2082 return json.Marshal(objectMap) 2083} 2084 2085// UnmarshalJSON is the custom unmarshaler for OperationValue struct. 2086func (ov *OperationValue) UnmarshalJSON(body []byte) error { 2087 var m map[string]*json.RawMessage 2088 err := json.Unmarshal(body, &m) 2089 if err != nil { 2090 return err 2091 } 2092 for k, v := range m { 2093 switch k { 2094 case "origin": 2095 if v != nil { 2096 var origin string 2097 err = json.Unmarshal(*v, &origin) 2098 if err != nil { 2099 return err 2100 } 2101 ov.Origin = &origin 2102 } 2103 case "name": 2104 if v != nil { 2105 var name string 2106 err = json.Unmarshal(*v, &name) 2107 if err != nil { 2108 return err 2109 } 2110 ov.Name = &name 2111 } 2112 case "display": 2113 if v != nil { 2114 var operationValueDisplay OperationValueDisplay 2115 err = json.Unmarshal(*v, &operationValueDisplay) 2116 if err != nil { 2117 return err 2118 } 2119 ov.OperationValueDisplay = &operationValueDisplay 2120 } 2121 } 2122 } 2123 2124 return nil 2125} 2126 2127// OperationValueDisplay describes the properties of a Compute Operation Value Display. 2128type OperationValueDisplay struct { 2129 // Operation - READ-ONLY; The display name of the compute operation. 2130 Operation *string `json:"operation,omitempty"` 2131 // Resource - READ-ONLY; The display name of the resource the operation applies to. 2132 Resource *string `json:"resource,omitempty"` 2133 // Description - READ-ONLY; The description of the operation. 2134 Description *string `json:"description,omitempty"` 2135 // Provider - READ-ONLY; The resource provider for the operation. 2136 Provider *string `json:"provider,omitempty"` 2137} 2138 2139// MarshalJSON is the custom marshaler for OperationValueDisplay. 2140func (ovd OperationValueDisplay) MarshalJSON() ([]byte, error) { 2141 objectMap := make(map[string]interface{}) 2142 return json.Marshal(objectMap) 2143} 2144 2145// OrchestratorProfile contains information about orchestrator. 2146type OrchestratorProfile struct { 2147 // OrchestratorType - Orchestrator type. 2148 OrchestratorType *string `json:"orchestratorType,omitempty"` 2149 // OrchestratorVersion - Orchestrator version (major, minor, patch). 2150 OrchestratorVersion *string `json:"orchestratorVersion,omitempty"` 2151} 2152 2153// OrchestratorProfileType profile for the container service orchestrator. 2154type OrchestratorProfileType struct { 2155 // 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' 2156 OrchestratorType OrchestratorTypes `json:"orchestratorType,omitempty"` 2157 // 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". 2158 OrchestratorVersion *string `json:"orchestratorVersion,omitempty"` 2159} 2160 2161// OrchestratorVersionProfile the profile of an orchestrator and its available versions. 2162type OrchestratorVersionProfile struct { 2163 // OrchestratorType - Orchestrator type. 2164 OrchestratorType *string `json:"orchestratorType,omitempty"` 2165 // OrchestratorVersion - Orchestrator version (major, minor, patch). 2166 OrchestratorVersion *string `json:"orchestratorVersion,omitempty"` 2167 // Default - Installed by default if version is not specified. 2168 Default *bool `json:"default,omitempty"` 2169 // Upgrades - The list of available upgrade versions. 2170 Upgrades *[]OrchestratorProfile `json:"upgrades,omitempty"` 2171} 2172 2173// OrchestratorVersionProfileListResult the list of versions for supported orchestrators. 2174type OrchestratorVersionProfileListResult struct { 2175 autorest.Response `json:"-"` 2176 // ID - READ-ONLY; Id of the orchestrator version profile list result. 2177 ID *string `json:"id,omitempty"` 2178 // Name - READ-ONLY; Name of the orchestrator version profile list result. 2179 Name *string `json:"name,omitempty"` 2180 // Type - READ-ONLY; Type of the orchestrator version profile list result. 2181 Type *string `json:"type,omitempty"` 2182 // OrchestratorVersionProfileProperties - The properties of an orchestrator version profile. 2183 *OrchestratorVersionProfileProperties `json:"properties,omitempty"` 2184} 2185 2186// MarshalJSON is the custom marshaler for OrchestratorVersionProfileListResult. 2187func (ovplr OrchestratorVersionProfileListResult) MarshalJSON() ([]byte, error) { 2188 objectMap := make(map[string]interface{}) 2189 if ovplr.OrchestratorVersionProfileProperties != nil { 2190 objectMap["properties"] = ovplr.OrchestratorVersionProfileProperties 2191 } 2192 return json.Marshal(objectMap) 2193} 2194 2195// UnmarshalJSON is the custom unmarshaler for OrchestratorVersionProfileListResult struct. 2196func (ovplr *OrchestratorVersionProfileListResult) UnmarshalJSON(body []byte) error { 2197 var m map[string]*json.RawMessage 2198 err := json.Unmarshal(body, &m) 2199 if err != nil { 2200 return err 2201 } 2202 for k, v := range m { 2203 switch k { 2204 case "id": 2205 if v != nil { 2206 var ID string 2207 err = json.Unmarshal(*v, &ID) 2208 if err != nil { 2209 return err 2210 } 2211 ovplr.ID = &ID 2212 } 2213 case "name": 2214 if v != nil { 2215 var name string 2216 err = json.Unmarshal(*v, &name) 2217 if err != nil { 2218 return err 2219 } 2220 ovplr.Name = &name 2221 } 2222 case "type": 2223 if v != nil { 2224 var typeVar string 2225 err = json.Unmarshal(*v, &typeVar) 2226 if err != nil { 2227 return err 2228 } 2229 ovplr.Type = &typeVar 2230 } 2231 case "properties": 2232 if v != nil { 2233 var orchestratorVersionProfileProperties OrchestratorVersionProfileProperties 2234 err = json.Unmarshal(*v, &orchestratorVersionProfileProperties) 2235 if err != nil { 2236 return err 2237 } 2238 ovplr.OrchestratorVersionProfileProperties = &orchestratorVersionProfileProperties 2239 } 2240 } 2241 } 2242 2243 return nil 2244} 2245 2246// OrchestratorVersionProfileProperties the properties of an orchestrator version profile. 2247type OrchestratorVersionProfileProperties struct { 2248 // Orchestrators - List of orchestrator version profiles. 2249 Orchestrators *[]OrchestratorVersionProfile `json:"orchestrators,omitempty"` 2250} 2251 2252// Properties properties of the container service. 2253type Properties struct { 2254 // ProvisioningState - READ-ONLY; The current deployment or provisioning state, which only appears in the response. 2255 ProvisioningState *string `json:"provisioningState,omitempty"` 2256 // OrchestratorProfile - Profile for the container service orchestrator. 2257 OrchestratorProfile *OrchestratorProfileType `json:"orchestratorProfile,omitempty"` 2258 // CustomProfile - Properties to configure a custom container service cluster. 2259 CustomProfile *CustomProfile `json:"customProfile,omitempty"` 2260 // 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. 2261 ServicePrincipalProfile *ServicePrincipalProfile `json:"servicePrincipalProfile,omitempty"` 2262 // MasterProfile - Profile for the container service master. 2263 MasterProfile *MasterProfile `json:"masterProfile,omitempty"` 2264 // AgentPoolProfiles - Properties of the agent pool. 2265 AgentPoolProfiles *[]AgentPoolProfile `json:"agentPoolProfiles,omitempty"` 2266 // WindowsProfile - Profile for Windows VMs in the container service cluster. 2267 WindowsProfile *WindowsProfile `json:"windowsProfile,omitempty"` 2268 // LinuxProfile - Profile for Linux VMs in the container service cluster. 2269 LinuxProfile *LinuxProfile `json:"linuxProfile,omitempty"` 2270 // DiagnosticsProfile - Profile for diagnostics in the container service cluster. 2271 DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"` 2272} 2273 2274// MarshalJSON is the custom marshaler for Properties. 2275func (p Properties) MarshalJSON() ([]byte, error) { 2276 objectMap := make(map[string]interface{}) 2277 if p.OrchestratorProfile != nil { 2278 objectMap["orchestratorProfile"] = p.OrchestratorProfile 2279 } 2280 if p.CustomProfile != nil { 2281 objectMap["customProfile"] = p.CustomProfile 2282 } 2283 if p.ServicePrincipalProfile != nil { 2284 objectMap["servicePrincipalProfile"] = p.ServicePrincipalProfile 2285 } 2286 if p.MasterProfile != nil { 2287 objectMap["masterProfile"] = p.MasterProfile 2288 } 2289 if p.AgentPoolProfiles != nil { 2290 objectMap["agentPoolProfiles"] = p.AgentPoolProfiles 2291 } 2292 if p.WindowsProfile != nil { 2293 objectMap["windowsProfile"] = p.WindowsProfile 2294 } 2295 if p.LinuxProfile != nil { 2296 objectMap["linuxProfile"] = p.LinuxProfile 2297 } 2298 if p.DiagnosticsProfile != nil { 2299 objectMap["diagnosticsProfile"] = p.DiagnosticsProfile 2300 } 2301 return json.Marshal(objectMap) 2302} 2303 2304// PurchasePlan used for establishing the purchase context of any 3rd Party artifact through MarketPlace. 2305type PurchasePlan struct { 2306 // Name - The plan ID. 2307 Name *string `json:"name,omitempty"` 2308 // Product - Specifies the product of the image from the marketplace. This is the same value as Offer under the imageReference element. 2309 Product *string `json:"product,omitempty"` 2310 // PromotionCode - The promotion code. 2311 PromotionCode *string `json:"promotionCode,omitempty"` 2312 // Publisher - The plan ID. 2313 Publisher *string `json:"publisher,omitempty"` 2314} 2315 2316// Resource the Resource model definition. 2317type Resource struct { 2318 // ID - READ-ONLY; Resource Id 2319 ID *string `json:"id,omitempty"` 2320 // Name - READ-ONLY; Resource name 2321 Name *string `json:"name,omitempty"` 2322 // Type - READ-ONLY; Resource type 2323 Type *string `json:"type,omitempty"` 2324 // Location - Resource location 2325 Location *string `json:"location,omitempty"` 2326 // Tags - Resource tags 2327 Tags map[string]*string `json:"tags"` 2328} 2329 2330// MarshalJSON is the custom marshaler for Resource. 2331func (r Resource) MarshalJSON() ([]byte, error) { 2332 objectMap := make(map[string]interface{}) 2333 if r.Location != nil { 2334 objectMap["location"] = r.Location 2335 } 2336 if r.Tags != nil { 2337 objectMap["tags"] = r.Tags 2338 } 2339 return json.Marshal(objectMap) 2340} 2341 2342// ServicePrincipalProfile information about a service principal identity for the cluster to use for 2343// manipulating Azure APIs. Either secret or keyVaultSecretRef must be specified. 2344type ServicePrincipalProfile struct { 2345 // ClientID - The ID for the service principal. 2346 ClientID *string `json:"clientId,omitempty"` 2347 // Secret - The secret password associated with the service principal in plain text. 2348 Secret *string `json:"secret,omitempty"` 2349 // KeyVaultSecretRef - Reference to a secret stored in Azure Key Vault. 2350 KeyVaultSecretRef *KeyVaultSecretRef `json:"keyVaultSecretRef,omitempty"` 2351} 2352 2353// SSHConfiguration SSH configuration for Linux-based VMs running on Azure. 2354type SSHConfiguration struct { 2355 // PublicKeys - The list of SSH public keys used to authenticate with Linux-based VMs. Only expect one key specified. 2356 PublicKeys *[]SSHPublicKey `json:"publicKeys,omitempty"` 2357} 2358 2359// SSHPublicKey contains information about SSH certificate public key data. 2360type SSHPublicKey struct { 2361 // KeyData - Certificate public key used to authenticate with VMs through SSH. The certificate must be in PEM format with or without headers. 2362 KeyData *string `json:"keyData,omitempty"` 2363} 2364 2365// TagsObject tags object for patch operations. 2366type TagsObject struct { 2367 // Tags - Resource tags. 2368 Tags map[string]*string `json:"tags"` 2369} 2370 2371// MarshalJSON is the custom marshaler for TagsObject. 2372func (toVar TagsObject) MarshalJSON() ([]byte, error) { 2373 objectMap := make(map[string]interface{}) 2374 if toVar.Tags != nil { 2375 objectMap["tags"] = toVar.Tags 2376 } 2377 return json.Marshal(objectMap) 2378} 2379 2380// VMDiagnostics profile for diagnostics on the container service VMs. 2381type VMDiagnostics struct { 2382 // Enabled - Whether the VM diagnostic agent is provisioned on the VM. 2383 Enabled *bool `json:"enabled,omitempty"` 2384 // StorageURI - READ-ONLY; The URI of the storage account where diagnostics are stored. 2385 StorageURI *string `json:"storageUri,omitempty"` 2386} 2387 2388// MarshalJSON is the custom marshaler for VMDiagnostics. 2389func (vd VMDiagnostics) MarshalJSON() ([]byte, error) { 2390 objectMap := make(map[string]interface{}) 2391 if vd.Enabled != nil { 2392 objectMap["enabled"] = vd.Enabled 2393 } 2394 return json.Marshal(objectMap) 2395} 2396 2397// WindowsProfile profile for Windows VMs in the container service cluster. 2398type WindowsProfile struct { 2399 // AdminUsername - The administrator username to use for Windows VMs. 2400 AdminUsername *string `json:"adminUsername,omitempty"` 2401 // AdminPassword - The administrator password to use for Windows VMs. 2402 AdminPassword *string `json:"adminPassword,omitempty"` 2403} 2404