public static ResourceConfig <PublicIPAddress> CreatePublicIPAddressConfig( this ResourceConfig <ResourceGroup> resourceGroup, string name, string edgeZone, string domainNameLabel, string allocationMethod, Sku sku, IList <string> zones) => Strategy.CreateResourceConfig( resourceGroup: resourceGroup, name: name, createModel: _ => new PublicIPAddress { PublicIPAllocationMethod = allocationMethod, DnsSettings = new PublicIPAddressDnsSettings { DomainNameLabel = domainNameLabel, }, Sku = new PublicIPAddressSku { Name = sku.ToString(), }, Zones = zones, ExtendedLocation = edgeZone == null ? null : new ExtendedLocation { Name = edgeZone } });
void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); writer.WritePropertyName("count"); writer.WriteNumberValue(Count); writer.WritePropertyName("sku"); writer.WriteStringValue(Sku.ToString()); writer.WriteEndObject(); }
public static ResourceConfig <LoadBalancer> CreateLoadBalancerConfig( this ResourceConfig <ResourceGroup> resourceGroup, string name, Sku sku) => Strategy.CreateResourceConfig( resourceGroup: resourceGroup, name: name, createModel: engine => new LoadBalancer { Sku = new LoadBalancerSku { Name = sku.ToString() } });
private void NewProfile() { var cdnProfile = CdnManagementClient.Profiles.Create( ResourceGroupName, ProfileName, new Management.Cdn.Models.Profile( Location, new SdkSku(Sku.ToString()), id: null, name: null, type: null, tags: Tag.ToDictionaryTags()) ); WriteObject(cdnProfile.ToPsProfile()); }