Exemplo n.º 1
0
 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
     }
 });
Exemplo n.º 2
0
 void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 {
     writer.WriteStartObject();
     writer.WritePropertyName("count");
     writer.WriteNumberValue(Count);
     writer.WritePropertyName("sku");
     writer.WriteStringValue(Sku.ToString());
     writer.WriteEndObject();
 }
Exemplo n.º 3
0
 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()
     }
 });
Exemplo n.º 4
0
        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());
        }