///GENMHASH:F792F6C8C594AA68FA7A0FCA92F55B55:C92566E1FEC54840C1B1CFEBC8066D9A public PublicIPSkuType Sku() { if (this.Inner.Sku == null || this.Inner.Sku.Name == null) { return(null); } return(PublicIPSkuType.Parse(this.Inner.Sku.Name)); }
///GENMHASH:9A443A611DC75C5B1989A92740A6632E:6164D897AE308F9AC8CE783A820AA66B public PublicIPAddressImpl WithSku(PublicIPSkuType skuType) { // Note: SKU is not updatable as of now, so this is available only during definition time. // Service return `SkuCannotBeChangedOnUpdate` upon attempt to change it. // Service default is PublicIPSkuType.BASIC // this.Inner.Sku = new PublicIPAddressSku { Name = skuType.ToString() }; return(this); }
protected override ICreatable <IPublicIPAddress> ToCreatableIntern(IAzure azure) { var withRegion = azure.PublicIPAddresses.Define(DeriveName("pip")); var withGroup = withRegion.WithRegion(this.Region); var withCreate = SetResourceGroupAndTags(withGroup); if (this.LeafDomainLabel != null) { withCreate.WithLeafDomainLabel(this.LeafDomainLabel); } if (this.EnableStaticIpAddress != null && this.EnableStaticIpAddress.Value) { withCreate.WithStaticIP(); } if (this.ReverseFqdn != null) { withCreate.WithReverseFqdn(this.ReverseFqdn); } if (this.IdleTimeoutInMinutes != null) { withCreate.WithIdleTimeoutInMinutes(this.IdleTimeoutInMinutes.Value); } if (this.Sku != null) { withCreate.WithSku(PublicIPSkuType.Parse(this.Sku)); } if (this.AvailabiltiyZones != null) { foreach (var zone in this.AvailabiltiyZones) { withCreate.WithAvailabilityZone(AvailabilityZoneId.Parse(zone)); } } SetTags(withCreate); return(withCreate); }
/// <summary> /// Specifies the SKU for the IP address. /// </summary> /// <param name="skuType">The SKU type.</param> /// <return>The next stage of the definition.</return> PublicIPAddress.Definition.IWithCreate PublicIPAddress.Definition.IWithSku.WithSku(PublicIPSkuType skuType) { return(this.WithSku(skuType) as PublicIPAddress.Definition.IWithCreate); }