שתף באמצעות


az scenario

Note

This reference is part of the scenario-guide extension for the Azure CLI (version 2.20.0 or higher). The extension will automatically install the first time you run an az scenario command. Learn more about extensions.

E2E Scenario Usage Guidance.

Commands

Name Description Type Status
az scenario guide

Fuzzy search E2E scenario examples and execute them with walk-through.

Extension GA

az scenario guide

Fuzzy search E2E scenario examples and execute them with walk-through.

This an intelligent guidance tool that can help you find and execute E2E scenario samples! It supports fuzzy search and sort the searched results according to the matching degree from high to low. It supports flexible search scenarios, you can specify the search scope and customize the matching rules. Moreover, it helps you execute these E2E scenarios more efficiently with a friendly walk-through process.

There are some custom configurations:

[1] az config set scenario_guide.execute_in_prompt=True/False Turn on/off the step of executing scenario commands in interactive mode. Turn on by default.

[2] az config set scenario_guide.output=json/jsonc/none/table/tsv/yaml/yamlc/status Set default output format. Status is the default.

[3] az config set scenario_guide.show_arguments=True/False Show/hide the arguments of scenario commands. False is the default.

[4] az config set scenario_guide.print_help=True/False Enable/disable whether to print help actively before executing each command. False is the default.

az scenario guide [--match-rule {all, and, or}]
                  [--scope {all, command, scenario}]
                  [--top]
                  [<SEARCH_KEYWORD>]

Examples

Search and execute scenario examples of how to connect the App Service to SQL Database.

az scenario guide "app service database"

Search and execute scenario examples whose title or description related to app service or web app.

az scenario guide "web app service" --scope "scenario" --match-rule "or"

Search and execute top 3 scenario examples whose commands contain keywords "network","vnet" and "subnet" at the same time.

az scenario guide "network vnet subnet" --scope "command" --match-rule "and" --top 3

Optional Parameters

--match-rule

The matching rules for multi-keywords: "and" is to search scenarios that match all keywords, "or" is to search scenarios that match any keyword, "all" is to search scenarios that match all keywords first, if the number is not enough then search any keyword.

Accepted values: all, and, or
Default value: all
--scope

The scope of search: "scenario" is to search whether the title and description in E2E scenario data contain keywords, "command" is to search whether the commands in E2E scenario data contain keywords, "all" is to search all contents.

Accepted values: all, command, scenario
Default value: all
--top

Specify the number of results to return. The maximum value is limited to 20.

Default value: 5
<SEARCH_KEYWORD>

Keywords for search. If there are multiple keywords, please separate them with spaces. Fuzzy search is supported, and the returned results are sorted by keyword matching degree.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.