Complete the code to specify the type of Azure Load Balancer that operates at Layer 4.
load_balancer = azure.network.LoadBalancer(location="eastus", sku=azure.network.LoadBalancerSku(name="[1]"))
The Azure Load Balancer SKU 'Standard' is used for Layer 4 load balancing, which works at the transport layer.
Complete the code to define the frontend IP configuration for the Azure Load Balancer.
frontend_ip_config = azure.network.FrontendIPConfiguration(name="LoadBalancerFrontEnd", subnet=azure.network.Subnet(id="[1]"))
The frontend IP configuration requires a subnet resource ID to associate the load balancer with a virtual network subnet.
Fix the error in the backend pool definition by selecting the correct resource type for backend IP addresses.
backend_address_pool = azure.network.BackendAddressPool(name="BackendPool", backend_addresses=[[1]])
The backend address pool expects network interface IP configurations, not VMs or public IPs directly.
Fill both blanks to configure a health probe and load balancing rule for the Azure Load Balancer.
health_probe = azure.network.Probe(protocol="[1]", port=80, interval_in_seconds=15, number_of_probes=2) load_balancing_rule = azure.network.LoadBalancingRule(protocol="[2]", frontend_port=80, backend_port=80, probe=health_probe)
Azure Load Balancer Layer 4 uses TCP protocol for health probes and load balancing rules.
Fill all three blanks to create a dictionary comprehension that maps backend pool names to their respective IP configurations filtered by a specific port.
backend_ip_map = {pool.name: [ip_config[1] for ip_config in pool.ip_configurations if ip_config.port [2] [3]] for pool in backend_pools}The comprehension extracts private IP addresses from IP configurations where the port equals 80.