public ContainerServiceImpl WithMasterNodeCount(ContainerServiceMasterProfileCount profileCount) { ContainerServiceMasterProfile masterProfile = new ContainerServiceMasterProfile(); masterProfile.Count = (int)profileCount; this.Inner.MasterProfile = masterProfile; return(this); }
///GENMHASH:FFA14E460A59533D2C337F3013267D59:EEA5825A22C4A5187DB93596817AA09E public ContainerServiceImpl WithMasterNodeCount(ContainerServiceMasterProfileCount profileCount) { ContainerServiceMasterProfile masterProfile = new ContainerServiceMasterProfile() { VmSize = ContainerServiceVMSizeTypes.StandardD2V2, Count = (int)profileCount }; this.Inner.MasterProfile = masterProfile; return(this); }
private void Run() { // OrchestratorProfile ContainerServiceOrchestratorProfile vOrchestratorProfile = null; // CustomProfile ContainerServiceCustomProfile vCustomProfile = null; // ServicePrincipalProfile ContainerServiceServicePrincipalProfile vServicePrincipalProfile = null; // MasterProfile ContainerServiceMasterProfile vMasterProfile = null; // WindowsProfile ContainerServiceWindowsProfile vWindowsProfile = null; // LinuxProfile ContainerServiceLinuxProfile vLinuxProfile = null; // DiagnosticsProfile ContainerServiceDiagnosticsProfile vDiagnosticsProfile = null; if (this.IsParameterBound(c => c.OrchestratorType)) { if (vOrchestratorProfile == null) { vOrchestratorProfile = new ContainerServiceOrchestratorProfile(); } vOrchestratorProfile.OrchestratorType = this.OrchestratorType.Value; } if (this.IsParameterBound(c => c.CustomProfileOrchestrator)) { if (vCustomProfile == null) { vCustomProfile = new ContainerServiceCustomProfile(); } vCustomProfile.Orchestrator = this.CustomProfileOrchestrator; } if (this.IsParameterBound(c => c.ServicePrincipalProfileClientId)) { if (vServicePrincipalProfile == null) { vServicePrincipalProfile = new ContainerServiceServicePrincipalProfile(); } vServicePrincipalProfile.ClientId = this.ServicePrincipalProfileClientId; } if (this.IsParameterBound(c => c.ServicePrincipalProfileSecret)) { if (vServicePrincipalProfile == null) { vServicePrincipalProfile = new ContainerServiceServicePrincipalProfile(); } vServicePrincipalProfile.Secret = this.ServicePrincipalProfileSecret; } if (this.IsParameterBound(c => c.MasterCount)) { if (vMasterProfile == null) { vMasterProfile = new ContainerServiceMasterProfile(); } vMasterProfile.Count = this.MasterCount; } if (this.IsParameterBound(c => c.MasterDnsPrefix)) { if (vMasterProfile == null) { vMasterProfile = new ContainerServiceMasterProfile(); } vMasterProfile.DnsPrefix = this.MasterDnsPrefix; } if (this.IsParameterBound(c => c.WindowsProfileAdminUsername)) { if (vWindowsProfile == null) { vWindowsProfile = new ContainerServiceWindowsProfile(); } vWindowsProfile.AdminUsername = this.WindowsProfileAdminUsername; } if (this.IsParameterBound(c => c.WindowsProfileAdminPassword)) { if (vWindowsProfile == null) { vWindowsProfile = new ContainerServiceWindowsProfile(); } vWindowsProfile.AdminPassword = this.WindowsProfileAdminPassword; } if (this.IsParameterBound(c => c.AdminUsername)) { if (vLinuxProfile == null) { vLinuxProfile = new ContainerServiceLinuxProfile(); } vLinuxProfile.AdminUsername = this.AdminUsername; } if (this.IsParameterBound(c => c.SshPublicKey)) { if (vLinuxProfile == null) { vLinuxProfile = new ContainerServiceLinuxProfile(); } if (vLinuxProfile.Ssh == null) { vLinuxProfile.Ssh = new ContainerServiceSshConfiguration(); } if (vLinuxProfile.Ssh.PublicKeys == null) { vLinuxProfile.Ssh.PublicKeys = new List <ContainerServiceSshPublicKey>(); } foreach (var element in this.SshPublicKey) { var vPublicKeys = new ContainerServiceSshPublicKey(); vPublicKeys.KeyData = element; vLinuxProfile.Ssh.PublicKeys.Add(vPublicKeys); } } if (vDiagnosticsProfile == null) { vDiagnosticsProfile = new ContainerServiceDiagnosticsProfile(); } if (vDiagnosticsProfile.VmDiagnostics == null) { vDiagnosticsProfile.VmDiagnostics = new ContainerServiceVMDiagnostics(); } vDiagnosticsProfile.VmDiagnostics.Enabled = this.VmDiagnosticsEnabled; var vContainerService = new PSContainerService { Location = this.IsParameterBound(c => c.Location) ? this.Location : null, Tags = this.IsParameterBound(c => c.Tag) ? this.Tag.Cast <DictionaryEntry>().ToDictionary(ht => (string)ht.Key, ht => (string)ht.Value) : null, AgentPoolProfiles = this.IsParameterBound(c => c.AgentPoolProfile) ? this.AgentPoolProfile : null, OrchestratorProfile = vOrchestratorProfile, CustomProfile = vCustomProfile, ServicePrincipalProfile = vServicePrincipalProfile, MasterProfile = vMasterProfile, WindowsProfile = vWindowsProfile, LinuxProfile = vLinuxProfile, DiagnosticsProfile = vDiagnosticsProfile, }; WriteObject(vContainerService); }