zoukankan      html  css  js  c++  java
  • 【Azure】Azure 命令行接口 (CLI)

    Azure CLI

    Auth

    • azure login
    az login                                        # open brewser to login
    az login -u <username> -p <password>            # usename and password login
    az login --tenant <tenant>                      # use different tenant login
    
    • switch tenant
    az account list --output table                  # list accounts as table
    az account set --subscription "Wilson"          # switch others subscriptions    
    

    VM

    • vm list

    List details of Virtual Machines

    az vm list --output table                       # list virtual machines as table 
    az vm list --output table -d                    # list virtual machines details as table
    az vm list -g ResourceGroup --output table      # list virtual machines of ResourceGroup as table
    
    • vm create

    Create an Azure Virtual Machine

    az vm create -n vm_name -g resource_group --image UbuntuLTS                 # Create a default Ubuntu VM
    az vm create -n vm_name -g resource_group --image my_image                  # Create a VM from a custom managed image
    az vm create -n vm_name -g resource_group --image centos --count 3          # Create multiple VMs(vm_name1, vm_name2, vm_name3)
    
    • az vm restart

    Restart a VM.

    az vm restart -n vm_name -g resource_group                                  # Restart a VM
    az vm restart --ids $(az vm list -g resource_group --query "[].id" -o tsv)  # Restart all VMs in a resource group
    
    • az vm update

    Update the properties of a VM.

    az vm update -n vm_name -g resource_group --set tags.tagName=tag_name       # Add or update a tag
    az vm update -n vm_name -g resource_group --remove tags.tagName             # Remove a tag
    
    • az vm resize

    Update a VM's size.

    az vm resize -n vm_name -g resource_group --size Standard_DS3_v2            # Resize a VM
    az vm resize --size Standard_DS3_v2 --ids $(az vm list -g resource_group --query "[].id" -o tsv)    # Resize all VMs in a resource group
    
    • az vm start

    Start a stopped VM

    az vm start -n vm_name -g resource_group                                    # Start a stopped VM.
    az vm start --ids $(az vm list -g resource_group --query "[].id" -o tsv)    # Start all VMs in a resource group
    
    • az vm stop

    Power off (stop) a running VM.

    az vm stop -n vm_name -g resource_group                                     # Power off (stop) a running VM
    az vm stop -n vm_name -g resource_group --skip-shutdown                     # Power off a running VM without shutting down.
    az vm stop --ids $(az vm list -g resource_group --query "[].id" -o tsv)     # Power off VMs in a resource group
    
    • az vm delete

    Delete a VM.

    az vm delete -n vm_name -g resource_group --yes                             # Delete a VM without a prompt for confirmation
    az vm delete --ids $(az vm list -g resource_group --query "[].id" -o tsv)   # Delete all VMs in a resource group
    

    az webapp

    • az webapp browse

    Open a web app in a browser.

    az webapp browse -n app_name -g resource_group                               # Open a web app in a browser
    
    • az webapp create

    Create a web app.

    az webapp create -n app_name -g resource_group -p plan                                              # Create a web app with the default configuration.
    az webapp create -n app_name -g resource_group -p plan --runtime "java|11|Java SE|8"                # Create a web app with a java|11|Java SE|8 runtime using '|' delimiter
    az webapp create -n app_name -g resource_group -p plan -i image_name -s username -w password        # Create a web app with an image from a private DockerHub registry.
    az webapp create -n app_name -g resource_group -p plan -i myregistry.azurecr.io/docker-image:tag    # Create a web app with an image from a private Azure Container Registry.
    
    • az webapp list

    List web apps.

    az webapp list --query "[?state=='Running']"                                                        # List all running web apps.
    az webapp list --query "[].{hostName: defaultHostName, state: state}"                               # List default host name and state for all web apps.
    
    • az webapp show

    Get the details of a web app.

    az webapp show -n app_name -g resource_group                                                        # Get the details of a web app. (autogenerated)
    az webapp show -n app_name -g resource_group --output table                                         # List the details of table format
    
    • az webapp ssh

    SSH into a web app. (Only Linux App Service Plans supported)

    az webapp ssh -n app_name -g resource_group                                                         # ssh into a web app
    
    • az webapp start

    Start a web app.

    az webapp start -n app_name -g resource_group                                                       # Start a web app. (autogenerated)
    
    • az webapp stop

    Stop a web app.

    az webapp stop -n app_name -g resource_group                                                        # Stop a web app. (autogenerated)
    
    • az webapp update

    Update a web app.

    az webapp update -n app_name -g resource_group --set tags.tagName=tagValue                          # Update the tags of a web app.
    az webapp update --https-only true -n app_name -g resource_group                                    # Update a web app. (autogenerated)
    
    • az webapp delete

    Delete a web app.

    az webapp delete -n app_name -g resource_group                                                      # Delete a web app. (autogenerated)
    

    引用

    GitHub

  • 相关阅读:
    1)①爬取中国新闻网科技相关部分新闻
    摘记
    KNN算法[分类算法]
    Naive Bayes(朴素贝叶斯算法)[分类算法]
    Oracle 隔离级别
    解决问题没必要过于纠结于原理
    Oracle DBMS_METADATA.GET_DDL
    【听海日志】之ORACLE物化视图 [转]http://www.itpub.net/thread-1614812-1-1.html
    oracle 12c 基础
    Postgres查看数据库中的表及表中字段和类型
  • 原文地址:https://www.cnblogs.com/WilsonPan/p/14684524.html
Copyright © 2011-2022 走看看