/// <summary> /// Validate the object. /// </summary> /// <exception cref="ValidationException"> /// Thrown if validation fails /// </exception> public override void Validate() { base.Validate(); if (DnsName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "DnsName"); } if (AdminUserName == null) { throw new ValidationException(ValidationRules.CannotBeNull, "AdminUserName"); } if (LoadBalancingRules != null) { foreach (var element in LoadBalancingRules) { if (element != null) { element.Validate(); } } } if (NetworkSecurityRules != null) { foreach (var element1 in NetworkSecurityRules) { if (element1 != null) { element1.Validate(); } } } if (Clients != null) { foreach (var element2 in Clients) { if (element2 != null) { element2.Validate(); } } } if (FabricSettings != null) { foreach (var element3 in FabricSettings) { if (element3 != null) { element3.Validate(); } } } if (ApplicationTypeVersionsCleanupPolicy != null) { ApplicationTypeVersionsCleanupPolicy.Validate(); } if (Sku != null) { Sku.Validate(); } }
/// <summary> /// Initializes a new instance of the ManagedCluster class. /// </summary> /// <param name="location">Azure resource location.</param> /// <param name="dnsName">The cluster dns name.</param> /// <param name="adminUserName">VM admin user name.</param> /// <param name="id">Azure resource identifier.</param> /// <param name="name">Azure resource name.</param> /// <param name="type">Azure resource type.</param> /// <param name="tags">Azure resource tags.</param> /// <param name="etag">Azure resource etag.</param> /// <param name="fqdn">The fully qualified domain name associated with /// the public load balancer of the cluster.</param> /// <param name="ipv4Address">The IPv4 address associated with the /// public load balancer of the cluster.</param> /// <param name="clusterId">A service generated unique identifier for /// the cluster resource.</param> /// <param name="clusterState">The current state of the cluster. /// Possible values include: 'WaitingForNodes', 'Deploying', /// 'BaselineUpgrade', 'Upgrading', 'UpgradeFailed', 'Ready'</param> /// <param name="clusterCertificateThumbprints">List of thumbprints of /// the cluster certificates.</param> /// <param name="clientConnectionPort">The port used for client /// connections to the cluster.</param> /// <param name="httpGatewayConnectionPort">The port used for HTTP /// connections to the cluster.</param> /// <param name="adminPassword">VM admin user password.</param> /// <param name="loadBalancingRules">Load balancing rules that are /// applied to the public load balancer of the cluster.</param> /// <param name="allowRdpAccess">Setting this to true enables RDP /// access to the VM. The default NSG rule opens RDP port to internet /// which can be overridden with custom Network Security Rules. The /// default value for this setting is false.</param> /// <param name="networkSecurityRules">Custom Network Security Rules /// that are applied to the virtual network of the cluster.</param> /// <param name="clients">Client certificates that are allowed to /// manage the cluster.</param> /// <param name="azureActiveDirectory">The AAD authentication settings /// of the cluster.</param> /// <param name="fabricSettings">The list of custom fabric settings to /// configure the cluster.</param> /// <param name="provisioningState">The provisioning state of the /// managed cluster resource. Possible values include: 'None', /// 'Creating', 'Created', 'Updating', 'Succeeded', 'Failed', /// 'Canceled', 'Deleting', 'Deleted', 'Other'</param> /// <param name="clusterCodeVersion">The Service Fabric runtime version /// of the cluster. This property is required when /// **clusterUpgradeMode** is set to 'Manual'. To get list of available /// Service Fabric versions for new clusters use [ClusterVersion /// API](./ClusterVersion.md). To get the list of available version for /// existing clusters use **availableClusterVersions**.</param> /// <param name="clusterUpgradeMode">Possible values include: /// 'Automatic', 'Manual'</param> /// <param name="clusterUpgradeCadence">Indicates when new cluster /// runtime version upgrades will be applied after they are released. /// By default is Wave0. Only applies when **clusterUpgradeMode** is /// set to 'Automatic'. Possible values include: 'Wave0', 'Wave1', /// 'Wave2'</param> /// <param name="addonFeatures">List of add-on features to enable on /// the cluster.</param> /// <param name="enableAutoOSUpgrade">Setting this to true enables /// automatic OS upgrade for the node types that are created using any /// platform OS image with version 'latest'. The default value for this /// setting is false.</param> /// <param name="zonalResiliency">Indicates if the cluster has zone /// resiliency.</param> /// <param name="applicationTypeVersionsCleanupPolicy">The policy used /// to clean up unused versions.</param> /// <param name="sku">The sku of the managed cluster</param> public ManagedCluster(string location, string dnsName, string adminUserName, string id = default(string), string name = default(string), string type = default(string), IDictionary <string, string> tags = default(IDictionary <string, string>), string etag = default(string), SystemData systemData = default(SystemData), string fqdn = default(string), string ipv4Address = default(string), string clusterId = default(string), string clusterState = default(string), IList <string> clusterCertificateThumbprints = default(IList <string>), int?clientConnectionPort = default(int?), int?httpGatewayConnectionPort = default(int?), string adminPassword = default(string), IList <LoadBalancingRule> loadBalancingRules = default(IList <LoadBalancingRule>), bool?allowRdpAccess = default(bool?), IList <NetworkSecurityRule> networkSecurityRules = default(IList <NetworkSecurityRule>), IList <ClientCertificate> clients = default(IList <ClientCertificate>), AzureActiveDirectory azureActiveDirectory = default(AzureActiveDirectory), IList <SettingsSectionDescription> fabricSettings = default(IList <SettingsSectionDescription>), string provisioningState = default(string), string clusterCodeVersion = default(string), string clusterUpgradeMode = default(string), string clusterUpgradeCadence = default(string), IList <string> addonFeatures = default(IList <string>), bool?enableAutoOSUpgrade = default(bool?), bool?zonalResiliency = default(bool?), ApplicationTypeVersionsCleanupPolicy applicationTypeVersionsCleanupPolicy = default(ApplicationTypeVersionsCleanupPolicy), Sku sku = default(Sku)) : base(location, id, name, type, tags, etag, systemData) { DnsName = dnsName; Fqdn = fqdn; Ipv4Address = ipv4Address; ClusterId = clusterId; ClusterState = clusterState; ClusterCertificateThumbprints = clusterCertificateThumbprints; ClientConnectionPort = clientConnectionPort; HttpGatewayConnectionPort = httpGatewayConnectionPort; AdminUserName = adminUserName; AdminPassword = adminPassword; LoadBalancingRules = loadBalancingRules; AllowRdpAccess = allowRdpAccess; NetworkSecurityRules = networkSecurityRules; Clients = clients; AzureActiveDirectory = azureActiveDirectory; FabricSettings = fabricSettings; ProvisioningState = provisioningState; ClusterCodeVersion = clusterCodeVersion; ClusterUpgradeMode = clusterUpgradeMode; ClusterUpgradeCadence = clusterUpgradeCadence; AddonFeatures = addonFeatures; EnableAutoOSUpgrade = enableAutoOSUpgrade; ZonalResiliency = zonalResiliency; ApplicationTypeVersionsCleanupPolicy = applicationTypeVersionsCleanupPolicy; Sku = sku; CustomInit(); }