How do i find some examples of running azure cli commands?



  • Using the az find you can obtain some usage examples.

    $ az find network
    Finding examples...
    
    Here are the most common ways to use [network]:
    
    Create a virtual network. (autogenerated)
    az network vnet create --address-prefixes 40.1.0.0/24 --name MyVnet --resource-group MyResourceGroup --subnet-name MySubnet --subnet-prefixes {subnet-prefixes}
    
    Create a public IP address. (autogenerated)
    az network public-ip create --allocation-method Static --name MyIp --resource-group MyResourceGroup
    
    Create a network interface. (autogenerated)
    az network nic create --name MyNic --network-security-group MyNsg --public-ip-address MyAppGatewayPublicIp --resource-group MyResourceGroup --subnet MySubnet --vnet-name MyVnet
    

    For a more specific sub-level command, use something like this: Here getting example usage for load balancer's.

    $ az find "az network lb"
    Finding examples...
    
    Here are the most common ways to use [az network lb]:
    
    List load balancers.
    az network lb list -g MyResourceGroup
    
    Delete a load balancer.
    az network lb delete -g MyResourceGroup -n MyLb
    
    Create a probe. (autogenerated)
    az network lb probe create --lb-name MyLb --name MyProbe --port 443 --protocol Http --resource-group MyResourceGroup
    

Log in to reply
 

© Lightnetics 2024