From 72111ad3ea8bac72009745633f1206945ee28325 Mon Sep 17 00:00:00 2001 From: adewaleo Date: Wed, 23 Jan 2019 10:29:03 -0800 Subject: [PATCH 01/16] Help Overhaul project V1. (#8288) * Dummy help.yaml file * Parse command for testing yaml parsing Parser can output contents as yaml updated help.yaml test file with some comments. * Added logic to parse help.yaml file and update help data objects. More helpfile updates. * _help.py now raises error if it fails to parse help.yaml or help.yaml is empty * updated _help.py: CLI now prints extension messages. Removed parser module. * _help.py: Addressed pep8 warnings. Made some methods static * changed dir to dir_name as dir is a builtin function. * script to convert _help.py to help/yaml. Parses short and long summaries. Fields within commands/groups need to have some non-alphabetic ordering * Help conversion script uses ruamel.yaml. Output is ordered and visually appealing. '>' and '|' (part of yaml syntax) are preserved in values. * Conversion script now converts parameters to arguments (bug fix). Outputs arguments before examples * Added some comments. Link urls have title field instad of name field. Command and Group information formatted differently. Addressed a few other PR comments. * Fixed bug in _params_equal() * checked out devs _help.py file. * Refactoring code. Todo: update print_header to print links. Fix bug where some command group names / parameter names are not updated from code. * Removed unnecessary file. * Addressed style feedback. * Changes: create temp directory to hold temporary files and scripts. Updated value-source to value-sources. get_all_help uses CliGroupHelpfile instead of knack's CliGroupHelpfile * uncommented help import * Added tests to help script. * PEP8 style changes. * Sphinx properly handles help groups. * Refactored _help.py and _help_util.py to _help_loaders.py * Removed _help_util.py * Bug fixes * More refactoring, script tests pass * Changes to restore _help.py to same state before rebase. * Updated AzCliHelp to print links associated with commands and groups. * Moved CLIHelp class\'s print method to mixin class. Removed raw value sources field. Added logic to properly update parameter info from data. Updated temp help yaml file example. * WIP: update loader logic/architecture, class structure. * Finish refactoring loader code and help.py Added todo reminder. * updated _load_help_parameters. removed unused get_example_from_data method. * Fixed bugs and made updates in help convert script, loader and print methods. * Begin loader testing. * More testing work. * Added tests for loading from help.py * Added tests for yaml loader. Fixed bug in example printing. Yaml loader loads files that endwith help.yaml/yml. * Help.py and help.yaml tests are passing. Fixed bug with displaying group help. * All help tests pass. Including test of new help loader. * BaseHelpLoader now inherits from ABC. Loaders now check if data version matches their version. * Updated doc generator script. Updated yaml converter test. * Fix bug in doc gen script. * Optimize help conversion script. Added logic to convert all core modules. * Removed unnecessary check. * Script updates. Yaml, no longer wraps around. Handles duplicate keys. Handles incorect module names. * Can delete files, bug in loading multiple modules due to duplicate keys in repo. See acs create. * Added script to convert all help.py files in core. Removed help.yaml. Handles duplicate help entries. i.e acs create properly. Conversion test strict. Relevant help obj fields must be the same. TODO: extensions logic. * Moved scripts to /scripts, added stubs for converting extensions. Style checks. Removed unnecessary import_module statement. * Added license header to convert_all.py --- doc/sphinx/azhelpgen/azhelpgen.py | 18 +- scripts/ci/precheck_header.sh | 1 + scripts/temp_help/convert_all.py | 28 ++ scripts/temp_help/help_convert.py | 393 ++++++++++++++++ src/azure-cli-core/azure/cli/core/_help.py | 227 +++++++++- .../azure/cli/core/_help_loaders.py | 206 +++++++++ .../azure/cli/core/file_util.py | 5 +- .../azure/cli/core/tests/test_help.py | 421 +++++++++++++++++- .../azure/cli/core/tests/test_help_loaders.py | 119 +++++ 9 files changed, 1373 insertions(+), 45 deletions(-) create mode 100644 scripts/temp_help/convert_all.py create mode 100644 scripts/temp_help/help_convert.py create mode 100644 src/azure-cli-core/azure/cli/core/_help_loaders.py create mode 100644 src/azure-cli-core/azure/cli/core/tests/test_help_loaders.py diff --git a/doc/sphinx/azhelpgen/azhelpgen.py b/doc/sphinx/azhelpgen/azhelpgen.py index 6893f0174d3..4fd4becb399 100644 --- a/doc/sphinx/azhelpgen/azhelpgen.py +++ b/doc/sphinx/azhelpgen/azhelpgen.py @@ -9,10 +9,10 @@ from os.path import expanduser from docutils import nodes from docutils.statemachine import ViewList +# TODO: Directive not in latest release of sphinx, need to pip install sphinx==1.6.7 will need to update code to support latest version of sphinx. from sphinx.util.compat import Directive from sphinx.util.nodes import nested_parse_with_titles -from knack.help_files import helps from azure.cli.core import MainCommandsLoader, AzCli from azure.cli.core.commands import AzCliCommandInvoker @@ -89,14 +89,14 @@ def make_rst(self): pass yield '{}:default: {}'.format(DOUBLEINDENT, arg.default) if arg.value_sources: - yield '{}:source: {}'.format(DOUBLEINDENT, ', '.join(arg.value_sources)) + yield '{}:source: {}'.format(DOUBLEINDENT, ', '.join(_get_populator_commands(arg))) yield '' yield '' if len(help_file.examples) > 0: for e in help_file.examples: - yield '{}.. cliexample:: {}'.format(INDENT, e.name) + yield '{}.. cliexample:: {}'.format(INDENT, e.short_summary) yield '' - yield DOUBLEINDENT + e.text.replace("\\", "\\\\") + yield DOUBLEINDENT + e.command.replace("\\", "\\\\") yield '' def run(self): @@ -133,3 +133,13 @@ def _is_group(parser): def _get_parser_name(s): return (s._prog_prefix if hasattr(s, '_prog_prefix') else s.prog)[3:] + + +def _get_populator_commands(param): + commands = [] + for value_source in param.value_sources: + try: + commands.append(value_source["link"]["command"]) + except KeyError: + continue + return commands diff --git a/scripts/ci/precheck_header.sh b/scripts/ci/precheck_header.sh index e83242ae0f1..999d7a2e67d 100755 --- a/scripts/ci/precheck_header.sh +++ b/scripts/ci/precheck_header.sh @@ -23,3 +23,4 @@ python -m automation.tests.verify_readme_history # python -m automation.tests.verify_package_versions --base-repo $latestCliReleaseDir --base-tag $latestCliReleaseTag # fi + diff --git a/scripts/temp_help/convert_all.py b/scripts/temp_help/convert_all.py new file mode 100644 index 00000000000..4e7e0e589f2 --- /dev/null +++ b/scripts/temp_help/convert_all.py @@ -0,0 +1,28 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +import sys +import os +import subprocess + +if __name__ == "__main__": + args = sys.argv[1:] + + if args[0].lower() == "--core": + subprocess.run(["python", "./help_convert.py", "--get-all-mods"]) + + module_names = [] + with open("mod.txt", "r") as f: + for line in f: + module_names.append(f.readline()) + os.remove("mod.txt") + with open(os.devnull, 'w') as devnull: # silence stdout by redirecting to devnull + for mod in module_names: + args = ["python", "./help_convert.py", mod, "--test"] + subprocess.run(args, stdout=devnull) + + + elif args[0].lower() == "--extensions": + pass diff --git a/scripts/temp_help/help_convert.py b/scripts/temp_help/help_convert.py new file mode 100644 index 00000000000..9fe895090e4 --- /dev/null +++ b/scripts/temp_help/help_convert.py @@ -0,0 +1,393 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +import sys +from importlib import import_module +import os + +from logging import getLogger + +logger = getLogger(__name__) + +from knack.util import CLIError +from knack.help_files import helps +from azure.cli.core.mock import DummyCli +from azure.cli.core.util import get_installed_cli_distributions +from azure.cli.core._help import CliCommandHelpFile, CliGroupHelpFile +from azure.cli.core.file_util import _store_parsers, _is_group + +try: + from ruamel.yaml import YAML + yaml = YAML() + yaml.width = 1000 # prevents wrapping around in dumper. + yaml.allow_duplicate_keys = True # TODO: allow duplicate keys within help entries. see az container create. Remove this. +except ImportError as e: + msg = "{}\npip install ruamel.Yaml to use this script.".format(e) + exit(msg) + +PACKAGE_PREFIX = "azure.cli.command_modules" +CLI_PACKAGE_NAME = 'azure-cli' +COMPONENT_PREFIX = 'azure-cli-' + +failed = 0 + +loaded_helps = {} + +def get_all_help(cli_ctx): + invoker = cli_ctx.invocation + help_ctx = cli_ctx.help_cls(cli_ctx) + if not invoker: + raise CLIError('CLI context does not contain invocation.') + + parser_keys = [] + parser_values = [] + sub_parser_keys = [] + sub_parser_values = [] + _store_parsers(invoker.parser, parser_keys, parser_values, sub_parser_keys, sub_parser_values) + for cmd, parser in zip(parser_keys, parser_values): + if cmd not in sub_parser_keys: + sub_parser_keys.append(cmd) + sub_parser_values.append(parser) + help_files = [] + for cmd, parser in zip(sub_parser_keys, sub_parser_values): + if cmd in loaded_helps: + try: + help_file = CliGroupHelpFile(help_ctx, cmd, parser) if _is_group(parser) \ + else CliCommandHelpFile(help_ctx, cmd, parser) + help_file.load(parser) + help_files.append(help_file) + except Exception as ex: # pylint: disable=broad-except + print("Skipped '{}' due to '{}'".format(cmd, ex)) + help_files = sorted(help_files, key=lambda x: x.command) + assert {help_file.command for help_file in help_files} == set(loaded_helps.keys()) + print("Loaded {} help files".format(len(help_files))) + return help_files + + +def create_invoker_and_load_cmds_and_args(cli_ctx): + global loaded_helps + from knack import events + from azure.cli.core.commands.arm import register_global_subscription_argument, register_ids_argument + + invoker = cli_ctx.invocation_cls(cli_ctx=cli_ctx, commands_loader_cls=cli_ctx.commands_loader_cls, + parser_cls=cli_ctx.parser_cls, help_cls=cli_ctx.help_cls) + cli_ctx.invocation = invoker + invoker.commands_loader.skip_applicability = True + temp_help = helps.copy() + invoker.commands_loader.load_command_table(None) # this ends up loading all the helpfiles, which could be problematic with duplicate key commands like acs create + helps.clear() + helps.update(temp_help) + + # turn off applicability check for applicable loaders + new_cmd_to_loader_map = {} + new_command_group_table = {} + new_command_table = {} + for cmd in loaded_helps.keys(): + if cmd in invoker.commands_loader.cmd_to_loader_map: # if a command from help, then update commands_loader + new_cmd_to_loader_map[cmd] = invoker.commands_loader.cmd_to_loader_map[cmd] + new_command_table[cmd] = invoker.commands_loader.command_table[cmd] + else: # else a group then update + new_command_group_table[cmd] = invoker.commands_loader.command_group_table[cmd] + + # include commands of groups in help.py, even though the commands themselves might not be in help.py, so their subparsers can be added. + for cmd in new_command_group_table.keys(): + all_cmds = invoker.commands_loader.cmd_to_loader_map.keys() + for old_cmd in all_cmds: + if old_cmd.startswith(cmd) and old_cmd != cmd: + new_cmd_to_loader_map[old_cmd] = invoker.commands_loader.cmd_to_loader_map[old_cmd] + new_command_table[old_cmd] = invoker.commands_loader.command_table[old_cmd] + + invoker.commands_loader.cmd_to_loader_map = new_cmd_to_loader_map + invoker.commands_loader.command_table = new_command_table + invoker.commands_loader.command_group_table = new_command_group_table + + for loaders in invoker.commands_loader.cmd_to_loader_map.values(): + for loader in loaders: + loader.skip_applicability = True + + for command in invoker.commands_loader.command_table: + invoker.commands_loader.load_arguments(command) + + assert len(new_command_table) == len(new_cmd_to_loader_map) + assert set(list(new_command_table.keys()) + list(new_command_group_table.keys())) >= set(loaded_helps.keys()) + + register_global_subscription_argument(cli_ctx) + register_ids_argument(cli_ctx) # global subscription must be registered first! + cli_ctx.raise_event(events.EVENT_INVOKER_POST_CMD_TBL_CREATE, commands_loader=invoker.commands_loader) + invoker.parser.load_command_table(invoker.commands_loader) + +# this must be called before loading any command modules. Otherwise helps object will have every help.py file's contents +def convert(target_mod_or_file, mod_name, test=False): + global loaded_helps + + if os.path.exists(target_mod_or_file): + out_file = target_mod_or_file + target_mod = import_module("{}.{}._help".format(PACKAGE_PREFIX, mod_name)) + + else: # else not a file, but a mod. + try: + target_mod = import_module(target_mod_or_file) + except ModuleNotFoundError as e: # azure.cli.command_modules.core + logger.warning(e) + return None, None + loader_file_path = os.path.abspath(target_mod.__file__) + out_file = os.path.join(os.path.dirname(loader_file_path), "help.yaml") + + if test and os.path.exists(out_file): + print("{}/help.yaml already exists. Will remove and rewrite: {}\n".format(mod_name, out_file)) + os.remove(out_file) + + # the modules keys are keys added to helps object from fresh import.... + help_dict = target_mod.helps + result = _get_new_yaml_dict(help_dict) + + # clear modules help from knack.helps, store help.py info + for key, value in help_dict.items(): + loaded_helps[key] = value + + return out_file, result + +def delete(target_mods): + for mod_name in target_mods: + try: + target_mod = import_module(mod_name) + except ModuleNotFoundError as e: # azure.cli.command_modules.core + print(e) + print("SKIPPING...") + continue + loader_file_path = os.path.abspath(target_mod.__file__) + yaml_file = os.path.join(os.path.dirname(loader_file_path), "help.yaml") + if os.path.exists(yaml_file): + print("Removing {}".format(yaml_file)) + os.remove(yaml_file) + +def get_all_mod_names(): + installed_dists = get_installed_cli_distributions() + mod_name_list = list(sorted(dist.key.replace(COMPONENT_PREFIX, '') for dist in installed_dists if dist.key.startswith(COMPONENT_PREFIX))) + return mod_name_list + + +def _get_new_yaml_dict(help_dict): + + result = dict(version=1, content=[]) + content = result['content'] + + for command_or_group, yaml_text in help_dict.items(): + help_dict = yaml.load(yaml_text) + + type = help_dict["type"] + + elem = {type: dict(name=command_or_group)} + elem_content = elem[type] + + _convert_summaries(old_dict=help_dict, new_dict=elem_content) + + if "parameters" in help_dict: + parameters = [] + for param in help_dict["parameters"]: + new_param = dict() + if "name" in param: + options = param["name"].split() + new_param["name"] = max(options, key=lambda x: len(x)) + _convert_summaries(old_dict=param, new_dict=new_param) + + if "populator-commands" in param: + new_param["value-sources"] = [] + for item in param["populator-commands"]: + new_param["value-sources"].append({"link": {"command" : item}}) + parameters.append(new_param) + elem_content["arguments"] = parameters + + if "examples" in help_dict: + elem_examples = [] + for ex in help_dict["examples"]: + new_ex = dict() + if "name" in ex: + new_ex["summary"] = ex["name"] + if "text" in ex: + new_ex["command"] = ex["text"] + if "min_profile" in ex: + new_ex["min_profile"] = ex["min_profile"] + if "max_profile" in ex: + new_ex["max_profile"] = ex["max_profile"] + elem_examples.append(new_ex) + elem_content["examples"] = elem_examples + + content.append(elem) + + return result + + +def _convert_summaries(old_dict, new_dict): + if "short-summary" in old_dict: + new_dict["summary"] = old_dict["short-summary"] + if "long-summary" in old_dict: + new_dict["description"] = old_dict["long-summary"] + +def assert_help_objs_equal(old_help, new_help): + assert_true_or_warn(old_help.name, new_help.name) + assert_true_or_warn(old_help.type, new_help.type) + assert_true_or_warn(old_help.short_summary, new_help.short_summary) + assert_true_or_warn(old_help.long_summary, new_help.long_summary) + assert_true_or_warn(old_help.command, new_help.command) + + old_examples = sorted(old_help.examples, key=lambda x: x.short_summary) + new_examples = sorted(new_help.examples, key=lambda x: x.short_summary) + assert_true_or_warn(len(old_examples), len(new_examples)) + # note: this cannot test if min / max version were added as these fields weren't stored in helpfile objects previously. + for old_ex, new_ex in zip(old_examples, new_examples): + assert_true_or_warn (old_ex.short_summary, new_ex.short_summary) + assert_true_or_warn (old_ex.command, new_ex.command) + assert_true_or_warn (old_ex.long_summary, new_ex.long_summary) + + # group and not command, we are done checking. + if old_help.type == "group": + return + + old_parameters = sorted(old_help.parameters, key=lambda x: x.name_source) + new_parameters = sorted(new_help.parameters, key=lambda x: x.name_source) + assert_true_or_warn(len(old_parameters), len(new_parameters)) + assert_params_equal(old_parameters, new_parameters) + + +def assert_params_equal(old_parameters, new_parameters): + for old, new in zip(old_parameters, new_parameters): + assert_true_or_warn(old.short_summary, new.short_summary) + assert_true_or_warn(old.long_summary, new.long_summary) + assert_true_or_warn(old.value_sources, new.value_sources) + + +def assert_true_or_warn(x, y): + try: + assert x == y + + except AssertionError: + # if is list try to find exactly where there is failure + if isinstance(x, list) and len(x) == len(y): + for x_1, y_1 in zip(x, y): + assert_true_or_warn(x_1, y_1) + else: + msg = "\nvalues:\n\n{}\n\nand\n\n{}\n\nare not equal.\n".format(x, y) + + global failed + failed+=1 + if failed: + msg = "{}{}".format(msg, "-------------------\nAssertion Failed!!!\nExiting test.\n-------------------\n") + exit(msg) + + +if __name__ == "__main__": + if sys.version_info[0] < 3: + raise Exception("This script requires Python 3") + + args = [arg.strip() for arg in sys.argv[1:]] + test = False + + msg = 'Usage: python help_convert.py (MOD | --test | --delete | --all | MOD --test | path/help.py --package {myext.package})\n' + + if "--help" in args or "-h" in args: + print(msg) + exit(0) + + if len(args) > 3 or len(args) == 0: + exit(msg) + + if len(args) == 2: + if args[1].lower() != "--test": + exit(msg) + else: + test = True + if len(args) == 3: + if not args[0].lower().endswith("_help.py") or args[1].lower() != "--package": + exit(msg) + else: + raise NotImplementedError + + target_mods = None + # if args[0].lower() in ["--test", "--all"]: + # # convert all modules and test + # mod_names = get_all_mod_names() + # target_mods = ["{}.{}._help".format(PACKAGE_PREFIX, mod) for mod in mod_names] + # if args[0].lower() == "--test": + # test = True + if args[0].lower() == "--delete": + mod_names = get_all_mod_names() + target_mods = ["{}.{}._help".format(PACKAGE_PREFIX, mod) for mod in mod_names] + delete(target_mods) + exit(0) + elif args[0].lower() == "--get-all-mods": + mod_names = get_all_mod_names() + with open("mod.txt", "w") as f: + for name in mod_names: + f.write(name + "\n") + exit(0) + else: + mod_names = [args[0]] + # attempt to find and load the desired module. + if "_help.py" not in mod_names[0]: + target_mods = ["{}.{}._help".format(PACKAGE_PREFIX, mod_names[0])] + else: + target_mods = [mod_names[0]] + mod_names = [os.path.split(os.path.split(mod_names[0])[0])[1]] # if help.py, get mod name + + if test: + # convert _help.py contents to help.yaml. Write out help.yaml + print("Generating new help.yaml file contents. Holding off on writing contents...") + file_to_help = {} + + for mod, mod_name in zip(target_mods, mod_names): + file, help_dict = convert(mod, mod_name, test=True) + if file is None or help_dict is None: + continue + file_to_help[file] = help_dict + + print("Loading Commands...") + # setup CLI + az_cli = DummyCli() + create_invoker_and_load_cmds_and_args(az_cli) + + print("Loading all old help...") + all_cli_help = get_all_help(az_cli) + old_loaded_help = {data.command: data for data in all_cli_help} + + print("Now writing out new help.yaml file contents...") + for file, help_dict in file_to_help.items(): + logger.warning("Writing {} ...".format(file)) + with open(file, "w") as f: + yaml.dump(help_dict, f) + + print("Loading all help again...") + all_cli_help = get_all_help(az_cli) + new_loaded_help = {data.command: data for data in all_cli_help} + + assert len(old_loaded_help) == len(new_loaded_help) + + diff_dict = {} + for command in old_loaded_help: + diff_dict[command] = (old_loaded_help[command], new_loaded_help[command]) + + logger.warning("Loaded {} help objects".format(len(new_loaded_help))) + logger.warning("Verifying that help objects are the same for _help.py and help.yaml.") + assert len(diff_dict) == len(loaded_helps) + for old, new in diff_dict.values(): + assert_help_objs_equal(old, new) + + else: + if len(target_mods) == 1: + print("Generating help.yaml file...") + out_file, result = convert(target_mods[0], mod_names[0]) + with open(out_file, "w") as f: + yaml.dump(result, f) + print("Done! Successfully generated {0}/help.yaml in {0} module.".format(mod_names[0])) + else: + print("Generating help.yaml files...") + for mod, mod_name in zip(target_mods, mod_names): + out_file, result = convert(mod, mod_name) + if out_file is None or result is None: + continue + with open(out_file, "w") as f: + yaml.dump(result, f) + print("Successfully generated {0}/help.yaml in {0} module.".format(mod_name)) + diff --git a/src/azure-cli-core/azure/cli/core/_help.py b/src/azure-cli-core/azure/cli/core/_help.py index b701a4ca8f4..27c88de1d3d 100644 --- a/src/azure-cli-core/azure/cli/core/_help.py +++ b/src/azure-cli-core/azure/cli/core/_help.py @@ -4,14 +4,14 @@ # -------------------------------------------------------------------------------------------- from __future__ import print_function +import argparse +from knack.help import (HelpFile as KnackHelpFile, CommandHelpFile as KnackCommandHelpFile, + GroupHelpFile as KnackGroupHelpFile, ArgumentGroupRegistry as KnackArgumentGroupRegistry, + HelpExample as KnackHelpExample, HelpParameter as KnackHelpParameter, + _print_indent, CLIHelp) -from knack.help import (HelpExample, - HelpFile as KnackHelpFile, - CommandHelpFile as KnackCommandHelpFile, - CLIHelp, - ArgumentGroupRegistry as KnackArgumentGroupRegistry) from knack.log import get_logger - +from knack.util import CLIError from azure.cli.core.commands import ExtensionCommandSource logger = get_logger(__name__) @@ -45,13 +45,79 @@ """ -class AzCliHelp(CLIHelp): +# PrintMixin class to decouple printing functionality from AZCLIHelp class. +# Most of these methods override print methods in CLIHelp +class CLIPrintMixin(CLIHelp): + def _print_header(self, cli_name, help_file): + super(CLIPrintMixin, self)._print_header(cli_name, help_file) + + links = help_file.links # TODO: this needs to be updated to handle links obj not just link text + if links: + link_text = "{} and {}".format(", ".join([link["url"] for link in links[0:-1]]), links[-1]["url"]) if len(links) > 1 else links[0]["url"] + link_text = "For more information, see: {}\n".format(link_text) + _print_indent(link_text, 2, width=self.textwrap_width) + + def _print_detailed_help(self, cli_name, help_file): + CLIPrintMixin._print_extensions_msg(help_file) + super(CLIPrintMixin, self)._print_detailed_help(cli_name, help_file) + + @staticmethod + def _get_choices_defaults_sources_str(p): + choice_str = u' Allowed values: {}.'.format(', '.join(sorted([str(x) for x in p.choices]))) \ + if p.choices else '' + default_str = u' Default: {}.'.format(p.default) if p.default and p.default != argparse.SUPPRESS else '' + value_sources_str = CLIPrintMixin._process_value_sources(p) if p.value_sources else '' + return u'{}{}{}'.format(choice_str, default_str, value_sources_str) + + @staticmethod + def _print_examples(help_file): + indent = 0 + _print_indent('Examples', indent) + for e in help_file.examples: + indent = 1 + _print_indent(u'{0}'.format(e.short_summary), indent) + indent = 2 + if e.long_summary: + _print_indent(u'{0}'.format(e.long_summary), indent) + _print_indent(u'{0}'.format(e.command), indent) + print('') + + @staticmethod + def _process_value_sources(p): + commands, strings, urls = [], [], [] + + for item in p.value_sources: + if "string" in item: + strings.append(item["string"]) + elif "link" in item and "command" in item["link"]: + commands.append(item["link"]["command"]) + elif "link" in item and "url" in item["link"]: + urls.append(item["link"]["url"]) + + command_str = u' Values from: {}.'.format(", ".join(commands)) if commands else '' + string_str = u' {}'.format(", ".join(strings)) if strings else '' + string_str = string_str + "." if string_str and not string_str.endswith(".") else string_str + urls_str = u' For more info, go to: {}.'.format(", ".join(urls)) if urls else '' + return u'{}{}{}'.format(command_str, string_str, urls_str) + + @staticmethod + def _print_extensions_msg(help_file): + if help_file.type != 'command': + return + if isinstance(help_file.command_source, ExtensionCommandSource): + logger.warning(help_file.command_source.get_command_warn_msg()) + if help_file.command_source.preview: + logger.warning(help_file.command_source.get_preview_warn_msg()) + + +class AzCliHelp(CLIPrintMixin, CLIHelp): def __init__(self, cli_ctx): super(AzCliHelp, self).__init__(cli_ctx, privacy_statement=PRIVACY_STATEMENT, welcome_message=WELCOME_MESSAGE, command_help_cls=CliCommandHelpFile, + group_help_cls=CliGroupHelpFile, help_cls=CliHelpFile) from knack.help import HelpObject @@ -70,22 +136,34 @@ def new_normalize_text(s): HelpObject._normalize_text = new_normalize_text # pylint: disable=protected-access - @staticmethod - def _print_extensions_msg(help_file): - if help_file.type != 'command': - return - if isinstance(help_file.command_source, ExtensionCommandSource): - logger.warning(help_file.command_source.get_command_warn_msg()) - if help_file.command_source.preview: - logger.warning(help_file.command_source.get_preview_warn_msg()) + self._register_help_loaders() - def _print_detailed_help(self, cli_name, help_file): - AzCliHelp._print_extensions_msg(help_file) - super(AzCliHelp, self)._print_detailed_help(cli_name, help_file) + def _register_help_loaders(self): + import azure.cli.core._help_loaders as help_loaders + import inspect + + def is_loader_cls(cls): + return inspect.isclass(cls) and cls.__name__ != 'BaseHelpLoader'and issubclass(cls, help_loaders.BaseHelpLoader) # pylint: disable=line-too-long + + versioned_loaders = {} + for cls_name, loader_cls in inspect.getmembers(help_loaders, is_loader_cls): + loader = loader_cls(self) + versioned_loaders[cls_name] = loader + + if len(versioned_loaders) != len({ldr.version for ldr in versioned_loaders.values()}): + ldrs_str = " ".join("{}-version:{}".format(cls_name, ldr.version) for cls_name, ldr in versioned_loaders.items()) + raise CLIError("Two loaders have the same version. Loaders:\n\t{}".format(ldrs_str)) + + self.versioned_loaders = versioned_loaders class CliHelpFile(KnackHelpFile): + def __init__(self, help_ctx, delimiters): + # Each help file (for a command or group) has a version denoting the source of its data. + super(CliHelpFile, self).__init__(help_ctx, delimiters) + self.links = [] + def _should_include_example(self, ex): min_profile = ex.get('min_profile') max_profile = ex.get('max_profile') @@ -98,22 +176,96 @@ def _should_include_example(self, ex): min_api=min_profile, max_api=max_profile) return True - # Needs to override base implementation + # Needs to override base implementation to exclude unsupported examples. def _load_from_data(self, data): - super(CliHelpFile, self)._load_from_data(data) - self.examples = [] # clear examples set by knack + if not data: + return + + if isinstance(data, str): + self.long_summary = data + return + + if 'type' in data: + self.type = data['type'] + + if 'short-summary' in data: + self.short_summary = data['short-summary'] + + self.long_summary = data.get('long-summary') + if 'examples' in data: self.examples = [] for d in data['examples']: if self._should_include_example(d): - self.examples.append(HelpExample(d)) + self.examples.append(HelpExample(**d)) + + def load(self, options): + ordered_loaders = sorted(self.help_ctx.versioned_loaders.values(), key=lambda ldr: ldr.version) + for loader in ordered_loaders: + loader.versioned_load(self, options) + + +class CliGroupHelpFile(KnackGroupHelpFile, CliHelpFile): + def __init__(self, help_ctx, delimiters, parser): + super(CliGroupHelpFile, self).__init__(help_ctx, delimiters, parser) + + def load(self, options): + # forces class to use this load method even if KnackGroupHelpFile overrides CliHelpFile's method. + CliHelpFile.load(self, options) class CliCommandHelpFile(KnackCommandHelpFile, CliHelpFile): def __init__(self, help_ctx, delimiters, parser): - self.command_source = getattr(parser, 'command_source', None) super(CliCommandHelpFile, self).__init__(help_ctx, delimiters, parser) + import argparse + self.type = 'command' + self.command_source = getattr(parser, 'command_source', None) + + self.parameters = [] + + for action in [a for a in parser._actions if a.help != argparse.SUPPRESS]: # pylint: disable=protected-access + if action.option_strings: + self._add_parameter_help(action) + else: + # use metavar for positional parameters + param_kwargs = { + 'name_source': [action.metavar or action.dest], + 'deprecate_info': getattr(action, 'deprecate_info', None), + 'description': action.help, + 'choices': action.choices, + 'required': False, + 'default': None, + 'group_name': 'Positional' + } + self.parameters.append(HelpParameter(**param_kwargs)) + + help_param = next(p for p in self.parameters if p.name == '--help -h') + help_param.group_name = 'Global Arguments' + + # update parameter type so we can use overriden update_from_data method to update value sources. + for param in self.parameters: + param.__class__ = HelpParameter + + def _load_from_data(self, data): + super(CliCommandHelpFile, self)._load_from_data(data) + + if isinstance(data, str) or not self.parameters or not data.get('parameters'): + return + + loaded_params = [] + loaded_param = {} + for param in self.parameters: + loaded_param = next((n for n in data['parameters'] if n['name'] == param.name), None) + if loaded_param: + param.update_from_data(loaded_param) + loaded_params.append(param) + + self.parameters = loaded_params + + def load(self, options): + # forces class to use this load method even if KnackCommandHelpFile overrides CliHelpFile's method. + CliHelpFile.load(self, options) class ArgumentGroupRegistry(KnackArgumentGroupRegistry): # pylint: disable=too-few-public-methods @@ -133,3 +285,32 @@ def __init__(self, group_list): for group in other_groups: self.priorities[group] = priority priority += 1 + + +class HelpExample(KnackHelpExample): # pylint: disable=too-few-public-methods + + def __init__(self, **_data): + # Old attributes + _data['name'] = _data.get('name', '') + _data['text'] = _data.get('text', '') + super(HelpExample, self).__init__(_data) + + # new attributes in lieu of old attributes. TODO: SHOULD WE DELETE OLD ATTRS?? TO ENFORCE new ones? + self.short_summary = _data.get('summary', '') if _data.get('summary', '') else self.name + self.command = _data.get('command', '') if _data.get('command', '') else self.text + self.long_summary = _data.get('description', '') + self.min_profile = _data.get('min_profile', '') + self.max_profile = _data.get('max_profile', '') + + +class HelpParameter(KnackHelpParameter): # pylint: disable=too-many-instance-attributes + + def __init__(self, **kwargs): + super(HelpParameter, self).__init__(**kwargs) + + def update_from_data(self, data): + super(HelpParameter, self).update_from_data(data) + # original help.py value_sources are strings, update command strings to value-source dict + if self.value_sources: + self.value_sources = [str_or_dict if isinstance(str_or_dict, dict) else {"link": {"command": str_or_dict}} + for str_or_dict in self.value_sources] diff --git a/src/azure-cli-core/azure/cli/core/_help_loaders.py b/src/azure-cli-core/azure/cli/core/_help_loaders.py new file mode 100644 index 00000000000..15ac256b0d4 --- /dev/null +++ b/src/azure-cli-core/azure/cli/core/_help_loaders.py @@ -0,0 +1,206 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +from knack.util import CLIError +from knack.log import get_logger + +from azure.cli.core._help import (HelpExample, CliHelpFile) +import abc + +logger = get_logger(__name__) + +try: + ABC = abc.ABC +except AttributeError: # Python 2.7, abc exists, but not ABC + ABC = abc.ABCMeta('ABC', (object,), {'__slots__': ()}) + + +# BaseHelpLoader defining versioned loader interface. Also contains some helper methods. +class BaseHelpLoader(ABC): + def __init__(self, help_ctx=None): + self.help_ctx = help_ctx + self._data = None + + def versioned_load(self, help_obj, parser): + self.load_raw_data(help_obj, parser) + if self._data_is_applicable(): + self.load_help_body(help_obj) + self.load_help_parameters(help_obj) + self.load_help_examples(help_obj) + + @property + @abc.abstractmethod + def version(self): + pass + + def _data_is_applicable(self): + is_applicable = False + ldr_name = self.__class__ + if self._data: + is_applicable = self.version == self._data.get('version') + msg = "Data's version matches loader {}'s version.".format(ldr_name) if is_applicable \ + else "Data's version: {} does not match loader {}'s version: {}".format(self._data.get('version'), + ldr_name, self.version) + logger.info(msg) + else: + logger.info("There is no applicable data for loader {}.".format(ldr_name)) + + return is_applicable + + @abc.abstractmethod + def load_raw_data(self, help_obj, parser): + pass + + @abc.abstractmethod + def load_help_body(self, help_obj): + pass + + @abc.abstractmethod + def load_help_parameters(self, help_obj): + pass + + @abc.abstractmethod + def load_help_examples(self, help_obj): + pass + + # Loader static helper methods + + # Update a help file object from a data dict using the attribute to key mapping + @staticmethod + def _update_obj_from_data_dict(obj, data, attr_key_tups): + for attr, key in attr_key_tups: + try: + setattr(obj, attr, data[key] or attr) + except (AttributeError, KeyError): + pass + + # update relevant help file object parameters from data. + @staticmethod + def _update_help_obj_params(help_obj, data_params, params_equal, attr_key_tups): + loaded_params = [] + for param_obj in help_obj.parameters: + loaded_param = next((n for n in data_params if params_equal(param_obj, n)), None) + if loaded_param: + BaseHelpLoader._update_obj_from_data_dict(param_obj, loaded_param, attr_key_tups) + loaded_params.append(param_obj) + help_obj.parameters = loaded_params + + # get the yaml help + @staticmethod + def _get_yaml_help_for_nouns(nouns, cmd_loader_map_ref): + import inspect + import os + + def _parse_yaml_from_string(text, help_file_path): + import yaml + + dir_name, base_name = os.path.split(help_file_path) + + pretty_file_path = os.path.join(os.path.basename(dir_name), base_name) + + try: + data = yaml.load(text) + if not data: + raise CLIError("Error: Help file {} is empty".format(pretty_file_path)) + return data + except yaml.YAMLError as e: + raise CLIError("Error parsing {}:\n\n{}".format(pretty_file_path, e)) + + command_nouns = " ".join(nouns) + # if command in map, get the loader. Path of loader is path of helpfile. + loader = cmd_loader_map_ref.get(command_nouns, [None])[0] + + # otherwise likely a group, get the loader + if not loader: + for k, v in cmd_loader_map_ref.items(): + # if loader name starts with noun / group, this is a command in the command group + if k.startswith(command_nouns): + loader = v[0] + break + + if loader: + loader_file_path = inspect.getfile(loader.__class__) + dir_name = os.path.dirname(loader_file_path) + files = os.listdir(dir_name) + for file in files: + if file.endswith("help.yaml") or file.endswith("help.yml"): + help_file_path = os.path.join(dir_name, file) + with open(help_file_path, "r") as f: + text = f.read() + return _parse_yaml_from_string(text, help_file_path) + return None + + +class HelpLoaderV0(BaseHelpLoader): + + @property + def version(self): + return 0 + + def versioned_load(self, help_obj, parser): + super(CliHelpFile, help_obj).load(parser) + + def load_raw_data(self, help_obj, parser): + pass + + def load_help_body(self, help_obj): + pass + + def load_help_parameters(self, help_obj): + pass + + def load_help_examples(self, help_obj): + pass + + +class HelpLoaderV1(BaseHelpLoader): + core_attrs_to_keys = [("short_summary", "summary"), ("long_summary", "description")] + body_attrs_to_keys = core_attrs_to_keys + [("links", "links")] + param_attrs_to_keys = core_attrs_to_keys + [("value_sources", "value-sources")] + + @property + def version(self): + return 1 + + def load_raw_data(self, help_obj, parser): + prog = parser.prog if hasattr(parser, "prog") else parser._prog_prefix + command_nouns = prog.split()[1:] + cmd_loader_map_ref = self.help_ctx.cli_ctx.invocation.commands_loader.cmd_to_loader_map + all_data = self._get_yaml_help_for_nouns(command_nouns, cmd_loader_map_ref) + self._data = self._get_entry_data(help_obj.command, all_data) + + def load_help_body(self, help_obj): + self._update_obj_from_data_dict(help_obj, self._data, self.body_attrs_to_keys) + + def load_help_parameters(self, help_obj): + def params_equal(param, param_dict): + if param_dict['name'].startswith("--"): # for optionals, help file name must be one of the long options + return param_dict['name'] in param.name.split() + else: # for positionals, help file must name must match param name shown when -h is run + return param_dict['name'] == param.name + + if help_obj.type == "command" and hasattr(help_obj, "parameters") and self._data.get("arguments"): + loaded_params = [] + for param_obj in help_obj.parameters: + loaded_param = next((n for n in self._data["arguments"] if params_equal(param_obj, n)), None) + if loaded_param: + self._update_obj_from_data_dict(param_obj, loaded_param, self.param_attrs_to_keys) + loaded_params.append(param_obj) + help_obj.parameters = loaded_params + + def load_help_examples(self, help_obj): + if help_obj.type == "command" and self._data.get("examples"): + help_obj.examples = [HelpExample(**ex) for ex in self._data["examples"] if help_obj._should_include_example(ex)] + + @staticmethod + def _get_entry_data(cmd_name, data): + if data and data.get("content"): + try: + entry_data = next(value for elem in data.get("content") for key, value in elem.items() if value.get("name") == cmd_name) + entry_data["version"] = data['version'] + return entry_data + except StopIteration: + pass + return None diff --git a/src/azure-cli-core/azure/cli/core/file_util.py b/src/azure-cli-core/azure/cli/core/file_util.py index d789a0bb494..de0c315a092 100644 --- a/src/azure-cli-core/azure/cli/core/file_util.py +++ b/src/azure-cli-core/azure/cli/core/file_util.py @@ -5,9 +5,8 @@ from __future__ import print_function from knack.util import CLIError -from knack.help import GroupHelpFile -from azure.cli.core._help import CliCommandHelpFile +from azure.cli.core._help import CliCommandHelpFile, CliGroupHelpFile def get_all_help(cli_ctx): @@ -28,7 +27,7 @@ def get_all_help(cli_ctx): help_files = [] for cmd, parser in zip(sub_parser_keys, sub_parser_values): try: - help_file = GroupHelpFile(help_ctx, cmd, parser) if _is_group(parser) \ + help_file = CliGroupHelpFile(help_ctx, cmd, parser) if _is_group(parser) \ else CliCommandHelpFile(help_ctx, cmd, parser) help_file.load(parser) help_files.append(help_file) diff --git a/src/azure-cli-core/azure/cli/core/tests/test_help.py b/src/azure-cli-core/azure/cli/core/tests/test_help.py index 0c780e8243d..5edecc79e0e 100644 --- a/src/azure-cli-core/azure/cli/core/tests/test_help.py +++ b/src/azure-cli-core/azure/cli/core/tests/test_help.py @@ -6,14 +6,74 @@ from __future__ import print_function import logging +import shutil +import inspect +from inspect import getmembers as inspect_getmembers + import unittest +import mock +import tempfile + +from knack.help import GroupHelpFile, HelpAuthoringException +from azure.cli.core._help import CliCommandHelpFile -from azure.cli.core._help import ArgumentGroupRegistry, CliCommandHelpFile from azure.cli.core.mock import DummyCli +from azure.cli.core.commands import _load_command_loader +from azure.cli.core.file_util import create_invoker_and_load_cmds_and_args, get_all_help + + +# Command loader module +MOCKED_COMMAND_LOADER_MOD = "test_help_loaders" + + +# mock command loader method so that only the mock command loader can be loaded. +def mock_load_command_loader(loader, args, name, prefix): + return _load_command_loader(loader, args, name, "azure.cli.core.tests.") + + +# mock inspect.getfile to discover directory containing help files. +def get_mocked_inspect_getfile(expected_arg, return_value): + + def inspect_getfile(obj): + if obj == expected_arg: + return return_value + else: + return inspect.getfile(obj) + return inspect_getfile + -from knack.help import HelpObject, GroupHelpFile, HelpAuthoringException +# mock getmembers so test help loader can be injected into AzCliHelp class' versioned loader list +def mock_inspect_getmembers(object, predicate=None): + import azure.cli.core.tests.test_help_loaders as possible_loaders + predicate_repr = repr(predicate) + if "_register_help_loaders" in predicate_repr and "is_loader_cls" in predicate_repr: + result = inspect_getmembers(object, predicate) + result.extend(inspect_getmembers(possible_loaders, predicate)) + return list(set(result)) + else: + return inspect_getmembers(object, predicate) + + +def _store_parsers(parser, d): + for s in parser.subparsers.values(): + d[_get_parser_name(s)] = s + if _is_group(s): + for c in s.choices.values(): + d[_get_parser_name(c)] = c + _store_parsers(c, d) + +def _is_group(parser): + return getattr(parser, 'choices', None) is not None + + +def _get_parser_name(parser): + # pylint:disable=protected-access + return (parser._prog_prefix if hasattr(parser, '_prog_prefix') else parser.prog)[len('az '):] + + +# TODO update this CLASS to properly load all help... . class HelpTest(unittest.TestCase): @classmethod def setUpClass(cls): @@ -28,7 +88,6 @@ def test_help_loads(self): from azure.cli.core.commands.arm import register_global_subscription_argument, register_ids_argument import knack.events as events - cli = DummyCli() parser_dict = {} cli = DummyCli() help_ctx = cli.help_cls(cli) @@ -50,6 +109,8 @@ def test_help_loads(self): cli.invocation.parser.load_command_table(cli.invocation.commands_loader) _store_parsers(cli.invocation.parser, parser_dict) + # TODO: do we want to update this as it doesn't actually load all help. + # We do have a CLI linter which does indeed load all help. for name, parser in parser_dict.items(): try: help_file = GroupHelpFile(help_ctx, name, parser) if _is_group(parser) \ @@ -59,22 +120,352 @@ def test_help_loads(self): raise HelpAuthoringException('{}, {}'.format(name, ex)) -def _store_parsers(parser, d): - for s in parser.subparsers.values(): - d[_get_parser_name(s)] = s - if _is_group(s): - for c in s.choices.values(): - d[_get_parser_name(c)] = c - _store_parsers(c, d) +class TestHelpLoads(unittest.TestCase): + @classmethod + def setUpClass(cls): + from knack.help_files import helps + cls.test_cli = DummyCli() + cls.helps = helps + def setUp(self): + self._tempdirName = tempfile.mkdtemp(prefix="help_test_temp_dir_") -def _is_group(parser): - return getattr(parser, 'choices', None) is not None + def tearDown(self): + # delete temporary directory to be used for temp files. + shutil.rmtree(self._tempdirName) + self.helps.clear() + def set_help_py(self): + self.helps['test'] = """ + type: group + short-summary: Foo Bar Group + long-summary: Foo Bar Baz Group is a fun group + """ -def _get_parser_name(parser): - # pylint:disable=protected-access - return (parser._prog_prefix if hasattr(parser, '_prog_prefix') else parser.prog)[len('az '):] + self.helps['test alpha'] = """ + type: command + short-summary: Foo Bar Command + long-summary: Foo Bar Baz Command is a fun command + parameters: + - name: --arg1 -a + short-summary: A short summary + populator-commands: + - az foo bar + - az bar baz + - name: ARG4 # Note: positional's are discouraged in the CLI. + short-summary: Positional parameter. Not required + examples: + - name: Alpha Example + text: az test alpha --arg1 a --arg2 b --arg3 c + min_profile: 2017-03-09-profile + max_profile: latest + """ + + def set_help_yaml(self): + yaml_help = """ + version: 1 + content: + - group: + name: test + summary: Group yaml summary + description: Group yaml description. A.K.A long description + links: + - title: Azure Test Docs + url: "https://docs.microsoft.com/en-us/azure/test" + - url: "https://aka.ms/just-a-url" + - command: + name: test alpha + summary: Command yaml summary + description: Command yaml description. A.K.A long description + links: + - title: Azure Test Alpha Docs + url: "https://docs.microsoft.com/en-us/azure/test/alpha" + - url: "https://aka.ms/just-a-long-url" + arguments: + - name: --arg2 # we do not specify the short option in the name. + summary: Arg 2's summary + description: A true description of this parameter. + value-sources: + - string: "Number range: -5.0 to 5.0" + - link: + url: https://www.foo.com + title: foo + - link: + command: az test show + title: Show test details + - name: ARG4 # Note: positional's are discouraged in the CLI. + summary: Arg4's summary, yaml. Positional arg, not required + examples: + - summary: A simple example + description: More detail on the simple example. + command: az test alpha --arg1 apple --arg2 ball --arg3 cat + min_profile: 2017-03-09-profile + max_profile: latest + """ + return self._create_new_temp_file(yaml_help, suffix="help.yaml") + + def set_help_json(self): + json_help = """ + { + "version": 2, + "content": [ + { + "group": { + "name": "test", + "short": "Group json summary", + "long": "Group json description. A.K.A long description", + "hyper-links": [ + { + "title": "Azure Json Test Docs", + "url": "https://docs.microsoft.com/en-us/azure/test" + }, + { + "url": "https://aka.ms/just-a-url" + } + ] + } + }, + { + "command": { + "name": "test alpha", + "short": "Command json summary", + "long": "Command json description. A.K.A long description", + "hyper-links": [ + { + "title": "Azure Json Test Alpha Docs", + "url": "https://docs.microsoft.com/en-us/azure/test/alpha" + }, + { + "url": "https://aka.ms/just-a-long-url" + } + ], + "arguments": [ + { + "name": "--arg3", + "short": "Arg 3's json summary", + "long": "A truly true description of this parameter.", + "sources": [ + { + "string": "Number range: 0 to 10" + }, + { + "link": { + "url": "https://www.foo-json.com", + "title": "foo-json" + } + }, + { + "link": { + "command": "az test show", + "title": "Show test details. Json file" + } + } + ] + }, + { + "name": "ARG4", + "summary": "Arg4's summary, json. Positional arg, not required" + } + ], + "examples": [ + { + "summary": "A simple example from json", + "description": "More detail on the simple example.", + "command": "az test alpha --arg1 alpha --arg2 beta --arg3 chi", + "min_profile": "2018-03-01-hybrid", + "max_profile": "latest" + } + ] + } + } + ] + } + """ + return self._create_new_temp_file(json_help, suffix="help.json") + + # Mock logic in core.MainCommandsLoader.load_command_table for retrieving installed modules. + @mock.patch('pkgutil.iter_modules', side_effect=lambda x: [(None, MOCKED_COMMAND_LOADER_MOD, None)]) + @mock.patch('azure.cli.core.commands._load_command_loader', side_effect=mock_load_command_loader) + def test_basic(self, mocked_load, mocked_pkg_util): + with self.assertRaises(SystemExit): + self.test_cli.invoke(["test", "alpha", "-h"]) + + # Mock logic in core.MainCommandsLoader.load_command_table for retrieving installed modules. + @mock.patch('pkgutil.iter_modules', side_effect=lambda x: [(None, MOCKED_COMMAND_LOADER_MOD, None)]) + @mock.patch('azure.cli.core.commands._load_command_loader', side_effect=mock_load_command_loader) + def test_load_from_help_py(self, mocked_load, mocked_pkg_util): + self.set_help_py() + create_invoker_and_load_cmds_and_args(self.test_cli) + group_help_obj = next((help for help in get_all_help(self.test_cli) if help.command == "test"), None) + command_help_obj = next((help for help in get_all_help(self.test_cli) if help.command == "test alpha"), None) + + # Test that group and command help are successfully displayed. + with self.assertRaises(SystemExit): + self.test_cli.invoke(["test", "-h"]) + with self.assertRaises(SystemExit): + self.test_cli.invoke(["test", "alpha", "-h"]) + + # Test group help + self.assertIsNotNone(group_help_obj) + self.assertEqual(group_help_obj.short_summary, "Foo Bar Group.") + self.assertEqual(group_help_obj.long_summary, "Foo Bar Baz Group is a fun group.") + + # Test command help + self.assertIsNotNone(command_help_obj) + self.assertEqual(command_help_obj.short_summary, "Foo Bar Command.") + self.assertEqual(command_help_obj.long_summary, "Foo Bar Baz Command is a fun command.") + + # test that parameters and help are loaded from command function docstring, argument registry help and help.py + obj_param_dict = {param.name: param for param in command_help_obj.parameters} + param_name_set = {"--arg1 -a", "--arg2 -b", "--arg3", "ARG4"} + self.assertTrue(set(obj_param_dict.keys()).issuperset(param_name_set)) + + self.assertEqual(obj_param_dict["--arg3"].short_summary, "Arg3's docstring help text.") + self.assertEqual(obj_param_dict["ARG4"].short_summary, "Positional parameter. Not required.") + self.assertEqual(obj_param_dict["--arg1 -a"].short_summary, "A short summary.") + + self.assertEqual(obj_param_dict["--arg1 -a"].short_summary, "A short summary.") + self.assertEqual(obj_param_dict["--arg1 -a"].value_sources[0]['link']['command'], "az foo bar") + self.assertEqual(obj_param_dict["--arg1 -a"].value_sources[1]['link']['command'], "az bar baz") + + self.assertEqual(command_help_obj.examples[0].short_summary, "Alpha Example") + self.assertEqual(command_help_obj.examples[0].command, "az test alpha --arg1 a --arg2 b --arg3 c") + self.assertEqual(command_help_obj.examples[0].min_profile, "2017-03-09-profile") + self.assertEqual(command_help_obj.examples[0].max_profile, "latest") + + @mock.patch('pkgutil.iter_modules', side_effect=lambda x: [(None, MOCKED_COMMAND_LOADER_MOD, None)]) + @mock.patch('azure.cli.core.commands._load_command_loader', side_effect=mock_load_command_loader) + def test_load_from_help_yaml(self, mocked_load, mocked_pkg_util): + # setup help.py and help.yaml help. + self.set_help_py() + yaml_path = self.set_help_yaml() + create_invoker_and_load_cmds_and_args(self.test_cli) + + # mock logic in core._help_loaders for retrieving yaml file from loader path. + expected_arg = self.test_cli.invocation.commands_loader.cmd_to_loader_map['test alpha'][0].__class__ + with mock.patch('inspect.getfile', side_effect=get_mocked_inspect_getfile(expected_arg, yaml_path)): + group_help_obj = next((help for help in get_all_help(self.test_cli) if help.command == "test"), None) + command_help_obj = next((help for help in get_all_help(self.test_cli) if help.command == "test alpha"), None) # pylint: disable=line-too-long + + # Test that group and command help are successfully displayed. + with self.assertRaises(SystemExit): + self.test_cli.invoke(["test", "-h"]) + with self.assertRaises(SystemExit): + self.test_cli.invoke(["test", "alpha", "-h"]) + + # Test group help + self.assertIsNotNone(group_help_obj) + self.assertEqual(group_help_obj.short_summary, "Group yaml summary.") + self.assertEqual(group_help_obj.long_summary, "Group yaml description. A.K.A long description.") + self.assertEqual(group_help_obj.links[0], {"title": "Azure Test Docs", "url": "https://docs.microsoft.com/en-us/azure/test"}) + self.assertEqual(group_help_obj.links[1], {"url": "https://aka.ms/just-a-url"}) + + # Test command help + self.assertIsNotNone(command_help_obj) + self.assertEqual(command_help_obj.short_summary, "Command yaml summary.") + self.assertEqual(command_help_obj.long_summary, "Command yaml description. A.K.A long description.") + self.assertEqual(command_help_obj.links[0], {"title": "Azure Test Alpha Docs", + "url": "https://docs.microsoft.com/en-us/azure/test/alpha"}) + self.assertEqual(command_help_obj.links[1], {"url": "https://aka.ms/just-a-long-url"}) + + # test that parameters and help are loaded from command function docstring, argument registry help and help.yaml + obj_param_dict = {param.name: param for param in command_help_obj.parameters} + param_name_set = {"--arg1 -a", "--arg2 -b", "--arg3", "ARG4"} + self.assertTrue(set(obj_param_dict.keys()).issuperset(param_name_set)) + + self.assertEqual(obj_param_dict["--arg1 -a"].short_summary, "A short summary.") + self.assertEqual(obj_param_dict["--arg3"].short_summary, "Arg3's docstring help text.") + self.assertEqual(obj_param_dict["ARG4"].short_summary, "Arg4's summary, yaml. Positional arg, not required.") + + self.assertEqual(obj_param_dict["--arg2 -b"].short_summary, "Arg 2's summary.") + self.assertEqual(obj_param_dict["--arg2 -b"].long_summary, "A true description of this parameter.") + self.assertEqual(obj_param_dict["--arg2 -b"].value_sources[0], {"string": "Number range: -5.0 to 5.0"}) + self.assertEqual(obj_param_dict["--arg2 -b"].value_sources[1]['link'], {"url": "https://www.foo.com", + "title": "foo"}) + self.assertEqual(obj_param_dict["--arg2 -b"].value_sources[2]['link'], {"command": "az test show", + "title": "Show test details"}) + + self.assertEqual(command_help_obj.examples[0].short_summary, "A simple example") + self.assertEqual(command_help_obj.examples[0].long_summary, "More detail on the simple example.") + self.assertEqual(command_help_obj.examples[0].command, "az test alpha --arg1 apple --arg2 ball --arg3 cat") + self.assertEqual(command_help_obj.examples[0].min_profile, "2017-03-09-profile") + self.assertEqual(command_help_obj.examples[0].max_profile, "latest") + + @mock.patch('inspect.getmembers', side_effect=mock_inspect_getmembers) + @mock.patch('pkgutil.iter_modules', side_effect=lambda x: [(None, MOCKED_COMMAND_LOADER_MOD, None)]) + @mock.patch('azure.cli.core.commands._load_command_loader', side_effect=mock_load_command_loader) + def test_load_from_help_json(self, mocked_load, mocked_pkg_util, mocked_getmembers): + # setup help.py, help.yaml and help.json + self.set_help_py() + path = self.set_help_yaml() # either (yaml or json) path should work. As both files are in the same temp dir. + self.set_help_json() + create_invoker_and_load_cmds_and_args(self.test_cli) + + # mock logic in core._help_loaders for retrieving yaml file from loader path. + expected_arg = self.test_cli.invocation.commands_loader.cmd_to_loader_map['test alpha'][0].__class__ + with mock.patch('inspect.getfile', side_effect=get_mocked_inspect_getfile(expected_arg, path)): + group_help_obj = next((help for help in get_all_help(self.test_cli) if help.command == "test"), None) + command_help_obj = next((help for help in get_all_help(self.test_cli) if help.command == "test alpha"), + None) + + # Test that group and command help are successfully displayed. + with self.assertRaises(SystemExit): + self.test_cli.invoke(["test", "-h"]) + with self.assertRaises(SystemExit): + self.test_cli.invoke(["test", "alpha", "-h"]) + + # Test group help + self.assertIsNotNone(group_help_obj) + self.assertEqual(group_help_obj.short_summary, "Group json summary.") + self.assertEqual(group_help_obj.long_summary, "Group json description. A.K.A long description.") + self.assertEqual(group_help_obj.links[0], {"title": "Azure Json Test Docs", + "url": "https://docs.microsoft.com/en-us/azure/test"}) + self.assertEqual(group_help_obj.links[1], {"url": "https://aka.ms/just-a-url"}) + + # Test command help + self.assertIsNotNone(command_help_obj) + self.assertEqual(command_help_obj.short_summary, "Command json summary.") + self.assertEqual(command_help_obj.long_summary, "Command json description. A.K.A long description.") + self.assertEqual(command_help_obj.links[0], {"title": "Azure Json Test Alpha Docs", + "url": "https://docs.microsoft.com/en-us/azure/test/alpha"}) + self.assertEqual(command_help_obj.links[1], {"url": "https://aka.ms/just-a-long-url"}) + + # test that parameters and help are loaded from command function docstring, argument registry help and help.yaml + obj_param_dict = {param.name: param for param in command_help_obj.parameters} + param_name_set = {"--arg1 -a", "--arg2 -b", "--arg3", "ARG4"} + self.assertTrue(set(obj_param_dict.keys()).issuperset(param_name_set)) + + self.assertEqual(obj_param_dict["--arg3"].short_summary, "Arg 3's json summary.") + self.assertEqual(obj_param_dict["--arg3"].long_summary, "A truly true description of this parameter.") + self.assertEqual(obj_param_dict["--arg3"].value_sources[0], {"string": "Number range: 0 to 10"}) + self.assertEqual(obj_param_dict["--arg3"].value_sources[1]['link'], + {"url": "https://www.foo-json.com", "title": "foo-json"}) + self.assertEqual(obj_param_dict["--arg3"].value_sources[2]['link'], + {"command": "az test show", "title": "Show test details. Json file"}) + + self.assertEqual(command_help_obj.examples[0].short_summary, "A simple example from json") + self.assertEqual(command_help_obj.examples[0].long_summary, "More detail on the simple example.") + self.assertEqual(command_help_obj.examples[0].command, "az test alpha --arg1 alpha --arg2 beta --arg3 chi") + self.assertEqual(command_help_obj.examples[0].min_profile, "2018-03-01-hybrid") + self.assertEqual(command_help_obj.examples[0].max_profile, "latest") + + # validate other parameters, which have help from help.py and help.yamls + self.assertEqual(obj_param_dict["--arg1 -a"].short_summary, "A short summary.") + self.assertEqual(obj_param_dict["--arg2 -b"].short_summary, "Arg 2's summary.") + self.assertEqual(obj_param_dict["ARG4"].short_summary, "Arg4's summary, yaml. Positional arg, not required.") + # arg2's help from help.yaml still preserved. + self.assertEqual(obj_param_dict["--arg2 -b"].long_summary, "A true description of this parameter.") + self.assertEqual(obj_param_dict["--arg2 -b"].value_sources[0], {"string": "Number range: -5.0 to 5.0"}) + self.assertEqual(obj_param_dict["--arg2 -b"].value_sources[1]['link'], {"url": "https://www.foo.com", + "title": "foo"}) + self.assertEqual(obj_param_dict["--arg2 -b"].value_sources[2]['link'], {"command": "az test show", + "title": "Show test details"}) + + # create a temporary file in the temp dir. Return the path of the file. + def _create_new_temp_file(self, data, suffix=""): + with tempfile.NamedTemporaryFile(mode='w', dir=self._tempdirName, delete=False, suffix=suffix) as f: + f.write(data) + return f.name if __name__ == '__main__': diff --git a/src/azure-cli-core/azure/cli/core/tests/test_help_loaders.py b/src/azure-cli-core/azure/cli/core/tests/test_help_loaders.py new file mode 100644 index 00000000000..6ee00e1dce9 --- /dev/null +++ b/src/azure-cli-core/azure/cli/core/tests/test_help_loaders.py @@ -0,0 +1,119 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +from knack.util import CLIError + +from azure.cli.core import AzCommandsLoader +from azure.cli.core._help_loaders import HelpLoaderV1 + + +# region TestCommandLoader +class TestCommandLoader(AzCommandsLoader): + + def __init__(self, cli_ctx=None): + from azure.cli.core.commands import CliCommandType + compute_custom = CliCommandType( + operations_tmpl='{}#{{}}'.format(__name__), + ) + super(TestCommandLoader, self).__init__(cli_ctx=cli_ctx, + custom_command_type=compute_custom) + self.cmd_to_loader_map = {} + + def load_command_table(self, args): + with self.command_group('test') as g: + g.custom_command('alpha', 'dummy_handler') + + return self.command_table + + def load_arguments(self, command): + with self.argument_context('test') as c: + c.argument('arg1', options_list=['--arg1', '-a']) + c.argument('arg2', options_list=['--arg2', '-b'], help="Help From code.") + with self.argument_context('test alpha') as c: + c.positional('arg4', metavar="ARG4") + self._update_command_definitions() # pylint: disable=protected-access + + +def dummy_handler(arg1, arg2=None, arg3=None, arg4=None): + """ + Short summary here. Long summary here. Still long summary. + :param arg1: arg1's docstring help text + :param arg2: arg2's docstring help text + :param arg3: arg3's docstring help text + :param arg4: arg4's docstring help text + """ + pass + + +COMMAND_LOADER_CLS = TestCommandLoader + +# region Test Help Loader + + +# test Help Loader, loads from help.json +class TestHelpLoader(HelpLoaderV1): + # This loader has different keys in the data object. Except for "arguments" and "examples". + core_attrs_to_keys = [("short_summary", "short"), ("long_summary", "long")] + body_attrs_to_keys = core_attrs_to_keys + [("links", "hyper-links")] + param_attrs_to_keys = core_attrs_to_keys + [("value_sources", "sources")] + + @property + def version(self): + return 2 + + def load_raw_data(self, help_obj, parser): + prog = parser.prog if hasattr(parser, "prog") else parser._prog_prefix + command_nouns = prog.split()[1:] + cmd_loader_map_ref = self.help_ctx.cli_ctx.invocation.commands_loader.cmd_to_loader_map + all_data = self.get_json_help_for_nouns(command_nouns, cmd_loader_map_ref) + self._data = self._get_entry_data(help_obj.command, all_data) + + def load_help_body(self, help_obj): + self._update_obj_from_data_dict(help_obj, self._data, self.body_attrs_to_keys) + + # get the json help + @staticmethod + def get_json_help_for_nouns(nouns, cmd_loader_map_ref): + import inspect + import os + + def _parse_json_from_string(text, help_file_path): + import json + + dir_name, base_name = os.path.split(help_file_path) + + pretty_file_path = os.path.join(os.path.basename(dir_name), base_name) + + try: + data = json.loads(text) + if not data: + raise CLIError("Error: Help file {} is empty".format(pretty_file_path)) + return data + except ValueError as e: + raise CLIError("Error parsing {}:\n\n{}".format(pretty_file_path, e)) + + command_nouns = " ".join(nouns) + # if command in map, get the loader. Path of loader is path of helpfile. + loader = cmd_loader_map_ref.get(command_nouns, [None])[0] + + # otherwise likely a group, get the loader + if not loader: + for k, v in cmd_loader_map_ref.items(): + # if loader name starts with noun / group, this is a command in the command group + if k.startswith(command_nouns): + loader = v[0] + break + + if loader: + loader_file_path = inspect.getfile(loader.__class__) + dir_name = os.path.dirname(loader_file_path) + files = os.listdir(dir_name) + for file in files: + if file.endswith("help.json"): + help_file_path = os.path.join(dir_name, file) + with open(help_file_path, "r") as f: + text = f.read() + return _parse_json_from_string(text, help_file_path) + return None From 2793464899eff84071b0d1b75b0823f46debdf44 Mon Sep 17 00:00:00 2001 From: Oluwatosin Adewale Date: Wed, 23 Jan 2019 11:44:02 -0800 Subject: [PATCH 02/16] Fixed bug in convert_all.py. Fixed bug in container/_help.py. --- scripts/temp_help/convert_all.py | 11 +++++++++-- scripts/temp_help/help_convert.py | 3 +++ .../azure/cli/command_modules/container/_help.py | 1 - 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/scripts/temp_help/convert_all.py b/scripts/temp_help/convert_all.py index 4e7e0e589f2..85d8bfe062d 100644 --- a/scripts/temp_help/convert_all.py +++ b/scripts/temp_help/convert_all.py @@ -16,13 +16,20 @@ module_names = [] with open("mod.txt", "r") as f: for line in f: - module_names.append(f.readline()) + module_names.append(line) os.remove("mod.txt") + successes = 0 with open(os.devnull, 'w') as devnull: # silence stdout by redirecting to devnull for mod in module_names: args = ["python", "./help_convert.py", mod, "--test"] - subprocess.run(args, stdout=devnull) + completed_process = subprocess.run(args, stdout=devnull) + if completed_process.returncode == 0: + successes += 1 + if successes: + print("\n----------------------------------------------------------" + "Successfuly converted {} help.py files to help.yaml files." + "\n----------------------------------------------------------".format(successes)) elif args[0].lower() == "--extensions": pass diff --git a/scripts/temp_help/help_convert.py b/scripts/temp_help/help_convert.py index 9fe895090e4..1921337c8ed 100644 --- a/scripts/temp_help/help_convert.py +++ b/scripts/temp_help/help_convert.py @@ -343,6 +343,9 @@ def assert_true_or_warn(x, y): continue file_to_help[file] = help_dict + if not file_to_help: + exit("No help.yaml file generated for {}.".format(", ".join(mod_names))) + print("Loading Commands...") # setup CLI az_cli = DummyCli() diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/_help.py b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/_help.py index 39adb6b26dd..4fe1149e25e 100644 --- a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/_help.py +++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/_help.py @@ -20,7 +20,6 @@ text: az container create -g MyResourceGroup --name myapp --image myimage:latest --cpu 1 --memory 1 - name: Create a container in a container group that runs Windows, with 2 cores and 3.5Gb of memory. text: az container create -g MyResourceGroup --name mywinapp --image winappimage:latest --os-type Windows --cpu 2 --memory 3.5 - text: az container create -g MyResourceGroup --name myapp --image myimage:latest --ip-address public --ports 8081 --protocol UDP - name: Create a container in a container group with public IP address, ports and DNS name label. text: az container create -g MyResourceGroup --name myapp --image myimage:latest --ports 80 443 --dns-name-label contoso - name: Create a container in a container group that invokes a script upon start. From 3ceaa202a1309a4a9954ee40bcd0b11f85eceebf Mon Sep 17 00:00:00 2001 From: Oluwatosin Adewale Date: Wed, 23 Jan 2019 14:02:03 -0800 Subject: [PATCH 03/16] Added logic to verify number of command _help.py files matches help.yaml files. --- scripts/temp_help/convert_all.py | 81 +++++++++++++++++++++++--------- 1 file changed, 58 insertions(+), 23 deletions(-) diff --git a/scripts/temp_help/convert_all.py b/scripts/temp_help/convert_all.py index 85d8bfe062d..e9be4ef5375 100644 --- a/scripts/temp_help/convert_all.py +++ b/scripts/temp_help/convert_all.py @@ -7,29 +7,64 @@ import os import subprocess + +def get_repo_root(): + """ + Returns the root path to this repository. The root is where .git folder is. + """ + import os.path + here = os.path.dirname(os.path.realpath(__file__)) + + while not os.path.exists(os.path.join(here, '.git')): + here = os.path.dirname(here) + + return here + + if __name__ == "__main__": args = sys.argv[1:] - if args[0].lower() == "--core": - subprocess.run(["python", "./help_convert.py", "--get-all-mods"]) - - module_names = [] - with open("mod.txt", "r") as f: - for line in f: - module_names.append(line) - os.remove("mod.txt") - successes = 0 - with open(os.devnull, 'w') as devnull: # silence stdout by redirecting to devnull - for mod in module_names: - args = ["python", "./help_convert.py", mod, "--test"] - completed_process = subprocess.run(args, stdout=devnull) - if completed_process.returncode == 0: - successes += 1 - - if successes: - print("\n----------------------------------------------------------" - "Successfuly converted {} help.py files to help.yaml files." - "\n----------------------------------------------------------".format(successes)) - - elif args[0].lower() == "--extensions": - pass + if args: + if args[0].lower() == "--core": + subprocess.run(["python", "./help_convert.py", "--get-all-mods"]) + + module_names = [] + with open("mod.txt", "r") as f: + for line in f: + module_names.append(line) + os.remove("mod.txt") + successes = 0 + with open(os.devnull, 'w') as devnull: # silence stdout by redirecting to devnull + for mod in module_names: + args = ["python", "./help_convert.py", mod, "--test"] + completed_process = subprocess.run(args, stdout=devnull) + if completed_process.returncode == 0: + successes += 1 + + if successes: + print("\n----------------------------------------------------------" + "Successfuly converted {} help.py files to help.yaml files." + "\n----------------------------------------------------------".format(successes)) + + elif args[0].lower() == "--extensions": + pass + + elif args[0].lower() == "--count": + # Get info about help.py modules and converted help.yaml modules. + + src_root = os.path.join(get_repo_root(), "src", "command_modules") + + py_count = 0 + yaml_count = 0 + + for root, dirs, files in os.walk(src_root): + for file in files: + if file.endswith("_help.py") and os.path.dirname(root).endswith("command_modules") and os.path.join("build", "lib") not in root: + print("Found {}\n".format(os.path.join(root, file))) + py_count +=1 + if file.endswith("help.yaml") and os.path.dirname(root).endswith("command_modules"): + print("Found {}\n".format(os.path.join(root, file))) + yaml_count +=1 + + print("Found {} _help.py files\n".format(py_count)) + print("Found {} help.yaml files\n".format(yaml_count)) From 115a5b8daf8126ce956c693cc4e13a0e3ec7195a Mon Sep 17 00:00:00 2001 From: Oluwatosin Adewale Date: Wed, 23 Jan 2019 14:02:50 -0800 Subject: [PATCH 04/16] Convert all help.yaml files. No known errors / discrepancies. --- .../azure/cli/command_modules/acr/help.yaml | 629 ++++ .../azure/cli/command_modules/acs/help.yaml | 445 +++ .../cli/command_modules/advisor/help.yaml | 36 + .../azure/cli/command_modules/ams/help.yaml | 370 ++ .../cli/command_modules/appservice/help.yaml | 697 ++++ .../cli/command_modules/backup/help.yaml | 125 + .../azure/cli/command_modules/batch/help.yaml | 197 + .../cli/command_modules/batchai/help.yaml | 348 ++ .../cli/command_modules/billing/help.yaml | 14 + .../cli/command_modules/botservice/help.yaml | 230 ++ .../azure/cli/command_modules/cdn/help.yaml | 156 + .../azure/cli/command_modules/cloud/help.yaml | 27 + .../cognitiveservices/help.yaml | 103 + .../cli/command_modules/configure/help.yaml | 14 + .../cli/command_modules/consumption/help.yaml | 53 + .../cli/command_modules/container/help.yaml | 68 + .../cli/command_modules/cosmosdb/help.yaml | 44 + .../azure/cli/command_modules/dla/help.yaml | 275 ++ .../azure/cli/command_modules/dls/help.yaml | 214 ++ .../azure/cli/command_modules/dms/help.yaml | 197 + .../cli/command_modules/eventgrid/help.yaml | 179 + .../cli/command_modules/eventhubs/help.yaml | 273 ++ .../cli/command_modules/extension/help.yaml | 42 + .../cli/command_modules/feedback/help.yaml | 5 + .../azure/cli/command_modules/find/help.yaml | 9 + .../cli/command_modules/hdinsight/help.yaml | 88 + .../azure/cli/command_modules/iot/help.yaml | 522 +++ .../cli/command_modules/iotcentral/help.yaml | 46 + .../cli/command_modules/keyvault/help.yaml | 156 + .../azure/cli/command_modules/lab/help.yaml | 263 ++ .../azure/cli/command_modules/maps/help.yaml | 43 + .../cli/command_modules/monitor/help.yaml | 760 ++++ .../cli/command_modules/network/help.yaml | 3223 +++++++++++++++++ .../command_modules/policyinsights/help.yaml | 164 + .../cli/command_modules/profile/help.yaml | 53 + .../azure/cli/command_modules/rdbms/help.yaml | 537 +++ .../azure/cli/command_modules/redis/help.yaml | 29 + .../azure/cli/command_modules/relay/help.yaml | 256 ++ .../command_modules/reservations/help.yaml | 107 + .../cli/command_modules/resource/help.yaml | 846 +++++ .../azure/cli/command_modules/role/help.yaml | 313 ++ .../cli/command_modules/search/help.yaml | 17 + .../cli/command_modules/security/help.yaml | 282 ++ .../cli/command_modules/servicebus/help.yaml | 411 +++ .../command_modules/servicefabric/help.yaml | 147 + .../cli/command_modules/signalr/help.yaml | 53 + .../azure/cli/command_modules/sql/help.yaml | 450 +++ .../azure/cli/command_modules/sqlvm/help.yaml | 114 + .../cli/command_modules/storage/help.yaml | 634 ++++ .../azure/cli/command_modules/vm/help.yaml | 1323 +++++++ 50 files changed, 15587 insertions(+) create mode 100644 src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/help.yaml create mode 100644 src/command_modules/azure-cli-acs/azure/cli/command_modules/acs/help.yaml create mode 100644 src/command_modules/azure-cli-advisor/azure/cli/command_modules/advisor/help.yaml create mode 100644 src/command_modules/azure-cli-ams/azure/cli/command_modules/ams/help.yaml create mode 100644 src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/help.yaml create mode 100644 src/command_modules/azure-cli-backup/azure/cli/command_modules/backup/help.yaml create mode 100644 src/command_modules/azure-cli-batch/azure/cli/command_modules/batch/help.yaml create mode 100644 src/command_modules/azure-cli-batchai/azure/cli/command_modules/batchai/help.yaml create mode 100644 src/command_modules/azure-cli-billing/azure/cli/command_modules/billing/help.yaml create mode 100644 src/command_modules/azure-cli-botservice/azure/cli/command_modules/botservice/help.yaml create mode 100644 src/command_modules/azure-cli-cdn/azure/cli/command_modules/cdn/help.yaml create mode 100644 src/command_modules/azure-cli-cloud/azure/cli/command_modules/cloud/help.yaml create mode 100644 src/command_modules/azure-cli-cognitiveservices/azure/cli/command_modules/cognitiveservices/help.yaml create mode 100644 src/command_modules/azure-cli-configure/azure/cli/command_modules/configure/help.yaml create mode 100644 src/command_modules/azure-cli-consumption/azure/cli/command_modules/consumption/help.yaml create mode 100644 src/command_modules/azure-cli-container/azure/cli/command_modules/container/help.yaml create mode 100644 src/command_modules/azure-cli-cosmosdb/azure/cli/command_modules/cosmosdb/help.yaml create mode 100644 src/command_modules/azure-cli-dla/azure/cli/command_modules/dla/help.yaml create mode 100644 src/command_modules/azure-cli-dls/azure/cli/command_modules/dls/help.yaml create mode 100644 src/command_modules/azure-cli-dms/azure/cli/command_modules/dms/help.yaml create mode 100644 src/command_modules/azure-cli-eventgrid/azure/cli/command_modules/eventgrid/help.yaml create mode 100644 src/command_modules/azure-cli-eventhubs/azure/cli/command_modules/eventhubs/help.yaml create mode 100644 src/command_modules/azure-cli-extension/azure/cli/command_modules/extension/help.yaml create mode 100644 src/command_modules/azure-cli-feedback/azure/cli/command_modules/feedback/help.yaml create mode 100644 src/command_modules/azure-cli-find/azure/cli/command_modules/find/help.yaml create mode 100644 src/command_modules/azure-cli-hdinsight/azure/cli/command_modules/hdinsight/help.yaml create mode 100644 src/command_modules/azure-cli-iot/azure/cli/command_modules/iot/help.yaml create mode 100644 src/command_modules/azure-cli-iotcentral/azure/cli/command_modules/iotcentral/help.yaml create mode 100644 src/command_modules/azure-cli-keyvault/azure/cli/command_modules/keyvault/help.yaml create mode 100644 src/command_modules/azure-cli-lab/azure/cli/command_modules/lab/help.yaml create mode 100644 src/command_modules/azure-cli-maps/azure/cli/command_modules/maps/help.yaml create mode 100644 src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/help.yaml create mode 100644 src/command_modules/azure-cli-network/azure/cli/command_modules/network/help.yaml create mode 100644 src/command_modules/azure-cli-policyinsights/azure/cli/command_modules/policyinsights/help.yaml create mode 100644 src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/help.yaml create mode 100644 src/command_modules/azure-cli-rdbms/azure/cli/command_modules/rdbms/help.yaml create mode 100644 src/command_modules/azure-cli-redis/azure/cli/command_modules/redis/help.yaml create mode 100644 src/command_modules/azure-cli-relay/azure/cli/command_modules/relay/help.yaml create mode 100644 src/command_modules/azure-cli-reservations/azure/cli/command_modules/reservations/help.yaml create mode 100644 src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/help.yaml create mode 100644 src/command_modules/azure-cli-role/azure/cli/command_modules/role/help.yaml create mode 100644 src/command_modules/azure-cli-search/azure/cli/command_modules/search/help.yaml create mode 100644 src/command_modules/azure-cli-security/azure/cli/command_modules/security/help.yaml create mode 100644 src/command_modules/azure-cli-servicebus/azure/cli/command_modules/servicebus/help.yaml create mode 100644 src/command_modules/azure-cli-servicefabric/azure/cli/command_modules/servicefabric/help.yaml create mode 100644 src/command_modules/azure-cli-signalr/azure/cli/command_modules/signalr/help.yaml create mode 100644 src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/help.yaml create mode 100644 src/command_modules/azure-cli-sqlvirtualmachine/azure/cli/command_modules/sqlvm/help.yaml create mode 100644 src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/help.yaml create mode 100644 src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/help.yaml diff --git a/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/help.yaml b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/help.yaml new file mode 100644 index 00000000000..c91a98cc722 --- /dev/null +++ b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/help.yaml @@ -0,0 +1,629 @@ +version: 1 +content: +- group: + name: acr + summary: Manage private registries with Azure Container Registries. +- group: + name: acr credential + summary: Manage login credentials for Azure Container Registries. +- group: + name: acr config + summary: Configure policies for Azure Container Registries. +- group: + name: acr config content-trust + summary: Manage content-trust policy for Azure Container Registries. +- group: + name: acr repository + summary: Manage repositories (image names) for Azure Container Registries. +- group: + name: acr webhook + summary: Manage webhooks for Azure Container Registries. +- group: + name: acr replication + summary: Manage geo-replicated regions of Azure Container Registries. +- group: + name: acr build-task + summary: Manage build definitions, which can be triggered by git commits or base image updates for OS & Framework Patching. +- group: + name: acr task + summary: Manage a collection of steps for building, testing and OS & Framework patching container images using Azure Container Registries. +- command: + name: acr run + summary: Queues a quick run providing streamed logs for an Azure Container Registry. + examples: + - summary: Queue a local context, pushed to ACR with streaming logs. + command: > + az acr run -r MyRegistry -f bash-echo.yaml . + - summary: Queue a remote git context with streaming logs. + command: > + az acr run -r MyRegistry https://github.com/Azure-Samples/acr-tasks.git -f hello-world.yaml +- group: + name: acr helm + summary: Manage helm charts for Azure Container Registries. +- group: + name: acr helm repo + summary: Manage helm chart repositories for Azure Container Registries. +- group: + name: acr network-rule + summary: Manage network rules for Azure Container Registries. +- command: + name: acr check-name + summary: Checks if an Azure Container Registry name is valid and available for use. + examples: + - summary: Check if a registry name already exists. + command: > + az acr check-name -n doesthisnameexist +- command: + name: acr list + summary: Lists all the container registries under the current subscription. + examples: + - summary: List container registries and show the results in a table, across multiple resource groups. + command: > + az acr list -o table + - summary: List container registries in a resource group and show the results in a table. + command: > + az acr list -g MyResourceGroup -o table +- command: + name: acr create + summary: Creates an Azure Container Registry. + examples: + - summary: Create a managed container registry with the Standard SKU. + command: > + az acr create -n MyRegistry -g MyResourceGroup --sku Standard + - summary: Create an Azure Container Registry with a new storage account with the Classic SKU (Classic registries are being deprecated by March 2019). + command: > + az acr create -n MyRegistry -g MyResourceGroup --sku Classic +- command: + name: acr delete + summary: Deletes an Azure Container Registry. + examples: + - summary: Delete an Azure Container Registry. + command: > + az acr delete -n MyRegistry +- command: + name: acr show + summary: Get the details of an Azure Container Registry. + examples: + - summary: Get the login server for an Azure Container Registry. + command: > + az acr show -n MyRegistry --query loginServer +- command: + name: acr update + summary: Update an Azure Container Registry. + examples: + - summary: Update tags for an Azure Container Registry. + command: > + az acr update -n MyRegistry --tags key1=value1 key2=value2 + - summary: Update the storage account for an Azure Container Registry (Classic Registries are being deprecated as of March 2019). + command: > + az acr update -n MyRegistry --storage-account-name MyStorageAccount + - summary: Enable the administrator user account for an Azure Container Registry. + command: > + az acr update -n MyRegistry --admin-enabled true +- command: + name: acr login + summary: Log in to an Azure Container Registry through the Docker CLI. + description: Docker must be installed on your machine. + examples: + - summary: Log in to an Azure Container Registry + command: > + az acr login -n MyRegistry +- command: + name: acr show-usage + summary: Get the storage usage for an Azure Container Registry. + examples: + - summary: Get the storage usage for an Azure Container Registry. + command: > + az acr show-usage -n MyRegistry +- command: + name: acr config content-trust show + summary: Show the configured content-trust policy for an Azure Container Registry. + examples: + - summary: Show the configured content-trust policy for an Azure Container Registry + command: > + az acr config content-trust show -n MyRegistry +- command: + name: acr config content-trust update + summary: Update content-trust policy for an Azure Container Registry. + examples: + - summary: Update content-trust policy for an Azure Container Registry + command: > + az acr config content-trust update -n MyRegistry --status Enabled +- command: + name: acr credential show + summary: Get the login credentials for an Azure Container Registry. + examples: + - summary: Get the login credentials for an Azure Container Registry. + command: > + az acr credential show -n MyRegistry + - summary: Get the username used to log in to an Azure Container Registry. + command: > + az acr credential show -n MyRegistry --query username + - summary: Get a password used to log in to an Azure Container Registry. + command: > + az acr credential show -n MyRegistry --query passwords[0].value +- command: + name: acr credential renew + summary: Regenerate login credentials for an Azure Container Registry. + examples: + - summary: Renew the second password for an Azure Container Registry. + command: > + az acr credential renew -n MyRegistry --password-name password2 +- command: + name: acr repository list + summary: List repositories in an Azure Container Registry. + examples: + - summary: List repositories in a given Azure Container Registry. + command: az acr repository list -n MyRegistry +- command: + name: acr repository show-tags + summary: Show tags for a repository in an Azure Container Registry. + examples: + - summary: Show tags of a repository in an Azure Container Registry. + command: az acr repository show-tags -n MyRegistry --repository MyRepository + - summary: Show the detailed information of tags of a repository in an Azure Container Registry. + command: az acr repository show-tags -n MyRegistry --repository MyRepository --detail + - summary: Show the detailed information of the latest 10 tags ordered by timestamp of a repository in an Azure Container Registry. + command: az acr repository show-tags -n MyRegistry --repository MyRepository --top 10 --orderby time_desc --detail +- command: + name: acr repository show-manifests + summary: Show manifests of a repository in an Azure Container Registry. + examples: + - summary: Show manifests of a repository in an Azure Container Registry. + command: az acr repository show-manifests -n MyRegistry --repository MyRepository + - summary: Show the latest 10 manifests ordered by timestamp of a repository in an Azure Container Registry. + command: az acr repository show-manifests -n MyRegistry --repository MyRepository --top 10 --orderby time_desc + - summary: Show the detailed information of the latest 10 manifests ordered by timestamp of a repository in an Azure Container Registry. + command: az acr repository show-manifests -n MyRegistry --repository MyRepository --top 10 --orderby time_desc --detail +- command: + name: acr repository show + summary: Get the attributes of a repository or image in an Azure Container Registry. + examples: + - summary: Get the attributes of the repository 'hello-world'. + command: az acr repository show -n MyRegistry --repository hello-world + - summary: Get the attributes of the image referenced by tag 'hello-world:latest'. + command: az acr repository show -n MyRegistry --image hello-world:latest + - summary: Get the attributes of the image referenced by digest 'hello-world@sha256:abc123'. + command: az acr repository show -n MyRegistry --image hello-world@sha256:abc123 +- command: + name: acr repository update + summary: Update the attributes of a repository or image in an Azure Container Registry. + examples: + - summary: Update the attributes of the repository 'hello-world' to disable write operation. + command: az acr repository update -n MyRegistry --repository hello-world --write-enabled false + - summary: Update the attributes of the image referenced by tag 'hello-world:latest' to disable write operation. + command: az acr repository update -n MyRegistry --image hello-world:latest --write-enabled false + - summary: Update the attributes of the image referenced by digest 'hello-world@sha256:abc123' to disable write operation. + command: az acr repository update -n MyRegistry --image hello-world@sha256:abc123 --write-enabled false +- command: + name: acr repository delete + summary: Delete a repository or image in an Azure Container Registry. + description: This command deletes all associated layer data that are not referenced by any other manifest in the container registry. + examples: + - summary: Delete a repository from an Azure Container Registry. This deletes all manifests and tags under 'hello-world'. + command: az acr repository delete -n MyRegistry --repository hello-world + - summary: Delete an image by tag. This deletes the manifest referenced by 'hello-world:latest' and all other tags referencing the manifest. + command: az acr repository delete -n MyRegistry --image hello-world:latest + - summary: Delete an image by sha256-based manifest digest. This deletes the manifest identified by 'hello-world@sha256:abc123' and all tags referencing the manifest. + command: az acr repository delete -n MyRegistry --image hello-world@sha256:abc123 +- command: + name: acr repository untag + summary: Untag an image in an Azure Container Registry. + description: This command does not delete the manifest referenced by the tag or any associated layer data. + examples: + - summary: Untag an image from a repository. + command: az acr repository untag -n MyRegistry --image hello-world:latest +- command: + name: acr webhook list + summary: List all of the webhooks for an Azure Container Registry. + examples: + - summary: List webhooks and show the results in a table. + command: > + az acr webhook list -r MyRegistry -o table +- command: + name: acr webhook create + summary: Create a webhook for an Azure Container Registry. + examples: + - summary: Create a webhook for an Azure Container Registry that will deliver docker push and delete events to a service URI. + command: > + az acr webhook create -n MyWebhook -r MyRegistry --uri http://myservice.com --actions push delete + - summary: Create a webhook for an Azure Container Registry that will deliver docker push events to a service URI with a basic authentication header. + command: > + az acr webhook create -n MyWebhook -r MyRegistry --uri http://myservice.com --actions push --headers "Authorization=Basic 000000" + - summary: Create a webhook for an Azure Container Registry that will deliver helm chart push and delete events to a service URI. + command: > + az acr webhook create -n MyWebhook -r MyRegistry --uri http://myservice.com --actions chart_push chart_delete +- command: + name: acr webhook delete + summary: Delete a webhook from an Azure Container Registry. + examples: + - summary: Delete a webhook from an Azure Container Registry. + command: > + az acr webhook delete -n MyWebhook -r MyRegistry +- command: + name: acr webhook show + summary: Get the details of a webhook. + examples: + - summary: Get the details of a webhook. + command: > + az acr webhook show -n MyWebhook -r MyRegistry +- command: + name: acr webhook update + summary: Update a webhook. + examples: + - summary: Update headers for a webhook. + command: > + az acr webhook update -n MyWebhook -r MyRegistry --headers "Authorization=Basic 000000" + - summary: Update the service URI and actions for a webhook. + command: > + az acr webhook update -n MyWebhook -r MyRegistry --uri http://myservice.com --actions push delete + - summary: Disable a webhook. + command: > + az acr webhook update -n MyWebhook -r MyRegistry --status disabled +- command: + name: acr webhook get-config + summary: Get the service URI and custom headers for the webhook. + examples: + - summary: Get the configuration information for a webhook. + command: > + az acr webhook get-config -n MyWebhook -r MyRegistry +- command: + name: acr webhook ping + summary: Trigger a ping event for a webhook. + examples: + - summary: Trigger a ping event for a webhook. + command: > + az acr webhook ping -n MyWebhook -r MyRegistry +- command: + name: acr webhook list-events + summary: List recent events for a webhook. + examples: + - summary: List recent events for a webhook. + command: > + az acr webhook list-events -n MyWebhook -r MyRegistry +- command: + name: acr replication list + summary: List all of the regions for a geo-replicated Azure Container Registry. + examples: + - summary: List replications and show the results in a table. + command: > + az acr replication list -r MyRegistry -o table +- command: + name: acr replication create + summary: Create a replicated region for an Azure Container Registry. + examples: + - summary: Create a replicated region for an Azure Container Registry. + command: > + az acr replication create -r MyRegistry -l westus +- command: + name: acr replication delete + summary: Delete a replicated region from an Azure Container Registry. + examples: + - summary: Delete a replicated region from an Azure Container Registry. + command: > + az acr replication delete -n MyReplication -r MyRegistry +- command: + name: acr replication show + summary: Get the details of a replicated region. + examples: + - summary: Get the details of a replicated region + command: > + az acr replication show -n MyReplication -r MyRegistry +- command: + name: acr replication update + summary: Updates a replication. + examples: + - summary: Update tags for a replication + command: > + az acr replication update -n MyReplication -r MyRegistry --tags key1=value1 key2=value2 +- command: + name: acr task create + summary: Creates a series of steps for building, testing and OS & Framework patching containers. Tasks support triggers from git commits and base image updates. + examples: + - summary: Create a Linux task from a public GitHub repository which builds the hello-world image without triggers + command: > + az acr task create -t hello-world:{{.Run.ID}} -n hello-world -r MyRegistry -c https://github.com/Azure-Samples/acr-build-helloworld-node.git -f Dockerfile --commit-trigger-enabled false --pull-request-trigger-enabled false + - summary: Create a Linux task using a private GitHub repository which builds the hello-world image without triggers + command: > + az acr task create -t hello-world:{{.Run.ID}} -n hello-world -r MyRegistry -c https://github.com/Azure-Samples/acr-build-helloworld-node.git -f Dockerfile --commit-trigger-enabled false --pull-request-trigger-enabled false --git-access-token 0000000000000000000000000000000000000000 + - summary: Create a Linux task from a public GitHub repository which builds the hello-world image with a git commit trigger + command: > + az acr task create -t hello-world:{{.Run.ID}} -n hello-world -r MyRegistry -c https://github.com/Azure-Samples/acr-build-helloworld-node.git -f Dockerfile --git-access-token 0000000000000000000000000000000000000000 + - summary: Create a Windows task from a public GitHub repository which builds the Azure Container Builder image. + command: > + az acr task create -t acb:{{.Run.ID}} -n acb-win -r MyRegistry -c https://github.com/Azure/acr-builder.git -f Windows.Dockerfile --commit-trigger-enabled false --pull-request-trigger-enabled false --os Windows +- command: + name: acr task show + summary: Get the properties of a named task for an Azure Container Registry. + examples: + - summary: Get the properties of a task, displaying the results in a table. + command: > + az acr task show -n MyTask -r MyRegistry -o table + - summary: Get the properties of a task, including secure properties. + command: > + az acr task show -n MyTask -r MyRegistry --with-secure-properties +- command: + name: acr task list + summary: List the tasks for an Azure Container Registry. + examples: + - summary: List tasks and show the results in a table. + command: > + az acr task list -r MyRegistry -o table +- command: + name: acr task delete + summary: Delete a task from an Azure Container Registry. + examples: + - summary: Delete a task from an Azure Container Registry. + command: > + az acr task delete -n MyTask -r MyRegistry +- command: + name: acr task update + summary: Update a task for an Azure Container Registry. + examples: + - summary: Update base image updates to trigger on all dependent images of a multi-stage dockerfile, and status of a task in an Azure Container Registry. + command: > + az acr task update -n MyTask -r MyRegistry --base-image-trigger-type All --status Disabled +- command: + name: acr task list-runs + summary: List all of the executed runs for an Azure Container Registry, with the ability to filter by a specific Task. + examples: + - summary: List all of the runs for a registry and show the results in a table. + command: > + az acr task list-runs -r MyRegistry -o table + - summary: List runs for a task and show the results in a table. + command: > + az acr task list-runs -r MyRegistry -n MyTask -o table + - summary: List the last 10 successful runs for a registry and show the results in a table. + command: > + az acr task list-runs -r MyRegistry --run-status Succeeded --top 10 -o table + - summary: List all of the runs that built the image 'hello-world' for a registry and show the results in a table. + command: > + az acr task list-runs -r MyRegistry --image hello-world -o table +- command: + name: acr task show-run + summary: Get the properties of a specified run of an Azure Container Registry Task. + examples: + - summary: Get the details of a run, displaying the results in a table. + command: > + az acr task show-run -r MyRegistry --run-id runId -o table +- command: + name: acr task cancel-run + summary: Cancel a specified run of an Azure Container Registry. + examples: + - summary: Cancel a run + command: > + az acr task cancel-run -r MyRegistry --run-id runId +- command: + name: acr task run + summary: Manually trigger a task that might otherwise be waiting for git commits or base image update triggers. + examples: + - summary: Trigger a task. + command: > + az acr task run -n MyTask -r MyRegistry +- command: + name: acr task update-run + summary: Patch the run properties of an Azure Container Registry Task. + examples: + - summary: Update an existing run to be archived. + command: > + az acr task update-run -r MyRegistry --run-id runId --no-archive false +- command: + name: acr task logs + summary: Show logs for a particular run. If no run-id is supplied, show logs for the last created run. + examples: + - summary: Show logs for the last created run in the registry. + command: > + az acr task logs -r MyRegistry + - summary: Show logs for the last created run in the registry, filtered by task. + command: > + az acr task logs -r MyRegistry -n MyTask + - summary: Show logs for a particular run. + command: > + az acr task logs -r MyRegistry --run-id runId + - summary: Show logs for the last created run in the registry that built the image 'hello-world'. + command: > + az acr task logs -r MyRegistry --image hello-world +- command: + name: acr build + summary: Queues a quick build, providing streaming logs for an Azure Container Registry. + examples: + - summary: Queue a local context as a Linux build, tag it, and push it to the registry. + command: > + az acr build -t sample/hello-world:{{.Run.ID}} -r MyRegistry . + - summary: Queue a local context as a Linux build, tag it, and push it to the registry without streaming logs. + command: > + az acr build -t sample/hello-world:{{.Run.ID}} -r MyRegistry --no-logs . + - summary: Queue a local context as a Linux build without pushing it to the registry. + command: > + az acr build -t sample/hello-world:{{.Run.ID}} -r MyRegistry --no-push . + - summary: Queue a local context as a Linux build without pushing it to the registry. + command: > + az acr build -r MyRegistry . + - summary: Queue a remote GitHub context as a Windows build, tag it, and push it to the registry. + command: > + az acr build -r MyRegistry https://github.com/Azure/acr-builder.git -f Windows.Dockerfile --os Windows +- command: + name: acr build-task create + summary: Creates a new build definition which can be triggered by git commits or base image updates for an Azure Container Registry. + examples: + - summary: Create a build definition without git commits and base image updates. + command: > + az acr build-task create -t hello-world:{{.Build.ID}} -n hello-world -r MyRegistry -c https://github.com/Azure-Samples/acr-build-helloworld-node.git --commit-trigger-enabled false --git-access-token 0000000000000000000000000000000000000000 + - summary: Create a build definition which updates on git commits and base image updates (--git-access-token must have permissions to create github webhooks). + command: > + az acr build-task create -t hello-world:{{.Build.ID}} -n hello-world -r MyRegistry -c https://github.com/Azure-Samples/acr-build-helloworld-node.git --git-access-token 0000000000000000000000000000000000000000 +- command: + name: acr build-task show + summary: Get the properties of a specified build task for an Azure Container Registry. + examples: + - summary: Get the details of a build task, displaying the results in a table. + command: > + az acr build-task show -n MyBuildTask -r MyRegistry -o table + - summary: Get the details of a build task including secure properties. + command: > + az acr build-task show -n MyBuildTask -r MyRegistry --with-secure-properties +- command: + name: acr build-task list + summary: List the build tasks for an Azure Container Registry. + examples: + - summary: List build tasks and show the results in a table. + command: > + az acr build-task list -r MyRegistry -o table +- command: + name: acr build-task delete + summary: Delete a build task from an Azure Container Registry. + examples: + - summary: Delete a build task from an Azure Container Registry + command: > + az acr build-task delete -n MyBuildTask -r MyRegistry +- command: + name: acr build-task update + summary: Update a build task for an Azure Container Registry. + examples: + - summary: Update the git access token for a build definition in an Azure Container Registry. + command: > + az acr build-task update -n MyBuildTask -r MyRegistry --git-access-token 0000000000000000000000000000000000000000 +- command: + name: acr build-task list-builds + summary: List all of the executed builds for an Azure Container Registry. + examples: + - summary: List builds for a build task and show the results in a table. + command: > + az acr build-task list-builds -n MyBuildTask -r MyRegistry -o table + - summary: List all of the builds for a registry displaying the results in a table. + command: > + az acr build-task list-builds -r MyRegistry -o table + - summary: List the last 10 successful builds for a registry displaying the results in a table. + command: > + az acr build-task list-builds -r MyRegistry --build-status Succeeded --top 10 -o table + - summary: List all of the builds that built the image 'hello-world' for an Azure Container Registry, displaying the results in a table. + command: > + az acr build-task list-builds -r MyRegistry --image hello-world -o table +- command: + name: acr build-task show-build + summary: Get the properties of a specified build for an Azure Container Registry. + examples: + - summary: Get the details of a build, displaying the results in a table. + command: > + az acr build-task show-build -r MyRegistry --build-id aab1 -o table +- command: + name: acr build-task run + summary: Trigger a build task that might otherwise be waiting for git commits or base image update triggers for an Azure Container Registry. + examples: + - summary: Trigger a build task. + command: > + az acr build-task run -n MyBuildTask -r MyRegistry +- command: + name: acr build-task update-build + summary: Patch the build properties of an Azure Container Registry. + examples: + - summary: Update an existing build to be archived. + command: > + az acr build-task update-build -r MyRegistry --build-id MyBuild --no-archive false +- command: + name: acr build-task logs + summary: Show logs for a particular build. If no build-id is supplied, display the logs for the last created build. + examples: + - summary: Show logs for the last created build in the registry. + command: > + az acr build-task logs -r MyRegistry + - summary: Show logs for the last created build in the registry, filtered by build task. + command: > + az acr build-task logs -r MyRegistry -n MyBuildTask + - summary: Show logs for a particular build. + command: > + az acr build-task logs -r MyRegistry --build-id aa1b + - summary: Show logs for the last created build in the registry that built the image 'hello-world'. + command: > + az acr build-task logs -r MyRegistry --image hello-world +- command: + name: acr import + summary: Imports an image to an Azure Container Registry from another Container Registry. Import removes the need to docker pull, docker tag, docker push. + examples: + - summary: Import an image to the target registry and inherits sourcerepository:sourcetag from the source registry. + command: > + az acr import -n MyRegistry --source sourceregistry.azurecr.io/sourcerepository:sourcetag + - summary: Import an image from a registry in a different subscription. + command: > + az acr import -n MyRegistry --source sourcerepository:sourcetag -t targetrepository:targettag -r /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sourceResourceGroup/providers/Microsoft.ContainerRegistry/registries/sourceRegistry + - summary: Import an image from a public repository in Docker Hub + command: > + az acr import -n MyRegistry --source docker.io/sourcerepository:sourcetag -t targetrepository:targettag +- command: + name: acr helm list + summary: List all helm charts in an Azure Container Registry. + examples: + - summary: List all helm charts in an Azure Container Registry + command: > + az acr helm list -n MyRegistry +- command: + name: acr helm show + summary: Describe a helm chart in an Azure Container Registry. + examples: + - summary: Show all versions of a helm chart in an Azure Container Registry + command: > + az acr helm show -n MyRegistry mychart + - summary: Show a helm chart version in an Azure Container Registry + command: > + az acr helm show -n MyRegistry mychart --version 0.3.2 +- command: + name: acr helm delete + summary: Delete a helm chart version in an Azure Container Registry. + examples: + - summary: Delete all versions of a helm chart in an Azure Container Registry + command: > + az acr helm delete -n MyRegistry mychart + - summary: Delete a helm chart version in an Azure Container Registry + command: > + az acr helm delete -n MyRegistry mychart --version 0.3.2 +- command: + name: acr helm push + summary: Push a helm chart package to an Azure Container Registry. + examples: + - summary: Push a chart package to an Azure Container Registry + command: > + az acr helm push -n MyRegistry mychart-0.3.2.tgz + - summary: Push a chart package to an Azure Container Registry, overwriting the existing one. + command: > + az acr helm push -n MyRegistry mychart-0.3.2.tgz --force +- command: + name: acr helm repo add + summary: Add a helm chart repository from an Azure Container Registry through the Helm CLI. + description: Helm must be installed on your machine. + examples: + - summary: Add a helm chart repository from an Azure Container Registry to manage helm charts. + command: > + az acr helm repo add -n MyRegistry +- command: + name: acr network-rule list + summary: List network rules. + examples: + - summary: List network rules for a registry. + command: > + az acr network-rule list -n MyRegistry +- command: + name: acr network-rule add + summary: Add a network rule. + examples: + - summary: Add a rule to allow access for a subnet in the same resource group as the registry. + command: > + az acr network-rule add -n MyRegistry --vnet-name myvnet --subnet mysubnet + - summary: Add a rule to allow access for a subnet in a different subscription or resource group. + command: > + az acr network-rule add -n MyRegistry --subnet /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet + - summary: Add a rule to allow access for a specific IP address-range. + command: > + az acr network-rule add -n MyRegistry --ip-address 23.45.1.0/24 +- command: + name: acr network-rule remove + summary: Remove a network rule. + examples: + - summary: Remove a rule that allows access for a subnet in the same resource group as the registry. + command: > + az acr network-rule remove -n MyRegistry --vnet-name myvnet --subnet mysubnet + - summary: Remove a rule that allows access for a subnet in a different subscription or resource group. + command: > + az acr network-rule remove -n MyRegistry --subnet /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet + - summary: Remove a rule that allows access for a specific IP address-range. + command: > + az acr network-rule remove -n MyRegistry --ip-address 23.45.1.0/24 diff --git a/src/command_modules/azure-cli-acs/azure/cli/command_modules/acs/help.yaml b/src/command_modules/azure-cli-acs/azure/cli/command_modules/acs/help.yaml new file mode 100644 index 00000000000..bd1705f2d9d --- /dev/null +++ b/src/command_modules/azure-cli-acs/azure/cli/command_modules/acs/help.yaml @@ -0,0 +1,445 @@ +version: 1 +content: +- group: + name: acs + summary: Manage Azure Container Services. + description: | + ACS will be retired as a standalone service on January 31, 2020. + + If you use the Kubernetes orchestrator, please migrate to AKS by January 31, 2020. +- command: + name: acs browse + summary: Show the dashboard for a service container's orchestrator in a web browser. +- command: + name: acs create + summary: Create a new container service. + arguments: + - name: --service-principal + summary: Service principal used for authentication to Azure APIs. + description: If not specified, a new service principal with the contributor role is created and cached at $HOME/.azure/acsServicePrincipal.json to be used by subsequent `az acs` commands. + - name: --client-secret + summary: Secret associated with the service principal. This argument is required if `--service-principal` is specified. + - name: --agent-count + summary: Set the default number of agents for the agent pools. + description: Note that DC/OS clusters will have 1 or 2 additional public agents. + examples: + - summary: Create a DCOS cluster with an existing SSH key. + command: |- + az acs create --orchestrator-type DCOS -g MyResourceGroup -n MyContainerService \ + --ssh-key-value /path/to/publickey + - summary: Create a DCOS cluster with two agent pools. + command: |- + az acs create -g MyResourceGroup -n MyContainerService --agent-profiles '[ \ + { \ + "name": "agentpool1" \ + }, \ + { \ + "name": "agentpool2" \ + }]' + - summary: Create a DCOS cluster where the second agent pool has a vmSize specified. + command: |- + az acs create -g MyResourceGroup -n MyContainerService --agent-profiles '[ \ + { \ + "name": "agentpool1" \ + }, \ + { \ + "name": "agentpool2", \ + "vmSize": "Standard_D2" \ + }]' + - summary: Create a DCOS cluster with agent-profiles specified from a file. + command: az acs create -g MyResourceGroup -n MyContainerService --agent-profiles MyAgentProfiles.json +- group: + name: acs dcos + summary: Commands to manage a DC/OS-orchestrated Azure Container Service. +- command: + name: acs dcos install-cli + summary: Download and install the DC/OS command-line tool for a cluster. +- command: + name: acs kubernetes install-cli + summary: Download and install the Kubernetes command-line tool for a cluster. +- group: + name: acs kubernetes + summary: Commands to manage a Kubernetes-orchestrated Azure Container Service. +- command: + name: acs kubernetes get-credentials + summary: Download and install credentials to access a cluster. This command requires the same private-key used to create the cluster. +- command: + name: acs list-locations + summary: List locations where Azure Container Service is in preview and in production. +- command: + name: acs scale + summary: Change the private agent count of a container service. + arguments: + - name: --new-agent-count + summary: The number of agents for the container service. +- command: + name: acs show + summary: Show the details for a container service. +- command: + name: acs wait + summary: Wait for a container service to reach a desired state. + description: If an operation on a container service was interrupted or was started with `--no-wait`, use this command to wait for it to complete. +- group: + name: aks + summary: Manage Azure Kubernetes Services. +- command: + name: aks browse + summary: Show the dashboard for a Kubernetes cluster in a web browser. + arguments: + - name: --disable-browser + summary: Don't launch a web browser after establishing port-forwarding. + description: Add this argument when launching a web browser manually, or for automated testing. + - name: --listen-port + summary: The listening port for the dashboard. +- command: + name: aks create + summary: Create a new managed Kubernetes cluster. + arguments: + - name: --generate-ssh-keys + summary: Generate SSH public and private key files if missing. + - name: --service-principal + summary: Service principal used for authentication to Azure APIs. + description: If not specified, a new service principal is created and cached at $HOME/.azure/aksServicePrincipal.json to be used by subsequent `az aks` commands. + - name: --skip-subnet-role-assignment + summary: Skip role assignment for subnet (advanced networking). + description: If specified, please make sure your service principal has the access to your subnet. + - name: --client-secret + summary: Secret associated with the service principal. This argument is required if `--service-principal` is specified. + - name: --node-vm-size + summary: Size of Virtual Machines to create as Kubernetes nodes. + - name: --dns-name-prefix + summary: Prefix for hostnames that are created. If not specified, generate a hostname using the managed cluster and resource group names. + - name: --node-count + summary: Number of nodes in the Kubernetes node pool. After creating a cluster, you can change the size of its node pool with `az aks scale`. + - name: --node-osdisk-size + summary: Size in GB of the OS disk for each node in the node pool. Minimum 30 GB. + - name: --kubernetes-version + summary: Version of Kubernetes to use for creating the cluster, such as "1.7.12" or "1.8.7". + value-sources: + - link: + command: '`az aks get-versions`' + - name: --ssh-key-value + summary: Public key path or key contents to install on node VMs for SSH access. For example, 'ssh-rsa AAAAB...snip...UcyupgH azureuser@linuxvm'. + - name: --admin-username + summary: User account to create on node VMs for SSH access. + - name: --aad-client-app-id + summary: The ID of an Azure Active Directory client application of type "Native". This application is for user login via kubectl. + - name: --aad-server-app-id + summary: The ID of an Azure Active Directory server application of type "Web app/API". This application represents the managed cluster's apiserver (Server application). + - name: --aad-server-app-secret + summary: The secret of an Azure Active Directory server application. + - name: --aad-tenant-id + summary: The ID of an Azure Active Directory tenant. + - name: --dns-service-ip + summary: An IP address assigned to the Kubernetes DNS service. + description: This address must be within the Kubernetes service address range specified by "--service-cidr". For example, 10.0.0.10. + - name: --docker-bridge-address + summary: A specific IP address and netmask for the Docker bridge, using standard CIDR notation. + description: This address must not be in any Subnet IP ranges, or the Kubernetes service address range. For example, 172.17.0.1/16. + - name: --enable-addons + summary: Enable the Kubernetes addons in a comma-separated list. + description: |- + These addons are available: + http_application_routing - configure ingress with automatic public DNS name creation. + monitoring - turn on Log Analytics monitoring. Uses the Log Analytics Default Workspace if it exists, else creates one. Specify "--workspace-resource-id" to use an existing workspace. + virtual-node - enable AKS Virtual Node (PREVIEW). Requires --subnet_name to provide the name of an existing subnet for the Virtual Node to use. + - name: --disable-rbac + summary: Disable Kubernetes Role-Based Access Control. + - name: --enable-rbac + summary: 'Enable Kubernetes Role-Based Access Control. Default: enabled.' + - name: --max-pods + summary: The maximum number of pods deployable to a node. + description: If not specified, defaults to 110, or 30 for advanced networking configurations. + - name: --network-plugin + summary: The Kubernetes network plugin to use. + description: Specify "azure" for advanced networking configurations. Defaults to "kubenet". + - name: --network-policy + summary: (PREVIEW) The Kubernetes network policy to use. + description: | + Using together with "azure" network plugin. + Specify "azure" for Azure network policy manager and "calico" for calico network policy controller. + Defaults to "" (network policy disabled). + - name: --no-ssh-key + summary: Do not use or create a local SSH key. + description: To access nodes after creating a cluster with this option, use the Azure Portal. + - name: --pod-cidr + summary: A CIDR notation IP range from which to assign pod IPs when kubenet is used. + description: This range must not overlap with any Subnet IP ranges. For example, 172.244.0.0/16. + - name: --service-cidr + summary: A CIDR notation IP range from which to assign service cluster IPs. + description: This range must not overlap with any Subnet IP ranges. For example, 10.0.0.0/16. + - name: --vnet-subnet-id + summary: The ID of a subnet in an existing VNet into which to deploy the cluster. + - name: --workspace-resource-id + summary: The resource ID of an existing Log Analytics Workspace to use for storing monitoring data. If not specified, uses the default Log Analytics Workspace if it exists, otherwise creates one. + examples: + - summary: Create a Kubernetes cluster with an existing SSH public key. + command: az aks create -g MyResourceGroup -n MyManagedCluster --ssh-key-value /path/to/publickey + - summary: Create a Kubernetes cluster with a specific version. + command: az aks create -g MyResourceGroup -n MyManagedCluster --kubernetes-version 1.8.7 + - summary: Create a Kubernetes cluster with a larger node pool. + command: az aks create -g MyResourceGroup -n MyManagedCluster --node-count 7 +- command: + name: aks delete + summary: Delete a managed Kubernetes cluster. +- command: + name: aks update-credentials + summary: Update credentials for a managed Kubernetes cluster, like service principal. + arguments: + - name: --reset-service-principal + summary: Reset service principal for a managed cluster. + - name: --service-principal + summary: Service principal used for authentication to Azure APIs. + - name: --client-secret + summary: Secret associated with the service principal. This argument is required if `--service-principal` is specified. +- command: + name: aks disable-addons + summary: Disable Kubernetes addons. + arguments: + - name: --addons + summary: Disable the Kubernetes addons in a comma-separated list. +- command: + name: aks enable-addons + summary: Enable Kubernetes addons. + description: |- + These addons are available: + http_application_routing - configure ingress with automatic public DNS name creation. + monitoring - turn on Log Analytics monitoring. Requires "--workspace-resource-id". + virtual-node - enable AKS Virtual Node (PREVIEW). Requires --subnet_name to provide the name of an existing subnet for the Virtual Node to use. + arguments: + - name: --addons + summary: Enable the Kubernetes addons in a comma-separated list. + - name: --workspace-resource-id + summary: The resource ID of an existing Log Analytics Workspace to use for storing monitoring data. +- command: + name: aks get-credentials + summary: Get access credentials for a managed Kubernetes cluster. + arguments: + - name: --admin + summary: 'Get cluster administrator credentials. Default: cluster user credentials.' + - name: --file + summary: Kubernetes configuration file to update. Use "-" to print YAML to stdout instead. + - name: --overwrite-existing + summary: Overwrite any existing cluster entry with the same name. +- command: + name: aks get-upgrades + summary: Get the upgrade versions available for a managed Kubernetes cluster. +- command: + name: aks get-versions + summary: Get the versions available for creating a managed Kubernetes cluster. +- command: + name: aks install-cli + summary: Download and install kubectl, the Kubernetes command-line tool. +- command: + name: aks install-connector + summary: (PREVIEW) Install the ACI Connector on a managed Kubernetes cluster. + arguments: + - name: --chart-url + summary: URL of a Helm chart that installs ACI Connector. + - name: --connector-name + summary: Name of the ACI Connector. + - name: --os-type + summary: Install support for deploying ACIs of this operating system type. + - name: --service-principal + summary: Service principal used for authentication to Azure APIs. + description: If not specified, use the AKS service principal defined in the file /etc/kubernetes/azure.json on the node which runs the virtual kubelet pod. + - name: --client-secret + summary: Secret associated with the service principal. This argument is required if `--service-principal` is specified. + - name: --image-tag + summary: The image tag of the virtual kubelet. Use 'latest' if it is not specified + - name: --aci-resource-group + summary: The resource group to create the ACI container groups. Use the MC_* resource group if it is not specified. + - name: --location + summary: The location to create the ACI container groups. Use the location of the MC_* resource group if it is not specified. + examples: + - summary: Install the ACI Connector for Linux to a managed Kubernetes cluster. + command: |- + az aks install-connector --name MyManagedCluster --resource-group MyResourceGroup + - summary: Install the ACI Connector for Windows to a managed Kubernetes cluster. + command: |- + az aks install-connector --name MyManagedCluster --resource-group MyResourceGroup \ + --connector-name aci-connector --os-type Windows + - summary: Install the ACI Connector for both Windows and Linux to a managed Kubernetes cluster. + command: |- + az aks install-connector --name MyManagedCluster --resource-group MyResourceGroup \ + --connector-name aci-connector --os-type Both + - summary: Install the ACI Connector using a specific service principal in a specific resource group. + command: |- + az aks install-connector --name MyManagedCluster --resource-group MyResourceGroup \ + --connector-name aci-connector --service-principal --client-secret \ + --aci-resource-group ACI-resource-group + - summary: Install the ACI Connector from a custom Helm chart with custom tag. + command: |- + az aks install-connector --name MyManagedCluster --resource-group MyResourceGroup \ + --connector-name aci-connector --chart-url --image-tag +- command: + name: aks list + summary: List managed Kubernetes clusters. +- command: + name: aks remove-connector + summary: (PREVIEW) Remove the ACI Connector from a managed Kubernetes cluster. + arguments: + - name: --connector-name + summary: Name of the ACI Connector. + - name: --graceful + summary: Use a "cordon and drain" strategy to evict pods safely before removing the ACI node. + - name: --os-type + summary: Remove support for deploying ACIs of this operating system type. + examples: + - summary: Remove the ACI Connector from a cluster using the graceful mode. + command: |- + az aks remove-connector --name MyManagedCluster --resource-group MyResourceGroup \ + --connector-name MyConnector --graceful +- command: + name: aks scale + summary: Scale the node pool in a managed Kubernetes cluster. + arguments: + - name: --node-count + summary: Number of nodes in the Kubernetes node pool. +- command: + name: aks show + summary: Show the details for a managed Kubernetes cluster. +- command: + name: aks upgrade + summary: Upgrade a managed Kubernetes cluster to a newer version. + description: Kubernetes will be unavailable during cluster upgrades. + arguments: + - name: --kubernetes-version + summary: Version of Kubernetes to upgrade the cluster to, such as "1.7.12" or "1.8.7". + value-sources: + - link: + command: '`az aks get-upgrades`' +- command: + name: aks upgrade-connector + summary: (PREVIEW) Upgrade the ACI Connector on a managed Kubernetes cluster. + arguments: + - name: --chart-url + summary: URL of a Helm chart that installs ACI Connector. + - name: --connector-name + summary: Name of the ACI Connector. + - name: --os-type + summary: Install support for deploying ACIs of this operating system type. + - name: --service-principal + summary: Service principal used for authentication to Azure APIs. + description: If not specified, use the AKS service principal defined in the file /etc/kubernetes/azure.json on the node which runs the virtual kubelet pod. + - name: --client-secret + summary: Secret associated with the service principal. This argument is required if `--service-principal` is specified. + - name: --image-tag + summary: The image tag of the virtual kubelet. Use 'latest' if it is not specified + - name: --aci-resource-group + summary: The resource group to create the ACI container groups. Use the MC_* resource group if it is not specified. + - name: --location + summary: The location to create the ACI container groups. Use the location of the MC_* resource group if it is not specified. + examples: + - summary: Upgrade the ACI Connector for Linux to a managed Kubernetes cluster. + command: |- + az aks upgrade-connector --name MyManagedCluster --resource-group MyResourceGroup \ + --connector-name aci-connector + - summary: Upgrade the ACI Connector for Windows to a managed Kubernetes cluster. + command: |- + az aks upgrade-connector --name MyManagedCluster --resource-group MyResourceGroup \ + --connector-name aci-connector --os-type Windows + - summary: Upgrade the ACI Connector for both Windows and Linux to a managed Kubernetes cluster. + command: |- + az aks upgrade-connector --name MyManagedCluster --resource-group MyResourceGroup \ + --connector-name aci-connector --os-type Both + - summary: Upgrade the ACI Connector to use a specific service principal in a specific resource group. + command: |- + az aks upgrade-connector --name MyManagedCluster --resource-group MyResourceGroup \ + --connector-name aci-connector --service-principal --client-secret \ + --aci-resource-group ACI-resource-group + - summary: Upgrade the ACI Connector from a custom Helm chart with custom tag. + command: |- + az aks upgrade-connector --name MyManagedCluster --resource-group MyResourceGroup \ + --connector-name aci-connector --chart-url --image-tag +- command: + name: aks use-dev-spaces + summary: (PREVIEW) Use Azure Dev Spaces with a managed Kubernetes cluster. + arguments: + - name: --update + summary: Update to the latest Azure Dev Spaces client components. + - name: --space + summary: Name of the new or existing dev space to select. Defaults to an interactive selection experience. + examples: + - summary: Use Azure Dev Spaces with a managed Kubernetes cluster, interactively selecting a dev space. + command: |- + az aks use-dev-spaces -g my-aks-group -n my-aks + - summary: Use Azure Dev Spaces with a managed Kubernetes cluster, updating to the latest Azure Dev Spaces client components and selecting a new or existing dev space 'my-space'. + command: |- + az aks use-dev-spaces -g my-aks-group -n my-aks --update --space my-space + - summary: Use Azure Dev Spaces with a managed Kubernetes cluster, selecting a new or existing dev space 'develop/my-space' without prompting for confirmation. + command: |- + az aks use-dev-spaces -g my-aks-group -n my-aks -s develop/my-space -y +- command: + name: aks remove-dev-spaces + summary: (PREVIEW) Remove Azure Dev Spaces from a managed Kubernetes cluster. + examples: + - summary: Remove Azure Dev Spaces from a managed Kubernetes cluster. + command: |- + az aks remove-dev-spaces -g my-aks-group -n my-aks + - summary: Remove Azure Dev Spaces from a managed Kubernetes cluster without prompting. + command: |- + az aks remove-dev-spaces -g my-aks-group -n my-aks --yes +- command: + name: aks wait + summary: Wait for a managed Kubernetes cluster to reach a desired state. + description: If an operation on a cluster was interrupted or was started with `--no-wait`, use this command to wait for it to complete. + examples: + - summary: Wait for a cluster to be upgraded, polling every minute for up to thirty minutes. + command: |- + az aks wait -g MyResourceGroup -n MyManagedCluster --updated --interval 60 --timeout 1800 +- group: + name: openshift + summary: (PREVIEW) Manage Azure OpenShift Services. +- command: + name: openshift create + summary: (PREVIEW) Create a new managed OpenShift cluster. + arguments: + - name: --compute-vm-size + summary: Size of Virtual Machines to create as OpenShift nodes. + - name: --compute-count + summary: Number of nodes in the OpenShift node pool. + - name: --fqdn + summary: FQDN for OpenShift API server loadbalancer internal hostname. For example myopenshiftcluster.eastus.cloudapp.azure.com + - name: --aad-client-app-id + summary: The ID of an Azure Active Directory client application. If not specified, a new Azure Active Directory client is created. + - name: --aad-client-app-secret + summary: The secret of an Azure Active Directory client application. + - name: --aad-tenant-id + summary: The ID of an Azure Active Directory tenant. + - name: --vnet-peer + summary: The ID or the name of a subnet in an existing VNet into which to peer the cluster. + - name: --vnet-prefix + summary: The CIDR used on the VNet into which to deploy the cluster. + - name: --subnet-prefix + summary: The CIDR used on the Subnet into which to deploy the cluster. + examples: + - summary: Create an OpenShift cluster and auto create an AAD Client + command: az openshift create -g MyResourceGroup -n MyManagedCluster --fqdn {FQDN} + - summary: Create an OpenShift cluster with 5 compute nodes and a custom AAD Client. + command: az openshift create -g MyResourceGroup -n MyManagedCluster --fqdn {FQDN} --aad-client-app-id {APP_ID} --aad-client-app-secret {APP_SECRET} --aad-tenant-id {TENANT_ID} --compute-count 5 + - summary: Create an Openshift cluster using a custom vnet + command: az openshift create -g MyResourceGroup -n MyManagedCluster --fqdn {FQDN} --vnet-peer "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/openshift-vnet/providers/Microsoft.Network/virtualNetworks/test" +- command: + name: openshift scale + summary: (PREVIEW) Scale the compute pool in a managed OpenShift cluster. + arguments: + - name: --compute-count + summary: Number of nodes in the OpenShift compute pool. +- command: + name: openshift show + summary: (PREVIEW) Show the details for a managed OpenShift cluster. +- command: + name: openshift delete + summary: (PREVIEW) Delete a managed OpenShift cluster. +- command: + name: openshift list + summary: (PREVIEW) List managed OpenShift clusters. +- command: + name: openshift wait + summary: (PREVIEW) Wait for a managed OpenShift cluster to reach a desired state. + description: If an operation on a cluster was interrupted or was started with `--no-wait`, use this command to wait for it to complete. + examples: + - summary: Wait for a cluster to be upgraded, polling every minute for up to thirty minutes. + command: |- + az openshift wait -g MyResourceGroup -n MyManagedCluster --updated --interval 60 --timeout 1800 diff --git a/src/command_modules/azure-cli-advisor/azure/cli/command_modules/advisor/help.yaml b/src/command_modules/azure-cli-advisor/azure/cli/command_modules/advisor/help.yaml new file mode 100644 index 00000000000..60efadf8ca5 --- /dev/null +++ b/src/command_modules/azure-cli-advisor/azure/cli/command_modules/advisor/help.yaml @@ -0,0 +1,36 @@ +version: 1 +content: +- group: + name: advisor + summary: Manage Azure Advisor. +- group: + name: advisor configuration + summary: Manage Azure Advisor configuration. +- group: + name: advisor recommendation + summary: Review Azure Advisor recommendations. +- command: + name: advisor configuration list + summary: List Azure Advisor configuration for the entire subscription. +- command: + name: advisor configuration show + summary: Show Azure Advisor configuration for the given subscription or resource group. +- command: + name: advisor configuration update + summary: Update Azure Advisor configuration. + examples: + - summary: Update low CPU threshold for a given subscription to 20%. + command: > + az advisor configuration update -l 20 + - summary: Exclude a given resource group from recommendation generation. + command: > + az advisor configuration update -g myRG -e +- command: + name: advisor recommendation list + summary: List Azure Advisor recommendations. +- command: + name: advisor recommendation disable + summary: Disable Azure Advisor recommendations. +- command: + name: advisor recommendation enable + summary: Enable Azure Advisor recommendations. diff --git a/src/command_modules/azure-cli-ams/azure/cli/command_modules/ams/help.yaml b/src/command_modules/azure-cli-ams/azure/cli/command_modules/ams/help.yaml new file mode 100644 index 00000000000..0ffff022964 --- /dev/null +++ b/src/command_modules/azure-cli-ams/azure/cli/command_modules/ams/help.yaml @@ -0,0 +1,370 @@ +version: 1 +content: +- group: + name: ams + summary: Manage Azure Media Services resources. +- group: + name: ams account + summary: Manage Azure Media Services accounts. +- command: + name: ams account create + summary: Create an Azure Media Services account. +- command: + name: ams account update + summary: Update the details of an Azure Media Services account. +- command: + name: ams account list + summary: List Azure Media Services accounts for the entire subscription. +- command: + name: ams account show + summary: Show the details of an Azure Media Services account. +- command: + name: ams account delete + summary: Delete an Azure Media Services account. +- command: + name: ams account check-name + summary: Checks whether the Media Service resource name is available. +- group: + name: ams account storage + summary: Manage storage for an Azure Media Services account. +- command: + name: ams account storage add + summary: Attach a secondary storage to an Azure Media Services account. +- command: + name: ams account storage remove + summary: Detach a secondary storage from an Azure Media Services account. +- group: + name: ams account sp + summary: Manage service principal and role based access for an Azure Media Services account. +- command: + name: ams account sp create + summary: Create a service principal and configure its access to an Azure Media Services account. + description: Service principal propagation throughout Azure Active Directory may take some extra seconds to complete. + examples: + - summary: Create a service principal with password and configure its access to an Azure Media Services account. Output will be in xml format. + command: > + az ams account sp create -a myAmsAccount -g myRG -n mySpName --password mySecret --role Owner --xml +- command: + name: ams account sp reset-credentials + summary: Generate a new client secret for a service principal configured for an Azure Media Services account. +- command: + name: ams account storage sync-storage-keys + summary: Synchronize storage account keys for a storage account associated with an Azure Media Services account. +- group: + name: ams transform + summary: Manage transforms for an Azure Media Services account. +- command: + name: ams transform list + summary: List all the transforms of an Azure Media Services account. +- command: + name: ams transform show + summary: Show the details of a transform. +- command: + name: ams transform create + summary: Create a transform. + examples: + - summary: Create a transform with AdaptiveStreaming built-in preset and High relative priority. + command: > + az ams transform create -a myAmsAccount -n transformName -g myResourceGroup --preset AdaptiveStreaming --relative-priority High + - summary: Create a transform with a custom Standard Encoder preset from a JSON file and Low relative priority. + command: > + az ams transform create -a myAmsAccount -n transformName -g myResourceGroup --preset "C:\MyPresets\CustomPreset.json" --relative-priority Low +- command: + name: ams transform delete + summary: Delete a transform. +- command: + name: ams transform update + summary: Update the details of a transform. + examples: + - summary: Update the first transform output of a transform by setting its relative priority to High. + command: > + az ams transform update -a myAmsAccount -n transformName -g myResourceGroup --set outputs[0].relativePriority=High +- group: + name: ams transform output + summary: Manage transform outputs for an Azure Media Services account. +- command: + name: ams transform output add + summary: Add an output to an existing transform. + examples: + - summary: Add an output with a custom Standard Encoder preset from a JSON file. + command: > + az ams transform output add -a myAmsAccount -n transformName -g myResourceGroup --preset "C:\MyPresets\CustomPreset.json" + - summary: Add an output with a VideoAnalyzer preset with es-ES as audio language and only with audio insights. + command: > + az ams transform output add -a myAmsAccount -n transformName -g myResourceGroup --preset VideoAnalyzer --audio-language es-ES --insights-to-extract AudioInsightsOnly +- command: + name: ams transform output remove + summary: Remove an output from an existing transform. + examples: + - summary: Remove the output element at the index specified with --output-index argument. + command: > + az ams transform output remove -a myAmsAccount -n transformName -g myResourceGroup --output-index 1 +- group: + name: ams asset + summary: Manage assets for an Azure Media Services account. +- group: + name: ams asset-filter + summary: Manage asset filters for an Azure Media Services account. +- group: + name: ams account-filter + summary: Manage account filters for an Azure Media Services account. +- command: + name: ams asset show + summary: Show the details of an asset. +- command: + name: ams asset list + summary: List all the assets of an Azure Media Services account. + examples: + - summary: List all the assets whose names start with the string 'Something'. + command: > + az ams asset list -a amsAccount -g resourceGroup --query [?starts_with(name,'Something')] +- command: + name: ams asset list-streaming-locators + summary: List streaming locators which are associated with this asset. +- command: + name: ams asset create + summary: Create an asset. +- command: + name: ams asset update + summary: Update the details of an asset. +- command: + name: ams asset delete + summary: Delete an asset. +- command: + name: ams asset get-sas-urls + summary: Lists storage container URLs with shared access signatures (SAS) for uploading and downloading Asset content. The signatures are derived from the storage account keys. +- command: + name: ams asset get-encryption-key + summary: Get the asset storage encryption keys used to decrypt content created by version 2 of the Media Services API. +- command: + name: ams asset-filter create + summary: Create an asset filter. + examples: + - summary: Create an asset filter with filter track selections. + command: > + az ams asset-filter create -a amsAccount -g resourceGroup -n filterName --force-end-timestamp=False --end-timestamp 200000 --start-timestamp 100000 --live-backoff-duration 60 --presentation-window-duration 600000 --timescale 1000 --bitrate 720 --asset-name assetName --tracks @C:\tracks.json +- command: + name: ams asset-filter update + summary: Update the details of an asset filter. +- command: + name: ams asset-filter delete + summary: Delete an asset filter. +- command: + name: ams asset-filter list + summary: List all the asset filters of an Azure Media Services account. +- command: + name: ams asset-filter show + summary: Show the details of an asset filter. +- group: + name: ams content-key-policy + summary: Manage content key policies for an Azure Media Services account. +- command: + name: ams content-key-policy create + summary: Create a new content key policy. +- command: + name: ams content-key-policy show + summary: Show an existing content key policy. +- command: + name: ams content-key-policy delete + summary: Delete a content key policy. +- command: + name: ams content-key-policy update + summary: Update an existing content key policy. + examples: + - summary: Update an existing content-key-policy, set a new description and edit its first option setting a new issuer and audience. + command: > + az ams content-key-policy update -n contentKeyPolicyName -a amsAccount --description newDescription --set options[0].restriction.issuer=newIssuer --set options[0].restriction.audience=newAudience +- command: + name: ams content-key-policy list + summary: List all the content key policies within an Azure Media Services account. +- group: + name: ams content-key-policy option + summary: Manage options for an existing content key policy. +- command: + name: ams content-key-policy option add + summary: Add a new option to an existing content key policy. +- command: + name: ams content-key-policy option remove + summary: Remove an option from an existing content key policy. +- command: + name: ams content-key-policy option update + summary: Update an option from an existing content key policy. + examples: + - summary: Update an existing content-key-policy by adding an alternate token key to an existing option. + command: > + az ams content-key-policy option update -n contentKeyPolicyName -g resourceGroup -a amsAccount --policy-option-id xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --add-alt-token-key tokenKey --add-alt-token-key-type Symmetric +- group: + name: ams job + summary: Manage jobs for a transform. +- command: + name: ams job start + summary: Start a job. +- command: + name: ams job update + summary: Update an existing job. +- command: + name: ams job list + summary: List all the jobs of a transform within an Azure Media Services account. + examples: + - summary: List all the jobs of a transform with 'Normal' priority by name. + command: > + az ams job list -a amsAccount -g resourceGroup -t transformName --query [?priority=='Normal'].{jobName:name} + - summary: List all the jobs of a transform by name and input. + command: > + az ams job list -a amsAccount -g resourceGroup -t transformName --query [].{jobName:name,jobInput:input} +- command: + name: ams job show + summary: Show the details of a job. +- command: + name: ams job delete + summary: Delete a job. +- command: + name: ams job cancel + summary: Cancel a job. +- group: + name: ams streaming-locator + summary: Manage streaming locators for an Azure Media Services account. +- command: + name: ams streaming-locator create + summary: Create a streaming locator. +- command: + name: ams streaming-locator list + summary: List all the streaming locators within an Azure Media Services account. +- command: + name: ams streaming-locator show + summary: Show the details of a streaming locator. +- command: + name: ams streaming-locator get-paths + summary: List paths supported by a streaming locator. +- command: + name: ams streaming-locator list-content-keys + summary: List content keys used by a streaming locator. +- group: + name: ams streaming-policy + summary: Manage streaming policies for an Azure Media Services account. +- command: + name: ams streaming-policy create + summary: Create a streaming policy. +- command: + name: ams streaming-policy list + summary: List all the streaming policies within an Azure Media Services account. +- command: + name: ams streaming-policy show + summary: Show the details of a streaming policy. +- group: + name: ams streaming-endpoint + summary: Manage streaming endpoints for an Azure Media Service account. +- command: + name: ams streaming-endpoint start + summary: Start a streaming endpoint. +- command: + name: ams streaming-endpoint stop + summary: Stop a streaming endpoint. +- command: + name: ams streaming-endpoint list + summary: List all the streaming endpoints within an Azure Media Services account. +- command: + name: ams streaming-endpoint create + summary: Create a streaming endpoint. +- group: + name: ams streaming-endpoint akamai + summary: Manage AkamaiAccessControl objects to be used on streaming endpoints. +- command: + name: ams streaming-endpoint akamai add + summary: Add an AkamaiAccessControl to an existing streaming endpoint. +- command: + name: ams streaming-endpoint show + summary: Show the details of a streaming endpoint. +- command: + name: ams streaming-endpoint delete + summary: Delete a streaming endpoint. +- command: + name: ams streaming-endpoint akamai remove + summary: Remove an AkamaiAccessControl from an existing streaming endpoint. +- command: + name: ams streaming-endpoint scale + summary: Set the scale of a streaming endpoint. +- command: + name: ams streaming-endpoint update + summary: Update the details of a streaming endpoint. +- group: + name: ams live-event + summary: Manage live events for an Azure Media Service account. +- command: + name: ams live-event create + summary: Create a live event. +- command: + name: ams live-event start + summary: Start a live event. +- command: + name: ams live-event show + summary: Show the details of a live event. +- command: + name: ams live-event list + summary: List all the live events of an Azure Media Services account. + examples: + - summary: List all the live events by name and resourceState quickly. + command: > + az ams live-event list -a amsAccount -g resourceGroup --query [].{liveEventName:name,state:resourceState} +- command: + name: ams live-event delete + summary: Delete a live event. +- command: + name: ams live-event stop + summary: Stop a live event. +- command: + name: ams live-event reset + summary: Reset a live event. +- command: + name: ams live-event update + summary: Update the details of a live event. + examples: + - summary: Set a new allowed IP address and remove an existing IP address at index '0'. + command: > + az ams live-event update -a amsAccount -g resourceGroup -n liveEventName --remove input.accessControl.ip.allow 0 --add input.accessControl.ip.allow 1.2.3.4/22 + - summary: Clear existing IP addresses and set new ones. + command: > + az ams live-event update -a amsAccount -g resourceGroup -n liveEventName --ips 1.2.3.4/22 5.6.7.8/30 +- group: + name: ams live-output + summary: Manage live outputs for an Azure Media Service account. +- command: + name: ams live-output create + summary: Create a live output. +- command: + name: ams live-output show + summary: Show the details of a live output. +- command: + name: ams live-output list + summary: List all the live outputs in a live event. +- command: + name: ams live-output delete + summary: Delete a live output. +- command: + name: ams account-filter show + summary: Show the details of an account filter. +- command: + name: ams account-filter list + summary: List all the account filters of an Azure Media Services account. +- command: + name: ams account-filter create + summary: Create an account filter. + examples: + - summary: Create an asset filter with filter track selections. + command: > + az ams account-filter create -a amsAccount -g resourceGroup -n filterName --force-end-timestamp=False --end-timestamp 200000 --start-timestamp 100000 --live-backoff-duration 60 --presentation-window-duration 600000 --timescale 1000 --bitrate 720 --tracks @C:\tracks.json +- command: + name: ams account-filter update + summary: Update the details of an account filter. +- command: + name: ams account-filter delete + summary: Delete an account filter. +- group: + name: ams account mru + summary: Manage media reserved units for an Azure Media Services account. +- command: + name: ams account mru set + summary: Set the type and number of media reserved units for an Azure Media Services account. +- command: + name: ams account mru show + summary: Show the details of media reserved units for an Azure Media Services account. diff --git a/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/help.yaml b/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/help.yaml new file mode 100644 index 00000000000..fa0f9ff47fd --- /dev/null +++ b/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/help.yaml @@ -0,0 +1,697 @@ +version: 1 +content: +- group: + name: appservice + summary: Manage App Service plans. +- group: + name: webapp + summary: Manage web apps. +- group: + name: webapp auth + summary: Manage webapp authentication and authorization +- command: + name: webapp auth show + summary: Show the authentification settings for the webapp. +- command: + name: webapp auth update + summary: Update the authentication settings for the webapp. + examples: + - summary: Enable AAD by enabling authentication and setting AAD-associated parameters. Default provider is set to AAD. Must have created a AAD service principal beforehand. + command: > + az webapp auth update -g myResourceGroup -n myUniqueApp --enabled true \ + --action LoginWithAzureActiveDirectory \ + --aad-allowed-token-audiences https://webapp_name.azurewebsites.net/.auth/login/aad/callback \ + --aad-client-id ecbacb08-df8b-450d-82b3-3fced03f2b27 --aad-client-secret very_secret_password \ + --aad-token-issuer-url https://sts.windows.net/54826b22-38d6-4fb2-bad9-b7983a3e9c5a/ + - summary: Allow Facebook authentication by setting FB-associated parameters and turning on public-profile and email scopes; allow anonymous users + command: > + az webapp auth update -g myResourceGroup -n myUniqueApp --action AllowAnonymous \ + --facebook-app-id my_fb_id --facebook-app-secret my_fb_secret \ + --facebook-oauth-scopes public_profile email +- command: + name: webapp identity assign + summary: assign or disable managed service identity to the webapp + examples: + - summary: assign local identity and assign a reader role to the current resource group. + command: > + az webapp identity assign -g MyResourceGroup -n MyUniqueApp --role reader --scope /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/MyResourceGroup + - summary: enable identity for the webapp. + command: > + az webapp identity assign -g MyResourceGroup -n MyUniqueApp +- group: + name: webapp identity + summary: manage webapp's managed service identity +- command: + name: webapp identity show + summary: display webapp's managed service identity +- command: + name: webapp identity remove + summary: Disable webapp's managed service identity +- group: + name: functionapp identity + summary: manage functionapp's managed service identity +- command: + name: functionapp identity assign + summary: assign or disable managed service identity to the functionapp + examples: + - summary: assign local identity and assign a reader role to the current resource group. + command: > + az functionapp identity assign -g MyResourceGroup -n MyUniqueApp --role reader --scope /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/MyResourceGroup + - summary: enable identity for the functionapp. + command: > + az functionapp identity assign -g MyResourceGroup -n MyUniqueApp +- command: + name: functionapp identity show + summary: display functionapp's managed service identity +- command: + name: functionapp identity remove + summary: Disable functionapp's managed service identity +- group: + name: webapp config + summary: Configure a web app. +- command: + name: webapp config show + summary: Get the details of a web app's configuration. +- command: + name: webapp config set + summary: Set a web app's configuration. +- group: + name: webapp config appsettings + summary: Configure web app settings. +- command: + name: webapp config appsettings delete + summary: Delete web app settings. +- command: + name: webapp config appsettings list + summary: Get the details of a web app's settings. +- command: + name: webapp config appsettings set + summary: Set a web app's settings. + examples: + - summary: Set the default NodeJS version to 6.9.1 for a web app. + command: > + az webapp config appsettings set -g MyResourceGroup -n MyUniqueApp --settings WEBSITE_NODE_DEFAULT_VERSION=6.9.1 +- group: + name: webapp config storage-account + summary: Manage a web app's Azure storage account configurations. (Linux Web Apps and Windows Containers Web Apps Only) +- command: + name: webapp config storage-account list + summary: Get a web app's Azure storage account configurations. (Linux Web Apps and Windows Containers Web Apps Only) +- command: + name: webapp config storage-account add + summary: Add an Azure storage account configuration to a web app. (Linux Web Apps and Windows Containers Web Apps Only) + examples: + - summary: Add a connection to the Azure Files file share called MyShare in the storage account named MyStorageAccount. + command: > + az webapp config storage-account add -g MyResourceGroup -n MyUniqueApp \ + --custom-id CustomId \ + --storage-type AzureFiles \ + --account-name MyStorageAccount \ + --share-name MyShare \ + --access-key MyAccessKey \ + --mount-path /path/to/mount +- command: + name: webapp config storage-account update + summary: Update an existing Azure storage account configuration on a web app. (Linux Web Apps and Windows Containers Web Apps Only) + examples: + - summary: Update the mount path for a connection to the Azure Files file share with the ID MyId. + command: > + az webapp config storage-account update -g MyResourceGroup -n MyUniqueApp \ + --custom-id CustomId \ + --mount-path /path/to/new/mount +- command: + name: webapp config storage-account delete + summary: Delete a web app's Azure storage account configuration. (Linux Web Apps and Windows Containers Web Apps Only) +- group: + name: webapp config connection-string + summary: Manage a web app's connection strings. +- command: + name: webapp config connection-string list + summary: Get a web app's connection strings. +- command: + name: webapp config connection-string delete + summary: Delete a web app's connection strings. +- command: + name: webapp config connection-string set + summary: Update a web app's connection strings. + examples: + - summary: Add a mysql connection string. + command: > + az webapp config connection-string set -g MyResourceGroup -n MyUniqueApp -t mysql \ + --settings mysql1='Server=myServer;Database=myDB;Uid=myUser;Pwd=myPwd;' +- group: + name: webapp config container + summary: Manage web app container settings. +- command: + name: webapp config container show + summary: Get details of a web app container's settings. +- command: + name: webapp config container set + summary: Set a web app container's settings. +- command: + name: webapp config container delete + summary: Delete a web app container's settings. +- group: + name: webapp config ssl + summary: Configure SSL certificates for web apps. +- command: + name: webapp config ssl list + summary: List SSL certificates for a web app. +- command: + name: webapp config ssl bind + summary: Bind an SSL certificate to a web app. +- command: + name: webapp config ssl unbind + summary: Unbind an SSL certificate from a web app. +- command: + name: webapp config ssl delete + summary: Delete an SSL certificate from a web app. +- command: + name: webapp config ssl upload + summary: Upload an SSL certificate to a web app. +- group: + name: webapp config snapshot + summary: Manage web app snapshots. +- command: + name: webapp config snapshot list + summary: List the restorable snapshots for a web app. +- command: + name: webapp config snapshot restore + summary: Restore a web app snapshot. + examples: + - summary: Restore web app files from a snapshot. Overwrites the web app's current files and settings. + command: > + az webapp config snapshot restore -g MyResourceGroup -n MySite --time 2018-12-11T23:34:16.8388367 + - summary: Restore a snapshot of web app SourceApp to web app TargetApp. Use --restore-content-only to not restore app settings. Overwrites TargetApp's files. + command: > + az webapp config snapshot restore -g TargetResourceGroup -n TargetApp --source-name SourceApp --source-resource-group OriginalResourceGroup --time 2018-12-11T23:34:16.8388367 --restore-content-only +- group: + name: webapp deployment + summary: Manage web app deployments. +- group: + name: webapp deployment slot + summary: Manage web app deployment slots. +- command: + name: webapp deployment slot auto-swap + summary: Configure deployment slot auto swap. +- group: + name: webapp log + summary: Manage web app logs. +- command: + name: webapp log config + summary: Configure logging for a web app. +- command: + name: webapp log show + summary: Get the details of a web app's logging configuration. +- command: + name: webapp log download + summary: Download a web app's log history as a zip file. + description: This command may not work with web apps running on Linux. +- command: + name: webapp log tail + summary: Start live log tracing for a web app. + description: This command may not work with web apps running on Linux. +- command: + name: webapp deployment list-publishing-profiles + summary: Get the details for available web app deployment profiles. +- group: + name: webapp deployment container + summary: Manage container-based continuous deployment. +- command: + name: webapp deployment container config + summary: Configure continuous deployment via containers. +- command: + name: webapp deployment container show-cd-url + summary: Get the URL which can be used to configure webhooks for continuous deployment. +- command: + name: webapp deployment slot create + summary: Create a deployment slot. +- command: + name: webapp deployment slot swap + summary: Change deployment slots for a web app. + examples: + - summary: Swap a staging slot into production for the MyUniqueApp web app. + command: > + az webapp deployment slot swap -g MyResourceGroup -n MyUniqueApp --slot staging \ + --target-slot production +- command: + name: webapp deployment slot list + summary: List all deployment slots. +- command: + name: webapp deployment slot delete + summary: Delete a deployment slot. +- group: + name: webapp deployment user + summary: Manage user credentials for deployment. +- command: + name: webapp deployment user set + summary: Update deployment credentials. + description: All function and web apps in the subscription will be impacted since they share the same deployment credentials. + examples: + - summary: Set FTP and git deployment credentials for all apps. + command: > + az webapp deployment user set --user-name MyUserName +- group: + name: webapp deployment source + summary: Manage web app deployment via source control. +- command: + name: webapp deployment source config + summary: Manage deployment from git or Mercurial repositories. +- command: + name: webapp deployment source config-local-git + summary: Get a URL for a git repository endpoint to clone and push to for web app deployment. + examples: + - summary: Get an endpoint and add it as a git remote. + command: > + az webapp deployment source config-local-git \ + -g MyResourceGroup -n MyUniqueApp + + git remote add azure \ + https://@MyUniqueApp.scm.azurewebsites.net/MyUniqueApp.git +- command: + name: webapp deployment source config-zip + summary: Perform deployment using the kudu zip push deployment for a webapp. + description: > + By default Kudu assumes that zip deployments do not require any build-related actions like + npm install or dotnet publish. This can be overridden by including a .deployment file in your + zip file with the following content '[config] SCM_DO_BUILD_DURING_DEPLOYMENT = true', + to enable Kudu detection logic and build script generation process. + See https://github.com/projectkudu/kudu/wiki/Configurable-settings#enabledisable-build-actions-preview. + Alternately the setting can be enabled using the az webapp config appsettings set command. + examples: + - summary: Perform deployment by using zip file content. + command: > + az webapp deployment source config-zip \ + -g {myRG} -n {myAppName} \ + --src {zipFilePathLocation} +- command: + name: webapp deployment source delete + summary: Delete a source control deployment configuration. +- command: + name: webapp deployment source show + summary: Get the details of a source control deployment configuration. +- command: + name: webapp deployment source sync + summary: Synchronize from the repository. Only needed under manual integration mode. +- group: + name: webapp traffic-routing + summary: Manage traffic routing for web apps. +- command: + name: webapp traffic-routing set + summary: Configure routing traffic to deployment slots. +- command: + name: webapp traffic-routing show + summary: Display the current distribution of traffic across slots. +- command: + name: webapp traffic-routing clear + summary: Clear the routing rules and send all traffic to production. +- group: + name: webapp cors + summary: Manage Cross-Origin Resource Sharing (CORS) +- command: + name: webapp cors add + summary: Add allowed origins + examples: + - summary: add a new allowed origin + command: > + az webapp cors add -g -n --allowed-origins https://myapps.com +- command: + name: webapp cors remove + summary: Remove allowed origins + examples: + - summary: remove an allowed origin + command: > + az webapp cors remove -g -n --allowed-origins https://myapps.com + - summary: remove all allowed origins + command: > + az webapp cors remove -g -n --allowed-origins * +- command: + name: webapp cors show + summary: show allowed origins +- group: + name: appservice plan + summary: Manage app service plans. +- command: + name: appservice list-locations + summary: List regions where a plan sku is available. +- command: + name: appservice plan update + summary: Update an app service plan. +- command: + name: appservice plan create + summary: Create an app service plan. + examples: + - summary: Create a basic app service plan. + command: > + az appservice plan create -g MyResourceGroup -n MyPlan + - summary: Create a standard app service plan with with four Linux workers. + command: > + az appservice plan create -g MyResourceGroup -n MyPlan \ + --is-linux --number-of-workers 4 --sku S1 +- command: + name: appservice plan delete + summary: Delete an app service plan. +- command: + name: appservice plan list + summary: List app service plans. + examples: + - summary: List all free tier App Service plans. + command: > + az appservice plan list --query "[?sku.tier=='Free']" +- command: + name: appservice plan show + summary: Get the app service plans for a resource group or a set of resource groups. +- group: + name: webapp config hostname + summary: Configure hostnames for a web app. +- command: + name: webapp config hostname add + summary: Bind a hostname to a web app. +- command: + name: webapp config hostname delete + summary: Unbind a hostname from a web app. +- command: + name: webapp config hostname list + summary: List all hostname bindings for a web app. +- command: + name: webapp config hostname get-external-ip + summary: Get the external-facing IP address for a web app. +- group: + name: webapp config backup + summary: Manage backups for web apps. +- command: + name: webapp config backup list + summary: List backups of a web app. +- command: + name: webapp config backup create + summary: Create a backup of a web app. +- command: + name: webapp config backup show + summary: Show the backup schedule for a web app. +- command: + name: webapp config backup update + summary: Configure a new backup schedule for a web app. +- command: + name: webapp config backup restore + summary: Restore a web app from a backup. +- group: + name: webapp webjob + summary: Allows management operations for webjobs on a webapp. +- group: + name: webapp webjob continuous + summary: Allows management operations of continuous webjobs on a webapp. +- command: + name: webapp webjob continuous list + summary: List all continuous webjobs on a selected webapp. +- command: + name: webapp webjob continuous start + summary: Start a specific continuous webjob on a selected webapp. +- command: + name: webapp webjob continuous stop + summary: Stop a specific continuous webjob. +- command: + name: webapp webjob continuous remove + summary: Delete a specific continuous webjob. +- group: + name: webapp webjob triggered + summary: Allows management operations of triggered webjobs on a webapp. +- command: + name: webapp webjob triggered list + summary: List all triggered webjobs hosted on a webapp. +- command: + name: webapp webjob triggered run + summary: Run a specific triggered webjob hosted on a webapp. +- command: + name: webapp webjob triggered remove + summary: Delete a specific triggered webjob hosted on a webapp. +- command: + name: webapp webjob triggered log + summary: Get history of a specific triggered webjob hosted on a webapp. +- command: + name: webapp browse + summary: Open a web app in a browser. +- command: + name: webapp create + summary: Create a web app. + description: The web app's name must be able to produce a unique FQDN as AppName.azurewebsites.net. + examples: + - summary: Create a web app with the default configuration. + command: > + az webapp create -g MyResourceGroup -p MyPlan -n MyUniqueAppName + - summary: Create a web app with a NodeJS 6.2 runtime and deployed from a local git repository. + command: > + az webapp create -g MyResourceGroup -p MyPlan -n MyUniqueAppName --runtime "node|6.2" --deployment-local-git +- command: + name: webapp ssh + summary: (Preview) SSH command establishes a ssh session to the web container and developer would get a shell terminal remotely. + examples: + - summary: ssh into a webapp + command: > + az webapp ssh -n MyUniqueAppName -g MyResourceGroup +- command: + name: webapp up + summary: (Preview) Create and deploy existing local code to the webapp, by running the command from the folder where the code is present. Supports running the command in preview mode using --dryrun parameter. Current supports includes Node, Python,.NET Core, ASP.NET, staticHtml. Node, Python apps are created as Linux apps. .Net Core, ASP.NET and static HTML apps are created as Windows apps. If command is run from an empty folder, an empty windows webapp is created. + examples: + - summary: View the details of the app that will be created, without actually running the operation + command: > + az webapp up -n MyUniqueAppName --dryrun + - summary: Create a web app with the default configuration, by running the command from the folder where the code to deployed exists. + command: > + az webapp up -n MyUniqueAppName + - summary: Create a web app in a sepcific region, by running the command from the folder where the code to deployed exists. + command: > + az webapp up -n MyUniqueAppName -l locationName + - summary: Deploy new code to an app that was originally created using the same command + command: > + az webapp up -n MyUniqueAppName -l locationName +- command: + name: webapp update + summary: Update a web app. + examples: + - summary: Update the tags of a web app. + command: > + az webapp update -g MyResourceGroup -n MyAppName --set tags.tagName=tagValue +- command: + name: webapp list-runtimes + summary: List available built-in stacks which can be used for web apps. +- group: + name: webapp deleted + summary: Manage deleted web apps. +- command: + name: webapp deleted list + summary: List web apps that have been deleted. +- command: + name: webapp deleted restore + summary: Restore a deleted web app. + description: Restores the files and settings of a deleted web app to the specified web app. + examples: + - summary: Restore a deleted app to the Staging slot of MySite. + command: > + az webapp deleted restore -g MyResourceGroup -n MySite -s Staging --deleted-id /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/deletedSites/1234 + - summary: Restore a deleted app to the app MySite. Do not restore the deleted app's settings. + command: > + az webapp deleted restore -g MyResourceGroup -n MySite --deleted-id /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/deletedSites/1234 --restore-content-only +- command: + name: webapp delete + summary: Delete a web app. +- command: + name: webapp list + summary: List web apps. + examples: + - summary: List default host name and state for all web apps. + command: > + az webapp list --query "[].{hostName: defaultHostName, state: state}" + - summary: List all running web apps. + command: > + az webapp list --query "[?state=='Running']" +- command: + name: webapp restart + summary: Restart a web app. +- command: + name: webapp start + summary: Start a web app. +- command: + name: webapp show + summary: Get the details of a web app. +- command: + name: webapp stop + summary: Stop a web app. +- group: + name: functionapp + summary: Manage function apps. +- command: + name: functionapp create + summary: Create a function app. + description: The function app's name must be able to produce a unique FQDN as AppName.azurewebsites.net. + examples: + - summary: Create a basic function app. + command: > + az functionapp create -g MyResourceGroup -p MyPlan -n MyUniqueAppName -s MyStorageAccount +- command: + name: functionapp update + summary: Update a function app. +- command: + name: functionapp delete + summary: Delete a function app. +- command: + name: functionapp list + summary: List function apps. + examples: + - summary: List default host name and state for all function apps. + command: > + az functionapp list --query "[].{hostName: defaultHostName, state: state}" + - summary: List all running function apps. + command: > + az functionapp list --query "[?state=='Running']" +- command: + name: functionapp restart + summary: Restart a function app. +- command: + name: functionapp start + summary: Start a function app. +- command: + name: functionapp show + summary: Get the details of a function app. +- command: + name: functionapp stop + summary: Stop a function app. +- command: + name: functionapp list-consumption-locations + summary: List available locations for running function apps. +- group: + name: functionapp config + summary: Configure a function app. +- group: + name: functionapp config appsettings + summary: Configure function app settings. +- command: + name: functionapp config appsettings list + summary: Show settings for a function app. +- command: + name: functionapp config appsettings set + summary: Update a function app's settings. +- command: + name: functionapp config appsettings delete + summary: Delete a function app's settings. +- group: + name: functionapp config hostname + summary: Configure hostnames for a function app. +- command: + name: functionapp config hostname add + summary: Bind a hostname to a function app. +- command: + name: functionapp config hostname delete + summary: Unbind a hostname from a function app. +- command: + name: functionapp config hostname list + summary: List all hostname bindings for a function app. +- command: + name: functionapp config hostname get-external-ip + summary: Get the external-facing IP address for a function app. +- group: + name: functionapp config ssl + summary: Configure SSL certificates. +- command: + name: functionapp config ssl list + summary: List SSL certificates for a function app. +- command: + name: functionapp config ssl bind + summary: Bind an SSL certificate to a function app. +- command: + name: functionapp config ssl unbind + summary: Unbind an SSL certificate from a function app. +- command: + name: functionapp config ssl delete + summary: Delete an SSL certificate from a function app. +- command: + name: functionapp config ssl upload + summary: Upload an SSL certificate to a function app. +- command: + name: functionapp config show + summary: Get the details of a web app's configuration. +- command: + name: functionapp config set + summary: Set the web app's configuration. +- group: + name: functionapp deployment + summary: Manage function app deployments. +- command: + name: functionapp deployment list-publishing-profiles + summary: Get the details for available function app deployment profiles. +- group: + name: functionapp deployment source + summary: Manage function app deployment via source control. +- command: + name: functionapp deployment source config + summary: Manage deployment from git or Mercurial repositories. +- command: + name: functionapp deployment source config-local-git + summary: Get a URL for a git repository endpoint to clone and push to for function app deployment. + examples: + - summary: Get an endpoint and add it as a git remote. + command: > + az functionapp deployment source config-local-git \ + -g MyResourceGroup -n MyUniqueApp + + git remote add azure \ + https://@MyUniqueApp.scm.azurewebsites.net/MyUniqueApp.git +- command: + name: functionapp deployment source delete + summary: Delete a source control deployment configuration. +- command: + name: functionapp deployment source show + summary: Get the details of a source control deployment configuration. +- command: + name: functionapp deployment source sync + summary: Synchronize from the repository. Only needed under manual integration mode. +- group: + name: functionapp deployment user + summary: Manage user credentials for deployment. +- command: + name: functionapp deployment user set + summary: Update deployment credentials. + description: All function and web apps in the subscription will be impacted since they share the same deployment credentials. + examples: + - summary: Set FTP and git deployment credentials for all apps. + command: > + az functionapp deployment user set + --user-name MyUserName +- command: + name: functionapp deployment source config-zip + summary: Perform deployment using the kudu zip push deployment for a function app. + description: > + By default Kudu assumes that zip deployments do not require any build-related actions like + npm install or dotnet publish. This can be overridden by including an .deployment file in your + zip file with the following content '[config] SCM_DO_BUILD_DURING_DEPLOYMENT = true', + to enable Kudu detection logic and build script generation process. + See https://github.com/projectkudu/kudu/wiki/Configurable-settings#enabledisable-build-actions-preview. + Alternately the setting can be enabled using the az functionapp config appsettings set command. + examples: + - summary: Perform deployment by using zip file content. + command: > + az functionapp deployment source config-zip \ + -g {myRG>} -n {myAppName} \ + --src {zipFilePathLocation} +- group: + name: functionapp cors + summary: Manage Cross-Origin Resource Sharing (CORS) +- command: + name: functionapp cors add + summary: Add allowed origins + examples: + - summary: add a new allowed origin + command: > + az functionapp cors add -g -n --allowed-origins https://myapps.com +- command: + name: functionapp cors remove + summary: Remove allowed origins + examples: + - summary: remove an allowed origin + command: > + az functionapp cors remove -g -n --allowed-origins https://myapps.com + - summary: remove all allowed origins + command: > + az functionapp cors remove -g -n --allowed-origins * +- command: + name: functionapp cors show + summary: show allowed origins diff --git a/src/command_modules/azure-cli-backup/azure/cli/command_modules/backup/help.yaml b/src/command_modules/azure-cli-backup/azure/cli/command_modules/backup/help.yaml new file mode 100644 index 00000000000..9e56f40d7f6 --- /dev/null +++ b/src/command_modules/azure-cli-backup/azure/cli/command_modules/backup/help.yaml @@ -0,0 +1,125 @@ +version: 1 +content: +- group: + name: backup + summary: Manage Azure Backups. +- group: + name: backup vault + summary: Online storage entity in Azure used to hold data such as backup copies, recovery points and backup policies. +- command: + name: backup vault create + summary: Create a new Recovery Services vault. +- command: + name: backup vault delete + summary: Delete an existing Recovery services vault. +- command: + name: backup vault list + summary: List Recovery service vaults within a subscription. +- command: + name: backup vault show + summary: Show details of a particular Recovery service vault. +- group: + name: backup vault backup-properties + summary: Properties of the Recovery Services vault. +- command: + name: backup vault backup-properties show + summary: Gets backup related properties of the Recovery Services vault. +- command: + name: backup vault backup-properties set + summary: Sets backup related properties of the Recovery Services vault. +- group: + name: backup container + summary: Resource which houses items or applications to be protected. +- command: + name: backup container list + summary: List containers registered to a Recovery services vault. +- command: + name: backup container show + summary: Show details of a container registered to a Recovery services vault. +- group: + name: backup item + summary: An item which is already protected or backed up to an Azure Recovery services vault with an associated policy. +- command: + name: backup item list + summary: List all backed up items within a container. +- command: + name: backup item show + summary: Show details of a particular backed up item. +- command: + name: backup item set-policy + summary: Update the policy associated with this item. +- group: + name: backup policy + summary: A backup policy defines when you want to take a backup and for how long you would retain each backup copy. +- command: + name: backup policy get-default-for-vm + summary: Get the default policy with default values to backup a VM. +- command: + name: backup policy list + summary: List all policies for a Recovery services vault. +- command: + name: backup policy show + summary: Show details of a particular policy. +- command: + name: backup policy delete + summary: Before you can delete a Backup protection policy, the policy must not have any associated Backup items. To associate another policy with a Backup item, use the backup item set-policy command. +- command: + name: backup policy set + summary: Update the properties of the backup policy. +- command: + name: backup policy list-associated-items + summary: List all items protected by a backup policy. +- group: + name: backup recoverypoint + summary: A snapshot of data at that point-of-time, stored in Recovery Services Vault, from which you can restore information. +- command: + name: backup recoverypoint list + summary: List all recovery points of a backed up item. +- command: + name: backup recoverypoint show + summary: Shows details of a particular recovery point. +- group: + name: backup protection + summary: Manage protection of your items, enable protection or disable it, or take on-demand backups. +- command: + name: backup protection check-vm + summary: Find out whether the virtual machine is protected or not. If protected, it returns the recovery services vault ID, otherwise it returns empty. +- command: + name: backup protection enable-for-vm + summary: Start protecting a previously unprotected Azure VM as per the specified policy to a Recovery services vault. +- command: + name: backup protection backup-now + summary: Perform an on-demand backup of a backed up item. +- command: + name: backup protection disable + summary: Stop protecting a backed up Azure VM. +- group: + name: backup restore + summary: Restore backed up items from recovery points in a Recovery Services vault. +- command: + name: backup restore restore-disks + summary: Restore disks of the backed VM from the specified recovery point. +- group: + name: backup restore files + summary: Gives access to all files of a recovery point. +- command: + name: backup restore files mount-rp + summary: Download a script which mounts files of a recovery point. +- command: + name: backup restore files unmount-rp + summary: Close access to the recovery point. +- group: + name: backup job + summary: Entity which contains details of the job. +- command: + name: backup job list + summary: List all backup jobs of a Recovery Services vault. +- command: + name: backup job show + summary: Show details of a particular job. +- command: + name: backup job stop + summary: Suspend or terminate a currently running job. +- command: + name: backup job wait + summary: Wait until either the job completes or the specified timeout value is reached. diff --git a/src/command_modules/azure-cli-batch/azure/cli/command_modules/batch/help.yaml b/src/command_modules/azure-cli-batch/azure/cli/command_modules/batch/help.yaml new file mode 100644 index 00000000000..f7bf99deaf7 --- /dev/null +++ b/src/command_modules/azure-cli-batch/azure/cli/command_modules/batch/help.yaml @@ -0,0 +1,197 @@ +version: 1 +content: +- group: + name: batch + summary: Manage Azure Batch. +- group: + name: batch account + summary: Manage Azure Batch accounts. +- command: + name: batch account list + summary: List the Batch accounts associated with a subscription or resource group. +- command: + name: batch account create + summary: Create a Batch account with the specified parameters. +- command: + name: batch account set + summary: Update properties for a Batch account. +- group: + name: batch account autostorage-keys + summary: Manage the access keys for the auto storage account configured for a Batch account. +- group: + name: batch account keys + summary: Manage Batch account keys. +- command: + name: batch account login + summary: Log in to a Batch account through Azure Active Directory or Shared Key authentication. +- command: + name: batch account show + summary: Get a specified Batch account or the currently set account. +- group: + name: batch application + summary: Manage Batch applications. +- command: + name: batch application set + summary: Update properties for a Batch application. +- group: + name: batch application package + summary: Manage Batch application packages. +- command: + name: batch application package create + summary: Create a Batch application package record and activate it. +- command: + name: batch application package activate + summary: Activates a Batch application package. + description: This step is unnecessary if the package has already been successfully activated by the `create` command. +- group: + name: batch application summary + summary: View a summary of Batch application packages. +- command: + name: batch application summary list + summary: Lists all of the applications available in the specified account. + description: This operation returns only applications and versions that are available for use on compute nodes; that is, that can be used in an application package reference. For administrator information about applications and versions that are not yet available to compute nodes, use the Azure portal or the 'az batch application list' command. +- command: + name: batch application summary show + summary: Gets information about the specified application. + description: This operation returns only applications and versions that are available for use on compute nodes; that is, that can be used in an application package reference. For administrator information about applications and versions that are not yet available to compute nodes, use the Azure portal or the 'az batch application list' command. +- group: + name: batch location + summary: Manage Batch service options for a subscription at the region level. +- group: + name: batch location quotas + summary: Manage Batch service quotas at the region level. +- group: + name: batch certificate + summary: Manage Batch certificates. +- group: + name: batch task file + summary: Manage Batch task files. +- command: + name: batch task file download + summary: Download the content of a Batch task file. +- group: + name: batch node file + summary: Manage Batch compute node files. +- command: + name: batch node file download + summary: Download the content of the a node file. +- group: + name: batch job + summary: Manage Batch jobs. +- group: + name: batch job task-counts + summary: View the number of tasks in a Batch job and their states. +- group: + name: batch job all-statistics + summary: View statistics of all jobs under a Batch account. +- command: + name: batch job all-statistics show + summary: Get lifetime summary statistics for all of the jobs in a Batch account. + description: Statistics are aggregated across all jobs that have ever existed in the account, from account creation to the last update time of the statistics. +- group: + name: batch job prep-release-status + summary: View the status of Batch job preparation and release tasks. +- group: + name: batch job-schedule + summary: Manage Batch job schedules. +- group: + name: batch node service-logs + summary: Manage the service log files of a Batch compute node. +- group: + name: batch node user + summary: Manage the user accounts of a Batch compute node. +- command: + name: batch node user create + summary: Add a user account to a Batch compute node. +- command: + name: batch node user reset + summary: Update the properties of a user account on a Batch compute node. Unspecified properties which can be updated are reset to their defaults. +- group: + name: batch node + summary: Manage Batch compute nodes. +- group: + name: batch node remote-login-settings + summary: Retrieve the remote login settings for a Batch compute node. +- group: + name: batch node remote-desktop + summary: Retrieve the remote desktop protocol file for a Batch compute node. +- group: + name: batch node scheduling + summary: Manage task scheduling for a Batch compute node. +- group: + name: batch pool + summary: Manage Batch pools. +- group: + name: batch pool os + summary: Manage the operating system of Batch pools. +- group: + name: batch pool autoscale + summary: Manage automatic scaling of Batch pools. +- group: + name: batch pool all-statistics + summary: View statistics of all pools under a Batch account. +- command: + name: batch pool all-statistics show + summary: Get lifetime summary statistics for all of the pools in a Batch account. + description: Statistics are aggregated across all pools that have ever existed in the account, from account creation to the last update time of the statistics. +- group: + name: batch pool usage-metrics + summary: View usage metrics of Batch pools. +- group: + name: batch pool node-counts + summary: Get node counts for Batch pools. +- group: + name: batch pool node-agent-skus + summary: Retrieve node agent SKUs of Batch pools using a Virtual Machine Configuration. +- group: + name: batch task + summary: Manage Batch tasks. +- group: + name: batch task subtask + summary: Manage subtask information of a Batch task. +- command: + name: batch certificate create + summary: Add a certificate to a Batch account. +- command: + name: batch certificate delete + summary: Delete a certificate from a Batch account. +- command: + name: batch pool create + summary: Create a Batch pool in an account. When creating a pool, choose arguments from either Cloud Services Configuration or Virtual Machine Configuration. +- command: + name: batch pool set + summary: Update the properties of a Batch pool. Updating a property in a subgroup will reset the unspecified properties of that group. +- command: + name: batch pool reset + summary: Update the properties of a Batch pool. Unspecified properties which can be updated are reset to their defaults. +- command: + name: batch pool resize + summary: Resize or stop resizing a Batch pool. +- command: + name: batch job create + summary: Add a job to a Batch account. +- command: + name: batch job list + summary: List all of the jobs or job schedule in a Batch account. +- command: + name: batch job set + summary: Update the properties of a Batch job. Updating a property in a subgroup will reset the unspecified properties of that group. +- command: + name: batch job reset + summary: Update the properties of a Batch job. Unspecified properties which can be updated are reset to their defaults. +- command: + name: batch job-schedule create + summary: Add a Batch job schedule to an account. +- command: + name: batch job-schedule set + summary: Update the properties of a job schedule. + description: You can independently update the schedule and the job specification, but any change to either of these entities will reset all properties in that entity. +- command: + name: batch job-schedule reset + summary: Reset the properties of a job schedule. An updated job specification only applies to new jobs. +- command: + name: batch task create + summary: Create Batch tasks. +- command: + name: batch task reset + summary: Reset the properties of a Batch task. diff --git a/src/command_modules/azure-cli-batchai/azure/cli/command_modules/batchai/help.yaml b/src/command_modules/azure-cli-batchai/azure/cli/command_modules/batchai/help.yaml new file mode 100644 index 00000000000..590863afc7b --- /dev/null +++ b/src/command_modules/azure-cli-batchai/azure/cli/command_modules/batchai/help.yaml @@ -0,0 +1,348 @@ +version: 1 +content: +- group: + name: batchai + summary: Manage Batch AI resources. +- group: + name: batchai workspace + summary: Commands to manage workspaces. +- command: + name: batchai workspace create + summary: Create a workspace. + examples: + - summary: Create a workspace in East US region. + command: az batchai workspace create -g MyResourceGroup -n MyWorkspace -l eastus +- command: + name: batchai workspace delete + summary: Delete a workspace. + examples: + - summary: Delete a workspace. + command: az batchai workspace delete -g MyResourceGroup -n MyWorkspace +- command: + name: batchai workspace list + summary: List workspaces. + examples: + - summary: List all workspaces under the current subscription. + command: az batchai workspace list -o table + - summary: List workspaces in the given resource group. + command: az batchai workspace list -g MyResourceGroup -o table +- command: + name: batchai workspace show + summary: Show information about a workspace. + examples: + - summary: Show information about a workspace. + command: az batchai workspace show -g MyResourceGroup -n MyWorkspace -o table +- group: + name: batchai cluster + summary: Commands to manage clusters. +- command: + name: batchai cluster create + summary: Create a cluster. + examples: + - summary: Create a single node GPU cluster with default image and auto-storage account. + command: | + az batchai cluster create -g MyResourceGroup -w MyWorkspace -n MyCluster \ + -s Standard_NC6 -t 1 --use-auto-storage --generate-ssh-keys + - summary: Create a cluster with a setup command which installs unzip on every node, the command output will be stored on auto storage account Azure File Share. + command: | + az batchai cluster create -g MyResourceGroup -w MyWorkspace -n MyCluster \ + --use-auto-storage \ + -s Standard_NC6 -t 1 -k id_rsa.pub \ + --setup-task 'apt update; apt install unzip -y' \ + --setup-task-output '$AZ_BATCHAI_MOUNT_ROOT/autoafs' + - summary: Create a cluster providing all parameters manually. + command: | + az batchai cluster create -g MyResourceGroup -w MyWorkspace -n MyCluster \ + -i UbuntuLTS -s Standard_NC6 --vm-priority lowpriority \ + --min 0 --target 1 --max 10 \ + --storage-account-name MyStorageAccount \ + --nfs MyNfsToMount --afs-name MyAzureFileShareToMount \ + --bfs-name MyBlobContainerNameToMount \ + -u AdminUserName -k id_rsa.pub -p ImpossibleToGuessPassword + - summary: Create a cluster using a configuration file. + command: > + az batchai cluster create -g MyResourceGroup -w MyWorkspace -n MyCluster -f cluster.json +- command: + name: batchai cluster resize + summary: Resize a cluster. + examples: + - summary: Resize a cluster to zero size to stop paying for it. + command: az batchai cluster resize -g MyResourceGroup -w MyWorkspace -n MyCluster -t 0 + - summary: Resize a cluster to have 10 nodes. + command: az batchai cluster resize -g MyResourceGroup -w MyWorkspace -n MyCluster -t 10 +- command: + name: batchai cluster auto-scale + summary: Set auto-scale parameters for a cluster. + examples: + - summary: Make a cluster to auto scale between 0 and 10 nodes depending on number of queued and running jobs. + command: az batchai cluster auto-scale -g MyResourceGroup -w MyWorkspace -n MyCluster --min 0 --max 10 +- command: + name: batchai cluster delete + summary: Delete a cluster. + examples: + - summary: Delete a cluster and wait for deletion to be completed. + command: az batchai cluster delete -g MyResourceGroup -w MyWorkspace -n MyCluster + - summary: Send a delete command for a cluster and do not wait for deletion to be completed. + command: az batchai cluster delete -g MyResourceGroup -w MyWorkspace -n MyCluster --no-wait + - summary: Delete cluster without asking for confirmation (for non-interactive scenarios). + command: az batchai cluster delete -g MyResourceGroup -w MyWorkspace -n MyCluster -y +- command: + name: batchai cluster list + summary: List clusters. + examples: + - summary: List all clusters in a workspace. + command: az batchai cluster list -g MyResourceGroup -w MyWorkspace -o table +- command: + name: batchai cluster show + summary: Show information about a cluster. + examples: + - summary: Show full information about a cluster. + command: az batchai cluster show -g MyResourceGroup -w MyWorkspace -n MyCluster + - summary: Show cluster's summary. + command: az batchai cluster show -g MyResourceGroup -w MyWorkspace -n MyCluster -o table +- group: + name: batchai cluster node + summary: Commands to work with cluster nodes. +- command: + name: batchai cluster node list + summary: List remote login information for cluster's nodes. + description: "List remote login information for cluster nodes. You can ssh to a particular node using the provided public IP address and the port number.\nE.g. ssh @ -p " + examples: + - summary: List remote login information for a cluster. + command: az batchai cluster node list -g MyResourceGroup -w MyWorkspace -c MyCluster -o table +- command: + name: batchai cluster node exec + summary: Executes a command line on a cluster's node with optional ports forwarding. + examples: + - summary: Report a snapshot of the current processes. + command: | + az batchai cluster node exec -g MyResourceGroup -w MyWorkspace -c MyCluster \ + -n tvm-xxx --exec "ps axu" + - summary: Report a GPU information for a node. + command: | + az batchai cluster node exec -g MyResourceGroup -w MyWorkspace -c MyCluster \ + -n tvm-xxx --exec "nvidia-smi" + - summary: Forward local 9000 to port 9001 on the node. + command: | + az batchai cluster node exec -g MyResourceGroup -w MyWorkspace -c MyCluster \ + -n tvm-xxx -L 9000:localhost:9001 +- group: + name: batchai cluster file + summary: Commands to work with files generated by node setup task. +- command: + name: batchai cluster file list + summary: List files generated by the cluster's node setup task. + description: List files generated by the cluster's node setup task under $AZ_BATCHAI_STDOUTERR_DIR path. This functionality is available only if the node setup task output directory is located on mounted Azure File Share or Azure Blob Container. + examples: + - summary: List names and sizes of files and directories inside of $AZ_BATCHAI_STDOUTERR_DIR. + command: | + az batchai cluster file list -g MyResourceGroup -w MyWorkspace -c MyCluster -o table + - summary: List names, sizes and download URLs for files and directories inside of $AZ_BATCHAI_STDOUTERR_DIR. + command: | + az batchai cluster file list -g MyResourceGroup -w MyWorkspace -c MyCluster + - summary: List names, sizes and download URLs for files and directories inside of $AZ_BATCHAI_STDOUTERR_DIR/folder/subfolder. + command: | + az batchai cluster file list -g MyResourceGroup -w MyWorkspace -c MyCluster \ + -p folder/subfolder + - summary: List names, sizes and download URLs for files and directories inside of $AZ_BATCHAI_STDOUTERR_DIR making download URLs to remain valid for one hour. + command: | + az batchai cluster file list -g MyResourceGroup -w MyWorkspace -c MyCluster \ + --expiry 60 +- group: + name: batchai experiment + summary: Commands to manage experiments. +- command: + name: batchai experiment create + summary: Create an experiment. + examples: + - summary: Create an experiment. + command: az batchai experiment create -g MyResourceGroup -w MyWorkspace -n MyExperiment +- command: + name: batchai experiment delete + summary: Delete an experiment. + examples: + - summary: Delete an experiment. All running jobs will be terminated. + command: az batchai experiment delete -g MyResourceGroup -w MyWorkspace -n MyExperiment + - summary: Delete an experiment without asking for confirmation (for non-interactive scenarios). + command: az batchai experiment delete -g MyResourceGroup -w MyWorkspace -n MyExperiment -y + - summary: Request an experiment deletion without waiting for job to be deleted. + command: az batchai experiment delete -g MyResourceGroup -w MyWorkspace -n MyExperiment --no-wait +- command: + name: batchai experiment list + summary: List experiments. + examples: + - summary: List experiments. + command: az batchai experiment list -g MyResourceGroup -w MyWorkspace -o table +- command: + name: batchai experiment show + summary: Show information about an experiment. + examples: + - summary: Show information about an experiment. + command: az batchai experiment show -g MyResourceGroup -w MyWorkspace -n MyExperiment -o table +- group: + name: batchai job + summary: Commands to manage jobs. +- command: + name: batchai job create + summary: Create a job. + examples: + - summary: Create a job to run on a cluster in the same resource group. + command: | + az batchai job create -g MyResourceGroup -w MyWorkspace -e MyExperiment -n MyJob \ + -c MyCluster -f job.json + - summary: Create a job to run on a cluster in a different workspace. + command: | + az batchai job create -g MyJobResourceGroup -w MyJobWorkspace -e MyExperiment -n MyJob \ + -f job.json \ + -c "/subscriptions/00000000-0000-0000-0000-000000000000/\ + resourceGroups/MyClusterResourceGroup/\ + providers/Microsoft.BatchAI/workspaces/MyClusterWorkspace/clusters/MyCluster" +- command: + name: batchai job terminate + summary: Terminate a job. + examples: + - summary: Terminate a job and wait for the job to be terminated. + command: az batchai job terminate -g MyResourceGroup -w MyWorkspace -e MyExperiment -n MyJob + - summary: Terminate a job without asking for confirmation (for non-interactive scenarios). + command: az batchai job terminate -g MyResourceGroup -w MyWorkspace -e MyExperiment -n MyJob -y + - summary: Request job termination without waiting for the job to be terminated. + command: | + az batchai job terminate -g MyResourceGroup -e MyExperiment -w MyWorkspace -n MyJob \ + --no-wait +- command: + name: batchai job delete + summary: Delete a job. + examples: + - summary: Delete a job. The job will be terminated if it's currently running. + command: az batchai job delete -g MyResourceGroup -w MyWorkspace -e MyExperiment -n MyJob + - summary: Delete a job without asking for confirmation (for non-interactive scenarios). + command: az batchai job delete -g MyResourceGroup -w MyWorkspace -e MyExperiment -n MyJob -y + - summary: Request job deletion without waiting for job to be deleted. + command: az batchai job delete -g MyResourceGroup -w MyWorkspace -e MyExperiment -n MyJob --no-wait +- command: + name: batchai job list + summary: List jobs. + examples: + - summary: List jobs. + command: az batchai job list -g MyResourceGroup -w MyWorkspace -e MyExperiment -o table +- command: + name: batchai job show + summary: Show information about a job. + examples: + - summary: Show full information about a job. + command: az batchai job show -g MyResourceGroup -w MyWorkspace -e MyExperiment -n MyJob + - summary: Show job's summary. + command: az batchai job show -g MyResourceGroup -w MyWorkspace -e MyExperiment -n MyJob -o table +- group: + name: batchai job node + summary: Commands to work with nodes which executed a job. +- command: + name: batchai job node list + summary: List remote login information for nodes which executed the job. + description: "List remote login information for currently existing (not deallocated) nodes on which the job was executed. You can ssh to a particular node using the provided public IP address and the port number.\nE.g. ssh @ -p " + examples: + - summary: List remote login information for a job nodes. + command: az batchai job node list -g MyResourceGroup -w MyWorkspace -e MyExperiment -j MyJob -o table +- command: + name: batchai job node exec + summary: Executes a command line on a cluster's node used to execute the job with optional ports forwarding. + examples: + - summary: Report a GPU state for a job's node. + command: | + az batchai job node exec -g MyResourceGroup -w MyWorkspace -e MyExperiment -j MyJob \ + --exec "nvidia-smi" + - summary: Report a snapshot of the current processes. + command: | + az batchai job node exec -g MyResourceGroup -w MyWorkspace -e MyExperiment -j MyJob \ + --exec "ps aux" + - summary: Forward local 9000 to port 9001 on the given node. + command: | + az batchai job node exec -g MyResourceGroup -w MyWorkspace -e MyExperiment -j MyJob \ + -n tvm-xxx -L 9000:localhost:9001 +- group: + name: batchai job file + summary: Commands to list and stream files in job's output directories. +- command: + name: batchai job file list + summary: List job's output files in a directory with given id. + description: List job's output files in a directory with given id if the output directory is located on mounted Azure File Share or Blob Container. + examples: + - summary: List files in the standard output directory of the job. + command: | + az batchai job file list -g MyResourceGroup -w MyWorkspace -e MyExperiment -j MyJob + - summary: List files in the standard output directory of the job. Generates output in a table format. + command: | + az batchai job file list -g MyResourceGroup -w MyWorkspace -e MyExperiment -j MyJob -o table + - summary: List files in a folder 'MyFolder/MySubfolder' of an output directory with id 'MODELS'. + command: | + az batchai job file list -g MyResourceGroup -w MyWorkspace -e MyExperiment -j MyJob \ + -d MODELS -p MyFolder/MySubfolder + - summary: List files in the standard output directory of the job making download URLs to remain valid for 15 minutes. + command: | + az batchai job file list -g MyResourceGroup -w MyWorkspace -e MyExperiment -j MyJob \ + --expiry 15 +- command: + name: batchai job file stream + summary: Stream the content of a file (similar to 'tail -f'). + description: Waits for the job to create the given file and starts streaming it similar to 'tail -f' command. The command completes when the job finished execution. + examples: + - summary: Stream standard output file of the job. + command: | + az batchai job file stream -g MyResourceGroup -w MyWorkspace -e MyExperiment -j MyJob \ + -f stdout.txt + - summary: Stream a file 'log.txt' from a folder 'logs' of an output directory with id 'OUTPUTS'. + command: | + az batchai job file stream -g MyResourceGroup -w MyWorkspace -e MyExperiment -j MyJob \ + -d OUTPUTS -p logs -f log.txt +- command: + name: batchai job wait + summary: Waits for specified job completion and setups the exit code to the job's exit code. + examples: + - summary: Wait for the job completion. + command: | + az batchai job wait -g MyResourceGroup -w MyWorkspace -n MyJob +- group: + name: batchai file-server + summary: Commands to manage file servers. +- command: + name: batchai file-server create + summary: Create a file server. + examples: + - summary: Create a NFS file server using a configuration file. + command: az batchai file-server create -g MyResourceGroup -w MyWorkspace -n MyNFS -f nfs.json + - summary: Create a NFS manually providing parameters. + command: | + az batchai file-server create -g MyResourceGroup -w MyWorkspace -n MyNFS \ + -s Standard_D14 --disk-count 4 --disk-size 512 \ + --storage-sku Premium_LRS --caching-type readonly \ + -u $USER -k ~/.ssh/id_rsa.pub +- command: + name: batchai file-server delete + summary: Delete a file server. + examples: + - summary: Delete file server and wait for deletion to be completed. + command: az batchai file-server delete -g MyResourceGroup -w MyWorkspace -n MyNFS + - summary: Delete file server without asking for confirmation (for non-interactive scenarios). + command: az batchai file-server delete -g MyResourceGroup -w MyWorkspace -n MyNFS -y + - summary: Request file server deletion without waiting for deletion to be completed. + command: az batchai file-server delete -g MyResourceGroup -w MyWorkspace -n MyNFS --no-wait +- command: + name: batchai file-server list + summary: List file servers. + examples: + - summary: List all file servers in the given workspace. + command: az batchai file-server list -g MyResourceGroup -w MyWorkspace -o table +- command: + name: batchai file-server show + summary: Show information about a file server. + examples: + - summary: Show full information about a file server. + command: az batchai file-server show -g MyResourceGroup -w MyWorkspace -n MyNFS + - summary: Show file server summary. + command: az batchai file-server show -g MyResourceGroup -w MyWorkspace -n MyNFS -o table +- command: + name: batchai list-usages + summary: Gets the current usage information as well as limits for Batch AI resources for given location. + examples: + - summary: Get information for eastus location. + command: az batchai list-usages -l eastus -o table diff --git a/src/command_modules/azure-cli-billing/azure/cli/command_modules/billing/help.yaml b/src/command_modules/azure-cli-billing/azure/cli/command_modules/billing/help.yaml new file mode 100644 index 00000000000..7021d4097e4 --- /dev/null +++ b/src/command_modules/azure-cli-billing/azure/cli/command_modules/billing/help.yaml @@ -0,0 +1,14 @@ +version: 1 +content: +- group: + name: billing + summary: Manage Azure Billing. +- group: + name: billing invoice + summary: Get billing invoices for a subscription. +- group: + name: billing period + summary: Get billing periods for a subscription. +- group: + name: billing enrollment-account + summary: Get enrollment accounts. diff --git a/src/command_modules/azure-cli-botservice/azure/cli/command_modules/botservice/help.yaml b/src/command_modules/azure-cli-botservice/azure/cli/command_modules/botservice/help.yaml new file mode 100644 index 00000000000..0350005b3fe --- /dev/null +++ b/src/command_modules/azure-cli-botservice/azure/cli/command_modules/botservice/help.yaml @@ -0,0 +1,230 @@ +version: 1 +content: +- group: + name: bot + summary: Manage Microsoft Bot Services. +- command: + name: bot create + summary: Create a new bot. +- command: + name: bot show + summary: Get an existing bot. + description: Get information about an existing bot. To get the information needed to connect to the bot, use the --msbot flag with the command. + examples: + - summary: Get the information needed to connect to an existing bot on Azure + command: |- + az bot show -n botName -g MyResourceGroup --msbot +- command: + name: bot prepare-publish + summary: Add scripts to your local source code directory to be able to publish back using `az bot publish`. +- command: + name: bot delete + summary: Delete an existing bot. +- command: + name: bot update + summary: Update an existing bot. + examples: + - summary: Update description on a bot + command: |- + az bot update -n botName -g MyResourceGroup --set properties.description="some description" +- command: + name: bot publish + summary: Publish to a bot's associated app service. + description: Publish your source code to your bot's associated app service. + examples: + - summary: Publish source code to your Azure App, from within the bot code folder + command: |- + az bot publish -n botName -g MyResourceGroup +- command: + name: bot download + summary: Download an existing bot. + description: The source code is downloaded from the web app associated with the bot. You can then make changes to it and publish it back to your app. +- command: + name: bot facebook create + summary: Create the Facebook Channel on a bot. + examples: + - summary: Create the Facebook Channel for a bot + command: | + az bot facebook create -n botName -g MyResourceGroup --appid myAppId \ + --page-id myPageId --secret mySecret --token myToken +- command: + name: bot email create + summary: Create the Email Channel on a bot. + examples: + - summary: Create the Email Channel for a bot + command: |- + az bot email create -n botName -g MyResourceGroup -a abc@outlook.com \ + -p password +- command: + name: bot msteams create + summary: Create the Microsoft Teams Channel on a bot. + examples: + - summary: Create the Microsoft Teams Channel for a bot with calling enabled + command: |- + az bot msteams create -n botName -g MyResourceGroup --enable-calling + --calling-web-hook https://www.myapp.com/ +- command: + name: bot skype create + summary: Create the Skype Channel on a bot. + examples: + - summary: Create the Skype Channel for a bot with messaging and screen sharing enabled + command: |- + az bot skype create -n botName -g MyResourceGroup --enable-messaging + --enable-screen-sharing +- command: + name: bot kik create + summary: Create the Kik Channel on a bot. + examples: + - summary: Create the Kik Channel for a bot. + command: |- + az bot kik create -n botName -g MyResourceGroup -u mykikname \ + --key key --is-validated +- command: + name: bot directline create + summary: Create the DirectLine Channel on a bot with only v3 protocol enabled. + examples: + - summary: Create the DirectLine Channel for a bot. + command: |- + az bot directline create -n botName -g MyResourceGroup --disablev1 +- command: + name: bot telegram create + summary: Create the Telegram Channel on a bot. + examples: + - summary: Create the Telegram Channel for a bot. + command: |- + az bot telegram create -n botName -g MyResourceGroup --access-token token + --is-validated +- command: + name: bot sms create + summary: Create the SMS Channel on a bot. + examples: + - summary: Create the SMS Channel for a bot. + command: |- + az bot sms create -n botName -g MyResourceGroup --account-sid sid \ + --auth-token token --is-validated --phone 1234567890 +- command: + name: bot slack create + summary: Create the Slack Channel on a bot. + examples: + - summary: Create the Slack Channel for a bot. + command: |- + az bot slack create -n botName -g MyResourceGroup --client-id clientid \ + --client-secret secret --verification-token token +- group: + name: bot authsetting + summary: Manage OAuth connection settings on a bot. +- command: + name: bot authsetting create + summary: Create an OAuth connection setting on a bot. + examples: + - summary: Create a new OAuth connection setting on a bot. + command: |- + az bot authsetting create -g MyResourceGroup -n botName -c myConnectionName \ + --client-id clientId --client-secret secret --provider-scope-string "scope1 scope2"\ + --service google --parameters id=myid +- command: + name: bot authsetting show + summary: Show details of an OAuth connection setting on a bot. +- command: + name: bot authsetting list + summary: Show all OAuth connection settings on a bot. +- command: + name: bot authsetting delete + summary: Delete an OAuth connection setting on a bot. +- command: + name: bot authsetting list-providers + summary: List details for all service providers available for creating OAuth connection settings. + examples: + - summary: List all service providers. + command: |- + az bot authsetting list-providers + - summary: Filter by a particular type of service provider. + command: |- + az bot authsetting list-providers --provider-name google +- command: + name: bot facebook delete + summary: Delete the Facebook Channel on a bot +- command: + name: bot facebook show + summary: Get details of the Facebook Channel on a bot +- group: + name: bot facebook + summary: Manage the Facebook Channel on a bot. +- command: + name: bot email delete + summary: Delete the email Channel on a bot +- command: + name: bot email show + summary: Get details of the email Channel on a bot +- group: + name: bot email + summary: Manage the email Channel on a bot. +- command: + name: bot skype delete + summary: Delete the Skype Channel on a bot +- command: + name: bot skype show + summary: Get details of the Skype Channel on a bot +- group: + name: bot skype + summary: Manage the Skype Channel on a bot. +- command: + name: bot kik delete + summary: Delete the Kik Channel on a bot +- command: + name: bot kik show + summary: Get details of the Kik Channel on a bot +- group: + name: bot kik + summary: Manage the Kik Channel on a bot. +- command: + name: bot directline delete + summary: Delete the Directline Channel on a bot +- command: + name: bot directline show + summary: Get details of the Directline Channel on a bot +- group: + name: bot directline + summary: Manage the Directline Channel on a bot. +- command: + name: bot telegram delete + summary: Delete the Telegram Channel on a bot +- command: + name: bot telegram show + summary: Get details of the Telegram Channel on a bot +- group: + name: bot telegram + summary: Manage the Telegram Channel on a bot. +- command: + name: bot sms delete + summary: Delete the SMS Channel on a bot +- command: + name: bot sms show + summary: Get details of the SMS Channel on a bot +- group: + name: bot sms + summary: Manage the SMS Channel on a bot. +- command: + name: bot slack delete + summary: Delete the Slack Channel on a bot +- command: + name: bot slack show + summary: Get details of the Slack Channel on a bot +- group: + name: bot slack + summary: Manage the Slack Channel on a bot. +- command: + name: bot msteams delete + summary: Delete the Microsoft Teams Channel on a bot +- command: + name: bot msteams show + summary: Get details of the Microsoft Teams Channel on a bot +- group: + name: bot msteams + summary: Manage the Microsoft Teams Channel on a bot. +- command: + name: bot webchat show + summary: Get details of the Webchat Channel on a bot +- group: + name: bot webchat + summary: Manage the Webchat Channel on a bot. diff --git a/src/command_modules/azure-cli-cdn/azure/cli/command_modules/cdn/help.yaml b/src/command_modules/azure-cli-cdn/azure/cli/command_modules/cdn/help.yaml new file mode 100644 index 00000000000..29c52f875f6 --- /dev/null +++ b/src/command_modules/azure-cli-cdn/azure/cli/command_modules/cdn/help.yaml @@ -0,0 +1,156 @@ +version: 1 +content: +- group: + name: cdn + summary: Manage Azure Content Delivery Networks (CDNs). +- group: + name: cdn profile + summary: Manage CDN profiles to define an edge network. +- command: + name: cdn profile create + summary: Create a new CDN profile. + arguments: + - name: --sku + summary: > + The pricing tier (defines a CDN provider, feature list and rate) of the CDN profile. + Defaults to Standard_Akamai. + examples: + - summary: Create a CDN profile using Verizon premium CDN. + command: > + az cdn profile create -g group -n profile --sku Premium_Verizon +- command: + name: cdn profile update + summary: Update a CDN profile. +- command: + name: cdn profile delete + summary: Delete a CDN profile. + examples: + - summary: Delete a CDN profile. + command: > + az cdn profile delete -g group -n profile +- command: + name: cdn profile list + summary: List CDN profiles. + examples: + - summary: List CDN profiles in a resource group. + command: > + az cdn profile list -g group +- group: + name: cdn endpoint + summary: Manage CDN endpoints. +- command: + name: cdn endpoint create + summary: Create a named endpoint to connect to a CDN. + examples: + - summary: Create an endpoint to service content for hostname over HTTP or HTTPS. + command: > + az cdn endpoint create -g group -n endpoint --profile-name profile \ + --origin www.example.com + - summary: Create an endpoint with a custom domain origin with HTTP and HTTPS ports. + command: > + az cdn endpoint create -g group -n endpoint --profile-name profile \ + --origin www.example.com 88 4444 + - summary: Create an endpoint with a custom domain with compression and only HTTPS. + command: > + az cdn endpoint create -g group -n endpoint --profile-name profile \ + --origin www.example.com --no-http --enable-compression +- command: + name: cdn endpoint update + summary: Update a CDN endpoint to manage how content is delivered. + examples: + - summary: Turn off HTTP traffic for an endpoint. + command: > + az cdn endpoint update -g group -n endpoint --profile-name profile --no-http + - summary: Enable content compression for an endpoint. + command: > + az cdn endpoint update -g group -n endpoint --profile-name profile \ + --enable-compression +- command: + name: cdn endpoint delete + summary: Delete a CDN endpoint. + examples: + - summary: Delete a CDN endpoint. + command: > + az cdn endpoint delete -g group -n endpoint --profile-name profile-name +- command: + name: cdn endpoint start + summary: Start a CDN endpoint. + examples: + - summary: Start a CDN endpoint. + command: > + az cdn endpoint start -g group -n endpoint --profile-name profile-name +- command: + name: cdn endpoint stop + summary: Stop a CDN endpoint. + examples: + - summary: Stop a CDN endpoint. + command: > + az cdn endpoint stop -g group -n endpoint --profile-name profile-name +- command: + name: cdn endpoint load + summary: Pre-load content for a CDN endpoint. + examples: + - summary: Pre-load Javascript and CSS content for an endpoint. + command: > + az cdn endpoint load -g group -n endpoint --profile-name profile-name --content-paths \ + '/scripts/app.js' '/styles/main.css' +- command: + name: cdn endpoint purge + summary: Purge pre-loaded content for a CDN endpoint. + examples: + - summary: Purge pre-loaded Javascript and CSS content. + command: > + az cdn endpoint purge -g group -n endpoint --profile-name profile-name --content-paths \ + '/scripts/app.js' '/styles/*' +- command: + name: cdn endpoint list + summary: List available endpoints for a CDN. + examples: + - summary: List all endpoints within a given CDN profile. + command: > + az cdn endpoint list -g group --profile-name profile-name +- group: + name: cdn custom-domain + summary: Manage Azure CDN Custom Domains to provide custom host names for endpoints. +- command: + name: cdn custom-domain delete + summary: Delete the custom domain of a CDN. + examples: + - summary: Delete a custom domain. + command: > + az cdn custom-domain delete -g group --endpoint-name endpoint --profile-name profile \ + -n domain-name +- command: + name: cdn custom-domain show + summary: Show details for the custom domain of a CDN. + examples: + - summary: Get the details of a custom domain. + command: > + az cdn custom-domain show -g group --endpoint-name endpoint --profile-name profile \ + -n domain-name +- command: + name: cdn custom-domain create + summary: Create a new custom domain to provide a hostname for a CDN endpoint. + description: > + Creates a new custom domain which must point to the hostname of the endpoint. + For example, the custom domain hostname cdn.contoso.com would need to have a + CNAME record pointing to the hostname of the endpoint related to this custom + domain. + arguments: + - name: --profile-name + summary: Name of the CDN profile which is unique within the resource group. + - name: --endpoint-name + summary: Name of the endpoint under the profile which is unique globally. + - name: --hostname + summary: The host name of the custom domain. Must be a domain name. + examples: + - summary: Create a custom domain within an endpoint and profile. + command: > + az cdn custom-domain create -g group --endpoint-name endpoint --profile-name profile \ + -n domain-name --hostname www.example.com +- group: + name: cdn origin + summary: List or show existing origins related to CDN endpoints. +- group: + name: cdn edge-node + summary: View all available CDN edge nodes. diff --git a/src/command_modules/azure-cli-cloud/azure/cli/command_modules/cloud/help.yaml b/src/command_modules/azure-cli-cloud/azure/cli/command_modules/cloud/help.yaml new file mode 100644 index 00000000000..0b13d97b06f --- /dev/null +++ b/src/command_modules/azure-cli-cloud/azure/cli/command_modules/cloud/help.yaml @@ -0,0 +1,27 @@ +version: 1 +content: +- group: + name: cloud + summary: Manage registered Azure clouds. +- command: + name: cloud list + summary: List registered clouds. +- command: + name: cloud show + summary: Get the details of a registered cloud. +- command: + name: cloud register + summary: Register a cloud. + description: When registering a cloud, specify only the resource manager endpoint for the autodetection of other endpoints. +- command: + name: cloud unregister + summary: Unregister a cloud. +- command: + name: cloud set + summary: Set the active cloud. +- command: + name: cloud update + summary: Update the configuration of a cloud. +- command: + name: cloud list-profiles + summary: List the supported profiles for a cloud. diff --git a/src/command_modules/azure-cli-cognitiveservices/azure/cli/command_modules/cognitiveservices/help.yaml b/src/command_modules/azure-cli-cognitiveservices/azure/cli/command_modules/cognitiveservices/help.yaml new file mode 100644 index 00000000000..5f5ef380f1e --- /dev/null +++ b/src/command_modules/azure-cli-cognitiveservices/azure/cli/command_modules/cognitiveservices/help.yaml @@ -0,0 +1,103 @@ +version: 1 +content: +- group: + name: cognitiveservices + summary: Manage Azure Cognitive Services accounts. + description: This article lists the Azure CLI commands for Azure Cognitive Services account and subscription management only. Refer to the documentation at https://docs.microsoft.com/azure/cognitive-services/ for individual services to learn how to use the APIs and supported SDKs. +- command: + name: cognitiveservices list + summary: Manage Azure Cognitive Services accounts. + description: This article lists the Azure CLI commands for Azure Cognitive Services account and subscription management only. Refer to the documentation at https://docs.microsoft.com/azure/cognitive-services/ for individual services to learn how to use the APIs and supported SDKs. + examples: + - summary: List all the Cognitive Services accounts in a resource group. + command: az cognitiveservices list -g MyResourceGroup +- command: + name: cognitiveservices account list + summary: Manage Azure Cognitive Services accounts. + description: This article lists the Azure CLI commands for Azure Cognitive Services account and subscription management only. Refer to the documentation at https://docs.microsoft.com/azure/cognitive-services/ for individual services to learn how to use the APIs and supported SDKs. + examples: + - summary: List all the Cognitive Services accounts in a resource group. + command: az cognitiveservices account list -g MyResourceGroup +- group: + name: cognitiveservices account + summary: Manage Azure Cognitive Services accounts. + description: This article lists the Azure CLI commands for Azure Cognitive Services account and subscription management only. Refer to the documentation at https://docs.microsoft.com/azure/cognitive-services/ for individual services to learn how to use the APIs and supported SDKs. +- command: + name: cognitiveservices account delete + summary: Manage Azure Cognitive Services accounts. + description: This article lists the Azure CLI commands for Azure Cognitive Services account and subscription management only. Refer to the documentation at https://docs.microsoft.com/azure/cognitive-services/ for individual services to learn how to use the APIs and supported SDKs. + examples: + - summary: Delete account. + command: az cognitiveservices account delete --name myresource-luis -g cognitive-services-resource-group +- command: + name: cognitiveservices account create + summary: Manage Azure Cognitive Services accounts. + description: This article lists the Azure CLI commands for Azure Cognitive Services account and subscription management only. Refer to the documentation at https://docs.microsoft.com/azure/cognitive-services/ for individual services to learn how to use the APIs and supported SDKs. + arguments: + - name: --kind + value-sources: + - link: + command: az cognitiveservices account list-kinds + - name: --sku + value-sources: + - link: + command: az cognitiveservices account list-skus + examples: + - summary: Create an S0 face API Cognitive Services account in West Europe without confirmation required. + command: az cognitiveservices account create -n myresource -g myResourceGroup --kind Face --sku S0 -l WestEurope --yes +- command: + name: cognitiveservices account show + summary: Manage Azure Cognitive Services accounts. + description: This article lists the Azure CLI commands for Azure Cognitive Services account and subscription management only. Refer to the documentation at https://docs.microsoft.com/azure/cognitive-services/ for individual services to learn how to use the APIs and supported SDKs. + examples: + - summary: Show account information. + command: az cognitiveservices account show --name myresource --resource-group cognitive-services-resource-group +- command: + name: cognitiveservices account update + summary: Manage Azure Cognitive Services accounts. + description: This article lists the Azure CLI commands for Azure Cognitive Services account and subscription management only. Refer to the documentation at https://docs.microsoft.com/azure/cognitive-services/ for individual services to learn how to use the APIs and supported SDKs. + arguments: + - name: --sku + value-sources: + - link: + command: az cognitiveservices account list-skus + examples: + - summary: Update sku and tags. + command: az cognitiveservices account update --name myresource -g cognitive-services-resource-group --sku S0 --tags external-app=chatbot-HR azure-web-app-bot=HR-external azure-app-service=HR-external-app-service +- command: + name: cognitiveservices account list-skus + summary: Manage Azure Cognitive Services accounts. + description: This article lists the Azure CLI commands for Azure Cognitive Services account and subscription management only. Refer to the documentation at https://docs.microsoft.com/azure/cognitive-services/ for individual services to learn how to use the APIs and supported SDKs. + arguments: + - name: --name + description: | + --kind and --location will be ignored when --name is specified. + --resource-group is required when when --name is specified. + - name: --resource-group + description: | + --resource-group is used when when --name is specified. In other cases it will be ignored. + - name: --kind + value-sources: + - link: + command: az cognitiveservices account list-kinds + examples: + - summary: Show SKUs. + command: az cognitiveservices account list-skus --kind Face --location westus +- group: + name: cognitiveservices account keys + summary: Manage Azure Cognitive Services accounts. + description: This article lists the Azure CLI commands for Azure Cognitive Services account and subscription management only. Refer to the documentation at https://docs.microsoft.com/azure/cognitive-services/ for individual services to learn how to use the APIs and supported SDKs. +- command: + name: cognitiveservices account keys regenerate + summary: Manage Azure Cognitive Services accounts. + description: This article lists the Azure CLI commands for Azure Cognitive Services account and subscription management only. Refer to the documentation at https://docs.microsoft.com/azure/cognitive-services/ for individual services to learn how to use the APIs and supported SDKs. + examples: + - summary: Get new keys for resource. + command: az cognitiveservices account keys regenerate --name myresource -g cognitive-services-resource-group --key-name key1 +- command: + name: cognitiveservices account keys list + summary: Manage Azure Cognitive Services accounts. + description: This article lists the Azure CLI commands for Azure Cognitive Services account and subscription management only. Refer to the documentation at https://docs.microsoft.com/azure/cognitive-services/ for individual services to learn how to use the APIs and supported SDKs. + examples: + - summary: Get current resource keys. + command: az cognitiveservices account keys list --name myresource -g cognitive-services-resource-group diff --git a/src/command_modules/azure-cli-configure/azure/cli/command_modules/configure/help.yaml b/src/command_modules/azure-cli-configure/azure/cli/command_modules/configure/help.yaml new file mode 100644 index 00000000000..a0fcfb2f46b --- /dev/null +++ b/src/command_modules/azure-cli-configure/azure/cli/command_modules/configure/help.yaml @@ -0,0 +1,14 @@ +version: 1 +content: +- command: + name: configure + summary: Manage Azure CLI configuration. This command is interactive. + arguments: + - name: --defaults + summary: > + Space-separated 'name=value' pairs for common argument defaults. + examples: + - summary: Set default resource group, webapp and VM names. + command: az configure --defaults group=myRG web=myweb vm=myvm + - summary: Clear default webapp and VM names. + command: az configure --defaults vm='' web='' diff --git a/src/command_modules/azure-cli-consumption/azure/cli/command_modules/consumption/help.yaml b/src/command_modules/azure-cli-consumption/azure/cli/command_modules/consumption/help.yaml new file mode 100644 index 00000000000..9fedcfcc0ee --- /dev/null +++ b/src/command_modules/azure-cli-consumption/azure/cli/command_modules/consumption/help.yaml @@ -0,0 +1,53 @@ +version: 1 +content: +- group: + name: consumption + summary: Manage consumption of Azure resources. +- group: + name: consumption reservation + summary: Manage reservations for Azure resources. +- group: + name: consumption reservation summary + summary: List reservation summaries. +- command: + name: consumption reservation summary list + summary: List reservation summaries for daily or monthly by order Id or reservation id. +- group: + name: consumption reservation detail + summary: List reservation details. +- command: + name: consumption reservation detail list + summary: List the details of a reservation by order id or reservation id. +- group: + name: consumption usage + summary: Inspect the usage of Azure resources. +- command: + name: consumption usage list + summary: List the details of Azure resource consumption, either as an invoice or within a billing period. +- group: + name: consumption pricesheet + summary: Inspect the price sheet of an Azure subscription within a billing period. +- command: + name: consumption pricesheet show + summary: Show the price sheet for an Azure subscription within a billing period. +- group: + name: consumption marketplace + summary: Inspect the marketplace usage data of an Azure subscription within a billing period. +- command: + name: consumption marketplace list + summary: List the marketplace for an Azure subscription within a billing period. +- group: + name: consumption budget + summary: Manage budgets for an Azure subscription. +- command: + name: consumption budget list + summary: List budgets for an Azure subscription. +- command: + name: consumption budget show + summary: Show budget for an Azure subscription. +- command: + name: consumption budget create + summary: Create a budget for an Azure subscription. +- command: + name: consumption budget delete + summary: Delete a budget for an Azure subscription. diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/help.yaml b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/help.yaml new file mode 100644 index 00000000000..15974152144 --- /dev/null +++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/help.yaml @@ -0,0 +1,68 @@ +version: 1 +content: +- group: + name: container + summary: Manage Azure Container Instances. +- command: + name: container create + summary: Create a container group. + examples: + - summary: Create a container in a container group with 1 core and 1Gb of memory. + command: az container create -g MyResourceGroup --name myapp --image myimage:latest --cpu 1 --memory 1 + - summary: Create a container in a container group that runs Windows, with 2 cores and 3.5Gb of memory. + command: az container create -g MyResourceGroup --name mywinapp --image winappimage:latest --os-type Windows --cpu 2 --memory 3.5 + - summary: Create a container in a container group with public IP address, ports and DNS name label. + command: az container create -g MyResourceGroup --name myapp --image myimage:latest --ports 80 443 --dns-name-label contoso + - summary: Create a container in a container group that invokes a script upon start. + command: az container create -g MyResourceGroup --name myapp --image myimage:latest --command-line "/bin/sh -c '/path to/myscript.sh'" + - summary: Create a container in a container group that runs a command and stop the container afterwards. + command: az container create -g MyResourceGroup --name myapp --image myimage:latest --command-line "echo hello" --restart-policy Never + - summary: Create a container in a container group with environment variables. + command: az container create -g MyResourceGroup --name myapp --image myimage:latest --environment-variables key1=value1 key2=value2 + - summary: Create a container in a container group using container image from Azure Container Registry. + command: az container create -g MyResourceGroup --name myapp --image myAcrRegistry.azurecr.io/myimage:latest --registry-password password + - summary: Create a container in a container group that mounts an Azure File share as volume. + command: az container create -g MyResourceGroup --name myapp --image myimage:latest --command-line "cat /mnt/azfile/myfile" --azure-file-volume-share-name myshare --azure-file-volume-account-name mystorageaccount --azure-file-volume-account-key mystoragekey --azure-file-volume-mount-path /mnt/azfile + - summary: Create a container in a container group that mounts a git repo as volume. + command: az container create -g MyResourceGroup --name myapp --image myimage:latest --command-line "cat /mnt/gitrepo" --gitrepo-url https://github.com/user/myrepo.git --gitrepo-dir ./dir1 --gitrepo-mount-path /mnt/gitrepo + - summary: Create a container in a container group using a yaml file. + command: az container create -g MyResourceGroup -f containerGroup.yaml + - summary: Create a container group using Log Analytics from a workspace name. + command: az container create -g MyResourceGroup --name myapp --log-analytics-workspace myworkspace + - summary: Create a container group with a system assigned identity. + command: az container create -g MyResourceGroup --name myapp --image myimage:latest --assign-identity + - summary: Create a container group with a system assigned identity. The group will have a 'Contributor' role with access to a storage account. + command: az container create -g MyResourceGroup --name myapp --image myimage:latest --assign-identity --scope /subscriptions/99999999-1bf0-4dda-aec3-cb9272f09590/MyResourceGroup/myRG/providers/Microsoft.Storage/storageAccounts/storage1 + - summary: Create a container group with a user assigned identity. + command: az container create -g MyResourceGroup --name myapp --image myimage:latest --assign-identity /subscriptions/mySubscrpitionId/resourcegroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myID + - summary: Create a container group with both system and user assigned identity. + command: az container create -g MyResourceGroup --name myapp --image myimage:latest --assign-identity [system] /subscriptions/mySubscrpitionId/resourcegroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myID + min_profile: latest +- command: + name: container delete + summary: Delete a container group. +- command: + name: container list + summary: List container groups. +- command: + name: container show + summary: Get the details of a container group. +- command: + name: container logs + summary: Examine the logs for a container in a container group. +- command: + name: container export + summary: Export a container group in yaml format. + examples: + - summary: Export a container group in yaml. + command: az container export -g MyResourceGroup --name mynginx -f output.yaml +- command: + name: container exec + summary: Execute a command from within a running container of a container group. + description: The most common use case is to open an interactive bash shell. See examples below. This command is currently not supported for Windows machines. + examples: + - summary: Stream a shell from within an nginx container. + command: az container exec -g MyResourceGroup --name mynginx --container-name nginx --exec-command "/bin/bash" +- command: + name: container attach + summary: Attach local standard output and error streams to a container in a container group. diff --git a/src/command_modules/azure-cli-cosmosdb/azure/cli/command_modules/cosmosdb/help.yaml b/src/command_modules/azure-cli-cosmosdb/azure/cli/command_modules/cosmosdb/help.yaml new file mode 100644 index 00000000000..f78d52481da --- /dev/null +++ b/src/command_modules/azure-cli-cosmosdb/azure/cli/command_modules/cosmosdb/help.yaml @@ -0,0 +1,44 @@ +version: 1 +content: +- group: + name: cosmosdb + summary: Manage Azure Cosmos DB database accounts. +- group: + name: cosmosdb database + summary: Manage Azure Cosmos DB databases. +- group: + name: cosmosdb collection + summary: Manage Azure Cosmos DB collections. +- command: + name: cosmosdb check-name-exists + summary: Checks if an Azure Cosmos DB account name exists. +- command: + name: cosmosdb create + summary: Creates a new Azure Cosmos DB database account. +- command: + name: cosmosdb delete + summary: Deletes an Azure Cosmos DB database account. +- command: + name: cosmosdb failover-priority-change + summary: Changes the failover priority for the Azure Cosmos DB database account. +- command: + name: cosmosdb list + summary: List Azure Cosmos DB database accounts. +- command: + name: cosmosdb list-connection-strings + summary: List the connection strings for a Azure Cosmos DB database account. +- command: + name: cosmosdb list-keys + summary: List the access keys for a Azure Cosmos DB database account. +- command: + name: cosmosdb list-read-only-keys + summary: List the read-only access keys for a Azure Cosmos DB database account. +- command: + name: cosmosdb regenerate-key + summary: Regenerate an access key for a Azure Cosmos DB database account. +- command: + name: cosmosdb show + summary: Get the details of an Azure Cosmos DB database account. +- command: + name: cosmosdb update + summary: Update an Azure Cosmos DB database account. diff --git a/src/command_modules/azure-cli-dla/azure/cli/command_modules/dla/help.yaml b/src/command_modules/azure-cli-dla/azure/cli/command_modules/dla/help.yaml new file mode 100644 index 00000000000..4aac8b330fb --- /dev/null +++ b/src/command_modules/azure-cli-dla/azure/cli/command_modules/dla/help.yaml @@ -0,0 +1,275 @@ +version: 1 +content: +- group: + name: dla + summary: (PREVIEW) Manage Data Lake Analytics accounts, jobs, and catalogs. +- group: + name: dla job + summary: (PREVIEW) Manage Data Lake Analytics jobs. +- command: + name: dla job submit + summary: Submit a job to a Data Lake Analytics account. + arguments: + - name: --job-name + summary: Name for the submitted job. + - name: --script + summary: Script to submit. This may be '@{file}' to load from a file. + - name: --runtime-version + summary: The runtime version to use. + description: This parameter is used for explicitly overwriting the default runtime. It should only be done if you know what you are doing. + - name: --degree-of-parallelism + summary: The degree of parallelism for the job. + description: Higher values equate to more parallelism and will usually yield faster running jobs, at the cost of more AUs. + - name: --priority + summary: The priority of the job. + description: Lower values increase the priority, with the lowest value being 1. This determines the order jobs are run in. +- command: + name: dla job cancel + summary: Cancel a Data Lake Analytics job. +- command: + name: dla job show + summary: Get information for a Data Lake Analytics job. +- command: + name: dla job wait + summary: Wait for a Data Lake Analytics job to finish. + description: This command exits when the job completes. + arguments: + - name: --job-id + summary: Job ID to poll for completion. +- command: + name: dla job list + summary: List Data Lake Analytics jobs. +- group: + name: dla catalog + summary: (PREVIEW) Manage Data Lake Analytics catalogs. +- group: + name: dla catalog database + summary: (PREVIEW) Manage Data Lake Analytics catalog databases. +- group: + name: dla catalog assembly + summary: (PREVIEW) Manage Data Lake Analytics catalog assemblies. +- group: + name: dla catalog external-data-source + summary: (PREVIEW) Manage Data Lake Analytics catalog external data sources. +- group: + name: dla catalog procedure + summary: (PREVIEW) Manage Data Lake Analytics catalog stored procedures. +- group: + name: dla catalog schema + summary: (PREVIEW) Manage Data Lake Analytics catalog schemas. +- group: + name: dla catalog table + summary: (PREVIEW) Manage Data Lake Analytics catalog tables. +- command: + name: dla catalog table list + summary: List tables in a database or schema. + arguments: + - name: --database-name + summary: The name of the database. + - name: --schema-name + summary: The schema assocated with the tables to list. +- group: + name: dla catalog table-partition + summary: (PREVIEW) Manage Data Lake Analytics catalog table partitions. +- group: + name: dla catalog table-stats + summary: (PREVIEW) Manage Data Lake Analytics catalog table statistics. +- command: + name: dla catalog table-stats list + summary: List table statistics in a database, table, or schema. + arguments: + - name: --database-name + summary: The name of the database. + - name: --schema-name + summary: The schema associated with the tables to list. + - name: --table-name + summary: The table to list statistics for. `--schema-name` must also be specified. +- group: + name: dla catalog table-type + summary: (PREVIEW) Manage Data Lake Analytics catalog table types. +- group: + name: dla catalog tvf + summary: (PREVIEW) Manage Data Lake Analytics catalog table valued functions. +- command: + name: dla catalog tvf list + summary: List table valued functions in a database or schema. + arguments: + - name: --database-name + summary: The name of the database. + - name: --schema-name + summary: The name of the schema assocated with table valued functions to list. +- group: + name: dla catalog view + summary: (PREVIEW) Manage Data Lake Analytics catalog views. +- command: + name: dla catalog view list + summary: List views in a database or schema. + arguments: + - name: --database-name + summary: The name of the database. + - name: --schema-name + summary: The name of the schema associated with the views to list. +- group: + name: dla catalog credential + summary: (PREVIEW) Manage Data Lake Analytics catalog credentials. +- command: + name: dla catalog credential create + summary: Create a new catalog credential for use with an external data source. + arguments: + - name: --credential-name + summary: The name of the credential. + - name: --database-name + summary: The name of the database in which to create the credential. + - name: --user-name + summary: The user name that will be used when authenticating with this credential. +- command: + name: dla catalog credential update + summary: Update a catalog credential for use with an external data source. + arguments: + - name: --credential-name + summary: The name of the credential to update. + - name: --database-name + summary: The name of the database in which the credential exists. + - name: --user-name + summary: The user name associated with the credential that will have its password updated. +- command: + name: dla catalog credential show + summary: Retrieve a catalog credential. +- command: + name: dla catalog credential list + summary: List catalog credentials. +- command: + name: dla catalog credential delete + summary: Delete a catalog credential. +- group: + name: dla catalog package + summary: (PREVIEW) Manage Data Lake Analytics catalog packages. +- group: + name: dla account + summary: (PREVIEW) Manage Data Lake Analytics accounts. +- command: + name: dla account create + summary: Create a Data Lake Analytics account. + arguments: + - name: --default-data-lake-store + summary: The default Data Lake Store account to associate with the created account. + - name: --max-degree-of-parallelism + summary: The maximum degree of parallelism for this account. + - name: --max-job-count + summary: The maximum number of concurrent jobs for this account. + - name: --query-store-retention + summary: The number of days to retain job metadata. +- command: + name: dla account update + summary: Update a Data Lake Analytics account. + arguments: + - name: --max-degree-of-parallelism + summary: The maximum degree of parallelism for this account. + - name: --max-job-count + summary: The maximum number of concurrent jobs for this account. + - name: --query-store-retention + summary: The number of days to retain job metadata. + - name: --firewall-state + summary: Enable or disable existing firewall rules. + - name: --allow-azure-ips + summary: Allow or block IPs originating from Azure through the firewall. +- command: + name: dla account show + summary: Get the details of a Data Lake Analytics account. +- command: + name: dla account list + summary: List available Data Lake Analytics accounts. +- command: + name: dla account delete + summary: Delete a Data Lake Analytics account. +- group: + name: dla account blob-storage + summary: (PREVIEW) Manage links between Data Lake Analytics accounts and Azure Storage. +- command: + name: dla account blob-storage add + summary: Links an Azure Storage account to the specified Data Lake Analytics account. +- command: + name: dla account blob-storage update + summary: Updates an Azure Storage account linked to the specified Data Lake Analytics account. +- group: + name: dla account data-lake-store + summary: (PREVIEW) Manage links between Data Lake Analytics and Data Lake Store accounts. +- group: + name: dla account firewall + summary: (PREVIEW) Manage Data Lake Analytics account firewall rules. +- command: + name: dla account firewall create + summary: Create a firewall rule in a Data Lake Analytics account. + arguments: + - name: --end-ip-address + summary: The end of the valid IP range for the firewall rule. + - name: --start-ip-address + summary: The start of the valid IP range for the firewall rule. + - name: --firewall-rule-name + summary: The name of the firewall rule. +- command: + name: dla account firewall update + summary: Update a firewall rule in a Data Lake Analytics account. +- command: + name: dla account firewall show + summary: Retrieve a firewall rule in a Data Lake Analytics account. +- command: + name: dla account firewall list + summary: List firewall rules in a Data Lake Analytics account. +- command: + name: dla account firewall delete + summary: Delete a firewall rule in a Data Lake Analytics account. +- group: + name: dla account compute-policy + summary: (PREVIEW) Manage Data Lake Analytics account compute policies. +- command: + name: dla account compute-policy create + summary: Create a compute policy in the Data Lake Analytics account. + arguments: + - name: --max-dop-per-job + summary: The maximum degree of parallelism allowed per job for this policy. At least one of `--min-priority-per-job` and `--max-dop-per-job` must be specified. + - name: --min-priority-per-job + summary: The minimum priority allowed per job for this policy. At least one of `--min-priority-per-job` and `--max-dop-per-job` must be specified. + - name: --compute-policy-name + summary: The name of the compute policy to create. + - name: --object-id + summary: The Azure Active Directory object ID of the user, group, or service principal to apply the policy to. + - name: --object-type + summary: The Azure Active Directory object type associated with the supplied object ID. +- command: + name: dla account compute-policy update + summary: Update a compute policy in the Data Lake Analytics account. + arguments: + - name: --max-dop-per-job + summary: The maximum degree of parallelism allowed per job for this policy. At least one of `--min-priority-per-job` and `--max-dop-per-job` must be specified. + - name: --min-priority-per-job + summary: The minimum priority allowed per job for this policy. At least one of `--min-priority-per-job` and `--max-dop-per-job` must be specified. + - name: --compute-policy-name + summary: The name of the compute policy to update. +- command: + name: dla account compute-policy show + summary: Retrieve a compute policy in a Data Lake Analytics account. +- command: + name: dla account compute-policy list + summary: List compute policies in the a Lake Analytics account. +- command: + name: dla account compute-policy delete + summary: Delete a compute policy in a Data Lake Analytics account. +- group: + name: dla job pipeline + summary: (PREVIEW) Manage Data Lake Analytics job pipelines. +- command: + name: dla job pipeline show + summary: Retrieve a job pipeline in a Data Lake Analytics account. +- command: + name: dla job pipeline list + summary: List job pipelines in a Data Lake Analytics account. +- group: + name: dla job recurrence + summary: (PREVIEW) Manage Data Lake Analytics job recurrences. +- command: + name: dla job recurrence show + summary: Retrieve a job recurrence in a Data Lake Analytics account. +- command: + name: dla job recurrence list + summary: List job recurrences in a Data Lake Analytics account. diff --git a/src/command_modules/azure-cli-dls/azure/cli/command_modules/dls/help.yaml b/src/command_modules/azure-cli-dls/azure/cli/command_modules/dls/help.yaml new file mode 100644 index 00000000000..c70d13dbbee --- /dev/null +++ b/src/command_modules/azure-cli-dls/azure/cli/command_modules/dls/help.yaml @@ -0,0 +1,214 @@ +version: 1 +content: +- group: + name: dls + summary: (PREVIEW) Manage Data Lake Store accounts and filesystems. +- group: + name: dls account + summary: (PREVIEW) Manage Data Lake Store accounts. +- command: + name: dls account create + summary: Creates a Data Lake Store account. + arguments: + - name: --default-group + summary: Name of the default group to give permissions to for freshly created files and folders in the Data Lake Store account. + - name: --key-vault-id + summary: Key vault for the user-assigned encryption type. + - name: --key-name + summary: Key name for the user-assigned encryption type. + - name: --key-version + summary: Key version for the user-assigned encryption type. +- command: + name: dls account update + summary: Updates a Data Lake Store account. +- command: + name: dls account show + summary: Get the details of a Data Lake Store account. +- command: + name: dls account list + summary: Lists available Data Lake Store accounts. +- command: + name: dls account enable-key-vault + summary: Enable the use of Azure Key Vault for encryption of a Data Lake Store account. +- command: + name: dls account delete + summary: Delete a Data Lake Store account. +- group: + name: dls account trusted-provider + summary: (PREVIEW) Manage Data Lake Store account trusted identity providers. +- group: + name: dls account firewall + summary: (PREVIEW) Manage Data Lake Store account firewall rules. +- command: + name: dls account firewall create + summary: Creates a firewall rule in a Data Lake Store account. + arguments: + - name: --end-ip-address + summary: The end of the valid ip range for the firewall rule. + - name: --start-ip-address + summary: The start of the valid ip range for the firewall rule. + - name: --firewall-rule-name + summary: The name of the firewall rule. +- command: + name: dls account firewall update + summary: Updates a firewall rule in a Data Lake Store account. +- command: + name: dls account firewall show + summary: Get the details of a firewall rule in a Data Lake Store account. +- command: + name: dls account firewall list + summary: Lists firewall rules in a Data Lake Store account. +- command: + name: dls account firewall delete + summary: Deletes a firewall rule in a Data Lake Store account. +- group: + name: dls account network-rule + summary: (PREVIEW) Manage Data Lake Store account virtual network rules. +- command: + name: dls account network-rule create + summary: Creates a virtual network rule in a Data Lake Store account. + arguments: + - name: --subnet + summary: The subnet name or id for the virtual network rule. + - name: --vnet-name + summary: The name of the virtual network rule. +- command: + name: dls account network-rule update + summary: Updates a virtual network rule in a Data Lake Store account. +- command: + name: dls account network-rule show + summary: Get the details of a virtual network rule in a Data Lake Store account. +- command: + name: dls account network-rule list + summary: Lists virtual network rules in a Data Lake Store account. +- command: + name: dls account network-rule delete + summary: Deletes a virtual network rule in a Data Lake Store account. +- group: + name: dls fs + summary: (PREVIEW) Manage a Data Lake Store filesystem. +- command: + name: dls fs create + summary: Creates a file or folder in a Data Lake Store account. + arguments: + - name: --content + summary: Content for the file to contain upon creation. +- command: + name: dls fs show + summary: Get file or folder information in a Data Lake Store account. +- command: + name: dls fs list + summary: List the files and folders in a Data Lake Store account. +- command: + name: dls fs append + summary: Append content to a file in a Data Lake Store account. + arguments: + - name: --content + summary: Content to be appended to the file. +- command: + name: dls fs delete + summary: Delete a file or folder in a Data Lake Store account. +- command: + name: dls fs upload + summary: Upload a file or folder to a Data Lake Store account. + arguments: + - name: --source-path + summary: The path to the file or folder to upload. + - name: --destination-path + summary: The full path in the Data Lake Store filesystem to upload the file or folder to. + - name: --thread-count + summary: 'Parallelism of the upload. Default: The number of cores in the local machine.' + - name: --chunk-size + summary: Size of a chunk, in bytes. + description: Large files are split into chunks. Files smaller than this size will always be transferred in a single thread. + - name: --buffer-size + summary: Size of the transfer buffer, in bytes. + description: A buffer cannot be bigger than a chunk and cannot be smaller than a block. + - name: --block-size + summary: Size of a block, in bytes. + description: Within each chunk, a smaller block is written for each API call. A block cannot be bigger than a chunk and must be bigger than a buffer. +- command: + name: dls fs download + summary: Download a file or folder from a Data Lake Store account to the local machine. + arguments: + - name: --source-path + summary: The full path in the Data Lake Store filesystem to download the file or folder from. + - name: --destination-path + summary: The local path where the file or folder will be downloaded to. + - name: --thread-count + summary: 'Parallelism of the download. Default: The number of cores in the local machine.' + - name: --chunk-size + summary: Size of a chunk, in bytes. + description: Large files are split into chunks. Files smaller than this size will always be transferred in a single thread. + - name: --buffer-size + summary: Size of the transfer buffer, in bytes. + description: A buffer cannot be bigger than a chunk and cannot be smaller than a block. + - name: --block-size + summary: Size of a block, in bytes. + description: Within each chunk, a smaller block is written for each API call. A block cannot be bigger than a chunk and must be bigger than a buffer. +- command: + name: dls fs test + summary: Test for the existence of a file or folder in a Data Lake Store account. +- command: + name: dls fs preview + summary: Preview the content of a file in a Data Lake Store account. + arguments: + - name: --length + summary: The amount of data to preview in bytes. + description: If not specified, attempts to preview the full file. If the file is > 1MB `--force` must be specified. + - name: --offset + summary: The position in bytes to start the preview from. +- command: + name: dls fs join + summary: Join files in a Data Lake Store account into one file. + arguments: + - name: --source-paths + summary: The space-separated list of files in the Data Lake Store account to join. + - name: --destination-path + summary: The destination path in the Data Lake Store account. +- command: + name: dls fs move + summary: Move a file or folder in a Data Lake Store account. + arguments: + - name: --source-path + summary: The file or folder to move. + - name: --destination-path + summary: The destination path in the Data Lake Store account. +- command: + name: dls fs set-expiry + summary: Set the expiration time for a file. +- command: + name: dls fs remove-expiry + summary: Remove the expiration time for a file. +- group: + name: dls fs access + summary: Manage Data Lake Store filesystem access and permissions. +- command: + name: dls fs access show + summary: Display the access control list (ACL). +- command: + name: dls fs access set-owner + summary: Set the owner information for a file or folder in a Data Lake Store account. + arguments: + - name: --owner + summary: The user Azure Active Directory object ID or user principal name to set as the owner. + - name: --group + summary: The group Azure Active Directory object ID or user principal name to set as the owning group. +- command: + name: dls fs access set-permission + summary: Set the permissions for a file or folder in a Data Lake Store account. + arguments: + - name: --permission + summary: The octal representation of the permissions for user, group and mask. +- command: + name: dls fs access set-entry + summary: Update the access control list for a file or folder. +- command: + name: dls fs access set + summary: Replace the existing access control list for a file or folder. +- command: + name: dls fs access remove-entry + summary: Remove entries for the access control list of a file or folder. +- command: + name: dls fs access remove-all + summary: Remove the access control list for a file or folder. diff --git a/src/command_modules/azure-cli-dms/azure/cli/command_modules/dms/help.yaml b/src/command_modules/azure-cli-dms/azure/cli/command_modules/dms/help.yaml new file mode 100644 index 00000000000..b08e55d7b21 --- /dev/null +++ b/src/command_modules/azure-cli-dms/azure/cli/command_modules/dms/help.yaml @@ -0,0 +1,197 @@ +version: 1 +content: +- group: + name: dms + summary: Manage Azure Data Migration Service (DMS) instances. +- command: + name: dms check-name + summary: Check if a given DMS instance name is available in a given region as well as the name's validity. + arguments: + - name: --name + summary: > + The Service name to check. +- command: + name: dms check-status + summary: Perform a health check and return the status of the service and virtual machine size. +- command: + name: dms create + summary: Create an instance of the Data Migration Service. + arguments: + - name: --sku-name + summary: > + The name of the CPU SKU on which the service's Virtual Machine will run. Check the name and the availability of SKUs in your area with "az dms list-skus". + - name: --subnet + summary: > + The Resource ID of the VNet's Subnet you will use to connect the source and target DBs. + Use "az network vnet subnet show -h" for help to get your subnet's ID. + examples: + - summary: Create an instance of DMS. + command: > + az dms create -l westus -n mydms -g myresourcegroup --sku-name Basic_2vCores --subnet /subscriptions/{vnetSubscriptionId}/resourceGroups/{vnetResourceGroup}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName} --tags tagName1=tagValue1 tagWithNoValue +- command: + name: dms delete + summary: Delete an instance of the Data Migration Service. + arguments: + - name: --delete-running-tasks + summary: > + Cancel any running tasks before deleting the service. +- command: + name: dms list + summary: List the DMS instances within your currently configured subscription (to set this use "az account set"). If provided, only show the instances within a given resource group. + examples: + - summary: List all the instances in your subscription. + command: > + az dms list + - summary: List all the instances in a given resource group. + command: > + az dms list -g myresourcegroup +- command: + name: dms list-skus + summary: List the SKUs that are supported by the Data Migration Service. +- command: + name: dms show + summary: Show the details for an instance of the Data Migration Service. +- command: + name: dms start + summary: Start an instance of the Data Migration Service. It can then be used to run data migrations. +- command: + name: dms stop + summary: Stop an instance of the Data Migration Service. While stopped, it can't be used to run data migrations and the owner won't be billed. +- command: + name: dms wait + summary: Place the CLI in a waiting state until a condition of the DMS instance is met. +- group: + name: dms project + summary: Manage Projects for an instance of the Data Migration Service. +- command: + name: dms project create + summary: Create a migration Project which can contain multiple Tasks. + arguments: + - name: --source-platform + summary: > + The type of server for the source database. The supported types are: SQL. + - name: --target-platform + summary: > + The type of service for the target database. The supported types are: SQLDB. + examples: + - summary: Create a Project for a DMS instance. + command: > + az dms project create -l westus -n myproject -g myresourcegroup --service-name mydms --source-platform SQL --target-platform SQLDB --tags tagName1=tagValue1 tagWithNoValue +- command: + name: dms project delete + summary: Delete a Project. + arguments: + - name: --delete-running-tasks + summary: > + Cancel any running tasks before deleting the Project. +- command: + name: dms project list + summary: List the Projects within an instance of DMS. +- command: + name: dms project show + summary: Show the details of a migration Project. +- command: + name: dms project check-name + summary: Check if a given Project name is available within a given instance of DMS as well as the name's validity. + arguments: + - name: --name + summary: > + The Project name to check. +- group: + name: dms project task + summary: Manage Tasks for a Data Migration Service instance's Project. +- command: + name: dms project task create + summary: Create and start a migration Task. + arguments: + - name: --database-options-json + summary: > + Database and table information. This can be either a JSON-formatted string or the location to a file containing the JSON object. See example below for the format. + - name: --source-connection-json + summary: > + The connection information to the source server. This can be either a JSON-formatted string or the location to a file containing the JSON object. See example below for the format. + - name: --target-connection-json + summary: > + The connection information to the target server. This can be either a JSON-formatted string or the location to a file containing the JSON object. See example below for the format. + - name: --enable-data-integrity-validation + summary: > + Whether to perform a checksum based data integrity validation between source and target for the selected database and tables. + - name: --enable-query-analysis-validation + summary: > + Whether to perform a quick and intelligent query analysis by retrieving queries from the source database and + executing them in the target. The result will have execution statistics for executions in source and target databases + for the extracted queries. + - name: --enable-schema-validation + summary: > + Whether to compare the schema information between source and target. + examples: + - summary: Create and start a Task which performs no validation checks. + command: > + az dms project task create --database-options-json "C:\CLI Files\databaseOptions.json" -n mytask --project-name myproject -g myresourcegroup --service-name mydms --source-connection-json "{'dataSource': 'myserver', 'authentication': 'SqlAuthentication', 'encryptConnection': 'true', 'trustServerCertificate': 'true'}" --target-connection-json "C:\CLI Files\targetConnection.json" + - summary: Create and start a Task which performs all validation checks. + command: > + az dms project task create --database-options-json "C:\CLI Files\databaseOptions.json" -n mytask --project-name myproject -g myresourcegroup --service-name mydms --source-connection-json "C:\CLI Files\sourceConnection.json" --target-connection-json "C:\CLI Files\targetConnection.json" --enable-data-integrity-validation --enable-query-analysis-validation --enable-schema-validation + - summary: The format of the database options JSON object. + command: > + [ + { + "name": "source database", + "target_database_name": "target database", + "make_source_db_read_only": false|true, + "table_map": { + "schema.SourceTableName1": "schema.TargetTableName1", + "schema.SourceTableName2": "schema.TargetTableName2", + ...n + } + }, + ...n + ] + - summary: The format of the connection JSON object. + command: > + { + "userName": "user name", // if this is missing or null, you will be prompted + "password": null, // if this is missing or null (highly recommended) you will be prompted + "dataSource": "server name[,port]", + "authentication": "SqlAuthentication|WindowsAuthentication", + "encryptConnection": true, // highly recommended to leave as true + "trustServerCertificate": true // highly recommended to leave as true + } +- command: + name: dms project task delete + summary: Delete a migration Task. + arguments: + - name: --delete-running-tasks + summary: > + If the Task is currently running, cancel the Task before deleting the Project. +- command: + name: dms project task list + summary: List the Tasks within a Project. Some tasks may have a status of Unknown, which indicates that an error occurred while querying the status of that task. + arguments: + - name: --task-type + summary: > + Filters the list by the type of task. For the list of possible types see "az dms check-status". + examples: + - summary: List all Tasks within a Project. + command: > + az dms project task list --project-name myproject -g myresourcegroup --service-name mydms + - summary: List only the SQL to SQL migration tasks within a Project. + command: > + az dms project task list --project-name myproject -g myresourcegroup --service-name mydms --task-type Migrate.SqlServer.SqlDb +- command: + name: dms project task show + summary: Show the details of a migration Task. Use the "--expand" to get more details. + arguments: + - name: --expand + summary: > + Expand the response to provide more details. Use with "command" to see more details of the Task. + Use with "output" to see the results of the Task's migration. +- command: + name: dms project task cancel + summary: Cancel a Task if it's currently queued or running. +- command: + name: dms project task check-name + summary: Check if a given Task name is available within a given instance of DMS as well as the name's validity. + arguments: + - name: --name + summary: > + The Task name to check. diff --git a/src/command_modules/azure-cli-eventgrid/azure/cli/command_modules/eventgrid/help.yaml b/src/command_modules/azure-cli-eventgrid/azure/cli/command_modules/eventgrid/help.yaml new file mode 100644 index 00000000000..cb7a696eba4 --- /dev/null +++ b/src/command_modules/azure-cli-eventgrid/azure/cli/command_modules/eventgrid/help.yaml @@ -0,0 +1,179 @@ +version: 1 +content: +- group: + name: eventgrid + summary: Manage Azure Event Grid topics and subscriptions. +- group: + name: eventgrid topic + summary: Manage Azure Event Grid topics. +- command: + name: eventgrid topic create + summary: Create a topic. + examples: + - summary: Create a new topic. + command: az eventgrid topic create -g rg1 --name topic1 -l westus2 +- command: + name: eventgrid topic update + summary: Update a topic. + examples: + - summary: Update the properties of an existing topic. + command: az eventgrid topic update -g rg1 --name topic1 --tags Dept=IT +- command: + name: eventgrid topic delete + summary: Delete a topic. + examples: + - summary: Delete a topic. + command: az eventgrid topic delete -g rg1 --name topic1 +- command: + name: eventgrid topic list + summary: List available topics. + examples: + - summary: List all topics in the current Azure subscription. + command: az eventgrid topic list + - summary: List all topics in a resource group. + command: az eventgrid topic list -g rg1 +- command: + name: eventgrid topic show + summary: Get the details of a topic. + examples: + - summary: Show the details of a topic. + command: az eventgrid topic show -g rg1 -n topic1 + - summary: Show the details of a topic based on resource ID. + command: az eventgrid topic show --ids /subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/kalstest/providers/Microsoft.EventGrid/topics/topic1 +- group: + name: eventgrid topic key + summary: Manage shared access keys of a topic. +- command: + name: eventgrid topic key list + summary: List shared access keys of a topic. +- command: + name: eventgrid topic key regenerate + summary: Regenerate a shared access key of a topic. +- group: + name: eventgrid event-subscription + summary: Manage event subscriptions for an Event Grid topic or for an Azure resource. +- command: + name: eventgrid event-subscription create + summary: Create a new event subscription for an Event Grid topic or for an Azure resource. + examples: + - summary: Create a new event subscription for an Event Grid topic, using default filters. + command: | + az eventgrid event-subscription create -g rg1 --topic-name topic1 --name es1 \ + --endpoint https://contoso.azurewebsites.net/api/f1?code=code + - summary: Create a new event subscription for a subscription, using default filters. + command: | + az eventgrid event-subscription create --name es2 \ + --endpoint https://contoso.azurewebsites.net/api/f1?code=code + - summary: Create a new event subscription for a resource group, using default filters. + command: | + az eventgrid event-subscription create -g rg1 --name es3 \ + --endpoint https://contoso.azurewebsites.net/api/f1?code=code + - summary: Create a new event subscription for a storage account, using default filters. + command: | + az eventgrid event-subscription create --resource-id "/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/kalstest/providers/Microsoft.Storage/storageaccounts/kalsegblob" --name es3 \ + --endpoint https://contoso.azurewebsites.net/api/f1?code=code + - summary: Create a new event subscription for a subscription, with a filter specifying a subject prefix. + command: | + az eventgrid event-subscription create --name es4 \ + --endpoint https://contoso.azurewebsites.net/api/f1?code=code \ + --subject-begins-with mysubject_prefix + - summary: Create a new event subscription for a resource group, with a filter specifying a subject suffix. + command: | + az eventgrid event-subscription create -g rg2 --name es5 \ + --endpoint https://contoso.azurewebsites.net/api/f1?code=code \ + --subject-ends-with mysubject_suffix + - summary: Create a new event subscription for a subscription, using default filters, and an EventHub as a destination. + command: | + az eventgrid event-subscription create --name es2 --endpoint-type eventhub \ + --endpoint /subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.EventHub/namespaces/ContosoNamespace/eventhubs/EH1 +- command: + name: eventgrid event-subscription update + summary: Update an event subscription. + examples: + - summary: Update an event subscription for an Event Grid topic to specify a new endpoint. + command: | + az eventgrid event-subscription update -g rg1 --topic-name topic1 --name es1 \ + --endpoint https://contoso.azurewebsites.net/api/f1?code=code + - summary: Update an event subscription for a subscription to specify a new subject-ends-with filter. + command: | + az eventgrid event-subscription update --name es2 --subject-ends-with .jpg + - summary: Update an event subscription for a resource group to specify a new endpoint and a new subject-ends-with filter. + command: | + az eventgrid event-subscription update -g rg1 --name es3 --subject-ends-with .png \ + --endpoint https://contoso.azurewebsites.net/api/f1?code=code + - summary: Update an event subscription for a storage account to specify a new list of included event types. + command: | + az eventgrid event-subscription update --resource-id "/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/kalstest/providers/microsoft.storage/storageaccounts/kalsegblob" --name es3 \ + --included-event-types Microsoft.Storage.BlobCreated Microsoft.Storage.BlobDeleted +- command: + name: eventgrid event-subscription delete + summary: Delete an event subscription. + examples: + - summary: Delete an event subscription for an Event Grid topic. + command: | + az eventgrid event-subscription delete -g rg1 --topic-name topic1 --name es1 + - summary: Delete an event subscription for a subscription. + command: | + az eventgrid event-subscription delete --name es2 + - summary: Delete an event subscription for a resource group. + command: | + az eventgrid event-subscription delete -g rg1 --name es3 + - summary: Delete an event subscription for a storage account. + command: | + az eventgrid event-subscription delete --resource-id "/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/kalstest/providers/microsoft.storage/storageaccounts/kalsegblob" --name es3 +- command: + name: eventgrid event-subscription list + summary: List event subscriptions. + examples: + - summary: List all event subscriptions for an Event Grid topic. + command: | + az eventgrid event-subscription list -g rg1 --topic-name topic1 + - summary: List all event subscriptions for a storage account. + command: | + az eventgrid event-subscription list --resource-id /subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/kalstest/providers/Microsoft.Storage/storageaccounts/kalsegblob + - summary: List all event subscriptions for a topic-type in a specific location (under the currently selected Azure subscription). + command: | + az eventgrid event-subscription list --topic-type Microsoft.Storage.StorageAccounts --location westus2 + - summary: List all event subscriptions for a topic-type in a specific location under a specified resource group. + command: | + az eventgrid event-subscription list --topic-type Microsoft.Storage.StorageAccounts --location westus2 --resource-group kalstest + - summary: List all regional event subscriptions in a specific location (under the currently selected Azure subscription). + command: | + az eventgrid event-subscription list --location westus2 + - summary: List all event subscriptions in a specific location under a specified resource group. + command: | + az eventgrid event-subscription list --location westus2 --resource-group kalstest + - summary: List all global event subscriptions (under the currently selected Azure subscription). + command: | + az eventgrid event-subscription list + - summary: List all global event subscriptions under the currently selected resource group. + command: | + az eventgrid event-subscription list --resource-group kalstest +- command: + name: eventgrid event-subscription show + summary: Get the details of an event subscription. + examples: + - summary: Show the details of an event subscription for an Event Grid topic. + command: | + az eventgrid event-subscription show -g rg1 --topic-name topic1 --name es1 + - summary: Show the details of an event subscription for a subscription. + command: | + az eventgrid event-subscription show --name es2 + - summary: Show the details of an event subscription for a resource group. + command: | + az eventgrid event-subscription show -g rg1 --name es3 + - summary: Show the details of an event subscription for a storage account. + command: | + az eventgrid event-subscription show --resource-id "/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/kalstest/providers/microsoft.storage/storageaccounts/kalsegblob" --name es3 +- group: + name: eventgrid topic-type + summary: Get details for topic types. +- command: + name: eventgrid topic-type list + summary: List registered topic types. +- command: + name: eventgrid topic-type show + summary: Get the details for a topic type. +- command: + name: eventgrid topic-type list-event-types + summary: List the event types supported by a topic type. diff --git a/src/command_modules/azure-cli-eventhubs/azure/cli/command_modules/eventhubs/help.yaml b/src/command_modules/azure-cli-eventhubs/azure/cli/command_modules/eventhubs/help.yaml new file mode 100644 index 00000000000..23c21d36337 --- /dev/null +++ b/src/command_modules/azure-cli-eventhubs/azure/cli/command_modules/eventhubs/help.yaml @@ -0,0 +1,273 @@ +version: 1 +content: +- group: + name: eventhubs + summary: Manage Azure Event Hubs namespaces, eventhubs, consumergroups and geo recovery configurations - Alias +- group: + name: eventhubs namespace + summary: Manage Azure Event Hubs namespace and Authorizationrule +- group: + name: eventhubs namespace authorization-rule + summary: Manage Azure Event Hubs Authorizationrule for Namespace +- group: + name: eventhubs namespace authorization-rule keys + summary: Manage Azure Event Hubs Authorizationrule connection strings for Namespace +- group: + name: eventhubs eventhub + summary: Manage Azure Event Hubs eventhub and authorization-rule +- group: + name: eventhubs eventhub authorization-rule + summary: Manage Azure Service Bus Authorizationrule for Eventhub +- group: + name: eventhubs eventhub authorization-rule keys + summary: Manage Azure Authorizationrule connection strings for Eventhub +- group: + name: eventhubs eventhub consumer-group + summary: Manage Azure Event Hubs consumergroup +- group: + name: eventhubs georecovery-alias + summary: Manage Azure Event Hubs Geo Recovery configuration Alias +- group: + name: eventhubs georecovery-alias authorization-rule + summary: Manage Azure Event Hubs Authorizationrule for Geo Recovery configuration Alias +- group: + name: eventhubs georecovery-alias authorization-rule keys + summary: Manage Azure Event Hubs Authorizationrule connection strings for Geo Recovery configuration Alias +- command: + name: eventhubs namespace exists + summary: check for the availability of the given name for the Namespace + examples: + - summary: Create a new topic. + command: az eventhubs namespace exists --name mynamespace +- command: + name: eventhubs namespace create + summary: Creates the Event Hubs Namespace + examples: + - summary: Creates a new namespace. + command: az eventhubs namespace create --resource-group myresourcegroup --name mynamespace --location westus --tags tag1=value1 tag2=value2 --sku Standard --enable-auto-inflate False --maximum-throughput-units 30 +- command: + name: eventhubs namespace update + summary: Updates the Event Hubs Namespace + examples: + - summary: Update a new namespace. + command: az eventhubs namespace update --resource-group myresourcegroup --name mynamespace --tags tag=value --enable-auto-inflate True +- command: + name: eventhubs namespace show + summary: shows the Event Hubs Namespace Details + examples: + - summary: shows the Namespace details. + command: az eventhubs namespace show --resource-group myresourcegroup --name mynamespace +- command: + name: eventhubs namespace list + summary: Lists the Event Hubs Namespaces + examples: + - summary: List the Event Hubs Namespaces by resource group. + command: az eventhubs namespace list --resource-group myresourcegroup + - summary: Get the Namespaces by Subscription. + command: az eventhubs namespace list +- command: + name: eventhubs namespace delete + summary: Deletes the Namespaces + examples: + - summary: Deletes the Namespace + command: az eventhubs namespace delete --resource-group myresourcegroup --name mynamespace +- command: + name: eventhubs namespace authorization-rule create + summary: Creates Authorizationrule for the given Namespace + examples: + - summary: Creates Authorizationrule + command: az eventhubs namespace authorization-rule create --resource-group myresourcegroup --namespace-name mynamespace --name myauthorule --rights Send Listen +- command: + name: eventhubs namespace authorization-rule update + summary: Updates Authorizationrule for the given Namespace + examples: + - summary: Updates Authorizationrule + command: az eventhubs namespace authorization-rule update --resource-group myresourcegroup --namespace-name mynamespace --name myauthorule --rights Send +- command: + name: eventhubs namespace authorization-rule show + summary: Shows the details of Authorizationrule + examples: + - summary: Shows the details of Authorizationrule + command: az eventhubs namespace authorization-rule show --resource-group myresourcegroup --namespace-name mynamespace --name myauthorule +- command: + name: eventhubs namespace authorization-rule list + summary: Shows the list of Authorizationrule by Namespace + examples: + - summary: Shows the list of Authorizationrule by Namespace + command: az eventhubs namespace authorization-rule list --resource-group myresourcegroup --namespace-name mynamespace +- command: + name: eventhubs namespace authorization-rule keys list + summary: Shows the connection strings for namespace + examples: + - summary: Shows the connection strings of Authorizationrule for the namespace. + command: az eventhubs namespace authorization-rule keys list --resource-group myresourcegroup --namespace-name mynamespace --name myauthorule +- command: + name: eventhubs namespace authorization-rule keys renew + summary: Regenerate the connection strings of Authorizationrule for the namespace. + examples: + - summary: Regenerate the connection strings of Authorizationrule for the namespace. + command: az eventhubs namespace authorization-rule keys renew --resource-group myresourcegroup --namespace-name mynamespace --name myauthorule --key PrimaryKey +- command: + name: eventhubs namespace authorization-rule delete + summary: Deletes the Authorizationrule of the namespace. + examples: + - summary: Deletes the Authorizationrule of the namespace. + command: az eventhubs namespace authorization-rule delete --resource-group myresourcegroup --namespace-name mynamespace --name myauthorule +- command: + name: eventhubs eventhub create + summary: Creates the Event Hubs Eventhub + examples: + - summary: Create a new Eventhub. + command: az eventhubs eventhub create --resource-group myresourcegroup --namespace-name mynamespace --name myeventhub --message-retention 4 --partition-count 15 +- command: + name: eventhubs eventhub update + summary: Updates the Event Hubs Eventhub + examples: + - summary: Updates a new Eventhub. + command: az eventhubs eventhub update --resource-group myresourcegroup --namespace-name mynamespace --name myeventhub --message-retention 3 --partition-count 12 +- command: + name: eventhubs eventhub show + summary: shows the Eventhub Details + examples: + - summary: Shows the Eventhub details. + command: az eventhubs eventhub show --resource-group myresourcegroup --namespace-name mynamespace --name myeventhub +- command: + name: eventhubs eventhub list + summary: List the EventHub by Namepsace + examples: + - summary: Get the Eventhubs by Namespace. + command: az eventhubs eventhub list --resource-group myresourcegroup --namespace-name mynamespace +- command: + name: eventhubs eventhub delete + summary: Deletes the Eventhub + examples: + - summary: Deletes the Eventhub + command: az eventhubs eventhub delete --resource-group myresourcegroup --namespace-name mynamespace --name myeventhub +- command: + name: eventhubs eventhub authorization-rule create + summary: Creates Authorizationrule for the given Eventhub + examples: + - summary: Creates Authorizationrule + command: az eventhubs eventhub authorization-rule create --resource-group myresourcegroup --namespace-name mynamespace --eventhub-name myeventhub --name myauthorule --rights Listen +- command: + name: eventhubs eventhub authorization-rule update + summary: Updates Authorizationrule for the given Eventhub + examples: + - summary: Updates Authorizationrule + command: az eventhubs eventhub authorization-rule update --resource-group myresourcegroup --namespace-name mynamespace --eventhub-name myeventhub --name myauthorule --rights Send +- command: + name: eventhubs eventhub authorization-rule show + summary: shows the details of Authorizationrule + examples: + - summary: shows the details of Authorizationrule + command: az eventhubs eventhub authorization-rule show --resource-group myresourcegroup --namespace-name mynamespace --eventhub-name myeventhub --name myauthorule +- command: + name: eventhubs eventhub authorization-rule list + summary: shows the list of Authorization-rules by Eventhub + examples: + - summary: shows the list of Authorization-rules by Eventhub + command: az eventhubs eventhub authorization-rule list --resource-group myresourcegroup --namespace-name mynamespace --eventhub-name myeventhub +- command: + name: eventhubs eventhub authorization-rule keys list + summary: Shows the connection strings of Authorizationrule for the Eventhub. + examples: + - summary: Shows the connection strings of Authorizationrule for the eventhub. + command: az eventhubs eventhub authorization-rule keys list --resource-group myresourcegroup --namespace-name mynamespace --eventhub-name myeventhub --name myauthorule +- command: + name: eventhubs eventhub authorization-rule keys renew + summary: Regenerate the connection strings of Authorizationrule for the namespace. + examples: + - summary: Regenerate the connection strings of Authorizationrule for the namespace. + command: az eventhubs eventhub authorization-rule keys renew --resource-group myresourcegroup --namespace-name mynamespace --eventhub-name myeventhub --name myauthorule --key PrimaryKey +- command: + name: eventhubs eventhub authorization-rule delete + summary: Deletes the Authorizationrule of Eventhub. + examples: + - summary: Deletes the Authorizationrule of Eventhub. + command: az eventhubs eventhub authorization-rule delete --resource-group myresourcegroup --namespace-name mynamespace --eventhub-name myeventhub --name myauthorule +- command: + name: eventhubs eventhub consumer-group create + summary: Creates the EventHub ConsumerGroup + examples: + - summary: Create EventHub ConsumerGroup. + command: az eventhubs eventhub consumer-group create --resource-group myresourcegroup --namespace-name mynamespace --eventhub-name myeventhub --name myconsumergroup +- command: + name: eventhubs eventhub consumer-group update + summary: Updates the EventHub ConsumerGroup + examples: + - summary: Updates a ConsumerGroup. + command: az eventhubs eventhub consumer-group update --resource-group myresourcegroup --namespace-name mynamespace --eventhub-name myeventhub --name myconsumergroup --user-metadata MyUserMetadata +- command: + name: eventhubs eventhub consumer-group show + summary: Shows the ConsumerGroup Details + examples: + - summary: Shows the ConsumerGroup details. + command: az eventhubs eventhub consumer-group show --resource-group myresourcegroup --namespace-name mynamespace --eventhub-name myeventhub --name myconsumergroup +- command: + name: eventhubs eventhub consumer-group list + summary: List the ConsumerGroup by Eventhub + examples: + - summary: List the ConsumerGroup by Eventhub. + command: az eventhubs eventhub consumer-group list --resource-group myresourcegroup --namespace-name mynamespace --eventhub-name myeventhub +- command: + name: eventhubs eventhub consumer-group delete + summary: Deletes the ConsumerGroup + examples: + - summary: Deletes the ConsumerGroup + command: az eventhubs eventhub consumer-group delete --resource-group myresourcegroup --namespace-name mynamespace --eventhub-name myeventhub --name myconsumergroup +- command: + name: eventhubs georecovery-alias exists + summary: Check the availability of Geo-Disaster Recovery Configuration Alias Name + examples: + - summary: Check the availability of Geo-Disaster Recovery Configuration Alias Name + command: az eventhubs georecovery-alias exists --resource-group myresourcegroup --namespace-name primarynamespace --alias myaliasname +- command: + name: eventhubs georecovery-alias set + summary: Sets a Geo-Disaster Recovery Configuration Alias for the give Namespace + examples: + - summary: Sets Geo-Disaster Recovery Configuration Alias for the give Namespace + command: az eventhubs georecovery-alias set --resource-group myresourcegroup --namespace-name primarynamespace --alias myaliasname --partner-namespace resourcearmid +- command: + name: eventhubs georecovery-alias show + summary: shows properties of Geo-Disaster Recovery Configuration Alias for Primay or Secondary Namespace + examples: + - summary: Shows properties of Geo-Disaster Recovery Configuration Alias of the Primary Namespace + command: az eventhubs georecovery-alias show --resource-group myresourcegroup --namespace-name primarynamespace --alias myaliasname + - summary: Shows properties of Geo-Disaster Recovery Configuration Alias of the Secondary Namespace + command: az eventhubs georecovery-alias show --resource-group myresourcegroup --namespace-name secondarynamespace --alias myaliasname +- command: + name: eventhubs georecovery-alias authorization-rule show + summary: Show properties of Event Hubs Geo-Disaster Recovery Configuration Alias and Namespace Authorizationrule + examples: + - summary: Show properties Authorizationrule by Event Hubs Namespace + command: az eventhubs georecovery-alias authorization-rule show --resource-group myresourcegroup --namespace-name mynamespace +- command: + name: eventhubs georecovery-alias authorization-rule list + summary: List of Authorizationrule by Event Hubs Namespace + examples: + - summary: List of Authorizationrule by Event Hubs Namespace + command: az eventhubs georecovery-alias authorization-rule list --resource-group myresourcegroup --namespace-name mynamespace --alias myaliasname +- command: + name: eventhubs georecovery-alias authorization-rule keys list + summary: Shows the keys and connection strings of Authorizationrule for the Event Hubs Namespace + examples: + - summary: Shows the keys and connection strings of Authorizationrule for the namespace. + command: az eventhubs georecovery-alias authorization-rule keys list --resource-group myresourcegroup --namespace-name mynamespace --name myauthorule --alias myaliasname +- command: + name: eventhubs georecovery-alias break-pair + summary: Disables Geo-Disaster Recovery Configuration Alias and stops replicating changes from primary to secondary namespaces + examples: + - summary: Disables Geo-Disaster Recovery Configuration Alias and stops replicating changes from primary to secondary namespaces + command: az eventhubs georecovery-alias break-pair --resource-group myresourcegroup --namespace-name primarynamespace --alias myaliasname +- command: + name: eventhubs georecovery-alias fail-over + summary: Invokes Geo-Disaster Recovery Configuration Alias to point to the secondary namespace + examples: + - summary: Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace + command: az eventhubs georecovery-alias fail-over --resource-group myresourcegroup --namespace-name secondarynamespace --alias myaliasname +- command: + name: eventhubs georecovery-alias delete + summary: Delete Geo-Disaster Recovery Configuration Alias + examples: + - summary: Delete Geo-Disaster Recovery Configuration Alias + command: az eventhubs georecovery-alias delete --resource-group myresourcegroup --namespace-name secondarynamespace --alias myaliasname diff --git a/src/command_modules/azure-cli-extension/azure/cli/command_modules/extension/help.yaml b/src/command_modules/azure-cli-extension/azure/cli/command_modules/extension/help.yaml new file mode 100644 index 00000000000..8f58ff3b007 --- /dev/null +++ b/src/command_modules/azure-cli-extension/azure/cli/command_modules/extension/help.yaml @@ -0,0 +1,42 @@ +version: 1 +content: +- group: + name: extension + summary: Manage and update CLI extensions. +- command: + name: extension add + summary: Add an extension. + examples: + - summary: Add extension by name + command: az extension add --name anextension + - summary: Add extension from URL + command: az extension add --source https://contoso.com/anextension-0.0.1-py2.py3-none-any.whl + - summary: Add extension from local disk + command: az extension add --source ~/anextension-0.0.1-py2.py3-none-any.whl + - summary: Add extension from local disk and use pip proxy for dependencies + command: az extension add --source ~/anextension-0.0.1-py2.py3-none-any.whl --pip-proxy https://user:pass@proxy.server:8080 +- command: + name: extension list + summary: List the installed extensions. +- command: + name: extension list-available + summary: List publicly available extensions. + examples: + - summary: List all publicly available extensions + command: az extension list-available + - summary: List details on a particular extension + command: az extension list-available --show-details --query anextension +- command: + name: extension show + summary: Show an extension. +- command: + name: extension remove + summary: Remove an extension. +- command: + name: extension update + summary: Update an extension. + examples: + - summary: Update an extension by name + command: az extension update --name anextension + - summary: Update an extension by name and use pip proxy for dependencies + command: az extension update --name anextension --pip-proxy https://user:pass@proxy.server:8080 diff --git a/src/command_modules/azure-cli-feedback/azure/cli/command_modules/feedback/help.yaml b/src/command_modules/azure-cli-feedback/azure/cli/command_modules/feedback/help.yaml new file mode 100644 index 00000000000..49f0c1a7101 --- /dev/null +++ b/src/command_modules/azure-cli-feedback/azure/cli/command_modules/feedback/help.yaml @@ -0,0 +1,5 @@ +version: 1 +content: +- command: + name: feedback + summary: Send feedback to the Azure CLI Team! diff --git a/src/command_modules/azure-cli-find/azure/cli/command_modules/find/help.yaml b/src/command_modules/azure-cli-find/azure/cli/command_modules/find/help.yaml new file mode 100644 index 00000000000..6574f32d077 --- /dev/null +++ b/src/command_modules/azure-cli-find/azure/cli/command_modules/find/help.yaml @@ -0,0 +1,9 @@ +version: 1 +content: +- command: + name: find + summary: Find Azure CLI commands. + examples: + - summary: Search for commands containing 'vm' or 'secret' + command: > + az find -q vm secret diff --git a/src/command_modules/azure-cli-hdinsight/azure/cli/command_modules/hdinsight/help.yaml b/src/command_modules/azure-cli-hdinsight/azure/cli/command_modules/hdinsight/help.yaml new file mode 100644 index 00000000000..720f7ea165b --- /dev/null +++ b/src/command_modules/azure-cli-hdinsight/azure/cli/command_modules/hdinsight/help.yaml @@ -0,0 +1,88 @@ +version: 1 +content: +- group: + name: hdinsight + summary: Manage HDInsight resources. +- command: + name: hdinsight create + summary: Creates a new cluster. + examples: + - summary: Create a cluster with an existing storage account. + command: |- + az hdinsight create -t spark -g MyResourceGroup -n MyCluster \ + -p "HttpPassword1234!" \ + --storage-account MyStorageAccount + - summary: Create a cluster with Enterprise Security Package. + command: |- + az hdinsight create -t spark -g MyResourceGroup -n MyCluster \ + -p "HttpPassword1234!" \ + --storage-account MyStorageAccount \ + --subnet "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyRG/providers/Microsoft.Network/virtualNetworks/MyVnet/subnets/subnet1" \ + --domain "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyRG/providers/Microsoft.AAD/domainServices/MyDomain.onmicrosoft.com" \ + --assign-identity "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MyMsiRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/MyMSI" \ + --cluster-admin-account MyAdminAccount@MyDomain.onmicrosoft.com + - summary: Create a Kafka cluster with disk encryption. See https://docs.microsoft.com/en-us/azure/hdinsight/kafka/apache-kafka-byok. + command: |- + az hdinsight create -t kafka -g MyResourceGroup -n MyCluster \ + -p "HttpPassword1234!" --workernode-data-disks-per-node 2 \ + --storage-account MyStorageAccount \ + --encryption-key-name kafkaClusterKey \ + --encryption-key-version 00000000000000000000000000000000 \ + --encryption-vault-uri https://MyKeyVault.vault.azure.net \ + --assign-identity MyMSI +- command: + name: hdinsight list + summary: List clusters in the resource group or subscription. +- command: + name: hdinsight wait + summary: Place the CLI in a waiting state until an operation is complete. +- command: + name: hdinsight rotate-disk-encryption-key + summary: Rotate disk encryption key of the specified HDInsight cluster. +- group: + name: hdinsight application + summary: Manage HDInsight applications. +- command: + name: hdinsight application create + summary: Create an application for a HDInsight cluster. + examples: + - summary: Create an application with a script URI. + command: |- + az hdinsight application create -g MyResourceGroup -n MyCluster \ + --application-name MyApplication \ + --script-uri https://path/to/install/script.sh \ + --script-action-name MyScriptAction \ + --script-parameters '"-option value"' + - summary: Create an application with a script URI and specified edge node size. + command: |- + az hdinsight application create -g MyResourceGroup -n MyCluster \ + --application-name MyApplication \ + --script-uri https://path/to/install/script.sh \ + --script-action-name MyScriptAction \ + --script-parameters '"-option value"' \ + --edgenode-size Standard_D4_v2 +- command: + name: hdinsight application wait + summary: Place the CLI in a waiting state until an operation is complete. +- group: + name: hdinsight oms + summary: Manage HDInsight Operations Management Suite (OMS). +- command: + name: hdinsight oms enable + summary: Enables the Operations Management Suite (OMS) on the HDInsight cluster. +- group: + name: hdinsight script-action + summary: Manage HDInsight script actions. +- command: + name: hdinsight script-action execute + summary: Executes script actions on the specified HDInsight cluster. +- command: + name: hdinsight script-action list + summary: Lists script actions for the specified cluster. + examples: + - summary: Lists all the persisted script actions for the specified cluster. + command: |- + az hdinsight script-action list -n MyCluster -g MyResourceGroup --persisted + - summary: Lists all scripts' execution history for the specified cluster. + command: |- + az hdinsight script-action list -n MyCluster -g MyResourceGroup diff --git a/src/command_modules/azure-cli-iot/azure/cli/command_modules/iot/help.yaml b/src/command_modules/azure-cli-iot/azure/cli/command_modules/iot/help.yaml new file mode 100644 index 00000000000..f11d0d97222 --- /dev/null +++ b/src/command_modules/azure-cli-iot/azure/cli/command_modules/iot/help.yaml @@ -0,0 +1,522 @@ +version: 1 +content: +- group: + name: iot + summary: Manage Internet of Things (IoT) assets. + description: Comprehensive IoT data-plane functionality is available in the Azure IoT CLI Extension. For more info and install guide go to https://github.com/Azure/azure-iot-cli-extension +- group: + name: iot hub + summary: Manage Azure IoT hubs. +- group: + name: iot dps + summary: Manage Azure IoT Hub Device Provisioning Service. +- command: + name: iot dps create + summary: Create an Azure IoT Hub device provisioning service. + description: For an introduction to Azure IoT Hub Device Provisioning Service, see https://docs.microsoft.com/en-us/azure/iot-dps/about-iot-dps + examples: + - summary: Create an Azure IoT Hub device provisioning service with the standard pricing tier S1, in the region of the resource group. + command: > + az iot dps create --name MyDps --resource-group MyResourceGroup + - summary: Create an Azure IoT Hub device provisioning service with the standard pricing tier S1, in the 'eastus' region. + command: > + az iot dps create --name MyDps --resource-group MyResourceGroup --location eastus +- command: + name: iot dps list + summary: List Azure IoT Hub device provisioning services. + examples: + - summary: List all Azure IoT Hub device provisioning services in a subscription. + command: > + az iot dps list + - summary: List all Azure IoT Hub device provisioning services in the resource group 'MyResourceGroup' + command: > + az iot dps list --resource-group MyResourceGroup +- command: + name: iot dps show + summary: Get the details of an Azure IoT Hub device provisioning service. + examples: + - summary: Show details of an Azure IoT Hub device provisioning service 'MyDps' + command: > + az iot dps show --name MyDps --resource-group MyResourceGroup +- command: + name: iot dps delete + summary: Delete an Azure IoT Hub device provisioning service. + examples: + - summary: Delete an Azure IoT Hub device provisioning service 'MyDps' + command: > + az iot dps delete --name MyDps --resource-group MyResourceGroup +- command: + name: iot dps update + summary: Update an Azure IoT Hub device provisioning service. + examples: + - summary: Update Allocation Policy to 'GeoLatency' of an Azure IoT Hub device provisioning service 'MyDps' + command: > + az iot dps update --name MyDps --resource-group MyResourceGroup --set properties.allocationPolicy="GeoLatency" +- group: + name: iot dps access-policy + summary: Manage Azure IoT Hub Device Provisioning Service access policies. +- command: + name: iot dps access-policy create + summary: Create a new shared access policy in an Azure IoT Hub device provisioning service. + examples: + - summary: Create a new shared access policy in an Azure IoT Hub device provisioning service with EnrollmentRead right + command: > + az iot dps access-policy create --dps-name MyDps --resource-group MyResourceGroup --name MyPolicy --rights EnrollmentRead +- command: + name: iot dps access-policy update + summary: Update a shared access policy in an Azure IoT Hub device provisioning service. + examples: + - summary: Update access policy 'MyPolicy' in an Azure IoT Hub device provisioning service with EnrollmentWrite right + command: > + az iot dps access-policy update --dps-name MyDps --resource-group MyResourceGroup --name MyPolicy --rights EnrollmentWrite +- command: + name: iot dps access-policy list + summary: List all shared access policies in an Azure IoT Hub device provisioning service. + examples: + - summary: List all shared access policies in MyDps + command: > + az iot dps access-policy list --dps-name MyDps --resource-group MyResourceGroup +- command: + name: iot dps access-policy show + summary: Show details of a shared access policies in an Azure IoT Hub device provisioning service. + examples: + - summary: Show details of shared access policy 'MyPolicy' in an Azure IoT Hub device provisioning service + command: > + az iot dps access-policy show --dps-name MyDps --resource-group MyResourceGroup --name MyPolicy +- command: + name: iot dps access-policy delete + summary: Delete a shared access policies in an Azure IoT Hub device provisioning service. + examples: + - summary: Delete shared access policy 'MyPolicy' in an Azure IoT Hub device provisioning service + command: > + az iot dps access-policy delete --dps-name MyDps --resource-group MyResourceGroup --name MyPolicy +- group: + name: iot dps linked-hub + summary: Manage Azure IoT Hub Device Provisioning Service linked IoT hubs. +- command: + name: iot dps linked-hub create + summary: Create a linked IoT hub in an Azure IoT Hub device provisioning service. + examples: + - summary: Create a linked IoT hub in an Azure IoT Hub device provisioning service + command: > + az iot dps linked-hub create --dps-name MyDps --resource-group MyResourceGroup --connection-string + HostName=test.azure-devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=XNBhoasdfhqRlgGnasdfhivtshcwh4bJwe7c0RIGuWsirW0= + --location westus + - summary: Create a linked IoT hub in an Azure IoT Hub device provisioning service which applies allocation weight and weight being 10 + command: > + az iot dps linked-hub create --dps-name MyDps --resource-group MyResourceGroup --connection-string + HostName=test.azure-devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=XNBhoasdfhqRlgGnasdfhivtshcwh4bJwe7c0RIGuWsirW0= + --location westus --allocation-weight 10 --apply-allocation-policy True +- command: + name: iot dps linked-hub update + summary: Update a linked IoT hub in an Azure IoT Hub device provisioning service. + examples: + - summary: Update linked IoT hub 'MyLinkedHub.azure-devices.net' in an Azure IoT Hub device provisioning service + command: > + az iot dps linked-hub update --dps-name MyDps --resource-group MyResourceGroup --linked-hub MyLinkedHub.azure-devices.net + --allocation-weight 10 --apply-allocation-policy True +- command: + name: iot dps linked-hub list + summary: List all linked IoT hubs in an Azure IoT Hub device provisioning service. + examples: + - summary: List all linked IoT hubs in MyDps + command: > + az iot dps linked-hub list --dps-name MyDps --resource-group MyResourceGroup +- command: + name: iot dps linked-hub show + summary: Show details of a linked IoT hub in an Azure IoT Hub device provisioning service. + examples: + - summary: Show details of linked IoT hub 'MyLinkedHub' in an Azure IoT Hub device provisioning service + command: > + az iot dps linked-hub show --dps-name MyDps --resource-group MyResourceGroup --linked-hub MyLinkedHub +- command: + name: iot dps linked-hub delete + summary: Update a linked IoT hub in an Azure IoT Hub device provisioning service. + examples: + - summary: Delete linked IoT hub 'MyLinkedHub' in an Azure IoT Hub device provisioning service + command: > + az iot dps linked-hub delete --dps-name MyDps --resource-group MyResourceGroup --linked-hub MyLinkedHub +- group: + name: iot dps certificate + summary: Manage Azure IoT Hub Device Provisioning Service certificates. +- command: + name: iot dps certificate create + summary: Create/upload an Azure IoT Hub Device Provisioning Service certificate. + examples: + - summary: Upload a CA certificate PEM file to an Azure IoT Hub device provisioning service. + command: > + az iot dps certificate create --dps-name MyDps --resource-group MyResourceGroup --name MyCertificate --path /certificates/Certificate.pem + - summary: Upload a CA certificate CER file to an Azure IoT Hub device provisioning service. + command: > + az iot dps certificate create --dps-name MyDps --resource-group MyResourceGroup --name MyCertificate --path /certificates/Certificate.cer +- command: + name: iot dps certificate update + summary: Update an Azure IoT Hub Device Provisioning Service certificate. + description: Upload a new certificate to replace the existing certificate with the same name. + examples: + - summary: Update a CA certificate in an Azure IoT Hub device provisioning service by uploading a new PEM file. + command: > + az iot dps certificate update --dps-name MyDps --resource-group MyResourceGroup --name MyCertificate + --path /certificates/NewCertificate.pem --etag AAAAAAAAAAA= + - summary: Update a CA certificate in an Azure IoT Hub device provisioning service by uploading a new CER file. + command: > + az iot dps certificate update --dps-name MyDps --resource-group MyResourceGroup --name MyCertificate + --path /certificates/NewCertificate.cer --etag AAAAAAAAAAA= +- command: + name: iot dps certificate delete + summary: Delete an Azure IoT Hub Device Provisioning Service certificate. + examples: + - summary: Delete MyCertificate in an Azure IoT Hub device provisioning service + command: > + az iot dps certificate delete --dps-name MyDps --resource-group MyResourceGroup --name MyCertificate --etag AAAAAAAAAAA= +- command: + name: iot dps certificate show + summary: Show information about a particular Azure IoT Hub Device Provisioning Service certificate. + examples: + - summary: Show details about MyCertificate in an Azure IoT Hub device provisioning service + command: > + az iot dps certificate show --dps-name MyDps --resource-group MyResourceGroup --name MyCertificate +- command: + name: iot dps certificate list + summary: List all certificates contained within an Azure IoT Hub device provisioning service + examples: + - summary: List all certificates in MyDps + command: > + az iot dps certificate list --dps-name MyDps --resource-group MyResourceGroup +- command: + name: iot dps certificate generate-verification-code + summary: Generate a verification code for an Azure IoT Hub Device Provisioning Service certificate. + description: This verification code is used to complete the proof of possession step for a certificate. Use this verification code as the CN of a new certificate signed with the root certificates private key. + examples: + - summary: Generate a verification code for MyCertificate + command: > + az iot dps certificate generate-verification-code --dps-name MyDps --resource-group MyResourceGroup --name MyCertificate + --etag AAAAAAAAAAA= +- command: + name: iot dps certificate verify + summary: Verify an Azure IoT Hub Device Provisioning Service certificate. + description: Verify a certificate by uploading a verification certificate containing the verification code obtained by calling generate-verification-code. This is the last step in the proof of possession process. + examples: + - summary: Verify ownership of the MyCertificate private key. + command: > + az iot dps certificate verify --dps-name MyDps --resource-group MyResourceGroup --name MyCertificate + --path /certificates/Verification.pem --etag AAAAAAAAAAA= +- group: + name: iot hub certificate + summary: Manage IoT Hub certificates. +- command: + name: iot hub certificate create + summary: Create/upload an Azure IoT Hub certificate. + description: For a detailed explanation of CA certificates in Azure IoT Hub, see https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-x509ca-overview + examples: + - summary: Uploads a CA certificate PEM file to an IoT hub. + command: > + az iot hub certificate create --hub-name MyIotHub --name MyCertificate --path /certificates/Certificate.pem + - summary: Uploads a CA certificate CER file to an IoT hub. + command: > + az iot hub certificate create --hub-name MyIotHub --name MyCertificate --path /certificates/Certificate.cer +- command: + name: iot hub certificate update + summary: Update an Azure IoT Hub certificate. + description: Uploads a new certificate to replace the existing certificate with the same name. For a detailed explanation of CA certificates in Azure IoT Hub, see https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-x509ca-overview + examples: + - summary: Updates a CA certificate in an IoT hub by uploading a new PEM file. + command: > + az iot hub certificate update --hub-name MyIotHub --name MyCertificate --path /certificates/NewCertificate.pem --etag + AAAAAAAAAAA= + - summary: Updates a CA certificate in an IoT hub by uploading a new CER file. + command: > + az iot hub certificate update --hub-name MyIotHub --name MyCertificate --path /certificates/NewCertificate.cer --etag + AAAAAAAAAAA= +- command: + name: iot hub certificate delete + summary: Deletes an Azure IoT Hub certificate. + description: For a detailed explanation of CA certificates in Azure IoT Hub, see https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-x509ca-overview + examples: + - summary: Deletes MyCertificate + command: > + az iot hub certificate delete --hub-name MyIotHub --name MyCertificate --etag AAAAAAAAAAA= +- command: + name: iot hub certificate show + summary: Shows information about a particular Azure IoT Hub certificate. + description: For a detailed explanation of CA certificates in Azure IoT Hub, see https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-x509ca-overview + examples: + - summary: Show details about MyCertificate + command: > + az iot hub certificate show --hub-name MyIotHub --name MyCertificate +- command: + name: iot hub certificate list + summary: Lists all certificates contained within an Azure IoT Hub + description: For a detailed explanation of CA certificates in Azure IoT Hub, see https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-x509ca-overview + examples: + - summary: List all certificates in MyIotHub + command: > + az iot hub certificate list --hub-name MyIotHub +- command: + name: iot hub certificate generate-verification-code + summary: Generates a verification code for an Azure IoT Hub certificate. + description: This verification code is used to complete the proof of possession step for a certificate. Use this verification code as the CN of a new certificate signed with the root certificates private key. For a detailed explanation of CA certificates in Azure IoT Hub, see https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-x509ca-overview + examples: + - summary: Generates a verification code for MyCertificate + command: > + az iot hub certificate generate-verification-code --hub-name MyIotHub --name MyCertificate --etag + AAAAAAAAAAA= +- command: + name: iot hub certificate verify + summary: Verifies an Azure IoT Hub certificate. + description: Verifies a certificate by uploading a verification certificate containing the verification code obtained by calling generate-verification-code. This is the last step in the proof of possession process. For a detailed explanation of CA certificates in Azure IoT Hub, see https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-x509ca-overview + examples: + - summary: Verifies ownership of the MyCertificate private key. + command: > + az iot hub certificate verify --hub-name MyIotHub --name MyCertificate --path /certificates/Verification.pem --etag + AAAAAAAAAAA= +- command: + name: iot hub create + summary: Create an Azure IoT hub. + description: For an introduction to Azure IoT Hub, see https://docs.microsoft.com/azure/iot-hub/ + examples: + - summary: Create an IoT Hub with the free pricing tier F1, in the region of the resource group. + command: > + az iot hub create --resource-group MyResourceGroup --name MyIotHub + - summary: Create an IoT Hub with the standard pricing tier S1 and 4 partitions, in the 'westus' region. + command: > + az iot hub create --resource-group MyResourceGroup --name MyIotHub --sku S1 --location westus + --partition-count 4 +- command: + name: iot hub show + summary: Get the details of an IoT hub. +- command: + name: iot hub update + summary: Update metadata for an IoT hub. + examples: + - summary: Add a firewall filter rule to accept traffic from the IP mask 127.0.0.0/31. + command: > + az iot hub update --name MyIotHub --add properties.ipFilterRules filter_name=test-rule action=Accept ip_mask=127.0.0.0/31 +- command: + name: iot hub list + summary: List IoT hubs. + examples: + - summary: List all IoT hubs in a subscription. + command: > + az iot hub list + - summary: List all IoT hubs in the resource group 'MyGroup' + command: > + az iot hub list --resource-group MyGroup +- command: + name: iot hub show-connection-string + summary: Show the connection strings for an IoT hub. + examples: + - summary: Show the connection string of an IoT hub using default policy and primary key. + command: > + az iot hub show-connection-string --name MyIotHub + - summary: Show the connection string of an IoT Hub using policy 'service' and secondary key. + command: > + az iot hub show-connection-string --name MyIotHub --policy-name service --key secondary + - summary: Show the connection strings for all IoT hubs in a resource group. + command: > + az iot hub show-connection-string --resource-group MyResourceGroup + - summary: Show the connection strings for all IoT hubs in a subscription. + command: > + az iot hub show-connection-string +- command: + name: iot hub delete + summary: Delete an IoT hub. +- group: + name: iot hub consumer-group + summary: Manage the event hub consumer groups of an IoT hub. +- command: + name: iot hub consumer-group create + summary: Create an event hub consumer group. + examples: + - summary: Create a consumer group 'cg1' in the default event hub endpoint. + command: > + az iot hub consumer-group create --hub-name MyIotHub --name cg1 + - summary: Create a consumer group `cg1` in the operation monitoring event hub endpoint `operationsMonitoringEvents`. + command: > + az iot hub consumer-group create --hub-name MyIotHub --event-hub-name operationsMonitoringEvents --name cg1 +- command: + name: iot hub consumer-group list + summary: List event hub consumer groups. +- command: + name: iot hub consumer-group show + summary: Get the details for an event hub consumer group. +- command: + name: iot hub consumer-group delete + summary: Delete an event hub consumer group. +- group: + name: iot hub policy + summary: Manage shared access policies of an IoT hub. +- command: + name: iot hub policy list + summary: List shared access policies of an IoT hub. +- command: + name: iot hub policy show + summary: Get the details of a shared access policy of an IoT hub. +- command: + name: iot hub policy create + summary: Create a new shared access policy in an IoT hub. + examples: + - summary: Create a new shared access policy. + command: > + az iot hub policy create --hub-name MyIotHub --name new-policy --permissions RegistryWrite ServiceConnect DeviceConnect +- command: + name: iot hub policy delete + summary: Delete a shared access policy from an IoT hub. +- command: + name: iot hub list-skus + summary: List available pricing tiers. +- group: + name: iot hub job + summary: Manage jobs in an IoT hub. +- command: + name: iot hub job list + summary: List the jobs in an IoT hub. +- command: + name: iot hub job show + summary: Get the details of a job in an IoT hub. +- command: + name: iot hub job cancel + summary: Cancel a job in an IoT hub. +- command: + name: iot hub show-quota-metrics + summary: Get the quota metrics for an IoT hub. +- command: + name: iot hub show-stats + summary: Get the statistics for an IoT hub. +- group: + name: iot hub routing-endpoint + summary: Manage custom endpoints of an IoT hub. +- command: + name: iot hub routing-endpoint create + summary: Add an endpoint to your IoT Hub. + description: Create a new custom endpoint in your IoT Hub. + examples: + - summary: Add a new endpoint "E2" of type EventHub to "MyIotHub" IoT Hub. + command: > + az iot hub routing-endpoint create --resource-group MyResourceGroup --hub-name MyIotHub + --endpoint-name E2 --endpoint-type eventhub --endpoint-resource-group {ResourceGroup} + --endpoint-subscription-id {SubscriptionId} --connection-string {ConnectionString} + - summary: Add a new endpoint "S1" of type AzureStorageContainer to "MyIotHub" IoT Hub. + command: | + az iot hub routing-endpoint create --resource-group MyResourceGroup --hub-name MyIotHub \ + --endpoint-name S1 --endpoint-type azurestoragecontainer --endpoint-resource-group "[Resource Group]" \ + --endpoint-subscription-id {SubscriptionId} --connection-string {ConnectionString} \ + --container-name {ContainerName} +- command: + name: iot hub routing-endpoint list + summary: Get information on all the endpoints for your IoT Hub. + description: Get information on all endpoints in your IoT Hub. You can also specify which endpoint type you want to get informaiton on. + examples: + - summary: Get all the endpoints from "MyIotHub" IoT Hub. + command: > + az iot hub routing-endpoint list -g MyResourceGroup --hub-name MyIotHub + - summary: Get all the endpoints of type "EventHub" from "MyIotHub" IoT Hub. + command: > + az iot hub routing-endpoint list -g MyResourceGroup --hub-name MyIotHub + --endpoint-type eventhub +- command: + name: iot hub routing-endpoint show + summary: Get information on mentioned endpoint for your IoT Hub. + description: Get information on a specific endpoint in your IoT Hub + examples: + - summary: Get an endpoint information from "MyIotHub" IoT Hub. + command: | + az iot hub routing-endpoint show --resource-group MyResourceGroup --hub-name MyIotHub \ + --endpoint-name {endpointName} +- command: + name: iot hub routing-endpoint delete + summary: Delete all or mentioned endpoint for your IoT Hub. + description: Delete an endpoint for your IoT Hub. We recommend that you delete any routes to the endpoint, before deleting the endpoint. + examples: + - summary: Delete endpoint "E2" from "MyIotHub" IoT Hub. + command: > + az iot hub routing-endpoint delete --resource-group MyResourceGroup --hub-name MyIotHub + --endpoint-name E2 + - summary: Delete all the endpoints of type "EventHub" from "MyIotHub" IoT Hub. + command: > + az iot hub routing-endpoint delete --resource-group MyResourceGroup --hub-name MyIotHub + --endpoint-type eventhub + - summary: Delete all the endpoints from "MyIotHub" IoT Hub. + command: > + az iot hub routing-endpoint delete --resource-group MyResourceGroup --hub-name MyIotHub +- group: + name: iot hub route + summary: Manage routes of an IoT hub. +- command: + name: iot hub route create + summary: Create a route in IoT Hub. + description: Create a route to send specific data source and condition to a desired endpoint. + examples: + - summary: Create a new route "R1". + command: > + az iot hub route create -g MyResourceGroup --hub-name MyIotHub + --endpoint-name E2 --source-type DeviceMessages --route-name R1 + - summary: Create a new route "R1" with all parameters. + command: > + az iot hub route create -g MyResourceGroup --hub-name MyIotHub + --endpoint-name E2 --source-type DeviceMessages --route-name R1 + --condition true --enabled true +- command: + name: iot hub route list + summary: Get all the routes in IoT Hub. + description: Get information on all routes from an IoT Hub. + examples: + - summary: Get all route from "MyIotHub" IoT Hub. + command: > + az iot hub route list -g MyResourceGroup --hub-name MyIotHub + - summary: Get all the routes of source type "DeviceMessages" from "MyIotHub" IoT Hub. + command: > + az iot hub route list -g MyResourceGroup --hub-name MyIotHub --source-type DeviceMessages +- command: + name: iot hub route show + summary: Get information about the route in IoT Hub. + description: Get information on a specific route in your IoT Hub. + examples: + - summary: Get an route information from "MyIotHub" IoT Hub. + command: > + az iot hub route show -g MyResourceGroup --hub-name MyIotHub --route-name {routeName} +- command: + name: iot hub route delete + summary: Delete all or mentioned route for your IoT Hub. + description: Delete a route or all routes for your IoT Hub. + examples: + - summary: Delete route "R1" from "MyIotHub" IoT Hub. + command: > + az iot hub route delete -g MyResourceGroup --hub-name MyIotHub --route-name R1 + - summary: Delete all the routes of source type "DeviceMessages" from "MyIotHub" IoT Hub. + command: > + az iot hub route delete -g MyResourceGroup --hub-name MyIotHub --source-type DeviceMessages + - summary: Delete all the routes from "MyIotHub" IoT Hub. + command: > + az iot hub route delete -g MyResourceGroup --hub-name MyIotHub +- command: + name: iot hub route test + summary: Test all routes or mentioned route in IoT Hub. + description: Test all existing routes or mentioned route in your IoT Hub. You can provide a sample message to test your routes. + examples: + - summary: Test the route "R1" from "MyIotHub" IoT Hub. + command: > + az iot hub route test -g MyResourceGroup --hub-name MyIotHub --route-name R1 + - summary: Test all the route of source type "DeviceMessages" from "MyIotHub" IoT Hub. + command: > + az iot hub route test -g MyResourceGroup --hub-name MyIotHub --source-type DeviceMessages +- command: + name: iot hub route update + summary: Update a route in IoT Hub. + description: Updates a route in IoT Hub. You can change the source, enpoint or query on the route. + examples: + - summary: Update source type of route "R1" from "MyIotHub" IoT Hub. + command: > + az iot hub route update -g MyResourceGroup --hub-name MyIotHub + --source-type DeviceMessages --route-name R1 +- group: + name: iot hub devicestream + summary: Manage device streams of an IoT hub. +- command: + name: iot hub devicestream show + summary: Get IoT Hub's device streams endpoints. + description: Get IoT Hub's device streams endpoints. + examples: + - summary: Get all the device streams from "MyIotHub" IoT Hub. + command: > + az iot hub devicestream show -n MyIotHub diff --git a/src/command_modules/azure-cli-iotcentral/azure/cli/command_modules/iotcentral/help.yaml b/src/command_modules/azure-cli-iotcentral/azure/cli/command_modules/iotcentral/help.yaml new file mode 100644 index 00000000000..088423cfab1 --- /dev/null +++ b/src/command_modules/azure-cli-iotcentral/azure/cli/command_modules/iotcentral/help.yaml @@ -0,0 +1,46 @@ +version: 1 +content: +- group: + name: iotcentral + summary: Manage IoT Central assets. +- group: + name: iotcentral app + summary: Manage IoT Central applications. +- command: + name: iotcentral app create + summary: Create an IoT Central application. + description: | + For an introduction to IoT Central, see https://docs.microsoft.com/en-us/azure/iot-central/. + The F1 Sku is no longer supported. Please use the S1 Sku (default) for app creation. + For more pricing information, please visit https://azure.microsoft.com/en-us/pricing/details/iot-central/. + examples: + - summary: Create an IoT Central application in the standard pricing tier S1, in the region of the resource group. + command: > + az iotcentral app create --resource-group MyResourceGroup --name my-app-resource --subdomain my-app-subdomain + - summary: Create an IoT Central application with the standard pricing tier S1 in the 'westus' region, with a custom display name, based on the iotc-default template. + command: > + az iotcentral app create --resource-group MyResourceGroup --name my-app-resource-name --sku S1 --location westus + --subdomain my-app-subdomain --template iotc-default@1.0.0 --display-name 'My Custom Display Name' +- command: + name: iotcentral app show + summary: Get the details of an IoT Central application. + examples: + - summary: Show an IoT Central application. + command: > + az iotcentral app show --name MyApp +- command: + name: iotcentral app update + summary: Update metadata for an IoT Central application. +- command: + name: iotcentral app list + summary: List IoT Central applications. + examples: + - summary: List all IoT Central applications in a subscription. + command: > + az iotcentral app list + - summary: List all IoT Central applications in the resource group 'MyGroup' + command: > + az iotcentral app list --resource-group MyGroup +- command: + name: iotcentral app delete + summary: Delete an IoT Central application. diff --git a/src/command_modules/azure-cli-keyvault/azure/cli/command_modules/keyvault/help.yaml b/src/command_modules/azure-cli-keyvault/azure/cli/command_modules/keyvault/help.yaml new file mode 100644 index 00000000000..d307c8cba6b --- /dev/null +++ b/src/command_modules/azure-cli-keyvault/azure/cli/command_modules/keyvault/help.yaml @@ -0,0 +1,156 @@ +version: 1 +content: +- group: + name: keyvault + summary: Manage KeyVault keys, secrets, and certificates. +- command: + name: keyvault create + summary: Create a key vault. + description: Default permissions are created for the current user or service principal unless the `--no-self-perms` flag is specified. +- command: + name: keyvault delete + summary: Delete a key vault. +- command: + name: keyvault list + summary: List key vaults. +- command: + name: keyvault show + summary: Show details of a key vault. +- command: + name: keyvault update + summary: Update the properties of a key vault. +- command: + name: keyvault recover + summary: Recover a key vault. + description: Recovers a previously deleted key vault for which soft delete was enabled. +- group: + name: keyvault key + summary: Manage keys. +- group: + name: keyvault secret + summary: Manage secrets. +- group: + name: keyvault certificate + summary: Manage certificates. +- group: + name: keyvault storage + summary: Manage storage accounts. +- command: + name: keyvault storage add + examples: + - summary: Create a storage account and setup a vault to manage its keys + command: | + $id = az storage account create -g resourcegroup -n storageacct --query id + + # assign the Azure Key Vault service the "Storage Account Key Operator Service Role" role. + az role assignment create --role "Storage Account Key Operator Service Role" --scope $id \ + --assignee cfa8b339-82a2-471a-a3c9-0fc0be7a4093 + + az keyvault storage add --vault-name vault -n storageacct --active-key-name key1 \ + --auto-regenerate-key --regeneration-period P90D --resource-id $id +- group: + name: keyvault storage sas-definition + summary: Manage storage account SAS definitions. +- command: + name: keyvault storage sas-definition create + examples: + - summary: Add a sas-definition for an account sas-token + command: |2 + + $sastoken = az storage account generate-sas --expiry 2020-01-01 --permissions rw \ + --resource-types sco --services bfqt --https-only --account-name storageacct \ + --account-key 00000000 + + az keyvault storage sas-definition create --vault-name vault --account-name storageacct \ + -n rwallserviceaccess --validity-period P2D --sas-type account --template-uri $sastoken + - summary: Add a sas-definition for a blob sas-token + command: >2 + + $sastoken = az storage blob generate-sas --account-name storageacct --account-key 00000000 \ + -c container1 -n blob1 --https-only --permissions rw + + $url = az storage blob url --account-name storageacct -c container1 -n blob1 + + + az keyvault storage sas-definition create --vault-name vault --account-name storageacct \ + -n rwblobaccess --validity-period P2D --sas-type service --template-uri $url?$sastoken +- group: + name: keyvault network-rule + summary: Manage vault network ACLs. +- command: + name: keyvault certificate download + summary: Download the public portion of a Key Vault certificate. + description: The certificate formatted as either PEM or DER. PEM is the default. + examples: + - summary: Download a certificate as PEM and check its fingerprint in openssl. + command: | + az keyvault certificate download --vault-name vault -n cert-name -f cert.pem && \ + openssl x509 -in cert.pem -inform PEM -noout -sha1 -fingerprint + - summary: Download a certificate as DER and check its fingerprint in openssl. + command: | + az keyvault certificate download --vault-name vault -n cert-name -f cert.crt -e DER && \ + openssl x509 -in cert.crt -inform DER -noout -sha1 -fingerprint +- command: + name: keyvault certificate get-default-policy + summary: Get the default policy for self-signed certificates. + description: | + This default policy can be used in conjunction with `az keyvault create` to create a self-signed certificate. + The default policy can also be used as a starting point to create derivative policies. + + For more details, see: https://docs.microsoft.com/en-us/rest/api/keyvault/certificates-and-policies + examples: + - summary: Create a self-signed certificate with the default policy + command: | + az keyvault certificate create --vault-name vaultname -n cert1 \ + -p "$(az keyvault certificate get-default-policy)" +- command: + name: keyvault certificate create + summary: Create a Key Vault certificate. + description: Certificates can be used as a secrets for provisioned virtual machines. + examples: + - summary: Create a self-signed certificate with the default policy and add it to a virtual machine. + command: | + az keyvault certificate create --vault-name vaultname -n cert1 \ + -p "$(az keyvault certificate get-default-policy)" + + secrets=$(az keyvault secret list-versions --vault-name vaultname \ + -n cert1 --query "[?attributes.enabled].id" -o tsv) + + vm_secrets=$(az vm secret format -s "$secrets") + + az vm create -g group-name -n vm-name --admin-username deploy \ + --image debian --secrets "$vm_secrets" +- command: + name: keyvault certificate import + summary: Import a certificate into KeyVault. + description: Certificates can also be used as a secrets in provisioned virtual machines. + examples: + - summary: Create a service principal with a certificate, add the certificate to Key Vault and provision a VM with that certificate. + command: | + service_principal=$(az ad sp create-for-rbac --create-cert) + + cert_file=$(echo $service_principal | jq .fileWithCertAndPrivateKey -r) + + az keyvault create -g my-group -n vaultname + + az keyvault certificate import --vault-name vaultname -n cert_name -f cert_file + + secrets=$(az keyvault secret list-versions --vault-name vaultname \ + -n cert1 --query "[?attributes.enabled].id" -o tsv) + + vm_secrets=$(az vm secret format -s "$secrets") + + az vm create -g group-name -n vm-name --admin-username deploy \ + --image debian --secrets "$vm_secrets" +- group: + name: keyvault certificate pending + summary: Manage pending certificate creation operations. +- group: + name: keyvault certificate contact + summary: Manage contacts for certificate management. +- group: + name: keyvault certificate issuer + summary: Manage certificate issuer information. +- group: + name: keyvault certificate issuer admin + summary: Manage admin information for certificate issuers. diff --git a/src/command_modules/azure-cli-lab/azure/cli/command_modules/lab/help.yaml b/src/command_modules/azure-cli-lab/azure/cli/command_modules/lab/help.yaml new file mode 100644 index 00000000000..3da82bd4778 --- /dev/null +++ b/src/command_modules/azure-cli-lab/azure/cli/command_modules/lab/help.yaml @@ -0,0 +1,263 @@ +version: 1 +content: +- group: + name: lab + summary: Manage Azure DevTest Labs. +- group: + name: lab vm + summary: Manage VMs in an Azure DevTest Lab. +- command: + name: lab vm create + summary: Create a VM in a lab. + arguments: + - name: --name + summary: Name of the virtual machine. + - name: --lab-name + summary: Name of the lab. + - name: --notes + summary: Notes for the virtual machine. + - name: --image + summary: The name of the operating system image (gallery image name or custom image name/ID). + description: Use `az lab gallery-image list` for available gallery images or `az lab custom-image list` for available custom images. + - name: --image-type + summary: 'Type of the image. Allowed values are: gallery, custom' + - name: --formula + summary: Name of the formula. Use `az lab formula list` for available formulas. + description: > + Use `az lab formula` with the `--export-artifacts` flag to export and update artifacts, then pass + the results via the `--artifacts` argument. + - name: --size + summary: The size of the VM to be created. See https://azure.microsoft.com/en-us/pricing/details/virtual-machines/ for size info. + - name: --admin-username + summary: Username for the VM admin. + - name: --admin-password + summary: Password for the VM admin. + - name: --ssh-key + summary: The SSH public key or public key file path. Use `--generate-ssh-keys` to generate SSH keys. + - name: --authentication-type + summary: 'Type of authentication allowed for the VM. Allowed values are: password, ssh.' + - name: --saved-secret + summary: Name of the saved secret to be used for authentication. + description: When this value is provided, it is used in the place of other authentication methods. + - name: --vnet-name + summary: Name of the virtual network to add the VM to. + - name: --subnet + summary: Name of the subnet to add the VM to. + - name: --ip-configuration + summary: 'Type of IP configuration to use for the VM. Allowed values are: shared, public, private.' + description: If omitted, will be selected based on the VM's vnet. + - name: --artifacts + summary: JSON encoded array of artifacts to be applied. Use '@{file}' to load from a file. + - name: --tags + summary: Space-separated tags in `key[=value]` format. + description: Tags may be cleared by assigning the empty value "" to them. + - name: --allow-claim + summary: Flag indicating if the VM should be created as claimable. + - name: --disk-type + summary: Storage type to use for virtual machine. + - name: --expiration-date + summary: The expiration date in UTC(YYYY-mm-dd) for the VM. + - name: --generate-ssh-keys + summary: Generate SSH public and private key files if missing. + examples: + - summary: Create a VM in the lab from a gallery image. + command: > + az lab vm create --lab-name {LabName} -g {ResourceGroup} --name {VMName} --image "Ubuntu Server 16.04 LTS" --image-type gallery --size Standard_DS1_v2 + - summary: Create a VM in the lab from a gallery image with SSH authentication. + command: > + az lab vm create --lab-name {LabName} -g {ResourceGroup} --name {VMName} --image "Ubuntu Server 16.04 LTS" --image-type gallery --size Standard_DS1_v2 --authentication-type ssh + - summary: Create a claimable VM in the lab from a gallery image with password authentication. + command: > + az lab vm create --lab-name {LabName} -g {ResourceGroup} --name {VMName} --image "Ubuntu Server 16.04 LTS" --image-type gallery --size Standard_DS1_v2 --allow-claim + - summary: Create a windows VM in the lab from a gallery image with password authentication. + command: > + az lab vm create --lab-name {LabName} -g {ResourceGroup} --name {VMName} --image "Windows Server 2008 R2 SP1" --image-type gallery --size Standard_DS1_v2 + - summary: Create a VM in the lab from a custom image. + command: > + az lab vm create --lab-name {LabName} -g {ResourceGroup} --name {VMName} --image "jenkins_custom" --image-type custom --size Standard_DS1_v2 + - summary: Create a VM in the lab with a public IP. + command: > + az lab vm create --lab-name {LabName} -g {ResourceGroup} --name {VMName} --image "Ubuntu Server 16.04 LTS" --image-type gallery --size Standard_DS1_v2 --ip-configuration public + - summary: Create a VM from a formula. + command: > + az lab vm create --lab-name {LabName} -g {ResourceGroup} --name {VMName} --formula MyFormula --artifacts '@artifacts.json' +- command: + name: lab vm list + summary: List the VMs in an Azure DevTest Lab. + arguments: + - name: --lab-name + summary: Name of the lab. + - name: --order-by + summary: The ordering expression for the results using OData notation. + - name: --top + summary: The maximum number of resources to return. + - name: --filters + summary: The filter to apply. + - name: --expand + summary: The expand query. + - name: --claimable + summary: List only claimable virtual machines in the lab. Cannot be used with `--filters`. + - name: --all + summary: List all virtual machines in the lab. Cannot be used with `--filters` + - name: --environment + summary: Name or ID of the environment to list virtual machines in. Cannot be used with `--filters`. + - name: --object-id + summary: Object ID of the owner to list VMs for. +- command: + name: lab vm apply-artifacts + summary: Apply artifacts to a virtual machine in Azure DevTest Lab. + arguments: + - name: --resource-group + summary: Name of lab's resource group. + - name: --lab-name + summary: Name of the Lab. + - name: --name + summary: Name of the virtual machine. + - name: --artifacts + summary: JSON encoded array of artifacts to be applied. Use '@{file}' to load from a file. +- command: + name: lab vm claim + summary: Claim a virtual machine from the Lab. + arguments: + - name: --resource-group + summary: Name of lab's resource group. + - name: --lab-name + summary: Name of the lab. + - name: --name + summary: Name of the virtual machine to claim. + examples: + - summary: Claim any available virtual machine in the lab. + command: > + az lab vm claim -g {ResourceGroup} --lab-name {LabName} + - summary: Claim a specific virtual machine in the lab. + command: > + az lab vm claim -g {ResourceGroup} --lab-name {LabName} --name {VMName} + - summary: Claim multiple virtual machines in the lab by IDs. + command: | + az lab vm claim --ids \ + /subscriptions/{SubID}/resourcegroups/{ResourceGroup}/providers/microsoft.devtestlab/labs/{LabName}/virtualmachines/{VMName1} \ + /subscriptions/{SubID}/resourcegroups/{ResourceGroup}/providers/microsoft.devtestlab/labs/{LabName}/virtualmachines/{VMName2} +- group: + name: lab custom-image + summary: Manage custom images of a DevTest Lab. +- command: + name: lab custom-image create + summary: Create a custom image in a DevTest Lab. + arguments: + - name: --name + summary: Name of the image. + - name: --lab-name + summary: Name of the Lab. + - name: --author + summary: The author of the custom image. + - name: --description + summary: A detailed description for the custom image. + - name: --source-vm-id + summary: The resource ID of a virtual machine in the provided lab. + - name: --os-type + summary: 'Type of the OS on which the custom image is based. Allowed values are: Windows, Linux' + - name: --os-state + summary: The current state of the virtual machine. + description: > + For Windows virtual machines: NonSysprepped, SysprepRequested, SysprepApplied + For Linux virtual machines: NonDeprovisioned, DeprovisionRequested, DeprovisionApplied + examples: + - summary: Create a custom image in the lab from a running Windows virtual machine without applying sysprep. + command: | + az lab custom-image create --lab-name {LabName} -g {ResourceGroup} --name {VMName} \ + --os-type Windows --os-state NonSysprepped \ + --source-vm-id "/subscriptions/{SubID}/resourcegroups/{ResourceGroup}/microsoft.devtestlab/labs/{LabName}/virtualmachines/{VMName}" +- group: + name: lab gallery-image + summary: List Azure Marketplace images allowed for a DevTest Lab. +- group: + name: lab artifact + summary: Manage DevTest Labs artifacts. +- group: + name: lab artifact-source + summary: Manage DevTest Lab artifact sources. +- group: + name: lab vnet + summary: Manage virtual networks of an Azure DevTest Lab. +- group: + name: lab formula + summary: Manage formulas for an Azure DevTest Lab. +- command: + name: lab formula show + summary: Show formulae from an Azure DevTest Lab. + arguments: + - name: --lab-name + summary: Name of the lab. + - name: --name + summary: Name of the formula. +- command: + name: lab formula export-artifacts + summary: Export artifacts from a formula. + arguments: + - name: --lab-name + summary: Name of the lab. + - name: --name + summary: Name of the formula. +- group: + name: lab secret + summary: Manage secrets of an Azure DevTest Lab. +- command: + name: lab secret set + summary: Set a secret for a lab. + arguments: + - name: --lab-name + summary: Name of the lab. + - name: --name + summary: Name of the secret. + - name: --value + summary: Value of the secret. +- group: + name: lab arm-template + summary: Manage Azure Resource Manager (ARM) templates in an Azure DevTest Lab. +- command: + name: lab arm-template show + summary: Get the details of an ARM template in a lab. + arguments: + - name: --lab-name + summary: Name of the lab. + - name: --name + summary: Name of the Azure Resource Manager template. + - name: --resource-group + summary: Name of lab's resource group. + - name: --export-parameters + summary: Whether or not to export parameters template. + - name: --artifact-source-name + summary: Name of the artifact source. +- group: + name: lab environment + summary: Manage environments for an Azure DevTest Lab. +- command: + name: lab environment create + summary: Create an environment in a lab. + arguments: + - name: --lab-name + summary: Name of the lab. + - name: --name + summary: Name of the environment. + - name: --resource-group + summary: Name of the lab's resource group. + - name: --arm-template + summary: Name or ID of the ARM template in the lab. + - name: --artifact-source-name + summary: Name of the artifact source in the lab. + value-sources: + - link: + command: az lab artifact-source list + - name: --parameters + summary: JSON encoded list of parameters. Use '@{file}' to load from a file. + - name: --tags + summary: The tags for the resource. +- command: + name: lab environment delete + summary: Delete an environment from a lab. +- command: + name: lab environment list + summary: List environments in a lab. +- command: + name: lab environment show + summary: Get the details for an environment of a lab. diff --git a/src/command_modules/azure-cli-maps/azure/cli/command_modules/maps/help.yaml b/src/command_modules/azure-cli-maps/azure/cli/command_modules/maps/help.yaml new file mode 100644 index 00000000000..aa966b42873 --- /dev/null +++ b/src/command_modules/azure-cli-maps/azure/cli/command_modules/maps/help.yaml @@ -0,0 +1,43 @@ +version: 1 +content: +- group: + name: maps + summary: Manage Azure Maps. +- group: + name: maps account + summary: Manage Azure Maps accounts. +- group: + name: maps account keys + summary: Manage Azure Maps account keys. +- command: + name: maps account show + summary: Show the details of a maps account. +- command: + name: maps account list + summary: Show all maps accounts in a subscription or in a resource group. +- command: + name: maps account create + summary: Create a maps account. + arguments: + - name: --accept-tos + summary: Accept the Terms of Service, and do not prompt for confirmation. + description: | + By creating an Azure Maps account, you agree that you have read and agree to the + License (https://azure.microsoft.com/en-us/support/legal/) and + Privacy Statement (https://privacy.microsoft.com/en-us/privacystatement). +- command: + name: maps account update + summary: Update the properties of a maps account. +- command: + name: maps account delete + summary: Delete a maps account. +- command: + name: maps account keys list + summary: List the keys to use with the Maps APIs. + description: | + A key is used to authenticate and authorize access to the Maps REST APIs. Only one key is needed at a time; two are given to provide seamless key regeneration. +- command: + name: maps account keys renew + summary: Renew either the primary or secondary key for use with the Maps APIs. + description: | + This command immediately invalidates old API keys. Only the renewed keys can be used to connect to maps. diff --git a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/help.yaml b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/help.yaml new file mode 100644 index 00000000000..dd855621c92 --- /dev/null +++ b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/help.yaml @@ -0,0 +1,760 @@ +version: 1 +content: +- group: + name: monitor + summary: Manage the Azure Monitor Service. +- group: + name: monitor alert + summary: Manage classic metric-based alert rules. +- command: + name: monitor alert create + summary: Create a classic metric-based alert rule. + arguments: + - name: --action + summary: Add an action to fire when the alert is triggered. + description: | + Usage: --action TYPE KEY [ARG ...] + Email: --action email bob@contoso.com ann@contoso.com + Webhook: --action webhook https://www.contoso.com/alert apiKey=value + Webhook: --action webhook https://www.contoso.com/alert?apiKey=value + Multiple actions can be specified by using more than one `--action` argument. + - name: --description + summary: Free-text description of the rule. Defaults to the condition expression. + - name: --disabled + summary: Create the rule in a disabled state. + - name: --condition + summary: The condition which triggers the rule. + description: > + The form of a condition is "METRIC {>,>=,<,<=} THRESHOLD {avg,min,max,total,last} PERIOD". + Values for METRIC and appropriate THRESHOLD values can be obtained from `az monitor metric` commands, + and PERIOD is of the form "##h##m##s". + - name: --email-service-owners + summary: Email the service owners if an alert is triggered. + examples: + - summary: Create a high CPU usage alert on a VM with no actions. + command: > + az monitor alert create -n rule1 -g {ResourceGroup} --target {VirtualMachineID} --condition "Percentage CPU > 90 avg 5m" + - summary: Create a high CPU usage alert on a VM with email and webhook actions. + command: | + az monitor alert create -n rule1 -g {ResourceGroup} --target {VirtualMachineID} \ + --condition "Percentage CPU > 90 avg 5m" \ + --action email bob@contoso.com ann@contoso.com --email-service-owners \ + --action webhook https://www.contoso.com/alerts?type=HighCPU \ + --action webhook https://alerts.contoso.com apiKey={APIKey} type=HighCPU +- command: + name: monitor alert update + summary: Update a classic metric-based alert rule. + arguments: + - name: --description + summary: Description of the rule. + - name: --condition + summary: The condition which triggers the rule. + description: > + The form of a condition is "METRIC {>,>=,<,<=} THRESHOLD {avg,min,max,total,last} PERIOD". + Values for METRIC and appropriate THRESHOLD values can be obtained from `az monitor metric` commands, + and PERIOD is of the form "##h##m##s". + - name: --add-action + summary: Add an action to fire when the alert is triggered. + description: | + Usage: --add-action TYPE KEY [ARG ...] + Email: --add-action email bob@contoso.com ann@contoso.com + Webhook: --add-action webhook https://www.contoso.com/alert apiKey=value + Webhook: --add-action webhook https://www.contoso.com/alert?apiKey=value + Multiple actions can be specified by using more than one `--add-action` argument. + - name: --remove-action + summary: Remove one or more actions. + description: | + Usage: --remove-action TYPE KEY [KEY ...] + Email: --remove-action email bob@contoso.com ann@contoso.com + Webhook: --remove-action webhook https://contoso.com/alert https://alerts.contoso.com + - name: --email-service-owners + summary: Email the service owners if an alert is triggered. + - name: --metric + summary: Name of the metric to base the rule on. + value-sources: + - link: + command: az monitor metrics list-definitions + - name: --operator + summary: How to compare the metric against the threshold. + - name: --threshold + summary: Numeric threshold at which to trigger the alert. + - name: --aggregation + summary: Type of aggregation to apply based on --period. + - name: --period + summary: > + Time span over which to apply --aggregation, in nDnHnMnS shorthand or full ISO8601 format. +- command: + name: monitor alert delete + summary: Delete an alert rule. +- command: + name: monitor alert list + summary: List alert rules in a resource group. +- command: + name: monitor alert show + summary: Show an alert rule. +- command: + name: monitor alert show-incident + summary: Get the details of an alert rule incident. +- command: + name: monitor alert list-incidents + summary: List all incidents for an alert rule. +- group: + name: monitor metrics + summary: View Azure resource metrics. +- command: + name: monitor metrics list + summary: List the metric values for a resource. + arguments: + - name: --aggregation + summary: The list of aggregation types (space-separated) to retrieve. + value-sources: + - link: + command: az monitor metrics list-definitions + - name: --interval + summary: > + The interval over which to aggregate metrics, in ##h##m format. + - name: --filter + summary: A string used to reduce the set of metric data returned. eg. "BlobType eq '*'" + description: For a full list of filters, see the filter string reference at https://docs.microsoft.com/en-us/rest/api/monitor/metrics/list + - name: --metadata + summary: Returns the metadata values instead of metric data + - name: --dimension + summary: The list of dimensions (space-separated) the metrics are queried into. + value-sources: + - link: + command: az monitor metrics list-definitions + - name: --namespace + summary: Namespace to query metric definitions for. + value-sources: + - link: + command: az monitor metrics list-definitions + - name: --offset + summary: > + Time offset of the query range, in ##d##h format. + description: > + Can be used with either --start-time or --end-time. If used with --start-time, then + the end time will be calculated by adding the offset. If used with --end-time (default), then + the start time will be calculated by subtracting the offset. If --start-time and --end-time are + provided, then --offset will be ignored. + - name: --metrics + summary: > + Space-separated list of metric names to retrieve. + value-sources: + - link: + command: az monitor metrics list-definitions + examples: + - summary: List a VM's CPU usage for the past hour + command: > + az monitor metrics list --resource {ResourceName} --metric "Percentage CPU" + - summary: List success E2E latency of a storage account and split the data series based on API name + command: > + az monitor metrics list --resource {ResourceName} --metric SuccessE2ELatency \ + --dimension ApiName + - summary: List success E2E latency of a storage account and split the data series based on both API name and geo type + command: > + az monitor metrics list --resource {ResourceName} --metric SuccessE2ELatency \ + --dimension ApiName GeoType + - summary: List success E2E latency of a storage account and split the data series based on both API name and geo type using "--filter" parameter + command: > + az monitor metrics list --resource {ResourceName} --metric SuccessE2ELatency \ + --filter "ApiName eq '*' and GeoType eq '*'" + - summary: List success E2E latency of a storage account and split the data series based on both API name and geo type. Limits the api name to 'DeleteContainer' + command: > + az monitor metrics list --resource {ResourceName} --metric SuccessE2ELatency \ + --filter "ApiName eq 'DeleteContainer' and GeoType eq '*'" + - summary: List transactions of a storage account per day since 2017-01-01 + command: > + az monitor metrics list --resource {ResourceName} --metric Transactions \ + --start-time 2017-01-01T00:00:00Z \ + --interval PT24H + - summary: List the metadata values for a storage account under transaction metric's api name dimension since 2017 + command: > + az monitor metrics list --resource {ResourceName} --metric Transactions \ + --filter "ApiName eq '*'" \ + --start-time 2017-01-01T00:00:00Z +- command: + name: monitor metrics list-definitions + summary: Lists the metric definitions for the resource. +- group: + name: monitor metrics alert + summary: Manage near-realtime metric alert rules. +- command: + name: monitor metrics alert create + summary: Create a metric-based alert rule. + arguments: + - name: --action + summary: Add an action group and optional webhook properties to fire when the alert is triggered. + description: | + Usage: --action ACTION_GROUP_NAME_OR_ID [KEY=VAL [KEY=VAL ...]] + + Multiple action groups can be specified by using more than one `--action` argument. + - name: --disabled + summary: Create the rule in a disabled state. + - name: --condition + summary: The condition which triggers the rule. + description: | + Usage: --conditon {avg,min,max,total} [NAMESPACE.]METRIC {=,!=,>,>=,<,<=} THRESHOLD + [where DIMENSION {includes,excludes} VALUE [or VALUE ...] + [and DIMENSION {includes,excludes} VALUE [or VALUE ...] ...]] + + Dimensions can be queried by adding the 'where' keyword and multiple dimensions can be queried by combining them with the 'and' keyword. + + Values for METRIC, DIMENSION and appropriate THRESHOLD values can be obtained from `az monitor metrics list-definition` command. + + Multiple conditons can be specified by using more than one `--condition` argument. + examples: + - summary: Create a high CPU usage alert on a VM with no actions. + command: > + az monitor metrics alert create -n alert1 -g {ResourceGroup} --scopes {VirtualMachineID} --condition "avg Percentage CPU > 90" + --description "High CPU" + - summary: Create a high CPU usage alert on a VM with email and webhook actions. + command: | + az monitor metrics alert create -n alert1 -g {ResourceGroup} --scopes {VirtualMachineID} \ + --condition "avg Percentage CPU > 90" --window-size 5m --evaluation-frequency 1m \ + --action {actionGroupId} apiKey={APIKey} type=HighCPU --description "High CPU" + - summary: Create an alert when a storage account shows a high number of slow transactions, using multi-dimensional filters. + command: | + az monitor metrics alert create -g {ResourceGroup} -n alert1 --scopes {StorageAccountId} \ + --description "Storage Slow Transactions" \ + --condition "total transactions > 5 where ResponseType includes Success" \ + --condition "avg SuccessE2ELatency > 250 where ApiName includes GetBlob or PutBlob" +- command: + name: monitor metrics alert update + summary: Update a metric-based alert rule. + arguments: + - name: --add-condition + summary: Add a condition which triggers the rule. + description: | + Usage: --add-conditon {avg,min,max,total} [NAMESPACE.]METRIC {=,!=,>,>=,<,<=} THRESHOLD + [where DIMENSION {includes,excludes} VALUE [or VALUE ...] + [and DIMENSION {includes,excludes} VALUE [or VALUE ...] ...]] + + Dimensions can be queried by adding the 'where' keyword and multiple dimensions can be queried by combining them with the 'and' keyword. + + Values for METRIC, DIMENSION and appropriate THRESHOLD values can be obtained from `az monitor metrics list-definition` command. + + Multiple conditons can be specified by using more than one `--condition` argument. + - name: --remove-conditions + summary: Space-separated list of condition names to remove. + - name: --add-action + summary: Add an action group and optional webhook properties to fire when the alert is triggered. + description: | + Usage: --add-action ACTION_GROUP_NAME_OR_ID [KEY=VAL [KEY=VAL ...]] + + Multiple action groups can be specified by using more than one `--action` argument. + - name: --remove-actions + summary: Space-separated list of action group names to remove. +- command: + name: monitor metrics alert delete + summary: Delete a metrics-based alert rule. +- command: + name: monitor metrics alert list + summary: List metric-based alert rules. +- command: + name: monitor metrics alert show + summary: Show a metrics-based alert rule. +- group: + name: monitor log-profiles + summary: Manage log profiles. +- command: + name: monitor log-profiles create + summary: Create a log profile. + arguments: + - name: --name + summary: The name of the log profile. + - name: --locations + summary: Space-separated list of regions for which Activity Log events should be stored. + - name: --categories + summary: Space-separated categories of the logs. These categories are created as is convenient to the user. Some values are Write, Delete, and/or Action. + - name: --storage-account-id + summary: The resource id of the storage account to which you would like to send the Activity Log. + - name: --service-bus-rule-id + summary: The service bus rule ID of the service bus namespace in which you would like to have Event Hubs created for streaming the Activity Log. The rule ID is of the format '{service bus resource ID}/authorizationrules/{key name}'. + - name: --days + summary: The number of days for the retention in days. A value of 0 will retain the events indefinitely + - name: --enabled + summary: Whether the retention policy is enabled. +- command: + name: monitor log-profiles update + summary: Update a log profile. +- group: + name: monitor diagnostic-settings + summary: Manage service diagnostic settings. +- group: + name: monitor diagnostic-settings categories + summary: Retrieve service diagnostic settings categories. +- command: + name: monitor diagnostic-settings create + summary: Create diagnostic settings for the specified resource. + description: > + For more information, visit: https://docs.microsoft.com/en-us/rest/api/monitor/diagnosticsettings/createorupdate#metricsettings + arguments: + - name: --name + summary: The name of the diagnostic settings. + - name: --resource-group + summary: Name of the resource group for the Log Analytics and Storage Account when the name of the service instead of a full resource ID is given. + - name: --logs + summary: JSON encoded list of logs settings. Use '@{file}' to load from a file. + - name: --metrics + summary: JSON encoded list of metric settings. Use '@{file}' to load from a file. + - name: --storage-account + summary: Name or ID of the storage account to send diagnostic logs to. + - name: --workspace + summary: Name or ID of the Log Analytics workspace to send diagnostic logs to. + - name: --event-hub + summary: > + Name or ID an event hub. If none is specified, the default event hub will be selected. + - name: --event-hub-rule + summary: Name or ID of the event hub authorization rule. + examples: + - summary: Create diagnostic settings with EventHub. + command: | + az monitor diagnostic-settings create --resource {ID} -n {name} + --event-hub-rule {eventHubRuleID} --storage-account {storageAccount} + --logs '[ + { + "category": "WorkflowRuntime", + "enabled": true, + "retentionPolicy": { + "enabled": false, + "days": 0 + } + } + ]' + --metrics '[ + { + "category": "WorkflowRuntime", + "enabled": true, + "retentionPolicy": { + "enabled": false, + "days": 0 + } + } + ]' +- command: + name: monitor diagnostic-settings update + summary: Update diagnostic settings. +- group: + name: monitor autoscale + summary: Manage autoscale settings. + description: > + For more information on autoscaling, visit: https://docs.microsoft.com/en-us/azure/monitoring-and-diagnostics/monitoring-understanding-autoscale-settings +- command: + name: monitor autoscale show + summary: Show autoscale setting details. +- command: + name: monitor autoscale create + summary: Create new autoscale settings. + description: > + For more information on autoscaling, visit: https://docs.microsoft.com/en-us/azure/monitoring-and-diagnostics/monitoring-understanding-autoscale-settings + arguments: + - name: --action + summary: Add an action to fire when a scaling event occurs. + description: | + Usage: --action TYPE KEY [ARG ...] + Email: --action email bob@contoso.com ann@contoso.com + Webhook: --action webhook https://www.contoso.com/alert apiKey=value + Webhook: --action webhook https://www.contoso.com/alert?apiKey=value + Multiple actions can be specified by using more than one `--action` argument. + examples: + - summary: Create autoscale settings to scale between 2 and 5 instances (3 as default). Email the administrator when scaling occurs. + command: | + az monitor autoscale create -g {myrg} --resource {resource-id} --min-count 2 --max-count 5 \ + --count 3 --email-administrator + + az monitor autoscale rule create -g {myrg} --autoscale-name {resource-name} --scale out 1 \ + --condition "Percentage CPU > 75 avg 5m" + + az monitor autoscale rule create -g {myrg} --autoscale-name {resource-name} --scale in 1 \ + --condition "Percentage CPU < 25 avg 5m" + - summary: Create autoscale settings for exactly 4 instances. + command: > + az monitor autoscale create -g {myrg} --resource {resource-id} --count 4 +- command: + name: monitor autoscale update + summary: Update autoscale settings. + description: > + For more information on autoscaling, visit: https://docs.microsoft.com/en-us/azure/monitoring-and-diagnostics/monitoring-understanding-autoscale-settings + arguments: + - name: --add-action + summary: Add an action to fire when a scaling event occurs. + description: | + Usage: --add-action TYPE KEY [ARG ...] + Email: --add-action email bob@contoso.com ann@contoso.com + Webhook: --add-action webhook https://www.contoso.com/alert apiKey=value + Webhook: --add-action webhook https://www.contoso.com/alert?apiKey=value + Multiple actions can be specified by using more than one `--add-action` argument. + - name: --remove-action + summary: Remove one or more actions. + description: | + Usage: --remove-action TYPE KEY [KEY ...] + Email: --remove-action email bob@contoso.com ann@contoso.com + Webhook: --remove-action webhook https://contoso.com/alert https://alerts.contoso.com + examples: + - summary: Update autoscale settings to use a fixed 3 instances by default. + command: | + az monitor autoscale update -g {myrg} -n {autoscale-name} --count 3 + - summary: Update autoscale settings to remove an email notification. + command: | + az monitor autoscale update -g {myrg} -n {autoscale-name} \ + --remove-action email bob@contoso.com +- group: + name: monitor autoscale profile + summary: Manage autoscaling profiles. + description: > + For more information on autoscaling, visit: https://docs.microsoft.com/en-us/azure/monitoring-and-diagnostics/monitoring-understanding-autoscale-settings +- command: + name: monitor autoscale profile create + summary: Create a fixed or recurring autoscale profile. + description: > + For more information on autoscaling, visit: https://docs.microsoft.com/en-us/azure/monitoring-and-diagnostics/monitoring-understanding-autoscale-settings + arguments: + - name: --timezone + summary: Timezone name. + value-sources: + - link: + command: az monitor autoscale profile list-timezones + - name: --recurrence + summary: When the profile recurs. If omitted, a fixed (non-recurring) profile is created. + description: | + Usage: --recurrence {week} [ARG ARG ...] + Weekly: --recurrence week Sat Sun + - name: --start + summary: When the autoscale profile begins. Format depends on the type of profile. + description: | + Fixed: --start yyyy-mm-dd [hh:mm:ss] + Weekly: [--start hh:mm] + - name: --end + summary: When the autoscale profile ends. Format depends on the type of profile. + description: | + Fixed: --end yyyy-mm-dd [hh:mm:ss] + Weekly: [--end hh:mm] + examples: + - summary: Create a fixed date profile, inheriting the default scaling rules but changing the capacity. + command: | + az monitor autoscale create -g {myrg} --resource {resource-id} --min-count 2 --count 3 \ + --max-count 5 + + az monitor autoscale rule create -g {myrg} --autoscale-name {name} --scale out 1 \ + --condition "Percentage CPU > 75 avg 5m" + + az monitor autoscale rule create -g {myrg} --autoscale-name {name} --scale in 1 \ + --condition "Percentage CPU < 25 avg 5m" + + az monitor autoscale profile create -g {myrg} --autoscale-name {name} -n Christmas \ + --copy-rules default --min-count 3 --count 6 --max-count 10 --start 2018-12-24 \ + --end 2018-12-26 --timezone "Pacific Standard Time" + - summary: Create a recurring weekend profile, inheriting the default scaling rules but changing the capacity. + command: | + az monitor autoscale create -g {myrg} --resource {resource-id} --min-count 2 --count 3 \ + --max-count 5 + + az monitor autoscale rule create -g {myrg} --autoscale-name {name} --scale out 1 \ + --condition "Percentage CPU > 75 avg 5m" + + az monitor autoscale rule create -g {myrg} --autoscale-name {name} --scale in 1 \ + --condition "Percentage CPU < 25 avg 5m" + + az monitor autoscale profile create -g {myrg} --autoscale-name {name} -n weeekend \ + --copy-rules default --min-count 1 --count 2 --max-count 2 \ + --recurrence week sat sun --timezone "Pacific Standard Time" +- command: + name: monitor autoscale profile delete + summary: Delete an autoscale profile. +- command: + name: monitor autoscale profile list + summary: List autoscale profiles. +- command: + name: monitor autoscale profile list-timezones + summary: Look up time zone information. +- command: + name: monitor autoscale profile show + summary: Show details of an autoscale profile. +- group: + name: monitor autoscale rule + summary: Manage autoscale scaling rules. + description: > + For more information on autoscaling, visit: https://docs.microsoft.com/en-us/azure/monitoring-and-diagnostics/monitoring-understanding-autoscale-settings +- command: + name: monitor autoscale rule create + summary: Add a new autoscale rule. + description: > + For more information on autoscaling, visit: https://docs.microsoft.com/en-us/azure/monitoring-and-diagnostics/monitoring-understanding-autoscale-settings + arguments: + - name: --condition + summary: The condition which triggers the scaling action. + description: > + The form of a condition is "METRIC {==,!=,>,>=,<,<=} THRESHOLD {avg,min,max,total,count} PERIOD". + Values for METRIC and appropriate THRESHOLD values can be obtained from the `az monitor metric` command. + Format of PERIOD is "##h##m##s". + - name: --scale + summary: The direction and amount to scale. + description: | + Usage: --scale {to,in,out} VAL[%] + Fixed Count: --scale to 5 + In by Count: --scale in 2 + Out by Percent: --scale out 10% + - name: --timegrain + summary: > + The way metrics are polled across instances. + description: > + The form of the timegrain is {avg,min,max,sum} VALUE. Values can be obtained from the `az monitor metric` command. + Format of VALUE is "##h##m##s". + examples: + - summary: Scale to 5 instances when the CPU Percentage across instances is greater than 75 averaged over 10 minutes. + command: | + az monitor autoscale rule create -g {myrg} --autoscale-name {myvmss} \ + --scale to 5 --condition "Percentage CPU > 75 avg 10m" + - summary: Scale up 2 instances when the CPU Percentage across instances is greater than 75 averaged over 5 minutes. + command: | + az monitor autoscale rule create -g {myrg} --autoscale-name {myvmss} \ + --scale out 2 --condition "Percentage CPU > 75 avg 5m" + - summary: Scale down 50% when the CPU Percentage across instances is less than 25 averaged over 15 minutes. + command: | + az monitor autoscale rule create -g {myrg} --autoscale-name {myvmss} \ + --scale in 50% --condition "Percentage CPU < 25 avg 15m" +- command: + name: monitor autoscale rule list + summary: List autoscale rules for a profile. +- command: + name: monitor autoscale rule copy + summary: Copy autoscale rules from one profile to another. +- command: + name: monitor autoscale rule delete + summary: Remove autoscale rules from a profile. +- group: + name: monitor autoscale-settings + summary: Manage autoscale settings. +- command: + name: monitor autoscale-settings update + summary: Updates an autoscale setting. +- group: + name: monitor activity-log + summary: Manage activity logs. +- group: + name: monitor action-group + summary: Manage action groups +- command: + name: monitor action-group list + summary: List action groups under a resource group or the current subscription + arguments: + - name: --resource-group + summary: > + Name of the resource group under which the action groups are being listed. If it is omitted, all the action groups under + the current subscription are listed. +- command: + name: monitor action-group show + summary: Show the details of an action group +- command: + name: monitor action-group create + summary: Create a new action group + arguments: + - name: --action + summary: Add receivers to the action group during the creation + description: | + Usage: --action TYPE NAME [ARG ...] + Email: --action email bob bob@contoso.com + SMS: --action sms charli 1 5551234567 + Webhook: --action webhook alert_hook https://www.contoso.com/alert + Multiple actions can be specified by using more than one `--action` argument. + - name: --short-name + summary: The short name of the action group +- command: + name: monitor action-group update + summary: Update an action group + arguments: + - name: --short-name + summary: Update the group short name of the action group + - name: --add-action + summary: Add receivers to the action group + description: | + Usage: --add-action TYPE NAME [ARG ...] + Email: --add-action email bob bob@contoso.com + SMS: --add-action sms charli 1 5551234567 + Webhook: --add-action https://www.contoso.com/alert + Multiple actions can be specified by using more than one `--add-action` argument. + - name: --remove-action + summary: Remove receivers from the action group. Accept space-separated list of receiver names. +- group: + name: monitor activity-log alert + summary: Manage activity log alerts +- command: + name: monitor activity-log alert list + summary: List activity log alerts under a resource group or the current subscription. + arguments: + - name: --resource-group + summary: Name of the resource group under which the activity log alerts are being listed. If it is omitted, all the activity log alerts under the current subscription are listed. +- command: + name: monitor activity-log alert create + summary: Create a default activity log alert + description: This command will create a default activity log with one condition which compares if the activities logs 'category' field equals to 'ServiceHealth'. The newly created activity log alert does not have any action groups attached to it. + arguments: + - name: --name + summary: Name of the activity log alerts + - name: --scope + summary: A list of strings that will be used as prefixes. + description: > + The alert will only apply to activity logs with resourceIDs that fall under one of these prefixes. + If not provided, the path to the resource group will be used. + - name: --disable + summary: Disable the activity log alert after it is created. + - name: --description + summary: A description of this activity log alert + - name: --condition + summary: The condition that will cause the alert to activate. The format is FIELD=VALUE[ and FIELD=VALUE...]. + description: > + The possible values for the field are 'resourceId', 'category', 'caller', 'level', 'operationName', 'resourceGroup', + 'resourceProvider', 'status', 'subStatus', 'resourceType', or anything beginning with 'properties.'. + - name: --action-group + summary: > + Add an action group. Accepts space-separated action group identifiers. The identifier can be the action group's name + or its resource ID. + - name: --webhook-properties + summary: > + Space-separated webhook properties in 'key[=value]' format. These properties are associated with the action groups + added in this command. + description: > + For any webhook receiver in these action group, this data is appended to the webhook payload. To attach different webhook + properties to different action groups, add the action groups in separate update-action commands. + examples: + - summary: Create an alert with default settings. + command: > + az monitor activity-log alert create -n {AlertName} -g {ResourceGroup} + - summary: Create an alert with condition about error level service health log. + command: > + az monitor activity-log alert create -n {AlertName} -g {ResourceGroup} \ + --condition category=ServiceHealth and level=Error + - summary: Create an alert with an action group and specify webhook properties. + command: > + az monitor activity-log alert create -n {AlertName} -g {ResourceGroup} \ + -a /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/microsoft.insights/actionGroups/{ActionGroup} \ + -w usage=test owner=jane + - summary: Create an alert which is initially disabled. + command: > + az monitor activity-log alert create -n {AlertName} -g {ResourceGroup} --disable +- command: + name: monitor activity-log alert update + summary: Update the details of this activity log alert + arguments: + - name: --description + summary: A description of this activity log alert. + - name: --condition + summary: The conditional expression that will cause the alert to activate. The format is FIELD=VALUE[ and FIELD=VALUE...]. + description: > + The possible values for the field are 'resourceId', 'category', 'caller', 'level', 'operationName', 'resourceGroup', + 'resourceProvider', 'status', 'subStatus', 'resourceType', or anything beginning with 'properties.'. + examples: + - summary: Update the condition + command: > + az monitor activity-log alert update -n {AlertName} -g {ResourceGroup} \ + --condition category=ServiceHealth and level=Error + - summary: Disable an alert + command: > + az monitor activity-log alert update -n {AlertName} -g {ResourceGroup} --enable false +- group: + name: monitor activity-log alert action-group + summary: Manage action groups for activity log alerts +- command: + name: monitor activity-log alert action-group add + summary: Add action groups to this activity log alert. It can also be used to overwrite existing webhook properties of particular action groups. + arguments: + - name: --name + summary: Name of the activity log alerts + - name: --action-group + summary: The names or the resource ids of the action groups to be added. + - name: --reset + summary: Remove all the existing action groups before add new conditions. + - name: --webhook-properties + summary: > + Space-separated webhook properties in 'key[=value]' format. These properties will be associated with + the action groups added in this command. + description: > + For any webhook receiver in these action group, these data are appended to the webhook payload. + To attach different webhook properties to different action groups, add the action groups in separate update-action commands. + - name: --strict + summary: Fails the command if an action group to be added will change existing webhook properties. + examples: + - summary: Add an action group and specify webhook properties. + command: | + az monitor activity-log alert action-group add -n {AlertName} -g {ResourceGroup} \ + --action /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/microsoft.insights/actionGroups/{ActionGroup} \ + --webhook-properties usage=test owner=jane + - summary: Overwite an existing action group's webhook properties. + command: | + az monitor activity-log alert action-group add -n {AlertName} -g {ResourceGroup} \ + -a /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/microsoft.insights/actionGroups/{ActionGroup} \ + --webhook-properties usage=test owner=john + - summary: Remove webhook properties from an existing action group. + command: | + az monitor activity-log alert action-group add -n {AlertName} -g {ResourceGroup} \ + -a /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/microsoft.insights/actionGroups/{ActionGroup} + - summary: Add new action groups but prevent the command from accidently overwrite existing webhook properties + command: | + az monitor activity-log alert action-group add -n {AlertName} -g {ResourceGroup} --strict \ + --action-group {ResourceIDList} +- command: + name: monitor activity-log alert action-group remove + summary: Remove action groups from this activity log alert + arguments: + - name: --name + summary: Name of the activity log alerts + - name: --action-group + summary: The names or the resource ids of the action groups to be added. +- group: + name: monitor activity-log alert scope + summary: Manage scopes for activity log alerts +- command: + name: monitor activity-log alert scope add + summary: Add scopes to this activity log alert. + arguments: + - name: --name + summary: Name of the activity log alerts + - name: --scope + summary: The scopes to add + - name: --reset + summary: Remove all the existing scopes before add new scopes. +- command: + name: monitor activity-log alert scope remove + summary: Removes scopes from this activity log alert. + arguments: + - name: --name + summary: Name of the activity log alerts + - name: --scope + summary: The scopes to remove +- command: + name: monitor activity-log list + summary: List and query activity log events. + arguments: + - name: --correlation-id + summary: Correlation ID to query. + - name: --resource-id + summary: ARM ID of a resource. + - name: --namespace + summary: Resource provider namespace. + - name: --caller + summary: Caller to query for, such as an e-mail address or service principal ID. + - name: --status + summary: > + Status to query for (ex: Failed) + - name: --max-events + summary: Maximum number of records to return. + - name: --select + summary: Space-separated list of properties to return. + - name: --offset + summary: > + Time offset of the query range, in ##d##h format. + description: > + Can be used with either --start-time or --end-time. If used with --start-time, then + the end time will be calculated by adding the offset. If used with --end-time (default), then + the start time will be calculated by subtracting the offset. If --start-time and --end-time are + provided, then --offset will be ignored. + examples: + - summary: List all events from July 1st, looking forward one week. + command: az monitor activity-log list --start-time 2018-07-01 --offset 7d + - summary: List events within the past six hours based on a correlation ID. + command: az monitor activity-log list --correlation-id b5eac9d2-e829-4c9a-9efb-586d19417c5f + - summary: List events within the past hour based on resource group. + command: az monitor activity-log list -g {ResourceGroup} --offset 1h +- command: + name: monitor activity-log list-categories + summary: List the event categories of activity logs. diff --git a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/help.yaml b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/help.yaml new file mode 100644 index 00000000000..52c835357f8 --- /dev/null +++ b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/help.yaml @@ -0,0 +1,3223 @@ +version: 1 +content: +- group: + name: network + summary: Manage Azure Network resources. +- command: + name: network list-usages + summary: List the number of network resources in a region that are used against a subscription quota. + examples: + - summary: List the provisioned network resources in East US region within a subscription. + command: az network list-usages --location eastus -o table +- group: + name: network application-gateway + summary: Manage application-level routing and load balancing services. + description: To learn more about Application Gateway, visit https://docs.microsoft.com/en-us/azure/application-gateway/application-gateway-create-gateway-cli +- command: + name: network application-gateway create + summary: Create an application gateway. + examples: + - summary: Create an application gateway with VMs as backend servers. + command: | + az network application-gateway create -g MyResourceGroup -n MyAppGateway --capacity 2 --sku Standard_Medium \ + --vnet-name MyVNet --subnet MySubnet --http-settings-cookie-based-affinity Enabled \ + --public-ip-address MyAppGatewayPublicIp --servers 10.0.0.4 10.0.0.5 +- command: + name: network application-gateway delete + summary: Delete an application gateway. + examples: + - summary: Delete an application gateway. + command: az network application-gateway delete -g MyResourceGroup -n MyAppGateway +- command: + name: network application-gateway list + summary: List application gateways. + examples: + - summary: List application gateways. + command: az network application-gateway list -g MyResourceGroup +- command: + name: network application-gateway show + summary: Get the details of an application gateway. + examples: + - summary: Get the details of an application gateway. + command: az network application-gateway show -g MyResourceGroup -n MyAppGateway +- command: + name: network application-gateway show-backend-health + summary: Get information on the backend health of an application gateway. + examples: + - summary: Show backend health of an application gateway. + command: az network application-gateway show-backend-health -g MyResourceGroup -n MyAppGateway +- command: + name: network application-gateway start + summary: Start an application gateway. + examples: + - summary: Start an application gateway. + command: az network application-gateway start -g MyResourceGroup -n MyAppGateway +- command: + name: network application-gateway stop + summary: Stop an application gateway. + examples: + - summary: Stop an application gateway. + command: az network application-gateway stop -g MyResourceGroup -n MyAppGateway +- command: + name: network application-gateway update + summary: Update an application gateway. +- command: + name: network application-gateway wait + summary: Place the CLI in a waiting state until a condition of the application gateway is met. + examples: + - summary: Place the CLI in a waiting state until the application gateway is created. + command: az network application-gateway wait -g MyResourceGroup -n MyAppGateway --created +- group: + name: network application-gateway address-pool + summary: Manage address pools of an application gateway. +- command: + name: network application-gateway address-pool create + summary: Create an address pool. + examples: + - summary: Create an address pool with two endpoints. + command: | + az network application-gateway address-pool create -g MyResourceGroup \ + --gateway-name MyAppGateway -n MyAddressPool --servers 10.0.0.4 10.0.0.5 +- command: + name: network application-gateway address-pool delete + summary: Delete an address pool. + examples: + - summary: Delete an address pool. + command: az network application-gateway address-pool delete -g MyResourceGroup --gateway-name MyAppGateway -n MyAddressPool +- command: + name: network application-gateway address-pool list + summary: List address pools. + examples: + - summary: List address pools. + command: az network application-gateway address-pool list -g MyResourceGroup --gateway-name MyAppGateway +- command: + name: network application-gateway address-pool show + summary: Get the details of an address pool. + examples: + - summary: Get the details of an address pool. + command: az network application-gateway address-pool show -g MyResourceGroup --gateway-name MyAppGateway -n MyAddressPool +- command: + name: network application-gateway address-pool update + summary: Update an address pool. + examples: + - summary: Update an address pool, add server. + command: az network application-gateway address-pool update -g MyResourceGroup --gateway-name MyAppGateway \ -n MyAddressPool --servers 10.0.0.4 10.0.0.5 10.0.0.6 +- group: + name: network application-gateway auth-cert + summary: Manage authorization certificates of an application gateway. +- command: + name: network application-gateway auth-cert create + summary: Create an authorization certificate. + examples: + - summary: Create an authorization certificate. + command: | + az network application-gateway auth-cert create -g MyResourceGroup --gateway-name MyAppGateway \ + -n MyAuthCert --cert-file /path/to/cert/file +- command: + name: network application-gateway auth-cert delete + summary: Delete an authorization certificate. + examples: + - summary: Delete an authorization certificate. + command: az network application-gateway auth-cert delete -g MyResourceGroup --gateway-name MyAppGateway -n MyAuthCert +- command: + name: network application-gateway auth-cert list + summary: List authorization certificates. + examples: + - summary: List authorization certificates. + command: az network application-gateway auth-cert list -g MyResourceGroup --gateway-name MyAppGateway +- command: + name: network application-gateway auth-cert show + summary: Show an authorization certificate. + examples: + - summary: Show an authorization certificate. + command: az network application-gateway auth-cert show -g MyResourceGroup --gateway-name MyAppGateway -n MyAuthCert +- command: + name: network application-gateway auth-cert update + summary: Update an authorization certificate. + examples: + - summary: Update authorization certificates to use a new cert file. + command: az network application-gateway auth-cert update -g MyResourceGroup --gateway-name MyAppGateway \ -n MyAuthCert --cert-file /path/to/new/cert/file +- group: + name: network application-gateway frontend-ip + summary: Manage frontend IP addresses of an application gateway. +- command: + name: network application-gateway frontend-ip create + summary: Create a frontend IP address. + examples: + - summary: Create a frontend IP address. + command: | + az network application-gateway frontend-ip create -g MyResourceGroup --gateway-name MyAppGateway \ + -n MyFrontendIp --public-ip-address MyPublicIpAddress +- command: + name: network application-gateway frontend-ip delete + summary: Delete a frontend IP address. + examples: + - summary: Delete a frontend IP address. + command: az network application-gateway frontend-ip delete -g MyResourceGroup --gateway-name MyAppGateway -n MyFrontendIp +- command: + name: network application-gateway frontend-ip list + summary: List frontend IP addresses. + examples: + - summary: List frontend IP addresses. + command: az network application-gateway frontend-ip list -g MyResourceGroup --gateway-name MyAppGateway +- command: + name: network application-gateway frontend-ip show + summary: Get the details of a frontend IP address. + examples: + - summary: Get the details of a frontend IP address. + command: az network application-gateway frontend-ip show -g MyResourceGroup --gateway-name MyAppGateway -n MyFrontendIp +- command: + name: network application-gateway frontend-ip update + summary: Update a frontend IP address. + examples: + - summary: Update a frontend IP address to use a new IP address. + command: az network application-gateway frontend-ip update -g MyResourceGroup --gateway-name MyAppGateway \ -n MyFrontendIp --public-ip-address MyNewPublicIpAddress +- group: + name: network application-gateway frontend-port + summary: Manage frontend ports of an application gateway. +- command: + name: network application-gateway frontend-port create + summary: Create a frontend port. + examples: + - summary: Create a frontend port. + command: | + az network application-gateway frontend-port create -g MyResourceGroup --gateway-name MyAppGateway \ + -n MyFrontendPort --port 8080 +- command: + name: network application-gateway frontend-port delete + summary: Delete a frontend port. + examples: + - summary: Delete a frontend port. + command: az network application-gateway frontend-port delete -g MyResourceGroup --gateway-name MyAppGateway -n MyFrontendPort +- command: + name: network application-gateway frontend-port list + summary: List frontend ports. + examples: + - summary: List frontend ports. + command: az network application-gateway frontend-port list -g MyResourceGroup --gateway-name MyAppGateway +- command: + name: network application-gateway frontend-port show + summary: Get the details of a frontend port. + examples: + - summary: Get the details of a frontend port. + command: az network application-gateway frontend-port show -g MyResourceGroup --gateway-name MyAppGateway -n MyFrontendPort +- command: + name: network application-gateway frontend-port update + summary: Update a frontend port. + examples: + - summary: Update a frontend port to use a different port. + command: | + az network application-gateway frontend-port update -g MyResourceGroup --gateway-name MyAppGateway \ + -n MyFrontendPort --port 8081 +- group: + name: network application-gateway http-listener + summary: Manage HTTP listeners of an application gateway. +- command: + name: network application-gateway http-listener create + summary: Create an HTTP listener. + examples: + - summary: Create an HTTP listener. + command: | + az network application-gateway http-listener create -g MyResourceGroup --gateway-name MyAppGateway \ + --frontend-port MyFrontendPort -n MyHttpListener --frontend-ip MyAppGatewayPublicIp +- command: + name: network application-gateway http-listener delete + summary: Delete an HTTP listener. + examples: + - summary: Delete an HTTP listener. + command: az network application-gateway http-listener delete -g MyResourceGroup --gateway-name MyAppGateway -n MyHttpListener +- command: + name: network application-gateway http-listener list + summary: List HTTP listeners. + examples: + - summary: List HTTP listeners. + command: az network application-gateway http-listener list -g MyResourceGroup --gateway-name MyAppGateway +- command: + name: network application-gateway http-listener show + summary: Get the details of an HTTP listener. + examples: + - summary: Get the details of an HTTP listener. + command: az network application-gateway http-listener show -g MyResourceGroup --gateway-name MyAppGateway -n MyHttpListener +- command: + name: network application-gateway http-listener update + summary: Update an HTTP listener. + examples: + - summary: Update an HTTP listener to use a different hostname. + command: | + az network application-gateway http-listener update -g MyResourceGroup --gateway-name MyAppGateway \ + -n MyHttpListener --host-name www.mynewhost.com +- group: + name: network application-gateway http-settings + summary: Manage HTTP settings of an application gateway. +- command: + name: network application-gateway http-settings create + summary: Create HTTP settings. + examples: + - summary: Create HTTP settings. + command: | + az network application-gateway http-settings create -g MyResourceGroup --gateway-name MyAppGateway \ + -n MyHttpSettings --port 80 --protocol Http --cookie-based-affinity Disabled --timeout 30 +- command: + name: network application-gateway http-settings delete + summary: Delete HTTP settings. + examples: + - summary: Delete HTTP settings. + command: az network application-gateway http-settings delete -g MyResourceGroup --gateway-name MyAppGateway -n MyHttpSettings +- command: + name: network application-gateway http-settings list + summary: List HTTP settings. + examples: + - summary: List HTTP settings. + command: az network application-gateway http-settings list -g MyResourceGroup --gateway-name MyAppGateway +- command: + name: network application-gateway http-settings show + summary: Get the details of a gateway's HTTP settings. + examples: + - summary: Get the details of a gateway's HTTP settings. + command: az network application-gateway http-settings show -g MyResourceGroup --gateway-name MyAppGateway -n MyHttpSettings +- command: + name: network application-gateway http-settings update + summary: Update HTTP settings. + examples: + - summary: Update HTTP settings to use a new probe. + command: | + az network application-gateway http-settings update -g MyResourceGroup --gateway-name MyAppGateway \ + -n MyHttpSettings --probe MyNewProbe +- group: + name: network application-gateway probe + summary: Manage probes to gather and evaluate information on a gateway. +- command: + name: network application-gateway probe create + summary: Create a probe. + examples: + - summary: Create an application gateway probe. + command: | + az network application-gateway probe create -g MyResourceGroup --gateway-name MyAppGateway \ + -n MyProbe --protocol https --host 127.0.0.1 --path /path/to/probe +- command: + name: network application-gateway probe delete + summary: Delete a probe. + examples: + - summary: Delete a probe. + command: az network application-gateway probe delete -g MyResourceGroup --gateway-name MyAppGateway -n MyProbe +- command: + name: network application-gateway probe list + summary: List probes. + examples: + - summary: List probes. + command: az network application-gateway probe list -g MyResourceGroup --gateway-name MyAppGateway +- command: + name: network application-gateway probe show + summary: Get the details of a probe. + examples: + - summary: Get the details of a probe. + command: az network application-gateway probe show -g MyResourceGroup --gateway-name MyAppGateway -n MyProbe +- command: + name: network application-gateway probe update + summary: Update a probe. + examples: + - summary: Update an application gateway probe with a timeout of 60 seconds. + command: | + az network application-gateway probe update -g MyResourceGroup --gateway-name MyAppGateway \ + -n MyProbe --timeout 60 +- group: + name: network application-gateway redirect-config + summary: Manage redirect configurations. +- command: + name: network application-gateway redirect-config create + summary: Create a redirect configuration. + examples: + - summary: Create a redirect configuration to a http-listener called MyBackendListener. + command: | + az network application-gateway redirect-config create -g MyResourceGroup \ + --gateway-name MyAppGateway -n MyRedirectConfig --type Permanent \ + --include-path true --include-query-string true --target-listener MyBackendListener +- command: + name: network application-gateway redirect-config delete + summary: Delete a redirect configuration. + examples: + - summary: Delete a redirect configuration. + command: az network application-gateway redirect-config delete -g MyResourceGroup \ --gateway-name MyAppGateway -n MyRedirectConfig +- command: + name: network application-gateway redirect-config list + summary: List redirect configurations. + examples: + - summary: List redirect configurations. + command: az network application-gateway redirect-config list -g MyResourceGroup --gateway-name MyAppGateway +- command: + name: network application-gateway redirect-config show + summary: Get the details of a redirect configuration. + examples: + - summary: Get the details of a redirect configuration. + command: az network application-gateway redirect-config show -g MyResourceGroup --gateway-name MyAppGateway -n MyRedirectConfig +- command: + name: network application-gateway redirect-config update + summary: Update a redirect configuration. + examples: + - summary: Update a redirect configuration to a different http-listener. + command: | + az network application-gateway redirect-config update -g MyResourceGroup --gateway-name MyAppGateway \ + -n MyRedirectConfig --type Permanent --target-listener MyNewBackendListener +- group: + name: network application-gateway rule + summary: Evaluate probe information and define routing rules. + description: > + For more information, visit, https://docs.microsoft.com/en-us/azure/application-gateway/application-gateway-customize-waf-rules-cli +- command: + name: network application-gateway rule create + summary: Create a rule. + description: Rules are executed in the order in which they are created. + examples: + - summary: Create a basic rule. + command: | + az network application-gateway rule create -g MyResourceGroup --gateway-name MyAppGateway \ + -n MyRule --http-listener MyBackendListener --rule-type Basic --address-pool MyAddressPool --http-settings MyHttpSettings +- command: + name: network application-gateway rule delete + summary: Delete a rule. + examples: + - summary: Delete a rule. + command: az network application-gateway rule delete -g MyResourceGroup --gateway-name MyAppGateway -n MyRule +- command: + name: network application-gateway rule list + summary: List rules. + examples: + - summary: List rules. + command: az network application-gateway rule list -g MyResourceGroup --gateway-name MyAppGateway +- command: + name: network application-gateway rule show + summary: Get the details of a rule. + examples: + - summary: Get the details of a rule. + command: az network application-gateway rule show -g MyResourceGroup --gateway-name MyAppGateway -n MyRule +- command: + name: network application-gateway rule update + summary: Update a rule. + examples: + - summary: Update a rule use a new HTTP listener. + command: | + az network application-gateway rule update -g MyResourceGroup --gateway-name MyAppGateway \ + -n MyRule --http-listener MyNewBackendListener +- group: + name: network application-gateway ssl-cert + summary: Manage SSL certificates of an application gateway. + description: For more information visit https://docs.microsoft.com/en-us/azure/application-gateway/application-gateway-ssl-cli +- command: + name: network application-gateway ssl-cert create + summary: Upload an SSL certificate. + examples: + - summary: Upload an SSL certificate. + command: | + az network application-gateway ssl-cert create -g MyResourceGroup --gateway-name MyAppGateway \ + -n MySslCert --cert-file \path\to\cert\file --cert-password Abc123 +- command: + name: network application-gateway ssl-cert delete + summary: Delete an SSL certificate. + examples: + - summary: Delete an SSL certificate. + command: az network application-gateway ssl-cert delete -g MyResourceGroup --gateway-name MyAppGateway -n MySslCert +- command: + name: network application-gateway ssl-cert list + summary: List SSL certificates. + examples: + - summary: List SSL certificates. + command: az network application-gateway ssl-cert list -g MyResourceGroup --gateway-name MyAppGateway +- command: + name: network application-gateway ssl-cert show + summary: Get the details of an SSL certificate. + examples: + - summary: Get the details of an SSL certificate. + command: az network application-gateway ssl-cert show -g MyResourceGroup --gateway-name MyAppGateway -n MySslCert +- command: + name: network application-gateway ssl-cert update + summary: Update an SSL certificate. + examples: + - summary: Change a gateway SSL certificate and password. + command: | + az network application-gateway ssl-cert update -g MyResourceGroup --gateway-name MyAppGateway -n MySslCert \ + --cert-file \path\to\new\cert\file --cert-password Abc123Abc123 +- group: + name: network application-gateway ssl-policy + summary: Manage the SSL policy of an application gateway. +- command: + name: network application-gateway ssl-policy list-options + summary: Lists available SSL options for configuring SSL policy. + examples: + - summary: List available SSL options for configuring SSL policy. + command: az network application-gateway ssl-policy list-options +- command: + name: network application-gateway ssl-policy set + summary: Update or clear SSL policy settings. + description: To view the predefined policies, use `az network application-gateway ssl-policy predefined list`. + arguments: + - name: --cipher-suites + value-sources: + - link: + command: az network application-gateway ssl-policy list-options + - name: --disabled-ssl-protocols + value-sources: + - link: + command: az network application-gateway ssl-policy list-options + - name: --min-protocol-version + value-sources: + - link: + command: az network application-gateway ssl-policy list-options + examples: + - summary: Set a predefined SSL policy. + command: | + az network application-gateway ssl-policy set -g MyResourceGroup --gateway-name MyAppGateway \ + -n AppGwSslPolicy20170401S --policy-type Predefined + - summary: Set a custom SSL policy with TLSv1_2 and the cipher suites below. + command: | + az network application-gateway ssl-policy set -g MyResourceGroup --gateway-name MyAppGateway \ + --policy-type Custom --min-protocol-version TLSv1_2 \ + --cipher-suites TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 TLS_RSA_WITH_AES_128_GCM_SHA256 +- command: + name: network application-gateway ssl-policy show + summary: Get the details of gateway's SSL policy settings. + examples: + - summary: Get the details of a gateway's SSL policy settings. + command: az network application-gateway ssl-policy show -g MyResourceGroup --gateway-name MyAppGateway +- group: + name: network application-gateway ssl-policy predefined + summary: Get information on predefined SSL policies. +- command: + name: network application-gateway ssl-policy predefined list + summary: Lists all SSL predefined policies for configuring SSL policy. + examples: + - summary: Lists all SSL predefined policies for configuring SSL policy. + command: az network application-gateway ssl-policy predefined list +- command: + name: network application-gateway ssl-policy predefined show + summary: Gets SSL predefined policy with the specified policy name. + examples: + - summary: Gets SSL predefined policy with the specified policy name. + command: az network application-gateway ssl-policy predefined show -n AppGwSslPolicy20170401 +- group: + name: network application-gateway root-cert + summary: Manage trusted root certificates of an application gateway. +- command: + name: network application-gateway root-cert create + summary: Upload a trusted root certificate. +- command: + name: network application-gateway root-cert delete + summary: Delete a trusted root certificate. + examples: + - summary: Delete a trusted root certificate. + command: az network application-gateway root-cert delete -g MyResourceGroup --gateway-name MyAppGateway -n MyRootCert +- command: + name: network application-gateway root-cert list + summary: List trusted root certificates. + examples: + - summary: List trusted root certificates. + command: az network application-gateway root-cert list -g MyResourceGroup --gateway-name MyAppGateway +- command: + name: network application-gateway root-cert show + summary: Get the details of a trusted root certificate. + examples: + - summary: Get the details of a trusted root certificate. + command: az network application-gateway root-cert show -g MyResourceGroup --gateway-name MyAppGateway -n MyRootCert +- command: + name: network application-gateway root-cert update + summary: Update a trusted root certificate. +- group: + name: network application-gateway url-path-map + summary: Manage URL path maps of an application gateway. +- command: + name: network application-gateway url-path-map create + summary: Create a URL path map. + description: > + The map must be created with at least one rule. This command requires the creation of the + first rule at the time the map is created. To learn more + visit https://docs.microsoft.com/en-us/azure/application-gateway/application-gateway-create-url-route-cli + examples: + - summary: Create a URL path map with a rule. + command: | + az network application-gateway url-path-map create -g MyResourceGroup --gateway-name MyAppGateway \ + -n MyUrlPathMap --rule-name MyUrlPathMapRule1 --paths /mypath1/* --address-pool MyAddressPool \ + --default-address-pool MyAddressPool --http-settings MyHttpSettings --default-http-settings MyHttpSettings +- command: + name: network application-gateway url-path-map delete + summary: Delete a URL path map. + examples: + - summary: Delete a URL path map. + command: az network application-gateway url-path-map delete -g MyResourceGroup --gateway-name MyAppGateway -n MyUrlPathMap +- command: + name: network application-gateway url-path-map list + summary: List URL path maps. + examples: + - summary: List URL path maps. + command: az network application-gateway url-path-map list -g MyResourceGroup --gateway-name MyAppGateway +- command: + name: network application-gateway url-path-map show + summary: Get the details of a URL path map. + examples: + - summary: Get the details of a URL path map. + command: az network application-gateway url-path-map show -g MyResourceGroup --gateway-name MyAppGateway -n MyUrlPathMap +- command: + name: network application-gateway url-path-map update + summary: Update a URL path map. + examples: + - summary: Update a URL path map to use new default HTTP settings. + command: | + az network application-gateway url-path-map update -g MyResourceGroup --gateway-name MyAppGateway \ + -n MyUrlPathMap --default-http-settings MyNewHttpSettings +- group: + name: network application-gateway url-path-map rule + summary: Manage the rules of a URL path map. +- command: + name: network application-gateway url-path-map rule create + summary: Create a rule for a URL path map. + examples: + - summary: Create a rule for a URL path map. + command: | + az network application-gateway url-path-map rule create -g MyResourceGroup \ + --gateway-name MyAppGateway -n MyUrlPathMapRule2 --path-map-name MyUrlPathMap \ + --paths /mypath2/* --address-pool MyAddressPool --http-settings MyHttpSettings +- command: + name: network application-gateway url-path-map rule delete + summary: Delete a rule of a URL path map. + examples: + - summary: Delete a rule of a URL path map. + command: | + az network application-gateway url-path-map rule delete -g MyResourceGroup --gateway-name MyAppGateway \ + --path-map-name MyUrlPathMap -n MyUrlPathMapRule2 +- group: + name: network application-gateway waf-config + summary: Configure the settings of a web application firewall. + description: > + These commands are only applicable to application gateways with an SKU type of WAF. To learn + more, visit https://docs.microsoft.com/en-us/azure/application-gateway/application-gateway-web-application-firewall-cli +- command: + name: network application-gateway waf-config list-rule-sets + summary: Get information on available WAF rule sets, rule groups, and rule IDs. + arguments: + - name: --group + summary: > + List rules for the specified rule group. Use `*` to list rules for all groups. + Omit to suppress listing individual rules. + - name: --type + summary: Rule set type to list. Omit to list all types. + - name: --version + summary: Rule set version to list. Omit to list all versions. + examples: + - summary: List available rule groups in OWASP type rule sets. + command: az network application-gateway waf-config list-rule-sets --type OWASP + - summary: List available rules in the OWASP 3.0 rule set. + command: az network application-gateway waf-config list-rule-sets --group '*' --type OWASP --version 3.0 + - summary: List available rules in the `crs_35_bad_robots` rule group. + command: az network application-gateway waf-config list-rule-sets --group crs_35_bad_robots + - summary: List available rules in table foramt. + command: az network application-gateway waf-config list-rule-sets -o table +- command: + name: network application-gateway waf-config set + summary: Update the firewall configuration of a web application. + description: > + This command is only applicable to application gateways with an SKU type of WAF. To learn + more, visit https://docs.microsoft.com/en-us/azure/application-gateway/application-gateway-web-application-firewall-cli + arguments: + - name: --rule-set-type + summary: Rule set type. + value-sources: + - link: + command: az network application-gateway waf-config list-rule-sets + - name: --rule-set-version + summary: Rule set version. + value-sources: + - link: + command: az network application-gateway waf-config list-rule-sets + - name: --disabled-rule-groups + summary: Space-separated list of rule groups to disable. To disable individual rules, use `--disabled-rules`. + value-sources: + - link: + command: az network application-gateway waf-config list-rule-sets + - name: --disabled-rules + summary: Space-separated list of rule IDs to disable. + value-sources: + - link: + command: az network application-gateway waf-config list-rule-sets + - name: --exclusion + summary: Add an exclusion expression to the WAF check. + description: | + Usage: --exclusion VARIABLE OPERATOR VALUE + + Multiple exclusions can be specified by using more than one `--exclusion` argument. + examples: + - summary: Configure WAF on an application gateway in detection mode with default values + command: | + az network application-gateway waf-config set -g MyResourceGroup --gateway-name MyAppGateway \ + --enabled true --firewall-mode Detection --rule-set-version 3.0 + - summary: Disable rules for validation of request body parsing and SQL injection. + command: | + az network application-gateway waf-config set -g MyResourceGroup --gateway-name MyAppGateway \ + --enabled true --rule-set-type OWASP --rule-set-version 3.0 \ + --disabled-rule-groups REQUEST-942-APPLICATION-ATTACK-SQLI \ + --disabled-rules 920130 920140 + - summary: Configure WAF on an application gateway with exclusions. + command: | + az network application-gateway waf-config set -g MyResourceGroup --gateway-name MyAppGateway \ + --enabled true --firewall-mode Detection --rule-set-version 3.0 \ + --exclusion "RequestHeaderNames StartsWith x-header" \ + --exclusion "RequestArgNames Equals IgnoreThis" +- command: + name: network application-gateway waf-config show + summary: Get the firewall configuration of a web application. + examples: + - summary: Get the firewall configuration of a web application. + command: az network application-gateway waf-config show -g MyResourceGroup --gateway-name MyAppGateway +- group: + name: network asg + summary: Manage application security groups (ASGs). + description: > + You can configure network security as a natural extension of an application's structure, ASG allows + you to group virtual machines and define network security policies based on those groups. You can specify an + application security group as the source and destination in a NSG security rule. For more information + visit https://docs.microsoft.com/en-us/azure/virtual-network/create-network-security-group-preview +- command: + name: network asg create + summary: Create an application security group. + arguments: + - name: --name + summary: Name of the new application security group resource. + examples: + - summary: Create an application security group. + command: az network asg create -g MyResourceGroup -n MyAsg --tags MyWebApp, CostCenter=Marketing +- command: + name: network asg delete + summary: Delete an application security group. + examples: + - summary: Delete an application security group. + command: az network asg delete -g MyResourceGroup -n MyAsg +- command: + name: network asg list + summary: List all application security groups in a subscription. + examples: + - summary: List all application security groups in a subscription. + command: az network asg list +- command: + name: network asg show + summary: Get details of an application security group. + examples: + - summary: Get details of an application security group. + command: az network asg show -g MyResourceGroup -n MyAsg +- command: + name: network asg update + summary: Update an application security group. + description: > + This command can only be used to update the tags for an application security group. + Name and resource group are immutable and cannot be updated. + examples: + - summary: Update an application security group with a modified tag value. + command: az network asg update -g MyResourceGroup -n MyAsg --set tags.CostCenter=MyBusinessGroup +- group: + name: network ddos-protection + summary: Manage DDoS Protection Plans. +- command: + name: network ddos-protection create + summary: Create a DDoS protection plan. + arguments: + - name: --vnets + description: > + This parameter can only be used if all the VNets are within the same subscription as + the DDoS protection plan. If this is not the case, set the protection plan on the VNet + directly using the `az network vnet update` command. + examples: + - summary: Create a DDoS protection plan. + command: az network ddos-protection create -g MyResourceGroup -n MyDdosPlan +- command: + name: network ddos-protection delete + summary: Delete a DDoS protection plan. + examples: + - summary: Delete a DDoS protection plan. + command: az network ddos-protection delete -g MyResourceGroup -n MyDdosPlan +- command: + name: network ddos-protection list + summary: List DDoS protection plans. + examples: + - summary: List DDoS protection plans + command: az network ddos-protection list +- command: + name: network ddos-protection show + summary: Show details of a DDoS protection plan. + examples: + - summary: Show details of a DDoS protection plan. + command: az network ddos-protection show -g MyResourceGroup -n MyDdosPlan +- command: + name: network ddos-protection update + summary: Update a DDoS protection plan. + arguments: + - name: --vnets + description: > + This parameter can only be used if all the VNets are within the same subscription as + the DDoS protection plan. If this is not the case, set the protection plan on the VNet + directly using the `az network vnet update` command. + examples: + - summary: Add a Vnet to a DDoS protection plan in the same subscription. + command: az network ddos-protection update -g MyResourceGroup -n MyDdosPlan --vnets MyVnet +- group: + name: network dns + summary: Manage DNS domains in Azure. +- group: + name: network dns record-set + summary: Manage DNS records and record sets. +- command: + name: network dns record-set list + summary: List all record sets within a DNS zone. + examples: + - summary: List all "@" record sets within this zone. + command: az network dns record-set list -g MyResourceGroup -z www.mysite.com --query "[?name=='@']" +- group: + name: network dns record-set a + summary: Manage DNS A records. +- command: + name: network dns record-set a add-record + summary: Add an A record. + examples: + - summary: Add an A record. + command: | + az network dns record-set a add-record -g MyResourceGroup -z www.mysite.com \ + -n MyRecordSet -a MyIpv4Address +- command: + name: network dns record-set a create + summary: Create an empty A record set. + examples: + - summary: Create an empty A record set. + command: az network dns record-set a create -g MyResourceGroup -z www.mysite.com -n MyRecordSet +- command: + name: network dns record-set a delete + summary: Delete an A record set and all associated records. + examples: + - summary: Delete an A record set and all associated records. + command: az network dns record-set a delete -g MyResourceGroup -z www.mysite.com -n MyRecordSet +- command: + name: network dns record-set a list + summary: List all A record sets in a zone. + examples: + - summary: List all A record sets in a zone. + command: az network dns record-set a list -g MyResourceGroup -z www.mysite.com +- command: + name: network dns record-set a remove-record + summary: Remove an A record from its record set. + description: > + By default, if the last record in a set is removed, the record set is deleted. + To retain the empty record set, include --keep-empty-record-set. + examples: + - summary: Remove an A record from its record set. + command: | + az network dns record-set a remove-record -g MyResourceGroup -z www.mysite.com \ + -n MyRecordSet -a MyIpv4Address +- command: + name: network dns record-set a show + summary: Get the details of an A record set. + examples: + - summary: Get the details of an A record set. + command: az network dns record-set a show -g MyResourceGroup -n MyRecordSet -z www.mysite.com +- command: + name: network dns record-set a update + summary: Update an A record set. + examples: + - summary: Update an A record set. + command: | + az network dns record-set a update -g MyResourceGroup -n MyRecordSet \ + -z www.mysite.com --metadata owner=WebTeam +- group: + name: network dns record-set aaaa + summary: Manage DNS AAAA records. +- command: + name: network dns record-set aaaa add-record + summary: Add an AAAA record. + examples: + - summary: Add an AAAA record. + command: | + az network dns record-set aaaa add-record -g MyResourceGroup -z www.mysite.com \ + -n MyRecordSet -a MyIpv6Address +- command: + name: network dns record-set aaaa create + summary: Create an empty AAAA record set. + examples: + - summary: Create an empty AAAA record set. + command: az network dns record-set aaaa create -g MyResourceGroup -z www.mysite.com -n MyRecordSet +- command: + name: network dns record-set aaaa delete + summary: Delete an AAAA record set and all associated records. + examples: + - summary: Delete an AAAA record set and all associated records. + command: az network dns record-set aaaa delete -g MyResourceGroup -z www.mysite.com -n MyRecordSet +- command: + name: network dns record-set aaaa list + summary: List all AAAA record sets in a zone. + examples: + - summary: List all AAAA record sets in a zone. + command: az network dns record-set aaaa list -g MyResourceGroup -z www.mysite.com +- command: + name: network dns record-set aaaa remove-record + summary: Remove AAAA record from its record set. + description: > + By default, if the last record in a set is removed, the record set is deleted. + To retain the empty record set, include --keep-empty-record-set. + examples: + - summary: Remove an AAAA record from its record set. + command: | + az network dns record-set aaaa remove-record -g MyResourceGroup -z www.mysite.com \ + -n MyRecordSet -a MyIpv6Address +- command: + name: network dns record-set aaaa show + summary: Get the details of an AAAA record set. + examples: + - summary: Get the details of an AAAA record set. + command: az network dns record-set aaaa show -g MyResourceGroup -z www.mysite.com -n MyRecordSet +- command: + name: network dns record-set aaaa update + summary: Update an AAAA record set. + examples: + - summary: Update an AAAA record set. + command: | + az network dns record-set aaaa update -g MyResourceGroup -z www.mysite.com \ + -n MyRecordSet --metadata owner=WebTeam +- group: + name: network dns record-set caa + summary: Manage DNS CAA records. +- command: + name: network dns record-set caa add-record + summary: Add a CAA record. + examples: + - summary: Add a CAA record. + command: | + az network dns record-set caa add-record -g MyResourceGroup -z www.mysite.com \ + -n MyRecordSet --flags 0 --tag "issue" --value "ca.contoso.com" +- command: + name: network dns record-set caa create + summary: Create an empty CAA record set. + examples: + - summary: Create an empty CAA record set. + command: az network dns record-set caa create -g MyResourceGroup -z www.mysite.com -n MyRecordSet +- command: + name: network dns record-set caa delete + summary: Delete a CAA record set and all associated records. + examples: + - summary: Delete a CAA record set and all associated records. + command: az network dns record-set caa delete -g MyResourceGroup -z www.mysite.com -n MyRecordSet +- command: + name: network dns record-set caa list + summary: List all CAA record sets in a zone. + examples: + - summary: List all CAA record sets in a zone. + command: az network dns record-set caa list -g MyResourceGroup -z www.mysite.com +- command: + name: network dns record-set caa remove-record + summary: Remove a CAA record from its record set. + description: > + By default, if the last record in a set is removed, the record set is deleted. + To retain the empty record set, include --keep-empty-record-set. + examples: + - summary: Remove a CAA record from its record set. + command: | + az network dns record-set caa remove-record -g MyResourceGroup -z www.mysite.com \ + -n MyRecordSet --flags 0 --tag "issue" --value "ca.contoso.com" +- command: + name: network dns record-set caa show + summary: Get the details of a CAA record set. + examples: + - summary: Get the details of a CAA record set. + command: az network dns record-set caa show -g MyResourceGroup -z www.mysite.com -n MyRecordSet +- command: + name: network dns record-set caa update + summary: Update a CAA record set. + examples: + - summary: Update a CAA record set. + command: | + az network dns record-set caa update -g MyResourceGroup -z www.mysite.com \ + -n MyRecordSet --metadata owner=WebTeam +- group: + name: network dns record-set cname + summary: Manage DNS CNAME records. +- command: + name: network dns record-set cname create + summary: Create an empty CNAME record set. + examples: + - summary: Create an empty CNAME record set. + command: az network dns record-set cname create -g MyResourceGroup -z www.mysite.com -n MyRecordSet +- command: + name: network dns record-set cname delete + summary: Delete a CNAME record set and its associated record. + examples: + - summary: Delete a CNAME record set and its associated record. + command: az network dns record-set cname delete -g MyResourceGroup -z www.mysite.com -n MyRecordSet +- command: + name: network dns record-set cname list + summary: List the CNAME record set in a zone. + examples: + - summary: List the CNAME record set in a zone. + command: az network dns record-set cname list -g MyResourceGroup -z www.mysite.com +- command: + name: network dns record-set cname remove-record + summary: Remove a CNAME record from its record set. + description: > + By default, if the last record in a set is removed, the record set is deleted. + To retain the empty record set, include --keep-empty-record-set. + examples: + - summary: Remove a CNAME record from its record set. + command: | + az network dns record-set cname remove-record -g MyResourceGroup -z www.mysite.com \ + -n MyRecordSet -c www.contoso.com +- command: + name: network dns record-set cname set-record + summary: Set the value of a CNAME record. + examples: + - summary: Set the value of a CNAME record. + command: | + az network dns record-set cname set-record -g MyResourceGroup -z www.mysite.com \ + -n MyRecordSet -c www.contoso.com +- command: + name: network dns record-set cname show + summary: Get the details of a CNAME record set. + examples: + - summary: Get the details of a CNAME record set. + command: az network dns record-set cname show -g MyResourceGroup -z www.mysite.com -n MyRecordSet +- group: + name: network dns record-set mx + summary: Manage DNS MX records. +- command: + name: network dns record-set mx add-record + summary: Add an MX record. + examples: + - summary: Add an MX record. + command: | + az network dns record-set mx add-record -g MyResourceGroup -z www.mysite.com \ + -n MyRecordSet -e mail.mysite.com -p 10 +- command: + name: network dns record-set mx create + summary: Create an empty MX record set. + examples: + - summary: Create an empty MX record set. + command: az network dns record-set mx create -g MyResourceGroup -z www.mysite.com -n MyRecordSet +- command: + name: network dns record-set mx delete + summary: Delete an MX record set and all associated records. + examples: + - summary: Delete an MX record set and all associated records. + command: az network dns record-set mx delete -g MyResourceGroup -z www.mysite.com -n MyRecordSet +- command: + name: network dns record-set mx list + summary: List all MX record sets in a zone. + examples: + - summary: List all MX record sets in a zone. + command: az network dns record-set mx list -g MyResourceGroup -z www.mysite.com +- command: + name: network dns record-set mx remove-record + summary: Remove an MX record from its record set. + description: > + By default, if the last record in a set is removed, the record set is deleted. + To retain the empty record set, include --keep-empty-record-set. + examples: + - summary: Remove an MX record from its record set. + command: | + az network dns record-set mx remove-record -g MyResourceGroup -z www.mysite.com \ + -n MyRecordSet -e mail.mysite.com -p 10 +- command: + name: network dns record-set mx show + summary: Get the details of an MX record set. + examples: + - summary: Get the details of an MX record set. + command: az network dns record-set mx show -g MyResourceGroup -z www.mysite.com -n MyRecordSet +- command: + name: network dns record-set mx update + summary: Update an MX record set. + examples: + - summary: Update an MX record set. + command: | + az network dns record-set mx update -g MyResourceGroup -z www.mysite.com \ + -n MyRecordSet --metadata owner=WebTeam +- group: + name: network dns record-set ns + summary: Manage DNS NS records. +- command: + name: network dns record-set ns add-record + summary: Add an NS record. + examples: + - summary: Add an NS record. + command: | + az network dns record-set ns add-record -g MyResourceGroup -z www.mysite.com \ + -n MyRecordSet -d ns.mysite.com +- command: + name: network dns record-set ns create + summary: Create an empty NS record set. + examples: + - summary: Create an empty NS record set. + command: az network dns record-set ns create -g MyResourceGroup -z www.mysite.com -n MyRecordSet +- command: + name: network dns record-set ns delete + summary: Delete an NS record set and all associated records. + examples: + - summary: Delete an NS record set and all associated records. + command: az network dns record-set ns delete -g MyResourceGroup -z www.mysite.com -n MyRecordSet +- command: + name: network dns record-set ns list + summary: List all NS record sets in a zone. + examples: + - summary: List all NS record sets in a zone. + command: az network dns record-set ns list -g MyResourceGroup -z www.mysite.com +- command: + name: network dns record-set ns remove-record + summary: Remove an NS record from its record set. + description: > + By default, if the last record in a set is removed, the record set is deleted. + To retain the empty record set, include --keep-empty-record-set. + examples: + - summary: Remove an NS record from its record set. + command: | + az network dns record-set ns remove-record -g MyResourceGroup -z www.mysite.com \ + -n MyRecordSet -d ns.mysite.com +- command: + name: network dns record-set ns show + summary: Get the details of an NS record set. + examples: + - summary: Get the details of an NS record set. + command: az network dns record-set ns show -g MyResourceGroup -z www.mysite.com -n MyRecordSet +- command: + name: network dns record-set ns update + summary: Update an NS record set. + examples: + - summary: Update an NS record set. + command: | + az network dns record-set ns update -g MyResourceGroup -z www.mysite.com \ + -n MyRecordSet --metadata owner=WebTeam +- group: + name: network dns record-set ptr + summary: Manage DNS PTR records. +- command: + name: network dns record-set ptr add-record + summary: Add a PTR record. + examples: + - summary: Add a PTR record. + command: | + az network dns record-set ptr add-record -g MyResourceGroup -z www.mysite.com \ + -n MyRecordSet -d another.site.com +- command: + name: network dns record-set ptr create + summary: Create an empty PTR record set. + examples: + - summary: Create an empty PTR record set. + command: az network dns record-set ptr create -g MyResourceGroup -z www.mysite.com -n MyRecordSet +- command: + name: network dns record-set ptr delete + summary: Delete a PTR record set and all associated records. + examples: + - summary: Delete a PTR record set and all associated records. + command: az network dns record-set ptr delete -g MyResourceGroup -z www.mysite.com -n MyRecordSet +- command: + name: network dns record-set ptr list + summary: List all PTR record sets in a zone. + examples: + - summary: List all PTR record sets in a zone. + command: az network dns record-set ptr list -g MyResourceGroup -z www.mysite.com +- command: + name: network dns record-set ptr remove-record + summary: Remove a PTR record from its record set. + description: > + By default, if the last record in a set is removed, the record set is deleted. + To retain the empty record set, include --keep-empty-record-set. + examples: + - summary: Remove a PTR record from its record set. + command: | + az network dns record-set ptr remove-record -g MyResourceGroup -z www.mysite.com \ + -n MyRecordSet -d another.site.com +- command: + name: network dns record-set ptr show + summary: Get the details of a PTR record set. + examples: + - summary: Get the details of a PTR record set. + command: az network dns record-set ptr show -g MyResourceGroup -z www.mysite.com -n MyRecordSet +- command: + name: network dns record-set ptr update + summary: Update a PTR record set. + examples: + - summary: Update a PTR record set. + command: | + az network dns record-set ptr update -g MyResourceGroup -z www.mysite.com \ + -n MyRecordSet --metadata owner=WebTeam +- group: + name: network dns record-set srv + summary: Manage DNS SRV records. +- command: + name: network dns record-set srv add-record + summary: Add an SRV record. + examples: + - summary: Add an SRV record. + command: | + az network dns record-set srv add-record -g MyResourceGroup -z www.mysite.com \ + -n MyRecordSet -t webserver.mysite.com -r 8081 -p 10 -w 10 +- command: + name: network dns record-set srv create + summary: Create an empty SRV record set. + examples: + - summary: Create an empty SRV record set. + command: | + az network dns record-set srv create -g MyResourceGroup -z www.mysite.com \ + -n MyRecordSet +- command: + name: network dns record-set srv delete + summary: Delete an SRV record set and all associated records. + examples: + - summary: Delete an SRV record set and all associated records. + command: az network dns record-set srv delete -g MyResourceGroup -z www.mysite.com -n MyRecordSet +- command: + name: network dns record-set srv list + summary: List all SRV record sets in a zone. + examples: + - summary: List all SRV record sets in a zone. + command: az network dns record-set srv list -g MyResourceGroup -z www.mysite.com +- command: + name: network dns record-set srv remove-record + summary: Remove an SRV record from its record set. + description: > + By default, if the last record in a set is removed, the record set is deleted. + To retain the empty record set, include --keep-empty-record-set. + examples: + - summary: Remove an SRV record from its record set. + command: | + az network dns record-set srv remove-record -g MyResourceGroup -z www.mysite.com \ + -n MyRecordSet -t webserver.mysite.com -r 8081 -p 10 -w 10 +- command: + name: network dns record-set srv show + summary: Get the details of an SRV record set. + examples: + - summary: Get the details of an SRV record set. + command: az network dns record-set srv show -g MyResourceGroup -z www.mysite.com -n MyRecordSet +- command: + name: network dns record-set srv update + summary: Update an SRV record set. + examples: + - summary: Update an SRV record set. + command: | + az network dns record-set srv update -g MyResourceGroup -z www.mysite.com \ + -n MyRecordSet --metadata owner=WebTeam +- group: + name: network dns record-set soa + summary: Manage a DNS SOA record. +- command: + name: network dns record-set soa show + summary: Get the details of an SOA record. + examples: + - summary: Get the details of an SOA record. + command: az network dns record-set soa show -g MyResourceGroup -z www.mysite.com +- command: + name: network dns record-set soa update + summary: Update properties of an SOA record. + examples: + - summary: Update properties of an SOA record. + command: | + az network dns record-set soa update -g MyResourceGroup -z www.mysite.com \ + -e myhostmaster.mysite.com +- group: + name: network dns record-set txt + summary: Manage DNS TXT records. +- command: + name: network dns record-set txt add-record + summary: Add a TXT record. + examples: + - summary: Add a TXT record. + command: | + az network dns record-set txt add-record -g MyResourceGroup -z www.mysite.com \ + -n MyRecordSet -v Owner=WebTeam +- command: + name: network dns record-set txt create + summary: Create an empty TXT record set. + examples: + - summary: Create an empty TXT record set. + command: az network dns record-set txt create -g MyResourceGroup -z www.mysite.com -n MyRecordSet +- command: + name: network dns record-set txt delete + summary: Delete a TXT record set and all associated records. + examples: + - summary: Delete a TXT record set and all associated records. + command: az network dns record-set txt delete -g MyResourceGroup -z www.mysite.com -n MyRecordSet +- command: + name: network dns record-set txt list + summary: List all TXT record sets in a zone. + examples: + - summary: List all TXT record sets in a zone. + command: az network dns record-set txt list -g MyResourceGroup -z www.mysite.com +- command: + name: network dns record-set txt remove-record + summary: Remove a TXT record from its record set. + description: > + By default, if the last record in a set is removed, the record set is deleted. + To retain the empty record set, include --keep-empty-record-set. + examples: + - summary: Remove a TXT record from its record set. + command: | + az network dns record-set txt remove-record -g MyResourceGroup -z www.mysite.com \ + -n MyRecordSet -v Owner=WebTeam +- command: + name: network dns record-set txt show + summary: Get the details of a TXT record set. + examples: + - summary: Get the details of a TXT record set. + command: az network dns record-set txt show -g MyResourceGroup -z www.mysite.com -n MyRecordSet +- command: + name: network dns record-set txt update + summary: Update a TXT record set. + examples: + - summary: Update a TXT record set. + command: | + az network dns record-set txt update -g MyResourceGroup -z www.mysite.com \ + -n MyRecordSet --metadata owner=WebTeam +- group: + name: network dns zone + summary: Manage DNS zones. +- command: + name: network dns zone create + summary: Create a DNS zone. + arguments: + - name: --if-none-match + summary: Only create a DNS zone if one doesn't exist that matches the given name. + examples: + - summary: Create a DNS zone using a fully qualified domain name. + command: > + az network dns zone create -g MyResourceGroup -n www.mysite.com +- command: + name: network dns zone delete + summary: Delete a DNS zone and all associated records. + examples: + - summary: Delete a DNS zone using a fully qualified domain name. + command: > + az network dns zone delete -g MyResourceGroup -n www.mysite.com +- command: + name: network dns zone export + summary: Export a DNS zone as a DNS zone file. + examples: + - summary: Export a DNS zone as a DNS zone file in tsv format. + command: > + az network dns zone export -g MyResourceGroup -n www.mysite.com -o mysite_com_zone.tsv +- command: + name: network dns zone import + summary: Create a DNS zone using a DNS zone file. + examples: + - summary: Import a local zone file into a DNS zone resource. + command: > + az network dns zone import -g MyResourceGroup -n MyZone -f /path/to/zone/file +- command: + name: network dns zone list + summary: List DNS zones. + examples: + - summary: List DNS zones in a resource group. + command: > + az network dns zone list -g MyResourceGroup +- command: + name: network dns zone show + summary: Get a DNS zone parameters. Does not show DNS records within the zone. + examples: + - summary: List DNS zones in a resource group. + command: > + az network dns zone show -g MyResourceGroup -n www.mysite.com +- command: + name: network dns zone update + summary: Update a DNS zone properties. Does not modify DNS records within the zone. + arguments: + - name: --if-match + summary: Update only if the resource with the same ETAG exists. + examples: + - summary: Update a DNS zone properties to change the user-defined value of a previously set tag. + command: > + az network dns zone update -g MyResourceGroup -n www.mysite.com --tags CostCenter=Marketing +- group: + name: network express-route + summary: Manage dedicated private network fiber connections to Azure. + description: > + To learn more about ExpressRoute circuits visit + https://docs.microsoft.com/en-us/azure/expressroute/howto-circuit-cli +- command: + name: network express-route create + summary: Create an ExpressRoute circuit. + arguments: + - name: --bandwidth + value-sources: + - link: + command: az network express-route list-service-providers + - name: --peering-location + value-sources: + - link: + command: az network express-route list-service-providers + - name: --provider + value-sources: + - link: + command: az network express-route list-service-providers + examples: + - summary: Create an ExpressRoute circuit. + command: | + az network express-route create --bandwidth 200 -n MyCircuit --peering-location "Silicon Valley" \ + -g MyResourceGroup --provider "Equinix" -l "West US" --sku-family MeteredData --sku-tier Standard +- command: + name: network express-route delete + summary: Delete an ExpressRoute circuit. + examples: + - summary: Delete an ExpressRoute circuit. + command: > + az network express-route delete -n MyCircuit -g MyResourceGroup +- command: + name: network express-route get-stats + summary: Get the statistics of an ExpressRoute circuit. + examples: + - summary: Get the statistics of an ExpressRoute circuit. + command: > + az network express-route get-stats -g MyResourceGroup -n MyCircuit +- command: + name: network express-route list + summary: List all ExpressRoute circuits for the current subscription. + examples: + - summary: List all ExpressRoute circuits for the current subscription. + command: > + az network express-route list -g MyResourceGroup +- command: + name: network express-route list-arp-tables + summary: Show the current Address Resolution Protocol (ARP) table of an ExpressRoute circuit. + examples: + - summary: Show the current Address Resolution Protocol (ARP) table of an ExpressRoute circuit. + command: | + az network express-route list-arp-tables -g MyResourceGroup -n MyCircuit \ + --path primary --peering-name AzurePrivatePeering +- command: + name: network express-route list-route-tables + summary: Show the current routing table of an ExpressRoute circuit peering. + examples: + - summary: Show the current routing table of an ExpressRoute circuit peering. + command: | + az network express-route list-route-tables -g MyResourceGroup -n MyCircuit \ + --path primary --peering-name AzurePrivatePeering +- command: + name: network express-route show + summary: Get the details of an ExpressRoute circuit. + examples: + - summary: Get the details of an ExpressRoute circuit. + command: > + az network express-route show -n MyCircuit -g MyResourceGroup +- command: + name: network express-route update + summary: Update settings of an ExpressRoute circuit. + examples: + - summary: Change the SKU of an ExpressRoute circuit from Standard to Premium. + command: > + az network express-route update -n MyCircuit -g MyResourceGroup --sku-tier Premium +- command: + name: network express-route list-service-providers + summary: List available ExpressRoute service providers. + examples: + - summary: List available ExpressRoute service providers. + command: az network express-route list-service-providers +- command: + name: network express-route wait + summary: Place the CLI in a waiting state until a condition of the ExpressRoute is met. + examples: + - summary: Pause executing next line of CLI script until the ExpressRoute circuit is successfully provisioned. + command: az network express-route wait -n MyCircuit -g MyResourceGroup --created +- group: + name: network express-route auth + summary: Manage authentication of an ExpressRoute circuit. + description: > + To learn more about ExpressRoute circuit authentication visit + https://docs.microsoft.com/en-us/azure/expressroute/howto-linkvnet-cli#connect-a-virtual-network-in-a-different-subscription-to-a-circuit +- command: + name: network express-route auth create + summary: Create a new link authorization for an ExpressRoute circuit. + examples: + - summary: Create a new link authorization for an ExpressRoute circuit. + command: > + az network express-route auth create --circuit-name MyCircuit -g MyResourceGroup -n MyAuthorization +- command: + name: network express-route auth delete + summary: Delete a link authorization of an ExpressRoute circuit. + examples: + - summary: Delete a link authorization of an ExpressRoute circuit. + command: > + az network express-route auth delete --circuit-name MyCircuit -g MyResourceGroup -n MyAuthorization +- command: + name: network express-route auth list + summary: List link authorizations of an ExpressRoute circuit. + examples: + - summary: List link authorizations of an ExpressRoute circuit. + command: > + az network express-route auth list -g MyResourceGroup --circuit-name MyCircuit +- command: + name: network express-route auth show + summary: Get the details of a link authorization of an ExpressRoute circuit. + examples: + - summary: Get the details of a link authorization of an ExpressRoute circuit. + command: > + az network express-route auth show -g MyResourceGroup --circuit-name MyCircuit -n MyAuthorization +- group: + name: network express-route peering + summary: Manage ExpressRoute peering of an ExpressRoute circuit. +- command: + name: network express-route peering create + summary: Create peering settings for an ExpressRoute circuit. + examples: + - summary: Create Microsoft Peering settings with IPv4 configuration. + command: | + az network express-route peering create -g MyResourceGroup --circuit-name MyCircuit \ + --peering-type MicrosoftPeering --peer-asn 10002 --vlan-id 103 \ + --primary-peer-subnet 101.0.0.0/30 --secondary-peer-subnet 102.0.0.0/30 \ + --advertised-public-prefixes 101.0.0.0/30 +- command: + name: network express-route peering delete + summary: Delete peering settings. + examples: + - summary: Delete private peering. + command: > + az network express-route peering delete -g MyResourceGroup --circuit-name MyCircuit -n AzurePrivatePeering +- command: + name: network express-route peering list + summary: List peering settings of an ExpressRoute circuit. + examples: + - summary: List peering settings of an ExpressRoute circuit. + command: > + az network express-route peering list -g MyResourceGroup --circuit-name MyCircuit +- command: + name: network express-route peering show + summary: Get the details of an express route peering. + examples: + - summary: Get private peering details of an ExpressRoute circuit. + command: > + az network express-route peering show -g MyResourceGroup --circuit-name MyCircuit -n AzurePrivatePeering +- command: + name: network express-route peering update + summary: Update peering settings of an ExpressRoute circuit. + examples: + - summary: Add IPv6 Microsoft Peering settings to existing IPv4 config. + command: | + az network express-route peering update -g MyResourceGroup --circuit-name MyCircuit \ + --ip-version ipv6 --primary-peer-subnet 2002:db00::/126 \ + --secondary-peer-subnet 2003:db00::/126 --advertised-public-prefixes 2002:db00::/126 + min_profile: latest +- group: + name: network express-route peering connection + summary: Manage ExpressRoute circuit connections. +- command: + name: network express-route peering connection create + summary: Create connections between two ExpressRoute circuits. + examples: + - summary: Create connection between two ExpressRoute circuits with AzurePrivatePeering settings. + command: | + az network express-route peering connection create -g MyResourceGroup --circuit-name \ + MyCircuit --peering-name AzurePrivatePeering -n myConnection --peer-circuit \ + MyOtherCircuit --address-prefix 104.0.0.0/29 +- command: + name: network express-route peering connection delete + summary: Delete an ExpressRoute circuit connection. +- command: + name: network express-route peering connection show + summary: Get the details of an ExpressRoute circuit connection. +- group: + name: network interface-endpoint + summary: Manage interface endpoints. +- command: + name: network interface-endpoint list + summary: List interface endpoints. +- command: + name: network interface-endpoint show + summary: Get the details of an interface endpoint. +- group: + name: network private-endpoint + summary: Manage private endpoints. +- command: + name: network private-endpoint list + summary: List private endpoints. +- command: + name: network private-endpoint show + summary: Get the details of an private endpoint. +- group: + name: network lb + summary: Manage and configure load balancers. + description: To learn more about Azure Load Balancer visit https://docs.microsoft.com/en-us/azure/load-balancer/load-balancer-get-started-internet-arm-cli +- command: + name: network lb create + summary: Create a load balancer. + examples: + - summary: Create a basic load balancer. + command: > + az network lb create -g MyResourceGroup -n MyLb --sku Basic + - summary: Create a basic internal load balancer on a specific virtual network and subnet. + command: > + az network lb create -g MyResourceGroup -n MyLb --sku Basic --vnet-name MyVnet --subnet MySubnet + - summary: Create a basic zone flavored internal load balancer, through provisioning a zonal public ip. + command: > + az network lb create -g MyResourceGroup -n MyLb --sku Basic --public-ip-zone 2 + - summary: > + Create a standard zone flavored public-facing load balancer, through provisioning a + zonal frontend ip configuration and Vnet. + command: > + az network lb create -g MyResourceGroup -n MyLb --sku Standard --frontend-ip-zone 1 --vnet-name MyVnet --subnet MySubnet +- command: + name: network lb delete + summary: Delete a load balancer. + examples: + - summary: Delete a load balancer. + command: az network lb delete -g MyResourceGroup -n MyLb +- command: + name: network lb list + summary: List load balancers. + examples: + - summary: List load balancers. + command: az network lb list -g MyResourceGroup +- command: + name: network lb show + summary: Get the details of a load balancer. + examples: + - summary: Get the details of a load balancer. + command: az network lb show -g MyResourceGroup -n MyLb +- command: + name: network lb update + summary: Update a load balancer. + description: > + This command can only be used to update the tags for a load balancer. Name and resource group are immutable and cannot be updated. + examples: + - summary: Update the tags of a load balancer. + command: az network lb update -g MyResourceGroup -n MyLb --set tags.CostCenter=MyBusinessGroup +- group: + name: network lb address-pool + summary: Manage address pools of a load balancer. +- command: + name: network lb address-pool create + summary: Create an address pool. + examples: + - summary: Create an address pool. + command: az network lb address-pool create -g MyResourceGroup --lb-name MyLb -n MyAddressPool +- command: + name: network lb address-pool delete + summary: Delete an address pool. + examples: + - summary: Delete an address pool. + command: az network lb address-pool delete -g MyResourceGroup --lb-name MyLb -n MyAddressPool +- command: + name: network lb address-pool list + summary: List address pools. + examples: + - summary: List address pools. + command: az network lb address-pool list -g MyResourceGroup --lb-name MyLb -o table +- command: + name: network lb address-pool show + summary: Get the details of an address pool. + examples: + - summary: Get the details of an address pool. + command: az network lb address-pool show -g MyResourceGroup --lb-name MyLb -n MyAddressPool +- group: + name: network lb frontend-ip + summary: Manage frontend IP addresses of a load balancer. +- command: + name: network lb frontend-ip create + summary: Create a frontend IP address. + examples: + - summary: Create a frontend ip address for a public load balancer. + command: az network lb frontend-ip create -g MyResourceGroup -n MyFrontendIp --lb-name MyLb --public-ip-address MyFrontendIp + - summary: Create a frontend ip address for an internal load balancer. + command: | + az network lb frontend-ip create -g MyResourceGroup -n MyFrontendIp --lb-name MyLb \ + --private-ip-address 10.10.10.100 --subnet MySubnet --vnet-name MyVnet +- command: + name: network lb frontend-ip delete + summary: Delete a frontend IP address. + examples: + - summary: Delete a frontend IP address. + command: az network lb frontend-ip delete -g MyResourceGroup --lb-name MyLb -n MyFrontendIp +- command: + name: network lb frontend-ip list + summary: List frontend IP addresses. + examples: + - summary: List frontend IP addresses. + command: az network lb frontend-ip list -g MyResourceGroup --lb-name MyLb +- command: + name: network lb frontend-ip show + summary: Get the details of a frontend IP address. + examples: + - summary: Get the details of a frontend IP address. + command: az network lb frontend-ip show -g MyResourceGroup --lb-name MyLb -n MyFrontendIp +- command: + name: network lb frontend-ip update + summary: Update a frontend IP address. + examples: + - summary: Update the frontend IP address of a public load balancer. + command: az network lb frontend-ip update -g MyResourceGroup --lb-name MyLb -n MyFrontendIp --public-ip-address MyNewPublicIp + - summary: Update the frontend IP address of an internal load balancer. + command: az network lb frontend-ip update -g MyResourceGroup --lb-name MyLb -n MyFrontendIp --private-ip-address 10.10.10.50 +- group: + name: network lb inbound-nat-pool + summary: Manage inbound NAT address pools of a load balancer. +- command: + name: network lb inbound-nat-pool create + summary: Create an inbound NAT address pool. + examples: + - summary: Create an inbound NAT address pool. + command: | + az network lb inbound-nat-pool create -g MyResourceGroup --lb-name MyLb \ + -n MyNatPool --protocol Tcp --frontend-port-range-start 80 --frontend-port-range-end 89 \ + --backend-port 80 --frontend-ip-name MyFrontendIp +- command: + name: network lb inbound-nat-pool delete + summary: Delete an inbound NAT address pool. + examples: + - summary: Delete an inbound NAT address pool. + command: az network lb inbound-nat-pool delete -g MyResourceGroup --lb-name MyLb -n MyNatPool +- command: + name: network lb inbound-nat-pool list + summary: List inbound NAT address pools. + examples: + - summary: List inbound NAT address pools. + command: az network lb inbound-nat-pool list -g MyResourceGroup --lb-name MyLb -o table +- command: + name: network lb inbound-nat-pool show + summary: Get the details of an inbound NAT address pool. + examples: + - summary: Get the details of an inbound NAT address pool. + command: az network lb inbound-nat-pool show -g MyResourceGroup --lb-name MyLb -n MyNatPool +- command: + name: network lb inbound-nat-pool update + summary: Update an inbound NAT address pool. + examples: + - summary: Update an inbound NAT address pool to a different backend port. + command: | + az network lb inbound-nat-pool update -g MyResourceGroup --lb-name MyLb -n MyNatPool \ + --protocol Tcp --backend-port 8080 +- group: + name: network lb inbound-nat-rule + summary: Manage inbound NAT rules of a load balancer. +- command: + name: network lb inbound-nat-rule create + summary: Create an inbound NAT rule. + examples: + - summary: Create a basic inbound NAT rule for port 80. + command: | + az network lb inbound-nat-rule create -g MyResourceGroup --lb-name MyLb -n MyNatRule \ + --protocol Tcp --frontend-port 80 --backend-port 80 + - summary: Create a basic inbound NAT rule for a specific frontend IP and enable floating IP for NAT Rule. + command: | + az network lb inbound-nat-rule create -g MyResourceGroup --lb-name MyLb -n MyNatRule --protocol Tcp \ + --frontend-port 5432 --backend-port 3389 --frontend-ip-name MyFrontendIp --floating-ip true +- command: + name: network lb inbound-nat-rule delete + summary: Delete an inbound NAT rule. + examples: + - summary: Delete an inbound NAT rule. + command: az network lb inbound-nat-rule delete -g MyResourceGroup --lb-name MyLb -n MyNatRule +- command: + name: network lb inbound-nat-rule list + summary: List inbound NAT rules. + examples: + - summary: List inbound NAT rules. + command: az network lb inbound-nat-rule list -g MyResourceGroup --lb-name MyLb -o table +- command: + name: network lb inbound-nat-rule show + summary: Get the details of an inbound NAT rule. + examples: + - summary: Get the details of an inbound NAT rule. + command: az network lb inbound-nat-rule show -g MyResourceGroup --lb-name MyLb -n MyNatRule +- command: + name: network lb inbound-nat-rule update + summary: Update an inbound NAT rule. + examples: + - summary: Update an inbound NAT rule to disable floating IP and modify idle timeout duration. + command: | + az network lb inbound-nat-rule update -g MyResourceGroup --lb-name MyLb -n MyNatRule \ + --floating-ip false --idle-timeout 5 +- group: + name: network lb outbound-rule + summary: Manage outbound rules of a load balancer. +- command: + name: network lb outbound-rule create + summary: Create an outbound-rule. +- command: + name: network lb outbound-rule delete + summary: Delete an outbound-rule. +- command: + name: network lb outbound-rule list + summary: List outbound rules. +- command: + name: network lb outbound-rule show + summary: Get the details of an outbound rule. +- command: + name: network lb outbound-rule update + summary: Update an outbound-rule. +- group: + name: network lb probe + summary: Evaluate probe information and define routing rules. +- command: + name: network lb probe create + summary: Create a probe. + examples: + - summary: Create a probe on a load balancer over HTTP and port 80. + command: | + az network lb probe create -g MyResourceGroup --lb-name MyLb -n MyProbe \ + --protocol http --port 80 --path / + - summary: Create a probe on a load balancer over TCP on port 443. + command: | + az network lb probe create -g MyResourceGroup --lb-name MyLb -n MyProbe \ + --protocol tcp --port 443 +- command: + name: network lb probe delete + summary: Delete a probe. + examples: + - summary: Delete a probe. + command: az network lb probe delete -g MyResourceGroup --lb-name MyLb -n MyProbe +- command: + name: network lb probe list + summary: List probes. + examples: + - summary: List probes. + command: az network lb probe list -g MyResourceGroup --lb-name MyLb -o table +- command: + name: network lb probe show + summary: Get the details of a probe. + examples: + - summary: Get the details of a probe. + command: az network lb probe show -g MyResourceGroup --lb-name MyLb -n MyProbe +- command: + name: network lb probe update + summary: Update a probe. + examples: + - summary: Update a probe with a different port and interval. + command: az network lb probe update -g MyResourceGroup --lb-name MyLb -n MyProbe --port 81 --interval 10 +- group: + name: network lb rule + summary: Manage load balancing rules. +- command: + name: network lb rule create + summary: Create a load balancing rule. + examples: + - summary: > + Create a load balancing rule that assigns a front-facing IP configuration and port to + an address pool and port. + command: | + az network lb rule create -g MyResourceGroup --lb-name MyLb -n MyLbRule --protocol Tcp \ + --frontend-ip-name MyFrontEndIp --frontend-port 80 \ + --backend-pool-name MyAddressPool --backend-port 80 + - summary: > + Create a load balancing rule that assigns a front-facing IP configuration and port to + an address pool and port with the floating ip feature. + command: | + az network lb rule create -g MyResourceGroup --lb-name MyLb -n MyLbRule --protocol Tcp \ + --frontend-ip-name MyFrontEndIp --backend-pool-name MyAddressPool \ + --floating-ip true --frontend-port 80 --backend-port 80 + - summary: > + Create an HA ports load balancing rule that assigns a frontend IP and port to use all + available backend IPs in a pool on the same port. + command: | + az network lb rule create -g MyResourceGroup --lb-name MyLb -n MyHAPortsRule \ + --protocol All --frontend-port 0 --backend-port 0 --frontend-ip-name MyFrontendIp \ + --backend-pool-name MyAddressPool +- command: + name: network lb rule delete + summary: Delete a load balancing rule. + examples: + - summary: Delete a load balancing rule. + command: az network lb rule delete -g MyResourceGroup --lb-name MyLb -n MyLbRule +- command: + name: network lb rule list + summary: List load balancing rules. + examples: + - summary: List load balancing rules. + command: az network lb rule list -g MyResourceGroup --lb-name MyLb -o table +- command: + name: network lb rule show + summary: Get the details of a load balancing rule. + examples: + - summary: Get the details of a load balancing rule. + command: az network lb rule show -g MyResourceGroup --lb-name MyLb -n MyLbRule +- command: + name: network lb rule update + summary: Update a load balancing rule. + examples: + - summary: Update a load balancing rule to change the protocol to UDP. + command: az network lb rule update -g MyResourceGroup --lb-name MyLb -n MyLbRule --protocol Udp + - summary: Update a load balancing rule to support HA ports. + command: az network lb rule update -g MyResourceGroup --lb-name MyLb -n MyLbRule \ --protocol All --frontend-port 0 --backend-port 0 +- group: + name: network local-gateway + summary: Manage local gateways. + description: > + For more information on local gateways, visit: https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-howto-site-to-site-resource-manager-cli#localnet +- command: + name: network local-gateway create + summary: Create a local VPN gateway. + examples: + - summary: Create a Local Network Gateway to represent your on-premises site. + command: | + az network local-gateway create -g MyResourceGroup -n MyLocalGateway \ + --gateway-ip-address 23.99.221.164 --local-address-prefixes 10.0.0.0/24 20.0.0.0/24 +- command: + name: network local-gateway delete + summary: Delete a local VPN gateway. + description: > + In order to delete a Local Network Gateway, you must first delete ALL Connection objects in Azure + that are connected to the Gateway. After deleting the Gateway, proceed to delete other resources now not in use. + For more information, follow the order of instructions on this page: https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-delete-vnet-gateway-portal + examples: + - summary: Create a Local Network Gateway to represent your on-premises site. + command: az network local-gateway delete -g MyResourceGroup -n MyLocalGateway +- command: + name: network local-gateway list + summary: List all local VPN gateways in a resource group. + examples: + - summary: List all local VPN gateways in a resource group. + command: az network local-gateway list -g MyResourceGroup +- command: + name: network local-gateway show + summary: Get the details of a local VPN gateway. + examples: + - summary: Get the details of a local VPN gateway. + command: az network local-gateway show -g MyResourceGroup -n MyLocalGateway +- command: + name: network local-gateway update + summary: Update a local VPN gateway. + examples: + - summary: Update a Local Network Gateway provisioned with a 10.0.0.0/24 address prefix with additional prefixes. + command: | + az network local-gateway update -g MyResourceGroup -n MyLocalGateway \ + --local-address-prefixes 10.0.0.0/24 20.0.0.0/24 30.0.0.0/24 +- command: + name: network local-gateway wait + summary: Place the CLI in a waiting state until a condition of the local gateway is met. + examples: + - summary: Wait for Local Network Gateway to return as created. + command: | + az network local-gateway wait -g MyResourceGroup -n MyLocalGateway --created +- group: + name: network nic + summary: Manage network interfaces. + description: > + To learn more about network interfaces in Azure visit https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-network-interface +- command: + name: network nic create + summary: Create a network interface. + examples: + - summary: Create a network interface for a specified subnet on a specified virtual network. + command: > + az network nic create -g MyResourceGroup --vnet-name MyVnet --subnet MySubnet -n MyNic + - summary: > + Create a network interface for a specified subnet on a virtual network which allows + IP forwarding subject to a network security group. + command: | + az network nic create -g MyResourceGroup --vnet-name MyVnet --subnet MySubnet -n MyNic \ + --ip-forwarding --network-security-group MyNsg + - summary: > + Create a network interface for a specified subnet on a virtual network with network security group and application security groups. + command: | + az network nic create -g MyResourceGroup --vnet-name MyVnet --subnet MySubnet -n MyNic \ + --network-security-group MyNsg --application-security-groups Web App +- command: + name: network nic delete + summary: Delete a network interface. + examples: + - summary: Delete a network interface. + command: > + az network nic delete -g MyResourceGroup -n MyNic +- command: + name: network nic list + summary: List network interfaces. + description: > + To list network interfaces attached to VMs in VM scale sets use 'az vmss nic list' or 'az vmss nic list-vm-nics'. + examples: + - summary: List all NICs by internal DNS suffix. + command: > + az network nic list --query "[?dnsSettings.internalDomainNameSuffix=`{dnsSuffix}`]" +- command: + name: network nic list-effective-nsg + summary: List all effective network security groups applied to a network interface. + description: > + To learn more about troubleshooting using effective security rules visit https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-nsg-troubleshoot-portal + examples: + - summary: List the effective security groups associated with a NIC. + command: az network nic list-effective-nsg -g MyResourceGroup -n MyNic +- command: + name: network nic show + summary: Get the details of a network interface. + examples: + - summary: Get the internal domain name suffix of a NIC. + command: az network nic show -g MyResourceGroup -n MyNic --query "dnsSettings.internalDomainNameSuffix" +- command: + name: network nic wait + summary: Place the CLI in a waiting state until a condition of the network interface is met. + examples: + - summary: Pause CLI until the network interface is created. + command: az network nic wait -g MyResourceGroup -n MyNic --created +- command: + name: network nic show-effective-route-table + summary: Show the effective route table applied to a network interface. + description: > + To learn more about troubleshooting using the effective route tables visit + https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-routes-troubleshoot-portal#using-effective-routes-to-troubleshoot-vm-traffic-flow + examples: + - summary: Show the effective routes applied to a network interface. + command: az network nic show-effective-route-table -g MyResourceGroup -n MyNic +- command: + name: network nic update + summary: Update a network interface. + examples: + - summary: Update a network interface to use a different network security group. + command: az network nic update -g MyResourceGroup -n MyNic --network-security-group MyNewNsg +- group: + name: network nic ip-config + summary: Manage IP configurations of a network interface. +- command: + name: network nic ip-config create + summary: Create an IP configuration. + description: > + You must have the Microsoft.Network/AllowMultipleIpConfigurationsPerNic feature enabled for your subscription. + Only one configuration may be designated as the primary IP configuration per NIC, using the `--make-primary` flag. + examples: + - summary: Create a primary IP configuration for a NIC. + command: az network nic ip-config create -g MyResourceGroup -n MyIpConfig --nic-name MyNic --make-primary +- command: + name: network nic ip-config delete + summary: Delete an IP configuration. + description: A NIC must have at least one IP configuration. + examples: + - summary: Delete an IP configuration. + command: az network nic ip-config delete -g MyResourceGroup -n MyIpConfig --nic-name MyNic +- command: + name: network nic ip-config list + summary: List the IP configurations of a NIC. + examples: + - summary: List the IP configurations of a NIC. + command: az network nic ip-config list -g MyResourceGroup --nic-name MyNic +- command: + name: network nic ip-config show + summary: Show the details of an IP configuration. + examples: + - summary: Show the details of an IP configuration of a NIC. + command: az network nic ip-config show -g MyResourceGroup -n MyIpConfig --nic-name MyNic +- command: + name: network nic ip-config update + summary: Update an IP configuration. + examples: + - summary: Update a NIC to use a new private IP address. + command: | + az network nic ip-config update -g MyResourceGroup --nic-name MyNic \ + -n MyIpConfig --private-ip-address 10.0.0.9 + - summary: Make an IP configuration the default for the supplied NIC. + command: | + az network nic ip-config update -g MyResourceGroup --nic-name MyNic \ + -n MyIpConfig --make-primary +- group: + name: network nic ip-config address-pool + summary: Manage address pools in an IP configuration. +- command: + name: network nic ip-config address-pool add + summary: Add an address pool to an IP configuration. + examples: + - summary: Add an address pool to an IP configuration. + command: | + az network nic ip-config address-pool add -g MyResourceGroup --nic-name MyNic \ + -n MyIpConfig --address-pool MyAddressPool +- command: + name: network nic ip-config address-pool remove + summary: Remove an address pool of an IP configuration. + examples: + - summary: Remove an address pool of an IP configuration. + command: | + az network nic ip-config address-pool remove -g MyResourceGroup --nic-name MyNic \ + -n MyIpConfig --address-pool MyAddressPool +- group: + name: network nic ip-config inbound-nat-rule + summary: Manage inbound NAT rules of an IP configuration. +- command: + name: network nic ip-config inbound-nat-rule add + summary: Add an inbound NAT rule to an IP configuration. + examples: + - summary: Add an inbound NAT rule to an IP configuration. + command: | + az network nic ip-config inbound-nat-rule add -g MyResourceGroup --nic-name MyNic \ + -n MyIpConfig --inbound-nat-rule MyNatRule +- command: + name: network nic ip-config inbound-nat-rule remove + summary: Remove an inbound NAT rule of an IP configuration. + examples: + - summary: Remove an inbound NAT rule of an IP configuration. + command: | + az network nic ip-config inbound-nat-rule remove -g MyResourceGroup --nic-name MyNic \ + -n MyIpConfig --inbound-nat-rule MyNatRule +- group: + name: network nsg + summary: Manage Azure Network Security Groups (NSGs). + description: > + You can control network traffic to resources in a virtual network using a network security group. + A network security group contains a list of security rules that allow or deny inbound or + outbound network traffic based on source or destination IP addresses, Application Security + Groups, ports, and protocols. For more information visit https://docs.microsoft.com/en-us/azure/virtual-network/virtual-networks-create-nsg-arm-cli +- command: + name: network nsg create + summary: Create a network security group. + examples: + - summary: Create an NSG in a resource group within a region with tags. + command: az network nsg create -g MyResourceGroup -n MyNsg --tags super_secure no_80 no_22 +- command: + name: network nsg delete + summary: Delete a network security group. + examples: + - summary: Delete an NSG in a resource group. + command: az network nsg delete -g MyResourceGroup -n MyNsg +- command: + name: network nsg list + summary: List network security groups. + examples: + - summary: List all NSGs in the 'westus' region. + command: az network nsg list --query "[?location=='westus']" +- command: + name: network nsg show + summary: Get information about a network security group. + examples: + - summary: Get basic information about an NSG. + command: az network nsg show -g MyResourceGroup -n MyNsg + - summary: Get the default security rules of an NSG and format the output as a table. + command: az network nsg show -g MyResourceGroup -n MyNsg --query "defaultSecurityRules[]" -o table + - summary: Get all default NSG rules with "Allow" access and format the output as a table. + command: az network nsg show -g MyResourceGroup -n MyNsg --query "defaultSecurityRules[?access=='Allow']" -o table +- command: + name: network nsg update + summary: Update a network security group. + description: > + This command can only be used to update the tags of an NSG. Name and resource group are immutable and cannot be updated. + examples: + - summary: Remove a tag of an NSG. + command: az network nsg update -g MyResourceGroup -n MyNsg --remove tags.no_80 +- group: + name: network nsg rule + summary: Manage network security group rules. +- command: + name: network nsg rule create + summary: Create a network security group rule. + examples: + - summary: Create a basic "Allow" NSG rule with the highest priority. + command: > + az network nsg rule create -g MyResourceGroup --nsg-name MyNsg -n MyNsgRule --priority 100 + - summary: Create a "Deny" rule over TCP for a specific IP address range with the lowest priority. + command: | + az network nsg rule create -g MyResourceGroup --nsg-name MyNsg -n MyNsgRule --priority 4096 \ + --source-address-prefixes 208.130.28/24 --source-port-ranges 80 \ + --destination-address-prefixes '*' --destination-port-ranges 80 8080 --access Deny \ + --protocol Tcp --description "Deny from specific IP address ranges on 80 and 8080." + - summary: Create a security rule using service tags. For more details visit https://aka.ms/servicetags + command: | + az network nsg rule create -g MyResourceGroup --nsg-name MyNsg -n MyNsgRuleWithTags \ + --priority 400 --source-address-prefixes VirtualNetwork --destination-address-prefixes Storage \ + --destination-port-ranges * --direction Outbound --access Allow --protocol Tcp --description "Allow VirtualNetwork to Storage." + - summary: Create a security rule using application security groups. https://aka.ms/applicationsecuritygroups + command: | + az network nsg rule create -g MyResourceGroup --nsg-name MyNsg -n MyNsgRuleWithAsg \ + --priority 500 --source-address-prefixes Internet --destination-port-ranges 80 8080 \ + --destination-asgs Web --access Allow --protocol Tcp --description "Allow Internet to Web ASG on ports 80,8080." +- command: + name: network nsg rule delete + summary: Delete a network security group rule. + examples: + - summary: Delete a network security group rule. + command: az network nsg rule delete -g MyResourceGroup --nsg-name MyNsg -n MyNsgRule +- command: + name: network nsg rule list + summary: List all rules in a network security group. + examples: + - summary: List all rules in a network security group. + command: az network nsg rule list -g MyResourceGroup --nsg-name MyNsg +- command: + name: network nsg rule show + summary: Get the details of a network security group rule. + examples: + - summary: Get the details of a network security group rule. + command: az network nsg rule show -g MyResourceGroup --nsg-name MyNsg -n MyNsgRule +- command: + name: network nsg rule update + summary: Update a network security group rule. + examples: + - summary: Update an NSG rule with a new wildcard destination address prefix. + command: az network nsg rule update -g MyResourceGroup --nsg-name MyNsg -n MyNsgRule --destination-address-prefix '*' +- group: + name: network profile + summary: Manage network profiles. + description: > + To create a network profile, see the create command for the relevant resource. Currently, + only Azure Container Instances are supported. +- command: + name: network profile delete + summary: Delete a network profile. +- command: + name: network profile list + summary: List network profiles. +- command: + name: network profile show + summary: Get the details of a network profile. +- group: + name: network public-ip + summary: Manage public IP addresses. + description: > + To learn more about public IP addresses visit https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-public-ip-address +- command: + name: network public-ip create + summary: Create a public IP address. + examples: + - summary: Create a basic public IP resource. + command: az network public-ip create -g MyResourceGroup -n MyIp + - summary: Create a static public IP resource for a DNS name label. + command: az network public-ip create -g MyResourceGroup -n MyIp --dns-name MyLabel --allocation-method Static + - summary: Create a public IP resource in an availability zone in the current resource group region. + command: az network public-ip create -g MyResourceGroup -n MyIp --zone 2 +- command: + name: network public-ip delete + summary: Delete a public IP address. + examples: + - summary: Delete a public IP address. + command: az network public-ip delete -g MyResourceGroup -n MyIp +- command: + name: network public-ip list + summary: List public IP addresses. + examples: + - summary: List all public IPs in a subscription. + command: az network public-ip list + - summary: List all public IPs in a resource group. + command: az network public-ip list -g MyResourceGroup + - summary: List all public IPs of a domain name label. + command: az network public-ip list -g MyResourceGroup --query "[?dnsSettings.domainNameLabel=='MyLabel']" +- command: + name: network public-ip show + summary: Get the details of a public IP address. + examples: + - summary: Get information about a public IP resource. + command: az network public-ip show -g MyResourceGroup -n MyIp + - summary: Get the FQDN and IP address of a public IP resource. + command: > + az network public-ip show -g MyResourceGroup -n MyIp --query "{fqdn: dnsSettings.fqdn, address: ipAddress}" +- command: + name: network public-ip update + summary: Update a public IP address. + examples: + - summary: Update a public IP resource with a DNS name label and static allocation. + command: az network public-ip update -g MyResourceGroup -n MyIp --dns-name MyLabel --allocation-method Static +- group: + name: network public-ip prefix + summary: Manage public IP prefix resources. +- command: + name: network public-ip prefix create + summary: Create a public IP prefix resource. +- command: + name: network public-ip prefix delete + summary: Delete a public IP prefix resource. +- command: + name: network public-ip prefix list + summary: List public IP prefix resources. +- command: + name: network public-ip prefix show + summary: Get the details of a public IP prefix resource. +- command: + name: network public-ip prefix update + summary: Update a public IP prefix resource. +- group: + name: network route-table + summary: Manage route tables. +- command: + name: network route-table create + summary: Create a route table. + examples: + - summary: Create a route table. + command: az network route-table create -g MyResourceGroup -n MyRouteTable +- command: + name: network route-table delete + summary: Delete a route table. + examples: + - summary: Delete a route table. + command: az network route-table delete -g MyResourceGroup -n MyRouteTable +- command: + name: network route-table list + summary: List route tables. + examples: + - summary: List all route tables in a subscription. + command: az network route-table list -g MyResourceGroup +- command: + name: network route-table show + summary: Get the details of a route table. + examples: + - summary: Get the details of a route table. + command: az network route-table show -g MyResourceGroup -n MyRouteTable +- command: + name: network route-table update + summary: Update a route table. + examples: + - summary: Update a route table to disable BGP route propogation. + command: az network route-table update -g MyResourceGroup -n MyRouteTable --disable-bgp-route-propagation true +- group: + name: network route-table route + summary: Manage routes in a route table. +- command: + name: network route-table route create + summary: Create a route in a route table. + examples: + - summary: Create a route that forces all inbound traffic to a Network Virtual Appliance. + command: | + az network route-table route create -g MyResourceGroup --route-table-name MyRouteTable -n MyRoute \ + --next-hop-type VirtualAppliance --address-prefix 10.0.0.0/16 --next-hop-ip-address 10.0.100.4 +- command: + name: network route-table route delete + summary: Delete a route from a route table. + examples: + - summary: Delete a route from a route table. + command: az network route-table route delete -g MyResourceGroup --route-table-name MyRouteTable -n MyRoute +- command: + name: network route-table route list + summary: List routes in a route table. + examples: + - summary: List routes in a route table. + command: az network route-table route list -g MyResourceGroup --route-table-name MyRouteTable +- command: + name: network route-table route show + summary: Get the details of a route in a route table. + examples: + - summary: Get the details of a route in a route table. + command: az network route-table route show -g MyResourceGroup --route-table-name MyRouteTable -n MyRoute -o table +- command: + name: network route-table route update + summary: Update a route in a route table. + examples: + - summary: Update a route in a route table to change the next hop ip address. + command: az network route-table route update -g MyResourceGroup --route-table-name MyRouteTable \ -n MyRoute --next-hop-ip-address 10.0.100.5 +- group: + name: network route-filter + summary: (PREVIEW) Manage route filters. + description: > + To learn more about route filters with Microsoft peering with ExpressRoute, visit https://docs.microsoft.com/en-us/azure/expressroute/how-to-routefilter-cli +- command: + name: network route-filter create + summary: Create a route filter. + examples: + - summary: Create a route filter. + command: az network route-filter create -g MyResourceGroup -n MyRouteFilter +- command: + name: network route-filter delete + summary: Delete a route filter. + examples: + - summary: Delete a route filter. + command: az network route-filter delete -g MyResourceGroup -n MyRouteFilter +- command: + name: network route-filter list + summary: List route filters. + examples: + - summary: List route filters in a resource group. + command: az network route-filter list -g MyResourceGroup +- command: + name: network route-filter show + summary: Get the details of a route filter. + examples: + - summary: Get the details of a route filter. + command: az network route-filter show -g MyResourceGroup -n MyRouteFilter +- command: + name: network route-filter update + summary: Update a route filter. + description: > + This command can only be used to update the tags for a route filter. Name and resource group are immutable and cannot be updated. + examples: + - summary: Update the tags on a route filter. + command: az network route-filter update -g MyResourceGroup -n MyRouteFilter --set tags.CostCenter=MyBusinessGroup +- group: + name: network route-filter rule + summary: (PREVIEW) Manage rules in a route filter. + description: > + To learn more about route filters with Microsoft peering with ExpressRoute, visit https://docs.microsoft.com/en-us/azure/expressroute/how-to-routefilter-cli +- command: + name: network route-filter rule create + summary: Create a rule in a route filter. + arguments: + - name: --communities + summary: Space-separated list of border gateway protocol (BGP) community values to filter on. + value-sources: + - link: + command: az network route-filter rule list-service-communities + examples: + - summary: Create a rule in a route filter to allow Dynamics 365. + command: | + az network route-filter rule create -g MyResourceGroup --filter-name MyRouteFilter \ + -n MyRouteFilterRule --communities 12076:5040 --access Allow +- command: + name: network route-filter rule delete + summary: Delete a rule from a route filter. + examples: + - summary: Delete a rule from a route filter. + command: az network route-filter rule delete -g MyResourceGroup --filter-name MyRouteFilter -n MyRouteFilterRule +- command: + name: network route-filter rule list + summary: List rules in a route filter. + examples: + - summary: List rules in a route filter. + command: az network route-filter rule list -g MyResourceGroup --filter-name MyRouteFilter +- command: + name: network route-filter rule list-service-communities + summary: Gets all the available BGP service communities. + examples: + - summary: Gets all the available BGP service communities. + command: az network route-filter rule list-service-communities -o table + - summary: Get the community value for Exchange. + command: | + az network route-filter rule list-service-communities \ + --query '[].bgpCommunities[?communityName==`Exchange`].[communityValue][][]' -o tsv +- command: + name: network route-filter rule show + summary: Get the details of a rule in a route filter. + examples: + - summary: Get the details of a rule in a route filter. + command: az network route-filter rule show -g MyResourceGroup --filter-name MyRouteFilter -n MyRouteFilterRule +- command: + name: network route-filter rule update + summary: Update a rule in a route filter. + examples: + - summary: Update a rule in a route filter to add Exchange to rule list. + command: | + az network route-filter rule update -g MyResourceGroup --filter-name MyRouteFilter \ + -n MyRouteFilterRule --add communities='12076:5010' +- group: + name: network service-endpoint + summary: Manage policies related to service endpoints. +- group: + name: network service-endpoint policy + summary: Manage service endpoint policies. +- command: + name: network service-endpoint policy create + summary: Create a service endpoint policy. +- command: + name: network service-endpoint policy delete + summary: Delete a service endpoint policy. +- command: + name: network service-endpoint policy list + summary: List service endpoint policies. +- command: + name: network service-endpoint policy show + summary: Get the details of a service endpoint policy. +- command: + name: network service-endpoint policy update + summary: Update a service endpoint policy. +- group: + name: network service-endpoint policy-definition + summary: Manage service endpoint policy definitions. +- command: + name: network service-endpoint policy-definition create + summary: Create a service endpoint policy definition. + arguments: + - name: --service + value-sources: + - link: + command: az network service-endpoint list +- command: + name: network service-endpoint policy-definition delete + summary: Delete a service endpoint policy definition. +- command: + name: network service-endpoint policy-definition list + summary: List service endpoint policy definitions. +- command: + name: network service-endpoint policy-definition show + summary: Get the details of a service endpoint policy definition. +- command: + name: network service-endpoint policy-definition update + summary: Update a service endpoint policy definition. +- group: + name: network traffic-manager + summary: Manage the routing of incoming traffic. +- group: + name: network traffic-manager profile + summary: Manage Azure Traffic Manager profiles. +- command: + name: network traffic-manager profile check-dns + summary: Check the availability of a relative DNS name. + description: This checks for the avabilility of dns prefixes for trafficmanager.net. + examples: + - summary: Check the availability of 'mywebapp.trafficmanager.net' in Azure. + command: az network traffic-manager profile check-dns -n mywebapp +- command: + name: network traffic-manager profile create + summary: Create a traffic manager profile. + examples: + - summary: Create a traffic manager profile with performance routing. + command: | + az network traffic-manager profile create -g MyResourceGroup -n MyTmProfile --routing-method Performance \ + --unique-dns-name mywebapp --ttl 30 --protocol HTTP --port 80 --path "/" +- command: + name: network traffic-manager profile delete + summary: Delete a traffic manager profile. + examples: + - summary: Delete a traffic manager profile. + command: az network traffic-manager profile delete -g MyResourceGroup -n MyTmProfile +- command: + name: network traffic-manager profile list + summary: List traffic manager profiles. + examples: + - summary: List traffic manager profiles. + command: az network traffic-manager profile list -g MyResourceGroup +- command: + name: network traffic-manager profile show + summary: Get the details of a traffic manager profile. + examples: + - summary: Get the details of a traffic manager profile. + command: az network traffic-manager profile show -g MyResourceGroup -n MyTmProfile +- command: + name: network traffic-manager profile update + summary: Update a traffic manager profile. + examples: + - summary: Update a traffic manager profile to change the TTL to 300. + command: az network traffic-manager profile update -g MyResourceGroup -n MyTmProfile --ttl 300 +- group: + name: network traffic-manager endpoint + summary: Manage Azure Traffic Manager end points. +- command: + name: network traffic-manager endpoint create + summary: Create a traffic manager endpoint. + arguments: + - name: --geo-mapping + value-sources: + - link: + command: az network traffic-manager endpoint show-geographic-hierarchy + examples: + - summary: Create an endpoint for a performance profile to point to an Azure Web App endpoint. + command: | + az network traffic-manager endpoint create -g MyResourceGroup --profile-name MyTmProfile \ + -n MyEndpoint --type azureEndpoints --target-resource-id $MyWebApp1Id --endpoint-status enabled +- command: + name: network traffic-manager endpoint delete + summary: Delete a traffic manager endpoint. + examples: + - summary: Delete a traffic manager endpoint. + command: az network traffic-manager endpoint delete -g MyResourceGroup \ --profile-name MyTmProfile -n MyEndpoint --type azureEndpoints +- command: + name: network traffic-manager endpoint list + summary: List traffic manager endpoints. + examples: + - summary: List traffic manager endpoints. + command: az network traffic-manager endpoint list -g MyResourceGroup --profile-name MyTmProfile +- command: + name: network traffic-manager endpoint show-geographic-hierarchy + summary: Get the default geographic hierarchy used by the geographic traffic routing method. + examples: + - summary: Get the default geographic hierarchy used by the geographic traffic routing method. + command: az network traffic-manager endpoint show-geographic-hierarchy +- command: + name: network traffic-manager endpoint show + summary: Get the details of a traffic manager endpoint. + examples: + - summary: Get the details of a traffic manager endpoint. + command: | + az network traffic-manager endpoint show -g MyResourceGroup \ + --profile-name MyTmProfile -n MyEndpoint --type azureEndpoints +- command: + name: network traffic-manager endpoint update + summary: Update a traffic manager endpoint. + examples: + - summary: Update a traffic manager endpoint to change its weight. + command: az network traffic-manager endpoint update -g MyResourceGroup --profile-name MyTmProfile \ -n MyEndpoint --weight 20 --type azureEndpoints +- group: + name: network vnet + summary: Manage Azure Virtual Networks. + description: To learn more about Virtual Networks visit https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-manage-network +- command: + name: network vnet check-ip-address + summary: Check if a private IP address is available for use within a virtual network. + examples: + - summary: Check whether 10.0.0.4 is available within MyVnet. + command: az network vnet check-ip-address -g MyResourceGroup -n MyVnet --ip-address 10.0.0.4 +- command: + name: network vnet create + summary: Create a virtual network. + description: > + You may also create a subnet at the same time by specifying a subnet name and (optionally) an address prefix. + To learn about how to create a virtual network visit https://docs.microsoft.com/en-us/azure/virtual-network/manage-virtual-network#create-a-virtual-network + examples: + - summary: Create a virtual network. + command: az network vnet create -g MyResourceGroup -n MyVnet + - summary: Create a virtual network with a specific address prefix and one subnet. + command: | + az network vnet create -g MyResourceGroup -n MyVnet --address-prefix 10.0.0.0/16 \ + --subnet-name MySubnet --subnet-prefix 10.0.0.0/24 +- command: + name: network vnet delete + summary: Delete a virtual network. + examples: + - summary: Delete a virtual network. + command: az network vnet delete -g MyResourceGroup -n myVNet +- command: + name: network vnet list + summary: List virtual networks. + examples: + - summary: List all virtual networks in a subscription. + command: az network vnet list + - summary: List all virtual networks in a resource group. + command: az network vnet list -g MyResourceGroup + - summary: List virtual networks in a subscription which specify a certain address prefix. + command: az network vnet list --query "[?contains(addressSpace.addressPrefixes, '10.0.0.0/16')]" +- command: + name: network vnet list-endpoint-services + summary: List which services support VNET service tunneling in a given region. + description: To learn more about service endpoints visit https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-service-endpoints-configure#azure-cli + examples: + - summary: List the endpoint services available for use in the West US region. + command: az network vnet list-endpoint-services -l westus -o table +- command: + name: network vnet show + summary: Get the details of a virtual network. + examples: + - summary: Get details for MyVNet. + command: az network vnet show -g MyResourceGroup -n MyVNet +- command: + name: network vnet update + summary: Update a virtual network. + examples: + - summary: Update a virtual network with the IP address of a DNS server. + command: az network vnet update -g MyResourceGroup -n MyVNet --dns-servers 10.2.0.8 +- group: + name: network vnet subnet + summary: Manage subnets in an Azure Virtual Network. + description: To learn more about subnets visit https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-manage-subnet +- command: + name: network vnet subnet create + summary: Create a subnet and associate an existing NSG and route table. + arguments: + - name: --service-endpoints + summary: Space-separated list of services allowed private access to this subnet. + value-sources: + - link: + command: az network vnet list-endpoint-services + examples: + - summary: Create new subnet attached to an NSG with a custom route table. + command: | + az network vnet subnet create -g MyResourceGroup --vnet-name MyVnet -n MySubnet \ + --address-prefix 10.0.0.0/24 --network-security-group MyNsg --route-table MyRouteTable +- command: + name: network vnet subnet delete + summary: Delete a subnet. + examples: + - summary: Delete a subnet. + command: az network vnet subnet delete -g MyResourceGroup -n MySubnet +- command: + name: network vnet subnet list + summary: List the subnets in a virtual network. + examples: + - summary: List the subnets in a virtual network. + command: az network vnet subnet list -g MyResourceGroup --vnet-name MyVNet +- command: + name: network vnet subnet list-available-delegations + summary: List the services available for subnet delegation. + examples: + - summary: Retrieve the service names for available delegations in the West US region. + command: az network vnet subnet list-available-delegations -l westus --query [].serviceName +- command: + name: network vnet subnet show + summary: Show details of a subnet. + examples: + - summary: Show the details of a subnet associated with a virtual network. + command: az network vnet subnet show -g MyResourceGroup -n MySubnet --vnet-name MyVNet +- command: + name: network vnet subnet update + summary: Update a subnet. + arguments: + - name: --service-endpoints + summary: Space-separated list of services allowed private access to this subnet. + value-sources: + - link: + command: az network vnet list-endpoint-services + examples: + - summary: Associate a network security group to a subnet. + command: az network vnet subnet update -g MyResourceGroup -n MySubnet --vnet-name MyVNet --network-security-group MyNsg +- group: + name: network vnet peering + summary: Manage peering connections between Azure Virtual Networks. + description: To learn more about virtual network peering visit https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-manage-peering +- command: + name: network vnet peering create + summary: Create a virtual network peering connection. + description: > + To successfully peer two virtual networks this command must be called twice with + the values for --vnet-name and --remote-vnet reversed. + examples: + - summary: Create a peering connection between two virtual networks. + command: | + az network vnet peering create -g MyResourceGroup -n MyVnet1ToMyVnet2 --vnet-name MyVnet1 \ + --remote-vnet-id MyVnet2Id --allow-vnet-access +- command: + name: network vnet peering delete + summary: Delete a peering. + examples: + - summary: Delete a virtual network peering connection. + command: az network vnet peering delete -g MyResourceGroup -n MyVnet1ToMyVnet2 --vnet-name MyVnet1 +- command: + name: network vnet peering list + summary: List peerings. + examples: + - summary: List all peerings of a specified virtual network. + command: az network vnet peering list -g MyResourceGroup --vnet-name MyVnet1 +- command: + name: network vnet peering show + summary: Show details of a peering. + examples: + - summary: Show all details of the specified virtual network peering. + command: az network vnet peering show -g MyResourceGroup -n MyVnet1ToMyVnet2 --vnet-name MyVnet1 +- command: + name: network vnet peering update + summary: Update a peering. + examples: + - summary: Change forwarded traffic configuration of a virtual network peering. + command: > + az network vnet peering update -g MyResourceGroup -n MyVnet1ToMyVnet2 --vnet-name MyVnet1 --set allowForwardedTraffic=true + - summary: Change virtual network access of a virtual network peering. + command: > + az network vnet peering update -g MyResourceGroup -n MyVnet1ToMyVnet2 --vnet-name MyVnet1 --set allowVirtualNetworkAccess=true + - summary: Change gateway transit property configuration of a virtual network peering. + command: > + az network vnet peering update -g MyResourceGroup -n MyVnet1ToMyVnet2 --vnet-name MyVnet1 --set allowGatewayTransit=true + - summary: Use remote gateways in virtual network peering. + command: > + az network vnet peering update -g MyResourceGroup -n MyVnet1ToMyVnet2 --vnet-name MyVnet1 --set useRemoteGateways=true +- group: + name: network vpn-connection + summary: Manage VPN connections. + description: > + For more information on site-to-site connections, + visit https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-howto-site-to-site-resource-manager-cli. + For more information on Vnet-to-Vnet connections, visit https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-howto-vnet-vnet-cli +- command: + name: network vpn-connection create + summary: Create a VPN connection. + description: The VPN Gateway and Local Network Gateway must be provisioned before creating the connection between them. + examples: + - summary: > + Create a site-to-site connection between an Azure virtual network and an on-premises local network gateway. + command: | + az network vpn-connection create -g MyResourceGroup -n MyConnection --vnet-gateway1 MyVnetGateway \ + --local-gateway2 MyLocalGateway --shared-key Abc123 +- command: + name: network vpn-connection delete + summary: Delete a VPN connection. + examples: + - summary: Delete a VPN connection. + command: az network vpn-connection delete -g MyResourceGroup -n MyConnection +- command: + name: network vpn-connection list + summary: List all VPN connections in a resource group. + examples: + - summary: List all VPN connections in a resource group. + command: az network vpn-connection list -g MyResourceGroup +- command: + name: network vpn-connection show + summary: Get the details of a VPN connection. + examples: + - summary: View the details of a VPN connection. + command: az network vpn-connection show -g MyResourceGroup -n MyConnection +- command: + name: network vpn-connection update + summary: Update a VPN connection. + examples: + - summary: Add BGP to an existing connection. + command: az network vpn-connection update -g MyResourceGroup -n MyConnection --enable-bgp True +- group: + name: network vpn-connection ipsec-policy + summary: Manage VPN connection IPSec policies. +- command: + name: network vpn-connection ipsec-policy add + summary: Add a VPN connection IPSec policy. + description: Set all IPsec policies of a VPN connection. If you want to set any IPsec policy, you must set them all. + examples: + - summary: Add specified IPsec policies to a connection instead of relying on defaults. + command: | + az network vpn-connection ipsec-policy add -g MyResourceGroup --connection-name MyConnection \ + --dh-group DHGroup14 --ike-encryption AES256 --ike-integrity SHA384 --ipsec-encryption DES3 \ + --ipsec-integrity GCMAES256 --pfs-group PFS2048 --sa-lifetime 600 --sa-max-size 1024 +- command: + name: network vpn-connection ipsec-policy clear + summary: Delete all IPsec policies on a VPN connection. + examples: + - summary: Remove all previously specified IPsec policies from a connection. + command: az network vpn-connection ipsec-policy clear -g MyResourceGroup --connection-name MyConnection +- command: + name: network vpn-connection ipsec-policy list + summary: List IPSec policies associated with a VPN connection. + examples: + - summary: List the IPsec policies set on a connection. + command: az network vpn-connection ipsec-policy list -g MyResourceGroup --connection-name MyConnection +- group: + name: network vpn-connection shared-key + summary: Manage VPN shared keys. +- command: + name: network vpn-connection shared-key reset + summary: Reset a VPN connection shared key. + examples: + - summary: Reset the shared key on a connection. + command: az network vpn-connection shared-key reset -g MyResourceGroup --connection-name MyConnection --key-length 128 +- command: + name: network vpn-connection shared-key show + summary: Retrieve a VPN connection shared key. + examples: + - summary: View the shared key of a connection. + command: az network vpn-connection shared-key show -g MyResourceGroup --connection-name MyConnection +- command: + name: network vpn-connection shared-key update + summary: Update a VPN connection shared key. + examples: + - summary: Change the shared key for the connection to "Abc123". + command: az network vpn-connection shared-key update -g MyResourceGroup --connection-name MyConnection --value Abc123 +- group: + name: network vnet-gateway + summary: Use an Azure Virtual Network Gateway to establish secure, cross-premises connectivity. + description: > + To learn more about Azure Virtual Network Gateways, visit https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-howto-site-to-site-resource-manager-cli +- command: + name: network vnet-gateway create + summary: Create a virtual network gateway. + examples: + - summary: Create a basic virtual network gateway for site-to-site connectivity. + command: | + az network vnet-gateway create -g MyResourceGroup -n MyVnetGateway --public-ip-address MyGatewayIp \ + --vnet MyVnet --gateway-type Vpn --sku VpnGw1 --vpn-type RouteBased --no-wait + - summary: > + Create a basic virtual network gateway that provides point-to-site connectivity with a RADIUS secret that matches what is configured on a RADIUS server. + command: | + az network vnet-gateway create -g MyResourceGroup -n MyVnetGateway --public-ip-address MyGatewayIp \ + --vnet MyVnet --gateway-type Vpn --sku VpnGw1 --vpn-type RouteBased --address-prefixes 40.1.0.0/24 \ + --client-protocol IkeV2 SSTP --radius-secret 111_aaa --radius-server 30.1.1.15 +- command: + name: network vnet-gateway delete + summary: Delete a virtual network gateway. + description: > + In order to delete a Virtual Network Gateway, you must first delete ALL Connection objects in Azure that are + connected to the Gateway. After deleting the Gateway, proceed to delete other resources now not in use. + For more information, follow the order of instructions on this page: + https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-delete-vnet-gateway-portal + examples: + - summary: Delete a virtual network gateway. + command: az network vnet-gateway delete -g MyResourceGroup -n MyVnetGateway +- command: + name: network vnet-gateway list + summary: List virtual network gateways. + examples: + - summary: List virtual network gateways in a resource group. + command: az network vnet-gateway list -g MyResourceGroup +- command: + name: network vnet-gateway list-advertised-routes + summary: List the routes of a virtual network gateway advertised to the specified peer. + examples: + - summary: List the routes of a virtual network gateway advertised to the specified peer. + command: az network vnet-gateway list-advertised-routes -g MyResourceGroup -n MyVnetGateway --peer 23.10.10.9 +- command: + name: network vnet-gateway list-bgp-peer-status + summary: Retrieve the status of BGP peers. + examples: + - summary: Retrieve the status of a BGP peer. + command: az network vnet-gateway list-bgp-peer-status -g MyResourceGroup -n MyVnetGateway --peer 23.10.10.9 +- command: + name: network vnet-gateway list-learned-routes + summary: This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. + examples: + - summary: Retrieve a list of learned routes. + command: az network vnet-gateway list-learned-routes -g MyResourceGroup -n MyVnetGateway +- command: + name: network vnet-gateway reset + summary: Reset a virtual network gateway. + examples: + - summary: Reset a virtual network gateway. + command: az network vnet-gateway reset -g MyResourceGroup -n MyVnetGateway + - summary: Reset a virtual network gateway with Active-Active feature enabled. + command: az network vnet-gateway reset -g MyResourceGroup -n MyVnetGateway --gateway-vip MyGatewayIP +- command: + name: network vnet-gateway show + summary: Get the details of a virtual network gateway. + examples: + - summary: Get the details of a virtual network gateway. + command: az network vnet-gateway show -g MyResourceGroup -n MyVnetGateway +- command: + name: network vnet-gateway update + summary: Update a virtual network gateway. + examples: + - summary: Change the SKU of a virtual network gateway. + command: az network vnet-gateway update -g MyResourceGroup -n MyVnetGateway --sku VpnGw2 +- command: + name: network vnet-gateway wait + summary: Place the CLI in a waiting state until a condition of the virtual network gateway is met. + examples: + - summary: Pause CLI until the virtual network gateway is created. + command: az network vnet-gateway wait -g MyResourceGroup -n MyVnetGateway --created +- group: + name: network vnet-gateway vpn-client + summary: Download a VPN client configuration required to connect to Azure via point-to-site. +- command: + name: network vnet-gateway vpn-client generate + summary: Generate VPN client configuration. + description: The command outputs a URL to a zip file for the generated VPN client configuration. + examples: + - summary: Create the VPN client configuration for RADIUS with EAP-MSCHAV2 authentication. + command: az network vnet-gateway vpn-client generate -g MyResourceGroup -n MyVnetGateway --authentication-method EAPMSCHAPv2 + - summary: Create the VPN client configuration for AMD64 architecture. + command: az network vnet-gateway vpn-client generate -g MyResourceGroup -n MyVnetGateway --processor-architecture Amd64 +- command: + name: network vnet-gateway vpn-client show-url + summary: Retrieve a pre-generated VPN client configuration. + description: The profile needs to be generated first using vpn-client generate command. + examples: + - summary: Get the pre-generated point-to-site VPN client of the virtual network gateway. + command: az network vnet-gateway vpn-client show-url -g MyResourceGroup -n MyVnetGateway +- group: + name: network vnet-gateway revoked-cert + summary: Manage revoked certificates in a virtual network gateway. + description: Prevent machines using this certificate from accessing Azure through this gateway. +- command: + name: network vnet-gateway revoked-cert create + summary: Revoke a certificate. + examples: + - summary: Revoke a certificate. + command: | + az network vnet-gateway revoked-cert create -g MyResourceGroup -n MyRootCertificate \ + --gateway-name MyVnetGateway --thumbprint abc123 +- command: + name: network vnet-gateway revoked-cert delete + summary: Delete a revoked certificate. + examples: + - summary: Delete a revoked certificate. + command: az network vnet-gateway revoked-cert delete -g MyResourceGroup -n MyRootCertificate --gateway-name MyVnetGateway +- group: + name: network vnet-gateway root-cert + summary: Manage root certificates of a virtual network gateway. +- command: + name: network vnet-gateway root-cert create + summary: Upload a root certificate. + examples: + - summary: Add a Root Certificate to the list of certs allowed to connect to this Gateway. + command: | + az network vnet-gateway root-cert create -g MyResourceGroup -n MyRootCertificate \ + --gateway-name MyVnetGateway --public-cert-data MyCertificateData +- command: + name: network vnet-gateway root-cert delete + summary: Delete a root certificate. + examples: + - summary: Remove a certificate from the list of Root Certificates whose children are allowed to access this Gateway. + command: az network vnet-gateway root-cert delete -g MyResourceGroup -n MyRootCertificate --gateway-name MyVnetGateway +- group: + name: network watcher + summary: Manage the Azure Network Watcher. + description: > + Network Watcher assists with monitoring and diagnosing conditions at a network scenario level. To learn more visit https://docs.microsoft.com/en-us/azure/network-watcher/ +- command: + name: network watcher configure + summary: Configure the Network Watcher service for different regions. + arguments: + - name: --enabled + summary: Enabled status of Network Watcher in the specified regions. + - name: --locations + summary: Space-separated list of locations to configure. + - name: --resource-group + summary: Name of resource group. Required when enabling new regions. + description: > + When a previously disabled region is enabled to use Network Watcher, a + Network Watcher resource will be created in this resource group. + examples: + - summary: Configure Network Watcher for the West US region. + command: az network watcher configure -g NetworkWatcherRG -l westus --enabled true +- command: + name: network watcher list + summary: List Network Watchers. + examples: + - summary: List all Network Watchers in a subscription. + command: az network watcher list +- command: + name: network watcher show-next-hop + summary: Get information on the 'next hop' of a VM. + description: > + Requires that Network Watcher is enabled for the region in which the VM is located. + For more information about show-next-hop visit https://docs.microsoft.com/en-us/azure/network-watcher/network-watcher-check-next-hop-cli + examples: + - summary: Get the next hop from a VMs assigned IP address to a destination at 10.1.0.4. + command: az network watcher show-next-hop -g MyResourceGroup --vm MyVm --source-ip 10.0.0.4 --dest-ip 10.1.0.4 +- command: + name: network watcher show-security-group-view + summary: Get detailed security information on a VM for the currently configured network security group. + description: > + For more information on using security group view visit https://docs.microsoft.com/en-us/azure/network-watcher/network-watcher-security-group-view-cli + examples: + - summary: Get the network security group information for the specified VM. + command: az network watcher show-security-group-view -g MyResourceGroup --vm MyVm +- command: + name: network watcher show-topology + summary: Get the network topology of a resource group, virtual network or subnet. + description: For more information about using network topology visit https://docs.microsoft.com/en-us/azure/network-watcher/network-watcher-topology-cli + arguments: + - name: --resource-group + summary: The name of the target resource group to perform topology on. + - name: --location + summary: Location. Defaults to the location of the target resource group. + description: > + Topology information is only shown for resources within the target + resource group that are within the specified region. + examples: + - summary: Use show-topology to get the topology of resources within a resource group. + command: az network watcher show-topology -g MyResourceGroup +- command: + name: network watcher test-connectivity + summary: (PREVIEW) Test if a connection can be established between a Virtual Machine and a given endpoint. + description: > + To check connectivity between two VMs in different regions, use the VM ids instead of the VM names for the source and destination resource arguments. + To register for this feature or see additional examples visit https://docs.microsoft.com/en-us/azure/network-watcher/network-watcher-connectivity-cli + arguments: + - name: --source-resource + summary: Name or ID of the resource from which to originate traffic. + description: Currently only Virtual Machines are supported. + - name: --source-port + summary: Port number from which to originate traffic. + - name: --dest-resource + summary: Name or ID of the resource to receive traffic. + description: Currently only Virtual Machines are supported. + - name: --dest-port + summary: Port number on which to receive traffic. + - name: --dest-address + summary: The IP address or URI at which to receive traffic. + examples: + - summary: Check connectivity between two virtual machines in the same resource group over port 80. + command: az network watcher test-connectivity -g MyResourceGroup --source-resource MyVmName1 --dest-resource MyVmName2 --dest-port 80 + - summary: Check connectivity between two virtual machines in the same subscription in two different resource groups over port 80. + command: az network watcher test-connectivity --source-resource MyVmId1 --dest-resource MyVmId2 --dest-port 80 +- command: + name: network watcher test-ip-flow + summary: Test IP flow to/from a VM given the currently configured network security group rules. + description: > + Requires that Network Watcher is enabled for the region in which the VM is located. + For more information visit https://docs.microsoft.com/en-us/azure/network-watcher/network-watcher-check-ip-flow-verify-cli + arguments: + - name: --local + summary: > + The private IPv4 address for the VMs NIC and the port of the packet in + X.X.X.X:PORT format. `*` can be used for port when direction is outbound. + - name: --remote + summary: > + The IPv4 address and port for the remote side of the packet + X.X.X.X:PORT format. `*` can be used for port when the direction is inbound. + - name: --direction + summary: Direction of the packet relative to the VM. + - name: --protocol + summary: Protocol to test. + examples: + - summary: Run test-ip-flow verify to test logical connectivity from a VM to the specified destination IPv4 address and port. + command: | + az network watcher test-ip-flow -g MyResourceGroup --direction Outbound \ + --protocol TCP --local 10.0.0.4:* --remote 10.1.0.4:80 --vm MyVm +- command: + name: network watcher run-configuration-diagnostic + summary: Run a configuration diagnostic on a target resource. + description: > + Requires that Network Watcher is enabled for the region in which the target is located. + examples: + - summary: Run configuration diagnostic on a VM with a single query. + command: | + az network watcher run-configuration-diagnostic --resource {VM_ID} + --direction Inbound --protocol TCP --source 12.11.12.14 --destination 10.1.1.4 --port 12100 + - summary: Run configuration diagnostic on a VM with multiple queries. + command: | + az network watcher run-configuration-diagnostic --resource {VM_ID} + --queries '[ + { + "direction": "Inbound", "protocol": "TCP", "source": "12.11.12.14", + "destination": "10.1.1.4", "destinationPort": "12100" + }, + { + "direction": "Inbound", "protocol": "TCP", "source": "12.11.12.0/32", + "destination": "10.1.1.4", "destinationPort": "12100" + }, + { + "direction": "Outbound", "protocol": "TCP", "source": "12.11.12.14", + "destination": "10.1.1.4", "destinationPort": "12100" + }]' +- group: + name: network watcher connection-monitor + summary: Manage connection monitoring between an Azure Virtual Machine and any IP resource. + description: > + Connection monitor can be used to monitor network connectivity between an Azure virtual machine and an IP address. + The IP address can be assigned to another Azure resource or a resource on the Internet or on-premises. To learn + more visit https://aka.ms/connectionmonitordoc +- command: + name: network watcher connection-monitor create + summary: Create a connection monitor. + arguments: + - name: --source-resource + summary: > + Currently only Virtual Machines are supported. + - name: --dest-resource + summary: > + Currently only Virtual Machines are supported. + examples: + - summary: Create a connection monitor for a virtual machine. + command: | + az network watcher connection-monitor create -g MyResourceGroup -n MyConnectionMonitorName \ + --source-resource MyVM +- command: + name: network watcher connection-monitor delete + summary: Delete a connection monitor for the given region. + examples: + - summary: Delete a connection monitor for the given region. + command: az network watcher connection-monitor delete -l westus -n MyConnectionMonitorName +- command: + name: network watcher connection-monitor list + summary: List connection monitors for the given region. + examples: + - summary: List a connection monitor for the given region. + command: az network watcher connection-monitor list -l westus +- command: + name: network watcher connection-monitor query + summary: Query a snapshot of the most recent connection state of a connection monitor. + examples: + - summary: List a connection monitor for the given region. + command: az network watcher connection-monitor query -l westus -n MyConnectionMonitorName +- command: + name: network watcher connection-monitor show + summary: Shows a connection monitor by name. + examples: + - summary: Show a connection monitor for the given name. + command: az network watcher connection-monitor show -l westus -n MyConnectionMonitorName +- command: + name: network watcher connection-monitor start + summary: Start the specified connection monitor. + examples: + - summary: Start the specified connection monitor. + command: az network watcher connection-monitor start -l westus -n MyConnectionMonitorName +- command: + name: network watcher connection-monitor stop + summary: Stop the specified connection monitor. + examples: + - summary: Stop the specified connection monitor. + command: az network watcher connection-monitor stop -l westus -n MyConnectionMonitorName +- group: + name: network watcher packet-capture + summary: Manage packet capture sessions on VMs. + description: > + These commands require that both Azure Network Watcher is enabled for the VMs region and that AzureNetworkWatcherExtension is enabled on the VM. + For more information visit https://docs.microsoft.com/en-us/azure/network-watcher/network-watcher-packet-capture-manage-cli +- command: + name: network watcher packet-capture create + summary: Create and start a packet capture session. + arguments: + - name: --capture-limit + summary: The maximum size in bytes of the capture output. + - name: --capture-size + summary: Number of bytes captured per packet. Excess bytes are truncated. + - name: --time-limit + summary: Maximum duration of the capture session in seconds. + - name: --storage-account + summary: Name or ID of a storage account to save the packet capture to. + - name: --storage-path + summary: Fully qualified URI of an existing storage container in which to store the capture file. + description: > + If not specified, the container 'network-watcher-logs' will be + created if it does not exist and the capture file will be stored there. + - name: --file-path + summary: > + Local path on the targeted VM at which to save the packet capture. For Linux VMs, the + path must start with /var/captures. + - name: --vm + summary: Name or ID of the VM to target. + - name: --filters + summary: JSON encoded list of packet filters. Use `@{path}` to load from file. + examples: + - summary: Create a packet capture session on a VM. + command: az network watcher packet-capture create -g MyResourceGroup -n MyPacketCaptureName --vm MyVm --storage-account MyStorageAccount + - summary: Create a packet capture session on a VM with optional filters for protocols, local IP address and remote IP address ranges and ports. + command: | + az network watcher packet-capture create -g MyResourceGroup -n MyPacketCaptureName --vm MyVm \ + --storage-account MyStorageAccount --filters '[ \ + { \ + "protocol":"TCP", \ + "remoteIPAddress":"1.1.1.1-255.255.255", \ + "localIPAddress":"10.0.0.3", \ + "remotePort":"20" \ + }, \ + { \ + "protocol":"TCP", \ + "remoteIPAddress":"1.1.1.1-255.255.255", \ + "localIPAddress":"10.0.0.3", \ + "remotePort":"80" \ + }, \ + { \ + "protocol":"TCP", \ + "remoteIPAddress":"1.1.1.1-255.255.255", \ + "localIPAddress":"10.0.0.3", \ + "remotePort":"443" \ + }, \ + { \ + "protocol":"UDP" \ + }]' +- command: + name: network watcher packet-capture delete + summary: Delete a packet capture session. + examples: + - summary: Delete a packet capture session. This only deletes the session and not the capture file. + command: az network watcher packet-capture delete -n packetCaptureName -l westcentralus +- command: + name: network watcher packet-capture list + summary: List all packet capture sessions within a resource group. + examples: + - summary: List all packet capture sessions within a region. + command: az network watcher packet-capture list -l westus +- command: + name: network watcher packet-capture show + summary: Show details of a packet capture session. + examples: + - summary: Show a packet capture session. + command: az network watcher packet-capture show -l westus -n MyPacketCapture +- command: + name: network watcher packet-capture show-status + summary: Show the status of a packet capture session. + examples: + - summary: Show the status of a packet capture session. + command: az network watcher packet-capture show-status -l westus -n MyPacketCapture +- command: + name: network watcher packet-capture stop + summary: Stop a running packet capture session. + examples: + - summary: Stop a running packet capture session. + command: az network watcher packet-capture stop -l westus -n MyPacketCapture +- group: + name: network watcher flow-log + summary: Manage network security group flow logging. + description: > + For more information about configuring flow logs visit https://docs.microsoft.com/en-us/azure/network-watcher/network-watcher-nsg-flow-logging-cli +- command: + name: network watcher flow-log configure + summary: Configure flow logging on a network security group. + arguments: + - name: --nsg + summary: Name or ID of the Network Security Group to target. + - name: --enabled + summary: Enable logging. + - name: --retention + summary: Number of days to retain logs. + - name: --storage-account + summary: Name or ID of the storage account in which to save the flow logs. + examples: + - summary: Enable NSG flow logs. + command: az network watcher flow-log configure -g MyResourceGroup --enabled true --nsg MyNsg --storage-account MyStorageAccount + - summary: Disable NSG flow logs. + command: az network watcher flow-log configure -g MyResourceGroup --enabled false --nsg MyNsg +- command: + name: network watcher flow-log show + summary: Get the flow log configuration of a network security group. + examples: + - summary: Show NSG flow logs. + command: az network watcher flow-log show -g MyResourceGroup --nsg MyNsg +- group: + name: network watcher troubleshooting + summary: Manage Network Watcher troubleshooting sessions. + description: > + For more information on configuring troubleshooting visit https://docs.microsoft.com/en-us/azure/network-watcher/network-watcher-troubleshoot-manage-cli +- command: + name: network watcher troubleshooting show + summary: Get the results of the last troubleshooting operation. + examples: + - summary: Show the results or status of a troubleshooting operation for a Vnet Gateway. + command: az network watcher troubleshooting show -g MyResourceGroup --resource MyVnetGateway --resource-type vnetGateway +- command: + name: network watcher troubleshooting start + summary: Troubleshoot issues with VPN connections or gateway connectivity. + arguments: + - name: --resource-type + summary: The type of target resource to troubleshoot, if resource ID is not specified. + - name: --storage-account + summary: Name or ID of the storage account in which to store the troubleshooting results. + - name: --storage-path + summary: Fully qualified URI to the storage blob container in which to store the troubleshooting results. + examples: + - summary: Start a troubleshooting operation on a VPN Connection. + command: | + az network watcher troubleshooting start -g MyResourceGroup --resource MyVPNConnection \ + --resource-type vpnConnection --storage-account MyStorageAccount \ + --storage-path https://{storageAccountName}.blob.core.windows.net/{containerName} diff --git a/src/command_modules/azure-cli-policyinsights/azure/cli/command_modules/policyinsights/help.yaml b/src/command_modules/azure-cli-policyinsights/azure/cli/command_modules/policyinsights/help.yaml new file mode 100644 index 00000000000..548b8a684cd --- /dev/null +++ b/src/command_modules/azure-cli-policyinsights/azure/cli/command_modules/policyinsights/help.yaml @@ -0,0 +1,164 @@ +version: 1 +content: +- group: + name: policy event + summary: Manage policy events. +- command: + name: policy event list + summary: List policy events. + examples: + - summary: Get policy events at current subscription scope created in the last day. + command: > + az policy event list + - summary: Get policy events at management group scope. + command: > + az policy event list -m "myMg" + - summary: Get policy events at resource group scope in current subscription. + command: > + az policy event list -g "myRg" + - summary: Get policy events for a resource using resource ID. + command: > + az policy event list --resource "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup /providers/Microsoft.EventHub/namespaces/myns1/eventhubs/eh1/consumergroups/cg1" + - summary: Get policy events for a resource using resource name. + command: > + az policy event list --resource "myKeyVault" --namespace "Microsoft.KeyVault" --resource-type "vaults" -g "myresourcegroup" + - summary: Get policy events for a nested resource using resource name. + command: > + az policy event list --resource "myRule1" --namespace "Microsoft.Network" --resource-type "securityRules" --parent "networkSecurityGroups/mysecuritygroup1" -g "myresourcegroup" + - summary: Get policy events for a policy set definition in current subscription. + command: > + az policy event list -s "fff58873-fff8-fff5-fffc-fffbe7c9d697" + - summary: Get policy events for a policy definition in current subscription. + command: > + az policy event list -d "fff69973-fff8-fff5-fffc-fffbe7c9d698" + - summary: Get policy events for a policy assignment in current subscription. + command: > + az policy event list -a "ddd8ef92e3714a5ea3d208c1" + - summary: Get policy events for a policy assignment in the specified resource group in current subscription. + command: > + az policy event list -g "myRg" -a "ddd8ef92e3714a5ea3d208c1" + - summary: Get top 5 policy events in current subscription, selecting a subset of properties and customizing ordering. + command: > + az policy event list --top 5 --order-by "timestamp desc, policyAssignmentName asc" --select "timestamp, resourceId, policyAssignmentId, policySetDefinitionId, policyDefinitionId" + - summary: Get policy events in current subscription during a custom time interval. + command: > + az policy event list --from "2018-03-08T00:00:00Z" --to "2018-03-15T00:00:00Z" + - summary: Get policy events in current subscription filtering results based on some property values. + command: > + az policy event list --filter "(policyDefinitionAction eq 'deny' or policyDefinitionAction eq 'audit') and resourceLocation ne 'eastus'" + - summary: Get number of policy events in current subscription. + command: > + az policy event list --apply "aggregate($count as numberOfRecords)" + - summary: Get policy events in current subscription aggregating results based on some properties. + command: > + az policy event list --apply "groupby((policyAssignmentId, policyDefinitionId, policyDefinitionAction, resourceId), aggregate($count as numEvents))" + - summary: Get policy events in current subscription grouping results based on some properties. + command: > + az policy event list --apply "groupby((policyAssignmentName, resourceId))" + - summary: Get policy events in current subscription aggregating results based on some properties specifying multiple groupings. + command: > + az policy event list --apply "groupby((policyAssignmentId, policyDefinitionId, resourceId))/groupby((policyAssignmentId, policyDefinitionId), aggregate($count as numResourcesWithEvents))" +- group: + name: policy state + summary: Manage policy compliance states. +- command: + name: policy state list + summary: List policy compliance states. + examples: + - summary: Get latest policy states at current subscription scope. + command: > + az policy state list + - summary: Get all policy states at current subscription scope. + command: > + az policy state list --all + - summary: Get latest policy states at management group scope. + command: > + az policy state list -m "myMg" + - summary: Get latest policy states at resource group scope in current subscription. + command: > + az policy state list -g "myRg" + - summary: Get latest policy states for a resource using resource ID. + command: > + az policy state list --resource "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup /providers/Microsoft.EventHub/namespaces/myns1/eventhubs/eh1/consumergroups/cg1" + - summary: Get latest policy states for a resource using resource name. + command: > + az policy state list --resource "myKeyVault" --namespace "Microsoft.KeyVault" --resource-type "vaults" -g "myresourcegroup" + - summary: Get latest policy states for a nested resource using resource name. + command: > + az policy state list --resource "myRule1" --namespace "Microsoft.Network" --resource-type "securityRules" --parent "networkSecurityGroups/mysecuritygroup1" -g "myresourcegroup" + - summary: Get latest policy states for a policy set definition in current subscription. + command: > + az policy state list -s "fff58873-fff8-fff5-fffc-fffbe7c9d697" + - summary: Get latest policy states for a policy definition in current subscription. + command: > + az policy state list -d "fff69973-fff8-fff5-fffc-fffbe7c9d698" + - summary: Get latest policy states for a policy assignment in current subscription. + command: > + az policy state list -a "ddd8ef92e3714a5ea3d208c1" + - summary: Get latest policy states for a policy assignment in the specified resource group in current subscription. + command: > + az policy state list -g "myRg" -a "ddd8ef92e3714a5ea3d208c1" + - summary: Get top 5 latest policy states in current subscription, selecting a subset of properties and customizing ordering. + command: > + az policy state list --top 5 --order-by "timestamp desc, policyAssignmentName asc" --select "timestamp, resourceId, policyAssignmentId, policySetDefinitionId, policyDefinitionId" + - summary: Get latest policy states in current subscription during a custom time interval. + command: > + az policy state list --from "2018-03-08T00:00:00Z" --to "2018-03-15T00:00:00Z" + - summary: Get latest policy states in current subscription filtering results based on some property values. + command: > + az policy state list --filter "(policyDefinitionAction eq 'deny' or policyDefinitionAction eq 'audit') and resourceLocation ne 'eastus'" + - summary: Get number of latest policy states in current subscription. + command: > + az policy state list --apply "aggregate($count as numberOfRecords)" + - summary: Get latest policy states in current subscription aggregating results based on some properties. + command: > + az policy state list --apply "groupby((policyAssignmentId, policySetDefinitionId, policyDefinitionReferenceId, policyDefinitionId), aggregate($count as numStates))" + - summary: Get latest policy states in current subscription grouping results based on some properties. + command: > + az policy state list --apply "groupby((policyAssignmentName, resourceId))" + - summary: Get latest policy states in current subscription aggregating results based on some properties specifying multiple groupings. + command: > + az policy state list --apply "groupby((policyAssignmentId, policySetDefinitionId, policyDefinitionReferenceId, policyDefinitionId, resourceId))/groupby((policyAssignmentId, policySetDefinitionId, policyDefinitionReferenceId, policyDefinitionId), aggregate($count as numNonCompliantResources))" +- command: + name: policy state summarize + summary: Summarize policy compliance states. + examples: + - summary: Get latest non-compliant policy states summary at current subscription scope. + command: > + az policy state summarize + - summary: Get latest non-compliant policy states summary at management group scope. + command: > + az policy state summarize -m "myMg" + - summary: Get latest non-compliant policy states summary at resource group scope in current subscription. + command: > + az policy state summarize -g "myRg" + - summary: Get latest non-compliant policy states summary for a resource using resource ID. + command: > + az policy state summarize --resource "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup /providers/Microsoft.EventHub/namespaces/myns1/eventhubs/eh1/consumergroups/cg1" + - summary: Get latest non-compliant policy states summary for a resource using resource name. + command: > + az policy state summarize --resource "myKeyVault" --namespace "Microsoft.KeyVault" --resource-type "vaults" -g "myresourcegroup" + - summary: Get latest non-compliant policy states summary for a nested resource using resource name. + command: > + az policy state summarize --resource "myRule1" --namespace "Microsoft.Network" --resource-type "securityRules" --parent "networkSecurityGroups/mysecuritygroup1" -g "myresourcegroup" + - summary: Get latest non-compliant policy states summary for a policy set definition in current subscription. + command: > + az policy state summarize -s "fff58873-fff8-fff5-fffc-fffbe7c9d697" + - summary: Get latest non-compliant policy states summary for a policy definition in current subscription. + command: > + az policy state summarize -d "fff69973-fff8-fff5-fffc-fffbe7c9d698" + - summary: Get latest non-compliant policy states summary for a policy assignment in current subscription. + command: > + az policy state summarize -a "ddd8ef92e3714a5ea3d208c1" + - summary: Get latest non-compliant policy states summary for a policy assignment in the specified resource group in current subscription. + command: > + az policy state summarize -g "myRg" -a "ddd8ef92e3714a5ea3d208c1" + - summary: Get latest non-compliant policy states summary in current subscription, limiting the assignments summary to top 5. + command: > + az policy state summarize --top 5 + - summary: Get latest non-compliant policy states summary in current subscription for a custom time interval. + command: > + az policy state summarize --from "2018-03-08T00:00:00Z" --to "2018-03-15T00:00:00Z" + - summary: Get latest non-compliant policy states summary in current subscription filtering results based on some property values. + command: > + az policy state summarize --filter "(policyDefinitionAction eq 'deny' or policyDefinitionAction eq 'audit') and resourceLocation ne 'eastus'" diff --git a/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/help.yaml b/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/help.yaml new file mode 100644 index 00000000000..467d42bfcbb --- /dev/null +++ b/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/help.yaml @@ -0,0 +1,53 @@ +version: 1 +content: +- command: + name: login + summary: Log in to Azure. + examples: + - summary: Log in interactively. + command: > + az login + - summary: Log in with user name and password. This doesn't work with Microsoft accounts or accounts that have two-factor authentication enabled. + command: > + az login -u johndoe@contoso.com -p VerySecret + - summary: Log in with a service principal using client secret. + command: > + az login --service-principal -u http://azure-cli-2016-08-05-14-31-15 -p VerySecret --tenant contoso.onmicrosoft.com + - summary: Log in with a service principal using client certificate. + command: > + az login --service-principal -u http://azure-cli-2016-08-05-14-31-15 -p ~/mycertfile.pem --tenant contoso.onmicrosoft.com + - summary: Log in using a VM's system assigned identity + command: > + az login --identity + - summary: Log in using a VM's user assigned identity. Client or object ids of the service identity also work + command: > + az login --identity -u /subscriptions//resourcegroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myID +- group: + name: account + summary: Manage Azure subscription information. +- command: + name: account clear + summary: Clear all subscriptions from the CLI's local cache. + description: To clear the current subscription, use 'az logout'. +- command: + name: account list + summary: Get a list of subscriptions for the logged in account. +- command: + name: account list-locations + summary: List supported regions for the current subscription. +- command: + name: account show + summary: Get the details of a subscription. + description: If the subscription isn't specified, shows the details of the default subscription. +- command: + name: account set + summary: Set a subscription to be the current active subscription. +- command: + name: account get-access-token + summary: Get a token for utilities to access Azure. + description: > + The token will be valid for at least 5 minutes with the maximum at 60 minutes. + If the subscription argument isn't specified, the current account is used. +- command: + name: self-test + summary: Runs a self-test of the CLI. diff --git a/src/command_modules/azure-cli-rdbms/azure/cli/command_modules/rdbms/help.yaml b/src/command_modules/azure-cli-rdbms/azure/cli/command_modules/rdbms/help.yaml new file mode 100644 index 00000000000..7242a9cc345 --- /dev/null +++ b/src/command_modules/azure-cli-rdbms/azure/cli/command_modules/rdbms/help.yaml @@ -0,0 +1,537 @@ +version: 1 +content: +- group: + name: mariadb + summary: Manage Azure Database for MariaDB servers. +- group: + name: mariadb server + summary: Manage MariaDB servers. +- command: + name: mariadb server create + summary: Create a server. + examples: + - summary: Create a MariaDB server with a Standard performance tier and 2 vcore in North Europe. + command: | + az mariadb server create -l northeurope -g testgroup -n testsvr -u username -p password \ + --sku-name "GP_Gen4_2" + - summary: Create a MariaDB server with all paramaters set. + command: | + az mariadb server create -l northeurope -g testgroup -n testsvr -u username -p password \ + --sku-name "B_Gen4_2" --ssl-enforcement Disabled \ + --storage-size 51200 --tags "key=value" --version {server-version} +- command: + name: mariadb server restore + summary: Restore a server from backup. + examples: + - summary: Restore 'testsvr' as 'testsvrnew'. + command: az mariadb server restore -g testgroup -n testsvrnew --source-server testsvr --restore-point-in-time "2017-06-15T13:10:00Z" + - summary: Restore 'testsvr2' to 'testsvrnew', where 'testsvrnew' is in a different resource group than the backup. + command: | + az mariadb server restore -g testgroup -n testsvrnew \ + -s "/subscriptions/${SubID}/resourceGroups/${ResourceGroup}/providers/Microsoft.DBforMariaDB/servers/testsvr2" \ + --restore-point-in-time "2017-06-15T13:10:00Z" +- command: + name: mariadb server georestore + summary: Georestore a server from backup. + examples: + - summary: Georestore 'testsvr' as 'testsvrnew' where 'testsvrnew' is in same resource group as 'testsvr'. + command: az mariadb server georestore -g testgroup -n testsvrnew --source-server testsvr -l westus2 + - summary: Georestore 'testsvr2' to 'testsvrnew', where 'testsvrnew' is in the different resource group as the original server. + command: | + az mariadb server georestore -g testgroup -n testsvrnew \ + -s "/subscriptions/${SubID}/resourceGroups/${ResourceGroup}/providers/Microsoft.DBforMariaDB/servers/testsvr2" \ + -l westus2 --sku-name GP_Gen4_2 +- group: + name: mysql server replica + summary: Manage cloud replication. +- command: + name: mysql server replica create + summary: Create a cloud replica for a server. + examples: + - summary: Create replica for server testsvr. + command: az mysql server replica create -n testreplsvr -g testgroup -s testsvr + - summary: Create replica testreplsvr for server testsvr2, where 'testreplsvr' is in a different resource group. + command: | + az mysql server replica create -n testreplsvr -g testgroup \ + -s "/subscriptions/${SubID}/resourceGroups/${ResourceGroup}/providers/Microsoft.DBforMySQL/servers/testsvr2" +- command: + name: mysql server replica stop + summary: Stop replica to make it an individual server. + examples: + - summary: Stop server testsvr as replica and make it an individual server. + command: az mysql server replica stop -g testgroup -n testsvr +- command: + name: mysql server replica list + summary: List all replicas for a given server. +- command: + name: mariadb server update + summary: Update a server. + examples: + - summary: Update a server's sku. + command: az mariadb server update -g testgroup -n testsvrnew --sku-name GP_Gen5_4 + - summary: Update a server's tags. + command: az mariadb server update -g testgroup -n testsvrnew --tags "k1=v1" "k2=v2" +- command: + name: mariadb server wait + summary: Wait for server to satisfy certain conditions. +- command: + name: mariadb server delete + summary: Delete a server. +- command: + name: mariadb server show + summary: Get the details of a server. +- command: + name: mariadb server list + summary: List available servers. + examples: + - summary: List all MariaDB servers in a subscription. + command: az mariadb server list + - summary: List all MariaDB servers in a resource group. + command: az mariadb server list -g testgroup +- group: + name: mariadb server firewall-rule + summary: Manage firewall rules for a server. +- command: + name: mariadb server firewall-rule create + summary: Create a new firewall rule for a server. + examples: + - summary: Create a firewall rule allowing all connections from all IP addresses. + command: az mariadb server firewall-rule create -g testgroup -s testsvr -n allowall --start-ip-address 0.0.0.0 --end-ip-address 255.255.255.255 +- command: + name: mariadb server firewall-rule update + summary: Update a firewall rule. + examples: + - summary: Update a firewall rule's start IP address. + command: az mariadb server firewall-rule update -g testgroup -s testsvr -n allowall --start-ip-address 0.0.0.1 + - summary: Update a firewall rule's start and end IP address. + command: az mariadb server firewall-rule update -g testgroup -s testsvr -n allowall --start-ip-address 0.0.0.1 --end-ip-address 255.255.255.254 +- command: + name: mariadb server firewall-rule delete + summary: Delete a firewall rule. +- command: + name: mariadb server firewall-rule show + summary: Get the details of a firewall rule. +- command: + name: mariadb server firewall-rule list + summary: List all firewall rules for a server. +- group: + name: mariadb server vnet-rule + summary: Manage a server's virtual network rules. +- command: + name: mariadb server vnet-rule update + summary: Update a virtual network rule. +- command: + name: mariadb server vnet-rule create + summary: Create a virtual network rule to allows access to a MariaDB server. + examples: + - summary: Create a virtual network rule by providing the subnet id. + command: az mariadb server vnet-rule create -g testgroup -s testsvr -n vnetRuleName --subnet /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Network/virtualNetworks/vnetName/subnets/subnetName + - summary: Create a vnet rule by providing the vnet and subnet name. The subnet id is created by taking the resource group name and subscription id of the server. + command: az mariadb server vnet-rule create -g testgroup -s testsvr -n vnetRuleName --subnet subnetName --vnet-name vnetName +- group: + name: mariadb server configuration + summary: Manage configuration values for a server. +- command: + name: mariadb server configuration set + summary: Update the configuration of a server. + examples: + - summary: Set a new configuration value. + command: az mariadb server configuration set -g testgroup -s testsvr -n {config_name} --value {config_value} + - summary: Set a configuration value to its default. + command: az mariadb server configuration set -g testgroup -s testsvr -n {config_name} +- command: + name: mariadb server configuration show + summary: Get the configuration for a server." +- command: + name: mariadb server configuration list + summary: List the configuration values for a server. +- group: + name: mariadb server-logs + summary: Manage server logs. +- command: + name: mariadb server-logs list + summary: List log files for a server. + examples: + - summary: List log files for 'testsvr' modified in the last 72 hours (default value). + command: az mariadb server-logs list -g testgroup -s testsvr + - summary: List log files for 'testsvr' modified in the last 10 hours. + command: az mariadb server-logs list -g testgroup -s testsvr --file-last-written 10 + - summary: List log files for 'testsvr' less than 30Kb in size. + command: az mariadb server-logs list -g testgroup -s testsvr --max-file-size 30 +- command: + name: mariadb server-logs download + summary: Download log files. + examples: + - summary: Download log files f1 and f2 to the current directory from the server 'testsvr'. + command: az mariadb server-logs download -g testgroup -s testsvr -n f1.log f2.log +- group: + name: mariadb db + summary: Manage MariaDB databases on a server. +- command: + name: mariadb db create + summary: Create a MariaDB database. + examples: + - summary: Create database 'testdb' in the server 'testsvr' with the default parameters. + command: az mariadb db create -g testgroup -s testsvr -n testdb + - summary: Create database 'testdb' in server 'testsvr' with a given character set and collation rules. + command: az mariadb db create -g testgroup -s testsvr -n testdb --charset {valid_charset} --collation {valid_collation} +- command: + name: mariadb db delete + summary: Delete a database. + examples: + - summary: Delete database 'testdb' in the server 'testsvr'. + command: az mariadb db delete -g testgroup -s testsvr -n testdb +- command: + name: mariadb db show + summary: Show the details of a database. + examples: + - summary: Show database 'testdb' in the server 'testsvr'. + command: az mariadb db show -g testgroup -s testsvr -n testdb +- command: + name: mariadb db list + summary: List the databases for a server. + examples: + - summary: List databases in the server 'testsvr'. + command: az mariadb db list -g testgroup -s testsvr +- group: + name: mysql + summary: Manage Azure Database for MySQL servers. +- group: + name: mysql server + summary: Manage MySQL servers. +- command: + name: mysql server create + summary: Create a server. + examples: + - summary: Create a MySQL server with a Standard performance tier and 2 vcore in North Europe. + command: | + az mysql server create -l northeurope -g testgroup -n testsvr -u username -p password \ + --sku-name "GP_Gen4_2" + - summary: Create a MySQL server with all paramaters set. + command: | + az mysql server create -l northeurope -g testgroup -n testsvr -u username -p password \ + --sku-name "B_Gen4_2" --ssl-enforcement Disabled \ + --storage-size 51200 --tags "key=value" --version {server-version} +- command: + name: mysql server restore + summary: Restore a server from backup. + examples: + - summary: Restore 'testsvr' as 'testsvrnew'. + command: az mysql server restore -g testgroup -n testsvrnew --source-server testsvr --restore-point-in-time "2017-06-15T13:10:00Z" + - summary: Restore 'testsvr2' to 'testsvrnew', where 'testsvrnew' is in a different resource group than the backup. + command: | + az mysql server restore -g testgroup -n testsvrnew \ + -s "/subscriptions/${SubID}/resourceGroups/${ResourceGroup}/providers/Microsoft.DBforMySQL/servers/testsvr2" \ + --restore-point-in-time "2017-06-15T13:10:00Z" +- command: + name: mysql server georestore + summary: Georestore a server from backup. + examples: + - summary: Georestore 'testsvr' as 'testsvrnew' where 'testsvrnew' is in same resource group as 'testsvr'. + command: az mysql server georestore -g testgroup -n testsvrnew --source-server testsvr -l westus2 + - summary: Georestore 'testsvr2' to 'testsvrnew', where 'testsvrnew' is in the different resource group as the original server. + command: | + az mysql server georestore -g testgroup -n testsvrnew \ + -s "/subscriptions/${SubID}/resourceGroups/${ResourceGroup}/providers/Microsoft.DBforMySQL/servers/testsvr2" \ + -l westus2 --sku-name GP_Gen4_2 +- command: + name: mysql server update + summary: Update a server. + examples: + - summary: Update a server's sku. + command: az mysql server update -g testgroup -n testsvrnew --sku-name GP_Gen5_4 + - summary: Update a server's tags. + command: az mysql server update -g testgroup -n testsvrnew --tags "k1=v1" "k2=v2" +- command: + name: mysql server wait + summary: Wait for server to satisfy certain conditions. +- command: + name: mysql server delete + summary: Delete a server. +- command: + name: mysql server show + summary: Get the details of a server. +- command: + name: mysql server list + summary: List available servers. + examples: + - summary: List all MySQL servers in a subscription. + command: az mysql server list + - summary: List all MySQL servers in a resource group. + command: az mysql server list -g testgroup +- group: + name: mysql server firewall-rule + summary: Manage firewall rules for a server. +- command: + name: mysql server firewall-rule create + summary: Create a new firewall rule for a server. + examples: + - summary: Create a firewall rule allowing all connections from all IP addresses. + command: az mysql server firewall-rule create -g testgroup -s testsvr -n allowall --start-ip-address 0.0.0.0 --end-ip-address 255.255.255.255 +- command: + name: mysql server firewall-rule update + summary: Update a firewall rule. + examples: + - summary: Update a firewall rule's start IP address. + command: az mysql server firewall-rule update -g testgroup -s testsvr -n allowall --start-ip-address 0.0.0.1 + - summary: Update a firewall rule's start and end IP address. + command: az mysql server firewall-rule update -g testgroup -s testsvr -n allowall --start-ip-address 0.0.0.1 --end-ip-address 255.255.255.254 +- command: + name: mysql server firewall-rule delete + summary: Delete a firewall rule. +- command: + name: mysql server firewall-rule show + summary: Get the details of a firewall rule. +- command: + name: mysql server firewall-rule list + summary: List all firewall rules for a server. +- group: + name: mysql server vnet-rule + summary: Manage a server's virtual network rules. +- command: + name: mysql server vnet-rule update + summary: Update a virtual network rule. +- command: + name: mysql server vnet-rule create + summary: Create a virtual network rule to allows access to a MySQL server. + examples: + - summary: Create a virtual network rule by providing the subnet id. + command: az mysql server vnet-rule create -g testgroup -s testsvr -n vnetRuleName --subnet /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Network/virtualNetworks/vnetName/subnets/subnetName + - summary: Create a vnet rule by providing the vnet and subnet name. The subnet id is created by taking the resource group name and subscription id of the server. + command: az mysql server vnet-rule create -g testgroup -s testsvr -n vnetRuleName --subnet subnetName --vnet-name vnetName +- group: + name: mysql server configuration + summary: Manage configuration values for a server. +- command: + name: mysql server configuration set + summary: Update the configuration of a server. + examples: + - summary: Set a new configuration value. + command: az mysql server configuration set -g testgroup -s testsvr -n {config_name} --value {config_value} + - summary: Set a configuration value to its default. + command: az mysql server configuration set -g testgroup -s testsvr -n {config_name} +- command: + name: mysql server configuration show + summary: Get the configuration for a server." +- command: + name: mysql server configuration list + summary: List the configuration values for a server. +- group: + name: mysql server-logs + summary: Manage server logs. +- command: + name: mysql server-logs list + summary: List log files for a server. + examples: + - summary: List log files for 'testsvr' modified in the last 72 hours (default value). + command: az mysql server-logs list -g testgroup -s testsvr + - summary: List log files for 'testsvr' modified in the last 10 hours. + command: az mysql server-logs list -g testgroup -s testsvr --file-last-written 10 + - summary: List log files for 'testsvr' less than 30Kb in size. + command: az mysql server-logs list -g testgroup -s testsvr --max-file-size 30 +- command: + name: mysql server-logs download + summary: Download log files. + examples: + - summary: Download log files f1 and f2 to the current directory from the server 'testsvr'. + command: az mysql server-logs download -g testgroup -s testsvr -n f1.log f2.log +- group: + name: mysql db + summary: Manage MySQL databases on a server. +- command: + name: mysql db create + summary: Create a MySQL database. + examples: + - summary: Create database 'testdb' in the server 'testsvr' with the default parameters. + command: az mysql db create -g testgroup -s testsvr -n testdb + - summary: Create database 'testdb' in server 'testsvr' with a given character set and collation rules. + command: az mysql db create -g testgroup -s testsvr -n testdb --charset {valid_charset} --collation {valid_collation} +- command: + name: mysql db delete + summary: Delete a database. + examples: + - summary: Delete database 'testdb' in the server 'testsvr'. + command: az mysql db delete -g testgroup -s testsvr -n testdb +- command: + name: mysql db show + summary: Show the details of a database. + examples: + - summary: Show database 'testdb' in the server 'testsvr'. + command: az mysql db show -g testgroup -s testsvr -n testdb +- command: + name: mysql db list + summary: List the databases for a server. + examples: + - summary: List databases in the server 'testsvr'. + command: az mysql db list -g testgroup -s testsvr +- group: + name: postgres + summary: Manage Azure Database for PostgreSQL servers. +- group: + name: postgres server + summary: Manage PostgreSQL servers. +- command: + name: postgres server create + summary: Create a server. + examples: + - summary: Create a PostgreSQL server with a Standard performance tier and 2 vcore in North Europe. + command: | + az postgres server create -l northeurope -g testgroup -n testsvr -u username -p password \ + --sku-name "GP_Gen4_2" + - summary: Create a PostgreSQL server with all paramaters set. + command: | + az postgres server create -l northeurope -g testgroup -n testsvr -u username -p password \ + --sku-name "B_Gen4_2" --ssl-enforcement Disabled \ + --storage-size 51200 --tags "key=value" --version {server-version} +- command: + name: postgres server restore + summary: Restore a server from backup. + examples: + - summary: Restore 'testsvr' as 'testsvrnew'. + command: az postgres server restore -g testgroup -n testsvrnew --source-server testsvr --restore-point-in-time "2017-06-15T13:10:00Z" + - summary: Restore 'testsvr2' to 'testsvrnew', where 'testsvrnew' is in a different resource group than the backup. + command: | + az postgres server restore -g testgroup -n testsvrnew \ + -s "/subscriptions/${SubID}/resourceGroups/${ResourceGroup}/providers/Microsoft.DBforPostgreSQL/servers/testsvr2" \ + --restore-point-in-time "2017-06-15T13:10:00Z" +- command: + name: postgres server georestore + summary: Georestore a server from backup. + examples: + - summary: Georestore 'testsvr' as 'testsvrnew' where 'testsvrnew' is in same resource group as 'testsvr'. + command: az postgres server georestore -g testgroup -n testsvrnew --source-server testsvr -l westus2 + - summary: Georestore 'testsvr2' to 'testsvrnew', where 'testsvrnew' is in the different resource group as the original server. + command: | + az postgres server georestore -g testgroup -n testsvrnew \ + -s "/subscriptions/${SubID}/resourceGroups/${ResourceGroup}/providers/Microsoft.DBforPostgreSQL/servers/testsvr2" \ + -l westus2 --sku-name GP_Gen4_2 +- command: + name: postgres server update + summary: Update a server. + examples: + - summary: Update a server's sku. + command: az postgres server update -g testgroup -n testsvrnew --sku-name GP_Gen5_4 + - summary: Update a server's tags. + command: az postgres server update -g testgroup -n testsvrnew --tags "k1=v1" "k2=v2" +- command: + name: postgres server wait + summary: Wait for server to satisfy certain conditions. +- command: + name: postgres server delete + summary: Delete a server. +- command: + name: postgres server show + summary: Get the details of a server. +- command: + name: postgres server list + summary: List available servers. + examples: + - summary: List all PostgreSQL servers in a subscription. + command: az postgres server list + - summary: List all PostgreSQL servers in a resource group. + command: az postgres server list -g testgroup +- group: + name: postgres server firewall-rule + summary: Manage firewall rules for a server. +- command: + name: postgres server firewall-rule create + summary: Create a new firewall rule for a server. + examples: + - summary: Create a firewall rule allowing all connections from all IP addresses. + command: az postgres server firewall-rule create -g testgroup -s testsvr -n allowall --start-ip-address 0.0.0.0 --end-ip-address 255.255.255.255 +- command: + name: postgres server firewall-rule update + summary: Update a firewall rule. + examples: + - summary: Update a firewall rule's start IP address. + command: az postgres server firewall-rule update -g testgroup -s testsvr -n allowall --start-ip-address 0.0.0.1 + - summary: Update a firewall rule's start and end IP address. + command: az postgres server firewall-rule update -g testgroup -s testsvr -n allowall --start-ip-address 0.0.0.1 --end-ip-address 255.255.255.254 +- command: + name: postgres server firewall-rule delete + summary: Delete a firewall rule. +- command: + name: postgres server firewall-rule show + summary: Get the details of a firewall rule. +- command: + name: postgres server firewall-rule list + summary: List all firewall rules for a server. +- group: + name: postgres server vnet-rule + summary: Manage a server's virtual network rules. +- command: + name: postgres server vnet-rule update + summary: Update a virtual network rule. +- command: + name: postgres server vnet-rule create + summary: Create a virtual network rule to allows access to a PostgreSQL server. + examples: + - summary: Create a virtual network rule by providing the subnet id. + command: az postgres server vnet-rule create -g testgroup -s testsvr -n vnetRuleName --subnet /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Network/virtualNetworks/vnetName/subnets/subnetName + - summary: Create a vnet rule by providing the vnet and subnet name. The subnet id is created by taking the resource group name and subscription id of the server. + command: az postgres server vnet-rule create -g testgroup -s testsvr -n vnetRuleName --subnet subnetName --vnet-name vnetName +- group: + name: postgres server configuration + summary: Manage configuration values for a server. +- command: + name: postgres server configuration set + summary: Update the configuration of a server. + examples: + - summary: Set a new configuration value. + command: az postgres server configuration set -g testgroup -s testsvr -n {config_name} --value {config_value} + - summary: Set a configuration value to its default. + command: az postgres server configuration set -g testgroup -s testsvr -n {config_name} +- command: + name: postgres server configuration show + summary: Get the configuration for a server." +- command: + name: postgres server configuration list + summary: List the configuration values for a server. +- group: + name: postgres server-logs + summary: Manage server logs. +- command: + name: postgres server-logs list + summary: List log files for a server. + examples: + - summary: List log files for 'testsvr' modified in the last 72 hours (default value). + command: az postgres server-logs list -g testgroup -s testsvr + - summary: List log files for 'testsvr' modified in the last 10 hours. + command: az postgres server-logs list -g testgroup -s testsvr --file-last-written 10 + - summary: List log files for 'testsvr' less than 30Kb in size. + command: az postgres server-logs list -g testgroup -s testsvr --max-file-size 30 +- command: + name: postgres server-logs download + summary: Download log files. + examples: + - summary: Download log files f1 and f2 to the current directory from the server 'testsvr'. + command: az postgres server-logs download -g testgroup -s testsvr -n f1.log f2.log +- group: + name: postgres db + summary: Manage PostgreSQL databases on a server. +- command: + name: postgres db create + summary: Create a PostgreSQL database. + examples: + - summary: Create database 'testdb' in the server 'testsvr' with the default parameters. + command: az postgres db create -g testgroup -s testsvr -n testdb + - summary: Create database 'testdb' in server 'testsvr' with a given character set and collation rules. + command: az postgres db create -g testgroup -s testsvr -n testdb --charset {valid_charset} --collation {valid_collation} +- command: + name: postgres db delete + summary: Delete a database. + examples: + - summary: Delete database 'testdb' in the server 'testsvr'. + command: az postgres db delete -g testgroup -s testsvr -n testdb +- command: + name: postgres db show + summary: Show the details of a database. + examples: + - summary: Show database 'testdb' in the server 'testsvr'. + command: az postgres db show -g testgroup -s testsvr -n testdb +- command: + name: postgres db list + summary: List the databases for a server. + examples: + - summary: List databases in the server 'testsvr'. + command: az postgres db list -g testgroup -s testsvr diff --git a/src/command_modules/azure-cli-redis/azure/cli/command_modules/redis/help.yaml b/src/command_modules/azure-cli-redis/azure/cli/command_modules/redis/help.yaml new file mode 100644 index 00000000000..d328512f487 --- /dev/null +++ b/src/command_modules/azure-cli-redis/azure/cli/command_modules/redis/help.yaml @@ -0,0 +1,29 @@ +version: 1 +content: +- group: + name: redis + summary: Manage dedicated Redis caches for your Azure applications. +- command: + name: redis export + summary: Export data stored in a Redis cache. +- command: + name: redis import + summary: Import data into a Redis cache. +- command: + name: redis import-method + summary: Import data into a Redis cache. +- command: + name: redis list + summary: List Redis caches. +- command: + name: redis list-all + summary: Gets all Redis caches in the specified subscription. +- command: + name: redis update-settings + summary: Update the settings of a Redis cache. +- command: + name: redis update + summary: Scale or update settings of a Redis cache. +- group: + name: redis patch-schedule + summary: Manage Redis patch schedules. diff --git a/src/command_modules/azure-cli-relay/azure/cli/command_modules/relay/help.yaml b/src/command_modules/azure-cli-relay/azure/cli/command_modules/relay/help.yaml new file mode 100644 index 00000000000..5764556229c --- /dev/null +++ b/src/command_modules/azure-cli-relay/azure/cli/command_modules/relay/help.yaml @@ -0,0 +1,256 @@ +version: 1 +content: +- group: + name: relay + summary: Manage Azure Relay Service namespaces, WCF relays, hybrid connections, and rules +- group: + name: relay namespace + summary: Manage Azure Relay Service Namespace +- group: + name: relay namespace authorization-rule + summary: Manage Azure Relay Service Namespace Authorization Rule +- group: + name: relay namespace authorization-rule keys + summary: Manage Azure Authorization Rule connection strings for Namespace +- group: + name: relay wcfrelay + summary: Manage Azure Relay Service WCF Relay and Authorization Rule +- group: + name: relay wcfrelay authorization-rule + summary: Manage Azure Relay Service WCF Relay Authorization Rule +- group: + name: relay wcfrelay authorization-rule keys + summary: Manage Azure Authorization Rule keys for Relay Service WCF Relay +- group: + name: relay hyco + summary: Manage Azure Relay Service Hybrid Connection and Authorization Rule +- group: + name: relay hyco authorization-rule + summary: Manage Azure Relay Service Hybrid Connection Authorization Rule +- group: + name: relay hyco authorization-rule keys + summary: Manage Azure Authorization Rule keys for Relay Service Hybrid Connection +- command: + name: relay namespace exists + summary: check for the availability of the given name for the Namespace + examples: + - summary: check for the availability of mynamespace for the Namespace + command: az relay namespace exists --name mynamespace +- command: + name: relay namespace create + summary: Create a Relay Service Namespace + examples: + - summary: Create a Relay Service Namespace. + command: az relay namespace create --resource-group myresourcegroup --name mynamespace --location westus --tags tag1=value1 tag2=value2 +- command: + name: relay namespace update + summary: Updates a Relay Service Namespace + examples: + - summary: Updates a Relay Service Namespace. + command: az relay namespace update --resource-group myresourcegroup --name mynamespace --tags tag=value +- command: + name: relay namespace show + summary: Shows the Relay Service Namespace details + examples: + - summary: shows the Namespace details. + command: az relay namespace show --resource-group myresourcegroup --name mynamespace +- command: + name: relay namespace list + summary: List the Relay Service Namespaces + examples: + - summary: Get the Relay Service Namespaces by resource group + command: az relay namespace list --resource-group myresourcegroup + - summary: Get the Relay Service Namespaces by Subscription. + command: az relay namespace list +- command: + name: relay namespace delete + summary: Deletes the Relay Service Namespace + examples: + - summary: Deletes the Relay Service Namespace + command: az relay namespace delete --resource-group myresourcegroup --name mynamespace +- command: + name: relay namespace authorization-rule create + summary: Create Authorization Rule for the given Relay Service Namespace + examples: + - summary: Create Authorization Rule 'myrule' for the given Relay Service Namespace 'mynamespace' in resourcegroup + command: az relay namespace authorization-rule create --resource-group myresourcegroup --namespace-name mynamespace --name myauthorule --rights Send Listen +- command: + name: relay namespace authorization-rule update + summary: Updates Authorization Rule for the given Relay Service Namespace + examples: + - summary: Updates Authorization Rule 'myrule' for the given Relay Service Namespace 'mynamespace' in resourcegroup + command: az relay namespace authorization-rule update --resource-group myresourcegroup --namespace-name mynamespace --name myauthorule --rights Send +- command: + name: relay namespace authorization-rule show + summary: Shows the details of Relay Service Namespace Authorization Rule + examples: + - summary: Shows the details of Relay Service Namespace Authorization Rule + command: az relay namespace authorization-rule show --resource-group myresourcegroup --namespace-name mynamespace --name myauthorule +- command: + name: relay namespace authorization-rule list + summary: Shows the list of Authorization Rule by Relay Service Namespace + examples: + - summary: Shows the list of Authorization Rule by Relay Service Namespace + command: az relay namespace authorization-rule list --resource-group myresourcegroup --namespace-name mynamespace +- command: + name: relay namespace authorization-rule keys list + summary: List the keys and connection strings of Authorization Rule for Relay Service Namespace + examples: + - summary: List the keys and connection strings of Authorization Rule for Relay Service Namespace + command: az relay namespace authorization-rule keys list --resource-group myresourcegroup --namespace-name mynamespace --name myauthorule +- command: + name: relay namespace authorization-rule keys renew + summary: Regenerate keys of Authorization Rule for the Relay Service Namespace. + examples: + - summary: Regenerate keys of Authorization Rule for the Relay Service Namespace. + command: az relay namespace authorization-rule keys renew --resource-group myresourcegroup --namespace-name mynamespace --name myauthorule --key PrimaryKey +- command: + name: relay namespace authorization-rule delete + summary: Deletes the Authorization Rule of the Relay Service Namespace. + examples: + - summary: Deletes the Authorization Rule of the Relay Service Namespace. + command: az relay namespace authorization-rule delete --resource-group myresourcegroup --namespace-name mynamespace --name myauthorule +- command: + name: relay wcfrelay create + summary: Create the Relay Service WCF Relay + examples: + - summary: Create Relay Service WCF Relay. + command: az relay wcfrelay create --resource-group myresourcegroup --namespace-name mynamespace --name myrelay --relay-type NetTcp +- command: + name: relay wcfrelay update + summary: Updates existing Relay Service WCF Relay + examples: + - summary: Updates Relay Service WCF Relay. + command: az relay wcfrelay update --resource-group myresourcegroup --namespace-name mynamespace --name myrelay +- command: + name: relay wcfrelay show + summary: shows the Relay Service WCF Relay Details + examples: + - summary: Shows the Relay Service WCF Relay Details + command: az relay wcfrelay show --resource-group myresourcegroup --namespace-name mynamespace --name myrelay +- command: + name: relay wcfrelay list + summary: List the WCF Relay by Relay Service Namepsace + examples: + - summary: Get the WCF Relays by Relay Service Namespace. + command: az relay wcfrelay list --resource-group myresourcegroup --namespace-name mynamespace +- command: + name: relay wcfrelay delete + summary: Deletes the Relay Service WCF Relay + examples: + - summary: Deletes the wcfrelay + command: az relay wcfrelay delete --resource-group myresourcegroup --namespace-name mynamespace --name myrelay +- command: + name: relay wcfrelay authorization-rule create + summary: Create Authorization Rule for the given Relay Service WCF Relay. + examples: + - summary: Create Authorization Rule for WCF Relay + command: az relay wcfrelay authorization-rule create --resource-group myresourcegroup --namespace-name mynamespace --relay-name myrelay --name myauthorule --rights Listen +- command: + name: relay wcfrelay authorization-rule update + summary: Update Authorization Rule for the given Relay Service WCF Relay. + examples: + - summary: Update Authorization Rule for WCF Relay + command: az relay wcfrelay authorization-rule update --resource-group myresourcegroup --namespace-name mynamespace --relay-name myrelay --name myauthorule --rights Send +- command: + name: relay wcfrelay authorization-rule show + summary: show properties of Authorization Rule for the given Relay Service WCF Relay. + examples: + - summary: show properties of Authorization Rule + command: az relay wcfrelay authorization-rule show --resource-group myresourcegroup --namespace-name mynamespace --relay-name myrelay --name myauthorule +- command: + name: relay wcfrelay authorization-rule list + summary: List of Authorization Rule by Relay Service WCF Relay. + examples: + - summary: List of Authorization Rule by WCF Relay + command: az relay wcfrelay authorization-rule list --resource-group myresourcegroup --namespace-name mynamespace --relay-name myrelay +- command: + name: relay wcfrelay authorization-rule keys list + summary: List the keys and connection strings of Authorization Rule for the given Relay Service WCF Relay + examples: + - summary: List the keys and connection strings of Authorization Rule for the given Relay Service WCF Relay + command: az relay wcfrelay authorization-rule keys list --resource-group myresourcegroup --namespace-name mynamespace --relay-name myrelay --name myauthorule +- command: + name: relay wcfrelay authorization-rule keys renew + summary: Regenerate keys of Authorization Rule for Relay Service WCF Relay + examples: + - summary: Regenerate keys of Authorization Rule for Relay Service WCF Relay + command: az relay wcfrelay authorization-rule keys renew --resource-group myresourcegroup --namespace-name mynamespace --relay-name myrelay --name myauthorule --key PrimaryKey +- command: + name: relay wcfrelay authorization-rule delete + summary: Delete the Authorization Rule of Relay Service WCF Relay + examples: + - summary: Delete the Authorization Rule of Relay Service WCF Relay + command: az relay wcfrelay authorization-rule delete --resource-group myresourcegroup --namespace-name mynamespace --relay-name myrelay --name myauthorule +- command: + name: relay hyco create + summary: Create the Relay Service Hybrid Connection + examples: + - summary: Create a new Relay Service Hybrid Connection + command: az relay hyco create --resource-group myresourcegroup --namespace-name mynamespace --name myhyco +- command: + name: relay hyco update + summary: Updates the Relay Service Hybrid Connection + examples: + - summary: Updates existing Relay Service Hybrid Connection. + command: az relay hyco update --resource-group myresourcegroup --namespace-name mynamespace --name myhyco +- command: + name: relay hyco show + summary: Shows the Relay Service Hybrid Connection Details + examples: + - summary: Shows the Hybrid Connection details. + command: az relay hyco show --resource-group myresourcegroup --namespace-name mynamespace --name myhyco +- command: + name: relay hyco list + summary: List the Hybrid Connection by Relay Service Namepsace + examples: + - summary: Get the Hybrid Connections by Namespace. + command: az relay hyco list --resource-group myresourcegroup --namespace-name mynamespace +- command: + name: relay hyco delete + summary: Deletes the Relay Service Hybrid Connection + examples: + - summary: Deletes the Relay Service Hybrid Connection + command: az relay hyco delete --resource-group myresourcegroup --namespace-name mynamespace --name myhyco +- command: + name: relay hyco authorization-rule create + summary: Create Authorization Rule for given Relay Service Hybrid Connection + examples: + - summary: Create Authorization Rule for given Relay Service Hybrid Connection + command: az relay hyco authorization-rule create --resource-group myresourcegroup --namespace-name mynamespace --hybrid-connection-name myhyco --name myauthorule --rights Send Listen +- command: + name: relay hyco authorization-rule update + summary: Create Authorization Rule for given Relay Service Hybrid Connection + examples: + - summary: Create Authorization Rule for given Relay Service Hybrid Connection + command: az relay hyco authorization-rule update --resource-group myresourcegroup --namespace-name mynamespace --hybrid-connection-name myhyco --name myauthorule --rights Send +- command: + name: relay hyco authorization-rule show + summary: Shows the details of Authorization Rule for given Relay Service Hybrid Connection + examples: + - summary: Shows the details of Authorization Rule for given Relay Service Hybrid Connection + command: az relay hyco authorization-rule show --resource-group myresourcegroup --namespace-name mynamespace --hybrid-connection-name myhyco --name myauthorule +- command: + name: relay hyco authorization-rule list + summary: shows list of Authorization Rule by Relay Service Hybrid Connection + examples: + - summary: shows list of Authorization Rule by Relay Service Hybrid Connection + command: az relay hyco authorization-rule list --resource-group myresourcegroup --namespace-name mynamespace --hybrid-connection-name myhyco +- command: + name: relay hyco authorization-rule keys list + summary: List the keys and connection strings of Authorization Rule for Relay Service Hybrid Connection. + examples: + - summary: List the keys and connection strings of Authorization Rule for Relay Service Hybrid Connection. + command: az relay hyco authorization-rule keys list --resource-group myresourcegroup --namespace-name mynamespace --hybrid-connection-name myhyco --name myauthorule +- command: + name: relay hyco authorization-rule keys renew + summary: Regenerate keys of Authorization Rule for Relay Service Hybrid Connection. + examples: + - summary: Regenerate key of Relay Service Hybrid Connection. + command: az relay hyco authorization-rule keys renew --resource-group myresourcegroup --namespace-name mynamespace --hybrid-connection-name myhyco --name myauthorule --key PrimaryKey +- command: + name: relay hyco authorization-rule delete + summary: Deletes the Authorization Rule of the given Relay Service Hybrid Connection. + examples: + - summary: Deletes the Authorization Rule of Relay Service Hybrid Connection. + command: az relay hyco authorization-rule delete --resource-group myresourcegroup --namespace-name mynamespace --hybrid-connection-name myhyco --name myauthorule diff --git a/src/command_modules/azure-cli-reservations/azure/cli/command_modules/reservations/help.yaml b/src/command_modules/azure-cli-reservations/azure/cli/command_modules/reservations/help.yaml new file mode 100644 index 00000000000..6d2b4ea7e09 --- /dev/null +++ b/src/command_modules/azure-cli-reservations/azure/cli/command_modules/reservations/help.yaml @@ -0,0 +1,107 @@ +version: 1 +content: +- group: + name: reservations + summary: Manage Azure Reservations. +- group: + name: reservations catalog + summary: See catalog of available reservations +- group: + name: reservations reservation + summary: Manage reservation entities +- group: + name: reservations reservation-order + summary: Manage reservation order, which is container for reservations +- group: + name: reservations reservation-order-id + summary: See reservation order ids that are applied to subscription +- command: + name: reservations reservation-order list + summary: Get all reservation orders + description: | + List of all the reservation orders that the user has access to in the current tenant. +- command: + name: reservations reservation-order show + summary: Get a specific reservation order. + description: Get the details of the reservation order. + arguments: + - name: --reservation-order-id + summary: Id of reservation order to look up +- command: + name: reservations reservation-order-id list + summary: Get list of applicable reservation order ids. + description: | + Get applicable reservations that are applied to this subscription. + arguments: + - name: --subscription-id + summary: Id of the subscription to look up applied reservations +- command: + name: reservations catalog show + summary: Get catalog of available reservation. + description: | + Get the regions and skus that are available for RI purchase for the specified Azure subscription. + arguments: + - name: --subscription-id + summary: Id of the subscription to get the catalog for + - name: --reserved-resource-type + summary: Type of the resource for which the skus should be provided. +- command: + name: reservations reservation list + summary: Get all reservations. + description: | + List all reservations within a reservation order. + arguments: + - name: --reservation-order-id + summary: Id of container reservation order +- command: + name: reservations reservation show + summary: Get details of a reservation. + arguments: + - name: --reservation-order-id + summary: Order id of reservation to look up + - name: --reservation-id + summary: Reservation id of reservation to look up +- command: + name: reservations reservation update + summary: Updates the applied scopes of the reservation. + arguments: + - name: --reservation-order-id + summary: Reservation order id of the reservation to update + - name: --reservation-id + summary: Id of the reservation to update + - name: --applied-scope-type + summary: Type of the Applied Scope to update the reservation with + - name: --applied-scopes + summary: Subscription that the benefit will be applied. Do not specify if AppliedScopeType is Shared. + - name: --instance-flexibility + summary: Type of the Instance Flexibility to update the reservation with +- command: + name: reservations reservation split + summary: Split a reservation. + arguments: + - name: --reservation-order-id + summary: Reservation order id of the reservation to split + - name: --reservation-id + summary: Reservation id of the reservation to split + - name: --quantity-1 + summary: Quantity of the first reservation that will be created from split operation + - name: --quantity-2 + summary: Quantity of the second reservation that will be created from split operation +- command: + name: reservations reservation merge + summary: Merge two reservations. + arguments: + - name: --reservation-order-id + summary: Reservation order id of the reservations to merge + - name: --reservation-id-1 + summary: Id of the first reservation to merge + - name: --reservation-id-2 + summary: Id of the second reservation to merge +- command: + name: reservations reservation list-history + summary: Get history of a reservation. + arguments: + - name: --reservation-order-id + summary: Order id of the reservation + - name: --reservation-id + summary: Reservation id of the reservation diff --git a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/help.yaml b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/help.yaml new file mode 100644 index 00000000000..2c201c150b8 --- /dev/null +++ b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/help.yaml @@ -0,0 +1,846 @@ +version: 1 +content: +- group: + name: managedapp + summary: Manage template solutions provided and maintained by Independent Software Vendors (ISVs). +- group: + name: managedapp definition + summary: Manage Azure Managed Applications. +- command: + name: managedapp create + summary: Create a managed application. + examples: + - summary: Create a managed application of kind 'ServiceCatalog'. This requires a valid managed application definition ID. + command: | + az managedapp create -g MyResourceGroup -n MyManagedApp -l westcentralus --kind ServiceCatalog \ + -m "/subscriptions/{SubID}/resourceGroups/{ManagedResourceGroup}" \ + -d "/subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Solutions/applianceDefinitions/{ApplianceDefinition}" + - summary: Create a managed application of kind 'MarketPlace'. This requires a valid plan, containing details about existing marketplace package like plan name, version, publisher and product. + command: | + az managedapp create -g MyResourceGroup -n MyManagedApp -l westcentralus --kind MarketPlace \ + -m "/subscriptions/{SubID}/resourceGroups/{ManagedResourceGroup}" \ + --plan-name ContosoAppliance --plan-version "1.0" --plan-product "contoso-appliance" --plan-publisher Contoso +- command: + name: managedapp definition create + summary: Create a managed application definition. + examples: + - summary: Create a managed application defintion. + command: > + az managedapp definition create -g MyResourceGroup -n MyManagedAppDef -l eastus --display-name "MyManagedAppDef" \ + --description "My Managed App Def description" -a "myPrincipalId:myRoleId" --lock-level None \ + --package-file-uri "https://path/to/myPackage.zip" + - summary: Create a managed application defintion with inline values for createUiDefinition and mainTemplate. + command: > + az managedapp definition create -g MyResourceGroup -n MyManagedAppDef -l eastus --display-name "MyManagedAppDef" \ + --description "My Managed App Def description" -a "myPrincipalId:myRoleId" --lock-level None \ + --create-ui-definition @myCreateUiDef.json --main-template @myMainTemplate.json +- command: + name: managedapp definition delete + summary: Delete a managed application definition. +- command: + name: managedapp definition list + summary: List managed application definitions. +- command: + name: managedapp delete + summary: Delete a managed application. +- command: + name: managedapp list + summary: List managed applications. +- group: + name: lock + summary: Manage Azure locks. +- command: + name: lock create + summary: Create a lock. + description: 'Locks can exist at three different scopes: subscription, resource group and resource.' + examples: + - summary: Create a read-only subscription level lock. + command: > + az lock create --name lockName --resource-group group --lock-type ReadOnly +- command: + name: lock delete + summary: Delete a lock. + examples: + - summary: Delete a resource group-level lock + command: > + az lock delete --name lockName --resource-group group +- command: + name: lock list + summary: List lock information. + examples: + - summary: List out the locks on a vnet resource. Includes locks in the associated group and subscription. + command: > + az lock list --resource myvnet --resource-type Microsoft.Network/virtualNetworks -g group + - summary: List out all locks on the subscription level + command: > + az lock list +- command: + name: lock show + summary: Show the properties of a lock + examples: + - summary: Show a subscription level lock + command: > + az lock show -n lockname +- command: + name: lock update + summary: Update a lock. + examples: + - summary: Update a resource group level lock with new notes and type + command: > + az lock update --name lockName --resource-group group --notes newNotesHere --lock-type CanNotDelete +- group: + name: account lock + summary: Manage Azure subscription level locks. +- command: + name: account lock create + summary: Create a subscription lock. + examples: + - summary: Create a read-only subscription level lock. + command: > + az account lock create --lock-type ReadOnly -n lockName +- command: + name: account lock delete + summary: Delete a subscription lock. + examples: + - summary: Delete a subscription lock + command: > + az account lock delete --name lockName +- command: + name: account lock list + summary: List lock information in the subscription. + examples: + - summary: List out all locks on the subscription level + command: > + az account lock list +- command: + name: account lock show + summary: Show the details of a subscription lock + examples: + - summary: Show a subscription level lock + command: > + az account lock show -n lockname +- command: + name: account lock update + summary: Update a subscription lock. + examples: + - summary: Update a subscription lock with new notes and type + command: > + az account lock update --name lockName --notes newNotesHere --lock-type CanNotDelete +- group: + name: account management-group + summary: Manage Azure Management Groups. +- group: + name: account management-group subscription + summary: Subscription operations for Management Groups. +- command: + name: account management-group list + summary: List all management groups. + description: List of all management groups in the current tenant. + examples: + - summary: List all management groups + command: > + az account management-group list +- command: + name: account management-group show + summary: Get a specific management group. + description: Get the details of the management group. + arguments: + - name: --name + summary: Name of the management group. + - name: --expand + summary: If given, lists the children in the first level of hierarchy. + - name: --recurse + summary: If given, lists the children in all levels of hierarchy. + examples: + - summary: Get a management group. + command: > + az account management-group show --name GroupName + - summary: Get a management group with children in the first level of hierarchy. + command: > + az account management-group show --name GroupName -e + - summary: Get a management group with children in all levels of hierarchy. + command: > + az account management-group show --name GroupName -e -r +- command: + name: account management-group create + summary: Create a new management group. + description: Create a new management group. + arguments: + - name: --name + summary: Name of the management group. + - name: --display-name + summary: Sets the display name of the management group. If null, the group name is set as the display name. + - name: --parent + summary: Sets the parent of the management group. Can be the fully qualified id or the name of the management group. If null, the root tenant group is set as the parent. + examples: + - summary: Create a new management group. + command: > + az account management-group create --name GroupName + - summary: Create a new management group with a specific display name. + command: > + az account management-group create --name GroupName --display-name DisplayName + - summary: Create a new management group with a specific parent. + command: > + az account management-group create --name GroupName --parent ParentId/ParentName + - summary: Create a new management group with a specific display name and parent. + command: > + az account management-group create --name GroupName --display-name DisplayName --parent ParentId/ParentName +- command: + name: account management-group update + summary: Update an existing management group. + description: Update an existing management group. + arguments: + - name: --name + summary: Name of the management group. + - name: --display-name + summary: Updates the display name of the management group. If null, no change is made. + - name: --parent + summary: Update the parent of the management group. Can be the fully qualified id or the name of the management group. If null, no change is made. + examples: + - summary: Update an existing management group with a specific display name. + command: > + az account management-group update --name GroupName --display-name DisplayName + - summary: Update an existing management group with a specific parent. + command: > + az account management-group update --name GroupName --parent ParentId/ParentName + - summary: Update an existing management group with a specific display name and parent. + command: > + az account management-group update --name GroupName --display-name DisplayName --parent ParentId/ParentName +- command: + name: account management-group delete + summary: Delete an existing management group. + description: Delete an existing management group. + arguments: + - name: --name + summary: Name of the management group. + examples: + - summary: Delete an existing management group + command: > + az account management-group delete --name GroupName +- command: + name: account management-group subscription add + summary: Add a subscription to a management group. + description: Add a subscription to a management group. + arguments: + - name: --name + summary: Name of the management group. + - name: --subscription + summary: Subscription Id or Name + examples: + - summary: Add a subscription to a management group. + command: > + az account management-group subscription add --name GroupName --subscription Subscription +- command: + name: account management-group subscription remove + summary: Remove an existing subscription from a management group. + description: Remove an existing subscription from a management group. + arguments: + - name: --name + summary: Name of the management group. + - name: --subscription + summary: Subscription Id or Name + examples: + - summary: Remove an existing subscription from a management group. + command: > + az account management-group subscription remove --name GroupName --subscription Subscription +- group: + name: policy + summary: Manage resource policies. +- group: + name: policy definition + summary: Manage resource policy definitions. +- command: + name: policy definition create + summary: Create a policy definition. + arguments: + - name: --rules + summary: Policy rules in JSON format, or a path to a file containing JSON rules. + - name: --management-group + summary: Name of the management group the new policy definition can be assigned in. + - name: --subscription + summary: Name or id of the subscription the new policy definition can be assigned in. + examples: + - summary: Create a read-only policy. + command: | + az policy definition create --name readOnlyStorage --rules '{ \ + "if": \ + { \ + "field": "type", \ + "equals": "Microsoft.Storage/storageAccounts/write" \ + }, \ + "then": \ + { \ + "effect": "deny" \ + } \ + }' + - summary: Create a policy parameter definition. + command: | + az policy definition create --name allowedLocations --rules '{ \ + "if": { \ + "allOf": [ \ + { \ + "field": "location", \ + "notIn": "[parameters('listOfAllowedLocations')]" \ + }, \ + { \ + "field": "location", \ + "notEquals": "global" \ + }, \ + { \ + "field": "type", \ + "notEquals": "Microsoft.AzureActiveDirectory/b2cDirectories" \ + } \ + ] \ + }, \ + "then": { \ + "effect": "deny" \ + } \ + }' \ + --params '{ \ + "allowedLocations": { \ + "type": "array", \ + "metadata": { \ + "description": "The list of locations that can be specified when deploying resources", \ + "strongType": "location", \ + "displayName": "Allowed locations" \ + } \ + } \ + }' + - summary: Create a read-only policy that can be applied within a management group. + command: | + az policy definition create -n readOnlyStorage --management-group 'MyManagementGroup' --rules '{ \ + "if": \ + { \ + "field": "type", \ + "equals": "Microsoft.Storage/storageAccounts/write" \ + }, \ + "then": \ + { \ + "effect": "deny" \ + } \ + }' +- command: + name: policy definition delete + summary: Delete a policy definition. +- command: + name: policy definition show + summary: Show a policy definition. +- command: + name: policy definition update + summary: Update a policy definition. +- command: + name: policy definition list + summary: List policy definitions. +- group: + name: policy set-definition + summary: Manage resource policy set definitions. +- command: + name: policy set-definition create + summary: Create a policy set definition. + arguments: + - name: --definitions + summary: Policy definitions in JSON format, or a path to a file containing JSON rules. + - name: --management-group + summary: Name of management group the new policy set definition can be assigned in. + - name: --subscription + summary: Name or id of the subscription the new policy set definition can be assigned in. + examples: + - summary: Create a policy set definition. + command: | + az policy set-definition create -n readOnlyStorage --definitions '[ \ + { \ + "policyDefinitionId": "/subscriptions/mySubId/providers/Microsoft.Authorization/policyDefinitions/storagePolicy" \ + } \ + ]' + - summary: Create a policy set definition to be used by a subscription. + command: | + az policy set-definition create -n readOnlyStorage --subscription '0b1f6471-1bf0-4dda-aec3-111122223333' --definitions '[ \ + { \ + "policyDefinitionId": "/subscriptions/mySubId/providers/Microsoft.Authorization/policyDefinitions/storagePolicy" \ + } \ + ]' +- command: + name: policy set-definition delete + summary: Delete a policy set definition. +- command: + name: policy set-definition show + summary: Show a policy set definition. +- command: + name: policy set-definition update + summary: Update a policy set definition. +- command: + name: policy set-definition list + summary: List policy set definitions. +- group: + name: policy assignment + summary: Manage resource policy assignments. +- command: + name: policy assignment create + summary: Create a resource policy assignment. + arguments: + - name: --scope + summary: Scope to which this policy assignment applies. + examples: + - summary: Create a resource policy assignment at scope + command: | + Valid scopes are management group, subscription, resource group, and resource, for example + management group: /providers/Microsoft.Management/managementGroups/MyManagementGroup + subscription: /subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333 + resource group: /subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup + resource: /subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup/providers/Microsoft.Compute/virtualMachines/myVM + az policy assignment create --scope '/providers/Microsoft.Management/managementGroups/MyManagementGroup' --policy {PolicyName} -p '{ \ + "allowedLocations": { \ + "value": [ \ + "australiaeast", \ + "eastus", \ + "japaneast" \ + ] \ + } \ + }' + - summary: Create a resource policy assignment and provide rule parameter values. + command: | + az policy assignment create --policy {PolicyName} -p '{ \ + "allowedLocations": { \ + "value": [ \ + "australiaeast", \ + "eastus", \ + "japaneast" \ + ] \ + } \ + }' + - summary: Create a resource policy assignment with a system assigned identity. + command: > + az policy assignment create --name myPolicy --policy {PolicyName} --assign-identity + - summary: Create a resource policy assignment with a system assigned identity. The identity will have 'Contributor' role access to the subscription. + command: > + az policy assignment create --name myPolicy --policy {PolicyName} --assign-identity --identity-scope /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --role Contributor +- command: + name: policy assignment delete + summary: Delete a resource policy assignment. +- command: + name: policy assignment show + summary: Show a resource policy assignment. +- command: + name: policy assignment list + summary: List resource policy assignments. +- group: + name: policy assignment identity + summary: Manage a policy assignment's managed identity. +- command: + name: policy assignment identity assign + summary: Add a system assigned identity to a policy assignment. + examples: + - summary: Add a system assigned managed identity to a policy assignment. + command: > + az policy assignment identity assign -g MyResourceGroup -n MyPolicyAssignment + - summary: Add a system assigned managed identity to a policy assignment and grant it the 'Contributor' role for the current resource group. + command: > + az policy assignment identity assign -g MyResourceGroup -n MyPolicyAssignment --role Contributor --identity-scope /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/MyResourceGroup +- command: + name: policy assignment identity show + summary: Show a policy assignment's managed identity. +- command: + name: policy assignment identity remove + summary: Remove a managed identity from a policy assignment. +- group: + name: resource + summary: Manage Azure resources. +- command: + name: resource list + summary: List resources. + examples: + - summary: List all resources in the West US region. + command: > + az resource list --location westus + - summary: List all resources with the name 'resourceName'. + command: > + az resource list --name 'resourceName' + - summary: List all resources with the tag 'test'. + command: > + az resource list --tag test + - summary: List all resources with a tag that starts with 'test'. + command: > + az resource list --tag 'test*' + - summary: List all resources with the tag 'test' that have the value 'example'. + command: > + az resource list --tag test=example +- command: + name: resource show + summary: Get the details of a resource. + examples: + - summary: Show a virtual machine resource named 'MyVm'. + command: > + az resource show -g MyResourceGroup -n MyVm --resource-type "Microsoft.Compute/virtualMachines" + - summary: Show a web app using a resource identifier. + command: > + az resource show --ids /subscriptions/0b1f6471-1bf0-4dda-aec3-111111111111/resourceGroups/MyResourceGroup/providers/Microsoft.Web/sites/MyWebapp + - summary: Show a subnet. + command: > + az resource show -g MyResourceGroup -n MySubnet --namespace Microsoft.Network --parent virtualnetworks/MyVnet --resource-type subnets + - summary: Show a subnet using a resource identifier. + command: > + az resource show --ids /subscriptions/0b1f6471-1bf0-4dda-aec3-111111111111/resourceGroups/MyResourceGroup/providers/Microsoft.Network/virtualNetworks/MyVnet/subnets/MySubnet + - summary: Show an application gateway path rule. + command: > + az resource show -g MyResourceGroup --namespace Microsoft.Network --parent applicationGateways/ag1/urlPathMaps/map1 --resource-type pathRules -n rule1 +- command: + name: resource delete + summary: Delete a resource. + examples: + - summary: Delete a virtual machine named 'MyVm'. + command: > + az resource delete -g MyResourceGroup -n MyVm --resource-type "Microsoft.Compute/virtualMachines" + - summary: Delete a web app using a resource identifier. + command: > + az resource delete --ids /subscriptions/0b1f6471-1bf0-4dda-aec3-111111111111/resourceGroups/MyResourceGroup/providers/Microsoft.Web/sites/MyWebapp + - summary: Delete a subnet using a resource identifier. + command: > + az resource delete --ids /subscriptions/0b1f6471-1bf0-4dda-aec3-111111111111/resourceGroups/MyResourceGroup/providers/Microsoft.Network/virtualNetworks/MyVnet/subnets/MySubnet +- command: + name: resource tag + summary: Tag a resource. + examples: + - summary: Tag the virtual machine 'MyVm' with the key 'vmlist' and value 'vm1'. + command: > + az resource tag --tags vmlist=vm1 -g MyResourceGroup -n MyVm --resource-type "Microsoft.Compute/virtualMachines" + - summary: Tag a web app with the key 'vmlist' and value 'vm1', using a resource identifier. + command: > + az resource tag --tags vmlist=vm1 --id /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Web/sites/{WebApp} +- command: + name: resource create + summary: create a resource. + examples: + - summary: Create an API app by providing a full JSON configuration. + command: | + az resource create -g myRG -n myApiApp --resource-type Microsoft.web/sites --is-full-object --properties '{ \ + "kind": "api", \ + "location": "West US", \ + "properties": { \ + "serverFarmId": "/subscriptions/{SubID}/resourcegroups/{ResourceGroup}/providers/Microsoft.Web/serverfarms/{ServicePlan}" \ + } \ + }' + - summary: Create a resource by loading JSON configuration from a file. + command: > + az resource create -g myRG -n myApiApp --resource-type Microsoft.web/sites --is-full-object --properties @jsonConfigFile + - summary: Create a web app with the minimum required configuration information. + command: | + az resource create -g myRG -n myWeb --resource-type Microsoft.web/sites --properties '{ \ + "serverFarmId":"/subscriptions/{SubID}/resourcegroups/{ResourceGroup}/providers/Microsoft.Web/serverfarms/{ServicePlan}" \ + }' +- command: + name: resource update + summary: Update a resource. +- command: + name: resource wait + summary: Place the CLI in a waiting state until a condition of a resources is met. +- command: + name: resource invoke-action + summary: Invoke an action on the resource. + description: > + A list of possible actions corresponding to a resource can be found at https://docs.microsoft.com/en-us/rest/api/. All POST requests are actions that can be invoked and are specified at the end of the URI path. For instance, to stop a VM, the + request URI is https://management.azure.com/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroup}/providers/Microsoft.Compute/virtualMachines/{VM}/powerOff?api-version={APIVersion} and the corresponding action is `powerOff`. This can + be found at https://docs.microsoft.com/en-us/rest/api/compute/virtualmachines/virtualmachines-stop. + examples: + - summary: Power-off a vm, specified by Id. + command: > + az resource invoke-action --action powerOff \ + --ids /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Compute/virtualMachines/{VMName} + - summary: Capture information for a stopped vm. + command: > + az resource invoke-action --action capture \ + --ids /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Compute/virtualMachines/{VMName} \ + --request-body '{ \ + "vhdPrefix": "myPrefix", \ + "destinationContainerName": "myContainer", \ + "overwriteVhds": true \ + }' +- group: + name: feature + summary: Manage resource provider features. +- command: + name: feature list + summary: List preview features. +- command: + name: feature register + summary: register a preview feature. +- group: + name: group + summary: Manage resource groups and template deployments. +- command: + name: group exists + summary: Check if a resource group exists. + examples: + - summary: Check if 'MyResourceGroup' exists. + command: > + az group exists -n MyResourceGroup +- command: + name: group create + summary: Create a new resource group. + examples: + - summary: Create a new resource group in the West US region. + command: > + az group create -l westus -n MyResourceGroup +- command: + name: group delete + summary: Delete a resource group. + examples: + - summary: Delete a resource group. + command: > + az group delete -n MyResourceGroup +- command: + name: group list + summary: List resource groups. + examples: + - summary: List all resource groups located in the West US region. + command: > + az group list --query "[?location=='westus']" +- command: + name: group update + summary: Update a resource group. +- command: + name: group wait + summary: Place the CLI in a waiting state until a condition of the resource group is met. +- group: + name: group deployment + summary: Manage Azure Resource Manager deployments. +- command: + name: group deployment create + summary: Start a deployment. + arguments: + - name: --parameters + summary: Supply deployment parameter values. + description: > + Parameters may be supplied from a file using the `@{path}` syntax, a JSON string, or as pairs. Parameters are evaluated in order, so when a value is assigned twice, the latter value will be used. + It is recommended that you supply your parameters file first, and then override selectively using KEY=VALUE syntax. + examples: + - summary: Create a deployment from a remote template file, using parameters from a local JSON file. + command: > + az group deployment create -g MyResourceGroup --template-uri https://myresource/azuredeploy.json --parameters @myparameters.json + - summary: Create a deployment from a local template file, using parameters from a JSON string. + command: | + az group deployment create -g MyResourceGroup --template-file azuredeploy.json --parameters '{ \ + "location": { \ + "value": "westus" \ + } \ + }' + - summary: Create a deployment from a local template, using a local parameter file, a remote parameter file, and selectively overriding key/value pairs. + command: > + az group deployment create -g MyResourceGroup --template-file azuredeploy.json \ + --parameters @params.json --parameters https://mysite/params.json --parameters MyValue=This MyArray=@array.json +- command: + name: group deployment export + summary: Export the template used for a deployment. +- command: + name: group deployment validate + summary: Validate whether a template is syntactically correct. + arguments: + - name: --parameters + summary: Supply deployment parameter values. + description: > + Parameters may be supplied from a file using the `@{path}` syntax, a JSON string, or as pairs. Parameters are evaluated in order, so when a value is assigned twice, the latter value will be used. + It is recommended that you supply your parameters file first, and then override selectively using KEY=VALUE syntax. +- command: + name: group deployment wait + summary: Place the CLI in a waiting state until a deployment condition is met. +- group: + name: group deployment operation + summary: Manage deployment operations. +- group: + name: deployment + summary: Manage Azure Resource Manager deployments at subscription scope. +- command: + name: deployment create + summary: Start a deployment. + arguments: + - name: --parameters + summary: Supply deployment parameter values. + description: > + Parameters may be supplied from a file using the `@{path}` syntax, a JSON string, or as pairs. Parameters are evaluated in order, so when a value is assigned twice, the latter value will be used. + It is recommended that you supply your parameters file first, and then override selectively using KEY=VALUE syntax. + examples: + - summary: Create a deployment from a remote template file, using parameters from a local JSON file. + command: > + az deployment create --location WestUS --template-uri https://myresource/azuredeploy.json --parameters @myparameters.json + - summary: Create a deployment from a local template file, using parameters from a JSON string. + command: | + az deployment create --location WestUS --template-file azuredeploy.json --parameters '{ \ + "policyName": { \ + "value": "policy2" \ + } \ + }' + - summary: Create a deployment from a local template, using a parameter file, a remote parameter file, and selectively overriding key/value pairs. + command: > + az deployment create --location WestUS --template-file azuredeploy.json \ + --parameters @params.json --parameters https://mysite/params.json --parameters MyValue=This MyArray=@array.json +- command: + name: deployment export + summary: Export the template used for a deployment. +- command: + name: deployment validate + summary: Validate whether a template is syntactically correct. + arguments: + - name: --parameters + summary: Supply deployment parameter values. + description: > + Parameters may be supplied from a file using the `@{path}` syntax, a JSON string, or as pairs. Parameters are evaluated in order, so when a value is assigned twice, the latter value will be used. + It is recommended that you supply your parameters file first, and then override selectively using KEY=VALUE syntax. +- command: + name: deployment wait + summary: Place the CLI in a waiting state until a deployment condition is met. +- group: + name: deployment operation + summary: Manage deployment operations. +- group: + name: group lock + summary: Manage Azure resource group locks. +- command: + name: group lock create + summary: Create a resource group lock. + examples: + - summary: Create a read-only resource group level lock. + command: > + az group lock create --lock-type ReadOnly -n lockName -g MyResourceGroup +- command: + name: group lock delete + summary: Delete a resource group lock. + examples: + - summary: Delete a resource group lock + command: > + az group lock delete --name lockName -g MyResourceGroup +- command: + name: group lock list + summary: List lock information in the resource-group. + examples: + - summary: List out all locks on the resource group level + command: > + az group lock list -g MyResourceGroup +- command: + name: group lock show + summary: Show the details of a resource group lock + examples: + - summary: Show a resource group level lock + command: > + az group lock show -n lockname -g MyResourceGroup +- command: + name: group lock update + summary: Update a resource group lock. + examples: + - summary: Update a resource group lock with new notes and type + command: > + az group lock update --name lockName -g MyResourceGroup --notes newNotesHere --lock-type CanNotDelete +- group: + name: provider + summary: Manage resource providers. +- command: + name: provider list + examples: + - summary: Display all resource types for the network resource provider. + command: > + az provider list --query [?namespace=='Microsoft.Network'].resourceTypes[].resourceType +- command: + name: provider register + summary: Register a provider. +- command: + name: provider unregister + summary: Unregister a provider. +- group: + name: provider operation + summary: Get provider operations metadatas. +- command: + name: provider operation show + summary: Get an individual provider's operations. +- command: + name: provider operation list + summary: Get operations from all providers. +- group: + name: tag + summary: Manage resource tags. +- group: + name: resource link + summary: Manage links between resources. + description: > + Linking is a feature of the Resource Manager. It enables declaring relationships between resources even if they do not reside in the same resource group. + Linking has no impact on resource usage, no impact on billing, and no impact on role-based access. It allows for managing multiple resources across groups + as a single unit. +- command: + name: resource link create + summary: Create a new link between resources. + description: A link-id is of the form /subscriptions/{SubID}/resourceGroups/{ResourceGroupID}/providers/{ProviderNamespace}/{ResourceType}/{ResourceName}/providers/Microsoft.Resources/links/{LinkName} + examples: + - summary: Create a link from {SourceID} to {ResourceID} with notes + command: > + az resource link create --link-id {SourceID} --target-id {ResourceID} --notes "SourceID depends on ResourceID" +- command: + name: resource link update + summary: Update link between resources. + description: A link-id is of the form /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/{ProviderNamespace}/{ResourceType}/{ResourceName}/providers/Microsoft.Resources/links/{LinkName} + examples: + - summary: Update the notes for {LinkID} notes "some notes to explain this link" + command: > + az resource link update --link-id {LinkID} --notes "some notes to explain this link" +- command: + name: resource link delete + summary: Delete a link between resources. + description: A link-id is of the form /subscriptions/{SubID}/resourceGroups/{ResourceGroupID}/providers/{ProviderNamespace}/{ResourceType}/{ResourceName}/providers/Microsoft.Resources/links/{LinkName} + examples: + - summary: Delete link {LinkID} + command: > + az resource link delete --link-id {LinkID} +- command: + name: resource link list + summary: List resource links. + examples: + - summary: List links, filtering with + command: > + az resource link list --filter + - summary: List all links for resource group {ResourceGroup} in subscription {SubID} + command: > + az resource link list --scope /subscriptions/{SubID}/resourceGroups/{ResourceGroup} +- command: + name: resource link show + summary: Get details for a resource link. + description: A link-id is of the form /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/{ProviderNamespace}/{ResourceType}/{ResourceName}/providers/Microsoft.Resources/links/{LinkName} +- group: + name: resource lock + summary: Manage Azure resource level locks. +- command: + name: resource lock create + summary: Create a resource-level lock. + examples: + - summary: Create a read-only resource level lock on a vnet. + command: > + az resource lock create --lock-type ReadOnly -n lockName -g MyResourceGroup --resource myvnet --resource-type Microsoft.Network/virtualNetworks + - summary: Create a read-only resource level lock on a vnet using a vnet id. + command: > + az resource lock create --lock-type ReadOnly -n lockName --resource /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Network/virtualNetworks/{VNETName} +- command: + name: resource lock delete + summary: Delete a resource-level lock. + examples: + - summary: Delete a resource level lock + command: > + az resource lock delete --name lockName -g MyResourceGroup --resource myvnet --resource-type Microsoft.Network/virtualNetworks + - summary: Delete a resource level lock on a vnet using a vnet id. + command: > + az resource lock delete -n lockName --resource /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Network/virtualNetworks/{VMName} +- command: + name: resource lock list + summary: List lock information in the resource-level. + examples: + - summary: List out all locks on a vnet + command: > + az resource lock list -g MyResourceGroup --resource myvnet --resource-type Microsoft.Network/virtualNetworks +- command: + name: resource lock show + summary: Show the details of a resource-level lock + examples: + - summary: Show a resource level lock + command: > + az resource lock show -n lockname -g MyResourceGroup --resource myvnet --resource-type Microsoft.Network/virtualNetworks +- command: + name: resource lock update + summary: Update a resource-level lock. + examples: + - summary: Update a resource level lock with new notes and type + command: > + az resource lock update --name lockName -g MyResourceGroup --resource myvnet --resource-type Microsoft.Network/virtualNetworks --notes newNotesHere --lock-type CanNotDelete diff --git a/src/command_modules/azure-cli-role/azure/cli/command_modules/role/help.yaml b/src/command_modules/azure-cli-role/azure/cli/command_modules/role/help.yaml new file mode 100644 index 00000000000..8f088c66e0c --- /dev/null +++ b/src/command_modules/azure-cli-role/azure/cli/command_modules/role/help.yaml @@ -0,0 +1,313 @@ +version: 1 +content: +- command: + name: ad sp create-for-rbac + summary: Create a service principal and configure its access to Azure resources. + arguments: + - name: --name + summary: a URI to use as the logic name. It doesn't need to exist. If not present, CLI will generate one. + - name: --cert + summary: Certificate to use for credentials. + description: When used with `--keyvault,` indicates the name of the cert to use or create. Otherwise, supply a PEM or DER formatted public certificate string. Use `@{path}` to load from a file. Do not include private key info. + - name: --create-cert + summary: Create a self-signed certificate to use for the credential. + description: Use with `--keyvault` to create the certificate in Key Vault. Otherwise, a certificate will be created locally. + - name: --keyvault + summary: Name or ID of a KeyVault to use for creating or retrieving certificates. + - name: --years + summary: 'Number of years for which the credentials will be valid. Default: 1 year' + - name: --scopes + summary: > + Space-separated list of scopes the service principal's role assignment applies to. + Defaults to the root of the current subscription. + - name: --role + summary: Role of the service principal. + examples: + - summary: Create with a default role assignment. + command: > + az ad sp create-for-rbac + - summary: Create using a custom name, and with a default assignment. + command: > + az ad sp create-for-rbac -n "MyApp" + - summary: Create without a default assignment. + command: > + az ad sp create-for-rbac --skip-assignment + - summary: Create with customized contributor assignments. + command: | + az ad sp create-for-rbac -n "MyApp" --role contributor \ + --scopes /subscriptions/{SubID}/resourceGroups/{ResourceGroup1} \ + /subscriptions/{SubID}/resourceGroups/{ResourceGroup2} + - summary: Create using a self-signed certificte. + command: az ad sp create-for-rbac --create-cert + - summary: Create using a self-signed certificate, and store it within KeyVault. + command: az ad sp create-for-rbac --keyvault MyVault --cert CertName --create-cert + - summary: Create using existing certificate in KeyVault. + command: az ad sp create-for-rbac --keyvault MyVault --cert CertName +- group: + name: ad sp credential + summary: manage a service principal's credentials. + description: the credential update will be applied on the Application object the service principal is associated with. In other words, you can accomplish the same thing using "az ad app credential" +- command: + name: ad sp credential list + summary: list a service principal's credentials. +- command: + name: ad sp credential delete + summary: delete a service principal's credential. +- command: + name: ad sp credential reset + summary: Reset a service principal credential. + description: Use upon expiration of the service principal's credentials, or in the event that login credentials are lost. + arguments: + - name: --name + summary: Name or app URI for the credential. + - name: --password + summary: The password used to log in. + description: If not present and `--cert` is not specified, a random password will be generated. + - name: --cert + summary: Certificate to use for credentials. + description: When using `--keyvault,` indicates the name of the cert to use or create. Otherwise, supply a PEM or DER formatted public certificate string. Use `@{path}` to load from a file. Do not include private key info. + - name: --create-cert + summary: Create a self-signed certificate to use for the credential. + description: Use with `--keyvault` to create the certificate in Key Vault. Otherwise, a certificate will be created locally. + - name: --keyvault + summary: Name or ID of a KeyVault to use for creating or retrieving certificates. + - name: --years + summary: 'Number of years for which the credentials will be valid. Default: 1 year' +- command: + name: ad sp delete + summary: Delete a service principal and its role assignments. +- command: + name: ad sp create + summary: Create a service principal. +- command: + name: ad sp list + summary: List service principals. + description: For low latency, by default, only the first 100 will be returned unless you provide filter arguments or use "--all" +- group: + name: ad sp owner + summary: Manage service principal owners. +- command: + name: ad sp owner list + summary: List service principal owners. +- command: + name: ad sp show + summary: Get the details of a service principal. +- group: + name: ad app + summary: Manage applications with AAD Graph. +- command: + name: ad app delete + summary: Delete an application. +- command: + name: ad app list + summary: List applications. + description: for low latency, by default, only the first 100 will be returned unless you provide filter arguments or use "--all" +- command: + name: ad app show + summary: Get the details of an application. +- command: + name: ad app update + summary: Update an application. + examples: + - summary: update a native application with delegated permission of "access the AAD directory as the signed-in user" + command: | + az ad app update --id e042ec79-34cd-498f-9d9f-123456781234 --required-resource-accesses @manifest.json + ("manifest.json" contains the following content) + [{ + "resourceAppId": "00000002-0000-0000-c000-000000000000", + "resourceAccess": [ + { + "id": "a42657d6-7f20-40e3-b6f0-cee03008a62a", + "type": "Scope" + } + ] + }] + - summary: update an application's group membership claims to "All" + command: > + az ad app update --id e042ec79-34cd-498f-9d9f-123456781234 --set groupMembershipClaims=All +- group: + name: ad app owner + summary: Manage application owners. +- command: + name: ad app owner list + summary: List application owners. +- command: + name: ad app owner add + summary: add an application owner. +- command: + name: ad app owner remove + summary: remove an application owner. +- group: + name: ad app permission + summary: manage an application's OAuth2 permissions. +- command: + name: ad app permission grant + summary: Grant the app an API permission + examples: + - summary: Grant a native application with permissions to access an existing API with TTL of 2 years + command: az ad app permission grant --id e042ec79-34cd-498f-9d9f-1234234 --api a0322f79-57df-498f-9d9f-12678 --expires 2 +- command: + name: ad app permission list + summary: List API permissions the application has requested + examples: + - summary: List the OAuth2 permissions for an existing AAD app + command: az ad app permission list --id e042ec79-34cd-498f-9d9f-1234234 +- command: + name: ad app permission add + summary: add an API permission + description: invoking "az ad app permission grant" is needed to activate it + examples: + - summary: add a Graph API permission of "Sign in and read user profile" + command: az ad app permission add --id eeba0b46-78e5-4a1a-a1aa-cafe6c123456 --api 00000002-0000-0000-c000-000000000000 --api-permissions 311a71cc-e848-46a1-bdf8-97ff7156d8e6=Scope +- command: + name: ad app permission delete + summary: remove an API permission + examples: + - summary: remove an AAD graph permission + command: az ad app permission delete --id eeba0b46-78e5-4a1a-a1aa-cafe6c123456 --api 00000002-0000-0000-c000-000000000000 +- group: + name: ad app credential + summary: manage an application's password or certificate credentials +- command: + name: ad app credential reset + summary: append or overwrite an application's password or certificate credentials +- command: + name: ad app credential list + summary: list an application's password or certificate credentials +- command: + name: ad app credential delete + summary: delete an application's password or certificate credentials +- command: + name: ad user list + summary: List Azure Active Directory users. +- command: + name: ad user get-member-groups + summary: Get groups of which the user is a member +- group: + name: role + summary: Manage user roles for access control with Azure Active Directory and service principals. +- group: + name: role assignment + summary: Manage role assignments. +- command: + name: role assignment create + summary: Create a new role assignment for a user, group, or service principal. + examples: + - summary: Create role assignment for an assignee. + command: az role assignment create --assignee sp_name --role a_role +- command: + name: role assignment delete + summary: Delete role assignments. +- command: + name: role assignment list + summary: List role assignments. + description: By default, only assignments scoped to subscription will be displayed. To view assignments scoped by resource or group, use `--all`. +- command: + name: role assignment list-changelogs + summary: List changelogs for role assignments. +- group: + name: role definition + summary: Manage role definitions. +- command: + name: role definition create + summary: Create a custom role definition. + arguments: + - name: --role-definition + summary: Description of a role as JSON, or a path to a file containing a JSON description. + examples: + - summary: Create a role with read-only access to storage and network resources, and the ability to start or restart VMs. + command: | + az role definition create --role-definition '{ \ + "Name": "Contoso On-call", \ + "Description": "Perform VM actions and read storage and network information." \ + "Actions": [ \ + "Microsoft.Compute/*/read", \ + "Microsoft.Compute/virtualMachines/start/action", \ + "Microsoft.Compute/virtualMachines/restart/action", \ + "Microsoft.Network/*/read", \ + "Microsoft.Storage/*/read", \ + "Microsoft.Authorization/*/read", \ + "Microsoft.Resources/subscriptions/resourceGroups/read", \ + "Microsoft.Resources/subscriptions/resourceGroups/resources/read", \ + "Microsoft.Insights/alertRules/*", \ + "Microsoft.Support/*" \ + ], \ + "DataActions": [ \ + "Microsoft.Storage/storageAccounts/blobServices/containers/blobs/*" \ + ], \ + "NotDataActions": [ \ + "Microsoft.Storage/storageAccounts/blobServices/containers/blobs/write" \ + ], \ + "AssignableScopes": ["/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"] \ + }' + - summary: Create a role from a file containing a JSON description. + command: > + az role definition create --role-definition @ad-role.json +- command: + name: role definition delete + summary: Delete a role definition. +- command: + name: role definition list + summary: List role definitions. +- command: + name: role definition update + summary: Update a role definition. + arguments: + - name: --role-definition + summary: Description of a role as JSON, or a path to a file containing a JSON description. +- group: + name: ad + summary: Manage Azure Active Directory Graph entities needed for Role Based Access Control +- command: + name: ad app create + summary: Create a web application, web API or native application + examples: + - summary: Create a native application with delegated permission of "access the AAD directory as the signed-in user" + command: | + az ad app create --display-name my-native --native-app --required-resource-accesses @manifest.json + ("manifest.json" contains the following content) + [{ + "resourceAppId": "00000002-0000-0000-c000-000000000000", + "resourceAccess": [ + { + "id": "a42657d6-7f20-40e3-b6f0-cee03008a62a", + "type": "Scope" + } + ] + }] +- group: + name: ad group + summary: Manage Azure Active Directory groups. +- command: + name: ad group create + summary: Create a group in the directory. +- group: + name: ad group member + summary: Manage Azure Active Directory group members. +- command: + name: ad group member check + summary: Check if a member is in a group. +- group: + name: ad group owner + summary: Manage Azure Active Directory group owners. +- command: + name: ad group owner list + summary: List group owners. +- command: + name: ad group owner add + summary: add a group owner. +- command: + name: ad group owner remove + summary: remove a group owner. +- group: + name: ad sp + summary: Manage Azure Active Directory service principals for automation authentication. +- group: + name: ad user + summary: Manage Azure Active Directory users and user authentication. +- group: + name: ad signed-in-user + summary: Show graph information about current signed-in user in CLI +- command: + name: ad signed-in-user list-owned-objects + summary: Get the list of directory objects that are owned by the user diff --git a/src/command_modules/azure-cli-search/azure/cli/command_modules/search/help.yaml b/src/command_modules/azure-cli-search/azure/cli/command_modules/search/help.yaml new file mode 100644 index 00000000000..2ba1240921b --- /dev/null +++ b/src/command_modules/azure-cli-search/azure/cli/command_modules/search/help.yaml @@ -0,0 +1,17 @@ +version: 1 +content: +- group: + name: search + summary: Manage Azure Search services, admin keys and query keys. +- group: + name: search service + summary: Manage Azure Search services. +- command: + name: search service update + summary: Update partition and replica of the given search service. +- group: + name: search admin-key + summary: Manage Azure Search admin keys. +- group: + name: search query-key + summary: Manage Azure Search query keys. diff --git a/src/command_modules/azure-cli-security/azure/cli/command_modules/security/help.yaml b/src/command_modules/azure-cli-security/azure/cli/command_modules/security/help.yaml new file mode 100644 index 00000000000..d8886f72019 --- /dev/null +++ b/src/command_modules/azure-cli-security/azure/cli/command_modules/security/help.yaml @@ -0,0 +1,282 @@ +version: 1 +content: +- group: + name: security + summary: Manage your security posture with Azure Security Center. +- group: + name: security task + summary: View security tasks (recommendations). +- command: + name: security task list + summary: List security tasks (recommendations). + examples: + - summary: Get security tasks (recommendations) on a subscription scope. + command: > + az security task list + - summary: Get security tasks (recommendations) on a resource group scope. + command: > + az security task list -g "myRg" +- command: + name: security task show + summary: shows a security task (recommendation). + examples: + - summary: Get a security task (recommendation) on a subscription scope. + command: > + az security task show -n "taskName" + - summary: Get a security task (recommendation) on a resource group scope. + command: > + az security task show -g "myRg" -n "taskName" +- group: + name: security alert + summary: View security alerts. +- command: + name: security alert list + summary: List security alerts. + examples: + - summary: Get security alerts on a subscription scope. + command: > + az security alert list + - summary: Get security alerts on a resource group scope. + command: > + az security alert list -g "myRg" +- command: + name: security alert show + summary: Shows a security alert. + examples: + - summary: Get a security alert on a subscription scope. + command: > + az security alert show --location "centralus" -n "alertName" + - summary: Get a security alert on a resource group scope. + command: > + az security alert show -g "myRg" --location "centralus" -n "alertName" +- command: + name: security alert update + summary: Updates a security alert status. + examples: + - summary: Dismiss a security alert on a subscription scope. + command: > + az security alert update --location "centralus" -n "alertName" --status "dismiss" + - summary: Dismiss a security alert on a resource group scope. + command: > + az security alert update -g "myRg" --location "centralus" -n "alertName" --status "dismiss" + - summary: Activate a security alert on a subscritpion scope. + command: > + az security alert update --location "centralus" -n "alertName" --status "activate" + - summary: Activate a security alert on a resource group scope. + command: > + az security alert update -g "myRg" --location "centralus" -n "alertName" --status "activate" +- group: + name: security setting + summary: View your security settings. +- command: + name: security setting list + summary: List security settings. + examples: + - summary: Get security settings. + command: > + az security setting list +- command: + name: security setting show + summary: Shows a security setting. + examples: + - summary: Get a security setting. + command: > + az security setting show -n "MCAS" +- group: + name: security contact + summary: View your security contacts. +- command: + name: security contact list + summary: List security contact. + examples: + - summary: Get security contacts. + command: > + az security contact list +- command: + name: security contact show + summary: Shows a security contact. + examples: + - summary: Get a security contact. + command: > + az security contact show -n "default1" +- command: + name: security contact create + summary: Creates a security contact. + examples: + - summary: Creates a security contact. + command: > + az security contact create -n "default1" --email 'john@contoso.com' --phone '(214)275-4038' --alert-notifications 'on' --alerts-admins 'on' +- command: + name: security contact delete + summary: Deletes a security contact. + examples: + - summary: Deletes a security contact. + command: > + az security contact delete -n "default1" +- group: + name: security auto-provisioning-setting + summary: View your auto provisioning settings. +- command: + name: security auto-provisioning-setting list + summary: List the auto provisioning settings. + examples: + - summary: Get auto provisioning settings. + command: > + az security auto-provisioning-setting list +- command: + name: security auto-provisioning-setting show + summary: Shows an auto provisioning setting. + examples: + - summary: Get an auto provisioning setting. + command: > + az security auto-provisioning-setting show -n "default" +- command: + name: security auto-provisioning-setting update + summary: Updates your automatic provisioning settings on the subscription. + examples: + - summary: Turns on automatic provisioning on the subscription. + command: > + az security auto-provisioning-setting update -n "default" --auto-provision "on" + - summary: Turns off automatic provisioning on the subscription. + command: > + az security auto-provisioning-setting update -n "default" --auto-provision "off" +- group: + name: security discovered-security-solution + summary: View your discovered security solutions +- command: + name: security discovered-security-solution list + summary: List the discovered security solutions. + examples: + - summary: Get discovered security solutions. + command: > + az security discovered-security-solution list +- command: + name: security discovered-security-solution show + summary: Shows a discovered security solution. + examples: + - summary: Get a discovered security solution. + command: > + az security discovered-security-solution show -n ContosoWAF2 -g myService1 +- group: + name: security external-security-solution + summary: View your external security solutions +- command: + name: security external-security-solution list + summary: List the external security solutions. + examples: + - summary: Get external security solutions. + command: > + az security external-security-solution list +- command: + name: security external-security-solution show + summary: Shows an external security solution. + examples: + - summary: Get an external security solution. + command: > + az security external-security-solution show -n aad_defaultworkspace-20ff7fc3-e762-44dd-bd96-b71116dcdc23-eus -g defaultresourcegroup-eus +- group: + name: security jit-policy + summary: Manage your Just in Time network access policies +- command: + name: security jit-policy list + summary: List your Just in Time network access policies. + examples: + - summary: Get all the Just in Time network access policies. + command: > + az security jit-policy list +- command: + name: security jit-policy show + summary: Shows a Just in Time network access policy. + examples: + - summary: Get a Just in Time network access policy. + command: > + az security jit-policy show -l northeurope -n default -g myService1 +- group: + name: security location + summary: Shows the Azure Security Center Home region location. +- command: + name: security location list + summary: Shows the Azure Security Center Home region location. + examples: + - summary: Shows the Azure Security Center Home region location. + command: > + az security location list +- command: + name: security location show + summary: Shows the Azure Security Center Home region location. + examples: + - summary: Shows the Azure Security Center Home region location. + command: > + az security location show -n centralus +- group: + name: security pricing + summary: Shows the Azure Security Center Pricing tier for the subscription. +- command: + name: security pricing list + summary: Shows the Azure Security Center Pricing tier for the subscription. + examples: + - summary: Shows the Azure Security Center Pricing tier for the subscription. + command: > + az security pricing list +- command: + name: security pricing show + summary: Shows the Azure Security Center Pricing tier for the subscription. + examples: + - summary: Shows the Azure Security Center Pricing tier for the subscription. + command: > + az security pricing show -n default +- command: + name: security pricing create + summary: Updates the Azure Security Center Pricing tier for the subscription. + examples: + - summary: Updates the Azure Security Center Pricing tier for the subscription. + command: > + az security pricing create -n default --tier 'standard' +- group: + name: security topology + summary: Shows the network topology in your subscription. +- command: + name: security topology list + summary: Shows the network topology in your subscription. + examples: + - summary: Shows the network topology in your subscription. + command: > + az security topology list +- command: + name: security topology show + summary: Shows the network topology in your subscription. + examples: + - summary: Shows the network topology in your subscription. + command: > + az security topology show -n default -g myService1 +- group: + name: security workspace-setting + summary: Shows the workspace settings in your subscription - these settings let you control which workspace will hold your security data +- command: + name: security workspace-setting list + summary: Shows the workspace settings in your subscription - these settings let you control which workspace will hold your security data + examples: + - summary: Shows the workspace settings in your subscription - these settings let you control which workspace will hold your security data + command: > + az security workspace-setting list +- command: + name: security workspace-setting show + summary: Shows the workspace settings in your subscription - these settings let you control which workspace will hold your security data + examples: + - summary: Shows the workspace settings in your subscription - these settings let you control which workspace will hold your security data + command: > + az security workspace-setting show -n default +- command: + name: security workspace-setting create + summary: Creates a workspace settings in your subscription - these settings let you control which workspace will hold your security data + examples: + - summary: Creates a workspace settings in your subscription - these settings let you control which workspace will hold your security data + command: > + az security workspace-setting create -n default --target-workspace '/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace' +- command: + name: security workspace-setting delete + summary: Deletes the workspace settings in your subscription - this will make the security events on the subscription be reported to the default workspace + examples: + - summary: Deletes the workspace settings in your subscription - this will make the security events on the subscription be reported to the default workspace + command: > + az security workspace-setting delete -n default diff --git a/src/command_modules/azure-cli-servicebus/azure/cli/command_modules/servicebus/help.yaml b/src/command_modules/azure-cli-servicebus/azure/cli/command_modules/servicebus/help.yaml new file mode 100644 index 00000000000..32b9fc8c917 --- /dev/null +++ b/src/command_modules/azure-cli-servicebus/azure/cli/command_modules/servicebus/help.yaml @@ -0,0 +1,411 @@ +version: 1 +content: +- group: + name: servicebus + summary: Manage Azure Service Bus namespaces, queues, topics, subscriptions, rules and geo-disaster recovery configuration alias +- group: + name: servicebus namespace + summary: Manage Azure Service Bus Namespace +- group: + name: servicebus namespace authorization-rule + summary: Manage Azure Service Bus Namespace Authorization Rule +- group: + name: servicebus namespace authorization-rule keys + summary: Manage Azure Authorization Rule connection strings for Namespace +- group: + name: servicebus queue + summary: Manage Azure Service Bus Queue and Authorization Rule +- group: + name: servicebus queue authorization-rule + summary: Manage Azure Service Bus Queue Authorization Rule +- group: + name: servicebus queue authorization-rule keys + summary: Manage Azure Authorization Rule keys for Service Bus Queue +- group: + name: servicebus topic + summary: Manage Azure Service Bus Topic and Authorization Rule +- group: + name: servicebus topic authorization-rule + summary: Manage Azure Service Bus Topic Authorization Rule +- group: + name: servicebus topic authorization-rule keys + summary: Manage Azure Authorization Rule keys for Service Bus Topic +- group: + name: servicebus topic subscription + summary: Manage Azure Service Bus Subscription +- group: + name: servicebus topic subscription rule + summary: Manage Azure Service Bus Rule +- group: + name: servicebus georecovery-alias + summary: Manage Azure Service Bus Geo-Disaster Recovery Configuration Alias +- group: + name: servicebus georecovery-alias authorization-rule + summary: Manage Azure Service Bus Authorization Rule for Namespace with Geo-Disaster Recovery Configuration Alias +- group: + name: servicebus georecovery-alias authorization-rule keys + summary: Manage Azure Authorization Rule keys for Service Bus Namespace +- group: + name: servicebus migration + summary: Manage Azure Service Bus Migration of Standard to Premium +- command: + name: servicebus namespace exists + summary: check for the availability of the given name for the Namespace + examples: + - summary: check for the availability of mynamespace for the Namespace + command: az servicebus namespace exists --name mynamespace +- command: + name: servicebus namespace create + summary: Create a Service Bus Namespace + examples: + - summary: Create a Service Bus Namespace. + command: az servicebus namespace create --resource-group myresourcegroup --name mynamespace --location westus --tags tag1=value1 tag2=value2 --sku Standard +- command: + name: servicebus namespace update + summary: Updates a Service Bus Namespace + examples: + - summary: Updates a Service Bus Namespace. + command: az servicebus namespace update --resource-group myresourcegroup --name mynamespace --tags tag=value +- command: + name: servicebus namespace show + summary: Shows the Service Bus Namespace details + examples: + - summary: shows the Namespace details. + command: az servicebus namespace show --resource-group myresourcegroup --name mynamespace +- command: + name: servicebus namespace list + summary: List the Service Bus Namespaces + examples: + - summary: Get the Service Bus Namespaces by resource group + command: az servicebus namespace list --resource-group myresourcegroup + - summary: Get the Service Bus Namespaces by Subscription. + command: az servicebus namespace list +- command: + name: servicebus namespace delete + summary: Deletes the Service Bus Namespace + examples: + - summary: Deletes the Service Bus Namespace + command: az servicebus namespace delete --resource-group myresourcegroup --name mynamespace +- command: + name: servicebus namespace authorization-rule create + summary: Create Authorization Rule for the given Service Bus Namespace + examples: + - summary: Create Authorization Rule 'myauthorule' for the given Service Bus Namespace 'mynamepsace' in resourcegroup + command: az servicebus namespace authorization-rule create --resource-group myresourcegroup --namespace-name mynamespace --name myauthorule --rights Send Listen +- command: + name: servicebus namespace authorization-rule update + summary: Updates Authorization Rule for the given Service Bus Namespace + examples: + - summary: Updates Authorization Rule 'myauthorule' for the given Service Bus Namespace 'mynamepsace' in resourcegroup + command: az servicebus namespace authorization-rule update --resource-group myresourcegroup --namespace-name mynamespace --name myauthorule --rights Send +- command: + name: servicebus namespace authorization-rule show + summary: Shows the details of Service Bus Namespace Authorization Rule + examples: + - summary: Shows the details of Service Bus Namespace Authorization Rule + command: az servicebus namespace authorization-rule show --resource-group myresourcegroup --namespace-name mynamespace --name myauthorule +- command: + name: servicebus namespace authorization-rule list + summary: Shows the list of Authorization Rule by Service Bus Namespace + examples: + - summary: Shows the list of Authorization Rule by Service Bus Namespace + command: az servicebus namespace authorization-rule list --resource-group myresourcegroup --namespace-name mynamespace +- command: + name: servicebus namespace authorization-rule keys list + summary: List the keys and connection strings of Authorization Rule for Service Bus Namespace + examples: + - summary: List the keys and connection strings of Authorization Rule for Service Bus Namespace + command: az servicebus namespace authorization-rule keys list --resource-group myresourcegroup --namespace-name mynamespace --name myauthorule +- command: + name: servicebus namespace authorization-rule keys renew + summary: Regenerate keys of Authorization Rule for the Service Bus Namespace. + examples: + - summary: Regenerate keys of Authorization Rule for the Service Bus Namespace. + command: az servicebus namespace authorization-rule keys renew --resource-group myresourcegroup --namespace-name mynamespace --name myauthorule --key PrimaryKey +- command: + name: servicebus namespace authorization-rule delete + summary: Deletes the Authorization Rule of the Service Bus Namespace. + examples: + - summary: Deletes the Authorization Rule of the Service Bus Namespace. + command: az servicebus namespace authorization-rule delete --resource-group myresourcegroup --namespace-name mynamespace --name myauthorule +- command: + name: servicebus queue create + summary: Create the Service Bus Queue + examples: + - summary: Create Service Bus Queue. + command: az servicebus queue create --resource-group myresourcegroup --namespace-name mynamespace --name myqueue +- command: + name: servicebus queue update + summary: Updates existing Service Bus Queue + examples: + - summary: Updates Service Bus Queue. + command: az servicebus queue update --resource-group myresourcegroup --namespace-name mynamespace --name myqueue --auto-delete-on-idle PT3M +- command: + name: servicebus queue show + summary: shows the Service Bus Queue Details + examples: + - summary: Shows the Service Bus Queue Details + command: az servicebus queue show --resource-group myresourcegroup --namespace-name mynamespace --name myqueue +- command: + name: servicebus queue list + summary: List the Queue by Service Bus Namepsace + examples: + - summary: Get the Queues by Service Bus Namespace. + command: az servicebus queue list --resource-group myresourcegroup --namespace-name mynamespace +- command: + name: servicebus queue delete + summary: Deletes the Service Bus Queue + examples: + - summary: Deletes the queue + command: az servicebus queue delete --resource-group myresourcegroup --namespace-name mynamespace --name myqueue +- command: + name: servicebus queue authorization-rule create + summary: Create Authorization Rule for the given Service Bus Queue. + examples: + - summary: Create Authorization Rule for Queue + command: az servicebus queue authorization-rule create --resource-group myresourcegroup --namespace-name mynamespace --queue-name myqueue --name myauthorule --rights Listen +- command: + name: servicebus queue authorization-rule update + summary: Update Authorization Rule for the given Service Bus Queue. + examples: + - summary: Update Authorization Rule for Queue + command: az servicebus queue authorization-rule update --resource-group myresourcegroup --namespace-name mynamespace --queue-name myqueue --name myauthorule --rights Send +- command: + name: servicebus queue authorization-rule show + summary: show properties of Authorization Rule for the given Service Bus Queue. + examples: + - summary: show properties of Authorization Rule + command: az servicebus queue authorization-rule show --resource-group myresourcegroup --namespace-name mynamespace --queue-name myqueue --name myauthorule +- command: + name: servicebus queue authorization-rule list + summary: List of Authorization Rule by Service Bus Queue. + examples: + - summary: List of Authorization Rule by Queue + command: az servicebus queue authorization-rule list --resource-group myresourcegroup --namespace-name mynamespace --queue-name myqueue +- command: + name: servicebus queue authorization-rule keys list + summary: List the keys and connection strings of Authorization Rule for the given Service Bus Queue + examples: + - summary: List the keys and connection strings of Authorization Rule for the given Service Bus Queue + command: az servicebus queue authorization-rule keys list --resource-group myresourcegroup --namespace-name mynamespace --queue-name myqueue --name myauthorule +- command: + name: servicebus queue authorization-rule keys renew + summary: Regenerate keys of Authorization Rule for Service Bus Queue + examples: + - summary: Regenerate keys of Authorization Rule for Service Bus Queue + command: az servicebus queue authorization-rule keys renew --resource-group myresourcegroup --namespace-name mynamespace --queue-name myqueue --name myauthorule --key PrimaryKey +- command: + name: servicebus queue authorization-rule delete + summary: Delete the Authorization Rule of Service Bus Queue + examples: + - summary: Delete the Authorization Rule of Service Bus Queue + command: az servicebus queue authorization-rule delete --resource-group myresourcegroup --namespace-name mynamespace --queue-name myqueue --name myauthorule +- command: + name: servicebus topic create + summary: Create the Service Bus Topic + examples: + - summary: Create a new Service Bus Topic + command: az servicebus topic create --resource-group myresourcegroup --namespace-name mynamespace --name mytopic +- command: + name: servicebus topic update + summary: Updates the Service Bus Topic + examples: + - summary: Updates existing Service Bus Topic. + command: az servicebus topic update --resource-group myresourcegroup --namespace-name mynamespace --name mytopic --enable-ordering True +- command: + name: servicebus topic show + summary: Shows the Service Bus Topic Details + examples: + - summary: Shows the Topic details. + command: az servicebus topic show --resource-group myresourcegroup --namespace-name mynamespace --name mytopic +- command: + name: servicebus topic list + summary: List the Topic by Service Bus Namepsace + examples: + - summary: Get the Topics by Namespace. + command: az servicebus topic list --resource-group myresourcegroup --namespace-name mynamespace +- command: + name: servicebus topic delete + summary: Deletes the Service Bus Topic + examples: + - summary: Deletes the Service Bus Topic + command: az servicebus topic delete --resource-group myresourcegroup --namespace-name mynamespace --name mytopic +- command: + name: servicebus topic authorization-rule create + summary: Create Authorization Rule for given Service Bus Topic + examples: + - summary: Create Authorization Rule for given Service Bus Topic + command: az servicebus topic authorization-rule create --resource-group myresourcegroup --namespace-name mynamespace --topic-name mytopic --name myauthorule --rights Send Listen +- command: + name: servicebus topic authorization-rule update + summary: Create Authorization Rule for given Service Bus Topic + examples: + - summary: Create Authorization Rule for given Service Bus Topic + command: az servicebus topic authorization-rule update --resource-group myresourcegroup --namespace-name mynamespace --topic-name mytopic --name myauthorule --rights Send +- command: + name: servicebus topic authorization-rule show + summary: Shows the details of Authorization Rule for given Service Bus Topic + examples: + - summary: Shows the details of Authorization Rule for given Service Bus Topic + command: az servicebus topic authorization-rule show --resource-group myresourcegroup --namespace-name mynamespace --topic-name mytopic --name myauthorule +- command: + name: servicebus topic authorization-rule list + summary: shows list of Authorization Rule by Service Bus Topic + examples: + - summary: shows list of Authorization Rule by Service Bus Topic + command: az servicebus topic authorization-rule list --resource-group myresourcegroup --namespace-name mynamespace --topic-name mytopic +- command: + name: servicebus topic authorization-rule keys list + summary: List the keys and connection strings of Authorization Rule for Service Bus Topic. + examples: + - summary: List the keys and connection strings of Authorization Rule for Service Bus Topic. + command: az servicebus topic authorization-rule keys list --resource-group myresourcegroup --namespace-name mynamespace --topic-name mytopic --name myauthorule +- command: + name: servicebus topic authorization-rule keys renew + summary: Regenerate keys of Authorization Rule for Service Bus Topic. + examples: + - summary: Regenerate key of Service Bus Topic. + command: az servicebus topic authorization-rule keys renew --resource-group myresourcegroup --namespace-name mynamespace --topic-name mytopic --name myauthorule --key PrimaryKey +- command: + name: servicebus topic authorization-rule delete + summary: Deletes the Authorization Rule of the given Service Bus Topic. + examples: + - summary: Deletes the Authorization Rule of Service Bus Topic. + command: az servicebus topic authorization-rule delete --resource-group myresourcegroup --namespace-name mynamespace --topic-name mytopic --name myauthorule +- command: + name: servicebus topic subscription create + summary: Create the ServiceBus Subscription + examples: + - summary: Create a new Subscription. + command: az servicebus topic subscription create --resource-group myresourcegroup --namespace-name mynamespace --topic-name mytopic --name mysubscription +- command: + name: servicebus topic subscription update + summary: Updates the ServiceBus Subscription + examples: + - summary: Update a new Subscription. + command: az servicebus topic subscription update --resource-group myresourcegroup --namespace-name mynamespace --topic-name mytopic --name mysubscription --lock-duration PT3M +- command: + name: servicebus topic subscription show + summary: Shows Service Bus Subscription Details + examples: + - summary: Shows the Subscription details. + command: az servicebus topic subscription show --resource-group myresourcegroup --namespace-name mynamespace --topic-name mytopic --name mysubscription +- command: + name: servicebus topic subscription list + summary: List the Subscription by Service Bus Topic + examples: + - summary: Shows the Subscription by Service Bus Topic. + command: az servicebus topic subscription list --resource-group myresourcegroup --namespace-name mynamespace --topic-name mytopic +- command: + name: servicebus topic subscription delete + summary: Deletes the Service Bus Subscription + examples: + - summary: Deletes the Subscription + command: az servicebus topic subscription delete --resource-group myresourcegroup --namespace-name mynamespace --topic-name mytopic --name mysubscription +- command: + name: servicebus topic subscription rule create + summary: Create the ServiceBus Rule for Subscription + examples: + - summary: Create Rule. + command: az servicebus topic subscription rule create --resource-group myresourcegroup --namespace-name mynamespace --topic-name mytopic --subscription-name mysubscription --name myrule --filter-sql-expression myproperty=myvalue +- command: + name: servicebus topic subscription rule update + summary: Updates the ServiceBus Rule for Subscription + examples: + - summary: Updates Rule. + command: az servicebus topic subscription rule update --resource-group myresourcegroup --namespace-name mynamespace --topic-name mytopic --subscription-name mysubscription --name myrule --filter-sql-expression myproperty=myupdatedvalue +- command: + name: servicebus topic subscription rule show + summary: Shows ServiceBus Rule Details + examples: + - summary: Shows the ServiceBus Rule details. + command: az servicebus topic subscription rule show --resource-group myresourcegroup --namespace-name mynamespace --topic-name mytopic --subscription-name mysubscription --name myrule +- command: + name: servicebus topic subscription rule list + summary: List the ServiceBus Rule by Subscription + examples: + - summary: Shows the Rule ServiceBus by Subscription. + command: az servicebus topic subscription rule list --resource-group myresourcegroup --namespace-name mynamespace --topic-name mytopic --subscription-name mysubscription +- command: + name: servicebus topic subscription rule delete + summary: Deletes the ServiceBus Rule + examples: + - summary: Deletes the ServiceBus Rule + command: az servicebus topic subscription rule delete --resource-group myresourcegroup --namespace-name mynamespace --topic-name mytopic --subscription-name mysubscription --name myrule +- command: + name: servicebus georecovery-alias exists + summary: Check if Geo Recovery Alias Name is available + examples: + - summary: Check availability of the Geo-Disaster Recovery Configuration Alias Name + command: az servicebus georecovery-alias exists --resource-group myresourcegroup --namespace-name primarynamespace --alias myaliasname +- command: + name: servicebus georecovery-alias set + summary: Sets Service Bus Geo-Disaster Recovery Configuration Alias for the give Namespace + examples: + - summary: Sets Geo Disaster Recovery configuration - Alias for the give Namespace + command: az servicebus georecovery-alias set --resource-group myresourcegroup --namespace-name primarynamespace --alias myaliasname --partner-namespace armresourceid +- command: + name: servicebus georecovery-alias show + summary: shows properties of Service Bus Geo-Disaster Recovery Configuration Alias for Primay/Secondary Namespace + examples: + - summary: show properties Geo-Disaster Recovery Configuration Alias of the Primary Namespace + command: az servicebus georecovery-alias show --resource-group myresourcegroup --namespace-name primarynamespace --alias myaliasname + - summary: Get details of Alias (Geo DR Configuration) of the Secondary Namespace + command: az servicebus georecovery-alias show --resource-group myresourcegroup --namespace-name secondarynamespace --alias myaliasname +- command: + name: servicebus georecovery-alias authorization-rule list + summary: Shows the list of Authorization Rule by Service Bus Namespace + examples: + - summary: Shows the list of Authorization Rule by Service Bus Namespace + command: az servicebus georecovery-alias authorization-rule list --resource-group myresourcegroup --namespace-name mynamespace --alias myaliasname +- command: + name: servicebus georecovery-alias authorization-rule keys list + summary: List the keys and connection strings of Authorization Rule for the Service Bus Namespace + examples: + - summary: List the keys and connection strings of Authorization Rule for the namespace. + command: az servicebus georecovery-alias authorization-rule keys list --resource-group myresourcegroup --namespace-name mynamespace --name myauthorule --alias myaliasname +- command: + name: servicebus georecovery-alias break-pair + summary: Disables Service Bus Geo-Disaster Recovery Configuration Alias and stops replicating changes from primary to secondary namespaces + examples: + - summary: Disables the Disaster Recovery and stops replicating changes from primary to secondary namespaces + command: az servicebus georecovery-alias break-pair --resource-group myresourcegroup --namespace-name primarynamespace --alias myaliasname +- command: + name: servicebus georecovery-alias fail-over + summary: Invokes Service Bus Geo-Disaster Recovery Configuration Alias failover and re-configure the alias to point to the secondary namespace + examples: + - summary: Invokes Geo-Disaster Recovery Configuration Alias failover and reconfigure the alias to point to the secondary namespace + command: az servicebus georecovery-alias fail-over --resource-group myresourcegroup --namespace-name secondarynamespace --alias myaliasname +- command: + name: servicebus georecovery-alias delete + summary: Deletes Service Bus Geo-Disaster Recovery Configuration Alias request accepted + examples: + - summary: Delete Service Bus Geo-Disaster Recovery Configuration Alias request accepted + command: az servicebus georecovery-alias delete --resource-group myresourcegroup --namespace-name secondarynamespace --alias myaliasname +- command: + name: servicebus migration start + summary: Create and Start Service Bus Migration of Standard to Premium namespace. + description: Service Bus Migration requires an empty Premium namespace to replicate entities from Standard namespace. + examples: + - summary: Create and Start Service Bus Migration of Standard to Premium namespace + command: az servicebus migration start --resource-group myresourcegroup --name standardnamespace --target-namespace ARMIDpremiumnamespace --post-migration-name mypostmigrationname +- command: + name: servicebus migration show + summary: shows properties of properties of Service Bus Migration + examples: + - summary: shows properties of properties of Service Bus Migration + command: az servicebus migration show --resource-group myresourcegroup --name standardnamespace +- command: + name: servicebus migration complete + summary: Completes the Service Bus Migration of Standard to Premium namespace + description: After completing migration, the existing connection strings to standard namespace will connect to premium namespace automatically. Post migration name is the name that can be used to connect to standard namespace after migration is complete. + examples: + - summary: Completes the Service Bus Migration of Standard to Premium namespace + command: az servicebus migration complete --resource-group myresourcegroup --name standardnamespace +- command: + name: servicebus migration abort + summary: Disable the Service Bus Migration of Standard to Premium namespace + description: abort command stops the replication of entities from standard to premium namespaces. The entities replicated to premium namespace before abort command will be available under premium namespace. The aborted migration can not be resumed, its has to restarted. + examples: + - summary: Disable Service Bus Migration of Standard to Premium namespace + command: az servicebus migration abort --resource-group myresourcegroup --name standardnamespace diff --git a/src/command_modules/azure-cli-servicefabric/azure/cli/command_modules/servicefabric/help.yaml b/src/command_modules/azure-cli-servicefabric/azure/cli/command_modules/servicefabric/help.yaml new file mode 100644 index 00000000000..0068d93731b --- /dev/null +++ b/src/command_modules/azure-cli-servicefabric/azure/cli/command_modules/servicefabric/help.yaml @@ -0,0 +1,147 @@ +version: 1 +content: +- group: + name: sf + summary: Manage and administer Azure Service Fabric clusters. +- group: + name: sf application + summary: Manage applications running on an Azure Service Fabric cluster. +- group: + name: sf cluster + summary: Manage an Azure Service Fabric cluster. +- group: + name: sf cluster certificate + summary: Manage a cluster certificate. +- group: + name: sf cluster client-certificate + summary: Manage the client certificate of a cluster. +- group: + name: sf cluster durability + summary: Manage the durability of a cluster. +- group: + name: sf cluster node + summary: Manage the node instance of a cluster. +- group: + name: sf cluster node-type + summary: Manage the node-type of a cluster. +- group: + name: sf cluster reliability + summary: Manage the reliability of a cluster. +- group: + name: sf cluster setting + summary: Manage a cluster's settings. +- group: + name: sf cluster upgrade-type + summary: Manage the upgrade type of a cluster. +- group: + name: sf application certificate + summary: Manage the certificate of an application. +- command: + name: sf cluster list + summary: List cluster resources. +- command: + name: sf cluster create + summary: Create a new Azure Service Fabric cluster. + examples: + - summary: Create a cluster with a given size and self-signed certificate that is downloaded locally. + command: > + az sf cluster create -g group-name -n cluster1 -l westus --cluster-size 4 --vm-password Password#1234 --certificate-output-folder MyCertificates --certificate-subject-name cluster1 + - summary: Use a keyvault certificate and custom template to deploy a cluster. + command: > + az sf cluster create -g group-name -n cluster1 -l westus --template-file template.json \ + --parameter-file parameter.json --secret-identifier https://{KeyVault}.vault.azure.net:443/secrets/{MyCertificate} +- command: + name: sf cluster certificate add + summary: Add a secondary cluster certificate to the cluster. + examples: + - summary: Add a certificate to a cluster using a keyvault secret identifier. + command: | + az sf cluster certificate add -g group-name -n cluster1 \ + --secret-identifier 'https://{KeyVault}.vault.azure.net/secrets/{Secret}' + - summary: Add a self-signed certificate to a cluster. + command: > + az sf cluster certificate add -g group-name -n cluster1 --certificate-subject-name test.com +- command: + name: sf cluster certificate remove + summary: Remove a certificate from a cluster. + examples: + - summary: Remove a certificate by thumbprint. + command: > + az sf cluster certificate remove -g group-name -n cluster1 --thumbprint '5F3660C715EBBDA31DB1FFDCF508302348DE8E7A' +- command: + name: sf cluster client-certificate add + summary: Add a common name or certificate thumbprint to the cluster for client authentication. + examples: + - summary: Add client certificate by thumbprint + command: > + az sf cluster client-certificate add -g group-name -n cluster1 --thumbprint '5F3660C715EBBDA31DB1FFDCF508302348DE8E7A' +- command: + name: sf cluster client-certificate remove + summary: Remove client certificates or subject names used for authentication. + examples: + - summary: Remove a client certificate by thumbprint. + command: > + az sf cluster client-certificate remove -g group-name -n cluster1 --thumbprint '5F3660C715EBBDA31DB1FFDCF508302348DE8E7A' +- command: + name: sf cluster setting set + summary: Update the settings of a cluster. + examples: + - summary: Set the `MaxFileOperationTimeout` setting for a cluster to 5 seconds. + command: > + az sf cluster setting set -g group-name -n cluster1 --section 'NamingService' --parameter 'MaxFileOperationTimeout' --value 5000 +- command: + name: sf cluster setting remove + summary: Remove settings from a cluster. + examples: + - summary: Remove the `MaxFileOperationTimeout` setting from a cluster. + command: > + az sf cluster setting remove -g group-name -n cluster1 --section 'NamingService' --parameter 'MaxFileOperationTimeout' +- command: + name: sf cluster reliability update + summary: Update the reliability tier for the primary node in a cluster. + examples: + - summary: Change the cluster reliability level to 'Silver'. + command: > + az sf cluster reliability update -g group-name -n cluster1 --reliability-level Silver +- command: + name: sf cluster durability update + summary: Update the durability tier or VM SKU of a node type in the cluster. + examples: + - summary: Change the cluster durability level to 'Silver'. + command: > + az sf cluster durability update -g group-name -n cluster1 --durability-level Silver --node-type nt1 +- command: + name: sf cluster node-type add + summary: Add a new node type to a cluster. + examples: + - summary: Add a new node type to a cluster. + command: > + az sf cluster node-type add -g group-name -n cluster1 --node-type 'n2' --capacity 5 --vm-user-name 'adminName' --vm-password User@1234567890 +- command: + name: sf cluster node add + summary: Add nodes to a node type in a cluster. + examples: + - summary: Add 2 'nt1' nodes to a cluster. + command: > + az sf cluster node add -g group-name -n cluster1 --number-of-nodes-to-add 2 --node-type 'nt1' +- command: + name: sf cluster node remove + summary: Remove nodes from a node type in a cluster. + examples: + - summary: Remove 2 'nt1' nodes from a cluster. + command: > + az sf cluster node remove -g group-name -n cluster1 --node-type 'nt1' --number-of-nodes-to-remove 2 +- command: + name: sf cluster upgrade-type set + summary: Change the upgrade type for a cluster. + examples: + - summary: Set a cluster to use the 'Automatic' upgrade mode. + command: > + az sf cluster upgrade-type set -g group-name -n cluster1 --upgrade-mode Automatic +- command: + name: sf application certificate add + summary: Add a new certificate to the Virtual Machine Scale Sets that make up the cluster to be used by hosted applications. + examples: + - summary: Add an application certificate. + command: > + az sf application certificate add -g group-name -n cluster1 --secret-identifier 'https://{KeyVault}.vault.azure.net/secrets/{Secret}' diff --git a/src/command_modules/azure-cli-signalr/azure/cli/command_modules/signalr/help.yaml b/src/command_modules/azure-cli-signalr/azure/cli/command_modules/signalr/help.yaml new file mode 100644 index 00000000000..c7565dd4555 --- /dev/null +++ b/src/command_modules/azure-cli-signalr/azure/cli/command_modules/signalr/help.yaml @@ -0,0 +1,53 @@ +version: 1 +content: +- group: + name: signalr + summary: Manage Azure SignalR Service. +- group: + name: signalr key + summary: Manage keys for Azure SignalR Service. +- command: + name: signalr list + summary: Lists all the SignalR Service under the current subscription. + examples: + - summary: List SignalR Service and show the results in a table. + command: > + az signalr list -o table + - summary: List SignalR Service in a resource group and show the results in a table. + command: > + az signalr list -g MySignalR -o table +- command: + name: signalr create + summary: Creates a SignalR Service. + examples: + - summary: Create a SignalR Service with the Basic SKU. + command: > + az signalr create -n MySignalR -g MyResourceGroup --sku Standard_S1 --unit-count 1 +- command: + name: signalr delete + summary: Deletes a SignalR Service. + examples: + - summary: Delete a SignalR Service. + command: > + az signalr delete -n MySignalR -g MyResourceGroup +- command: + name: signalr show + summary: Get the details of a SignalR Service. + examples: + - summary: Get the sku for a SignalR Service. + command: > + az signalr show -n MySignalR -g MyResourceGroup --query sku +- command: + name: signalr key list + summary: List the access keys for a SignalR Service. + examples: + - summary: Get the primary key for a SignalR Service. + command: > + az signalr key list -n MySignalR -g MyResourceGroup --query primaryKey -o tsv +- command: + name: signalr key renew + summary: Regenerate the access key for a SignalR Service. + examples: + - summary: Renew the secondary key for a SignalR Service. + command: > + az signalr key renew -n MySignalR -g MyResourceGroup --key-type secondary diff --git a/src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/help.yaml b/src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/help.yaml new file mode 100644 index 00000000000..702cc25156a --- /dev/null +++ b/src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/help.yaml @@ -0,0 +1,450 @@ +version: 1 +content: +- group: + name: sql + summary: Manage Azure SQL Databases and Data Warehouses. +- group: + name: sql db + summary: Manage databases. +- command: + name: sql db copy + summary: Create a copy of a database. + description: A full list of performance level options can be seen by executing `az sql db list-editions -a -o table -l LOCATION`. The copy destination database must have the same edition as the source database, but you can change the edition after the copy has completed. + examples: + - summary: Create a database with performance level S0 as a copy of an existing Standard database. + command: az sql db copy -g mygroup -s myserver -n originalDb --dest-name newDb --service-objective S0 + - summary: Create a database with GeneralPurpose edition, Gen4 hardware, and 1 vcore as a copy of an existing GeneralPurpose database. + command: az sql db copy -g mygroup -s myserver -n originalDb --dest-name newDb -f Gen4 -c 1 +- command: + name: sql db create + summary: Create a database. + description: A full list of performance level options can be seen by executing `az sql db list-editions -a -o table -l LOCATION`. + examples: + - summary: Create a Standard S0 database. + command: az sql db create -g mygroup -s myserver -n mydb --service-objective S0 + - summary: Create a database with GeneralPurpose edition, Gen4 hardware and 1 vcore + command: az sql db create -g mygroup -s myserver -n mydb -e GeneralPurpose -f Gen4 -c 1 + - summary: Create a database with zone redundancy enabled + command: az sql db create -g mygroup -s myserver -n mydb -z + - summary: Create a database with zone redundancy explicitly disabled + command: az sql db create -g mygroup -s myserver -n mydb -z false +- command: + name: sql db delete + summary: Delete a database. +- command: + name: sql db list + summary: List databases a server or elastic pool. +- command: + name: sql db list-editions + summary: Show database editions available for the currently active subscription. + description: Includes available service objectives and storage limits. In order to reduce verbosity, settings to intentionally reduce storage limits are hidden by default. + examples: + - summary: Show all database editions in a location. + command: az sql db list-editions -l westus + - summary: Show all available database service objectives for Standard edition. + command: az sql db list-editions -l westus --edition Standard + - summary: Show available max database sizes for P1 service objective + command: az sql db list-editions -l westus --service-objective P1 --show-details max-size +- command: + name: sql db rename + summary: Rename a database. +- command: + name: sql db show + summary: Get the details for a database. +- command: + name: sql db show-connection-string + summary: Generates a connection string to a database. + examples: + - summary: Generate connection string for ado.net + command: az sql db show-connection-string -s myserver -n mydb -c ado.net +- command: + name: sql db update + summary: Update a database. + examples: + - summary: Update database with zone redundancy enabled + command: az sql db update -g mygroup -s myserver -n mypool -z + - summary: Update database with zone redundancy explicitly disabled + command: az sql db update -g mygroup -s myserver -n mypool -z false +- group: + name: sql db audit-policy + summary: Manage a database's auditing policy. +- group: + name: sql server ad-admin + summary: Manage a server's Active Directory administrator. +- command: + name: sql server ad-admin create + summary: Create a new server Active Directory administrator. +- command: + name: sql server ad-admin update + summary: Update an existing server Active Directory administrator. +- command: + name: sql db audit-policy update + summary: Update a database's auditing policy. + description: If the policy is being enabled, `--storage-account` or both `--storage-endpoint` and `--storage-key` must be specified. + examples: + - summary: Enable by storage account name. + command: az sql db audit-policy update -g mygroup -s myserver -n mydb --state Enabled --storage-account mystorage + - summary: Enable by storage endpoint and key. + command: | + az sql db audit-policy update -g mygroup -s myserver -n mydb --state Enabled \ + --storage-endpoint https://mystorage.blob.core.windows.net --storage-key MYKEY== + - summary: Set the list of audit actions. + command: | + az sql db audit-policy update -g mygroup -s myserver -n mydb \ + --actions FAILED_DATABASE_AUTHENTICATION_GROUP 'UPDATE on database::mydb by public' + - summary: Add an audit action. + command: | + az sql db audit-policy update -g mygroup -s myserver -n mydb \ + --add auditActionsAndGroups FAILED_DATABASE_AUTHENTICATION_GROUP + - summary: Remove an audit action by list index. + command: az sql db audit-policy update -g mygroup -s myserver -n mydb --remove auditActionsAndGroups 0 + - summary: Disable an auditing policy. + command: az sql db audit-policy update -g mygroup -s myserver -n mydb --state Disabled +- group: + name: sql db op + summary: Manage operations on a database. +- command: + name: sql db op cancel + examples: + - summary: Cancel an operation. + command: az sql db op cancel -g mygroup -s myserver -d mydb -n d2896db1-2ba8-4c84-bac1-387c430cce40 +- group: + name: sql db replica + summary: Manage replication between databases. +- command: + name: sql db replica create + summary: Create a database as a readable secondary replica of an existing database. + description: A full list of performance level options can be seen by executing `az sql db list-editions -a -o table -l LOCATION`. The secondary database must have the same edition as the primary database. + examples: + - summary: Create a database with performance level S0 as a secondary replica of an existing Standard database. + command: az sql db replica create -g mygroup -s myserver -n originalDb --partner-server newDb --service-objective S0 + - summary: Create a database with GeneralPurpose edition, Gen4 hardware, and 1 vcore as a secondary replica of an existing GeneralPurpose database + command: az sql db replica create -g mygroup -s myserver -n originalDb --partner-server newDb -f Gen4 -c 1 +- command: + name: sql db replica set-primary + summary: Set the primary replica database by failing over from the current primary replica database. +- command: + name: sql db replica list-links + summary: List the replicas of a database and their replication status. +- command: + name: sql db replica delete-link + summary: Permanently stop data replication between two database replicas. +- command: + name: sql db export + summary: Export a database to a bacpac. + examples: + - summary: Get an SAS key for use in export operation. + command: | + az storage blob generate-sas --account-name myAccountName -c myContainer -n myBacpac.bacpac \ + --permissions w --expiry 2018-01-01T00:00:00Z + - summary: Export bacpac using an SAS key. + command: | + az sql db export -s myserver -n mydatabase -g mygroup -p password -u login \ + --storage-key "?sr=b&sp=rw&se=2018-01-01T00%3A00%3A00Z&sig=mysignature&sv=2015-07-08" \ + --storage-key-type SharedAccessKey \ + --storage-uri https://mystorageaccount.blob.core.windows.net/bacpacs/myBacpac.bacpac + - summary: Export bacpac using a storage account key. + command: | + az sql db export -s myserver -n mydatabase -g mygroup -p password -u login \ + --storage-key MYKEY== --storage-key-type StorageAccessKey \ + --storage-uri https://mystorageaccount.blob.core.windows.net/bacpacs/myBacpac.bacpac +- command: + name: sql db import + summary: Imports a bacpac into an existing database. + examples: + - summary: Get an SAS key for use in import operation. + command: | + az storage blob generate-sas --account-name myAccountName -c myContainer -n myBacpac.bacpac \ + --permissions r --expiry 2018-01-01T00:00:00Z + - summary: Import bacpac into an existing database using an SAS key. + command: | + az sql db import -s myserver -n mydatabase -g mygroup -p password -u login \ + --storage-key "?sr=b&sp=rw&se=2018-01-01T00%3A00%3A00Z&sig=mysignature&sv=2015-07-08" \ + --storage-key-type SharedAccessKey \ + --storage-uri https://mystorageaccount.blob.core.windows.net/bacpacs/myBacpac.bacpac + - summary: Import bacpac into an existing database using a storage account key. + command: | + az sql db import -s myserver -n mydatabase -g mygroup -p password -u login --storage-key MYKEY== \ + --storage-key-type StorageAccessKey \ + --storage-uri https://mystorageaccount.blob.core.windows.net/bacpacs/myBacpac.bacpac +- command: + name: sql db restore + summary: Create a new database by restoring from a backup. +- group: + name: sql db threat-policy + summary: Manage a database's threat detection policies. +- command: + name: sql db threat-policy update + summary: Update a database's threat detection policy. + description: If the policy is being enabled, storage_account or both storage_endpoint and storage_account_access_key must be specified. + examples: + - summary: Enable by storage account name. + command: | + az sql db threat-policy update -g mygroup -s myserver -n mydb \ + --state Enabled --storage-account mystorage + - summary: Enable by storage endpoint and key. + command: | + az sql db threat-policy update -g mygroup -s myserver -n mydb \ + --state Enabled --storage-endpoint https://mystorage.blob.core.windows.net \ + --storage-key MYKEY== + - summary: Disable a subset of alert types. + command: | + az sql db threat-policy update -g mygroup -s myserver -n mydb \ + --disabled-alerts Sql_Injection_Vulnerability Access_Anomaly + - summary: Configure email recipients for a policy. + command: | + az sql db threat-policy update -g mygroup -s myserver -n mydb \ + --email-addresses me@examlee.com you@example.com \ + --email-account-admins Enabled + - summary: Disable a threat policy. + command: az sql db threat-policy update -g mygroup -s myserver -n mydb --state Disabled +- group: + name: sql db tde + summary: Manage a database's transparent data encryption. +- command: + name: sql db tde set + summary: Sets a database's transparent data encryption configuration. +- group: + name: sql dw + summary: Manage data warehouses. +- command: + name: sql dw create + summary: Create a data warehouse. +- command: + name: sql dw delete + summary: Delete a data warehouse. +- command: + name: sql dw list + summary: List data warehouses for a server. +- command: + name: sql dw show + summary: Get the details for a data warehouse. +- command: + name: sql dw update + summary: Update a data warehouse. +- group: + name: sql elastic-pool + summary: Manage elastic pools. +- command: + name: sql elastic-pool create + summary: Create an elastic pool. + examples: + - summary: Create elastic pool with zone redundancy enabled + command: az sql elastic-pool create -g mygroup -s myserver -n mypool -z + - summary: Create elastic pool with zone redundancy explicitly disabled + command: az sql elastic-pool create -g mygroup -s myserver -n mypool -z false + - summary: Create a Standard 100 DTU elastic pool. + command: az sql elastic-pool create -g mygroup -s myserver -n mydb -e Standard -c 100 + - summary: Create an elastic pool with GeneralPurpose edition, Gen4 hardware and 1 vcore. + command: az sql elastic-pool create -g mygroup -s myserver -n mydb -e GeneralPurpose -f Gen4 -c 1 +- command: + name: sql elastic-pool list-editions + summary: List elastic pool editions available for the active subscription. + description: Also includes available pool DTU settings, storage limits, and per database settings. In order to reduce verbosity, additional storage limits and per database settings are hidden by default. + examples: + - summary: Show all elastic pool editions and pool DTU limits in the West US region. + command: az sql elastic-pool list-editions -l westus + - summary: Show all pool DTU limits for Standard edition in the West US region. + command: az sql elastic-pool list-editions -l westus --edition Standard + - summary: Show available max sizes for elastic pools with at least 100 DTUs in the West US region. + command: az sql elastic-pool list-editions -l westus --dtu 100 --show-details max-size + - summary: Show available per database settings for Standard 100 DTU elastic pools in the West US region. + command: az sql elastic-pool list-editions -l westus --edition Standard --dtu 100 --show-details db-min-dtu db-max-dtu db-max-size +- command: + name: sql elastic-pool update + summary: Update an elastic pool. + examples: + - summary: Update elastic pool with zone redundancy enabled + command: az sql elastic-pool update -g mygroup -s myserver -n mypool -z + - summary: Update elastic pool with zone redundancy explicitly disabled + command: az sql elastic-pool update -g mygroup -s myserver -n mypool -z false +- group: + name: sql elastic-pool op + summary: Manage operations on an elastic pool. +- command: + name: sql elastic-pool op cancel + examples: + - summary: Cancel an operation. + command: az sql elastic-pool op cancel -g mygroup -s myserver --elastic-pool myelasticpool -n d2896db1-2ba8-4c84-bac1-387c430cce40 +- group: + name: sql failover-group + summary: Manage SQL Failover Groups. +- command: + name: sql failover-group create + summary: Creates a failover group. +- command: + name: sql failover-group update + summary: Updates the failover group. +- command: + name: sql failover-group set-primary + summary: Set the primary of the failover group by failing over all databases from the current primary server. +- group: + name: sql server + summary: Manage SQL servers. +- command: + name: sql server create + summary: Create a server. + examples: + - summary: Create a server. + command: az sql server create -l westus -g mygroup -n myserver -u myadminuser -p myadminpassword +- command: + name: sql server list + summary: List available servers. + examples: + - summary: List all servers in the current subscription. + command: az sql server list + - summary: List all servers in a resource group. + command: az sql server list -g mygroup +- command: + name: sql server update + summary: Update a server. +- group: + name: sql server conn-policy + summary: Manage a server's connection policy. +- command: + name: sql server conn-policy show + summary: Gets a server's secure connection policy. +- command: + name: sql server conn-policy update + summary: Updates a server's secure connection policy. +- group: + name: sql server dns-alias + summary: Manage a server's DNS aliases. +- command: + name: sql server dns-alias set + summary: Sets a server to which DNS alias should point +- group: + name: sql server firewall-rule + summary: Manage a server's firewall rules. +- command: + name: sql server firewall-rule create + summary: Create a firewall rule. + examples: + - summary: Create a firewall rule + command: az sql server firewall-rule create -g mygroup -s myserver -n myrule --start-ip-address 1.2.3.4 --end-ip-address 5.6.7.8 + - summary: Create a firewall rule that allows access from Azure services + command: az sql server firewall-rule create -g mygroup -s myserver -n myrule --start-ip-address 0.0.0.0 --end-ip-address 0.0.0.0 +- command: + name: sql server firewall-rule update + summary: Update a firewall rule. + examples: + - summary: Update a firewall rule + command: az sql server firewall-rule update -g mygroup -s myserver -n myrule --start-ip-address 9.8.7.6 --end-ip-address 5.4.3.2 +- command: + name: sql server firewall-rule show + summary: Shows the details for a firewall rule. + examples: + - summary: Show a firewall rule + command: az sql server firewall-rule show -g mygroup -s myserver -n myrule +- command: + name: sql server firewall-rule list + summary: List a server's firewall rules. + examples: + - summary: List a server's firewall rules + command: az sql server firewall-rule list -g mygroup -s myserver +- group: + name: sql server key + summary: Manage a server's keys. +- command: + name: sql server key create + summary: Creates a server key. +- command: + name: sql server key show + summary: Shows a server key. +- command: + name: sql server key delete + summary: Deletes a server key. +- group: + name: sql server tde-key + summary: Manage a server's encryption protector. +- command: + name: sql server tde-key set + summary: Sets the server's encryption protector. +- group: + name: sql server vnet-rule + summary: Manage a server's virtual network rules. +- command: + name: sql server vnet-rule update + summary: Update a virtual network rule. +- command: + name: sql server vnet-rule create + summary: Create a virtual network rule to allows access to an Azure SQL server. + examples: + - summary: Create a vnet rule by providing the subnet id. + command: | + az sql server vnet-rule create --server MyAzureSqlServer --name MyVNetRule \ + -g MyResourceGroup --subnet /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Network/virtualNetworks/{VNETName}/subnets/{SubnetName} + - summary: Create a vnet rule by providing the vnet and subnet name. The subnet id is created by taking the resource group name and subscription id of the SQL server. + command: | + az sql server vnet-rule create --server MyAzureSqlServer --name MyVNetRule \ + -g MyResourceGroup --subnet subnetName --vnet-name vnetName +- group: + name: sql mi + summary: Manage SQL managed instances. +- command: + name: sql mi create + summary: Create a managed instance. + examples: + - summary: Create a managed instance with specified parameters and with identity + command: az sql mi create -g mygroup -n myinstance -l mylocation -i -u myusername -p mypassword --license-type LicenseIncluded --subnet /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Network/virtualNetworks/{VNETName}/subnets/{SubnetName} --capacity 8 --storage 32GB --edition GeneralPurpose --family Gen4 + - summary: Create a managed instance with minimal set of parameters + command: az sql mi create -g mygroup -n myinstance -l mylocation -i -u myusername -p mypassword --subnet /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Network/virtualNetworks/{VNETName}/subnets/{SubnetName} +- command: + name: sql mi list + summary: List available managed instances. + examples: + - summary: List all managed instances in the current subscription. + command: az sql mi list + - summary: List all managed instances in a resource group. + command: az sql mi list -g mygroup +- command: + name: sql mi show + summary: Get the details for a managed instance. + examples: + - summary: Get the details for a managed instance + command: az sql mi show -g mygroup -n myinstance +- command: + name: sql mi update + summary: Update a managed instance. + examples: + - summary: Updates a mi with specified parameters and with identity + command: az sql mi update -g mygroup -n myinstance -i -p mypassword --license-type mylicensetype --capacity vcorecapacity --storage storagesize +- command: + name: sql mi delete + summary: Delete a managed instance. + examples: + - summary: Delete a managed instance + command: az sql mi delete -g mygroup -n myinstance --yes +- group: + name: sql midb + summary: Manage SQL managed instance databases. +- command: + name: sql midb create + summary: Create a managed database. + examples: + - summary: Create a managed database with specified collation + command: az sql midb create -g mygroup --mi myinstance -n mymanageddb --collation Latin1_General_100_CS_AS_SC +- command: + name: sql midb list + summary: List maanged databases on a managed instance. + examples: + - summary: List managed databases on a managed instance + command: az sql midb list -g mygroup --mi myinstance +- command: + name: sql midb show + summary: Get the details for a managed database. + examples: + - summary: Get the details for a managed database + command: az sql midb show -g mygroup --mi myinstance -n mymanageddb +- command: + name: sql midb restore + summary: Restore a managed database. + examples: + - summary: Restore a managed database using Point in time restore + command: az sql midb restore -g mygroup --mi myinstance -n mymanageddb --dest-name targetmidb --time "2018-05-20T05:34:22" +- command: + name: sql midb delete + summary: Delete a managed database. + examples: + - summary: Delete a managed database + command: az sql midb delete -g mygroup --mi myinstance -n mymanageddb --yes diff --git a/src/command_modules/azure-cli-sqlvirtualmachine/azure/cli/command_modules/sqlvm/help.yaml b/src/command_modules/azure-cli-sqlvirtualmachine/azure/cli/command_modules/sqlvm/help.yaml new file mode 100644 index 00000000000..d9fed82d10e --- /dev/null +++ b/src/command_modules/azure-cli-sqlvirtualmachine/azure/cli/command_modules/sqlvm/help.yaml @@ -0,0 +1,114 @@ +version: 1 +content: +- group: + name: sql vm + summary: Manage SQL virtual machines. +- group: + name: sql vm group + summary: Manage SQL virtual machine groups. +- group: + name: sql vm group ag-listener + summary: Manage SQL availability group listeners. +- command: + name: sql vm group create + summary: Creates a SQL virtual machine group. + examples: + - summary: Create a SQL virtual machine group for SQL2016-WS2016 Enterprise virtual machines. + command: > + az sql vm group create -n sqlvmgroup -l eastus -g myresourcegroup --image-offer SQL2016-WS2016 --image-sku Enterprise + --domain-fqdn Domain.com --operator-acc testop --service-acc testservice --sa-key {PublicKey} --storage-account 'https://storacc.blob.core.windows.net/' +- command: + name: sql vm group update + summary: Updates a SQL virtual machine group if there are not SQL virtual machines attached to the group. + examples: + - summary: Update an empty SQL virtual machine group operator account. + command: > + az sql vm group update -n sqlvmgroup -g myresourcegroup --operator-acc testop + - summary: Update an empty SQL virtual machine group storage account and key. + command: > + az sql vm group update -n sqlvmgroup -g myresourcegroup --sa-key {PublicKey} --storage-account 'https://newstoracc.blob.core.windows.net/' +- command: + name: sql vm group ag-listener create + summary: Creates an availability group listener. + examples: + - summary: Create an availability group listener. Note the SQL virtual machines are in the same resource group as the SQL virtual machine group. + command: > + az sql vm group ag-listener create -n aglistenertest -g myresourcegroup --ag-name agname --group-name sqlvmgroup --ip-address 10.0.0.11 + --load-balancer '/subscriptions/{yoursubscription}/resourceGroups/{yourrg}/providers/Microsoft.Network/loadBalancers/{lbname}' --probe-port 59999 + --subnet '/subscriptions/{yoursubscription}/resourceGroups/{yourrg}/providers/Microsoft.Network/virtualNetworks/{vnname}/subnets/{subnetname}' + --sqlvms sqlvm1 sqlvm2 + - summary: Create an availability group listener. Note all resources are in the same resource group. + command: > + az sql vm group ag-listener create -n aglistenertest -g myresourcegroup --ag-name agname --group-name sqlvmgroup --ip-address 10.0.0.11 + --load-balancer {lbname} --probe-port 59999 --subnet {subnetname} --vnet-name {vnname} --sqlvms sqlvm1 sqlvm2 +- command: + name: sql vm create + summary: Creates a SQL virtual machine. + arguments: + - name: --name + summary: Name of the SQL virtual machine. The name of the new SQL virtual machine must be equal to the underlying virtual machine created from SQL marketplace image. + examples: + - summary: Create a SQL virtual machine with AHUB billing tag. + command: > + az sql vm create -n sqlvm -g myresourcegroup -l eastus --license-type AHUB + - summary: Enable R services in SQL2016 onwards. + command: > + az sql vm create -n sqlvm -g myresourcegroup -l eastus --enable-r-services true + - summary: Create SQL virtual machine and configure auto backup settings. + command: > + az sql vm create -n sqlvm -g myresourcegroup -l eastus --backup-schedule-type manual --full-backup-frequency Weekly --full-backup-start-hour 2 --full-backup-duration 2 + --sa-key {storageKey} --storage-account 'https://storageacc.blob.core.windows.net/' --retention-period 30 --log-backup-frequency 60 + - summary: Create SQL virtual machine and configure auto patching settings. + command: > + az sql vm create -n sqlvm -g myresourcegroup -l eastus --day-of-week sunday --maintenance-window-duration 60 --maintenance-window-start-hour 2 + - summary: Create SQL virtual machine and configure SQL connectivity settings. + command: > + az sql vm create -n sqlvm -g myresourcegroup -l eastus --connectivity-type private --port 1433 --sql-auth-update-username {newlogin} --sql-auth-update-pwd {sqlpassword} +- command: + name: sql vm update + summary: Updates the properties of a SQL virtual machine. + examples: + - summary: Add or update a tag. + command: > + az sql vm update -n sqlvm -g myresourcegroup --set tags.tagName=tagValue + - summary: Remove a tag. + command: > + az sql vm update -n sqlvm -g myresourcegroup --remove tags.tagName + - summary: Update SQL virtual machine auto backup settings. + command: > + az sql vm update -n sqlvm -g myresourcegroup --backup-schedule-type manual --full-backup-frequency Weekly --full-backup-start-hour 2 --full-backup-duration 2 + --sa-key {storageKey} --storage-account 'https://storageacc.blob.core.windows.net/' --retention-period 30 --log-backup-frequency 60 + - summary: Disable SQL virtual machine auto backup settings. + command: > + az sql vm update -n sqlvm -g myresourcegroup --enable-auto-backup false + - summary: Update SQL virtual machine auto patching settings. + command: > + az sql vm update -n sqlvm -g myresourcegroup --day-of-week sunday --maintenance-window-duration 60 --maintenance-window-start-hour 2 + - summary: Disable SQL virtual machine auto patching settings. + command: > + az sql vm update -n sqlvm -g myresourcegroup --enable-auto-patching false + - summary: Update a SQL virtual machine billing tag to AHUB. + command: > + az sql vm update -n sqlvm -g myresourcegroup --license-type AHUB +- command: + name: sql vm add-to-group + summary: Adds SQL virtual machine to a SQL virtual machine group. + examples: + - summary: Add SQL virtual machine to a group. + command: > + az sql vm add-to-group -n sqlvm -g myresourcegroup --sqlvm-group sqlvmgroup --boostrap-acc-pwd + {boostrappassword} --operator-acc-pwd {operatorpassword} --service-acc-pwd {servicepassword} +- command: + name: sql vm remove-from-group + summary: Remove SQL virtual machine from its current SQL virtual machine group. + examples: + - summary: Remove SQL virtual machine from a group. + command: > + az sql vm remove-from-group -n sqlvm -g myresourcegroup +- command: + name: sql vm group ag-listener update + summary: Updates an availability group listener. + examples: + - summary: Replace the SQL virtual machines that were in the availability group. + command: > + az sql vm group ag-listener update --sqlvms sqlvm3 sqlvm4 --group-name mygroup diff --git a/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/help.yaml b/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/help.yaml new file mode 100644 index 00000000000..b4ffa2b837a --- /dev/null +++ b/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/help.yaml @@ -0,0 +1,634 @@ +version: 1 +content: +- command: + name: storage entity insert + summary: Insert an entity into a table. + arguments: + - name: --table-name + summary: The name of the table to insert the entity into. + - name: --entity + summary: Space-separated list of key=value pairs. Must contain a PartitionKey and a RowKey. + description: The PartitionKey and RowKey must be unique within the table, and may be up to 64Kb in size. If using an integer value as a key, convert it to a fixed-width string which can be canonically sorted. For example, convert the integer value 1 to the string value "0000001" to ensure proper sorting. + - name: --if-exists + summary: Behavior when an entity already exists for the specified PartitionKey and RowKey. + - name: --timeout + summary: The server timeout, expressed in seconds. +- command: + name: storage blob upload + summary: Upload a file to a storage blob. + description: Creates a new blob from a file path, or updates the content of an existing blob with automatic chunking and progress notifications. + arguments: + - name: --type + summary: Defaults to 'page' for *.vhd files, or 'block' otherwise. + - name: --maxsize-condition + summary: The max length in bytes permitted for an append blob. + - name: --validate-content + summary: Specifies that an MD5 hash shall be calculated for each chunk of the blob and verified by the service when the chunk has arrived. + - name: --tier + summary: A page blob tier value to set the blob to. The tier correlates to the size of the blob and number of allowed IOPS. This is only applicable to page blobs on premium storage accounts. + examples: + - summary: Upload to a blob. + command: az storage blob upload -f /path/to/file -c MyContainer -n MyBlob +- command: + name: storage file upload + summary: Upload a file to a share that uses the SMB 3.0 protocol. + description: Creates or updates an Azure file from a source path with automatic chunking and progress notifications. + examples: + - summary: Upload to a local file to a share. + command: az storage file upload -s MyShare --source /path/to/file +- command: + name: storage blob show + summary: Get the details of a blob. + examples: + - summary: Show all properties of a blob. + command: az storage blob show -c MyContainer -n MyBlob +- command: + name: storage blob delete + summary: Mark a blob or snapshot for deletion. + description: > + The blob is marked for later deletion during garbage collection. In order to delete a blob, all of its snapshots must also be deleted. + Both can be removed at the same time. + examples: + - summary: Delete a blob. + command: az storage blob delete -c MyContainer -n MyBlob +- command: + name: storage account create + summary: Create a storage account. + description: > + The SKU of the storage account defaults to 'Standard_RAGRS'. + examples: + - summary: Create a storage account 'MyStorageAccount' in resource group 'MyResourceGroup' in the West US region with locally redundant storage. + command: az storage account create -n MyStorageAccount -g MyResourceGroup -l westus --sku Standard_LRS + min_profile: latest + - summary: Create a storage account 'MyStorageAccount' in resource group 'MyResourceGroup' in the West US region with locally redundant storage. + command: az storage account create -n MyStorageAccount -g MyResourceGroup -l westus --account-type Standard_LRS + max_profile: 2017-03-09-profile +- command: + name: storage container create + summary: Create a container in a storage account. + examples: + - summary: Create a storage container in a storage account. + command: az storage container create -n MyStorageContainer + - summary: Create a storage container in a storage account and return an error if the container already exists. + command: az storage container create -n MyStorageContainer --fail-on-exist +- command: + name: storage container delete + summary: Marks the specified container for deletion. + description: > + The container and any blobs contained within it are later deleted during garbage collection. +- command: + name: storage account list + summary: List storage accounts. + examples: + - summary: List all storage accounts in a subscription. + command: az storage account list + - summary: List all storage accounts in a resource group. + command: az storage account list -g MyResourceGroup +- command: + name: storage account show + summary: Show storage account properties. + examples: + - summary: Show properties for a storage account by resource ID. + command: az storage account show --ids /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Storage/storageAccounts/{StorageAccount} + - summary: Show properties for a storage account using an account name and resource group. + command: az storage account show -g MyResourceGroup -n MyStorageAccount +- command: + name: storage account show-usage + summary: Show the current count and limit of the storage accounts under the subscription. +- command: + name: storage account delete + summary: Delete a storage account. + examples: + - summary: Delete a storage account using a resource ID. + command: az storage account delete --ids /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Storage/storageAccounts/{StorageAccount} + - summary: Delete a storage account using an account name and resource group. + command: az storage account delete -n MyStorageAccount -g MyResourceGroup +- command: + name: storage account show-connection-string + summary: Get the connection string for a storage account. + examples: + - summary: Get a connection string for a storage account. + command: az storage account show-connection-string -g MyResourceGroup -n MyStorageAccount +- group: + name: storage + summary: Manage Azure Cloud Storage resources. +- group: + name: storage account + summary: Manage storage accounts. +- command: + name: storage account update + summary: Update the properties of a storage account. +- group: + name: storage account keys + summary: Manage storage account keys. +- command: + name: storage account keys list + summary: List the primary and secondary keys for a storage account. + examples: + - summary: List the primary and secondary keys for a storage account. + command: az storage account keys list -g MyResourceGroup -n MyStorageAccount +- group: + name: storage blob + summary: Manage object storage for unstructured data (blobs). +- command: + name: storage blob exists + summary: Check for the existence of a blob in a container. + arguments: + - name: --name + summary: The blob name. +- command: + name: storage blob list + summary: List blobs in a given container. + arguments: + - name: --include + summary: 'Specifies additional datasets to include: (c)opy-info, (m)etadata, (s)napshots, (d)eleted-soft. Can be combined.' + examples: + - summary: List all storage blobs in a container whose names start with 'foo'; will match names such as 'foo', 'foobar', and 'foo/bar' + command: az storage blob list -c MyContainer --prefix foo +- group: + name: storage blob copy + summary: Manage blob copy operations. Use `az storage blob show` to check the status of the blobs. +- group: + name: storage blob incremental-copy + summary: Manage blob incremental copy operations. +- command: + name: storage blob incremental-copy start + summary: Copies an incremental copy of a blob asynchronously. + description: This operation returns a copy operation properties object, including a copy ID you can use to check or abort the copy operation. The Blob service copies blobs on a best-effort basis. The source blob for an incremental copy operation must be a page blob. Call get_blob_properties on the destination blob to check the status of the copy operation. The final blob will be committed when the copy completes. + examples: + - summary: Upload all files that end with .py unless blob exists and has been modified since given date. + command: az storage blob incremental-copy start --source-container MySourceContainer --source-blob MyBlob --source-account-name MySourceAccount --source-account-key MySourceKey --source-snapshot MySnapshot --destination-container MyDestinationContainer --destination-blob MyDestinationBlob +- group: + name: storage blob lease + summary: Manage storage blob leases. +- group: + name: storage blob metadata + summary: Manage blob metadata. +- group: + name: storage blob service-properties + summary: Manage storage blob service properties. +- command: + name: storage blob service-properties update + summary: Update storage blob service properties. +- group: + name: storage blob service-properties delete-policy + summary: Manage storage blob delete-policy service properties. +- command: + name: storage blob service-properties delete-policy show + summary: Show the storage blob delete-policy. +- command: + name: storage blob service-properties delete-policy update + summary: Update the storage blob delete-policy. +- command: + name: storage blob set-tier + summary: Set the block or page tiers on the blob. + description: > + For block blob this command only supports block blob on standard storage accounts. + For page blob, this command only supports for page blobs on premium accounts. + arguments: + - name: --type + summary: The blob type + - name: --tier + summary: The tier value to set the blob to. + - name: --timeout + summary: The timeout parameter is expressed in seconds. This method may make multiple calls to the Azure service and the timeout will apply to each call individually. +- command: + name: storage blob upload-batch + summary: Upload files from a local directory to a blob container. + arguments: + - name: --source + summary: The directory where the files to be uploaded are located. + - name: --destination + summary: The blob container where the files will be uploaded. + description: The destination can be the container URL or the container name. When the destination is the container URL, the storage account name will be parsed from the URL. + - name: --pattern + summary: The pattern used for globbing files or blobs in the source. The supported patterns are '*', '?', '[seq]', and '[!seq]'. + - name: --dryrun + summary: Show the summary of the operations to be taken instead of actually uploading the file(s). + - name: --if-match + summary: An ETag value, or the wildcard character (*). Specify this header to perform the operation only if the resource's ETag matches the value specified. + - name: --if-none-match + summary: An ETag value, or the wildcard character (*). + description: Specify this header to perform the operation only if the resource's ETag does not match the value specified. Specify the wildcard character (*) to perform the operation only if the resource does not exist, and fail the operation if it does exist. + - name: --validate-content + summary: Specifies that an MD5 hash shall be calculated for each chunk of the blob and verified by the service when the chunk has arrived. + - name: --type + summary: Defaults to 'page' for *.vhd files, or 'block' otherwise. The setting will override blob types for every file. + - name: --maxsize-condition + summary: The max length in bytes permitted for an append blob. + - name: --lease-id + summary: Required if the blob has an active lease + examples: + - summary: Upload all files that end with .py unless blob exists and has been modified since given date. + command: az storage blob upload-batch -d MyContainer --account-name MyStorageAccount -s directory_path --pattern *.py --if-unmodified-since 2018-08-27T20:51Z +- command: + name: storage blob download-batch + summary: Download blobs from a blob container recursively. + arguments: + - name: --source + summary: The blob container from where the files will be downloaded. + description: The source can be the container URL or the container name. When the source is the container URL, the storage account name will be parsed from the URL. + - name: --destination + summary: The existing destination folder for this download operation. + - name: --pattern + summary: The pattern used for globbing files or blobs in the source. The supported patterns are '*', '?', '[seq]', and '[!seq]'. + - name: --dryrun + summary: Show the summary of the operations to be taken instead of actually downloading the file(s). + examples: + - summary: Download all blobs that end with .py + command: az storage blob download-batch -d . --pattern *.py -s MyContainer --account-name MyStorageAccount +- command: + name: storage blob delete-batch + summary: Delete blobs from a blob container recursively. + arguments: + - name: --source + summary: The blob container from where the files will be deleted. + description: The source can be the container URL or the container name. When the source is the container URL, the storage account name will be parsed from the URL. + - name: --pattern + summary: The pattern used for globbing files or blobs in the source. The supported patterns are '*', '?', '[seq]', and '[!seq]'. + - name: --dryrun + summary: Show the summary of the operations to be taken instead of actually deleting the file(s). + - name: --if-match + summary: An ETag value, or the wildcard character (*). Specify this header to perform the operation only if the resource's ETag matches the value specified. + - name: --if-none-match + summary: An ETag value, or the wildcard character (*). + description: Specify this header to perform the operation only if the resource's ETag does not match the value specified. Specify the wildcard character (*) to perform the operation only if the resource does not exist, and fail the operation if it does exist. + examples: + - summary: Delete all blobs ending with ".py" in a container that have not been modified for 10 days. + command: | + date=`date -d "10 days ago" '+%Y-%m-%dT%H:%MZ'` + az storage blob delete-batch -s MyContainer --account-name MyStorageAccount --pattern *.py --if-unmodified-since $date +- command: + name: storage blob copy start + summary: Copies a blob asynchronously. Use `az storage blob show` to check the status of the blobs. +- command: + name: storage blob copy start-batch + summary: Copy multiple blobs or files to a blob container. Use `az storage blob show` to check the status of the blobs. + arguments: + - name: --destination-container + summary: The blob container where the selected source files or blobs will be copied to. + - name: --pattern + summary: The pattern used for globbing files or blobs in the source. The supported patterns are '*', '?', '[seq', and '[!seq]'. + - name: --dryrun + summary: List the files or blobs to be uploaded. No actual data transfer will occur. + - name: --source-account-name + summary: The source storage account from which the files or blobs are copied to the destination. If omitted, the source account is used. + - name: --source-account-key + summary: The account key for the source storage account. + - name: --source-container + summary: The source container from which blobs are copied. + - name: --source-share + summary: The source share from which files are copied. + - name: --source-uri + summary: A URI specifying a file share or blob container from which the files or blobs are copied. + description: If the source is in another account, the source must either be public or be authenticated by using a shared access signature. + - name: --source-sas + summary: The shared access signature for the source storage account. +- group: + name: storage container + summary: Manage blob storage containers. +- command: + name: storage container exists + summary: Check for the existence of a storage container. +- command: + name: storage container list + summary: List containers in a storage account. +- group: + name: storage container lease + summary: Manage blob storage container leases. +- group: + name: storage container metadata + summary: Manage container metadata. +- group: + name: storage container policy + summary: Manage container stored access policies. +- group: + name: storage container immutability-policy + summary: Manage container immutability policies. +- group: + name: storage container legal-hold + summary: Manage container legal holds. +- command: + name: storage container legal-hold show + summary: Get the legal hold properties of a container. +- group: + name: storage cors + summary: Manage storage service Cross-Origin Resource Sharing (CORS). +- command: + name: storage cors add + summary: Add a CORS rule to a storage account. + arguments: + - name: --services + summary: > + The storage service(s) to add rules to. Allowed options are: (b)lob, (f)ile, + (q)ueue, (t)able. Can be combined. + - name: --max-age + summary: The maximum number of seconds the client/browser should cache a preflight response. + - name: --origins + summary: Space-separated list of origin domains that will be allowed via CORS, or '*' to allow all domains. + - name: --methods + summary: Space-separated list of HTTP methods allowed to be executed by the origin. + - name: --allowed-headers + summary: Space-separated list of response headers allowed to be part of the cross-origin request. + - name: --exposed-headers + summary: Space-separated list of response headers to expose to CORS clients. +- command: + name: storage cors clear + summary: Remove all CORS rules from a storage account. + arguments: + - name: --services + summary: > + The storage service(s) to remove rules from. Allowed options are: (b)lob, (f)ile, + (q)ueue, (t)able. Can be combined. +- command: + name: storage cors list + summary: List all CORS rules for a storage account. + arguments: + - name: --services + summary: > + The storage service(s) to list rules for. Allowed options are: (b)lob, (f)ile, + (q)ueue, (t)able. Can be combined. +- group: + name: storage directory + summary: Manage file storage directories. +- command: + name: storage directory exists + summary: Check for the existence of a storage directory. +- group: + name: storage directory metadata + summary: Manage file storage directory metadata. +- command: + name: storage directory list + summary: List directories in a share. +- group: + name: storage entity + summary: Manage table storage entities. +- command: + name: storage entity query + summary: List entities which satisfy a query. + arguments: + - name: --marker + summary: Space-separated list of key=value pairs. Must contain a nextpartitionkey and a nextrowkey. + description: This value can be retrieved from the next_marker field of a previous generator object if max_results was specified and that generator has finished enumerating results. If specified, this generator will begin returning results from the point where the previous generator stopped. +- group: + name: storage file + summary: Manage file shares that use the SMB 3.0 protocol. +- command: + name: storage file exists + summary: Check for the existence of a file. +- command: + name: storage file list + summary: List files and directories in a share. + arguments: + - name: --exclude-dir + summary: List only files in the given share. +- group: + name: storage file copy + summary: Manage file copy operations. +- group: + name: storage file metadata + summary: Manage file metadata. +- command: + name: storage file upload-batch + summary: Upload files from a local directory to an Azure Storage File Share in a batch operation. + arguments: + - name: --source + summary: The directory to upload files from. + - name: --destination + summary: The destination of the upload operation. + description: The destination can be the file share URL or the share name. When the destination is the share URL, the storage account name is parsed from the URL. + - name: --destination-path + summary: The directory where the source data is copied to. If omitted, data is copied to the root directory. + - name: --pattern + summary: The pattern used for file globbing. The supported patterns are '*', '?', '[seq', and '[!seq]'. + - name: --dryrun + summary: List the files and blobs to be uploaded. No actual data transfer will occur. + - name: --max-connections + summary: The maximum number of parallel connections to use. Default value is 1. + - name: --validate-content + summary: If set, calculates an MD5 hash for each range of the file for validation. + description: > + The storage service checks the hash of the content that has arrived is identical to the hash that was sent. + This is mostly valuable for detecting bitflips during transfer if using HTTP instead of HTTPS. This hash is not stored. +- command: + name: storage file download-batch + summary: Download files from an Azure Storage File Share to a local directory in a batch operation. + arguments: + - name: --source + summary: The source of the file download operation. The source can be the file share URL or the share name. + - name: --destination + summary: The local directory where the files are downloaded to. This directory must already exist. + - name: --pattern + summary: The pattern used for file globbing. The supported patterns are '*', '?', '[seq]', and '[!seq]'. + - name: --dryrun + summary: List the files and blobs to be downloaded. No actual data transfer will occur. + - name: --max-connections + summary: The maximum number of parallel connections to use. Default value is 1. + - name: --validate-content + summary: If set, calculates an MD5 hash for each range of the file for validation. + description: > + The storage service checks the hash of the content that has arrived is identical to the hash that was sent. + This is mostly valuable for detecting bitflips during transfer if using HTTP instead of HTTPS. This hash is not stored. +- command: + name: storage file delete-batch + summary: Delete files from an Azure Storage File Share. + arguments: + - name: --source + summary: The source of the file delete operation. The source can be the file share URL or the share name. + - name: --pattern + summary: The pattern used for file globbing. The supported patterns are '*', '?', '[seq]', and '[!seq]'. + - name: --dryrun + summary: List the files and blobs to be deleted. No actual data deletion will occur. +- command: + name: storage file copy start-batch + summary: Copy multiple files or blobs to a file share. + arguments: + - name: --destination-share + summary: The file share where the source data is copied to. + - name: --destination-path + summary: The directory where the source data is copied to. If omitted, data is copied to the root directory. + - name: --pattern + summary: The pattern used for globbing files and blobs. The supported patterns are '*', '?', '[seq', and '[!seq]'. + - name: --dryrun + summary: List the files and blobs to be copied. No actual data transfer will occur. + - name: --source-account-name + summary: The source storage account to copy the data from. If omitted, the destination account is used. + - name: --source-account-key + summary: The account key for the source storage account. If omitted, the active login is used to determine the account key. + - name: --source-container + summary: The source container blobs are copied from. + - name: --source-share + summary: The source share files are copied from. + - name: --source-uri + summary: A URI that specifies a the source file share or blob container. + description: If the source is in another account, the source must either be public or authenticated via a shared access signature. + - name: --source-sas + summary: The shared access signature for the source storage account. +- group: + name: storage logging + summary: Manage storage service logging information. +- command: + name: storage logging show + summary: Show logging settings for a storage account. + arguments: + - name: --services + summary: 'The storage services from which to retrieve logging info: (b)lob (q)ueue (t)able. Can be combined.' +- command: + name: storage logging update + summary: Update logging settings for a storage account. + arguments: + - name: --services + summary: 'The storage service(s) for which to update logging info: (b)lob (q)ueue (t)able. Can be combined.' + - name: --log + summary: 'The operations for which to enable logging: (r)ead (w)rite (d)elete. Can be combined.' + - name: --retention + summary: Number of days for which to retain logs. 0 to disable. + - name: --version + summary: Version of the logging schema. +- group: + name: storage message + summary: Manage queue storage messages. +- group: + name: storage metrics + summary: Manage storage service metrics. +- command: + name: storage metrics show + summary: Show metrics settings for a storage account. + arguments: + - name: --services + summary: 'The storage services from which to retrieve metrics info: (b)lob (q)ueue (t)able. Can be combined.' + - name: --interval + summary: Filter the set of metrics to retrieve by time interval +- command: + name: storage metrics update + summary: Update metrics settings for a storage account. + arguments: + - name: --services + summary: 'The storage services from which to retrieve metrics info: (b)lob (q)ueue (t)able. Can be combined.' + - name: --hour + summary: Update the hourly metrics + - name: --minute + summary: Update the by-minute metrics + - name: --api + summary: Specify whether to include API in metrics. Applies to both hour and minute metrics if both are specified. Must be specified if hour or minute metrics are enabled and being updated. + - name: --retention + summary: Number of days for which to retain metrics. 0 to disable. Applies to both hour and minute metrics if both are specified. +- group: + name: storage queue + summary: Manage storage queues. +- command: + name: storage queue list + summary: List queues in a storage account. +- group: + name: storage queue metadata + summary: Manage the metadata for a storage queue. +- group: + name: storage queue policy + summary: Manage shared access policies for a storage queue. +- group: + name: storage share + summary: Manage file shares. +- command: + name: storage share url + summary: Create a URI to access a file share. +- command: + name: storage share exists + summary: Check for the existence of a file share. +- command: + name: storage share list + summary: List the file shares in a storage account. +- group: + name: storage share metadata + summary: Manage the metadata of a file share. +- group: + name: storage share policy + summary: Manage shared access policies of a storage file share. +- command: + name: storage share create + summary: Creates a new share under the specified account. +- group: + name: storage table + summary: Manage NoSQL key-value storage. +- command: + name: storage table list + summary: List tables in a storage account. +- group: + name: storage table policy + summary: Manage shared access policies of a storage table. +- group: + name: storage account network-rule + summary: Manage network rules. +- command: + name: storage account network-rule add + summary: Add a network rule. + description: > + Rules can be created for an IPv4 address, address range (CIDR format), or a virtual network subnet. + examples: + - summary: Create a rule to allow a specific address-range. + command: az storage account network-rule add -g myRg --account-name mystorageaccount --ip-address 23.45.1.0/24 + - summary: Create a rule to allow access for a subnet. + command: az storage account network-rule add -g myRg --account-name mystorageaccount --vnet myvnet --subnet mysubnet +- command: + name: storage account network-rule list + summary: List network rules. +- command: + name: storage account network-rule remove + summary: Remove a network rule. +- command: + name: storage account generate-sas + arguments: + - name: --services + summary: 'The storage services the SAS is applicable for. Allowed values: (b)lob (f)ile (q)ueue (t)able. Can be combined.' + - name: --resource-types + summary: 'The resource types the SAS is applicable for. Allowed values: (s)ervice (c)ontainer (o)bject. Can be combined.' + - name: --expiry + summary: Specifies the UTC datetime (Y-m-d'T'H:M'Z') at which the SAS becomes invalid. + - name: --start + summary: Specifies the UTC datetime (Y-m-d'T'H:M'Z') at which the SAS becomes valid. Defaults to the time of the request. + - name: --account-name + summary: 'Storage account name. Must be used in conjunction with either storage account key or a SAS token. Environment Variable: AZURE_STORAGE_ACCOUNT' + examples: + - summary: Generate a sas token for the account that is valid for queue and table services on Linux. + command: | + end=`date -d "30 minutes" '+%Y-%m-%dT%H:%MZ'` + az storage account generate-sas --permissions cdlruwap --account-name MyStorageAccount --services qt --resource-types sco --expiry $end -otsv + - summary: Generate a sas token for the account that is valid for queue and table services on MacOS. + command: | + end=`date -v+30M '+%Y-%m-%dT%H:%MZ'` + az storage account generate-sas --permissions cdlruwap --account-name MyStorageAccount --services qt --resource-types sco --expiry $end -otsv +- command: + name: storage container generate-sas + examples: + - summary: Generate a sas token for blob container and use it to upload a blob. + command: | + end=`date -d "30 minutes" '+%Y-%m-%dT%H:%MZ'` + sas=`az storage container generate-sas -n MyContainer --account-name MyStorageAccount --https-only --permissions dlrw --expiry $end -otsv` + az storage blob upload -n MyBlob -c MyContainer --account-name MyStorageAccount -f file.txt --sas-token $sas +- command: + name: storage blob generate-sas + examples: + - summary: Generate a sas token for a blob with read-only permissions. + command: | + end=`date -d "30 minutes" '+%Y-%m-%dT%H:%MZ'` + az storage blob generate-sas --account-name MyStorageAccount -c MyContainer -n MyBlob --permissions r --expiry $end --https-only +- command: + name: storage share generate-sas + examples: + - summary: Generate a sas token for a fileshare and use it to upload a file. + command: | + end=`date -d "30 minutes" '+%Y-%m-%dT%H:%MZ'` + sas=`az storage share generate-sas -n MyShare --account-name MyStorageAccount --https-only --permissions dlrw --expiry $end -otsv` + az storage file upload -s MyShare --account-name MyStorageAccount --source file.txt --sas-token $sas +- command: + name: storage file generate-sas + examples: + - summary: Generate a sas token for a file. + command: | + end=`date -d "30 minutes" '+%Y-%m-%dT%H:%MZ'` + az storage file generate-sas -p path/file.txt -s MyShare --account-name MyStorageAccount --permissions rcdw --https-only --expiry $end +- command: + name: storage blob url + summary: Create the url to access a blob. +- command: + name: storage file url + summary: Create the url to access a file. diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/help.yaml b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/help.yaml new file mode 100644 index 00000000000..5949bab2c08 --- /dev/null +++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/help.yaml @@ -0,0 +1,1323 @@ +version: 1 +content: +- group: + name: vm secret + summary: Manage VM secrets. +- command: + name: vm secret add + summary: Add a secret to a VM. +- command: + name: vm secret list + summary: List secrets on a VM. +- command: + name: vm secret remove + summary: Remove a secret from a VM. +- command: + name: vm secret format + summary: Transform secrets into a form that can be used by VMs and VMSSes. + arguments: + - name: --secrets + description: > + The command will attempt to resolve the vault ID for each secret. If it is unable to do so, + specify the vault ID to use for *all* secrets using: --keyvault NAME --resource-group NAME | --keyvault ID. + examples: + - summary: Create a self-signed certificate with the default policy, and add it to a virtual machine. + command: > + az keyvault certificate create --vault-name vaultname -n cert1 \ + -p "$(az keyvault certificate get-default-policy)" + + secrets=$(az keyvault secret list-versions --vault-name vaultname \ + -n cert1 --query "[?attributes.enabled].id" -o tsv) + + vm_secrets=$(az vm secret format -s "$secrets") + + az vm create -g group-name -n vm-name --admin-username deploy \ + --image debian --secrets "$vm_secrets" +- command: + name: vm create + summary: Create an Azure Virtual Machine. + description: For an end-to-end tutorial, see https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-quick-create-cli. + arguments: + - name: --image + summary: > + The name of the operating system image as a URN alias, URN, custom image name or ID, or VHD blob URI. + This parameter is required unless using `--attach-os-disk.` Valid URN format: "Publisher:Offer:Sku:Version". + value-sources: + - link: + command: az vm image list + - link: + command: az vm image show + - name: --ssh-key-value + summary: The SSH public key or public key file path. + examples: + - summary: Create a default Ubuntu VM with automatic SSH authentication. + command: > + az vm create -n MyVm -g MyResourceGroup --image UbuntuLTS + - summary: Create a default RedHat VM with automatic SSH authentication using an image URN. + command: > + az vm create -n MyVm -g MyResourceGroup --image RedHat:RHEL:7-RAW:7.4.2018010506 + - summary: Create a default Windows Server VM with a private IP address. + command: > + az vm create -n MyVm -g MyResourceGroup --public-ip-address "" --image Win2012R2Datacenter + - summary: Create a VM from a custom managed image. + command: > + az vm create -g MyResourceGroup -n MyVm --image MyImage + - summary: Create a VM by attaching to a managed operating system disk. + command: > + az vm create -g MyResourceGroup -n MyVm --attach-os-disk MyOsDisk --os-type linux + - summary: 'Create an Ubuntu Linux VM using a cloud-init script for configuration. See: https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init.' + command: > + az vm create -g MyResourceGroup -n MyVm --image debian --custom-data MyCloudInitScript.yml + - summary: Create a Debian VM with SSH key authentication and a public DNS entry, located on an existing virtual network and availability set. + command: | + az vm create -n MyVm -g MyResourceGroup --image debian --vnet-name MyVnet --subnet subnet1 \ + --availability-set MyAvailabilitySet --public-ip-address-dns-name MyUniqueDnsName \ + --ssh-key-value @key-file + - summary: Create a simple Ubuntu Linux VM with a public IP address, DNS entry, two data disks (10GB and 20GB), and then generate ssh key pairs. + command: | + az vm create -n MyVm -g MyResourceGroup --public-ip-address-dns-name MyUniqueDnsName \ + --image ubuntults --data-disk-sizes-gb 10 20 --size Standard_DS2_v2 \ + --generate-ssh-keys + - summary: Create a Debian VM using Key Vault secrets. + command: > + az keyvault certificate create --vault-name vaultname -n cert1 \ + -p "$(az keyvault certificate get-default-policy)" + + secrets=$(az keyvault secret list-versions --vault-name vaultname \ + -n cert1 --query "[?attributes.enabled].id" -o tsv) + + vm_secrets=$(az vm secret format -s "$secrets") + + + az vm create -g group-name -n vm-name --admin-username deploy \ + --image debian --secrets "$vm_secrets" + - summary: Create a CentOS VM with a system assigned identity. The VM will have a 'Contributor' role with access to a storage account. + command: > + az vm create -n MyVm -g rg1 --image centos --assign-identity --scope /subscriptions/99999999-1bf0-4dda-aec3-cb9272f09590/MyResourceGroup/myRG/providers/Microsoft.Storage/storageAccounts/storage1 + - summary: Create a debian VM with a user assigned identity. + command: > + az vm create -n MyVm -g rg1 --image debian --assign-identity /subscriptions/99999999-1bf0-4dda-aec3-cb9272f09590/resourcegroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myID + - summary: Create a debian VM with both system and user assigned identity. + command: > + az vm create -n MyVm -g rg1 --image debian --assign-identity [system] /subscriptions/99999999-1bf0-4dda-aec3-cb9272f09590/resourcegroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myID + - summary: Create a VM in an availability zone in the current resource group's region + command: > + az vm create -n MyVm -g MyResourceGroup --image Centos --zone 1 + min_profile: latest +- command: + name: vmss create + summary: Create an Azure Virtual Machine Scale Set. + description: For an end-to-end tutorial, see https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-linux-create-cli. + arguments: + - name: --image + summary: > + The name of the operating system image as a URN alias, URN, custom image name or ID, or VHD blob URI. + Valid URN format: "Publisher:Offer:Sku:Version". + value-sources: + - link: + command: az vm image list + - link: + command: az vm image show + examples: + - summary: Create a Windows VM scale set with 5 instances, a load balancer, a public IP address, and a 2GB data disk. + command: > + az vmss create -n MyVmss -g MyResourceGroup --instance-count 5 --image Win2016Datacenter --data-disk-sizes-gb 2 + - summary: Create a Linux VM scale set with an auto-generated ssh key pair, a public IP address, a DNS entry, an existing load balancer, and an existing virtual network. + command: | + az vmss create -n MyVmss -g MyResourceGroup --public-ip-address-dns-name my-globally-dns-name \ + --load-balancer MyLoadBalancer --vnet-name MyVnet --subnet MySubnet --image UbuntuLTS \ + --generate-ssh-keys + - summary: Create a Linux VM scale set from a custom image using the default existing public SSH key. + command: > + az vmss create -n MyVmss -g MyResourceGroup --image MyImage + - summary: Create a Linux VM scale set with a load balancer and custom DNS servers. Each VM has a public-ip address and a custom domain name. + command: > + az vmss create -n MyVmss -g MyResourceGroup --image centos \ + --public-ip-per-vm --vm-domain-name myvmss --dns-servers 10.0.0.6 10.0.0.5 + - summary: 'Create a Linux VM scale set using a cloud-init script for configuration. See: https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init' + command: > + az vmss create -g MyResourceGroup -n MyVmss --image debian --custom-data MyCloudInitScript.yml + - summary: Create a Debian VM scaleset using Key Vault secrets. + command: > + az keyvault certificate create --vault-name vaultname -n cert1 \ + -p "$(az keyvault certificate get-default-policy)" + + secrets=$(az keyvault secret list-versions --vault-name vaultname \ + -n cert1 --query "[?attributes.enabled].id" -o tsv) + + vm_secrets=$(az vm secret format -s "$secrets") + + + az vmss create -g group-name -n vm-name --admin-username deploy \ + --image debian --secrets "$vm_secrets" + - summary: Create a VM scaleset with system assigned identity. The VM will have a 'Contributor' Role with access to a storage account. + command: > + az vmss create -n MyVmss -g MyResourceGroup --image centos --assign-identity --scope /subscriptions/99999999-1bf0-4dda-aec3-cb9272f09590/MyResourceGroup/myRG/providers/Microsoft.Storage/storageAccounts/storage1 + - summary: Create a debian VM scaleset with a user assigned identity. + command: > + az vmss create -n MyVmss -g rg1 --image debian --assign-identity /subscriptions/99999999-1bf0-4dda-aec3-cb9272f09590/resourcegroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myID + - summary: Create a debian VM scaleset with both system and user assigned identity. + command: > + az vmss create -n MyVmss -g rg1 --image debian --assign-identity [system] /subscriptions/99999999-1bf0-4dda-aec3-cb9272f09590/resourcegroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myID + - summary: Create a single zone VM scaleset in the current resource group's region + command: > + az vmss create -n MyVmss -g MyResourceGroup --image Centos --zones 1 + min_profile: latest +- command: + name: vm availability-set create + summary: Create an Azure Availability Set. + description: For more information, see https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-manage-availability. + examples: + - summary: Create an availability set. + command: az vm availability-set create -n MyAvSet -g MyResourceGroup --platform-fault-domain-count 2 --platform-update-domain-count 2 +- command: + name: vm availability-set update + summary: Update an Azure Availability Set. + examples: + - summary: Update an availability set. + command: az vm availability-set update -n MyAvSet -g MyResourceGroup + - summary: Update an availability set tag. + command: az vm availability-set update -n MyAvSet -g MyResourceGroup --set tags.foo=value + - summary: Remove an availability set tag. + command: az vm availability-set update -n MyAvSet -g MyResourceGroup --remove tags.foo +- command: + name: vm availability-set convert + summary: Convert an Azure Availability Set to contain VMs with managed disks. + examples: + - summary: Convert an availabiity set to use managed disks by name. + command: az vm availability-set convert -g MyResourceGroup -n MyAvSet + - summary: Convert an availability set to use managed disks by ID. + command: > + az vm availability-set convert --ids $(az vm availability-set list -g MyResourceGroup --query "[].id" -o tsv) +- command: + name: vm extension set + summary: Set extensions for a VM. + description: Get extension details from `az vm extension image list`. + arguments: + - name: --name + value-sources: + - link: + command: az vm extension image list + examples: + - summary: Add a user account to a Linux VM. + command: | + az vm extension set -n VMAccessForLinux --publisher Microsoft.OSTCExtensions --version 1.4 \ + --vm-name MyVm --resource-group MyResourceGroup \ + --protected-settings '{"username":"user1", "ssh_key":"ssh_rsa ..."}' +- command: + name: vm extension wait + summary: Place the CLI in a waiting state until a condition of a virtual machine extension is met. +- command: + name: vm availability-set delete + summary: Delete an availability set. + examples: + - summary: Delete an availability set. + command: az vm availability-set delete -n MyAvSet -g MyResourceGroup +- command: + name: vm availability-set list + summary: List availability sets. + examples: + - summary: List availability sets. + command: az vm availability-set list -g MyResourceGroup +- command: + name: vm availability-set list-sizes + summary: List VM sizes for an availability set. + examples: + - summary: List VM sizes for an availability set. + command: az vm availability-set list-sizes -n MyAvSet -g MyResourceGroup +- command: + name: vm availability-set show + summary: Get information for an availability set. + examples: + - summary: Get information about an availability set. + command: az vm availability-set show -n MyAvSet -g MyResourceGroup +- command: + name: vm update + summary: Update the properties of a VM. + description: Update VM objects and properties using paths that correspond to 'az vm show'. + examples: + - summary: Add or update a tag. + command: az vm update -n name -g group --set tags.tagName=tagValue + - summary: Remove a tag. + command: az vm update -n name -g group --remove tags.tagName + - summary: Set the primary NIC of a VM. + command: az vm update -n name -g group --set networkProfile.networkInterfaces[1].primary=false networkProfile.networkInterfaces[0].primary=true + - summary: Add a new non-primary NIC to a VM. + command: az vm update -n name -g group --add networkProfile.networkInterfaces primary=false id= + - summary: Remove the fourth NIC from a VM. + command: az vm update -n name -g group --remove networkProfile.networkInterfaces 3 +- command: + name: vmss deallocate + summary: Deallocate VMs within a VMSS. +- command: + name: vmss delete-instances + summary: Delete VMs within a VMSS. +- command: + name: vmss get-instance-view + summary: View an instance of a VMSS. + arguments: + - name: --instance-id + summary: A VM instance ID or "*" to list instance view for all VMs in a scale set. +- command: + name: vmss list + summary: List VMSS. +- command: + name: vmss reimage + summary: Reimage VMs within a VMSS. + arguments: + - name: --instance-id + summary: VM instance ID. If missing, reimage all instances. +- command: + name: vmss restart + summary: Restart VMs within a VMSS. +- command: + name: vmss scale + summary: Change the number of VMs within a VMSS. + arguments: + - name: --new-capacity + summary: Number of VMs in the VMSS. +- command: + name: vmss show + summary: Get details on VMs within a VMSS. + arguments: + - name: --instance-id + summary: VM instance ID. If missing, show the VMSS. +- command: + name: vmss start + summary: Start VMs within a VMSS. +- command: + name: vmss stop + summary: Power off (stop) VMs within a VMSS. + description: The VMs will continue to be billed. To avoid this, you can deallocate VM instances within a VMSS through "az vmss deallocate" +- command: + name: vmss update + summary: Update a VMSS. +- command: + name: vmss update-instances + summary: Upgrade VMs within a VMSS. +- command: + name: vmss wait + summary: Place the CLI in a waiting state until a condition of a scale set is met. +- group: + name: vmss disk + summary: Manage data disks of a VMSS. +- command: + name: vmss disk attach + summary: Attach managed data disks to a scale set or its instances. +- command: + name: vmss disk detach + summary: Detach managed data disks from a scale set or its instances. +- group: + name: vmss nic + summary: Manage network interfaces of a VMSS. +- group: + name: vmss rolling-upgrade + summary: (PREVIEW) Manage rolling upgrades. +- command: + name: vm convert + summary: Convert a VM with unmanaged disks to use managed disks. + examples: + - summary: Convert a VM with unmanaged disks to use managed disks. + command: az vm convert -g MyResourceGroup -n MyVm + - summary: Convert all VMs with unmanaged disks in a resource group to use managed disks. + command: > + az vm convert --ids $(az vm list -g MyResourceGroup --query "[].id" -o tsv) +- group: + name: vm + summary: Manage Linux or Windows virtual machines. +- group: + name: vm user + summary: Manage user accounts for a VM. +- command: + name: vm user delete + summary: Delete a user account from a VM. + examples: + - summary: Delete a user account. + command: az vm user delete -u username -n MyVm -g MyResourceGroup + - summary: Delete a user on all VMs in a resource group. + command: > + az vm user delete -u username --ids $(az vm list -g MyResourceGroup --query "[].id" -o tsv) +- command: + name: vm user reset-ssh + summary: Reset the SSH configuration on a VM. + description: > + The extension will restart the SSH service, open the SSH port on your VM, and reset the SSH configuration to default values. The user account (name, password, and SSH keys) are not changed. + examples: + - summary: Reset the SSH configuration. + command: az vm user reset-ssh -n MyVm -g MyResourceGroup + - summary: Reset the SSH server on all VMs in a resource group. + command: > + az vm user reset-ssh --ids $(az vm list -g MyResourceGroup --query "[].id" -o tsv) +- command: + name: vm user update + summary: Update a user account. + arguments: + - name: --ssh-key-value + summary: SSH public key file value or public key file path + examples: + - summary: Update a Windows user account. + command: az vm user update -u username -p password -n MyVm -g MyResourceGroup + - summary: Update a Linux user account. + command: az vm user update -u username --ssh-key-value "$(< ~/.ssh/id_rsa.pub)" -n MyVm -g MyResourceGroup + - summary: Update a user on all VMs in a resource group. + command: > + az vm user update -u username --ssh-key-value "$(< ~/.ssh/id_rsa.pub)" --ids $(az vm list -g MyResourceGroup --query "[].id" -o tsv) +- group: + name: vm availability-set + summary: Group resources into availability sets. + description: > + To provide redundancy to an application, it is recommended to group two or more virtual machines in an availability set. + This configuration ensures that during either a planned or unplanned maintenance event, at least one virtual machine + will be available. +- group: + name: vm boot-diagnostics + summary: Troubleshoot the startup of an Azure Virtual Machine. + description: Use this feature to troubleshoot boot failures for custom or platform images. +- command: + name: vm boot-diagnostics disable + summary: Disable the boot diagnostics on a VM. + examples: + - summary: Disable boot diagnostics on all VMs in a resource group. + command: > + az vm boot-diagnostics disable --ids $(az vm list -g MyResourceGroup --query "[].id" -o tsv) +- command: + name: vm boot-diagnostics enable + summary: Enable the boot diagnostics on a VM. + arguments: + - name: --storage + summary: Name or URI of a storage account (e.g. https://your_storage_account_name.blob.core.windows.net/) + examples: + - summary: Enable boot diagnostics on all VMs in a resource group. + command: > + az vm boot-diagnostics enable --storage https://mystor.blob.core.windows.net/ --ids $(az vm list -g MyResourceGroup --query "[].id" -o tsv) +- command: + name: vm boot-diagnostics get-boot-log + summary: Get the boot diagnostics log from a VM. + examples: + - summary: Get diagnostics logs for all VMs in a resource group. + command: > + az vm boot-diagnostics get-boot-log --ids $(az vm list -g MyResourceGroup --query "[].id" -o tsv) +- group: + name: acs + summary: Manage Azure Container Services. +- command: + name: acs create + summary: Create a container service. + examples: + - summary: Create a Kubernetes container service and generate SSH keys to connect to it. + command: > + az acs create -g MyResourceGroup -n MyContainerService --orchestrator-type kubernetes --generate-ssh-keys +- command: + name: acs delete + summary: Delete a container service. +- command: + name: acs list + summary: List container services. +- command: + name: acs show + summary: Get the details for a container service. +- command: + name: acs scale + summary: Change the private agent count of a container service. +- group: + name: vm diagnostics + summary: Configure the Azure Virtual Machine diagnostics extension. +- command: + name: vm diagnostics get-default-config + summary: Get the default configuration settings for a VM. + examples: + - summary: Get the default diagnostics for a Linux VM and override the storage account name and the VM resource ID. + command: | + az vm diagnostics get-default-config \ + | sed "s#__DIAGNOSTIC_STORAGE_ACCOUNT__#MyStorageAccount#g" \ + | sed "s#__VM_OR_VMSS_RESOURCE_ID__#MyVmResourceId#g" + - summary: Get the default diagnostics for a Windows VM. + command: > + az vm diagnostics get-default-config --is-windows-os +- command: + name: vm diagnostics set + summary: Configure the Azure VM diagnostics extension. + examples: + - summary: Set up default diagnostics on a Linux VM for Azure Portal VM metrics graphs and syslog collection. + command: | + # Set the following 3 parameters first. + my_resource_group= + my_linux_vm= + my_diagnostic_storage_account= + + my_vm_resource_id=$(az vm show -g $my_resource_group -n $my_linux_vm --query "id" -o tsv) + + default_config=$(az vm diagnostics get-default-config \ + | sed "s#__DIAGNOSTIC_STORAGE_ACCOUNT__#$my_diagnostic_storage_account#g" \ + | sed "s#__VM_OR_VMSS_RESOURCE_ID__#$my_vm_resource_id#g") + + storage_sastoken=$(az storage account generate-sas \ + --account-name $my_diagnostic_storage_account --expiry 2037-12-31T23:59:00Z \ + --permissions wlacu --resource-types co --services bt -o tsv) + + protected_settings="{'storageAccountName': '$my_diagnostic_storage_account', \ + 'storageAccountSasToken': '$storage_sastoken'}" + + az vm diagnostics set --settings "$default_config" \ + --protected-settings "$protected_settings" \ + --resource-group $my_resource_group --vm-name $my_linux_vm + - summary: Set up default diagnostics on a Windows VM. + command: | + # Set the following 3 parameters first. + my_resource_group= + my_windows_vm= + my_diagnostic_storage_account= + + my_vm_resource_id=$(az vm show -g $my_resource_group -n $my_windows_vm --query "id" -o tsv) + + default_config=$(az vm diagnostics get-default-config --is-windows-os \ + | sed "s#__DIAGNOSTIC_STORAGE_ACCOUNT__#$my_diagnostic_storage_account#g" \ + | sed "s#__VM_OR_VMSS_RESOURCE_ID__#$my_vm_resource_id#g") + + # Please use the same options, the WAD diagnostic extension has strict + # expectations of the sas token's format. Set the expiry as desired. + storage_sastoken=$(az storage account generate-sas \ + --account-name $my_diagnostic_storage_account --expiry 2037-12-31T23:59:00Z \ + --permissions acuw --resource-types co --services bt --https-only --output tsv) + + protected_settings="{'storageAccountName': '$my_diagnostic_storage_account', \ + 'storageAccountSasToken': '$storage_sastoken'}" + + az vm diagnostics set --settings "$default_config" \ + --protected-settings "$protected_settings" \ + --resource-group $my_resource_group --vm-name $my_windows_vm + + # # Alternatively, if the WAD extension has issues parsing the sas token, + # # one can use a storage account key instead. + storage_account_key=$(az storage account keys list --account-name {my_storage_account} \ + --query [0].value -o tsv) + protected_settings="{'storageAccountName': '$my_diagnostic_storage_account', \ + 'storageAccountKey': '$storage_account_key'}" +- group: + name: vm disk + summary: Manage the managed data disks attached to a VM. + description: >2 + + Azure Virtual Machines use disks as a place to store an operating system, applications, and data. + All Azure virtual machines have at least two disks: An operating system disk, and a temporary disk. + The operating system disk is created from an image, and both the operating system disk and the image are actually virtual hard disks (VHDs) + stored in an Azure storage account. Virtual machines also can have one or more data disks, that are also stored as VHDs. + + + Azure Managed and Unmanaged Data Disks have a maximum size of 4095 GB (with the exception of larger disks in preview). Azure Unmanaged Disks also have a maximum capacity of 4095 GB. + + + For more information, see: + + - Azure Disks - https://docs.microsoft.com/en-us/azure/virtual-machines/linux/about-disks-and-vhds and https://docs.microsoft.com/en-us/azure/virtual-machines/windows/about-disks-and-vhds. + + - Larger Managed Disks in Public Preview - https://azure.microsoft.com/en-us/blog/introducing-the-public-preview-of-larger-managed-disks-sizes/ + + - Ultra SSD Managed Disks in Public Preview - https://docs.microsoft.com/en-us/azure/virtual-machines/windows/disks-ultra-ssd +- group: + name: vm unmanaged-disk + summary: Manage the unmanaged data disks attached to a VM. + description: >2 + + Azure Virtual Machines use disks as a place to store an operating system, applications, and data. + All Azure virtual machines have at least two disks: An operating system disk, and a temporary disk. + The operating system disk is created from an image, and both the operating system disk and the image are actually virtual hard disks (VHDs) + stored in an Azure storage account. Virtual machines also can have one or more data disks, that are also stored as VHDs. + + + Azure Managed and Unmanaged Data Disks have a maximum size of 4095 GB (with the exception of larger disks in preview). Azure Unmanaged Disks also have a maximum capacity of 4095 GB. + + + For more information, see: + + - Azure Disks - https://docs.microsoft.com/en-us/azure/virtual-machines/linux/about-disks-and-vhds and https://docs.microsoft.com/en-us/azure/virtual-machines/windows/about-disks-and-vhds. + + - Larger Managed Disks in Public Preview - https://azure.microsoft.com/en-us/blog/introducing-the-public-preview-of-larger-managed-disks-sizes/ + + - Ultra SSD Managed Disks in Public Preview - https://docs.microsoft.com/en-us/azure/virtual-machines/windows/disks-ultra-ssd +- command: + name: vm unmanaged-disk attach + summary: Attach an unmanaged persistent disk to a VM. + description: This allows for the preservation of data, even if the VM is reprovisioned due to maintenance or resizing. + examples: + - summary: Attach a new default sized (1023 GB) unmanaged data disk to a VM. + command: az vm unmanaged-disk attach -g MyResourceGroup --vm-name MyVm --new + - summary: Attach an existing data disk to a VM as unmanaged. + command: > + az vm unmanaged-disk attach -g MyResourceGroup --vm-name MyVm \ + --vhd-uri https://mystorage.blob.core.windows.net/vhds/d1.vhd +- command: + name: vm unmanaged-disk detach + summary: Detach an unmanaged disk from a VM. + examples: + - summary: Detach a data disk from a VM. + command: > + az vm unmanaged-disk detach -g MyResourceGroup --vm-name MyVm -n disk_name +- command: + name: vm unmanaged-disk list + summary: List unmanaged disks of a VM. + examples: + - summary: List the unmanaged disks attached to a VM. + command: az vm unmanaged-disk list -g MyResourceGroup --vm-name MyVm + - summary: List unmanaged disks with names containing the string "data_disk". + command: > + az vm unmanaged-disk list -g MyResourceGroup --vm-name MyVm \ + --query "[?contains(name, 'data_disk')]" --output table +- command: + name: vm disk detach + summary: Detach a managed disk from a VM. + examples: + - summary: Detach a data disk from a VM. + command: > + az vm disk detach -g MyResourceGroup --vm-name MyVm --name disk_name +- command: + name: vm disk attach + summary: Attach a managed persistent disk to a VM. + description: This allows for the preservation of data, even if the VM is reprovisioned due to maintenance or resizing. + examples: + - summary: Attach a new default sized (1023 GB) managed data disk to a VM. + command: az vm disk attach -g MyResourceGroup --vm-name MyVm --name disk_name --new +- group: + name: vm encryption + summary: Manage encryption of VM disks. +- command: + name: vm encryption enable + summary: Enable disk encryption on the OS disk and/or data disks. + arguments: + - name: --aad-client-id + summary: Client ID of an AAD app with permissions to write secrets to the key vault. + - name: --aad-client-secret + summary: Client secret of the AAD app with permissions to write secrets to the key vault. + - name: --aad-client-cert-thumbprint + summary: Thumbprint of the AAD app certificate with permissions to write secrets to the key vault. +- command: + name: vm encryption disable + summary: Disable disk encryption on the OS disk and/or data disks. +- command: + name: vm encryption show + summary: Show encryption status. +- group: + name: vm extension + summary: Manage extensions on VMs. + description: > + Extensions are small applications that provide post-deployment configuration and automation tasks on Azure virtual machines. + For example, if a virtual machine requires software installation, anti-virus protection, or Docker configuration, a VM extension + can be used to complete these tasks. Extensions can be bundled with a new virtual machine deployment or run against any existing system. +- command: + name: vm extension list + summary: List the extensions attached to a VM. + examples: + - summary: List attached extensions to a named VM. + command: az vm extension list -g MyResourceGroup --vm-name MyVm +- command: + name: vm extension delete + summary: Remove an extension attached to a VM. + examples: + - summary: Use a VM name and extension to delete an extension from a VM. + command: az vm extension delete -g MyResourceGroup --vm-name MyVm -n extension_name + - summary: Delete extensions with IDs containing the string "MyExtension" from a VM. + command: > + az vm extension delete --ids \ + $(az resource list --query "[?contains(name, 'MyExtension')].id" -o tsv) +- command: + name: vm extension show + summary: Display information about extensions attached to a VM. + examples: + - summary: Use VM name and extension name to show the extensions attached to a VM. + command: az vm extension show -g MyResourceGroup --vm-name MyVm -n extension_name +- group: + name: vm extension image + summary: Find the available VM extensions for a subscription and region. +- command: + name: vm extension image list + summary: List the information on available extensions. + examples: + - summary: List the unique publishers for extensions. + command: az vm extension image list --query "[].publisher" -o tsv | sort -u + - summary: Find extensions with "Docker" in the name. + command: az vm extension image list --query "[].name" -o tsv | sort -u | grep Docker + - summary: List extension names where the publisher name starts with "Microsoft.Azure.App". + command: | + az vm extension image list --query \ + "[?starts_with(publisher, 'Microsoft.Azure.App')].publisher" \ + -o tsv | sort -u | xargs -I{} az vm extension image list-names --publisher {} -l westus +- command: + name: vm extension image list-names + summary: List the names of available extensions. + examples: + - summary: Find Docker extensions by publisher and location. + command: > + az vm extension image list-names --publisher Microsoft.Azure.Extensions \ + -l westus --query "[?starts_with(name, 'Docker')]" + - summary: Find CustomScript extensions by publisher and location. + command: > + az vm extension image list-names --publisher Microsoft.Azure.Extensions \ + -l westus --query "[?starts_with(name, 'Custom')]" +- command: + name: vm extension image list-versions + summary: List the versions for available extensions. + examples: + - summary: Find the available versions for the Docker extension. + command: > + az vm extension image list-versions --publisher Microsoft.Azure.Extensions \ + -l westus -n DockerExtension -otable +- command: + name: vm extension image show + summary: Display information for an extension. + examples: + - summary: Show the CustomScript extension version 2.0.2. + command: > + az vm extension image show -l westus -n CustomScript \ + --publisher Microsoft.Azure.Extensions --version 2.0.2 + - summary: Show the latest version of the Docker extension. + command: > + publisher=Microsoft.Azure.Extensions + + extension=DockerExtension + + location=westus + + + latest=$(az vm extension image list-versions \ + --publisher {publisher} -l {location} -n {extension} \ + --query "[].name" -o tsv | sort | tail -n 1) + + az vm extension image show -l {location} \ + --publisher {publisher} -n {extension} --version {latest} +- group: + name: vm image + summary: Information on available virtual machine images. +- command: + name: vm image list + summary: List the VM/VMSS images available in the Azure Marketplace. + arguments: + - name: --all + summary: Retrieve image list from live Azure service rather using an offline image list + - name: --offer + summary: Image offer name, partial name is accepted + - name: --publisher + summary: Image publisher name, partial name is accepted + - name: --sku + summary: Image sku name, partial name is accepted + examples: + - summary: List all available images. + command: az vm image list --all + - summary: List all offline cached CentOS images. + command: az vm image list -f CentOS + - summary: List all CentOS images. + command: az vm image list -f CentOS --all +- command: + name: vm image list-offers + summary: List the VM image offers available in the Azure Marketplace. + arguments: + - name: --publisher + value-sources: + - link: + command: az vm list-publishers + examples: + - summary: List all offers from Microsoft in the West US region. + command: az vm image list-offers -l westus -p MicrosoftWindowsServer + - summary: List all offers from OpenLocic in the West US region. + command: az vm image list-offers -l westus -p OpenLogic +- command: + name: vm image list-publishers + summary: List the VM image publishers available in the Azure Marketplace. + examples: + - summary: List all publishers in the West US region. + command: az vm image list-publishers -l westus + - summary: List all publishers with names starting with "Open" in westus. + command: az vm image list-publishers -l westus --query "[?starts_with(name, 'Open')]" +- command: + name: vm image list-skus + summary: List the VM image SKUs available in the Azure Marketplace. + arguments: + - name: --publisher + value-sources: + - link: + command: az vm list-publishers + examples: + - summary: List all skus available for CentOS published by OpenLogic in the West US region. + command: az vm image list-skus -l westus -f CentOS -p OpenLogic +- command: + name: vm image show + summary: Get the details for a VM image available in the Azure Marketplace. + examples: + - summary: Show information for the latest available CentOS image from OpenLogic. + command: > + latest=$(az vm image list -p OpenLogic -s 7.3 --all --query \ + "[?offer=='CentOS'].version" -o tsv | sort -u | tail -n 1) + az vm image show -l westus -f CentOS -p OpenLogic --sku 7.3 --version {latest} +- command: + name: vm image accept-terms + summary: Accept Azure Marketplace term so that the image can be used to create VMs +- group: + name: vm nic + summary: Manage network interfaces. See also `az network nic`. + description: > + A network interface (NIC) is the interconnection between a VM and the underlying software + network. For more information, see https://docs.microsoft.com/azure/virtual-network/virtual-network-network-interface-overview. +- command: + name: vm nic list + summary: List the NICs available on a VM. + examples: + - summary: List all of the NICs on a VM. + command: az vm nic list -g MyResourceGroup --vm-name MyVm +- command: + name: vm nic add + summary: Add existing NICs to a VM. + examples: + - summary: Add two NICs to a VM. + command: az vm nic add -g MyResourceGroup --vm-name MyVm --nics nic_name1 nic_name2 +- command: + name: vm nic remove + summary: Remove NICs from a VM. + examples: + - summary: Remove two NICs from a VM. + command: az vm nic remove -g MyResourceGroup --vm-name MyVm --nics nic_name1 nic_name2 +- command: + name: vm nic show + summary: Display information for a NIC attached to a VM. + examples: + - summary: Show details of a NIC on a VM. + command: az vm nic show -g MyResourceGroup --vm-name MyVm --nic nic_name1 +- command: + name: vm nic set + summary: Configure settings of a NIC attached to a VM. + examples: + - summary: Set a NIC on a VM to be the primary interface. + command: az vm nic set -g MyResourceGroup --vm-name MyVm --nic nic_name1 nic_name2 --primary-nic nic_name2 +- group: + name: vmss + summary: Manage groupings of virtual machines in an Azure Virtual Machine Scale Set (VMSS). +- group: + name: vmss diagnostics + summary: Configure the Azure Virtual Machine Scale Set diagnostics extension. +- command: + name: vmss diagnostics get-default-config + summary: Show the default config file which defines data to be collected. +- command: + name: vmss diagnostics set + summary: Enable diagnostics on a VMSS. +- command: + name: vmss list-instance-connection-info + summary: Get the IP address and port number used to connect to individual VM instances within a set. +- command: + name: vmss list-instance-public-ips + summary: List public IP addresses of VM instances within a set. +- group: + name: vmss extension + summary: Manage extensions on a VM scale set. +- command: + name: vmss extension delete + summary: Delete an extension from a VMSS. +- command: + name: vmss extension list + summary: List extensions associated with a VMSS. +- command: + name: vmss extension set + summary: Add an extension to a VMSS or update an existing extension. + description: Get extension details from `az vmss extension image list`. + arguments: + - name: --name + value-sources: + - link: + command: az vm extension image list + examples: + - summary: > + Set an extension which depends on two previously set extensions. That is, When a VMSS instance is + created or reimaged, the customScript extension will be provisioned only after all extensions that + it depends on have been provisioned. The extension need not depend on the other extensions for + pre-requisite configurations. + command: > + az vmss extension set --vmss-name my-vmss --name customScript --resource-group my-group \ + --version 2.0 --publisher Microsoft.Azure.Extensions \ + --provision-after-extensions NetworkWatcherAgentLinux VMAccessForLinux \ + --settings '{"commandToExecute": "echo testing"}' +- command: + name: vmss extension show + summary: Show details on a VMSS extension. +- group: + name: vmss extension image + summary: Find the available VM extensions for a subscription and region. +- command: + name: vmss extension image list + summary: List the information on available extensions. + examples: + - summary: List the unique publishers for extensions. + command: az vmss extension image list --query "[].publisher" -o tsv | sort -u + - summary: Find extensions with "Docker" in the name. + command: az vmss extension image list --query "[].name" -o tsv | sort -u | grep Docker + - summary: List extension names where the publisher name starts with "Microsoft.Azure.App". + command: | + az vmss extension image list --query \ + "[?starts_with(publisher, 'Microsoft.Azure.App')].publisher" \ + -o tsv | sort -u | xargs -I{} az vmss extension image list-names --publisher {} -l westus +- group: + name: vmss encryption + summary: (PREVIEW) Manage encryption of VMSS. +- command: + name: vmss encryption enable + summary: Encrypt a VMSS with managed disks. + examples: + - summary: encrypt a VM scale set using a key vault in the same resource group + command: > + az vmss encryption enable -g MyResourceGroup -n MyVm --disk-encryption-keyvault myvault +- command: + name: vmss encryption disable + summary: Disable the encryption on a VMSS with managed disks. + examples: + - summary: disable encryption a VMSS + command: > + az vmss encryption disable -g MyResourceGroup -n MyVm +- command: + name: vmss encryption show + summary: Show encryption status. +- command: + name: vm capture + summary: Capture information for a stopped VM. + description: For an end-to-end tutorial, see https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-capture-image + arguments: + - name: --vhd-name-prefix + summary: The VHD name prefix specify for the VM disks. + - name: --storage-container + summary: The storage account container name in which to save the disks. + - name: --overwrite + summary: Overwrite the existing disk file. + examples: + - summary: Deallocate, generalize, and capture a stopped virtual machine. + command: | + az vm deallocate -g MyResourceGroup -n MyVm + az vm generalize -g MyResourceGroup -n MyVm + az vm capture -g MyResourceGroup -n MyVm --vhd-name-prefix MyPrefix + - summary: Deallocate, generalize, and capture multiple stopped virtual machines. + command: | + vms_ids=$(az vm list -g MyResourceGroup --query "[].id" -o tsv) + az vm deallocate --ids {vms_ids} + az vm generalize --ids {vms_ids} + az vm capture --ids {vms_ids} --vhd-name-prefix MyPrefix +- command: + name: vm delete + summary: Delete a VM. + examples: + - summary: Delete a VM without a prompt for confirmation. + command: > + az vm delete -g MyResourceGroup -n MyVm --yes + - summary: Delete all VMs in a resource group. + command: > + az vm delete --ids $(az vm list -g MyResourceGroup --query "[].id" -o tsv) +- command: + name: vm deallocate + summary: Deallocate a VM. + description: For an end-to-end tutorial, see https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-capture-image + examples: + - summary: Deallocate, generalize, and capture a stopped virtual machine. + command: | + az vm deallocate -g MyResourceGroup -n MyVm + az vm generalize -g MyResourceGroup -n MyVm + az vm capture -g MyResourceGroup -n MyVm --vhd-name-prefix MyPrefix + - summary: Deallocate, generalize, and capture multiple stopped virtual machines. + command: | + vms_ids=$(az vm list -g MyResourceGroup --query "[].id" -o tsv) + az vm deallocate --ids {vms_ids} + az vm generalize --ids {vms_ids} + az vm capture --ids {vms_ids} --vhd-name-prefix MyPrefix +- command: + name: vm generalize + summary: Mark a VM as generalized, allowing it to be imaged for multiple deployments. + description: For an end-to-end tutorial, see https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-capture-image + examples: + - summary: Deallocate, generalize, and capture a stopped virtual machine. + command: | + az vm deallocate -g MyResourceGroup -n MyVm + az vm generalize -g MyResourceGroup -n MyVm + az vm capture -g MyResourceGroup -n MyVm --vhd-name-prefix MyPrefix + - summary: Deallocate, generalize, and capture multiple stopped virtual machines. + command: | + vms_ids=$(az vm list -g MyResourceGroup --query "[].id" -o tsv) + az vm deallocate --ids {vms_ids} + az vm generalize --ids {vms_ids} + az vm capture --ids {vms_ids} --vhd-name-prefix MyPrefix +- command: + name: vm get-instance-view + summary: Get instance information about a VM. + examples: + - summary: Use a resource group and name to get instance view information of a VM. + command: az vm get-instance-view -g MyResourceGroup -n MyVm + - summary: Get instance views for all VMs in a resource group. + command: > + az vm get-instance-view --ids $(az vm list -g MyResourceGroup --query "[].id" -o tsv) +- command: + name: vm list + summary: List details of Virtual Machines. + description: For more information on querying information about Virtual Machines, see https://docs.microsoft.com/en-us/cli/azure/query-az-cli2 + examples: + - summary: List all VMs. + command: az vm list + - summary: List all VMs by resource group. + command: az vm list -g MyResourceGroup + - summary: List all VMs by resource group with details. + command: az vm list -g MyResourceGroup -d +- command: + name: vm list-ip-addresses + summary: List IP addresses associated with a VM. + examples: + - summary: Get the IP addresses for a VM. + command: az vm list-ip-addresses -g MyResourceGroup -n MyVm + - summary: Get IP addresses for all VMs in a resource group. + command: > + az vm list-ip-addresses --ids $(az vm list -g MyResourceGroup --query "[].id" -o tsv) +- command: + name: vm list-sizes + summary: List available sizes for VMs. + examples: + - summary: List the available VM sizes in the West US region. + command: az vm list-sizes -l westus +- command: + name: vm list-usage + summary: List available usage resources for VMs. + examples: + - summary: Get the compute resource usage for the West US region. + command: az vm list-usage -l westus +- command: + name: vm list-vm-resize-options + summary: List available resizing options for VMs. + examples: + - summary: List all available VM sizes for resizing. + command: az vm list-vm-resize-options -g MyResourceGroup -n MyVm + - summary: List available sizes for all VMs in a resource group. + command: > + az vm list-vm-resize-options --ids $(az vm list -g MyResourceGroup --query "[].id" -o tsv) +- command: + name: vm list-skus + summary: Get details for compute-related resource SKUs. + description: This command incorporates subscription level restriction, offering the most accurate information. + examples: + - summary: List all SKUs in the West US region. + command: az vm list-skus -l westus + - summary: List all available vm sizes in the East US2 region which support availability zone. + command: az vm list-skus -l eastus2 --zone + - summary: List all available vm sizes in the East US2 region which support availability zone with name like "standard_ds1...". + command: az vm list-skus -l eastus2 --zone --size standard_ds1 + - summary: List availability set related sku information in The West US region. + command: az vm list-skus -l westus --resource-type availabilitySets +- command: + name: vm open-port + summary: Opens a VM to inbound traffic on specified ports. + description: > + Adds a security rule to the network security group (NSG) that is attached to the VM's + network interface (NIC) or subnet. The existing NSG will be used or a new one will be + created. The rule name is 'open-port-{port}' and will overwrite an existing rule with + this name. For multi-NIC VMs, or for more fine-grained control, use the appropriate + network commands directly (nsg rule create, etc). + examples: + - summary: Open all ports on a VM to inbound traffic. + command: az vm open-port -g MyResourceGroup -n MyVm --port '*' + - summary: Open a range of ports on a VM to inbound traffic with the highest priority. + command: az vm open-port -g MyResourceGroup -n MyVm --port 80-100 --priority 100 + - summary: Open all ports for all VMs in a resource group. + command: > + az vm open-port --ids $(az vm list -g MyResourceGroup --query "[].id" -o tsv) --port '*' +- command: + name: vm redeploy + summary: Redeploy an existing VM. + examples: + - summary: Redeploy a VM. + command: az vm redeploy -g MyResourceGroup -n MyVm + - summary: Redeploy all VMs in a resource group. + command: > + az vm redeploy --ids $(az vm list -g MyResourceGroup --query "[].id" -o tsv) +- command: + name: vm resize + summary: Update a VM's size. + arguments: + - name: --size + summary: The VM size. + value-sources: + - link: + command: az vm list-vm-resize-options + examples: + - summary: Resize a VM. + command: az vm resize -g MyResourceGroup -n MyVm --size Standard_DS3_v2 + - summary: Resize all VMs in a resource group. + command: > + az vm resize --size Standard_DS3_v2 --ids $(az vm list -g MyResourceGroup --query "[].id" -o tsv) +- command: + name: vm restart + summary: Restart VMs. + examples: + - summary: Restart a VM. + command: az vm restart -g MyResourceGroup -n MyVm + - summary: Restart all VMs in a resource group. + command: > + az vm restart --ids $(az vm list -g MyResourceGroup --query "[].id" -o tsv) +- command: + name: vm show + summary: Get the details of a VM. + examples: + - summary: Show information about a VM. + command: az vm show -g MyResourceGroup -n MyVm -d + - summary: Get the details for all VMs in a resource group. + command: > + az vm show -d --ids $(az vm list -g MyResourceGroup --query "[].id" -o tsv) +- command: + name: vm start + summary: Start a stopped VM. + examples: + - summary: Start a stopped VM. + command: az vm start -g MyResourceGroup -n MyVm + - summary: Start all VMs in a resource group. + command: > + az vm start --ids $(az vm list -g MyResourceGroup --query "[].id" -o tsv) +- command: + name: vm stop + summary: Power off (stop) a running VM. + description: The VM will continue to be billed. To avoid this, you can deallocate the VM through "az vm deallocate" + examples: + - summary: Power off (stop) a running VM. + command: az vm stop -g MyResourceGroup -n MyVm + - summary: Stop all VMs in a resource group. + command: > + az vm stop --ids $(az vm list -g MyResourceGroup --query "[].id" -o tsv) +- command: + name: vm wait + summary: Place the CLI in a waiting state until a condition of the VM is met. + examples: + - summary: Wait until a VM is created. + command: az vm wait -g MyResourceGroup -n MyVm --created + - summary: Wait until all VMs in a resource group are deleted. + command: > + az vm wait --deleted --ids $(az vm list -g MyResourceGroup --query "[].id" -o tsv) +- group: + name: vm identity + summary: manage service identities of a VM +- command: + name: vm identity assign + summary: Enable managed service identity on a VM. + description: This is required to authenticate and interact with other Azure services using bearer tokens. + examples: + - summary: Enable the system assigned identity on a VM with the 'Reader' role. + command: az vm identity assign -g MyResourceGroup -n MyVm --role Reader --scope /subscriptions/db5eb68e-73e2-4fa8-b18a-0123456789999/resourceGroups/MyResourceGroup + - summary: Enable the system assigned identity and a user assigned identity on a VM. + command: az vm identity assign -g MyResourceGroup -n MyVm --role Reader --identities [system] myAssignedId +- command: + name: vm identity remove + summary: Remove managed service identities from a VM. + examples: + - summary: Remove the system assigned identity + command: az vm identity remove -g MyResourceGroup -n MyVm + - summary: Remove a user assigned identity + command: az vm identity remove -g MyResourceGroup -n MyVm --identities readerId + - summary: Remove 2 identities which are in the same resource group with the VM + command: az vm identity remove -g MyResourceGroup -n MyVm --identities readerId writerId + - summary: Remove the system assigned identity and a user identity + command: az vm identity remove -g MyResourceGroup -n MyVm --identities [system] readerId +- command: + name: vm identity show + summary: display VM's managed identity info. +- group: + name: vm run-command + summary: Manage run commands on a Virtual Machine. + description: For more information, see https://docs.microsoft.com/en-us/azure/virtual-machines/windows/run-command or https://docs.microsoft.com/en-us/azure/virtual-machines/linux/run-command. +- command: + name: vm run-command invoke + summary: Execute a specific run command on a vm. + examples: + - summary: install nginx on a vm + command: az vm run-command invoke -g MyResourceGroup -n MyVm --command-id RunShellScript --scripts "sudo apt-get update && sudo apt-get install -y nginx" + - summary: invoke command with parameters + command: az vm run-command invoke -g MyResourceGroup -n MyVm --command-id RunShellScript --scripts 'echo $1 $2' --parameters hello world +- group: + name: vmss identity + summary: manage service identities of a VM scaleset. +- command: + name: vmss identity assign + summary: Enable managed service identity on a VMSS. + description: This is required to authenticate and interact with other Azure services using bearer tokens. + examples: + - summary: Enable system assigned identity on a VMSS with the 'Owner' role. + command: az vmss identity assign -g MyResourceGroup -n MyVmss --role Owner --scope /subscriptions/db5eb68e-73e2-4fa8-b18a-0123456789999/resourceGroups/MyResourceGroup +- command: + name: vmss identity remove + summary: (PREVIEW) Remove user assigned identities from a VM scaleset. + examples: + - summary: Remove system assigned identity + command: az vmss identity remove -g MyResourceGroup -n MyVmss + - summary: Remove 2 identities which are in the same resource group with the VM scaleset + command: az vmss identity remove -g MyResourceGroup -n MyVmss --identities readerId writerId + - summary: Remove system assigned identity and a user identity + command: az vmss identity remove -g MyResourceGroup -n MyVmss --identities [system] readerId +- command: + name: vmss identity show + summary: display VM scaleset's managed identity info. +- group: + name: disk + summary: Manage Azure Managed Disks. + description: >2 + + Azure Virtual Machines use disks as a place to store an operating system, applications, and data. + All Azure virtual machines have at least two disks: An operating system disk, and a temporary disk. + The operating system disk is created from an image, and both the operating system disk and the image are actually virtual hard disks (VHDs) + stored in an Azure storage account. Virtual machines also can have one or more data disks, that are also stored as VHDs. + + + Azure Managed and Unmanaged Data Disks have a maximum size of 4095 GB (with the exception of larger disks in preview). Azure Unmanaged Disks also have a maximum capacity of 4095 GB. + + + For more information, see: + + - Azure Disks - https://docs.microsoft.com/en-us/azure/virtual-machines/linux/about-disks-and-vhds and https://docs.microsoft.com/en-us/azure/virtual-machines/windows/about-disks-and-vhds. + + - Larger Managed Disks in Public Preview - https://azure.microsoft.com/en-us/blog/introducing-the-public-preview-of-larger-managed-disks-sizes/ + + - Ultra SSD Managed Disks in Public Preview - https://docs.microsoft.com/en-us/azure/virtual-machines/windows/disks-ultra-ssd +- group: + name: image + summary: Manage custom virtual machine images. +- command: + name: disk create + summary: Create a managed disk. + examples: + - summary: Create a managed disk by importing from a blob uri. + command: > + az disk create -g MyResourceGroup -n MyDisk --source https://vhd1234.blob.core.windows.net/vhds/osdisk1234.vhd + - summary: Create an empty managed disk. + command: > + az disk create -g MyResourceGroup -n MyDisk --size-gb 10 + - summary: Create a managed disk by copying an existing disk or snapshot. + command: > + az disk create -g MyResourceGroup -n MyDisk2 --source MyDisk + - summary: Create a disk in an availability zone in the region of "East US 2" + command: > + az disk create -n MyDisk -g MyResourceGroup --size-gb 10 --location eastus2 --zone 1 +- command: + name: disk list + summary: List managed disks. +- command: + name: disk delete + summary: Delete a managed disk. +- command: + name: disk update + summary: Update a managed disk. +- command: + name: disk wait + summary: Place the CLI in a waiting state until a condition of a managed disk is met. +- command: + name: disk grant-access + summary: Grant a resource read access to a managed disk. +- command: + name: disk revoke-access + summary: Revoke a resource's read access to a managed disk. +- group: + name: snapshot + summary: Manage point-in-time copies of managed disks, native blobs, or other snapshots. +- command: + name: snapshot create + summary: Create a snapshot. + examples: + - summary: Create a snapshot by importing from a blob uri. + command: > + az snapshot create -g MyResourceGroup -n MySnapshot --source https://vhd1234.blob.core.windows.net/vhds/osdisk1234.vhd + - summary: Create an empty snapshot. + command: az snapshot create -g MyResourceGroup -n MySnapshot --size-gb 10 + - summary: Create a snapshot by copying an existing disk in the same resource group. + command: az snapshot create -g MyResourceGroup -n MySnapshot2 --source MyDisk +- command: + name: snapshot update + summary: Update a snapshot. +- command: + name: snapshot list + summary: List snapshots. +- command: + name: snapshot grant-access + summary: Grant read access to a snapshot. +- command: + name: snapshot revoke-access + summary: Revoke read access to a snapshot. +- command: + name: snapshot wait + summary: Place the CLI in a waiting state until a condition of a snapshot is met. +- command: + name: image create + summary: Create a custom Virtual Machine Image from managed disks or snapshots. + examples: + - summary: Create an image from an existing disk. + command: | + az image create -g MyResourceGroup -n image1 --os-type Linux \ + --source /subscriptions/db5eb68e-73e2-4fa8-b18a-0123456789999/resourceGroups/rg1/providers/Microsoft.Compute/snapshots/s1 + - summary: Create an image by capturing an existing generalized virtual machine in the same resource group. + command: az image create -g MyResourceGroup -n image1 --source MyVm1 +- command: + name: image list + summary: List custom VM images. +- group: + name: identity + summary: Managed Service Identities +- command: + name: identity list + summary: List Managed Service Identities +- command: + name: identity list-operations + summary: Lists available operations for the Managed Identity provider +- group: + name: sig + summary: manage shared image gallery +- command: + name: sig create + summary: create a share image gallery. +- command: + name: sig list + summary: list share image galleries. +- command: + name: sig update + summary: update a share image gallery. +- group: + name: sig image-definition + summary: create an image definition +- command: + name: sig image-definition create + summary: create a gallery image definition + examples: + - summary: Create a linux image defintion + command: | + az sig image-definition create -g MyResourceGroup --gallery-name MyGallery --gallery-image-definition MyImage --publisher GreatPublisher --offer GreatOffer --sku GreatSku --os-type linux +- command: + name: sig image-definition update + summary: update a share image defintiion. +- group: + name: sig image-version + summary: create a new version from an image defintion +- command: + name: sig image-version create + summary: creat a new image version + description: this operation might take a long time depending on the replicate region number. Use "--no-wait" is advised. + examples: + - summary: Add a new image version + command: | + az sig image-version create -g MyResourceGroup --gallery-name MyGallery --gallery-image-definition MyImage --gallery-image-version 1.0.0 --managed-image /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/images/MyManagedImage + - summary: Add a new image version replicated across multiple regions with different replication counts each. Eastus2 will have it's replica count set to the default replica count. + command: | + az sig image-version create -g MyResourceGroup --gallery-name MyGallery \ + --gallery-image-definition MyImage --gallery-image-version 1.0.0 \ + --managed-image image-name --target-regions eastus2 ukwest=3 southindia=2 + - summary: Add a new image version and don't wait on it. Later you can invoke "az sig image-version wait" command when ready to create a vm from the gallery image version + command: | + az sig image-version create --no-wait -g MyResourceGroup --gallery-name MyGallery \ + --gallery-image-definition MyImage --gallery-image-version 1.0.0 \ + --managed-image imageInTheSameResourceGroup +- command: + name: sig image-version update + summary: update a share image version + examples: + - summary: Replicate to a new set of regions + command: | + az sig image-version update -g MyResourceGroup --gallery-name MyGallery --gallery-image-definition MyImage --gallery-image-version 1.0.0 --target-regions westcentralus=2 eastus2 + - summary: Replicate to one more region + command: | + az sig image-version update -g MyResourceGroup --gallery-name MyGallery --gallery-image-definition MyImage --gallery-image-version 1.0.0 --add publishingProfile.targetRegions name=westcentralus +- command: + name: sig image-version wait + summary: wait for image version related operation + examples: + - summary: wait for an image version gets updated + command: | + az sig image-version wait --updated -g MyResourceGroup --gallery-name MyGallery --gallery-image-definition MyImage --gallery-image-version 1.0.0 From 1a79404b66855ba4e7d469a7302199aa19ed6190 Mon Sep 17 00:00:00 2001 From: Oluwatosin Adewale Date: Fri, 25 Jan 2019 11:16:14 -0800 Subject: [PATCH 05/16] Fixed tox env issue. Added logger.warning if core fails to import command_modules module. --- src/azure-cli-core/azure/cli/core/__init__.py | 3 +- .../azure/cli/core/tests/test_help.py | 40 +++++++++++++++++-- 2 files changed, 39 insertions(+), 4 deletions(-) diff --git a/src/azure-cli-core/azure/cli/core/__init__.py b/src/azure-cli-core/azure/cli/core/__init__.py index 7c76dcc940c..741d5c8fd5d 100644 --- a/src/azure-cli-core/azure/cli/core/__init__.py +++ b/src/azure-cli-core/azure/cli/core/__init__.py @@ -132,7 +132,8 @@ def _update_command_table_from_modules(args): installed_command_modules = [modname for _, modname, _ in pkgutil.iter_modules(mods_ns_pkg.__path__) if modname not in BLACKLISTED_MODS] - except ImportError: + except ImportError as e: + logger.warning(e) pass logger.debug('Installed command modules %s', installed_command_modules) cumulative_elapsed_time = 0 diff --git a/src/azure-cli-core/azure/cli/core/tests/test_help.py b/src/azure-cli-core/azure/cli/core/tests/test_help.py index 5edecc79e0e..ca6380ddfa1 100644 --- a/src/azure-cli-core/azure/cli/core/tests/test_help.py +++ b/src/azure-cli-core/azure/cli/core/tests/test_help.py @@ -19,8 +19,9 @@ from azure.cli.core.mock import DummyCli from azure.cli.core.commands import _load_command_loader -from azure.cli.core.file_util import create_invoker_and_load_cmds_and_args, get_all_help +from azure.cli.core.file_util import get_all_help +logger = logging.getLogger(__name__) # Command loader module MOCKED_COMMAND_LOADER_MOD = "test_help_loaders" @@ -46,8 +47,7 @@ def inspect_getfile(obj): def mock_inspect_getmembers(object, predicate=None): import azure.cli.core.tests.test_help_loaders as possible_loaders - predicate_repr = repr(predicate) - if "_register_help_loaders" in predicate_repr and "is_loader_cls" in predicate_repr: + if "azure.cli.core._help_loaders" in repr(object) and "is_loader_cls" in repr(predicate): result = inspect_getmembers(object, predicate) result.extend(inspect_getmembers(possible_loaders, predicate)) return list(set(result)) @@ -73,6 +73,40 @@ def _get_parser_name(parser): return (parser._prog_prefix if hasattr(parser, '_prog_prefix') else parser.prog)[len('az '):] +def create_invoker_and_load_cmds_and_args(cli_ctx): + from knack import events + from azure.cli.core.commands.arm import register_global_subscription_argument, register_ids_argument + + invoker = cli_ctx.invocation_cls(cli_ctx=cli_ctx, commands_loader_cls=cli_ctx.commands_loader_cls, + parser_cls=cli_ctx.parser_cls, help_cls=cli_ctx.help_cls) + cli_ctx.invocation = invoker + invoker.commands_loader.skip_applicability = True + invoker.commands_loader.load_command_table(None) + + # Deal with failed import MainCommandsLoader.load_command_table._update_command_table_from_modules + # during tox test. + if not invoker.commands_loader.cmd_to_loader_map: + module_command_table, module_group_table = mock_load_command_loader(invoker.commands_loader, None, + MOCKED_COMMAND_LOADER_MOD, None) + for cmd in module_command_table.values(): + cmd.command_source = MOCKED_COMMAND_LOADER_MOD + invoker.commands_loader.command_table.update(module_command_table) + invoker.commands_loader.command_group_table.update(module_group_table) + + # turn off applicability check for all loaders + for loaders in invoker.commands_loader.cmd_to_loader_map.values(): + for loader in loaders: + loader.skip_applicability = True + + for command in invoker.commands_loader.command_table: + invoker.commands_loader.load_arguments(command) + + register_global_subscription_argument(cli_ctx) + register_ids_argument(cli_ctx) # global subscription must be registered first! + cli_ctx.raise_event(events.EVENT_INVOKER_POST_CMD_TBL_CREATE, commands_loader=invoker.commands_loader) + invoker.parser.load_command_table(invoker.commands_loader) + + # TODO update this CLASS to properly load all help... . class HelpTest(unittest.TestCase): @classmethod From 20a43fff2ea5377b2c94bd7c8f91ed49a67dfbfd Mon Sep 17 00:00:00 2001 From: Oluwatosin Adewale Date: Sat, 26 Jan 2019 18:17:24 -0800 Subject: [PATCH 06/16] Updated convert_all.py can now rename all command _help.py to foo.py and vice versa --- scripts/temp_help/convert_all.py | 105 ++++++++++++++++++++++++++++++- 1 file changed, 104 insertions(+), 1 deletion(-) diff --git a/scripts/temp_help/convert_all.py b/scripts/temp_help/convert_all.py index e9be4ef5375..25e4d1cf72f 100644 --- a/scripts/temp_help/convert_all.py +++ b/scripts/temp_help/convert_all.py @@ -21,6 +21,37 @@ def get_repo_root(): return here +def comment_import_help(init_file, out_file): + f_out = open(out_file, "w") + + output = "" + updated = False + with open(init_file, "r") as f_in: + for line in f_in: + if "import" in line and "_help" in line and not updated: + updated = True + line = "# " + line + output += line + + f_out.write(output) + f_out.close() + return updated + +def decomment_import_help(init_file, out_file): + f_out = open(out_file, "w") + + output = "" + updated = False + with open(init_file, "r") as f_in: + for line in f_in: + if "import" in line and "_help" in line and not updated: + updated = True + line = line.lstrip("# ") + output += line + f_out.write(output) + f_out.close() + return updated + if __name__ == "__main__": args = sys.argv[1:] @@ -32,11 +63,13 @@ def get_repo_root(): with open("mod.txt", "r") as f: for line in f: module_names.append(line) + if "sqlvm" not in module_names: + module_names.append("sqlvm") os.remove("mod.txt") successes = 0 with open(os.devnull, 'w') as devnull: # silence stdout by redirecting to devnull for mod in module_names: - args = ["python", "./help_convert.py", mod, "--test"] + args = ["python", "./help_convert.py", mod] completed_process = subprocess.run(args, stdout=devnull) if completed_process.returncode == 0: successes += 1 @@ -68,3 +101,73 @@ def get_repo_root(): print("Found {} _help.py files\n".format(py_count)) print("Found {} help.yaml files\n".format(yaml_count)) + + elif args[0].lower() == "--move-py": + + src_root = os.path.join(get_repo_root(), "src", "command_modules") + + py_count = 0 + yaml_count = 0 + failures = 0 + + for root, dirs, files in os.walk(src_root): + for file in files: + if file.endswith("_help.py") and os.path.dirname(root).endswith("command_modules") and os.path.join("build", "lib") not in root: + src = os.path.join(root, file) + dst = os.path.join(root, "foo.py") + print("Found {}\n".format(src)) + print("Renaming {}\n\tto {}\n.".format(src, dst)) + os.rename(src, dst) + py_count +=1 + + src = os.path.join(root, "__init__.py") + dst = os.path.join(root, "__init__2.py") + + success = comment_import_help(src, dst) + + if success: + os.remove(src) + os.rename(dst, src) + print("Commented out import in {}\n".format(src)) + else: + os.remove(dst) + print("Failed to comment out import in {}\n".format(src)) + failures+=1 + + + print("Renamed {} _help.py files to foo.py.\n".format(py_count)) + print("There were {} failures to decomment import statements\n".format(failures)) + + elif args[0].lower() == "--move-foo": + src_root = os.path.join(get_repo_root(), "src", "command_modules") + + py_count = 0 + yaml_count = 0 + failures = 0 + + for root, dirs, files in os.walk(src_root): + for file in files: + if file.endswith("foo.py") and os.path.dirname(root).endswith("command_modules") and os.path.join("build", "lib") not in root: + src = os.path.join(root, file) + dst = os.path.join(root, "_help.py") + print("Found {}\n".format(src)) + print("Renaming {}\n\tto {}\n.".format(src, dst)) + os.rename(src, dst) + py_count +=1 + + src = os.path.join(root, "__init__.py") + dst = os.path.join(root, "__init__2.py") + + success = decomment_import_help(src, dst) + + if success: + os.remove(src) + os.rename(dst, src) + print("De-commented out import in {}\n".format(src)) + else: + os.remove(dst) + print("Failed to de-comment out import in {}\n".format(src)) + failures+=1 + + print("Renamed {} foo.py files to _help.py.\n".format(py_count)) + print("There were {} failures to decomment import statements\n".format(failures)) From 61bd48f7ef0c10e59acc1f39ebeca4388192b4ba Mon Sep 17 00:00:00 2001 From: Oluwatosin Adewale Date: Sat, 26 Jan 2019 22:40:33 -0800 Subject: [PATCH 07/16] Updated loader to better handle group help and to mimic knack description loading. --- .../azure/cli/core/_help_loaders.py | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/src/azure-cli-core/azure/cli/core/_help_loaders.py b/src/azure-cli-core/azure/cli/core/_help_loaders.py index 15ac256b0d4..1454357a149 100644 --- a/src/azure-cli-core/azure/cli/core/_help_loaders.py +++ b/src/azure-cli-core/azure/cli/core/_help_loaders.py @@ -89,7 +89,7 @@ def _update_help_obj_params(help_obj, data_params, params_equal, attr_key_tups): # get the yaml help @staticmethod - def _get_yaml_help_for_nouns(nouns, cmd_loader_map_ref): + def _get_yaml_help_for_nouns(nouns, cmd_loader_map_ref, cmd_group_table): import inspect import os @@ -112,12 +112,20 @@ def _parse_yaml_from_string(text, help_file_path): # if command in map, get the loader. Path of loader is path of helpfile. loader = cmd_loader_map_ref.get(command_nouns, [None])[0] - # otherwise likely a group, get the loader + # otherwise likely a group, try to find command loader through command group object. if not loader: - for k, v in cmd_loader_map_ref.items(): - # if loader name starts with noun / group, this is a command in the command group - if k.startswith(command_nouns): - loader = v[0] + for grp_name, grp_obj in cmd_group_table.items(): + # Note, some groups such as 'az sf' do not have azcommandgroup objects ("with self.command_group()") + if grp_obj and grp_name == command_nouns: + loader = grp_obj.command_loader + break + + # if couldn't find group object in cmd_group_table, try using command loader object through command prefix. + if not loader: + for cmd_name, cmd_ldr in cmd_loader_map_ref.items(): + # if first word in loader name is the group, this is a command in the command group + if cmd_name.startswith(command_nouns + " "): + loader = cmd_ldr[0] break if loader: @@ -168,10 +176,12 @@ def load_raw_data(self, help_obj, parser): prog = parser.prog if hasattr(parser, "prog") else parser._prog_prefix command_nouns = prog.split()[1:] cmd_loader_map_ref = self.help_ctx.cli_ctx.invocation.commands_loader.cmd_to_loader_map - all_data = self._get_yaml_help_for_nouns(command_nouns, cmd_loader_map_ref) + cmd_group_tbl = self.help_ctx.cli_ctx.invocation.commands_loader.command_group_table + all_data = self._get_yaml_help_for_nouns(command_nouns, cmd_loader_map_ref, cmd_group_tbl) self._data = self._get_entry_data(help_obj.command, all_data) def load_help_body(self, help_obj): + help_obj.long_summary = "" # TEMPORARY TO MIMIC KNACK behavior self._update_obj_from_data_dict(help_obj, self._data, self.body_attrs_to_keys) def load_help_parameters(self, help_obj): From b8eb42a43ddda902e0e29ef8a27f848548765d0f Mon Sep 17 00:00:00 2001 From: Oluwatosin Adewale Date: Mon, 28 Jan 2019 10:50:33 -0800 Subject: [PATCH 08/16] Moved acs help to correct file. Deleted yaml files. --- .../azure/cli/command_modules/acr/help.yaml | 629 ---- .../azure/cli/command_modules/acs/_help.py | 15 + .../azure/cli/command_modules/acs/help.yaml | 445 --- .../cli/command_modules/advisor/help.yaml | 36 - .../azure/cli/command_modules/ams/help.yaml | 370 -- .../cli/command_modules/appservice/help.yaml | 697 ---- .../cli/command_modules/backup/help.yaml | 125 - .../azure/cli/command_modules/batch/help.yaml | 197 - .../cli/command_modules/batchai/help.yaml | 348 -- .../cli/command_modules/billing/help.yaml | 14 - .../cli/command_modules/botservice/help.yaml | 230 -- .../azure/cli/command_modules/cdn/help.yaml | 156 - .../azure/cli/command_modules/cloud/help.yaml | 27 - .../cognitiveservices/help.yaml | 103 - .../cli/command_modules/configure/help.yaml | 14 - .../cli/command_modules/consumption/help.yaml | 53 - .../cli/command_modules/container/help.yaml | 68 - .../cli/command_modules/cosmosdb/help.yaml | 44 - .../azure/cli/command_modules/dla/help.yaml | 275 -- .../azure/cli/command_modules/dls/help.yaml | 214 -- .../azure/cli/command_modules/dms/help.yaml | 197 - .../cli/command_modules/eventgrid/help.yaml | 179 - .../cli/command_modules/eventhubs/help.yaml | 273 -- .../cli/command_modules/extension/help.yaml | 42 - .../cli/command_modules/feedback/help.yaml | 5 - .../azure/cli/command_modules/find/help.yaml | 9 - .../cli/command_modules/hdinsight/help.yaml | 88 - .../azure/cli/command_modules/iot/help.yaml | 522 --- .../cli/command_modules/iotcentral/help.yaml | 46 - .../cli/command_modules/keyvault/help.yaml | 156 - .../azure/cli/command_modules/lab/help.yaml | 263 -- .../azure/cli/command_modules/maps/help.yaml | 43 - .../cli/command_modules/monitor/help.yaml | 760 ---- .../cli/command_modules/network/help.yaml | 3223 ----------------- .../command_modules/policyinsights/help.yaml | 164 - .../cli/command_modules/profile/help.yaml | 53 - .../azure/cli/command_modules/rdbms/help.yaml | 537 --- .../azure/cli/command_modules/redis/help.yaml | 29 - .../azure/cli/command_modules/relay/help.yaml | 256 -- .../command_modules/reservations/help.yaml | 107 - .../cli/command_modules/resource/help.yaml | 846 ----- .../azure/cli/command_modules/role/help.yaml | 313 -- .../cli/command_modules/search/help.yaml | 17 - .../cli/command_modules/security/help.yaml | 282 -- .../cli/command_modules/servicebus/help.yaml | 411 --- .../command_modules/servicefabric/help.yaml | 147 - .../cli/command_modules/signalr/help.yaml | 53 - .../azure/cli/command_modules/sql/help.yaml | 450 --- .../azure/cli/command_modules/sqlvm/help.yaml | 114 - .../cli/command_modules/storage/help.yaml | 634 ---- .../azure/cli/command_modules/vm/_help.py | 34 - .../azure/cli/command_modules/vm/help.yaml | 1323 ------- 52 files changed, 15 insertions(+), 15621 deletions(-) delete mode 100644 src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/help.yaml delete mode 100644 src/command_modules/azure-cli-acs/azure/cli/command_modules/acs/help.yaml delete mode 100644 src/command_modules/azure-cli-advisor/azure/cli/command_modules/advisor/help.yaml delete mode 100644 src/command_modules/azure-cli-ams/azure/cli/command_modules/ams/help.yaml delete mode 100644 src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/help.yaml delete mode 100644 src/command_modules/azure-cli-backup/azure/cli/command_modules/backup/help.yaml delete mode 100644 src/command_modules/azure-cli-batch/azure/cli/command_modules/batch/help.yaml delete mode 100644 src/command_modules/azure-cli-batchai/azure/cli/command_modules/batchai/help.yaml delete mode 100644 src/command_modules/azure-cli-billing/azure/cli/command_modules/billing/help.yaml delete mode 100644 src/command_modules/azure-cli-botservice/azure/cli/command_modules/botservice/help.yaml delete mode 100644 src/command_modules/azure-cli-cdn/azure/cli/command_modules/cdn/help.yaml delete mode 100644 src/command_modules/azure-cli-cloud/azure/cli/command_modules/cloud/help.yaml delete mode 100644 src/command_modules/azure-cli-cognitiveservices/azure/cli/command_modules/cognitiveservices/help.yaml delete mode 100644 src/command_modules/azure-cli-configure/azure/cli/command_modules/configure/help.yaml delete mode 100644 src/command_modules/azure-cli-consumption/azure/cli/command_modules/consumption/help.yaml delete mode 100644 src/command_modules/azure-cli-container/azure/cli/command_modules/container/help.yaml delete mode 100644 src/command_modules/azure-cli-cosmosdb/azure/cli/command_modules/cosmosdb/help.yaml delete mode 100644 src/command_modules/azure-cli-dla/azure/cli/command_modules/dla/help.yaml delete mode 100644 src/command_modules/azure-cli-dls/azure/cli/command_modules/dls/help.yaml delete mode 100644 src/command_modules/azure-cli-dms/azure/cli/command_modules/dms/help.yaml delete mode 100644 src/command_modules/azure-cli-eventgrid/azure/cli/command_modules/eventgrid/help.yaml delete mode 100644 src/command_modules/azure-cli-eventhubs/azure/cli/command_modules/eventhubs/help.yaml delete mode 100644 src/command_modules/azure-cli-extension/azure/cli/command_modules/extension/help.yaml delete mode 100644 src/command_modules/azure-cli-feedback/azure/cli/command_modules/feedback/help.yaml delete mode 100644 src/command_modules/azure-cli-find/azure/cli/command_modules/find/help.yaml delete mode 100644 src/command_modules/azure-cli-hdinsight/azure/cli/command_modules/hdinsight/help.yaml delete mode 100644 src/command_modules/azure-cli-iot/azure/cli/command_modules/iot/help.yaml delete mode 100644 src/command_modules/azure-cli-iotcentral/azure/cli/command_modules/iotcentral/help.yaml delete mode 100644 src/command_modules/azure-cli-keyvault/azure/cli/command_modules/keyvault/help.yaml delete mode 100644 src/command_modules/azure-cli-lab/azure/cli/command_modules/lab/help.yaml delete mode 100644 src/command_modules/azure-cli-maps/azure/cli/command_modules/maps/help.yaml delete mode 100644 src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/help.yaml delete mode 100644 src/command_modules/azure-cli-network/azure/cli/command_modules/network/help.yaml delete mode 100644 src/command_modules/azure-cli-policyinsights/azure/cli/command_modules/policyinsights/help.yaml delete mode 100644 src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/help.yaml delete mode 100644 src/command_modules/azure-cli-rdbms/azure/cli/command_modules/rdbms/help.yaml delete mode 100644 src/command_modules/azure-cli-redis/azure/cli/command_modules/redis/help.yaml delete mode 100644 src/command_modules/azure-cli-relay/azure/cli/command_modules/relay/help.yaml delete mode 100644 src/command_modules/azure-cli-reservations/azure/cli/command_modules/reservations/help.yaml delete mode 100644 src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/help.yaml delete mode 100644 src/command_modules/azure-cli-role/azure/cli/command_modules/role/help.yaml delete mode 100644 src/command_modules/azure-cli-search/azure/cli/command_modules/search/help.yaml delete mode 100644 src/command_modules/azure-cli-security/azure/cli/command_modules/security/help.yaml delete mode 100644 src/command_modules/azure-cli-servicebus/azure/cli/command_modules/servicebus/help.yaml delete mode 100644 src/command_modules/azure-cli-servicefabric/azure/cli/command_modules/servicefabric/help.yaml delete mode 100644 src/command_modules/azure-cli-signalr/azure/cli/command_modules/signalr/help.yaml delete mode 100644 src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/help.yaml delete mode 100644 src/command_modules/azure-cli-sqlvirtualmachine/azure/cli/command_modules/sqlvm/help.yaml delete mode 100644 src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/help.yaml delete mode 100644 src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/help.yaml diff --git a/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/help.yaml b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/help.yaml deleted file mode 100644 index c91a98cc722..00000000000 --- a/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/help.yaml +++ /dev/null @@ -1,629 +0,0 @@ -version: 1 -content: -- group: - name: acr - summary: Manage private registries with Azure Container Registries. -- group: - name: acr credential - summary: Manage login credentials for Azure Container Registries. -- group: - name: acr config - summary: Configure policies for Azure Container Registries. -- group: - name: acr config content-trust - summary: Manage content-trust policy for Azure Container Registries. -- group: - name: acr repository - summary: Manage repositories (image names) for Azure Container Registries. -- group: - name: acr webhook - summary: Manage webhooks for Azure Container Registries. -- group: - name: acr replication - summary: Manage geo-replicated regions of Azure Container Registries. -- group: - name: acr build-task - summary: Manage build definitions, which can be triggered by git commits or base image updates for OS & Framework Patching. -- group: - name: acr task - summary: Manage a collection of steps for building, testing and OS & Framework patching container images using Azure Container Registries. -- command: - name: acr run - summary: Queues a quick run providing streamed logs for an Azure Container Registry. - examples: - - summary: Queue a local context, pushed to ACR with streaming logs. - command: > - az acr run -r MyRegistry -f bash-echo.yaml . - - summary: Queue a remote git context with streaming logs. - command: > - az acr run -r MyRegistry https://github.com/Azure-Samples/acr-tasks.git -f hello-world.yaml -- group: - name: acr helm - summary: Manage helm charts for Azure Container Registries. -- group: - name: acr helm repo - summary: Manage helm chart repositories for Azure Container Registries. -- group: - name: acr network-rule - summary: Manage network rules for Azure Container Registries. -- command: - name: acr check-name - summary: Checks if an Azure Container Registry name is valid and available for use. - examples: - - summary: Check if a registry name already exists. - command: > - az acr check-name -n doesthisnameexist -- command: - name: acr list - summary: Lists all the container registries under the current subscription. - examples: - - summary: List container registries and show the results in a table, across multiple resource groups. - command: > - az acr list -o table - - summary: List container registries in a resource group and show the results in a table. - command: > - az acr list -g MyResourceGroup -o table -- command: - name: acr create - summary: Creates an Azure Container Registry. - examples: - - summary: Create a managed container registry with the Standard SKU. - command: > - az acr create -n MyRegistry -g MyResourceGroup --sku Standard - - summary: Create an Azure Container Registry with a new storage account with the Classic SKU (Classic registries are being deprecated by March 2019). - command: > - az acr create -n MyRegistry -g MyResourceGroup --sku Classic -- command: - name: acr delete - summary: Deletes an Azure Container Registry. - examples: - - summary: Delete an Azure Container Registry. - command: > - az acr delete -n MyRegistry -- command: - name: acr show - summary: Get the details of an Azure Container Registry. - examples: - - summary: Get the login server for an Azure Container Registry. - command: > - az acr show -n MyRegistry --query loginServer -- command: - name: acr update - summary: Update an Azure Container Registry. - examples: - - summary: Update tags for an Azure Container Registry. - command: > - az acr update -n MyRegistry --tags key1=value1 key2=value2 - - summary: Update the storage account for an Azure Container Registry (Classic Registries are being deprecated as of March 2019). - command: > - az acr update -n MyRegistry --storage-account-name MyStorageAccount - - summary: Enable the administrator user account for an Azure Container Registry. - command: > - az acr update -n MyRegistry --admin-enabled true -- command: - name: acr login - summary: Log in to an Azure Container Registry through the Docker CLI. - description: Docker must be installed on your machine. - examples: - - summary: Log in to an Azure Container Registry - command: > - az acr login -n MyRegistry -- command: - name: acr show-usage - summary: Get the storage usage for an Azure Container Registry. - examples: - - summary: Get the storage usage for an Azure Container Registry. - command: > - az acr show-usage -n MyRegistry -- command: - name: acr config content-trust show - summary: Show the configured content-trust policy for an Azure Container Registry. - examples: - - summary: Show the configured content-trust policy for an Azure Container Registry - command: > - az acr config content-trust show -n MyRegistry -- command: - name: acr config content-trust update - summary: Update content-trust policy for an Azure Container Registry. - examples: - - summary: Update content-trust policy for an Azure Container Registry - command: > - az acr config content-trust update -n MyRegistry --status Enabled -- command: - name: acr credential show - summary: Get the login credentials for an Azure Container Registry. - examples: - - summary: Get the login credentials for an Azure Container Registry. - command: > - az acr credential show -n MyRegistry - - summary: Get the username used to log in to an Azure Container Registry. - command: > - az acr credential show -n MyRegistry --query username - - summary: Get a password used to log in to an Azure Container Registry. - command: > - az acr credential show -n MyRegistry --query passwords[0].value -- command: - name: acr credential renew - summary: Regenerate login credentials for an Azure Container Registry. - examples: - - summary: Renew the second password for an Azure Container Registry. - command: > - az acr credential renew -n MyRegistry --password-name password2 -- command: - name: acr repository list - summary: List repositories in an Azure Container Registry. - examples: - - summary: List repositories in a given Azure Container Registry. - command: az acr repository list -n MyRegistry -- command: - name: acr repository show-tags - summary: Show tags for a repository in an Azure Container Registry. - examples: - - summary: Show tags of a repository in an Azure Container Registry. - command: az acr repository show-tags -n MyRegistry --repository MyRepository - - summary: Show the detailed information of tags of a repository in an Azure Container Registry. - command: az acr repository show-tags -n MyRegistry --repository MyRepository --detail - - summary: Show the detailed information of the latest 10 tags ordered by timestamp of a repository in an Azure Container Registry. - command: az acr repository show-tags -n MyRegistry --repository MyRepository --top 10 --orderby time_desc --detail -- command: - name: acr repository show-manifests - summary: Show manifests of a repository in an Azure Container Registry. - examples: - - summary: Show manifests of a repository in an Azure Container Registry. - command: az acr repository show-manifests -n MyRegistry --repository MyRepository - - summary: Show the latest 10 manifests ordered by timestamp of a repository in an Azure Container Registry. - command: az acr repository show-manifests -n MyRegistry --repository MyRepository --top 10 --orderby time_desc - - summary: Show the detailed information of the latest 10 manifests ordered by timestamp of a repository in an Azure Container Registry. - command: az acr repository show-manifests -n MyRegistry --repository MyRepository --top 10 --orderby time_desc --detail -- command: - name: acr repository show - summary: Get the attributes of a repository or image in an Azure Container Registry. - examples: - - summary: Get the attributes of the repository 'hello-world'. - command: az acr repository show -n MyRegistry --repository hello-world - - summary: Get the attributes of the image referenced by tag 'hello-world:latest'. - command: az acr repository show -n MyRegistry --image hello-world:latest - - summary: Get the attributes of the image referenced by digest 'hello-world@sha256:abc123'. - command: az acr repository show -n MyRegistry --image hello-world@sha256:abc123 -- command: - name: acr repository update - summary: Update the attributes of a repository or image in an Azure Container Registry. - examples: - - summary: Update the attributes of the repository 'hello-world' to disable write operation. - command: az acr repository update -n MyRegistry --repository hello-world --write-enabled false - - summary: Update the attributes of the image referenced by tag 'hello-world:latest' to disable write operation. - command: az acr repository update -n MyRegistry --image hello-world:latest --write-enabled false - - summary: Update the attributes of the image referenced by digest 'hello-world@sha256:abc123' to disable write operation. - command: az acr repository update -n MyRegistry --image hello-world@sha256:abc123 --write-enabled false -- command: - name: acr repository delete - summary: Delete a repository or image in an Azure Container Registry. - description: This command deletes all associated layer data that are not referenced by any other manifest in the container registry. - examples: - - summary: Delete a repository from an Azure Container Registry. This deletes all manifests and tags under 'hello-world'. - command: az acr repository delete -n MyRegistry --repository hello-world - - summary: Delete an image by tag. This deletes the manifest referenced by 'hello-world:latest' and all other tags referencing the manifest. - command: az acr repository delete -n MyRegistry --image hello-world:latest - - summary: Delete an image by sha256-based manifest digest. This deletes the manifest identified by 'hello-world@sha256:abc123' and all tags referencing the manifest. - command: az acr repository delete -n MyRegistry --image hello-world@sha256:abc123 -- command: - name: acr repository untag - summary: Untag an image in an Azure Container Registry. - description: This command does not delete the manifest referenced by the tag or any associated layer data. - examples: - - summary: Untag an image from a repository. - command: az acr repository untag -n MyRegistry --image hello-world:latest -- command: - name: acr webhook list - summary: List all of the webhooks for an Azure Container Registry. - examples: - - summary: List webhooks and show the results in a table. - command: > - az acr webhook list -r MyRegistry -o table -- command: - name: acr webhook create - summary: Create a webhook for an Azure Container Registry. - examples: - - summary: Create a webhook for an Azure Container Registry that will deliver docker push and delete events to a service URI. - command: > - az acr webhook create -n MyWebhook -r MyRegistry --uri http://myservice.com --actions push delete - - summary: Create a webhook for an Azure Container Registry that will deliver docker push events to a service URI with a basic authentication header. - command: > - az acr webhook create -n MyWebhook -r MyRegistry --uri http://myservice.com --actions push --headers "Authorization=Basic 000000" - - summary: Create a webhook for an Azure Container Registry that will deliver helm chart push and delete events to a service URI. - command: > - az acr webhook create -n MyWebhook -r MyRegistry --uri http://myservice.com --actions chart_push chart_delete -- command: - name: acr webhook delete - summary: Delete a webhook from an Azure Container Registry. - examples: - - summary: Delete a webhook from an Azure Container Registry. - command: > - az acr webhook delete -n MyWebhook -r MyRegistry -- command: - name: acr webhook show - summary: Get the details of a webhook. - examples: - - summary: Get the details of a webhook. - command: > - az acr webhook show -n MyWebhook -r MyRegistry -- command: - name: acr webhook update - summary: Update a webhook. - examples: - - summary: Update headers for a webhook. - command: > - az acr webhook update -n MyWebhook -r MyRegistry --headers "Authorization=Basic 000000" - - summary: Update the service URI and actions for a webhook. - command: > - az acr webhook update -n MyWebhook -r MyRegistry --uri http://myservice.com --actions push delete - - summary: Disable a webhook. - command: > - az acr webhook update -n MyWebhook -r MyRegistry --status disabled -- command: - name: acr webhook get-config - summary: Get the service URI and custom headers for the webhook. - examples: - - summary: Get the configuration information for a webhook. - command: > - az acr webhook get-config -n MyWebhook -r MyRegistry -- command: - name: acr webhook ping - summary: Trigger a ping event for a webhook. - examples: - - summary: Trigger a ping event for a webhook. - command: > - az acr webhook ping -n MyWebhook -r MyRegistry -- command: - name: acr webhook list-events - summary: List recent events for a webhook. - examples: - - summary: List recent events for a webhook. - command: > - az acr webhook list-events -n MyWebhook -r MyRegistry -- command: - name: acr replication list - summary: List all of the regions for a geo-replicated Azure Container Registry. - examples: - - summary: List replications and show the results in a table. - command: > - az acr replication list -r MyRegistry -o table -- command: - name: acr replication create - summary: Create a replicated region for an Azure Container Registry. - examples: - - summary: Create a replicated region for an Azure Container Registry. - command: > - az acr replication create -r MyRegistry -l westus -- command: - name: acr replication delete - summary: Delete a replicated region from an Azure Container Registry. - examples: - - summary: Delete a replicated region from an Azure Container Registry. - command: > - az acr replication delete -n MyReplication -r MyRegistry -- command: - name: acr replication show - summary: Get the details of a replicated region. - examples: - - summary: Get the details of a replicated region - command: > - az acr replication show -n MyReplication -r MyRegistry -- command: - name: acr replication update - summary: Updates a replication. - examples: - - summary: Update tags for a replication - command: > - az acr replication update -n MyReplication -r MyRegistry --tags key1=value1 key2=value2 -- command: - name: acr task create - summary: Creates a series of steps for building, testing and OS & Framework patching containers. Tasks support triggers from git commits and base image updates. - examples: - - summary: Create a Linux task from a public GitHub repository which builds the hello-world image without triggers - command: > - az acr task create -t hello-world:{{.Run.ID}} -n hello-world -r MyRegistry -c https://github.com/Azure-Samples/acr-build-helloworld-node.git -f Dockerfile --commit-trigger-enabled false --pull-request-trigger-enabled false - - summary: Create a Linux task using a private GitHub repository which builds the hello-world image without triggers - command: > - az acr task create -t hello-world:{{.Run.ID}} -n hello-world -r MyRegistry -c https://github.com/Azure-Samples/acr-build-helloworld-node.git -f Dockerfile --commit-trigger-enabled false --pull-request-trigger-enabled false --git-access-token 0000000000000000000000000000000000000000 - - summary: Create a Linux task from a public GitHub repository which builds the hello-world image with a git commit trigger - command: > - az acr task create -t hello-world:{{.Run.ID}} -n hello-world -r MyRegistry -c https://github.com/Azure-Samples/acr-build-helloworld-node.git -f Dockerfile --git-access-token 0000000000000000000000000000000000000000 - - summary: Create a Windows task from a public GitHub repository which builds the Azure Container Builder image. - command: > - az acr task create -t acb:{{.Run.ID}} -n acb-win -r MyRegistry -c https://github.com/Azure/acr-builder.git -f Windows.Dockerfile --commit-trigger-enabled false --pull-request-trigger-enabled false --os Windows -- command: - name: acr task show - summary: Get the properties of a named task for an Azure Container Registry. - examples: - - summary: Get the properties of a task, displaying the results in a table. - command: > - az acr task show -n MyTask -r MyRegistry -o table - - summary: Get the properties of a task, including secure properties. - command: > - az acr task show -n MyTask -r MyRegistry --with-secure-properties -- command: - name: acr task list - summary: List the tasks for an Azure Container Registry. - examples: - - summary: List tasks and show the results in a table. - command: > - az acr task list -r MyRegistry -o table -- command: - name: acr task delete - summary: Delete a task from an Azure Container Registry. - examples: - - summary: Delete a task from an Azure Container Registry. - command: > - az acr task delete -n MyTask -r MyRegistry -- command: - name: acr task update - summary: Update a task for an Azure Container Registry. - examples: - - summary: Update base image updates to trigger on all dependent images of a multi-stage dockerfile, and status of a task in an Azure Container Registry. - command: > - az acr task update -n MyTask -r MyRegistry --base-image-trigger-type All --status Disabled -- command: - name: acr task list-runs - summary: List all of the executed runs for an Azure Container Registry, with the ability to filter by a specific Task. - examples: - - summary: List all of the runs for a registry and show the results in a table. - command: > - az acr task list-runs -r MyRegistry -o table - - summary: List runs for a task and show the results in a table. - command: > - az acr task list-runs -r MyRegistry -n MyTask -o table - - summary: List the last 10 successful runs for a registry and show the results in a table. - command: > - az acr task list-runs -r MyRegistry --run-status Succeeded --top 10 -o table - - summary: List all of the runs that built the image 'hello-world' for a registry and show the results in a table. - command: > - az acr task list-runs -r MyRegistry --image hello-world -o table -- command: - name: acr task show-run - summary: Get the properties of a specified run of an Azure Container Registry Task. - examples: - - summary: Get the details of a run, displaying the results in a table. - command: > - az acr task show-run -r MyRegistry --run-id runId -o table -- command: - name: acr task cancel-run - summary: Cancel a specified run of an Azure Container Registry. - examples: - - summary: Cancel a run - command: > - az acr task cancel-run -r MyRegistry --run-id runId -- command: - name: acr task run - summary: Manually trigger a task that might otherwise be waiting for git commits or base image update triggers. - examples: - - summary: Trigger a task. - command: > - az acr task run -n MyTask -r MyRegistry -- command: - name: acr task update-run - summary: Patch the run properties of an Azure Container Registry Task. - examples: - - summary: Update an existing run to be archived. - command: > - az acr task update-run -r MyRegistry --run-id runId --no-archive false -- command: - name: acr task logs - summary: Show logs for a particular run. If no run-id is supplied, show logs for the last created run. - examples: - - summary: Show logs for the last created run in the registry. - command: > - az acr task logs -r MyRegistry - - summary: Show logs for the last created run in the registry, filtered by task. - command: > - az acr task logs -r MyRegistry -n MyTask - - summary: Show logs for a particular run. - command: > - az acr task logs -r MyRegistry --run-id runId - - summary: Show logs for the last created run in the registry that built the image 'hello-world'. - command: > - az acr task logs -r MyRegistry --image hello-world -- command: - name: acr build - summary: Queues a quick build, providing streaming logs for an Azure Container Registry. - examples: - - summary: Queue a local context as a Linux build, tag it, and push it to the registry. - command: > - az acr build -t sample/hello-world:{{.Run.ID}} -r MyRegistry . - - summary: Queue a local context as a Linux build, tag it, and push it to the registry without streaming logs. - command: > - az acr build -t sample/hello-world:{{.Run.ID}} -r MyRegistry --no-logs . - - summary: Queue a local context as a Linux build without pushing it to the registry. - command: > - az acr build -t sample/hello-world:{{.Run.ID}} -r MyRegistry --no-push . - - summary: Queue a local context as a Linux build without pushing it to the registry. - command: > - az acr build -r MyRegistry . - - summary: Queue a remote GitHub context as a Windows build, tag it, and push it to the registry. - command: > - az acr build -r MyRegistry https://github.com/Azure/acr-builder.git -f Windows.Dockerfile --os Windows -- command: - name: acr build-task create - summary: Creates a new build definition which can be triggered by git commits or base image updates for an Azure Container Registry. - examples: - - summary: Create a build definition without git commits and base image updates. - command: > - az acr build-task create -t hello-world:{{.Build.ID}} -n hello-world -r MyRegistry -c https://github.com/Azure-Samples/acr-build-helloworld-node.git --commit-trigger-enabled false --git-access-token 0000000000000000000000000000000000000000 - - summary: Create a build definition which updates on git commits and base image updates (--git-access-token must have permissions to create github webhooks). - command: > - az acr build-task create -t hello-world:{{.Build.ID}} -n hello-world -r MyRegistry -c https://github.com/Azure-Samples/acr-build-helloworld-node.git --git-access-token 0000000000000000000000000000000000000000 -- command: - name: acr build-task show - summary: Get the properties of a specified build task for an Azure Container Registry. - examples: - - summary: Get the details of a build task, displaying the results in a table. - command: > - az acr build-task show -n MyBuildTask -r MyRegistry -o table - - summary: Get the details of a build task including secure properties. - command: > - az acr build-task show -n MyBuildTask -r MyRegistry --with-secure-properties -- command: - name: acr build-task list - summary: List the build tasks for an Azure Container Registry. - examples: - - summary: List build tasks and show the results in a table. - command: > - az acr build-task list -r MyRegistry -o table -- command: - name: acr build-task delete - summary: Delete a build task from an Azure Container Registry. - examples: - - summary: Delete a build task from an Azure Container Registry - command: > - az acr build-task delete -n MyBuildTask -r MyRegistry -- command: - name: acr build-task update - summary: Update a build task for an Azure Container Registry. - examples: - - summary: Update the git access token for a build definition in an Azure Container Registry. - command: > - az acr build-task update -n MyBuildTask -r MyRegistry --git-access-token 0000000000000000000000000000000000000000 -- command: - name: acr build-task list-builds - summary: List all of the executed builds for an Azure Container Registry. - examples: - - summary: List builds for a build task and show the results in a table. - command: > - az acr build-task list-builds -n MyBuildTask -r MyRegistry -o table - - summary: List all of the builds for a registry displaying the results in a table. - command: > - az acr build-task list-builds -r MyRegistry -o table - - summary: List the last 10 successful builds for a registry displaying the results in a table. - command: > - az acr build-task list-builds -r MyRegistry --build-status Succeeded --top 10 -o table - - summary: List all of the builds that built the image 'hello-world' for an Azure Container Registry, displaying the results in a table. - command: > - az acr build-task list-builds -r MyRegistry --image hello-world -o table -- command: - name: acr build-task show-build - summary: Get the properties of a specified build for an Azure Container Registry. - examples: - - summary: Get the details of a build, displaying the results in a table. - command: > - az acr build-task show-build -r MyRegistry --build-id aab1 -o table -- command: - name: acr build-task run - summary: Trigger a build task that might otherwise be waiting for git commits or base image update triggers for an Azure Container Registry. - examples: - - summary: Trigger a build task. - command: > - az acr build-task run -n MyBuildTask -r MyRegistry -- command: - name: acr build-task update-build - summary: Patch the build properties of an Azure Container Registry. - examples: - - summary: Update an existing build to be archived. - command: > - az acr build-task update-build -r MyRegistry --build-id MyBuild --no-archive false -- command: - name: acr build-task logs - summary: Show logs for a particular build. If no build-id is supplied, display the logs for the last created build. - examples: - - summary: Show logs for the last created build in the registry. - command: > - az acr build-task logs -r MyRegistry - - summary: Show logs for the last created build in the registry, filtered by build task. - command: > - az acr build-task logs -r MyRegistry -n MyBuildTask - - summary: Show logs for a particular build. - command: > - az acr build-task logs -r MyRegistry --build-id aa1b - - summary: Show logs for the last created build in the registry that built the image 'hello-world'. - command: > - az acr build-task logs -r MyRegistry --image hello-world -- command: - name: acr import - summary: Imports an image to an Azure Container Registry from another Container Registry. Import removes the need to docker pull, docker tag, docker push. - examples: - - summary: Import an image to the target registry and inherits sourcerepository:sourcetag from the source registry. - command: > - az acr import -n MyRegistry --source sourceregistry.azurecr.io/sourcerepository:sourcetag - - summary: Import an image from a registry in a different subscription. - command: > - az acr import -n MyRegistry --source sourcerepository:sourcetag -t targetrepository:targettag -r /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sourceResourceGroup/providers/Microsoft.ContainerRegistry/registries/sourceRegistry - - summary: Import an image from a public repository in Docker Hub - command: > - az acr import -n MyRegistry --source docker.io/sourcerepository:sourcetag -t targetrepository:targettag -- command: - name: acr helm list - summary: List all helm charts in an Azure Container Registry. - examples: - - summary: List all helm charts in an Azure Container Registry - command: > - az acr helm list -n MyRegistry -- command: - name: acr helm show - summary: Describe a helm chart in an Azure Container Registry. - examples: - - summary: Show all versions of a helm chart in an Azure Container Registry - command: > - az acr helm show -n MyRegistry mychart - - summary: Show a helm chart version in an Azure Container Registry - command: > - az acr helm show -n MyRegistry mychart --version 0.3.2 -- command: - name: acr helm delete - summary: Delete a helm chart version in an Azure Container Registry. - examples: - - summary: Delete all versions of a helm chart in an Azure Container Registry - command: > - az acr helm delete -n MyRegistry mychart - - summary: Delete a helm chart version in an Azure Container Registry - command: > - az acr helm delete -n MyRegistry mychart --version 0.3.2 -- command: - name: acr helm push - summary: Push a helm chart package to an Azure Container Registry. - examples: - - summary: Push a chart package to an Azure Container Registry - command: > - az acr helm push -n MyRegistry mychart-0.3.2.tgz - - summary: Push a chart package to an Azure Container Registry, overwriting the existing one. - command: > - az acr helm push -n MyRegistry mychart-0.3.2.tgz --force -- command: - name: acr helm repo add - summary: Add a helm chart repository from an Azure Container Registry through the Helm CLI. - description: Helm must be installed on your machine. - examples: - - summary: Add a helm chart repository from an Azure Container Registry to manage helm charts. - command: > - az acr helm repo add -n MyRegistry -- command: - name: acr network-rule list - summary: List network rules. - examples: - - summary: List network rules for a registry. - command: > - az acr network-rule list -n MyRegistry -- command: - name: acr network-rule add - summary: Add a network rule. - examples: - - summary: Add a rule to allow access for a subnet in the same resource group as the registry. - command: > - az acr network-rule add -n MyRegistry --vnet-name myvnet --subnet mysubnet - - summary: Add a rule to allow access for a subnet in a different subscription or resource group. - command: > - az acr network-rule add -n MyRegistry --subnet /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet - - summary: Add a rule to allow access for a specific IP address-range. - command: > - az acr network-rule add -n MyRegistry --ip-address 23.45.1.0/24 -- command: - name: acr network-rule remove - summary: Remove a network rule. - examples: - - summary: Remove a rule that allows access for a subnet in the same resource group as the registry. - command: > - az acr network-rule remove -n MyRegistry --vnet-name myvnet --subnet mysubnet - - summary: Remove a rule that allows access for a subnet in a different subscription or resource group. - command: > - az acr network-rule remove -n MyRegistry --subnet /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet - - summary: Remove a rule that allows access for a specific IP address-range. - command: > - az acr network-rule remove -n MyRegistry --ip-address 23.45.1.0/24 diff --git a/src/command_modules/azure-cli-acs/azure/cli/command_modules/acs/_help.py b/src/command_modules/azure-cli-acs/azure/cli/command_modules/acs/_help.py index 818134f6d5d..2d1983777e7 100644 --- a/src/command_modules/azure-cli-acs/azure/cli/command_modules/acs/_help.py +++ b/src/command_modules/azure-cli-acs/azure/cli/command_modules/acs/_help.py @@ -72,6 +72,21 @@ text: az acs create -g MyResourceGroup -n MyContainerService --agent-profiles MyAgentProfiles.json """.format(sp_cache=ACS_SERVICE_PRINCIPAL_CACHE) +helps['acs delete'] = """ + type: command + short-summary: Delete a container service. +""" + +helps['acs list'] = """ + type: command + short-summary: List container services. +""" + +helps['acs scale'] = """ + type: command + short-summary: Change the private agent count of a container service. +""" + helps['acs dcos'] = """ type: group short-summary: Commands to manage a DC/OS-orchestrated Azure Container Service. diff --git a/src/command_modules/azure-cli-acs/azure/cli/command_modules/acs/help.yaml b/src/command_modules/azure-cli-acs/azure/cli/command_modules/acs/help.yaml deleted file mode 100644 index bd1705f2d9d..00000000000 --- a/src/command_modules/azure-cli-acs/azure/cli/command_modules/acs/help.yaml +++ /dev/null @@ -1,445 +0,0 @@ -version: 1 -content: -- group: - name: acs - summary: Manage Azure Container Services. - description: | - ACS will be retired as a standalone service on January 31, 2020. - - If you use the Kubernetes orchestrator, please migrate to AKS by January 31, 2020. -- command: - name: acs browse - summary: Show the dashboard for a service container's orchestrator in a web browser. -- command: - name: acs create - summary: Create a new container service. - arguments: - - name: --service-principal - summary: Service principal used for authentication to Azure APIs. - description: If not specified, a new service principal with the contributor role is created and cached at $HOME/.azure/acsServicePrincipal.json to be used by subsequent `az acs` commands. - - name: --client-secret - summary: Secret associated with the service principal. This argument is required if `--service-principal` is specified. - - name: --agent-count - summary: Set the default number of agents for the agent pools. - description: Note that DC/OS clusters will have 1 or 2 additional public agents. - examples: - - summary: Create a DCOS cluster with an existing SSH key. - command: |- - az acs create --orchestrator-type DCOS -g MyResourceGroup -n MyContainerService \ - --ssh-key-value /path/to/publickey - - summary: Create a DCOS cluster with two agent pools. - command: |- - az acs create -g MyResourceGroup -n MyContainerService --agent-profiles '[ \ - { \ - "name": "agentpool1" \ - }, \ - { \ - "name": "agentpool2" \ - }]' - - summary: Create a DCOS cluster where the second agent pool has a vmSize specified. - command: |- - az acs create -g MyResourceGroup -n MyContainerService --agent-profiles '[ \ - { \ - "name": "agentpool1" \ - }, \ - { \ - "name": "agentpool2", \ - "vmSize": "Standard_D2" \ - }]' - - summary: Create a DCOS cluster with agent-profiles specified from a file. - command: az acs create -g MyResourceGroup -n MyContainerService --agent-profiles MyAgentProfiles.json -- group: - name: acs dcos - summary: Commands to manage a DC/OS-orchestrated Azure Container Service. -- command: - name: acs dcos install-cli - summary: Download and install the DC/OS command-line tool for a cluster. -- command: - name: acs kubernetes install-cli - summary: Download and install the Kubernetes command-line tool for a cluster. -- group: - name: acs kubernetes - summary: Commands to manage a Kubernetes-orchestrated Azure Container Service. -- command: - name: acs kubernetes get-credentials - summary: Download and install credentials to access a cluster. This command requires the same private-key used to create the cluster. -- command: - name: acs list-locations - summary: List locations where Azure Container Service is in preview and in production. -- command: - name: acs scale - summary: Change the private agent count of a container service. - arguments: - - name: --new-agent-count - summary: The number of agents for the container service. -- command: - name: acs show - summary: Show the details for a container service. -- command: - name: acs wait - summary: Wait for a container service to reach a desired state. - description: If an operation on a container service was interrupted or was started with `--no-wait`, use this command to wait for it to complete. -- group: - name: aks - summary: Manage Azure Kubernetes Services. -- command: - name: aks browse - summary: Show the dashboard for a Kubernetes cluster in a web browser. - arguments: - - name: --disable-browser - summary: Don't launch a web browser after establishing port-forwarding. - description: Add this argument when launching a web browser manually, or for automated testing. - - name: --listen-port - summary: The listening port for the dashboard. -- command: - name: aks create - summary: Create a new managed Kubernetes cluster. - arguments: - - name: --generate-ssh-keys - summary: Generate SSH public and private key files if missing. - - name: --service-principal - summary: Service principal used for authentication to Azure APIs. - description: If not specified, a new service principal is created and cached at $HOME/.azure/aksServicePrincipal.json to be used by subsequent `az aks` commands. - - name: --skip-subnet-role-assignment - summary: Skip role assignment for subnet (advanced networking). - description: If specified, please make sure your service principal has the access to your subnet. - - name: --client-secret - summary: Secret associated with the service principal. This argument is required if `--service-principal` is specified. - - name: --node-vm-size - summary: Size of Virtual Machines to create as Kubernetes nodes. - - name: --dns-name-prefix - summary: Prefix for hostnames that are created. If not specified, generate a hostname using the managed cluster and resource group names. - - name: --node-count - summary: Number of nodes in the Kubernetes node pool. After creating a cluster, you can change the size of its node pool with `az aks scale`. - - name: --node-osdisk-size - summary: Size in GB of the OS disk for each node in the node pool. Minimum 30 GB. - - name: --kubernetes-version - summary: Version of Kubernetes to use for creating the cluster, such as "1.7.12" or "1.8.7". - value-sources: - - link: - command: '`az aks get-versions`' - - name: --ssh-key-value - summary: Public key path or key contents to install on node VMs for SSH access. For example, 'ssh-rsa AAAAB...snip...UcyupgH azureuser@linuxvm'. - - name: --admin-username - summary: User account to create on node VMs for SSH access. - - name: --aad-client-app-id - summary: The ID of an Azure Active Directory client application of type "Native". This application is for user login via kubectl. - - name: --aad-server-app-id - summary: The ID of an Azure Active Directory server application of type "Web app/API". This application represents the managed cluster's apiserver (Server application). - - name: --aad-server-app-secret - summary: The secret of an Azure Active Directory server application. - - name: --aad-tenant-id - summary: The ID of an Azure Active Directory tenant. - - name: --dns-service-ip - summary: An IP address assigned to the Kubernetes DNS service. - description: This address must be within the Kubernetes service address range specified by "--service-cidr". For example, 10.0.0.10. - - name: --docker-bridge-address - summary: A specific IP address and netmask for the Docker bridge, using standard CIDR notation. - description: This address must not be in any Subnet IP ranges, or the Kubernetes service address range. For example, 172.17.0.1/16. - - name: --enable-addons - summary: Enable the Kubernetes addons in a comma-separated list. - description: |- - These addons are available: - http_application_routing - configure ingress with automatic public DNS name creation. - monitoring - turn on Log Analytics monitoring. Uses the Log Analytics Default Workspace if it exists, else creates one. Specify "--workspace-resource-id" to use an existing workspace. - virtual-node - enable AKS Virtual Node (PREVIEW). Requires --subnet_name to provide the name of an existing subnet for the Virtual Node to use. - - name: --disable-rbac - summary: Disable Kubernetes Role-Based Access Control. - - name: --enable-rbac - summary: 'Enable Kubernetes Role-Based Access Control. Default: enabled.' - - name: --max-pods - summary: The maximum number of pods deployable to a node. - description: If not specified, defaults to 110, or 30 for advanced networking configurations. - - name: --network-plugin - summary: The Kubernetes network plugin to use. - description: Specify "azure" for advanced networking configurations. Defaults to "kubenet". - - name: --network-policy - summary: (PREVIEW) The Kubernetes network policy to use. - description: | - Using together with "azure" network plugin. - Specify "azure" for Azure network policy manager and "calico" for calico network policy controller. - Defaults to "" (network policy disabled). - - name: --no-ssh-key - summary: Do not use or create a local SSH key. - description: To access nodes after creating a cluster with this option, use the Azure Portal. - - name: --pod-cidr - summary: A CIDR notation IP range from which to assign pod IPs when kubenet is used. - description: This range must not overlap with any Subnet IP ranges. For example, 172.244.0.0/16. - - name: --service-cidr - summary: A CIDR notation IP range from which to assign service cluster IPs. - description: This range must not overlap with any Subnet IP ranges. For example, 10.0.0.0/16. - - name: --vnet-subnet-id - summary: The ID of a subnet in an existing VNet into which to deploy the cluster. - - name: --workspace-resource-id - summary: The resource ID of an existing Log Analytics Workspace to use for storing monitoring data. If not specified, uses the default Log Analytics Workspace if it exists, otherwise creates one. - examples: - - summary: Create a Kubernetes cluster with an existing SSH public key. - command: az aks create -g MyResourceGroup -n MyManagedCluster --ssh-key-value /path/to/publickey - - summary: Create a Kubernetes cluster with a specific version. - command: az aks create -g MyResourceGroup -n MyManagedCluster --kubernetes-version 1.8.7 - - summary: Create a Kubernetes cluster with a larger node pool. - command: az aks create -g MyResourceGroup -n MyManagedCluster --node-count 7 -- command: - name: aks delete - summary: Delete a managed Kubernetes cluster. -- command: - name: aks update-credentials - summary: Update credentials for a managed Kubernetes cluster, like service principal. - arguments: - - name: --reset-service-principal - summary: Reset service principal for a managed cluster. - - name: --service-principal - summary: Service principal used for authentication to Azure APIs. - - name: --client-secret - summary: Secret associated with the service principal. This argument is required if `--service-principal` is specified. -- command: - name: aks disable-addons - summary: Disable Kubernetes addons. - arguments: - - name: --addons - summary: Disable the Kubernetes addons in a comma-separated list. -- command: - name: aks enable-addons - summary: Enable Kubernetes addons. - description: |- - These addons are available: - http_application_routing - configure ingress with automatic public DNS name creation. - monitoring - turn on Log Analytics monitoring. Requires "--workspace-resource-id". - virtual-node - enable AKS Virtual Node (PREVIEW). Requires --subnet_name to provide the name of an existing subnet for the Virtual Node to use. - arguments: - - name: --addons - summary: Enable the Kubernetes addons in a comma-separated list. - - name: --workspace-resource-id - summary: The resource ID of an existing Log Analytics Workspace to use for storing monitoring data. -- command: - name: aks get-credentials - summary: Get access credentials for a managed Kubernetes cluster. - arguments: - - name: --admin - summary: 'Get cluster administrator credentials. Default: cluster user credentials.' - - name: --file - summary: Kubernetes configuration file to update. Use "-" to print YAML to stdout instead. - - name: --overwrite-existing - summary: Overwrite any existing cluster entry with the same name. -- command: - name: aks get-upgrades - summary: Get the upgrade versions available for a managed Kubernetes cluster. -- command: - name: aks get-versions - summary: Get the versions available for creating a managed Kubernetes cluster. -- command: - name: aks install-cli - summary: Download and install kubectl, the Kubernetes command-line tool. -- command: - name: aks install-connector - summary: (PREVIEW) Install the ACI Connector on a managed Kubernetes cluster. - arguments: - - name: --chart-url - summary: URL of a Helm chart that installs ACI Connector. - - name: --connector-name - summary: Name of the ACI Connector. - - name: --os-type - summary: Install support for deploying ACIs of this operating system type. - - name: --service-principal - summary: Service principal used for authentication to Azure APIs. - description: If not specified, use the AKS service principal defined in the file /etc/kubernetes/azure.json on the node which runs the virtual kubelet pod. - - name: --client-secret - summary: Secret associated with the service principal. This argument is required if `--service-principal` is specified. - - name: --image-tag - summary: The image tag of the virtual kubelet. Use 'latest' if it is not specified - - name: --aci-resource-group - summary: The resource group to create the ACI container groups. Use the MC_* resource group if it is not specified. - - name: --location - summary: The location to create the ACI container groups. Use the location of the MC_* resource group if it is not specified. - examples: - - summary: Install the ACI Connector for Linux to a managed Kubernetes cluster. - command: |- - az aks install-connector --name MyManagedCluster --resource-group MyResourceGroup - - summary: Install the ACI Connector for Windows to a managed Kubernetes cluster. - command: |- - az aks install-connector --name MyManagedCluster --resource-group MyResourceGroup \ - --connector-name aci-connector --os-type Windows - - summary: Install the ACI Connector for both Windows and Linux to a managed Kubernetes cluster. - command: |- - az aks install-connector --name MyManagedCluster --resource-group MyResourceGroup \ - --connector-name aci-connector --os-type Both - - summary: Install the ACI Connector using a specific service principal in a specific resource group. - command: |- - az aks install-connector --name MyManagedCluster --resource-group MyResourceGroup \ - --connector-name aci-connector --service-principal --client-secret \ - --aci-resource-group ACI-resource-group - - summary: Install the ACI Connector from a custom Helm chart with custom tag. - command: |- - az aks install-connector --name MyManagedCluster --resource-group MyResourceGroup \ - --connector-name aci-connector --chart-url --image-tag -- command: - name: aks list - summary: List managed Kubernetes clusters. -- command: - name: aks remove-connector - summary: (PREVIEW) Remove the ACI Connector from a managed Kubernetes cluster. - arguments: - - name: --connector-name - summary: Name of the ACI Connector. - - name: --graceful - summary: Use a "cordon and drain" strategy to evict pods safely before removing the ACI node. - - name: --os-type - summary: Remove support for deploying ACIs of this operating system type. - examples: - - summary: Remove the ACI Connector from a cluster using the graceful mode. - command: |- - az aks remove-connector --name MyManagedCluster --resource-group MyResourceGroup \ - --connector-name MyConnector --graceful -- command: - name: aks scale - summary: Scale the node pool in a managed Kubernetes cluster. - arguments: - - name: --node-count - summary: Number of nodes in the Kubernetes node pool. -- command: - name: aks show - summary: Show the details for a managed Kubernetes cluster. -- command: - name: aks upgrade - summary: Upgrade a managed Kubernetes cluster to a newer version. - description: Kubernetes will be unavailable during cluster upgrades. - arguments: - - name: --kubernetes-version - summary: Version of Kubernetes to upgrade the cluster to, such as "1.7.12" or "1.8.7". - value-sources: - - link: - command: '`az aks get-upgrades`' -- command: - name: aks upgrade-connector - summary: (PREVIEW) Upgrade the ACI Connector on a managed Kubernetes cluster. - arguments: - - name: --chart-url - summary: URL of a Helm chart that installs ACI Connector. - - name: --connector-name - summary: Name of the ACI Connector. - - name: --os-type - summary: Install support for deploying ACIs of this operating system type. - - name: --service-principal - summary: Service principal used for authentication to Azure APIs. - description: If not specified, use the AKS service principal defined in the file /etc/kubernetes/azure.json on the node which runs the virtual kubelet pod. - - name: --client-secret - summary: Secret associated with the service principal. This argument is required if `--service-principal` is specified. - - name: --image-tag - summary: The image tag of the virtual kubelet. Use 'latest' if it is not specified - - name: --aci-resource-group - summary: The resource group to create the ACI container groups. Use the MC_* resource group if it is not specified. - - name: --location - summary: The location to create the ACI container groups. Use the location of the MC_* resource group if it is not specified. - examples: - - summary: Upgrade the ACI Connector for Linux to a managed Kubernetes cluster. - command: |- - az aks upgrade-connector --name MyManagedCluster --resource-group MyResourceGroup \ - --connector-name aci-connector - - summary: Upgrade the ACI Connector for Windows to a managed Kubernetes cluster. - command: |- - az aks upgrade-connector --name MyManagedCluster --resource-group MyResourceGroup \ - --connector-name aci-connector --os-type Windows - - summary: Upgrade the ACI Connector for both Windows and Linux to a managed Kubernetes cluster. - command: |- - az aks upgrade-connector --name MyManagedCluster --resource-group MyResourceGroup \ - --connector-name aci-connector --os-type Both - - summary: Upgrade the ACI Connector to use a specific service principal in a specific resource group. - command: |- - az aks upgrade-connector --name MyManagedCluster --resource-group MyResourceGroup \ - --connector-name aci-connector --service-principal --client-secret \ - --aci-resource-group ACI-resource-group - - summary: Upgrade the ACI Connector from a custom Helm chart with custom tag. - command: |- - az aks upgrade-connector --name MyManagedCluster --resource-group MyResourceGroup \ - --connector-name aci-connector --chart-url --image-tag -- command: - name: aks use-dev-spaces - summary: (PREVIEW) Use Azure Dev Spaces with a managed Kubernetes cluster. - arguments: - - name: --update - summary: Update to the latest Azure Dev Spaces client components. - - name: --space - summary: Name of the new or existing dev space to select. Defaults to an interactive selection experience. - examples: - - summary: Use Azure Dev Spaces with a managed Kubernetes cluster, interactively selecting a dev space. - command: |- - az aks use-dev-spaces -g my-aks-group -n my-aks - - summary: Use Azure Dev Spaces with a managed Kubernetes cluster, updating to the latest Azure Dev Spaces client components and selecting a new or existing dev space 'my-space'. - command: |- - az aks use-dev-spaces -g my-aks-group -n my-aks --update --space my-space - - summary: Use Azure Dev Spaces with a managed Kubernetes cluster, selecting a new or existing dev space 'develop/my-space' without prompting for confirmation. - command: |- - az aks use-dev-spaces -g my-aks-group -n my-aks -s develop/my-space -y -- command: - name: aks remove-dev-spaces - summary: (PREVIEW) Remove Azure Dev Spaces from a managed Kubernetes cluster. - examples: - - summary: Remove Azure Dev Spaces from a managed Kubernetes cluster. - command: |- - az aks remove-dev-spaces -g my-aks-group -n my-aks - - summary: Remove Azure Dev Spaces from a managed Kubernetes cluster without prompting. - command: |- - az aks remove-dev-spaces -g my-aks-group -n my-aks --yes -- command: - name: aks wait - summary: Wait for a managed Kubernetes cluster to reach a desired state. - description: If an operation on a cluster was interrupted or was started with `--no-wait`, use this command to wait for it to complete. - examples: - - summary: Wait for a cluster to be upgraded, polling every minute for up to thirty minutes. - command: |- - az aks wait -g MyResourceGroup -n MyManagedCluster --updated --interval 60 --timeout 1800 -- group: - name: openshift - summary: (PREVIEW) Manage Azure OpenShift Services. -- command: - name: openshift create - summary: (PREVIEW) Create a new managed OpenShift cluster. - arguments: - - name: --compute-vm-size - summary: Size of Virtual Machines to create as OpenShift nodes. - - name: --compute-count - summary: Number of nodes in the OpenShift node pool. - - name: --fqdn - summary: FQDN for OpenShift API server loadbalancer internal hostname. For example myopenshiftcluster.eastus.cloudapp.azure.com - - name: --aad-client-app-id - summary: The ID of an Azure Active Directory client application. If not specified, a new Azure Active Directory client is created. - - name: --aad-client-app-secret - summary: The secret of an Azure Active Directory client application. - - name: --aad-tenant-id - summary: The ID of an Azure Active Directory tenant. - - name: --vnet-peer - summary: The ID or the name of a subnet in an existing VNet into which to peer the cluster. - - name: --vnet-prefix - summary: The CIDR used on the VNet into which to deploy the cluster. - - name: --subnet-prefix - summary: The CIDR used on the Subnet into which to deploy the cluster. - examples: - - summary: Create an OpenShift cluster and auto create an AAD Client - command: az openshift create -g MyResourceGroup -n MyManagedCluster --fqdn {FQDN} - - summary: Create an OpenShift cluster with 5 compute nodes and a custom AAD Client. - command: az openshift create -g MyResourceGroup -n MyManagedCluster --fqdn {FQDN} --aad-client-app-id {APP_ID} --aad-client-app-secret {APP_SECRET} --aad-tenant-id {TENANT_ID} --compute-count 5 - - summary: Create an Openshift cluster using a custom vnet - command: az openshift create -g MyResourceGroup -n MyManagedCluster --fqdn {FQDN} --vnet-peer "/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/openshift-vnet/providers/Microsoft.Network/virtualNetworks/test" -- command: - name: openshift scale - summary: (PREVIEW) Scale the compute pool in a managed OpenShift cluster. - arguments: - - name: --compute-count - summary: Number of nodes in the OpenShift compute pool. -- command: - name: openshift show - summary: (PREVIEW) Show the details for a managed OpenShift cluster. -- command: - name: openshift delete - summary: (PREVIEW) Delete a managed OpenShift cluster. -- command: - name: openshift list - summary: (PREVIEW) List managed OpenShift clusters. -- command: - name: openshift wait - summary: (PREVIEW) Wait for a managed OpenShift cluster to reach a desired state. - description: If an operation on a cluster was interrupted or was started with `--no-wait`, use this command to wait for it to complete. - examples: - - summary: Wait for a cluster to be upgraded, polling every minute for up to thirty minutes. - command: |- - az openshift wait -g MyResourceGroup -n MyManagedCluster --updated --interval 60 --timeout 1800 diff --git a/src/command_modules/azure-cli-advisor/azure/cli/command_modules/advisor/help.yaml b/src/command_modules/azure-cli-advisor/azure/cli/command_modules/advisor/help.yaml deleted file mode 100644 index 60efadf8ca5..00000000000 --- a/src/command_modules/azure-cli-advisor/azure/cli/command_modules/advisor/help.yaml +++ /dev/null @@ -1,36 +0,0 @@ -version: 1 -content: -- group: - name: advisor - summary: Manage Azure Advisor. -- group: - name: advisor configuration - summary: Manage Azure Advisor configuration. -- group: - name: advisor recommendation - summary: Review Azure Advisor recommendations. -- command: - name: advisor configuration list - summary: List Azure Advisor configuration for the entire subscription. -- command: - name: advisor configuration show - summary: Show Azure Advisor configuration for the given subscription or resource group. -- command: - name: advisor configuration update - summary: Update Azure Advisor configuration. - examples: - - summary: Update low CPU threshold for a given subscription to 20%. - command: > - az advisor configuration update -l 20 - - summary: Exclude a given resource group from recommendation generation. - command: > - az advisor configuration update -g myRG -e -- command: - name: advisor recommendation list - summary: List Azure Advisor recommendations. -- command: - name: advisor recommendation disable - summary: Disable Azure Advisor recommendations. -- command: - name: advisor recommendation enable - summary: Enable Azure Advisor recommendations. diff --git a/src/command_modules/azure-cli-ams/azure/cli/command_modules/ams/help.yaml b/src/command_modules/azure-cli-ams/azure/cli/command_modules/ams/help.yaml deleted file mode 100644 index 0ffff022964..00000000000 --- a/src/command_modules/azure-cli-ams/azure/cli/command_modules/ams/help.yaml +++ /dev/null @@ -1,370 +0,0 @@ -version: 1 -content: -- group: - name: ams - summary: Manage Azure Media Services resources. -- group: - name: ams account - summary: Manage Azure Media Services accounts. -- command: - name: ams account create - summary: Create an Azure Media Services account. -- command: - name: ams account update - summary: Update the details of an Azure Media Services account. -- command: - name: ams account list - summary: List Azure Media Services accounts for the entire subscription. -- command: - name: ams account show - summary: Show the details of an Azure Media Services account. -- command: - name: ams account delete - summary: Delete an Azure Media Services account. -- command: - name: ams account check-name - summary: Checks whether the Media Service resource name is available. -- group: - name: ams account storage - summary: Manage storage for an Azure Media Services account. -- command: - name: ams account storage add - summary: Attach a secondary storage to an Azure Media Services account. -- command: - name: ams account storage remove - summary: Detach a secondary storage from an Azure Media Services account. -- group: - name: ams account sp - summary: Manage service principal and role based access for an Azure Media Services account. -- command: - name: ams account sp create - summary: Create a service principal and configure its access to an Azure Media Services account. - description: Service principal propagation throughout Azure Active Directory may take some extra seconds to complete. - examples: - - summary: Create a service principal with password and configure its access to an Azure Media Services account. Output will be in xml format. - command: > - az ams account sp create -a myAmsAccount -g myRG -n mySpName --password mySecret --role Owner --xml -- command: - name: ams account sp reset-credentials - summary: Generate a new client secret for a service principal configured for an Azure Media Services account. -- command: - name: ams account storage sync-storage-keys - summary: Synchronize storage account keys for a storage account associated with an Azure Media Services account. -- group: - name: ams transform - summary: Manage transforms for an Azure Media Services account. -- command: - name: ams transform list - summary: List all the transforms of an Azure Media Services account. -- command: - name: ams transform show - summary: Show the details of a transform. -- command: - name: ams transform create - summary: Create a transform. - examples: - - summary: Create a transform with AdaptiveStreaming built-in preset and High relative priority. - command: > - az ams transform create -a myAmsAccount -n transformName -g myResourceGroup --preset AdaptiveStreaming --relative-priority High - - summary: Create a transform with a custom Standard Encoder preset from a JSON file and Low relative priority. - command: > - az ams transform create -a myAmsAccount -n transformName -g myResourceGroup --preset "C:\MyPresets\CustomPreset.json" --relative-priority Low -- command: - name: ams transform delete - summary: Delete a transform. -- command: - name: ams transform update - summary: Update the details of a transform. - examples: - - summary: Update the first transform output of a transform by setting its relative priority to High. - command: > - az ams transform update -a myAmsAccount -n transformName -g myResourceGroup --set outputs[0].relativePriority=High -- group: - name: ams transform output - summary: Manage transform outputs for an Azure Media Services account. -- command: - name: ams transform output add - summary: Add an output to an existing transform. - examples: - - summary: Add an output with a custom Standard Encoder preset from a JSON file. - command: > - az ams transform output add -a myAmsAccount -n transformName -g myResourceGroup --preset "C:\MyPresets\CustomPreset.json" - - summary: Add an output with a VideoAnalyzer preset with es-ES as audio language and only with audio insights. - command: > - az ams transform output add -a myAmsAccount -n transformName -g myResourceGroup --preset VideoAnalyzer --audio-language es-ES --insights-to-extract AudioInsightsOnly -- command: - name: ams transform output remove - summary: Remove an output from an existing transform. - examples: - - summary: Remove the output element at the index specified with --output-index argument. - command: > - az ams transform output remove -a myAmsAccount -n transformName -g myResourceGroup --output-index 1 -- group: - name: ams asset - summary: Manage assets for an Azure Media Services account. -- group: - name: ams asset-filter - summary: Manage asset filters for an Azure Media Services account. -- group: - name: ams account-filter - summary: Manage account filters for an Azure Media Services account. -- command: - name: ams asset show - summary: Show the details of an asset. -- command: - name: ams asset list - summary: List all the assets of an Azure Media Services account. - examples: - - summary: List all the assets whose names start with the string 'Something'. - command: > - az ams asset list -a amsAccount -g resourceGroup --query [?starts_with(name,'Something')] -- command: - name: ams asset list-streaming-locators - summary: List streaming locators which are associated with this asset. -- command: - name: ams asset create - summary: Create an asset. -- command: - name: ams asset update - summary: Update the details of an asset. -- command: - name: ams asset delete - summary: Delete an asset. -- command: - name: ams asset get-sas-urls - summary: Lists storage container URLs with shared access signatures (SAS) for uploading and downloading Asset content. The signatures are derived from the storage account keys. -- command: - name: ams asset get-encryption-key - summary: Get the asset storage encryption keys used to decrypt content created by version 2 of the Media Services API. -- command: - name: ams asset-filter create - summary: Create an asset filter. - examples: - - summary: Create an asset filter with filter track selections. - command: > - az ams asset-filter create -a amsAccount -g resourceGroup -n filterName --force-end-timestamp=False --end-timestamp 200000 --start-timestamp 100000 --live-backoff-duration 60 --presentation-window-duration 600000 --timescale 1000 --bitrate 720 --asset-name assetName --tracks @C:\tracks.json -- command: - name: ams asset-filter update - summary: Update the details of an asset filter. -- command: - name: ams asset-filter delete - summary: Delete an asset filter. -- command: - name: ams asset-filter list - summary: List all the asset filters of an Azure Media Services account. -- command: - name: ams asset-filter show - summary: Show the details of an asset filter. -- group: - name: ams content-key-policy - summary: Manage content key policies for an Azure Media Services account. -- command: - name: ams content-key-policy create - summary: Create a new content key policy. -- command: - name: ams content-key-policy show - summary: Show an existing content key policy. -- command: - name: ams content-key-policy delete - summary: Delete a content key policy. -- command: - name: ams content-key-policy update - summary: Update an existing content key policy. - examples: - - summary: Update an existing content-key-policy, set a new description and edit its first option setting a new issuer and audience. - command: > - az ams content-key-policy update -n contentKeyPolicyName -a amsAccount --description newDescription --set options[0].restriction.issuer=newIssuer --set options[0].restriction.audience=newAudience -- command: - name: ams content-key-policy list - summary: List all the content key policies within an Azure Media Services account. -- group: - name: ams content-key-policy option - summary: Manage options for an existing content key policy. -- command: - name: ams content-key-policy option add - summary: Add a new option to an existing content key policy. -- command: - name: ams content-key-policy option remove - summary: Remove an option from an existing content key policy. -- command: - name: ams content-key-policy option update - summary: Update an option from an existing content key policy. - examples: - - summary: Update an existing content-key-policy by adding an alternate token key to an existing option. - command: > - az ams content-key-policy option update -n contentKeyPolicyName -g resourceGroup -a amsAccount --policy-option-id xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --add-alt-token-key tokenKey --add-alt-token-key-type Symmetric -- group: - name: ams job - summary: Manage jobs for a transform. -- command: - name: ams job start - summary: Start a job. -- command: - name: ams job update - summary: Update an existing job. -- command: - name: ams job list - summary: List all the jobs of a transform within an Azure Media Services account. - examples: - - summary: List all the jobs of a transform with 'Normal' priority by name. - command: > - az ams job list -a amsAccount -g resourceGroup -t transformName --query [?priority=='Normal'].{jobName:name} - - summary: List all the jobs of a transform by name and input. - command: > - az ams job list -a amsAccount -g resourceGroup -t transformName --query [].{jobName:name,jobInput:input} -- command: - name: ams job show - summary: Show the details of a job. -- command: - name: ams job delete - summary: Delete a job. -- command: - name: ams job cancel - summary: Cancel a job. -- group: - name: ams streaming-locator - summary: Manage streaming locators for an Azure Media Services account. -- command: - name: ams streaming-locator create - summary: Create a streaming locator. -- command: - name: ams streaming-locator list - summary: List all the streaming locators within an Azure Media Services account. -- command: - name: ams streaming-locator show - summary: Show the details of a streaming locator. -- command: - name: ams streaming-locator get-paths - summary: List paths supported by a streaming locator. -- command: - name: ams streaming-locator list-content-keys - summary: List content keys used by a streaming locator. -- group: - name: ams streaming-policy - summary: Manage streaming policies for an Azure Media Services account. -- command: - name: ams streaming-policy create - summary: Create a streaming policy. -- command: - name: ams streaming-policy list - summary: List all the streaming policies within an Azure Media Services account. -- command: - name: ams streaming-policy show - summary: Show the details of a streaming policy. -- group: - name: ams streaming-endpoint - summary: Manage streaming endpoints for an Azure Media Service account. -- command: - name: ams streaming-endpoint start - summary: Start a streaming endpoint. -- command: - name: ams streaming-endpoint stop - summary: Stop a streaming endpoint. -- command: - name: ams streaming-endpoint list - summary: List all the streaming endpoints within an Azure Media Services account. -- command: - name: ams streaming-endpoint create - summary: Create a streaming endpoint. -- group: - name: ams streaming-endpoint akamai - summary: Manage AkamaiAccessControl objects to be used on streaming endpoints. -- command: - name: ams streaming-endpoint akamai add - summary: Add an AkamaiAccessControl to an existing streaming endpoint. -- command: - name: ams streaming-endpoint show - summary: Show the details of a streaming endpoint. -- command: - name: ams streaming-endpoint delete - summary: Delete a streaming endpoint. -- command: - name: ams streaming-endpoint akamai remove - summary: Remove an AkamaiAccessControl from an existing streaming endpoint. -- command: - name: ams streaming-endpoint scale - summary: Set the scale of a streaming endpoint. -- command: - name: ams streaming-endpoint update - summary: Update the details of a streaming endpoint. -- group: - name: ams live-event - summary: Manage live events for an Azure Media Service account. -- command: - name: ams live-event create - summary: Create a live event. -- command: - name: ams live-event start - summary: Start a live event. -- command: - name: ams live-event show - summary: Show the details of a live event. -- command: - name: ams live-event list - summary: List all the live events of an Azure Media Services account. - examples: - - summary: List all the live events by name and resourceState quickly. - command: > - az ams live-event list -a amsAccount -g resourceGroup --query [].{liveEventName:name,state:resourceState} -- command: - name: ams live-event delete - summary: Delete a live event. -- command: - name: ams live-event stop - summary: Stop a live event. -- command: - name: ams live-event reset - summary: Reset a live event. -- command: - name: ams live-event update - summary: Update the details of a live event. - examples: - - summary: Set a new allowed IP address and remove an existing IP address at index '0'. - command: > - az ams live-event update -a amsAccount -g resourceGroup -n liveEventName --remove input.accessControl.ip.allow 0 --add input.accessControl.ip.allow 1.2.3.4/22 - - summary: Clear existing IP addresses and set new ones. - command: > - az ams live-event update -a amsAccount -g resourceGroup -n liveEventName --ips 1.2.3.4/22 5.6.7.8/30 -- group: - name: ams live-output - summary: Manage live outputs for an Azure Media Service account. -- command: - name: ams live-output create - summary: Create a live output. -- command: - name: ams live-output show - summary: Show the details of a live output. -- command: - name: ams live-output list - summary: List all the live outputs in a live event. -- command: - name: ams live-output delete - summary: Delete a live output. -- command: - name: ams account-filter show - summary: Show the details of an account filter. -- command: - name: ams account-filter list - summary: List all the account filters of an Azure Media Services account. -- command: - name: ams account-filter create - summary: Create an account filter. - examples: - - summary: Create an asset filter with filter track selections. - command: > - az ams account-filter create -a amsAccount -g resourceGroup -n filterName --force-end-timestamp=False --end-timestamp 200000 --start-timestamp 100000 --live-backoff-duration 60 --presentation-window-duration 600000 --timescale 1000 --bitrate 720 --tracks @C:\tracks.json -- command: - name: ams account-filter update - summary: Update the details of an account filter. -- command: - name: ams account-filter delete - summary: Delete an account filter. -- group: - name: ams account mru - summary: Manage media reserved units for an Azure Media Services account. -- command: - name: ams account mru set - summary: Set the type and number of media reserved units for an Azure Media Services account. -- command: - name: ams account mru show - summary: Show the details of media reserved units for an Azure Media Services account. diff --git a/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/help.yaml b/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/help.yaml deleted file mode 100644 index fa0f9ff47fd..00000000000 --- a/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/help.yaml +++ /dev/null @@ -1,697 +0,0 @@ -version: 1 -content: -- group: - name: appservice - summary: Manage App Service plans. -- group: - name: webapp - summary: Manage web apps. -- group: - name: webapp auth - summary: Manage webapp authentication and authorization -- command: - name: webapp auth show - summary: Show the authentification settings for the webapp. -- command: - name: webapp auth update - summary: Update the authentication settings for the webapp. - examples: - - summary: Enable AAD by enabling authentication and setting AAD-associated parameters. Default provider is set to AAD. Must have created a AAD service principal beforehand. - command: > - az webapp auth update -g myResourceGroup -n myUniqueApp --enabled true \ - --action LoginWithAzureActiveDirectory \ - --aad-allowed-token-audiences https://webapp_name.azurewebsites.net/.auth/login/aad/callback \ - --aad-client-id ecbacb08-df8b-450d-82b3-3fced03f2b27 --aad-client-secret very_secret_password \ - --aad-token-issuer-url https://sts.windows.net/54826b22-38d6-4fb2-bad9-b7983a3e9c5a/ - - summary: Allow Facebook authentication by setting FB-associated parameters and turning on public-profile and email scopes; allow anonymous users - command: > - az webapp auth update -g myResourceGroup -n myUniqueApp --action AllowAnonymous \ - --facebook-app-id my_fb_id --facebook-app-secret my_fb_secret \ - --facebook-oauth-scopes public_profile email -- command: - name: webapp identity assign - summary: assign or disable managed service identity to the webapp - examples: - - summary: assign local identity and assign a reader role to the current resource group. - command: > - az webapp identity assign -g MyResourceGroup -n MyUniqueApp --role reader --scope /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/MyResourceGroup - - summary: enable identity for the webapp. - command: > - az webapp identity assign -g MyResourceGroup -n MyUniqueApp -- group: - name: webapp identity - summary: manage webapp's managed service identity -- command: - name: webapp identity show - summary: display webapp's managed service identity -- command: - name: webapp identity remove - summary: Disable webapp's managed service identity -- group: - name: functionapp identity - summary: manage functionapp's managed service identity -- command: - name: functionapp identity assign - summary: assign or disable managed service identity to the functionapp - examples: - - summary: assign local identity and assign a reader role to the current resource group. - command: > - az functionapp identity assign -g MyResourceGroup -n MyUniqueApp --role reader --scope /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/MyResourceGroup - - summary: enable identity for the functionapp. - command: > - az functionapp identity assign -g MyResourceGroup -n MyUniqueApp -- command: - name: functionapp identity show - summary: display functionapp's managed service identity -- command: - name: functionapp identity remove - summary: Disable functionapp's managed service identity -- group: - name: webapp config - summary: Configure a web app. -- command: - name: webapp config show - summary: Get the details of a web app's configuration. -- command: - name: webapp config set - summary: Set a web app's configuration. -- group: - name: webapp config appsettings - summary: Configure web app settings. -- command: - name: webapp config appsettings delete - summary: Delete web app settings. -- command: - name: webapp config appsettings list - summary: Get the details of a web app's settings. -- command: - name: webapp config appsettings set - summary: Set a web app's settings. - examples: - - summary: Set the default NodeJS version to 6.9.1 for a web app. - command: > - az webapp config appsettings set -g MyResourceGroup -n MyUniqueApp --settings WEBSITE_NODE_DEFAULT_VERSION=6.9.1 -- group: - name: webapp config storage-account - summary: Manage a web app's Azure storage account configurations. (Linux Web Apps and Windows Containers Web Apps Only) -- command: - name: webapp config storage-account list - summary: Get a web app's Azure storage account configurations. (Linux Web Apps and Windows Containers Web Apps Only) -- command: - name: webapp config storage-account add - summary: Add an Azure storage account configuration to a web app. (Linux Web Apps and Windows Containers Web Apps Only) - examples: - - summary: Add a connection to the Azure Files file share called MyShare in the storage account named MyStorageAccount. - command: > - az webapp config storage-account add -g MyResourceGroup -n MyUniqueApp \ - --custom-id CustomId \ - --storage-type AzureFiles \ - --account-name MyStorageAccount \ - --share-name MyShare \ - --access-key MyAccessKey \ - --mount-path /path/to/mount -- command: - name: webapp config storage-account update - summary: Update an existing Azure storage account configuration on a web app. (Linux Web Apps and Windows Containers Web Apps Only) - examples: - - summary: Update the mount path for a connection to the Azure Files file share with the ID MyId. - command: > - az webapp config storage-account update -g MyResourceGroup -n MyUniqueApp \ - --custom-id CustomId \ - --mount-path /path/to/new/mount -- command: - name: webapp config storage-account delete - summary: Delete a web app's Azure storage account configuration. (Linux Web Apps and Windows Containers Web Apps Only) -- group: - name: webapp config connection-string - summary: Manage a web app's connection strings. -- command: - name: webapp config connection-string list - summary: Get a web app's connection strings. -- command: - name: webapp config connection-string delete - summary: Delete a web app's connection strings. -- command: - name: webapp config connection-string set - summary: Update a web app's connection strings. - examples: - - summary: Add a mysql connection string. - command: > - az webapp config connection-string set -g MyResourceGroup -n MyUniqueApp -t mysql \ - --settings mysql1='Server=myServer;Database=myDB;Uid=myUser;Pwd=myPwd;' -- group: - name: webapp config container - summary: Manage web app container settings. -- command: - name: webapp config container show - summary: Get details of a web app container's settings. -- command: - name: webapp config container set - summary: Set a web app container's settings. -- command: - name: webapp config container delete - summary: Delete a web app container's settings. -- group: - name: webapp config ssl - summary: Configure SSL certificates for web apps. -- command: - name: webapp config ssl list - summary: List SSL certificates for a web app. -- command: - name: webapp config ssl bind - summary: Bind an SSL certificate to a web app. -- command: - name: webapp config ssl unbind - summary: Unbind an SSL certificate from a web app. -- command: - name: webapp config ssl delete - summary: Delete an SSL certificate from a web app. -- command: - name: webapp config ssl upload - summary: Upload an SSL certificate to a web app. -- group: - name: webapp config snapshot - summary: Manage web app snapshots. -- command: - name: webapp config snapshot list - summary: List the restorable snapshots for a web app. -- command: - name: webapp config snapshot restore - summary: Restore a web app snapshot. - examples: - - summary: Restore web app files from a snapshot. Overwrites the web app's current files and settings. - command: > - az webapp config snapshot restore -g MyResourceGroup -n MySite --time 2018-12-11T23:34:16.8388367 - - summary: Restore a snapshot of web app SourceApp to web app TargetApp. Use --restore-content-only to not restore app settings. Overwrites TargetApp's files. - command: > - az webapp config snapshot restore -g TargetResourceGroup -n TargetApp --source-name SourceApp --source-resource-group OriginalResourceGroup --time 2018-12-11T23:34:16.8388367 --restore-content-only -- group: - name: webapp deployment - summary: Manage web app deployments. -- group: - name: webapp deployment slot - summary: Manage web app deployment slots. -- command: - name: webapp deployment slot auto-swap - summary: Configure deployment slot auto swap. -- group: - name: webapp log - summary: Manage web app logs. -- command: - name: webapp log config - summary: Configure logging for a web app. -- command: - name: webapp log show - summary: Get the details of a web app's logging configuration. -- command: - name: webapp log download - summary: Download a web app's log history as a zip file. - description: This command may not work with web apps running on Linux. -- command: - name: webapp log tail - summary: Start live log tracing for a web app. - description: This command may not work with web apps running on Linux. -- command: - name: webapp deployment list-publishing-profiles - summary: Get the details for available web app deployment profiles. -- group: - name: webapp deployment container - summary: Manage container-based continuous deployment. -- command: - name: webapp deployment container config - summary: Configure continuous deployment via containers. -- command: - name: webapp deployment container show-cd-url - summary: Get the URL which can be used to configure webhooks for continuous deployment. -- command: - name: webapp deployment slot create - summary: Create a deployment slot. -- command: - name: webapp deployment slot swap - summary: Change deployment slots for a web app. - examples: - - summary: Swap a staging slot into production for the MyUniqueApp web app. - command: > - az webapp deployment slot swap -g MyResourceGroup -n MyUniqueApp --slot staging \ - --target-slot production -- command: - name: webapp deployment slot list - summary: List all deployment slots. -- command: - name: webapp deployment slot delete - summary: Delete a deployment slot. -- group: - name: webapp deployment user - summary: Manage user credentials for deployment. -- command: - name: webapp deployment user set - summary: Update deployment credentials. - description: All function and web apps in the subscription will be impacted since they share the same deployment credentials. - examples: - - summary: Set FTP and git deployment credentials for all apps. - command: > - az webapp deployment user set --user-name MyUserName -- group: - name: webapp deployment source - summary: Manage web app deployment via source control. -- command: - name: webapp deployment source config - summary: Manage deployment from git or Mercurial repositories. -- command: - name: webapp deployment source config-local-git - summary: Get a URL for a git repository endpoint to clone and push to for web app deployment. - examples: - - summary: Get an endpoint and add it as a git remote. - command: > - az webapp deployment source config-local-git \ - -g MyResourceGroup -n MyUniqueApp - - git remote add azure \ - https://@MyUniqueApp.scm.azurewebsites.net/MyUniqueApp.git -- command: - name: webapp deployment source config-zip - summary: Perform deployment using the kudu zip push deployment for a webapp. - description: > - By default Kudu assumes that zip deployments do not require any build-related actions like - npm install or dotnet publish. This can be overridden by including a .deployment file in your - zip file with the following content '[config] SCM_DO_BUILD_DURING_DEPLOYMENT = true', - to enable Kudu detection logic and build script generation process. - See https://github.com/projectkudu/kudu/wiki/Configurable-settings#enabledisable-build-actions-preview. - Alternately the setting can be enabled using the az webapp config appsettings set command. - examples: - - summary: Perform deployment by using zip file content. - command: > - az webapp deployment source config-zip \ - -g {myRG} -n {myAppName} \ - --src {zipFilePathLocation} -- command: - name: webapp deployment source delete - summary: Delete a source control deployment configuration. -- command: - name: webapp deployment source show - summary: Get the details of a source control deployment configuration. -- command: - name: webapp deployment source sync - summary: Synchronize from the repository. Only needed under manual integration mode. -- group: - name: webapp traffic-routing - summary: Manage traffic routing for web apps. -- command: - name: webapp traffic-routing set - summary: Configure routing traffic to deployment slots. -- command: - name: webapp traffic-routing show - summary: Display the current distribution of traffic across slots. -- command: - name: webapp traffic-routing clear - summary: Clear the routing rules and send all traffic to production. -- group: - name: webapp cors - summary: Manage Cross-Origin Resource Sharing (CORS) -- command: - name: webapp cors add - summary: Add allowed origins - examples: - - summary: add a new allowed origin - command: > - az webapp cors add -g -n --allowed-origins https://myapps.com -- command: - name: webapp cors remove - summary: Remove allowed origins - examples: - - summary: remove an allowed origin - command: > - az webapp cors remove -g -n --allowed-origins https://myapps.com - - summary: remove all allowed origins - command: > - az webapp cors remove -g -n --allowed-origins * -- command: - name: webapp cors show - summary: show allowed origins -- group: - name: appservice plan - summary: Manage app service plans. -- command: - name: appservice list-locations - summary: List regions where a plan sku is available. -- command: - name: appservice plan update - summary: Update an app service plan. -- command: - name: appservice plan create - summary: Create an app service plan. - examples: - - summary: Create a basic app service plan. - command: > - az appservice plan create -g MyResourceGroup -n MyPlan - - summary: Create a standard app service plan with with four Linux workers. - command: > - az appservice plan create -g MyResourceGroup -n MyPlan \ - --is-linux --number-of-workers 4 --sku S1 -- command: - name: appservice plan delete - summary: Delete an app service plan. -- command: - name: appservice plan list - summary: List app service plans. - examples: - - summary: List all free tier App Service plans. - command: > - az appservice plan list --query "[?sku.tier=='Free']" -- command: - name: appservice plan show - summary: Get the app service plans for a resource group or a set of resource groups. -- group: - name: webapp config hostname - summary: Configure hostnames for a web app. -- command: - name: webapp config hostname add - summary: Bind a hostname to a web app. -- command: - name: webapp config hostname delete - summary: Unbind a hostname from a web app. -- command: - name: webapp config hostname list - summary: List all hostname bindings for a web app. -- command: - name: webapp config hostname get-external-ip - summary: Get the external-facing IP address for a web app. -- group: - name: webapp config backup - summary: Manage backups for web apps. -- command: - name: webapp config backup list - summary: List backups of a web app. -- command: - name: webapp config backup create - summary: Create a backup of a web app. -- command: - name: webapp config backup show - summary: Show the backup schedule for a web app. -- command: - name: webapp config backup update - summary: Configure a new backup schedule for a web app. -- command: - name: webapp config backup restore - summary: Restore a web app from a backup. -- group: - name: webapp webjob - summary: Allows management operations for webjobs on a webapp. -- group: - name: webapp webjob continuous - summary: Allows management operations of continuous webjobs on a webapp. -- command: - name: webapp webjob continuous list - summary: List all continuous webjobs on a selected webapp. -- command: - name: webapp webjob continuous start - summary: Start a specific continuous webjob on a selected webapp. -- command: - name: webapp webjob continuous stop - summary: Stop a specific continuous webjob. -- command: - name: webapp webjob continuous remove - summary: Delete a specific continuous webjob. -- group: - name: webapp webjob triggered - summary: Allows management operations of triggered webjobs on a webapp. -- command: - name: webapp webjob triggered list - summary: List all triggered webjobs hosted on a webapp. -- command: - name: webapp webjob triggered run - summary: Run a specific triggered webjob hosted on a webapp. -- command: - name: webapp webjob triggered remove - summary: Delete a specific triggered webjob hosted on a webapp. -- command: - name: webapp webjob triggered log - summary: Get history of a specific triggered webjob hosted on a webapp. -- command: - name: webapp browse - summary: Open a web app in a browser. -- command: - name: webapp create - summary: Create a web app. - description: The web app's name must be able to produce a unique FQDN as AppName.azurewebsites.net. - examples: - - summary: Create a web app with the default configuration. - command: > - az webapp create -g MyResourceGroup -p MyPlan -n MyUniqueAppName - - summary: Create a web app with a NodeJS 6.2 runtime and deployed from a local git repository. - command: > - az webapp create -g MyResourceGroup -p MyPlan -n MyUniqueAppName --runtime "node|6.2" --deployment-local-git -- command: - name: webapp ssh - summary: (Preview) SSH command establishes a ssh session to the web container and developer would get a shell terminal remotely. - examples: - - summary: ssh into a webapp - command: > - az webapp ssh -n MyUniqueAppName -g MyResourceGroup -- command: - name: webapp up - summary: (Preview) Create and deploy existing local code to the webapp, by running the command from the folder where the code is present. Supports running the command in preview mode using --dryrun parameter. Current supports includes Node, Python,.NET Core, ASP.NET, staticHtml. Node, Python apps are created as Linux apps. .Net Core, ASP.NET and static HTML apps are created as Windows apps. If command is run from an empty folder, an empty windows webapp is created. - examples: - - summary: View the details of the app that will be created, without actually running the operation - command: > - az webapp up -n MyUniqueAppName --dryrun - - summary: Create a web app with the default configuration, by running the command from the folder where the code to deployed exists. - command: > - az webapp up -n MyUniqueAppName - - summary: Create a web app in a sepcific region, by running the command from the folder where the code to deployed exists. - command: > - az webapp up -n MyUniqueAppName -l locationName - - summary: Deploy new code to an app that was originally created using the same command - command: > - az webapp up -n MyUniqueAppName -l locationName -- command: - name: webapp update - summary: Update a web app. - examples: - - summary: Update the tags of a web app. - command: > - az webapp update -g MyResourceGroup -n MyAppName --set tags.tagName=tagValue -- command: - name: webapp list-runtimes - summary: List available built-in stacks which can be used for web apps. -- group: - name: webapp deleted - summary: Manage deleted web apps. -- command: - name: webapp deleted list - summary: List web apps that have been deleted. -- command: - name: webapp deleted restore - summary: Restore a deleted web app. - description: Restores the files and settings of a deleted web app to the specified web app. - examples: - - summary: Restore a deleted app to the Staging slot of MySite. - command: > - az webapp deleted restore -g MyResourceGroup -n MySite -s Staging --deleted-id /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/deletedSites/1234 - - summary: Restore a deleted app to the app MySite. Do not restore the deleted app's settings. - command: > - az webapp deleted restore -g MyResourceGroup -n MySite --deleted-id /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/deletedSites/1234 --restore-content-only -- command: - name: webapp delete - summary: Delete a web app. -- command: - name: webapp list - summary: List web apps. - examples: - - summary: List default host name and state for all web apps. - command: > - az webapp list --query "[].{hostName: defaultHostName, state: state}" - - summary: List all running web apps. - command: > - az webapp list --query "[?state=='Running']" -- command: - name: webapp restart - summary: Restart a web app. -- command: - name: webapp start - summary: Start a web app. -- command: - name: webapp show - summary: Get the details of a web app. -- command: - name: webapp stop - summary: Stop a web app. -- group: - name: functionapp - summary: Manage function apps. -- command: - name: functionapp create - summary: Create a function app. - description: The function app's name must be able to produce a unique FQDN as AppName.azurewebsites.net. - examples: - - summary: Create a basic function app. - command: > - az functionapp create -g MyResourceGroup -p MyPlan -n MyUniqueAppName -s MyStorageAccount -- command: - name: functionapp update - summary: Update a function app. -- command: - name: functionapp delete - summary: Delete a function app. -- command: - name: functionapp list - summary: List function apps. - examples: - - summary: List default host name and state for all function apps. - command: > - az functionapp list --query "[].{hostName: defaultHostName, state: state}" - - summary: List all running function apps. - command: > - az functionapp list --query "[?state=='Running']" -- command: - name: functionapp restart - summary: Restart a function app. -- command: - name: functionapp start - summary: Start a function app. -- command: - name: functionapp show - summary: Get the details of a function app. -- command: - name: functionapp stop - summary: Stop a function app. -- command: - name: functionapp list-consumption-locations - summary: List available locations for running function apps. -- group: - name: functionapp config - summary: Configure a function app. -- group: - name: functionapp config appsettings - summary: Configure function app settings. -- command: - name: functionapp config appsettings list - summary: Show settings for a function app. -- command: - name: functionapp config appsettings set - summary: Update a function app's settings. -- command: - name: functionapp config appsettings delete - summary: Delete a function app's settings. -- group: - name: functionapp config hostname - summary: Configure hostnames for a function app. -- command: - name: functionapp config hostname add - summary: Bind a hostname to a function app. -- command: - name: functionapp config hostname delete - summary: Unbind a hostname from a function app. -- command: - name: functionapp config hostname list - summary: List all hostname bindings for a function app. -- command: - name: functionapp config hostname get-external-ip - summary: Get the external-facing IP address for a function app. -- group: - name: functionapp config ssl - summary: Configure SSL certificates. -- command: - name: functionapp config ssl list - summary: List SSL certificates for a function app. -- command: - name: functionapp config ssl bind - summary: Bind an SSL certificate to a function app. -- command: - name: functionapp config ssl unbind - summary: Unbind an SSL certificate from a function app. -- command: - name: functionapp config ssl delete - summary: Delete an SSL certificate from a function app. -- command: - name: functionapp config ssl upload - summary: Upload an SSL certificate to a function app. -- command: - name: functionapp config show - summary: Get the details of a web app's configuration. -- command: - name: functionapp config set - summary: Set the web app's configuration. -- group: - name: functionapp deployment - summary: Manage function app deployments. -- command: - name: functionapp deployment list-publishing-profiles - summary: Get the details for available function app deployment profiles. -- group: - name: functionapp deployment source - summary: Manage function app deployment via source control. -- command: - name: functionapp deployment source config - summary: Manage deployment from git or Mercurial repositories. -- command: - name: functionapp deployment source config-local-git - summary: Get a URL for a git repository endpoint to clone and push to for function app deployment. - examples: - - summary: Get an endpoint and add it as a git remote. - command: > - az functionapp deployment source config-local-git \ - -g MyResourceGroup -n MyUniqueApp - - git remote add azure \ - https://@MyUniqueApp.scm.azurewebsites.net/MyUniqueApp.git -- command: - name: functionapp deployment source delete - summary: Delete a source control deployment configuration. -- command: - name: functionapp deployment source show - summary: Get the details of a source control deployment configuration. -- command: - name: functionapp deployment source sync - summary: Synchronize from the repository. Only needed under manual integration mode. -- group: - name: functionapp deployment user - summary: Manage user credentials for deployment. -- command: - name: functionapp deployment user set - summary: Update deployment credentials. - description: All function and web apps in the subscription will be impacted since they share the same deployment credentials. - examples: - - summary: Set FTP and git deployment credentials for all apps. - command: > - az functionapp deployment user set - --user-name MyUserName -- command: - name: functionapp deployment source config-zip - summary: Perform deployment using the kudu zip push deployment for a function app. - description: > - By default Kudu assumes that zip deployments do not require any build-related actions like - npm install or dotnet publish. This can be overridden by including an .deployment file in your - zip file with the following content '[config] SCM_DO_BUILD_DURING_DEPLOYMENT = true', - to enable Kudu detection logic and build script generation process. - See https://github.com/projectkudu/kudu/wiki/Configurable-settings#enabledisable-build-actions-preview. - Alternately the setting can be enabled using the az functionapp config appsettings set command. - examples: - - summary: Perform deployment by using zip file content. - command: > - az functionapp deployment source config-zip \ - -g {myRG>} -n {myAppName} \ - --src {zipFilePathLocation} -- group: - name: functionapp cors - summary: Manage Cross-Origin Resource Sharing (CORS) -- command: - name: functionapp cors add - summary: Add allowed origins - examples: - - summary: add a new allowed origin - command: > - az functionapp cors add -g -n --allowed-origins https://myapps.com -- command: - name: functionapp cors remove - summary: Remove allowed origins - examples: - - summary: remove an allowed origin - command: > - az functionapp cors remove -g -n --allowed-origins https://myapps.com - - summary: remove all allowed origins - command: > - az functionapp cors remove -g -n --allowed-origins * -- command: - name: functionapp cors show - summary: show allowed origins diff --git a/src/command_modules/azure-cli-backup/azure/cli/command_modules/backup/help.yaml b/src/command_modules/azure-cli-backup/azure/cli/command_modules/backup/help.yaml deleted file mode 100644 index 9e56f40d7f6..00000000000 --- a/src/command_modules/azure-cli-backup/azure/cli/command_modules/backup/help.yaml +++ /dev/null @@ -1,125 +0,0 @@ -version: 1 -content: -- group: - name: backup - summary: Manage Azure Backups. -- group: - name: backup vault - summary: Online storage entity in Azure used to hold data such as backup copies, recovery points and backup policies. -- command: - name: backup vault create - summary: Create a new Recovery Services vault. -- command: - name: backup vault delete - summary: Delete an existing Recovery services vault. -- command: - name: backup vault list - summary: List Recovery service vaults within a subscription. -- command: - name: backup vault show - summary: Show details of a particular Recovery service vault. -- group: - name: backup vault backup-properties - summary: Properties of the Recovery Services vault. -- command: - name: backup vault backup-properties show - summary: Gets backup related properties of the Recovery Services vault. -- command: - name: backup vault backup-properties set - summary: Sets backup related properties of the Recovery Services vault. -- group: - name: backup container - summary: Resource which houses items or applications to be protected. -- command: - name: backup container list - summary: List containers registered to a Recovery services vault. -- command: - name: backup container show - summary: Show details of a container registered to a Recovery services vault. -- group: - name: backup item - summary: An item which is already protected or backed up to an Azure Recovery services vault with an associated policy. -- command: - name: backup item list - summary: List all backed up items within a container. -- command: - name: backup item show - summary: Show details of a particular backed up item. -- command: - name: backup item set-policy - summary: Update the policy associated with this item. -- group: - name: backup policy - summary: A backup policy defines when you want to take a backup and for how long you would retain each backup copy. -- command: - name: backup policy get-default-for-vm - summary: Get the default policy with default values to backup a VM. -- command: - name: backup policy list - summary: List all policies for a Recovery services vault. -- command: - name: backup policy show - summary: Show details of a particular policy. -- command: - name: backup policy delete - summary: Before you can delete a Backup protection policy, the policy must not have any associated Backup items. To associate another policy with a Backup item, use the backup item set-policy command. -- command: - name: backup policy set - summary: Update the properties of the backup policy. -- command: - name: backup policy list-associated-items - summary: List all items protected by a backup policy. -- group: - name: backup recoverypoint - summary: A snapshot of data at that point-of-time, stored in Recovery Services Vault, from which you can restore information. -- command: - name: backup recoverypoint list - summary: List all recovery points of a backed up item. -- command: - name: backup recoverypoint show - summary: Shows details of a particular recovery point. -- group: - name: backup protection - summary: Manage protection of your items, enable protection or disable it, or take on-demand backups. -- command: - name: backup protection check-vm - summary: Find out whether the virtual machine is protected or not. If protected, it returns the recovery services vault ID, otherwise it returns empty. -- command: - name: backup protection enable-for-vm - summary: Start protecting a previously unprotected Azure VM as per the specified policy to a Recovery services vault. -- command: - name: backup protection backup-now - summary: Perform an on-demand backup of a backed up item. -- command: - name: backup protection disable - summary: Stop protecting a backed up Azure VM. -- group: - name: backup restore - summary: Restore backed up items from recovery points in a Recovery Services vault. -- command: - name: backup restore restore-disks - summary: Restore disks of the backed VM from the specified recovery point. -- group: - name: backup restore files - summary: Gives access to all files of a recovery point. -- command: - name: backup restore files mount-rp - summary: Download a script which mounts files of a recovery point. -- command: - name: backup restore files unmount-rp - summary: Close access to the recovery point. -- group: - name: backup job - summary: Entity which contains details of the job. -- command: - name: backup job list - summary: List all backup jobs of a Recovery Services vault. -- command: - name: backup job show - summary: Show details of a particular job. -- command: - name: backup job stop - summary: Suspend or terminate a currently running job. -- command: - name: backup job wait - summary: Wait until either the job completes or the specified timeout value is reached. diff --git a/src/command_modules/azure-cli-batch/azure/cli/command_modules/batch/help.yaml b/src/command_modules/azure-cli-batch/azure/cli/command_modules/batch/help.yaml deleted file mode 100644 index f7bf99deaf7..00000000000 --- a/src/command_modules/azure-cli-batch/azure/cli/command_modules/batch/help.yaml +++ /dev/null @@ -1,197 +0,0 @@ -version: 1 -content: -- group: - name: batch - summary: Manage Azure Batch. -- group: - name: batch account - summary: Manage Azure Batch accounts. -- command: - name: batch account list - summary: List the Batch accounts associated with a subscription or resource group. -- command: - name: batch account create - summary: Create a Batch account with the specified parameters. -- command: - name: batch account set - summary: Update properties for a Batch account. -- group: - name: batch account autostorage-keys - summary: Manage the access keys for the auto storage account configured for a Batch account. -- group: - name: batch account keys - summary: Manage Batch account keys. -- command: - name: batch account login - summary: Log in to a Batch account through Azure Active Directory or Shared Key authentication. -- command: - name: batch account show - summary: Get a specified Batch account or the currently set account. -- group: - name: batch application - summary: Manage Batch applications. -- command: - name: batch application set - summary: Update properties for a Batch application. -- group: - name: batch application package - summary: Manage Batch application packages. -- command: - name: batch application package create - summary: Create a Batch application package record and activate it. -- command: - name: batch application package activate - summary: Activates a Batch application package. - description: This step is unnecessary if the package has already been successfully activated by the `create` command. -- group: - name: batch application summary - summary: View a summary of Batch application packages. -- command: - name: batch application summary list - summary: Lists all of the applications available in the specified account. - description: This operation returns only applications and versions that are available for use on compute nodes; that is, that can be used in an application package reference. For administrator information about applications and versions that are not yet available to compute nodes, use the Azure portal or the 'az batch application list' command. -- command: - name: batch application summary show - summary: Gets information about the specified application. - description: This operation returns only applications and versions that are available for use on compute nodes; that is, that can be used in an application package reference. For administrator information about applications and versions that are not yet available to compute nodes, use the Azure portal or the 'az batch application list' command. -- group: - name: batch location - summary: Manage Batch service options for a subscription at the region level. -- group: - name: batch location quotas - summary: Manage Batch service quotas at the region level. -- group: - name: batch certificate - summary: Manage Batch certificates. -- group: - name: batch task file - summary: Manage Batch task files. -- command: - name: batch task file download - summary: Download the content of a Batch task file. -- group: - name: batch node file - summary: Manage Batch compute node files. -- command: - name: batch node file download - summary: Download the content of the a node file. -- group: - name: batch job - summary: Manage Batch jobs. -- group: - name: batch job task-counts - summary: View the number of tasks in a Batch job and their states. -- group: - name: batch job all-statistics - summary: View statistics of all jobs under a Batch account. -- command: - name: batch job all-statistics show - summary: Get lifetime summary statistics for all of the jobs in a Batch account. - description: Statistics are aggregated across all jobs that have ever existed in the account, from account creation to the last update time of the statistics. -- group: - name: batch job prep-release-status - summary: View the status of Batch job preparation and release tasks. -- group: - name: batch job-schedule - summary: Manage Batch job schedules. -- group: - name: batch node service-logs - summary: Manage the service log files of a Batch compute node. -- group: - name: batch node user - summary: Manage the user accounts of a Batch compute node. -- command: - name: batch node user create - summary: Add a user account to a Batch compute node. -- command: - name: batch node user reset - summary: Update the properties of a user account on a Batch compute node. Unspecified properties which can be updated are reset to their defaults. -- group: - name: batch node - summary: Manage Batch compute nodes. -- group: - name: batch node remote-login-settings - summary: Retrieve the remote login settings for a Batch compute node. -- group: - name: batch node remote-desktop - summary: Retrieve the remote desktop protocol file for a Batch compute node. -- group: - name: batch node scheduling - summary: Manage task scheduling for a Batch compute node. -- group: - name: batch pool - summary: Manage Batch pools. -- group: - name: batch pool os - summary: Manage the operating system of Batch pools. -- group: - name: batch pool autoscale - summary: Manage automatic scaling of Batch pools. -- group: - name: batch pool all-statistics - summary: View statistics of all pools under a Batch account. -- command: - name: batch pool all-statistics show - summary: Get lifetime summary statistics for all of the pools in a Batch account. - description: Statistics are aggregated across all pools that have ever existed in the account, from account creation to the last update time of the statistics. -- group: - name: batch pool usage-metrics - summary: View usage metrics of Batch pools. -- group: - name: batch pool node-counts - summary: Get node counts for Batch pools. -- group: - name: batch pool node-agent-skus - summary: Retrieve node agent SKUs of Batch pools using a Virtual Machine Configuration. -- group: - name: batch task - summary: Manage Batch tasks. -- group: - name: batch task subtask - summary: Manage subtask information of a Batch task. -- command: - name: batch certificate create - summary: Add a certificate to a Batch account. -- command: - name: batch certificate delete - summary: Delete a certificate from a Batch account. -- command: - name: batch pool create - summary: Create a Batch pool in an account. When creating a pool, choose arguments from either Cloud Services Configuration or Virtual Machine Configuration. -- command: - name: batch pool set - summary: Update the properties of a Batch pool. Updating a property in a subgroup will reset the unspecified properties of that group. -- command: - name: batch pool reset - summary: Update the properties of a Batch pool. Unspecified properties which can be updated are reset to their defaults. -- command: - name: batch pool resize - summary: Resize or stop resizing a Batch pool. -- command: - name: batch job create - summary: Add a job to a Batch account. -- command: - name: batch job list - summary: List all of the jobs or job schedule in a Batch account. -- command: - name: batch job set - summary: Update the properties of a Batch job. Updating a property in a subgroup will reset the unspecified properties of that group. -- command: - name: batch job reset - summary: Update the properties of a Batch job. Unspecified properties which can be updated are reset to their defaults. -- command: - name: batch job-schedule create - summary: Add a Batch job schedule to an account. -- command: - name: batch job-schedule set - summary: Update the properties of a job schedule. - description: You can independently update the schedule and the job specification, but any change to either of these entities will reset all properties in that entity. -- command: - name: batch job-schedule reset - summary: Reset the properties of a job schedule. An updated job specification only applies to new jobs. -- command: - name: batch task create - summary: Create Batch tasks. -- command: - name: batch task reset - summary: Reset the properties of a Batch task. diff --git a/src/command_modules/azure-cli-batchai/azure/cli/command_modules/batchai/help.yaml b/src/command_modules/azure-cli-batchai/azure/cli/command_modules/batchai/help.yaml deleted file mode 100644 index 590863afc7b..00000000000 --- a/src/command_modules/azure-cli-batchai/azure/cli/command_modules/batchai/help.yaml +++ /dev/null @@ -1,348 +0,0 @@ -version: 1 -content: -- group: - name: batchai - summary: Manage Batch AI resources. -- group: - name: batchai workspace - summary: Commands to manage workspaces. -- command: - name: batchai workspace create - summary: Create a workspace. - examples: - - summary: Create a workspace in East US region. - command: az batchai workspace create -g MyResourceGroup -n MyWorkspace -l eastus -- command: - name: batchai workspace delete - summary: Delete a workspace. - examples: - - summary: Delete a workspace. - command: az batchai workspace delete -g MyResourceGroup -n MyWorkspace -- command: - name: batchai workspace list - summary: List workspaces. - examples: - - summary: List all workspaces under the current subscription. - command: az batchai workspace list -o table - - summary: List workspaces in the given resource group. - command: az batchai workspace list -g MyResourceGroup -o table -- command: - name: batchai workspace show - summary: Show information about a workspace. - examples: - - summary: Show information about a workspace. - command: az batchai workspace show -g MyResourceGroup -n MyWorkspace -o table -- group: - name: batchai cluster - summary: Commands to manage clusters. -- command: - name: batchai cluster create - summary: Create a cluster. - examples: - - summary: Create a single node GPU cluster with default image and auto-storage account. - command: | - az batchai cluster create -g MyResourceGroup -w MyWorkspace -n MyCluster \ - -s Standard_NC6 -t 1 --use-auto-storage --generate-ssh-keys - - summary: Create a cluster with a setup command which installs unzip on every node, the command output will be stored on auto storage account Azure File Share. - command: | - az batchai cluster create -g MyResourceGroup -w MyWorkspace -n MyCluster \ - --use-auto-storage \ - -s Standard_NC6 -t 1 -k id_rsa.pub \ - --setup-task 'apt update; apt install unzip -y' \ - --setup-task-output '$AZ_BATCHAI_MOUNT_ROOT/autoafs' - - summary: Create a cluster providing all parameters manually. - command: | - az batchai cluster create -g MyResourceGroup -w MyWorkspace -n MyCluster \ - -i UbuntuLTS -s Standard_NC6 --vm-priority lowpriority \ - --min 0 --target 1 --max 10 \ - --storage-account-name MyStorageAccount \ - --nfs MyNfsToMount --afs-name MyAzureFileShareToMount \ - --bfs-name MyBlobContainerNameToMount \ - -u AdminUserName -k id_rsa.pub -p ImpossibleToGuessPassword - - summary: Create a cluster using a configuration file. - command: > - az batchai cluster create -g MyResourceGroup -w MyWorkspace -n MyCluster -f cluster.json -- command: - name: batchai cluster resize - summary: Resize a cluster. - examples: - - summary: Resize a cluster to zero size to stop paying for it. - command: az batchai cluster resize -g MyResourceGroup -w MyWorkspace -n MyCluster -t 0 - - summary: Resize a cluster to have 10 nodes. - command: az batchai cluster resize -g MyResourceGroup -w MyWorkspace -n MyCluster -t 10 -- command: - name: batchai cluster auto-scale - summary: Set auto-scale parameters for a cluster. - examples: - - summary: Make a cluster to auto scale between 0 and 10 nodes depending on number of queued and running jobs. - command: az batchai cluster auto-scale -g MyResourceGroup -w MyWorkspace -n MyCluster --min 0 --max 10 -- command: - name: batchai cluster delete - summary: Delete a cluster. - examples: - - summary: Delete a cluster and wait for deletion to be completed. - command: az batchai cluster delete -g MyResourceGroup -w MyWorkspace -n MyCluster - - summary: Send a delete command for a cluster and do not wait for deletion to be completed. - command: az batchai cluster delete -g MyResourceGroup -w MyWorkspace -n MyCluster --no-wait - - summary: Delete cluster without asking for confirmation (for non-interactive scenarios). - command: az batchai cluster delete -g MyResourceGroup -w MyWorkspace -n MyCluster -y -- command: - name: batchai cluster list - summary: List clusters. - examples: - - summary: List all clusters in a workspace. - command: az batchai cluster list -g MyResourceGroup -w MyWorkspace -o table -- command: - name: batchai cluster show - summary: Show information about a cluster. - examples: - - summary: Show full information about a cluster. - command: az batchai cluster show -g MyResourceGroup -w MyWorkspace -n MyCluster - - summary: Show cluster's summary. - command: az batchai cluster show -g MyResourceGroup -w MyWorkspace -n MyCluster -o table -- group: - name: batchai cluster node - summary: Commands to work with cluster nodes. -- command: - name: batchai cluster node list - summary: List remote login information for cluster's nodes. - description: "List remote login information for cluster nodes. You can ssh to a particular node using the provided public IP address and the port number.\nE.g. ssh @ -p " - examples: - - summary: List remote login information for a cluster. - command: az batchai cluster node list -g MyResourceGroup -w MyWorkspace -c MyCluster -o table -- command: - name: batchai cluster node exec - summary: Executes a command line on a cluster's node with optional ports forwarding. - examples: - - summary: Report a snapshot of the current processes. - command: | - az batchai cluster node exec -g MyResourceGroup -w MyWorkspace -c MyCluster \ - -n tvm-xxx --exec "ps axu" - - summary: Report a GPU information for a node. - command: | - az batchai cluster node exec -g MyResourceGroup -w MyWorkspace -c MyCluster \ - -n tvm-xxx --exec "nvidia-smi" - - summary: Forward local 9000 to port 9001 on the node. - command: | - az batchai cluster node exec -g MyResourceGroup -w MyWorkspace -c MyCluster \ - -n tvm-xxx -L 9000:localhost:9001 -- group: - name: batchai cluster file - summary: Commands to work with files generated by node setup task. -- command: - name: batchai cluster file list - summary: List files generated by the cluster's node setup task. - description: List files generated by the cluster's node setup task under $AZ_BATCHAI_STDOUTERR_DIR path. This functionality is available only if the node setup task output directory is located on mounted Azure File Share or Azure Blob Container. - examples: - - summary: List names and sizes of files and directories inside of $AZ_BATCHAI_STDOUTERR_DIR. - command: | - az batchai cluster file list -g MyResourceGroup -w MyWorkspace -c MyCluster -o table - - summary: List names, sizes and download URLs for files and directories inside of $AZ_BATCHAI_STDOUTERR_DIR. - command: | - az batchai cluster file list -g MyResourceGroup -w MyWorkspace -c MyCluster - - summary: List names, sizes and download URLs for files and directories inside of $AZ_BATCHAI_STDOUTERR_DIR/folder/subfolder. - command: | - az batchai cluster file list -g MyResourceGroup -w MyWorkspace -c MyCluster \ - -p folder/subfolder - - summary: List names, sizes and download URLs for files and directories inside of $AZ_BATCHAI_STDOUTERR_DIR making download URLs to remain valid for one hour. - command: | - az batchai cluster file list -g MyResourceGroup -w MyWorkspace -c MyCluster \ - --expiry 60 -- group: - name: batchai experiment - summary: Commands to manage experiments. -- command: - name: batchai experiment create - summary: Create an experiment. - examples: - - summary: Create an experiment. - command: az batchai experiment create -g MyResourceGroup -w MyWorkspace -n MyExperiment -- command: - name: batchai experiment delete - summary: Delete an experiment. - examples: - - summary: Delete an experiment. All running jobs will be terminated. - command: az batchai experiment delete -g MyResourceGroup -w MyWorkspace -n MyExperiment - - summary: Delete an experiment without asking for confirmation (for non-interactive scenarios). - command: az batchai experiment delete -g MyResourceGroup -w MyWorkspace -n MyExperiment -y - - summary: Request an experiment deletion without waiting for job to be deleted. - command: az batchai experiment delete -g MyResourceGroup -w MyWorkspace -n MyExperiment --no-wait -- command: - name: batchai experiment list - summary: List experiments. - examples: - - summary: List experiments. - command: az batchai experiment list -g MyResourceGroup -w MyWorkspace -o table -- command: - name: batchai experiment show - summary: Show information about an experiment. - examples: - - summary: Show information about an experiment. - command: az batchai experiment show -g MyResourceGroup -w MyWorkspace -n MyExperiment -o table -- group: - name: batchai job - summary: Commands to manage jobs. -- command: - name: batchai job create - summary: Create a job. - examples: - - summary: Create a job to run on a cluster in the same resource group. - command: | - az batchai job create -g MyResourceGroup -w MyWorkspace -e MyExperiment -n MyJob \ - -c MyCluster -f job.json - - summary: Create a job to run on a cluster in a different workspace. - command: | - az batchai job create -g MyJobResourceGroup -w MyJobWorkspace -e MyExperiment -n MyJob \ - -f job.json \ - -c "/subscriptions/00000000-0000-0000-0000-000000000000/\ - resourceGroups/MyClusterResourceGroup/\ - providers/Microsoft.BatchAI/workspaces/MyClusterWorkspace/clusters/MyCluster" -- command: - name: batchai job terminate - summary: Terminate a job. - examples: - - summary: Terminate a job and wait for the job to be terminated. - command: az batchai job terminate -g MyResourceGroup -w MyWorkspace -e MyExperiment -n MyJob - - summary: Terminate a job without asking for confirmation (for non-interactive scenarios). - command: az batchai job terminate -g MyResourceGroup -w MyWorkspace -e MyExperiment -n MyJob -y - - summary: Request job termination without waiting for the job to be terminated. - command: | - az batchai job terminate -g MyResourceGroup -e MyExperiment -w MyWorkspace -n MyJob \ - --no-wait -- command: - name: batchai job delete - summary: Delete a job. - examples: - - summary: Delete a job. The job will be terminated if it's currently running. - command: az batchai job delete -g MyResourceGroup -w MyWorkspace -e MyExperiment -n MyJob - - summary: Delete a job without asking for confirmation (for non-interactive scenarios). - command: az batchai job delete -g MyResourceGroup -w MyWorkspace -e MyExperiment -n MyJob -y - - summary: Request job deletion without waiting for job to be deleted. - command: az batchai job delete -g MyResourceGroup -w MyWorkspace -e MyExperiment -n MyJob --no-wait -- command: - name: batchai job list - summary: List jobs. - examples: - - summary: List jobs. - command: az batchai job list -g MyResourceGroup -w MyWorkspace -e MyExperiment -o table -- command: - name: batchai job show - summary: Show information about a job. - examples: - - summary: Show full information about a job. - command: az batchai job show -g MyResourceGroup -w MyWorkspace -e MyExperiment -n MyJob - - summary: Show job's summary. - command: az batchai job show -g MyResourceGroup -w MyWorkspace -e MyExperiment -n MyJob -o table -- group: - name: batchai job node - summary: Commands to work with nodes which executed a job. -- command: - name: batchai job node list - summary: List remote login information for nodes which executed the job. - description: "List remote login information for currently existing (not deallocated) nodes on which the job was executed. You can ssh to a particular node using the provided public IP address and the port number.\nE.g. ssh @ -p " - examples: - - summary: List remote login information for a job nodes. - command: az batchai job node list -g MyResourceGroup -w MyWorkspace -e MyExperiment -j MyJob -o table -- command: - name: batchai job node exec - summary: Executes a command line on a cluster's node used to execute the job with optional ports forwarding. - examples: - - summary: Report a GPU state for a job's node. - command: | - az batchai job node exec -g MyResourceGroup -w MyWorkspace -e MyExperiment -j MyJob \ - --exec "nvidia-smi" - - summary: Report a snapshot of the current processes. - command: | - az batchai job node exec -g MyResourceGroup -w MyWorkspace -e MyExperiment -j MyJob \ - --exec "ps aux" - - summary: Forward local 9000 to port 9001 on the given node. - command: | - az batchai job node exec -g MyResourceGroup -w MyWorkspace -e MyExperiment -j MyJob \ - -n tvm-xxx -L 9000:localhost:9001 -- group: - name: batchai job file - summary: Commands to list and stream files in job's output directories. -- command: - name: batchai job file list - summary: List job's output files in a directory with given id. - description: List job's output files in a directory with given id if the output directory is located on mounted Azure File Share or Blob Container. - examples: - - summary: List files in the standard output directory of the job. - command: | - az batchai job file list -g MyResourceGroup -w MyWorkspace -e MyExperiment -j MyJob - - summary: List files in the standard output directory of the job. Generates output in a table format. - command: | - az batchai job file list -g MyResourceGroup -w MyWorkspace -e MyExperiment -j MyJob -o table - - summary: List files in a folder 'MyFolder/MySubfolder' of an output directory with id 'MODELS'. - command: | - az batchai job file list -g MyResourceGroup -w MyWorkspace -e MyExperiment -j MyJob \ - -d MODELS -p MyFolder/MySubfolder - - summary: List files in the standard output directory of the job making download URLs to remain valid for 15 minutes. - command: | - az batchai job file list -g MyResourceGroup -w MyWorkspace -e MyExperiment -j MyJob \ - --expiry 15 -- command: - name: batchai job file stream - summary: Stream the content of a file (similar to 'tail -f'). - description: Waits for the job to create the given file and starts streaming it similar to 'tail -f' command. The command completes when the job finished execution. - examples: - - summary: Stream standard output file of the job. - command: | - az batchai job file stream -g MyResourceGroup -w MyWorkspace -e MyExperiment -j MyJob \ - -f stdout.txt - - summary: Stream a file 'log.txt' from a folder 'logs' of an output directory with id 'OUTPUTS'. - command: | - az batchai job file stream -g MyResourceGroup -w MyWorkspace -e MyExperiment -j MyJob \ - -d OUTPUTS -p logs -f log.txt -- command: - name: batchai job wait - summary: Waits for specified job completion and setups the exit code to the job's exit code. - examples: - - summary: Wait for the job completion. - command: | - az batchai job wait -g MyResourceGroup -w MyWorkspace -n MyJob -- group: - name: batchai file-server - summary: Commands to manage file servers. -- command: - name: batchai file-server create - summary: Create a file server. - examples: - - summary: Create a NFS file server using a configuration file. - command: az batchai file-server create -g MyResourceGroup -w MyWorkspace -n MyNFS -f nfs.json - - summary: Create a NFS manually providing parameters. - command: | - az batchai file-server create -g MyResourceGroup -w MyWorkspace -n MyNFS \ - -s Standard_D14 --disk-count 4 --disk-size 512 \ - --storage-sku Premium_LRS --caching-type readonly \ - -u $USER -k ~/.ssh/id_rsa.pub -- command: - name: batchai file-server delete - summary: Delete a file server. - examples: - - summary: Delete file server and wait for deletion to be completed. - command: az batchai file-server delete -g MyResourceGroup -w MyWorkspace -n MyNFS - - summary: Delete file server without asking for confirmation (for non-interactive scenarios). - command: az batchai file-server delete -g MyResourceGroup -w MyWorkspace -n MyNFS -y - - summary: Request file server deletion without waiting for deletion to be completed. - command: az batchai file-server delete -g MyResourceGroup -w MyWorkspace -n MyNFS --no-wait -- command: - name: batchai file-server list - summary: List file servers. - examples: - - summary: List all file servers in the given workspace. - command: az batchai file-server list -g MyResourceGroup -w MyWorkspace -o table -- command: - name: batchai file-server show - summary: Show information about a file server. - examples: - - summary: Show full information about a file server. - command: az batchai file-server show -g MyResourceGroup -w MyWorkspace -n MyNFS - - summary: Show file server summary. - command: az batchai file-server show -g MyResourceGroup -w MyWorkspace -n MyNFS -o table -- command: - name: batchai list-usages - summary: Gets the current usage information as well as limits for Batch AI resources for given location. - examples: - - summary: Get information for eastus location. - command: az batchai list-usages -l eastus -o table diff --git a/src/command_modules/azure-cli-billing/azure/cli/command_modules/billing/help.yaml b/src/command_modules/azure-cli-billing/azure/cli/command_modules/billing/help.yaml deleted file mode 100644 index 7021d4097e4..00000000000 --- a/src/command_modules/azure-cli-billing/azure/cli/command_modules/billing/help.yaml +++ /dev/null @@ -1,14 +0,0 @@ -version: 1 -content: -- group: - name: billing - summary: Manage Azure Billing. -- group: - name: billing invoice - summary: Get billing invoices for a subscription. -- group: - name: billing period - summary: Get billing periods for a subscription. -- group: - name: billing enrollment-account - summary: Get enrollment accounts. diff --git a/src/command_modules/azure-cli-botservice/azure/cli/command_modules/botservice/help.yaml b/src/command_modules/azure-cli-botservice/azure/cli/command_modules/botservice/help.yaml deleted file mode 100644 index 0350005b3fe..00000000000 --- a/src/command_modules/azure-cli-botservice/azure/cli/command_modules/botservice/help.yaml +++ /dev/null @@ -1,230 +0,0 @@ -version: 1 -content: -- group: - name: bot - summary: Manage Microsoft Bot Services. -- command: - name: bot create - summary: Create a new bot. -- command: - name: bot show - summary: Get an existing bot. - description: Get information about an existing bot. To get the information needed to connect to the bot, use the --msbot flag with the command. - examples: - - summary: Get the information needed to connect to an existing bot on Azure - command: |- - az bot show -n botName -g MyResourceGroup --msbot -- command: - name: bot prepare-publish - summary: Add scripts to your local source code directory to be able to publish back using `az bot publish`. -- command: - name: bot delete - summary: Delete an existing bot. -- command: - name: bot update - summary: Update an existing bot. - examples: - - summary: Update description on a bot - command: |- - az bot update -n botName -g MyResourceGroup --set properties.description="some description" -- command: - name: bot publish - summary: Publish to a bot's associated app service. - description: Publish your source code to your bot's associated app service. - examples: - - summary: Publish source code to your Azure App, from within the bot code folder - command: |- - az bot publish -n botName -g MyResourceGroup -- command: - name: bot download - summary: Download an existing bot. - description: The source code is downloaded from the web app associated with the bot. You can then make changes to it and publish it back to your app. -- command: - name: bot facebook create - summary: Create the Facebook Channel on a bot. - examples: - - summary: Create the Facebook Channel for a bot - command: | - az bot facebook create -n botName -g MyResourceGroup --appid myAppId \ - --page-id myPageId --secret mySecret --token myToken -- command: - name: bot email create - summary: Create the Email Channel on a bot. - examples: - - summary: Create the Email Channel for a bot - command: |- - az bot email create -n botName -g MyResourceGroup -a abc@outlook.com \ - -p password -- command: - name: bot msteams create - summary: Create the Microsoft Teams Channel on a bot. - examples: - - summary: Create the Microsoft Teams Channel for a bot with calling enabled - command: |- - az bot msteams create -n botName -g MyResourceGroup --enable-calling - --calling-web-hook https://www.myapp.com/ -- command: - name: bot skype create - summary: Create the Skype Channel on a bot. - examples: - - summary: Create the Skype Channel for a bot with messaging and screen sharing enabled - command: |- - az bot skype create -n botName -g MyResourceGroup --enable-messaging - --enable-screen-sharing -- command: - name: bot kik create - summary: Create the Kik Channel on a bot. - examples: - - summary: Create the Kik Channel for a bot. - command: |- - az bot kik create -n botName -g MyResourceGroup -u mykikname \ - --key key --is-validated -- command: - name: bot directline create - summary: Create the DirectLine Channel on a bot with only v3 protocol enabled. - examples: - - summary: Create the DirectLine Channel for a bot. - command: |- - az bot directline create -n botName -g MyResourceGroup --disablev1 -- command: - name: bot telegram create - summary: Create the Telegram Channel on a bot. - examples: - - summary: Create the Telegram Channel for a bot. - command: |- - az bot telegram create -n botName -g MyResourceGroup --access-token token - --is-validated -- command: - name: bot sms create - summary: Create the SMS Channel on a bot. - examples: - - summary: Create the SMS Channel for a bot. - command: |- - az bot sms create -n botName -g MyResourceGroup --account-sid sid \ - --auth-token token --is-validated --phone 1234567890 -- command: - name: bot slack create - summary: Create the Slack Channel on a bot. - examples: - - summary: Create the Slack Channel for a bot. - command: |- - az bot slack create -n botName -g MyResourceGroup --client-id clientid \ - --client-secret secret --verification-token token -- group: - name: bot authsetting - summary: Manage OAuth connection settings on a bot. -- command: - name: bot authsetting create - summary: Create an OAuth connection setting on a bot. - examples: - - summary: Create a new OAuth connection setting on a bot. - command: |- - az bot authsetting create -g MyResourceGroup -n botName -c myConnectionName \ - --client-id clientId --client-secret secret --provider-scope-string "scope1 scope2"\ - --service google --parameters id=myid -- command: - name: bot authsetting show - summary: Show details of an OAuth connection setting on a bot. -- command: - name: bot authsetting list - summary: Show all OAuth connection settings on a bot. -- command: - name: bot authsetting delete - summary: Delete an OAuth connection setting on a bot. -- command: - name: bot authsetting list-providers - summary: List details for all service providers available for creating OAuth connection settings. - examples: - - summary: List all service providers. - command: |- - az bot authsetting list-providers - - summary: Filter by a particular type of service provider. - command: |- - az bot authsetting list-providers --provider-name google -- command: - name: bot facebook delete - summary: Delete the Facebook Channel on a bot -- command: - name: bot facebook show - summary: Get details of the Facebook Channel on a bot -- group: - name: bot facebook - summary: Manage the Facebook Channel on a bot. -- command: - name: bot email delete - summary: Delete the email Channel on a bot -- command: - name: bot email show - summary: Get details of the email Channel on a bot -- group: - name: bot email - summary: Manage the email Channel on a bot. -- command: - name: bot skype delete - summary: Delete the Skype Channel on a bot -- command: - name: bot skype show - summary: Get details of the Skype Channel on a bot -- group: - name: bot skype - summary: Manage the Skype Channel on a bot. -- command: - name: bot kik delete - summary: Delete the Kik Channel on a bot -- command: - name: bot kik show - summary: Get details of the Kik Channel on a bot -- group: - name: bot kik - summary: Manage the Kik Channel on a bot. -- command: - name: bot directline delete - summary: Delete the Directline Channel on a bot -- command: - name: bot directline show - summary: Get details of the Directline Channel on a bot -- group: - name: bot directline - summary: Manage the Directline Channel on a bot. -- command: - name: bot telegram delete - summary: Delete the Telegram Channel on a bot -- command: - name: bot telegram show - summary: Get details of the Telegram Channel on a bot -- group: - name: bot telegram - summary: Manage the Telegram Channel on a bot. -- command: - name: bot sms delete - summary: Delete the SMS Channel on a bot -- command: - name: bot sms show - summary: Get details of the SMS Channel on a bot -- group: - name: bot sms - summary: Manage the SMS Channel on a bot. -- command: - name: bot slack delete - summary: Delete the Slack Channel on a bot -- command: - name: bot slack show - summary: Get details of the Slack Channel on a bot -- group: - name: bot slack - summary: Manage the Slack Channel on a bot. -- command: - name: bot msteams delete - summary: Delete the Microsoft Teams Channel on a bot -- command: - name: bot msteams show - summary: Get details of the Microsoft Teams Channel on a bot -- group: - name: bot msteams - summary: Manage the Microsoft Teams Channel on a bot. -- command: - name: bot webchat show - summary: Get details of the Webchat Channel on a bot -- group: - name: bot webchat - summary: Manage the Webchat Channel on a bot. diff --git a/src/command_modules/azure-cli-cdn/azure/cli/command_modules/cdn/help.yaml b/src/command_modules/azure-cli-cdn/azure/cli/command_modules/cdn/help.yaml deleted file mode 100644 index 29c52f875f6..00000000000 --- a/src/command_modules/azure-cli-cdn/azure/cli/command_modules/cdn/help.yaml +++ /dev/null @@ -1,156 +0,0 @@ -version: 1 -content: -- group: - name: cdn - summary: Manage Azure Content Delivery Networks (CDNs). -- group: - name: cdn profile - summary: Manage CDN profiles to define an edge network. -- command: - name: cdn profile create - summary: Create a new CDN profile. - arguments: - - name: --sku - summary: > - The pricing tier (defines a CDN provider, feature list and rate) of the CDN profile. - Defaults to Standard_Akamai. - examples: - - summary: Create a CDN profile using Verizon premium CDN. - command: > - az cdn profile create -g group -n profile --sku Premium_Verizon -- command: - name: cdn profile update - summary: Update a CDN profile. -- command: - name: cdn profile delete - summary: Delete a CDN profile. - examples: - - summary: Delete a CDN profile. - command: > - az cdn profile delete -g group -n profile -- command: - name: cdn profile list - summary: List CDN profiles. - examples: - - summary: List CDN profiles in a resource group. - command: > - az cdn profile list -g group -- group: - name: cdn endpoint - summary: Manage CDN endpoints. -- command: - name: cdn endpoint create - summary: Create a named endpoint to connect to a CDN. - examples: - - summary: Create an endpoint to service content for hostname over HTTP or HTTPS. - command: > - az cdn endpoint create -g group -n endpoint --profile-name profile \ - --origin www.example.com - - summary: Create an endpoint with a custom domain origin with HTTP and HTTPS ports. - command: > - az cdn endpoint create -g group -n endpoint --profile-name profile \ - --origin www.example.com 88 4444 - - summary: Create an endpoint with a custom domain with compression and only HTTPS. - command: > - az cdn endpoint create -g group -n endpoint --profile-name profile \ - --origin www.example.com --no-http --enable-compression -- command: - name: cdn endpoint update - summary: Update a CDN endpoint to manage how content is delivered. - examples: - - summary: Turn off HTTP traffic for an endpoint. - command: > - az cdn endpoint update -g group -n endpoint --profile-name profile --no-http - - summary: Enable content compression for an endpoint. - command: > - az cdn endpoint update -g group -n endpoint --profile-name profile \ - --enable-compression -- command: - name: cdn endpoint delete - summary: Delete a CDN endpoint. - examples: - - summary: Delete a CDN endpoint. - command: > - az cdn endpoint delete -g group -n endpoint --profile-name profile-name -- command: - name: cdn endpoint start - summary: Start a CDN endpoint. - examples: - - summary: Start a CDN endpoint. - command: > - az cdn endpoint start -g group -n endpoint --profile-name profile-name -- command: - name: cdn endpoint stop - summary: Stop a CDN endpoint. - examples: - - summary: Stop a CDN endpoint. - command: > - az cdn endpoint stop -g group -n endpoint --profile-name profile-name -- command: - name: cdn endpoint load - summary: Pre-load content for a CDN endpoint. - examples: - - summary: Pre-load Javascript and CSS content for an endpoint. - command: > - az cdn endpoint load -g group -n endpoint --profile-name profile-name --content-paths \ - '/scripts/app.js' '/styles/main.css' -- command: - name: cdn endpoint purge - summary: Purge pre-loaded content for a CDN endpoint. - examples: - - summary: Purge pre-loaded Javascript and CSS content. - command: > - az cdn endpoint purge -g group -n endpoint --profile-name profile-name --content-paths \ - '/scripts/app.js' '/styles/*' -- command: - name: cdn endpoint list - summary: List available endpoints for a CDN. - examples: - - summary: List all endpoints within a given CDN profile. - command: > - az cdn endpoint list -g group --profile-name profile-name -- group: - name: cdn custom-domain - summary: Manage Azure CDN Custom Domains to provide custom host names for endpoints. -- command: - name: cdn custom-domain delete - summary: Delete the custom domain of a CDN. - examples: - - summary: Delete a custom domain. - command: > - az cdn custom-domain delete -g group --endpoint-name endpoint --profile-name profile \ - -n domain-name -- command: - name: cdn custom-domain show - summary: Show details for the custom domain of a CDN. - examples: - - summary: Get the details of a custom domain. - command: > - az cdn custom-domain show -g group --endpoint-name endpoint --profile-name profile \ - -n domain-name -- command: - name: cdn custom-domain create - summary: Create a new custom domain to provide a hostname for a CDN endpoint. - description: > - Creates a new custom domain which must point to the hostname of the endpoint. - For example, the custom domain hostname cdn.contoso.com would need to have a - CNAME record pointing to the hostname of the endpoint related to this custom - domain. - arguments: - - name: --profile-name - summary: Name of the CDN profile which is unique within the resource group. - - name: --endpoint-name - summary: Name of the endpoint under the profile which is unique globally. - - name: --hostname - summary: The host name of the custom domain. Must be a domain name. - examples: - - summary: Create a custom domain within an endpoint and profile. - command: > - az cdn custom-domain create -g group --endpoint-name endpoint --profile-name profile \ - -n domain-name --hostname www.example.com -- group: - name: cdn origin - summary: List or show existing origins related to CDN endpoints. -- group: - name: cdn edge-node - summary: View all available CDN edge nodes. diff --git a/src/command_modules/azure-cli-cloud/azure/cli/command_modules/cloud/help.yaml b/src/command_modules/azure-cli-cloud/azure/cli/command_modules/cloud/help.yaml deleted file mode 100644 index 0b13d97b06f..00000000000 --- a/src/command_modules/azure-cli-cloud/azure/cli/command_modules/cloud/help.yaml +++ /dev/null @@ -1,27 +0,0 @@ -version: 1 -content: -- group: - name: cloud - summary: Manage registered Azure clouds. -- command: - name: cloud list - summary: List registered clouds. -- command: - name: cloud show - summary: Get the details of a registered cloud. -- command: - name: cloud register - summary: Register a cloud. - description: When registering a cloud, specify only the resource manager endpoint for the autodetection of other endpoints. -- command: - name: cloud unregister - summary: Unregister a cloud. -- command: - name: cloud set - summary: Set the active cloud. -- command: - name: cloud update - summary: Update the configuration of a cloud. -- command: - name: cloud list-profiles - summary: List the supported profiles for a cloud. diff --git a/src/command_modules/azure-cli-cognitiveservices/azure/cli/command_modules/cognitiveservices/help.yaml b/src/command_modules/azure-cli-cognitiveservices/azure/cli/command_modules/cognitiveservices/help.yaml deleted file mode 100644 index 5f5ef380f1e..00000000000 --- a/src/command_modules/azure-cli-cognitiveservices/azure/cli/command_modules/cognitiveservices/help.yaml +++ /dev/null @@ -1,103 +0,0 @@ -version: 1 -content: -- group: - name: cognitiveservices - summary: Manage Azure Cognitive Services accounts. - description: This article lists the Azure CLI commands for Azure Cognitive Services account and subscription management only. Refer to the documentation at https://docs.microsoft.com/azure/cognitive-services/ for individual services to learn how to use the APIs and supported SDKs. -- command: - name: cognitiveservices list - summary: Manage Azure Cognitive Services accounts. - description: This article lists the Azure CLI commands for Azure Cognitive Services account and subscription management only. Refer to the documentation at https://docs.microsoft.com/azure/cognitive-services/ for individual services to learn how to use the APIs and supported SDKs. - examples: - - summary: List all the Cognitive Services accounts in a resource group. - command: az cognitiveservices list -g MyResourceGroup -- command: - name: cognitiveservices account list - summary: Manage Azure Cognitive Services accounts. - description: This article lists the Azure CLI commands for Azure Cognitive Services account and subscription management only. Refer to the documentation at https://docs.microsoft.com/azure/cognitive-services/ for individual services to learn how to use the APIs and supported SDKs. - examples: - - summary: List all the Cognitive Services accounts in a resource group. - command: az cognitiveservices account list -g MyResourceGroup -- group: - name: cognitiveservices account - summary: Manage Azure Cognitive Services accounts. - description: This article lists the Azure CLI commands for Azure Cognitive Services account and subscription management only. Refer to the documentation at https://docs.microsoft.com/azure/cognitive-services/ for individual services to learn how to use the APIs and supported SDKs. -- command: - name: cognitiveservices account delete - summary: Manage Azure Cognitive Services accounts. - description: This article lists the Azure CLI commands for Azure Cognitive Services account and subscription management only. Refer to the documentation at https://docs.microsoft.com/azure/cognitive-services/ for individual services to learn how to use the APIs and supported SDKs. - examples: - - summary: Delete account. - command: az cognitiveservices account delete --name myresource-luis -g cognitive-services-resource-group -- command: - name: cognitiveservices account create - summary: Manage Azure Cognitive Services accounts. - description: This article lists the Azure CLI commands for Azure Cognitive Services account and subscription management only. Refer to the documentation at https://docs.microsoft.com/azure/cognitive-services/ for individual services to learn how to use the APIs and supported SDKs. - arguments: - - name: --kind - value-sources: - - link: - command: az cognitiveservices account list-kinds - - name: --sku - value-sources: - - link: - command: az cognitiveservices account list-skus - examples: - - summary: Create an S0 face API Cognitive Services account in West Europe without confirmation required. - command: az cognitiveservices account create -n myresource -g myResourceGroup --kind Face --sku S0 -l WestEurope --yes -- command: - name: cognitiveservices account show - summary: Manage Azure Cognitive Services accounts. - description: This article lists the Azure CLI commands for Azure Cognitive Services account and subscription management only. Refer to the documentation at https://docs.microsoft.com/azure/cognitive-services/ for individual services to learn how to use the APIs and supported SDKs. - examples: - - summary: Show account information. - command: az cognitiveservices account show --name myresource --resource-group cognitive-services-resource-group -- command: - name: cognitiveservices account update - summary: Manage Azure Cognitive Services accounts. - description: This article lists the Azure CLI commands for Azure Cognitive Services account and subscription management only. Refer to the documentation at https://docs.microsoft.com/azure/cognitive-services/ for individual services to learn how to use the APIs and supported SDKs. - arguments: - - name: --sku - value-sources: - - link: - command: az cognitiveservices account list-skus - examples: - - summary: Update sku and tags. - command: az cognitiveservices account update --name myresource -g cognitive-services-resource-group --sku S0 --tags external-app=chatbot-HR azure-web-app-bot=HR-external azure-app-service=HR-external-app-service -- command: - name: cognitiveservices account list-skus - summary: Manage Azure Cognitive Services accounts. - description: This article lists the Azure CLI commands for Azure Cognitive Services account and subscription management only. Refer to the documentation at https://docs.microsoft.com/azure/cognitive-services/ for individual services to learn how to use the APIs and supported SDKs. - arguments: - - name: --name - description: | - --kind and --location will be ignored when --name is specified. - --resource-group is required when when --name is specified. - - name: --resource-group - description: | - --resource-group is used when when --name is specified. In other cases it will be ignored. - - name: --kind - value-sources: - - link: - command: az cognitiveservices account list-kinds - examples: - - summary: Show SKUs. - command: az cognitiveservices account list-skus --kind Face --location westus -- group: - name: cognitiveservices account keys - summary: Manage Azure Cognitive Services accounts. - description: This article lists the Azure CLI commands for Azure Cognitive Services account and subscription management only. Refer to the documentation at https://docs.microsoft.com/azure/cognitive-services/ for individual services to learn how to use the APIs and supported SDKs. -- command: - name: cognitiveservices account keys regenerate - summary: Manage Azure Cognitive Services accounts. - description: This article lists the Azure CLI commands for Azure Cognitive Services account and subscription management only. Refer to the documentation at https://docs.microsoft.com/azure/cognitive-services/ for individual services to learn how to use the APIs and supported SDKs. - examples: - - summary: Get new keys for resource. - command: az cognitiveservices account keys regenerate --name myresource -g cognitive-services-resource-group --key-name key1 -- command: - name: cognitiveservices account keys list - summary: Manage Azure Cognitive Services accounts. - description: This article lists the Azure CLI commands for Azure Cognitive Services account and subscription management only. Refer to the documentation at https://docs.microsoft.com/azure/cognitive-services/ for individual services to learn how to use the APIs and supported SDKs. - examples: - - summary: Get current resource keys. - command: az cognitiveservices account keys list --name myresource -g cognitive-services-resource-group diff --git a/src/command_modules/azure-cli-configure/azure/cli/command_modules/configure/help.yaml b/src/command_modules/azure-cli-configure/azure/cli/command_modules/configure/help.yaml deleted file mode 100644 index a0fcfb2f46b..00000000000 --- a/src/command_modules/azure-cli-configure/azure/cli/command_modules/configure/help.yaml +++ /dev/null @@ -1,14 +0,0 @@ -version: 1 -content: -- command: - name: configure - summary: Manage Azure CLI configuration. This command is interactive. - arguments: - - name: --defaults - summary: > - Space-separated 'name=value' pairs for common argument defaults. - examples: - - summary: Set default resource group, webapp and VM names. - command: az configure --defaults group=myRG web=myweb vm=myvm - - summary: Clear default webapp and VM names. - command: az configure --defaults vm='' web='' diff --git a/src/command_modules/azure-cli-consumption/azure/cli/command_modules/consumption/help.yaml b/src/command_modules/azure-cli-consumption/azure/cli/command_modules/consumption/help.yaml deleted file mode 100644 index 9fedcfcc0ee..00000000000 --- a/src/command_modules/azure-cli-consumption/azure/cli/command_modules/consumption/help.yaml +++ /dev/null @@ -1,53 +0,0 @@ -version: 1 -content: -- group: - name: consumption - summary: Manage consumption of Azure resources. -- group: - name: consumption reservation - summary: Manage reservations for Azure resources. -- group: - name: consumption reservation summary - summary: List reservation summaries. -- command: - name: consumption reservation summary list - summary: List reservation summaries for daily or monthly by order Id or reservation id. -- group: - name: consumption reservation detail - summary: List reservation details. -- command: - name: consumption reservation detail list - summary: List the details of a reservation by order id or reservation id. -- group: - name: consumption usage - summary: Inspect the usage of Azure resources. -- command: - name: consumption usage list - summary: List the details of Azure resource consumption, either as an invoice or within a billing period. -- group: - name: consumption pricesheet - summary: Inspect the price sheet of an Azure subscription within a billing period. -- command: - name: consumption pricesheet show - summary: Show the price sheet for an Azure subscription within a billing period. -- group: - name: consumption marketplace - summary: Inspect the marketplace usage data of an Azure subscription within a billing period. -- command: - name: consumption marketplace list - summary: List the marketplace for an Azure subscription within a billing period. -- group: - name: consumption budget - summary: Manage budgets for an Azure subscription. -- command: - name: consumption budget list - summary: List budgets for an Azure subscription. -- command: - name: consumption budget show - summary: Show budget for an Azure subscription. -- command: - name: consumption budget create - summary: Create a budget for an Azure subscription. -- command: - name: consumption budget delete - summary: Delete a budget for an Azure subscription. diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/help.yaml b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/help.yaml deleted file mode 100644 index 15974152144..00000000000 --- a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/help.yaml +++ /dev/null @@ -1,68 +0,0 @@ -version: 1 -content: -- group: - name: container - summary: Manage Azure Container Instances. -- command: - name: container create - summary: Create a container group. - examples: - - summary: Create a container in a container group with 1 core and 1Gb of memory. - command: az container create -g MyResourceGroup --name myapp --image myimage:latest --cpu 1 --memory 1 - - summary: Create a container in a container group that runs Windows, with 2 cores and 3.5Gb of memory. - command: az container create -g MyResourceGroup --name mywinapp --image winappimage:latest --os-type Windows --cpu 2 --memory 3.5 - - summary: Create a container in a container group with public IP address, ports and DNS name label. - command: az container create -g MyResourceGroup --name myapp --image myimage:latest --ports 80 443 --dns-name-label contoso - - summary: Create a container in a container group that invokes a script upon start. - command: az container create -g MyResourceGroup --name myapp --image myimage:latest --command-line "/bin/sh -c '/path to/myscript.sh'" - - summary: Create a container in a container group that runs a command and stop the container afterwards. - command: az container create -g MyResourceGroup --name myapp --image myimage:latest --command-line "echo hello" --restart-policy Never - - summary: Create a container in a container group with environment variables. - command: az container create -g MyResourceGroup --name myapp --image myimage:latest --environment-variables key1=value1 key2=value2 - - summary: Create a container in a container group using container image from Azure Container Registry. - command: az container create -g MyResourceGroup --name myapp --image myAcrRegistry.azurecr.io/myimage:latest --registry-password password - - summary: Create a container in a container group that mounts an Azure File share as volume. - command: az container create -g MyResourceGroup --name myapp --image myimage:latest --command-line "cat /mnt/azfile/myfile" --azure-file-volume-share-name myshare --azure-file-volume-account-name mystorageaccount --azure-file-volume-account-key mystoragekey --azure-file-volume-mount-path /mnt/azfile - - summary: Create a container in a container group that mounts a git repo as volume. - command: az container create -g MyResourceGroup --name myapp --image myimage:latest --command-line "cat /mnt/gitrepo" --gitrepo-url https://github.com/user/myrepo.git --gitrepo-dir ./dir1 --gitrepo-mount-path /mnt/gitrepo - - summary: Create a container in a container group using a yaml file. - command: az container create -g MyResourceGroup -f containerGroup.yaml - - summary: Create a container group using Log Analytics from a workspace name. - command: az container create -g MyResourceGroup --name myapp --log-analytics-workspace myworkspace - - summary: Create a container group with a system assigned identity. - command: az container create -g MyResourceGroup --name myapp --image myimage:latest --assign-identity - - summary: Create a container group with a system assigned identity. The group will have a 'Contributor' role with access to a storage account. - command: az container create -g MyResourceGroup --name myapp --image myimage:latest --assign-identity --scope /subscriptions/99999999-1bf0-4dda-aec3-cb9272f09590/MyResourceGroup/myRG/providers/Microsoft.Storage/storageAccounts/storage1 - - summary: Create a container group with a user assigned identity. - command: az container create -g MyResourceGroup --name myapp --image myimage:latest --assign-identity /subscriptions/mySubscrpitionId/resourcegroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myID - - summary: Create a container group with both system and user assigned identity. - command: az container create -g MyResourceGroup --name myapp --image myimage:latest --assign-identity [system] /subscriptions/mySubscrpitionId/resourcegroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myID - min_profile: latest -- command: - name: container delete - summary: Delete a container group. -- command: - name: container list - summary: List container groups. -- command: - name: container show - summary: Get the details of a container group. -- command: - name: container logs - summary: Examine the logs for a container in a container group. -- command: - name: container export - summary: Export a container group in yaml format. - examples: - - summary: Export a container group in yaml. - command: az container export -g MyResourceGroup --name mynginx -f output.yaml -- command: - name: container exec - summary: Execute a command from within a running container of a container group. - description: The most common use case is to open an interactive bash shell. See examples below. This command is currently not supported for Windows machines. - examples: - - summary: Stream a shell from within an nginx container. - command: az container exec -g MyResourceGroup --name mynginx --container-name nginx --exec-command "/bin/bash" -- command: - name: container attach - summary: Attach local standard output and error streams to a container in a container group. diff --git a/src/command_modules/azure-cli-cosmosdb/azure/cli/command_modules/cosmosdb/help.yaml b/src/command_modules/azure-cli-cosmosdb/azure/cli/command_modules/cosmosdb/help.yaml deleted file mode 100644 index f78d52481da..00000000000 --- a/src/command_modules/azure-cli-cosmosdb/azure/cli/command_modules/cosmosdb/help.yaml +++ /dev/null @@ -1,44 +0,0 @@ -version: 1 -content: -- group: - name: cosmosdb - summary: Manage Azure Cosmos DB database accounts. -- group: - name: cosmosdb database - summary: Manage Azure Cosmos DB databases. -- group: - name: cosmosdb collection - summary: Manage Azure Cosmos DB collections. -- command: - name: cosmosdb check-name-exists - summary: Checks if an Azure Cosmos DB account name exists. -- command: - name: cosmosdb create - summary: Creates a new Azure Cosmos DB database account. -- command: - name: cosmosdb delete - summary: Deletes an Azure Cosmos DB database account. -- command: - name: cosmosdb failover-priority-change - summary: Changes the failover priority for the Azure Cosmos DB database account. -- command: - name: cosmosdb list - summary: List Azure Cosmos DB database accounts. -- command: - name: cosmosdb list-connection-strings - summary: List the connection strings for a Azure Cosmos DB database account. -- command: - name: cosmosdb list-keys - summary: List the access keys for a Azure Cosmos DB database account. -- command: - name: cosmosdb list-read-only-keys - summary: List the read-only access keys for a Azure Cosmos DB database account. -- command: - name: cosmosdb regenerate-key - summary: Regenerate an access key for a Azure Cosmos DB database account. -- command: - name: cosmosdb show - summary: Get the details of an Azure Cosmos DB database account. -- command: - name: cosmosdb update - summary: Update an Azure Cosmos DB database account. diff --git a/src/command_modules/azure-cli-dla/azure/cli/command_modules/dla/help.yaml b/src/command_modules/azure-cli-dla/azure/cli/command_modules/dla/help.yaml deleted file mode 100644 index 4aac8b330fb..00000000000 --- a/src/command_modules/azure-cli-dla/azure/cli/command_modules/dla/help.yaml +++ /dev/null @@ -1,275 +0,0 @@ -version: 1 -content: -- group: - name: dla - summary: (PREVIEW) Manage Data Lake Analytics accounts, jobs, and catalogs. -- group: - name: dla job - summary: (PREVIEW) Manage Data Lake Analytics jobs. -- command: - name: dla job submit - summary: Submit a job to a Data Lake Analytics account. - arguments: - - name: --job-name - summary: Name for the submitted job. - - name: --script - summary: Script to submit. This may be '@{file}' to load from a file. - - name: --runtime-version - summary: The runtime version to use. - description: This parameter is used for explicitly overwriting the default runtime. It should only be done if you know what you are doing. - - name: --degree-of-parallelism - summary: The degree of parallelism for the job. - description: Higher values equate to more parallelism and will usually yield faster running jobs, at the cost of more AUs. - - name: --priority - summary: The priority of the job. - description: Lower values increase the priority, with the lowest value being 1. This determines the order jobs are run in. -- command: - name: dla job cancel - summary: Cancel a Data Lake Analytics job. -- command: - name: dla job show - summary: Get information for a Data Lake Analytics job. -- command: - name: dla job wait - summary: Wait for a Data Lake Analytics job to finish. - description: This command exits when the job completes. - arguments: - - name: --job-id - summary: Job ID to poll for completion. -- command: - name: dla job list - summary: List Data Lake Analytics jobs. -- group: - name: dla catalog - summary: (PREVIEW) Manage Data Lake Analytics catalogs. -- group: - name: dla catalog database - summary: (PREVIEW) Manage Data Lake Analytics catalog databases. -- group: - name: dla catalog assembly - summary: (PREVIEW) Manage Data Lake Analytics catalog assemblies. -- group: - name: dla catalog external-data-source - summary: (PREVIEW) Manage Data Lake Analytics catalog external data sources. -- group: - name: dla catalog procedure - summary: (PREVIEW) Manage Data Lake Analytics catalog stored procedures. -- group: - name: dla catalog schema - summary: (PREVIEW) Manage Data Lake Analytics catalog schemas. -- group: - name: dla catalog table - summary: (PREVIEW) Manage Data Lake Analytics catalog tables. -- command: - name: dla catalog table list - summary: List tables in a database or schema. - arguments: - - name: --database-name - summary: The name of the database. - - name: --schema-name - summary: The schema assocated with the tables to list. -- group: - name: dla catalog table-partition - summary: (PREVIEW) Manage Data Lake Analytics catalog table partitions. -- group: - name: dla catalog table-stats - summary: (PREVIEW) Manage Data Lake Analytics catalog table statistics. -- command: - name: dla catalog table-stats list - summary: List table statistics in a database, table, or schema. - arguments: - - name: --database-name - summary: The name of the database. - - name: --schema-name - summary: The schema associated with the tables to list. - - name: --table-name - summary: The table to list statistics for. `--schema-name` must also be specified. -- group: - name: dla catalog table-type - summary: (PREVIEW) Manage Data Lake Analytics catalog table types. -- group: - name: dla catalog tvf - summary: (PREVIEW) Manage Data Lake Analytics catalog table valued functions. -- command: - name: dla catalog tvf list - summary: List table valued functions in a database or schema. - arguments: - - name: --database-name - summary: The name of the database. - - name: --schema-name - summary: The name of the schema assocated with table valued functions to list. -- group: - name: dla catalog view - summary: (PREVIEW) Manage Data Lake Analytics catalog views. -- command: - name: dla catalog view list - summary: List views in a database or schema. - arguments: - - name: --database-name - summary: The name of the database. - - name: --schema-name - summary: The name of the schema associated with the views to list. -- group: - name: dla catalog credential - summary: (PREVIEW) Manage Data Lake Analytics catalog credentials. -- command: - name: dla catalog credential create - summary: Create a new catalog credential for use with an external data source. - arguments: - - name: --credential-name - summary: The name of the credential. - - name: --database-name - summary: The name of the database in which to create the credential. - - name: --user-name - summary: The user name that will be used when authenticating with this credential. -- command: - name: dla catalog credential update - summary: Update a catalog credential for use with an external data source. - arguments: - - name: --credential-name - summary: The name of the credential to update. - - name: --database-name - summary: The name of the database in which the credential exists. - - name: --user-name - summary: The user name associated with the credential that will have its password updated. -- command: - name: dla catalog credential show - summary: Retrieve a catalog credential. -- command: - name: dla catalog credential list - summary: List catalog credentials. -- command: - name: dla catalog credential delete - summary: Delete a catalog credential. -- group: - name: dla catalog package - summary: (PREVIEW) Manage Data Lake Analytics catalog packages. -- group: - name: dla account - summary: (PREVIEW) Manage Data Lake Analytics accounts. -- command: - name: dla account create - summary: Create a Data Lake Analytics account. - arguments: - - name: --default-data-lake-store - summary: The default Data Lake Store account to associate with the created account. - - name: --max-degree-of-parallelism - summary: The maximum degree of parallelism for this account. - - name: --max-job-count - summary: The maximum number of concurrent jobs for this account. - - name: --query-store-retention - summary: The number of days to retain job metadata. -- command: - name: dla account update - summary: Update a Data Lake Analytics account. - arguments: - - name: --max-degree-of-parallelism - summary: The maximum degree of parallelism for this account. - - name: --max-job-count - summary: The maximum number of concurrent jobs for this account. - - name: --query-store-retention - summary: The number of days to retain job metadata. - - name: --firewall-state - summary: Enable or disable existing firewall rules. - - name: --allow-azure-ips - summary: Allow or block IPs originating from Azure through the firewall. -- command: - name: dla account show - summary: Get the details of a Data Lake Analytics account. -- command: - name: dla account list - summary: List available Data Lake Analytics accounts. -- command: - name: dla account delete - summary: Delete a Data Lake Analytics account. -- group: - name: dla account blob-storage - summary: (PREVIEW) Manage links between Data Lake Analytics accounts and Azure Storage. -- command: - name: dla account blob-storage add - summary: Links an Azure Storage account to the specified Data Lake Analytics account. -- command: - name: dla account blob-storage update - summary: Updates an Azure Storage account linked to the specified Data Lake Analytics account. -- group: - name: dla account data-lake-store - summary: (PREVIEW) Manage links between Data Lake Analytics and Data Lake Store accounts. -- group: - name: dla account firewall - summary: (PREVIEW) Manage Data Lake Analytics account firewall rules. -- command: - name: dla account firewall create - summary: Create a firewall rule in a Data Lake Analytics account. - arguments: - - name: --end-ip-address - summary: The end of the valid IP range for the firewall rule. - - name: --start-ip-address - summary: The start of the valid IP range for the firewall rule. - - name: --firewall-rule-name - summary: The name of the firewall rule. -- command: - name: dla account firewall update - summary: Update a firewall rule in a Data Lake Analytics account. -- command: - name: dla account firewall show - summary: Retrieve a firewall rule in a Data Lake Analytics account. -- command: - name: dla account firewall list - summary: List firewall rules in a Data Lake Analytics account. -- command: - name: dla account firewall delete - summary: Delete a firewall rule in a Data Lake Analytics account. -- group: - name: dla account compute-policy - summary: (PREVIEW) Manage Data Lake Analytics account compute policies. -- command: - name: dla account compute-policy create - summary: Create a compute policy in the Data Lake Analytics account. - arguments: - - name: --max-dop-per-job - summary: The maximum degree of parallelism allowed per job for this policy. At least one of `--min-priority-per-job` and `--max-dop-per-job` must be specified. - - name: --min-priority-per-job - summary: The minimum priority allowed per job for this policy. At least one of `--min-priority-per-job` and `--max-dop-per-job` must be specified. - - name: --compute-policy-name - summary: The name of the compute policy to create. - - name: --object-id - summary: The Azure Active Directory object ID of the user, group, or service principal to apply the policy to. - - name: --object-type - summary: The Azure Active Directory object type associated with the supplied object ID. -- command: - name: dla account compute-policy update - summary: Update a compute policy in the Data Lake Analytics account. - arguments: - - name: --max-dop-per-job - summary: The maximum degree of parallelism allowed per job for this policy. At least one of `--min-priority-per-job` and `--max-dop-per-job` must be specified. - - name: --min-priority-per-job - summary: The minimum priority allowed per job for this policy. At least one of `--min-priority-per-job` and `--max-dop-per-job` must be specified. - - name: --compute-policy-name - summary: The name of the compute policy to update. -- command: - name: dla account compute-policy show - summary: Retrieve a compute policy in a Data Lake Analytics account. -- command: - name: dla account compute-policy list - summary: List compute policies in the a Lake Analytics account. -- command: - name: dla account compute-policy delete - summary: Delete a compute policy in a Data Lake Analytics account. -- group: - name: dla job pipeline - summary: (PREVIEW) Manage Data Lake Analytics job pipelines. -- command: - name: dla job pipeline show - summary: Retrieve a job pipeline in a Data Lake Analytics account. -- command: - name: dla job pipeline list - summary: List job pipelines in a Data Lake Analytics account. -- group: - name: dla job recurrence - summary: (PREVIEW) Manage Data Lake Analytics job recurrences. -- command: - name: dla job recurrence show - summary: Retrieve a job recurrence in a Data Lake Analytics account. -- command: - name: dla job recurrence list - summary: List job recurrences in a Data Lake Analytics account. diff --git a/src/command_modules/azure-cli-dls/azure/cli/command_modules/dls/help.yaml b/src/command_modules/azure-cli-dls/azure/cli/command_modules/dls/help.yaml deleted file mode 100644 index c70d13dbbee..00000000000 --- a/src/command_modules/azure-cli-dls/azure/cli/command_modules/dls/help.yaml +++ /dev/null @@ -1,214 +0,0 @@ -version: 1 -content: -- group: - name: dls - summary: (PREVIEW) Manage Data Lake Store accounts and filesystems. -- group: - name: dls account - summary: (PREVIEW) Manage Data Lake Store accounts. -- command: - name: dls account create - summary: Creates a Data Lake Store account. - arguments: - - name: --default-group - summary: Name of the default group to give permissions to for freshly created files and folders in the Data Lake Store account. - - name: --key-vault-id - summary: Key vault for the user-assigned encryption type. - - name: --key-name - summary: Key name for the user-assigned encryption type. - - name: --key-version - summary: Key version for the user-assigned encryption type. -- command: - name: dls account update - summary: Updates a Data Lake Store account. -- command: - name: dls account show - summary: Get the details of a Data Lake Store account. -- command: - name: dls account list - summary: Lists available Data Lake Store accounts. -- command: - name: dls account enable-key-vault - summary: Enable the use of Azure Key Vault for encryption of a Data Lake Store account. -- command: - name: dls account delete - summary: Delete a Data Lake Store account. -- group: - name: dls account trusted-provider - summary: (PREVIEW) Manage Data Lake Store account trusted identity providers. -- group: - name: dls account firewall - summary: (PREVIEW) Manage Data Lake Store account firewall rules. -- command: - name: dls account firewall create - summary: Creates a firewall rule in a Data Lake Store account. - arguments: - - name: --end-ip-address - summary: The end of the valid ip range for the firewall rule. - - name: --start-ip-address - summary: The start of the valid ip range for the firewall rule. - - name: --firewall-rule-name - summary: The name of the firewall rule. -- command: - name: dls account firewall update - summary: Updates a firewall rule in a Data Lake Store account. -- command: - name: dls account firewall show - summary: Get the details of a firewall rule in a Data Lake Store account. -- command: - name: dls account firewall list - summary: Lists firewall rules in a Data Lake Store account. -- command: - name: dls account firewall delete - summary: Deletes a firewall rule in a Data Lake Store account. -- group: - name: dls account network-rule - summary: (PREVIEW) Manage Data Lake Store account virtual network rules. -- command: - name: dls account network-rule create - summary: Creates a virtual network rule in a Data Lake Store account. - arguments: - - name: --subnet - summary: The subnet name or id for the virtual network rule. - - name: --vnet-name - summary: The name of the virtual network rule. -- command: - name: dls account network-rule update - summary: Updates a virtual network rule in a Data Lake Store account. -- command: - name: dls account network-rule show - summary: Get the details of a virtual network rule in a Data Lake Store account. -- command: - name: dls account network-rule list - summary: Lists virtual network rules in a Data Lake Store account. -- command: - name: dls account network-rule delete - summary: Deletes a virtual network rule in a Data Lake Store account. -- group: - name: dls fs - summary: (PREVIEW) Manage a Data Lake Store filesystem. -- command: - name: dls fs create - summary: Creates a file or folder in a Data Lake Store account. - arguments: - - name: --content - summary: Content for the file to contain upon creation. -- command: - name: dls fs show - summary: Get file or folder information in a Data Lake Store account. -- command: - name: dls fs list - summary: List the files and folders in a Data Lake Store account. -- command: - name: dls fs append - summary: Append content to a file in a Data Lake Store account. - arguments: - - name: --content - summary: Content to be appended to the file. -- command: - name: dls fs delete - summary: Delete a file or folder in a Data Lake Store account. -- command: - name: dls fs upload - summary: Upload a file or folder to a Data Lake Store account. - arguments: - - name: --source-path - summary: The path to the file or folder to upload. - - name: --destination-path - summary: The full path in the Data Lake Store filesystem to upload the file or folder to. - - name: --thread-count - summary: 'Parallelism of the upload. Default: The number of cores in the local machine.' - - name: --chunk-size - summary: Size of a chunk, in bytes. - description: Large files are split into chunks. Files smaller than this size will always be transferred in a single thread. - - name: --buffer-size - summary: Size of the transfer buffer, in bytes. - description: A buffer cannot be bigger than a chunk and cannot be smaller than a block. - - name: --block-size - summary: Size of a block, in bytes. - description: Within each chunk, a smaller block is written for each API call. A block cannot be bigger than a chunk and must be bigger than a buffer. -- command: - name: dls fs download - summary: Download a file or folder from a Data Lake Store account to the local machine. - arguments: - - name: --source-path - summary: The full path in the Data Lake Store filesystem to download the file or folder from. - - name: --destination-path - summary: The local path where the file or folder will be downloaded to. - - name: --thread-count - summary: 'Parallelism of the download. Default: The number of cores in the local machine.' - - name: --chunk-size - summary: Size of a chunk, in bytes. - description: Large files are split into chunks. Files smaller than this size will always be transferred in a single thread. - - name: --buffer-size - summary: Size of the transfer buffer, in bytes. - description: A buffer cannot be bigger than a chunk and cannot be smaller than a block. - - name: --block-size - summary: Size of a block, in bytes. - description: Within each chunk, a smaller block is written for each API call. A block cannot be bigger than a chunk and must be bigger than a buffer. -- command: - name: dls fs test - summary: Test for the existence of a file or folder in a Data Lake Store account. -- command: - name: dls fs preview - summary: Preview the content of a file in a Data Lake Store account. - arguments: - - name: --length - summary: The amount of data to preview in bytes. - description: If not specified, attempts to preview the full file. If the file is > 1MB `--force` must be specified. - - name: --offset - summary: The position in bytes to start the preview from. -- command: - name: dls fs join - summary: Join files in a Data Lake Store account into one file. - arguments: - - name: --source-paths - summary: The space-separated list of files in the Data Lake Store account to join. - - name: --destination-path - summary: The destination path in the Data Lake Store account. -- command: - name: dls fs move - summary: Move a file or folder in a Data Lake Store account. - arguments: - - name: --source-path - summary: The file or folder to move. - - name: --destination-path - summary: The destination path in the Data Lake Store account. -- command: - name: dls fs set-expiry - summary: Set the expiration time for a file. -- command: - name: dls fs remove-expiry - summary: Remove the expiration time for a file. -- group: - name: dls fs access - summary: Manage Data Lake Store filesystem access and permissions. -- command: - name: dls fs access show - summary: Display the access control list (ACL). -- command: - name: dls fs access set-owner - summary: Set the owner information for a file or folder in a Data Lake Store account. - arguments: - - name: --owner - summary: The user Azure Active Directory object ID or user principal name to set as the owner. - - name: --group - summary: The group Azure Active Directory object ID or user principal name to set as the owning group. -- command: - name: dls fs access set-permission - summary: Set the permissions for a file or folder in a Data Lake Store account. - arguments: - - name: --permission - summary: The octal representation of the permissions for user, group and mask. -- command: - name: dls fs access set-entry - summary: Update the access control list for a file or folder. -- command: - name: dls fs access set - summary: Replace the existing access control list for a file or folder. -- command: - name: dls fs access remove-entry - summary: Remove entries for the access control list of a file or folder. -- command: - name: dls fs access remove-all - summary: Remove the access control list for a file or folder. diff --git a/src/command_modules/azure-cli-dms/azure/cli/command_modules/dms/help.yaml b/src/command_modules/azure-cli-dms/azure/cli/command_modules/dms/help.yaml deleted file mode 100644 index b08e55d7b21..00000000000 --- a/src/command_modules/azure-cli-dms/azure/cli/command_modules/dms/help.yaml +++ /dev/null @@ -1,197 +0,0 @@ -version: 1 -content: -- group: - name: dms - summary: Manage Azure Data Migration Service (DMS) instances. -- command: - name: dms check-name - summary: Check if a given DMS instance name is available in a given region as well as the name's validity. - arguments: - - name: --name - summary: > - The Service name to check. -- command: - name: dms check-status - summary: Perform a health check and return the status of the service and virtual machine size. -- command: - name: dms create - summary: Create an instance of the Data Migration Service. - arguments: - - name: --sku-name - summary: > - The name of the CPU SKU on which the service's Virtual Machine will run. Check the name and the availability of SKUs in your area with "az dms list-skus". - - name: --subnet - summary: > - The Resource ID of the VNet's Subnet you will use to connect the source and target DBs. - Use "az network vnet subnet show -h" for help to get your subnet's ID. - examples: - - summary: Create an instance of DMS. - command: > - az dms create -l westus -n mydms -g myresourcegroup --sku-name Basic_2vCores --subnet /subscriptions/{vnetSubscriptionId}/resourceGroups/{vnetResourceGroup}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName} --tags tagName1=tagValue1 tagWithNoValue -- command: - name: dms delete - summary: Delete an instance of the Data Migration Service. - arguments: - - name: --delete-running-tasks - summary: > - Cancel any running tasks before deleting the service. -- command: - name: dms list - summary: List the DMS instances within your currently configured subscription (to set this use "az account set"). If provided, only show the instances within a given resource group. - examples: - - summary: List all the instances in your subscription. - command: > - az dms list - - summary: List all the instances in a given resource group. - command: > - az dms list -g myresourcegroup -- command: - name: dms list-skus - summary: List the SKUs that are supported by the Data Migration Service. -- command: - name: dms show - summary: Show the details for an instance of the Data Migration Service. -- command: - name: dms start - summary: Start an instance of the Data Migration Service. It can then be used to run data migrations. -- command: - name: dms stop - summary: Stop an instance of the Data Migration Service. While stopped, it can't be used to run data migrations and the owner won't be billed. -- command: - name: dms wait - summary: Place the CLI in a waiting state until a condition of the DMS instance is met. -- group: - name: dms project - summary: Manage Projects for an instance of the Data Migration Service. -- command: - name: dms project create - summary: Create a migration Project which can contain multiple Tasks. - arguments: - - name: --source-platform - summary: > - The type of server for the source database. The supported types are: SQL. - - name: --target-platform - summary: > - The type of service for the target database. The supported types are: SQLDB. - examples: - - summary: Create a Project for a DMS instance. - command: > - az dms project create -l westus -n myproject -g myresourcegroup --service-name mydms --source-platform SQL --target-platform SQLDB --tags tagName1=tagValue1 tagWithNoValue -- command: - name: dms project delete - summary: Delete a Project. - arguments: - - name: --delete-running-tasks - summary: > - Cancel any running tasks before deleting the Project. -- command: - name: dms project list - summary: List the Projects within an instance of DMS. -- command: - name: dms project show - summary: Show the details of a migration Project. -- command: - name: dms project check-name - summary: Check if a given Project name is available within a given instance of DMS as well as the name's validity. - arguments: - - name: --name - summary: > - The Project name to check. -- group: - name: dms project task - summary: Manage Tasks for a Data Migration Service instance's Project. -- command: - name: dms project task create - summary: Create and start a migration Task. - arguments: - - name: --database-options-json - summary: > - Database and table information. This can be either a JSON-formatted string or the location to a file containing the JSON object. See example below for the format. - - name: --source-connection-json - summary: > - The connection information to the source server. This can be either a JSON-formatted string or the location to a file containing the JSON object. See example below for the format. - - name: --target-connection-json - summary: > - The connection information to the target server. This can be either a JSON-formatted string or the location to a file containing the JSON object. See example below for the format. - - name: --enable-data-integrity-validation - summary: > - Whether to perform a checksum based data integrity validation between source and target for the selected database and tables. - - name: --enable-query-analysis-validation - summary: > - Whether to perform a quick and intelligent query analysis by retrieving queries from the source database and - executing them in the target. The result will have execution statistics for executions in source and target databases - for the extracted queries. - - name: --enable-schema-validation - summary: > - Whether to compare the schema information between source and target. - examples: - - summary: Create and start a Task which performs no validation checks. - command: > - az dms project task create --database-options-json "C:\CLI Files\databaseOptions.json" -n mytask --project-name myproject -g myresourcegroup --service-name mydms --source-connection-json "{'dataSource': 'myserver', 'authentication': 'SqlAuthentication', 'encryptConnection': 'true', 'trustServerCertificate': 'true'}" --target-connection-json "C:\CLI Files\targetConnection.json" - - summary: Create and start a Task which performs all validation checks. - command: > - az dms project task create --database-options-json "C:\CLI Files\databaseOptions.json" -n mytask --project-name myproject -g myresourcegroup --service-name mydms --source-connection-json "C:\CLI Files\sourceConnection.json" --target-connection-json "C:\CLI Files\targetConnection.json" --enable-data-integrity-validation --enable-query-analysis-validation --enable-schema-validation - - summary: The format of the database options JSON object. - command: > - [ - { - "name": "source database", - "target_database_name": "target database", - "make_source_db_read_only": false|true, - "table_map": { - "schema.SourceTableName1": "schema.TargetTableName1", - "schema.SourceTableName2": "schema.TargetTableName2", - ...n - } - }, - ...n - ] - - summary: The format of the connection JSON object. - command: > - { - "userName": "user name", // if this is missing or null, you will be prompted - "password": null, // if this is missing or null (highly recommended) you will be prompted - "dataSource": "server name[,port]", - "authentication": "SqlAuthentication|WindowsAuthentication", - "encryptConnection": true, // highly recommended to leave as true - "trustServerCertificate": true // highly recommended to leave as true - } -- command: - name: dms project task delete - summary: Delete a migration Task. - arguments: - - name: --delete-running-tasks - summary: > - If the Task is currently running, cancel the Task before deleting the Project. -- command: - name: dms project task list - summary: List the Tasks within a Project. Some tasks may have a status of Unknown, which indicates that an error occurred while querying the status of that task. - arguments: - - name: --task-type - summary: > - Filters the list by the type of task. For the list of possible types see "az dms check-status". - examples: - - summary: List all Tasks within a Project. - command: > - az dms project task list --project-name myproject -g myresourcegroup --service-name mydms - - summary: List only the SQL to SQL migration tasks within a Project. - command: > - az dms project task list --project-name myproject -g myresourcegroup --service-name mydms --task-type Migrate.SqlServer.SqlDb -- command: - name: dms project task show - summary: Show the details of a migration Task. Use the "--expand" to get more details. - arguments: - - name: --expand - summary: > - Expand the response to provide more details. Use with "command" to see more details of the Task. - Use with "output" to see the results of the Task's migration. -- command: - name: dms project task cancel - summary: Cancel a Task if it's currently queued or running. -- command: - name: dms project task check-name - summary: Check if a given Task name is available within a given instance of DMS as well as the name's validity. - arguments: - - name: --name - summary: > - The Task name to check. diff --git a/src/command_modules/azure-cli-eventgrid/azure/cli/command_modules/eventgrid/help.yaml b/src/command_modules/azure-cli-eventgrid/azure/cli/command_modules/eventgrid/help.yaml deleted file mode 100644 index cb7a696eba4..00000000000 --- a/src/command_modules/azure-cli-eventgrid/azure/cli/command_modules/eventgrid/help.yaml +++ /dev/null @@ -1,179 +0,0 @@ -version: 1 -content: -- group: - name: eventgrid - summary: Manage Azure Event Grid topics and subscriptions. -- group: - name: eventgrid topic - summary: Manage Azure Event Grid topics. -- command: - name: eventgrid topic create - summary: Create a topic. - examples: - - summary: Create a new topic. - command: az eventgrid topic create -g rg1 --name topic1 -l westus2 -- command: - name: eventgrid topic update - summary: Update a topic. - examples: - - summary: Update the properties of an existing topic. - command: az eventgrid topic update -g rg1 --name topic1 --tags Dept=IT -- command: - name: eventgrid topic delete - summary: Delete a topic. - examples: - - summary: Delete a topic. - command: az eventgrid topic delete -g rg1 --name topic1 -- command: - name: eventgrid topic list - summary: List available topics. - examples: - - summary: List all topics in the current Azure subscription. - command: az eventgrid topic list - - summary: List all topics in a resource group. - command: az eventgrid topic list -g rg1 -- command: - name: eventgrid topic show - summary: Get the details of a topic. - examples: - - summary: Show the details of a topic. - command: az eventgrid topic show -g rg1 -n topic1 - - summary: Show the details of a topic based on resource ID. - command: az eventgrid topic show --ids /subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/kalstest/providers/Microsoft.EventGrid/topics/topic1 -- group: - name: eventgrid topic key - summary: Manage shared access keys of a topic. -- command: - name: eventgrid topic key list - summary: List shared access keys of a topic. -- command: - name: eventgrid topic key regenerate - summary: Regenerate a shared access key of a topic. -- group: - name: eventgrid event-subscription - summary: Manage event subscriptions for an Event Grid topic or for an Azure resource. -- command: - name: eventgrid event-subscription create - summary: Create a new event subscription for an Event Grid topic or for an Azure resource. - examples: - - summary: Create a new event subscription for an Event Grid topic, using default filters. - command: | - az eventgrid event-subscription create -g rg1 --topic-name topic1 --name es1 \ - --endpoint https://contoso.azurewebsites.net/api/f1?code=code - - summary: Create a new event subscription for a subscription, using default filters. - command: | - az eventgrid event-subscription create --name es2 \ - --endpoint https://contoso.azurewebsites.net/api/f1?code=code - - summary: Create a new event subscription for a resource group, using default filters. - command: | - az eventgrid event-subscription create -g rg1 --name es3 \ - --endpoint https://contoso.azurewebsites.net/api/f1?code=code - - summary: Create a new event subscription for a storage account, using default filters. - command: | - az eventgrid event-subscription create --resource-id "/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/kalstest/providers/Microsoft.Storage/storageaccounts/kalsegblob" --name es3 \ - --endpoint https://contoso.azurewebsites.net/api/f1?code=code - - summary: Create a new event subscription for a subscription, with a filter specifying a subject prefix. - command: | - az eventgrid event-subscription create --name es4 \ - --endpoint https://contoso.azurewebsites.net/api/f1?code=code \ - --subject-begins-with mysubject_prefix - - summary: Create a new event subscription for a resource group, with a filter specifying a subject suffix. - command: | - az eventgrid event-subscription create -g rg2 --name es5 \ - --endpoint https://contoso.azurewebsites.net/api/f1?code=code \ - --subject-ends-with mysubject_suffix - - summary: Create a new event subscription for a subscription, using default filters, and an EventHub as a destination. - command: | - az eventgrid event-subscription create --name es2 --endpoint-type eventhub \ - --endpoint /subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/TestRG/providers/Microsoft.EventHub/namespaces/ContosoNamespace/eventhubs/EH1 -- command: - name: eventgrid event-subscription update - summary: Update an event subscription. - examples: - - summary: Update an event subscription for an Event Grid topic to specify a new endpoint. - command: | - az eventgrid event-subscription update -g rg1 --topic-name topic1 --name es1 \ - --endpoint https://contoso.azurewebsites.net/api/f1?code=code - - summary: Update an event subscription for a subscription to specify a new subject-ends-with filter. - command: | - az eventgrid event-subscription update --name es2 --subject-ends-with .jpg - - summary: Update an event subscription for a resource group to specify a new endpoint and a new subject-ends-with filter. - command: | - az eventgrid event-subscription update -g rg1 --name es3 --subject-ends-with .png \ - --endpoint https://contoso.azurewebsites.net/api/f1?code=code - - summary: Update an event subscription for a storage account to specify a new list of included event types. - command: | - az eventgrid event-subscription update --resource-id "/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/kalstest/providers/microsoft.storage/storageaccounts/kalsegblob" --name es3 \ - --included-event-types Microsoft.Storage.BlobCreated Microsoft.Storage.BlobDeleted -- command: - name: eventgrid event-subscription delete - summary: Delete an event subscription. - examples: - - summary: Delete an event subscription for an Event Grid topic. - command: | - az eventgrid event-subscription delete -g rg1 --topic-name topic1 --name es1 - - summary: Delete an event subscription for a subscription. - command: | - az eventgrid event-subscription delete --name es2 - - summary: Delete an event subscription for a resource group. - command: | - az eventgrid event-subscription delete -g rg1 --name es3 - - summary: Delete an event subscription for a storage account. - command: | - az eventgrid event-subscription delete --resource-id "/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/kalstest/providers/microsoft.storage/storageaccounts/kalsegblob" --name es3 -- command: - name: eventgrid event-subscription list - summary: List event subscriptions. - examples: - - summary: List all event subscriptions for an Event Grid topic. - command: | - az eventgrid event-subscription list -g rg1 --topic-name topic1 - - summary: List all event subscriptions for a storage account. - command: | - az eventgrid event-subscription list --resource-id /subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/kalstest/providers/Microsoft.Storage/storageaccounts/kalsegblob - - summary: List all event subscriptions for a topic-type in a specific location (under the currently selected Azure subscription). - command: | - az eventgrid event-subscription list --topic-type Microsoft.Storage.StorageAccounts --location westus2 - - summary: List all event subscriptions for a topic-type in a specific location under a specified resource group. - command: | - az eventgrid event-subscription list --topic-type Microsoft.Storage.StorageAccounts --location westus2 --resource-group kalstest - - summary: List all regional event subscriptions in a specific location (under the currently selected Azure subscription). - command: | - az eventgrid event-subscription list --location westus2 - - summary: List all event subscriptions in a specific location under a specified resource group. - command: | - az eventgrid event-subscription list --location westus2 --resource-group kalstest - - summary: List all global event subscriptions (under the currently selected Azure subscription). - command: | - az eventgrid event-subscription list - - summary: List all global event subscriptions under the currently selected resource group. - command: | - az eventgrid event-subscription list --resource-group kalstest -- command: - name: eventgrid event-subscription show - summary: Get the details of an event subscription. - examples: - - summary: Show the details of an event subscription for an Event Grid topic. - command: | - az eventgrid event-subscription show -g rg1 --topic-name topic1 --name es1 - - summary: Show the details of an event subscription for a subscription. - command: | - az eventgrid event-subscription show --name es2 - - summary: Show the details of an event subscription for a resource group. - command: | - az eventgrid event-subscription show -g rg1 --name es3 - - summary: Show the details of an event subscription for a storage account. - command: | - az eventgrid event-subscription show --resource-id "/subscriptions/55f3dcd4-cac7-43b4-990b-a139d62a1eb2/resourceGroups/kalstest/providers/microsoft.storage/storageaccounts/kalsegblob" --name es3 -- group: - name: eventgrid topic-type - summary: Get details for topic types. -- command: - name: eventgrid topic-type list - summary: List registered topic types. -- command: - name: eventgrid topic-type show - summary: Get the details for a topic type. -- command: - name: eventgrid topic-type list-event-types - summary: List the event types supported by a topic type. diff --git a/src/command_modules/azure-cli-eventhubs/azure/cli/command_modules/eventhubs/help.yaml b/src/command_modules/azure-cli-eventhubs/azure/cli/command_modules/eventhubs/help.yaml deleted file mode 100644 index 23c21d36337..00000000000 --- a/src/command_modules/azure-cli-eventhubs/azure/cli/command_modules/eventhubs/help.yaml +++ /dev/null @@ -1,273 +0,0 @@ -version: 1 -content: -- group: - name: eventhubs - summary: Manage Azure Event Hubs namespaces, eventhubs, consumergroups and geo recovery configurations - Alias -- group: - name: eventhubs namespace - summary: Manage Azure Event Hubs namespace and Authorizationrule -- group: - name: eventhubs namespace authorization-rule - summary: Manage Azure Event Hubs Authorizationrule for Namespace -- group: - name: eventhubs namespace authorization-rule keys - summary: Manage Azure Event Hubs Authorizationrule connection strings for Namespace -- group: - name: eventhubs eventhub - summary: Manage Azure Event Hubs eventhub and authorization-rule -- group: - name: eventhubs eventhub authorization-rule - summary: Manage Azure Service Bus Authorizationrule for Eventhub -- group: - name: eventhubs eventhub authorization-rule keys - summary: Manage Azure Authorizationrule connection strings for Eventhub -- group: - name: eventhubs eventhub consumer-group - summary: Manage Azure Event Hubs consumergroup -- group: - name: eventhubs georecovery-alias - summary: Manage Azure Event Hubs Geo Recovery configuration Alias -- group: - name: eventhubs georecovery-alias authorization-rule - summary: Manage Azure Event Hubs Authorizationrule for Geo Recovery configuration Alias -- group: - name: eventhubs georecovery-alias authorization-rule keys - summary: Manage Azure Event Hubs Authorizationrule connection strings for Geo Recovery configuration Alias -- command: - name: eventhubs namespace exists - summary: check for the availability of the given name for the Namespace - examples: - - summary: Create a new topic. - command: az eventhubs namespace exists --name mynamespace -- command: - name: eventhubs namespace create - summary: Creates the Event Hubs Namespace - examples: - - summary: Creates a new namespace. - command: az eventhubs namespace create --resource-group myresourcegroup --name mynamespace --location westus --tags tag1=value1 tag2=value2 --sku Standard --enable-auto-inflate False --maximum-throughput-units 30 -- command: - name: eventhubs namespace update - summary: Updates the Event Hubs Namespace - examples: - - summary: Update a new namespace. - command: az eventhubs namespace update --resource-group myresourcegroup --name mynamespace --tags tag=value --enable-auto-inflate True -- command: - name: eventhubs namespace show - summary: shows the Event Hubs Namespace Details - examples: - - summary: shows the Namespace details. - command: az eventhubs namespace show --resource-group myresourcegroup --name mynamespace -- command: - name: eventhubs namespace list - summary: Lists the Event Hubs Namespaces - examples: - - summary: List the Event Hubs Namespaces by resource group. - command: az eventhubs namespace list --resource-group myresourcegroup - - summary: Get the Namespaces by Subscription. - command: az eventhubs namespace list -- command: - name: eventhubs namespace delete - summary: Deletes the Namespaces - examples: - - summary: Deletes the Namespace - command: az eventhubs namespace delete --resource-group myresourcegroup --name mynamespace -- command: - name: eventhubs namespace authorization-rule create - summary: Creates Authorizationrule for the given Namespace - examples: - - summary: Creates Authorizationrule - command: az eventhubs namespace authorization-rule create --resource-group myresourcegroup --namespace-name mynamespace --name myauthorule --rights Send Listen -- command: - name: eventhubs namespace authorization-rule update - summary: Updates Authorizationrule for the given Namespace - examples: - - summary: Updates Authorizationrule - command: az eventhubs namespace authorization-rule update --resource-group myresourcegroup --namespace-name mynamespace --name myauthorule --rights Send -- command: - name: eventhubs namespace authorization-rule show - summary: Shows the details of Authorizationrule - examples: - - summary: Shows the details of Authorizationrule - command: az eventhubs namespace authorization-rule show --resource-group myresourcegroup --namespace-name mynamespace --name myauthorule -- command: - name: eventhubs namespace authorization-rule list - summary: Shows the list of Authorizationrule by Namespace - examples: - - summary: Shows the list of Authorizationrule by Namespace - command: az eventhubs namespace authorization-rule list --resource-group myresourcegroup --namespace-name mynamespace -- command: - name: eventhubs namespace authorization-rule keys list - summary: Shows the connection strings for namespace - examples: - - summary: Shows the connection strings of Authorizationrule for the namespace. - command: az eventhubs namespace authorization-rule keys list --resource-group myresourcegroup --namespace-name mynamespace --name myauthorule -- command: - name: eventhubs namespace authorization-rule keys renew - summary: Regenerate the connection strings of Authorizationrule for the namespace. - examples: - - summary: Regenerate the connection strings of Authorizationrule for the namespace. - command: az eventhubs namespace authorization-rule keys renew --resource-group myresourcegroup --namespace-name mynamespace --name myauthorule --key PrimaryKey -- command: - name: eventhubs namespace authorization-rule delete - summary: Deletes the Authorizationrule of the namespace. - examples: - - summary: Deletes the Authorizationrule of the namespace. - command: az eventhubs namespace authorization-rule delete --resource-group myresourcegroup --namespace-name mynamespace --name myauthorule -- command: - name: eventhubs eventhub create - summary: Creates the Event Hubs Eventhub - examples: - - summary: Create a new Eventhub. - command: az eventhubs eventhub create --resource-group myresourcegroup --namespace-name mynamespace --name myeventhub --message-retention 4 --partition-count 15 -- command: - name: eventhubs eventhub update - summary: Updates the Event Hubs Eventhub - examples: - - summary: Updates a new Eventhub. - command: az eventhubs eventhub update --resource-group myresourcegroup --namespace-name mynamespace --name myeventhub --message-retention 3 --partition-count 12 -- command: - name: eventhubs eventhub show - summary: shows the Eventhub Details - examples: - - summary: Shows the Eventhub details. - command: az eventhubs eventhub show --resource-group myresourcegroup --namespace-name mynamespace --name myeventhub -- command: - name: eventhubs eventhub list - summary: List the EventHub by Namepsace - examples: - - summary: Get the Eventhubs by Namespace. - command: az eventhubs eventhub list --resource-group myresourcegroup --namespace-name mynamespace -- command: - name: eventhubs eventhub delete - summary: Deletes the Eventhub - examples: - - summary: Deletes the Eventhub - command: az eventhubs eventhub delete --resource-group myresourcegroup --namespace-name mynamespace --name myeventhub -- command: - name: eventhubs eventhub authorization-rule create - summary: Creates Authorizationrule for the given Eventhub - examples: - - summary: Creates Authorizationrule - command: az eventhubs eventhub authorization-rule create --resource-group myresourcegroup --namespace-name mynamespace --eventhub-name myeventhub --name myauthorule --rights Listen -- command: - name: eventhubs eventhub authorization-rule update - summary: Updates Authorizationrule for the given Eventhub - examples: - - summary: Updates Authorizationrule - command: az eventhubs eventhub authorization-rule update --resource-group myresourcegroup --namespace-name mynamespace --eventhub-name myeventhub --name myauthorule --rights Send -- command: - name: eventhubs eventhub authorization-rule show - summary: shows the details of Authorizationrule - examples: - - summary: shows the details of Authorizationrule - command: az eventhubs eventhub authorization-rule show --resource-group myresourcegroup --namespace-name mynamespace --eventhub-name myeventhub --name myauthorule -- command: - name: eventhubs eventhub authorization-rule list - summary: shows the list of Authorization-rules by Eventhub - examples: - - summary: shows the list of Authorization-rules by Eventhub - command: az eventhubs eventhub authorization-rule list --resource-group myresourcegroup --namespace-name mynamespace --eventhub-name myeventhub -- command: - name: eventhubs eventhub authorization-rule keys list - summary: Shows the connection strings of Authorizationrule for the Eventhub. - examples: - - summary: Shows the connection strings of Authorizationrule for the eventhub. - command: az eventhubs eventhub authorization-rule keys list --resource-group myresourcegroup --namespace-name mynamespace --eventhub-name myeventhub --name myauthorule -- command: - name: eventhubs eventhub authorization-rule keys renew - summary: Regenerate the connection strings of Authorizationrule for the namespace. - examples: - - summary: Regenerate the connection strings of Authorizationrule for the namespace. - command: az eventhubs eventhub authorization-rule keys renew --resource-group myresourcegroup --namespace-name mynamespace --eventhub-name myeventhub --name myauthorule --key PrimaryKey -- command: - name: eventhubs eventhub authorization-rule delete - summary: Deletes the Authorizationrule of Eventhub. - examples: - - summary: Deletes the Authorizationrule of Eventhub. - command: az eventhubs eventhub authorization-rule delete --resource-group myresourcegroup --namespace-name mynamespace --eventhub-name myeventhub --name myauthorule -- command: - name: eventhubs eventhub consumer-group create - summary: Creates the EventHub ConsumerGroup - examples: - - summary: Create EventHub ConsumerGroup. - command: az eventhubs eventhub consumer-group create --resource-group myresourcegroup --namespace-name mynamespace --eventhub-name myeventhub --name myconsumergroup -- command: - name: eventhubs eventhub consumer-group update - summary: Updates the EventHub ConsumerGroup - examples: - - summary: Updates a ConsumerGroup. - command: az eventhubs eventhub consumer-group update --resource-group myresourcegroup --namespace-name mynamespace --eventhub-name myeventhub --name myconsumergroup --user-metadata MyUserMetadata -- command: - name: eventhubs eventhub consumer-group show - summary: Shows the ConsumerGroup Details - examples: - - summary: Shows the ConsumerGroup details. - command: az eventhubs eventhub consumer-group show --resource-group myresourcegroup --namespace-name mynamespace --eventhub-name myeventhub --name myconsumergroup -- command: - name: eventhubs eventhub consumer-group list - summary: List the ConsumerGroup by Eventhub - examples: - - summary: List the ConsumerGroup by Eventhub. - command: az eventhubs eventhub consumer-group list --resource-group myresourcegroup --namespace-name mynamespace --eventhub-name myeventhub -- command: - name: eventhubs eventhub consumer-group delete - summary: Deletes the ConsumerGroup - examples: - - summary: Deletes the ConsumerGroup - command: az eventhubs eventhub consumer-group delete --resource-group myresourcegroup --namespace-name mynamespace --eventhub-name myeventhub --name myconsumergroup -- command: - name: eventhubs georecovery-alias exists - summary: Check the availability of Geo-Disaster Recovery Configuration Alias Name - examples: - - summary: Check the availability of Geo-Disaster Recovery Configuration Alias Name - command: az eventhubs georecovery-alias exists --resource-group myresourcegroup --namespace-name primarynamespace --alias myaliasname -- command: - name: eventhubs georecovery-alias set - summary: Sets a Geo-Disaster Recovery Configuration Alias for the give Namespace - examples: - - summary: Sets Geo-Disaster Recovery Configuration Alias for the give Namespace - command: az eventhubs georecovery-alias set --resource-group myresourcegroup --namespace-name primarynamespace --alias myaliasname --partner-namespace resourcearmid -- command: - name: eventhubs georecovery-alias show - summary: shows properties of Geo-Disaster Recovery Configuration Alias for Primay or Secondary Namespace - examples: - - summary: Shows properties of Geo-Disaster Recovery Configuration Alias of the Primary Namespace - command: az eventhubs georecovery-alias show --resource-group myresourcegroup --namespace-name primarynamespace --alias myaliasname - - summary: Shows properties of Geo-Disaster Recovery Configuration Alias of the Secondary Namespace - command: az eventhubs georecovery-alias show --resource-group myresourcegroup --namespace-name secondarynamespace --alias myaliasname -- command: - name: eventhubs georecovery-alias authorization-rule show - summary: Show properties of Event Hubs Geo-Disaster Recovery Configuration Alias and Namespace Authorizationrule - examples: - - summary: Show properties Authorizationrule by Event Hubs Namespace - command: az eventhubs georecovery-alias authorization-rule show --resource-group myresourcegroup --namespace-name mynamespace -- command: - name: eventhubs georecovery-alias authorization-rule list - summary: List of Authorizationrule by Event Hubs Namespace - examples: - - summary: List of Authorizationrule by Event Hubs Namespace - command: az eventhubs georecovery-alias authorization-rule list --resource-group myresourcegroup --namespace-name mynamespace --alias myaliasname -- command: - name: eventhubs georecovery-alias authorization-rule keys list - summary: Shows the keys and connection strings of Authorizationrule for the Event Hubs Namespace - examples: - - summary: Shows the keys and connection strings of Authorizationrule for the namespace. - command: az eventhubs georecovery-alias authorization-rule keys list --resource-group myresourcegroup --namespace-name mynamespace --name myauthorule --alias myaliasname -- command: - name: eventhubs georecovery-alias break-pair - summary: Disables Geo-Disaster Recovery Configuration Alias and stops replicating changes from primary to secondary namespaces - examples: - - summary: Disables Geo-Disaster Recovery Configuration Alias and stops replicating changes from primary to secondary namespaces - command: az eventhubs georecovery-alias break-pair --resource-group myresourcegroup --namespace-name primarynamespace --alias myaliasname -- command: - name: eventhubs georecovery-alias fail-over - summary: Invokes Geo-Disaster Recovery Configuration Alias to point to the secondary namespace - examples: - - summary: Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace - command: az eventhubs georecovery-alias fail-over --resource-group myresourcegroup --namespace-name secondarynamespace --alias myaliasname -- command: - name: eventhubs georecovery-alias delete - summary: Delete Geo-Disaster Recovery Configuration Alias - examples: - - summary: Delete Geo-Disaster Recovery Configuration Alias - command: az eventhubs georecovery-alias delete --resource-group myresourcegroup --namespace-name secondarynamespace --alias myaliasname diff --git a/src/command_modules/azure-cli-extension/azure/cli/command_modules/extension/help.yaml b/src/command_modules/azure-cli-extension/azure/cli/command_modules/extension/help.yaml deleted file mode 100644 index 8f58ff3b007..00000000000 --- a/src/command_modules/azure-cli-extension/azure/cli/command_modules/extension/help.yaml +++ /dev/null @@ -1,42 +0,0 @@ -version: 1 -content: -- group: - name: extension - summary: Manage and update CLI extensions. -- command: - name: extension add - summary: Add an extension. - examples: - - summary: Add extension by name - command: az extension add --name anextension - - summary: Add extension from URL - command: az extension add --source https://contoso.com/anextension-0.0.1-py2.py3-none-any.whl - - summary: Add extension from local disk - command: az extension add --source ~/anextension-0.0.1-py2.py3-none-any.whl - - summary: Add extension from local disk and use pip proxy for dependencies - command: az extension add --source ~/anextension-0.0.1-py2.py3-none-any.whl --pip-proxy https://user:pass@proxy.server:8080 -- command: - name: extension list - summary: List the installed extensions. -- command: - name: extension list-available - summary: List publicly available extensions. - examples: - - summary: List all publicly available extensions - command: az extension list-available - - summary: List details on a particular extension - command: az extension list-available --show-details --query anextension -- command: - name: extension show - summary: Show an extension. -- command: - name: extension remove - summary: Remove an extension. -- command: - name: extension update - summary: Update an extension. - examples: - - summary: Update an extension by name - command: az extension update --name anextension - - summary: Update an extension by name and use pip proxy for dependencies - command: az extension update --name anextension --pip-proxy https://user:pass@proxy.server:8080 diff --git a/src/command_modules/azure-cli-feedback/azure/cli/command_modules/feedback/help.yaml b/src/command_modules/azure-cli-feedback/azure/cli/command_modules/feedback/help.yaml deleted file mode 100644 index 49f0c1a7101..00000000000 --- a/src/command_modules/azure-cli-feedback/azure/cli/command_modules/feedback/help.yaml +++ /dev/null @@ -1,5 +0,0 @@ -version: 1 -content: -- command: - name: feedback - summary: Send feedback to the Azure CLI Team! diff --git a/src/command_modules/azure-cli-find/azure/cli/command_modules/find/help.yaml b/src/command_modules/azure-cli-find/azure/cli/command_modules/find/help.yaml deleted file mode 100644 index 6574f32d077..00000000000 --- a/src/command_modules/azure-cli-find/azure/cli/command_modules/find/help.yaml +++ /dev/null @@ -1,9 +0,0 @@ -version: 1 -content: -- command: - name: find - summary: Find Azure CLI commands. - examples: - - summary: Search for commands containing 'vm' or 'secret' - command: > - az find -q vm secret diff --git a/src/command_modules/azure-cli-hdinsight/azure/cli/command_modules/hdinsight/help.yaml b/src/command_modules/azure-cli-hdinsight/azure/cli/command_modules/hdinsight/help.yaml deleted file mode 100644 index 720f7ea165b..00000000000 --- a/src/command_modules/azure-cli-hdinsight/azure/cli/command_modules/hdinsight/help.yaml +++ /dev/null @@ -1,88 +0,0 @@ -version: 1 -content: -- group: - name: hdinsight - summary: Manage HDInsight resources. -- command: - name: hdinsight create - summary: Creates a new cluster. - examples: - - summary: Create a cluster with an existing storage account. - command: |- - az hdinsight create -t spark -g MyResourceGroup -n MyCluster \ - -p "HttpPassword1234!" \ - --storage-account MyStorageAccount - - summary: Create a cluster with Enterprise Security Package. - command: |- - az hdinsight create -t spark -g MyResourceGroup -n MyCluster \ - -p "HttpPassword1234!" \ - --storage-account MyStorageAccount \ - --subnet "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyRG/providers/Microsoft.Network/virtualNetworks/MyVnet/subnets/subnet1" \ - --domain "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyRG/providers/Microsoft.AAD/domainServices/MyDomain.onmicrosoft.com" \ - --assign-identity "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/MyMsiRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/MyMSI" \ - --cluster-admin-account MyAdminAccount@MyDomain.onmicrosoft.com - - summary: Create a Kafka cluster with disk encryption. See https://docs.microsoft.com/en-us/azure/hdinsight/kafka/apache-kafka-byok. - command: |- - az hdinsight create -t kafka -g MyResourceGroup -n MyCluster \ - -p "HttpPassword1234!" --workernode-data-disks-per-node 2 \ - --storage-account MyStorageAccount \ - --encryption-key-name kafkaClusterKey \ - --encryption-key-version 00000000000000000000000000000000 \ - --encryption-vault-uri https://MyKeyVault.vault.azure.net \ - --assign-identity MyMSI -- command: - name: hdinsight list - summary: List clusters in the resource group or subscription. -- command: - name: hdinsight wait - summary: Place the CLI in a waiting state until an operation is complete. -- command: - name: hdinsight rotate-disk-encryption-key - summary: Rotate disk encryption key of the specified HDInsight cluster. -- group: - name: hdinsight application - summary: Manage HDInsight applications. -- command: - name: hdinsight application create - summary: Create an application for a HDInsight cluster. - examples: - - summary: Create an application with a script URI. - command: |- - az hdinsight application create -g MyResourceGroup -n MyCluster \ - --application-name MyApplication \ - --script-uri https://path/to/install/script.sh \ - --script-action-name MyScriptAction \ - --script-parameters '"-option value"' - - summary: Create an application with a script URI and specified edge node size. - command: |- - az hdinsight application create -g MyResourceGroup -n MyCluster \ - --application-name MyApplication \ - --script-uri https://path/to/install/script.sh \ - --script-action-name MyScriptAction \ - --script-parameters '"-option value"' \ - --edgenode-size Standard_D4_v2 -- command: - name: hdinsight application wait - summary: Place the CLI in a waiting state until an operation is complete. -- group: - name: hdinsight oms - summary: Manage HDInsight Operations Management Suite (OMS). -- command: - name: hdinsight oms enable - summary: Enables the Operations Management Suite (OMS) on the HDInsight cluster. -- group: - name: hdinsight script-action - summary: Manage HDInsight script actions. -- command: - name: hdinsight script-action execute - summary: Executes script actions on the specified HDInsight cluster. -- command: - name: hdinsight script-action list - summary: Lists script actions for the specified cluster. - examples: - - summary: Lists all the persisted script actions for the specified cluster. - command: |- - az hdinsight script-action list -n MyCluster -g MyResourceGroup --persisted - - summary: Lists all scripts' execution history for the specified cluster. - command: |- - az hdinsight script-action list -n MyCluster -g MyResourceGroup diff --git a/src/command_modules/azure-cli-iot/azure/cli/command_modules/iot/help.yaml b/src/command_modules/azure-cli-iot/azure/cli/command_modules/iot/help.yaml deleted file mode 100644 index f11d0d97222..00000000000 --- a/src/command_modules/azure-cli-iot/azure/cli/command_modules/iot/help.yaml +++ /dev/null @@ -1,522 +0,0 @@ -version: 1 -content: -- group: - name: iot - summary: Manage Internet of Things (IoT) assets. - description: Comprehensive IoT data-plane functionality is available in the Azure IoT CLI Extension. For more info and install guide go to https://github.com/Azure/azure-iot-cli-extension -- group: - name: iot hub - summary: Manage Azure IoT hubs. -- group: - name: iot dps - summary: Manage Azure IoT Hub Device Provisioning Service. -- command: - name: iot dps create - summary: Create an Azure IoT Hub device provisioning service. - description: For an introduction to Azure IoT Hub Device Provisioning Service, see https://docs.microsoft.com/en-us/azure/iot-dps/about-iot-dps - examples: - - summary: Create an Azure IoT Hub device provisioning service with the standard pricing tier S1, in the region of the resource group. - command: > - az iot dps create --name MyDps --resource-group MyResourceGroup - - summary: Create an Azure IoT Hub device provisioning service with the standard pricing tier S1, in the 'eastus' region. - command: > - az iot dps create --name MyDps --resource-group MyResourceGroup --location eastus -- command: - name: iot dps list - summary: List Azure IoT Hub device provisioning services. - examples: - - summary: List all Azure IoT Hub device provisioning services in a subscription. - command: > - az iot dps list - - summary: List all Azure IoT Hub device provisioning services in the resource group 'MyResourceGroup' - command: > - az iot dps list --resource-group MyResourceGroup -- command: - name: iot dps show - summary: Get the details of an Azure IoT Hub device provisioning service. - examples: - - summary: Show details of an Azure IoT Hub device provisioning service 'MyDps' - command: > - az iot dps show --name MyDps --resource-group MyResourceGroup -- command: - name: iot dps delete - summary: Delete an Azure IoT Hub device provisioning service. - examples: - - summary: Delete an Azure IoT Hub device provisioning service 'MyDps' - command: > - az iot dps delete --name MyDps --resource-group MyResourceGroup -- command: - name: iot dps update - summary: Update an Azure IoT Hub device provisioning service. - examples: - - summary: Update Allocation Policy to 'GeoLatency' of an Azure IoT Hub device provisioning service 'MyDps' - command: > - az iot dps update --name MyDps --resource-group MyResourceGroup --set properties.allocationPolicy="GeoLatency" -- group: - name: iot dps access-policy - summary: Manage Azure IoT Hub Device Provisioning Service access policies. -- command: - name: iot dps access-policy create - summary: Create a new shared access policy in an Azure IoT Hub device provisioning service. - examples: - - summary: Create a new shared access policy in an Azure IoT Hub device provisioning service with EnrollmentRead right - command: > - az iot dps access-policy create --dps-name MyDps --resource-group MyResourceGroup --name MyPolicy --rights EnrollmentRead -- command: - name: iot dps access-policy update - summary: Update a shared access policy in an Azure IoT Hub device provisioning service. - examples: - - summary: Update access policy 'MyPolicy' in an Azure IoT Hub device provisioning service with EnrollmentWrite right - command: > - az iot dps access-policy update --dps-name MyDps --resource-group MyResourceGroup --name MyPolicy --rights EnrollmentWrite -- command: - name: iot dps access-policy list - summary: List all shared access policies in an Azure IoT Hub device provisioning service. - examples: - - summary: List all shared access policies in MyDps - command: > - az iot dps access-policy list --dps-name MyDps --resource-group MyResourceGroup -- command: - name: iot dps access-policy show - summary: Show details of a shared access policies in an Azure IoT Hub device provisioning service. - examples: - - summary: Show details of shared access policy 'MyPolicy' in an Azure IoT Hub device provisioning service - command: > - az iot dps access-policy show --dps-name MyDps --resource-group MyResourceGroup --name MyPolicy -- command: - name: iot dps access-policy delete - summary: Delete a shared access policies in an Azure IoT Hub device provisioning service. - examples: - - summary: Delete shared access policy 'MyPolicy' in an Azure IoT Hub device provisioning service - command: > - az iot dps access-policy delete --dps-name MyDps --resource-group MyResourceGroup --name MyPolicy -- group: - name: iot dps linked-hub - summary: Manage Azure IoT Hub Device Provisioning Service linked IoT hubs. -- command: - name: iot dps linked-hub create - summary: Create a linked IoT hub in an Azure IoT Hub device provisioning service. - examples: - - summary: Create a linked IoT hub in an Azure IoT Hub device provisioning service - command: > - az iot dps linked-hub create --dps-name MyDps --resource-group MyResourceGroup --connection-string - HostName=test.azure-devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=XNBhoasdfhqRlgGnasdfhivtshcwh4bJwe7c0RIGuWsirW0= - --location westus - - summary: Create a linked IoT hub in an Azure IoT Hub device provisioning service which applies allocation weight and weight being 10 - command: > - az iot dps linked-hub create --dps-name MyDps --resource-group MyResourceGroup --connection-string - HostName=test.azure-devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=XNBhoasdfhqRlgGnasdfhivtshcwh4bJwe7c0RIGuWsirW0= - --location westus --allocation-weight 10 --apply-allocation-policy True -- command: - name: iot dps linked-hub update - summary: Update a linked IoT hub in an Azure IoT Hub device provisioning service. - examples: - - summary: Update linked IoT hub 'MyLinkedHub.azure-devices.net' in an Azure IoT Hub device provisioning service - command: > - az iot dps linked-hub update --dps-name MyDps --resource-group MyResourceGroup --linked-hub MyLinkedHub.azure-devices.net - --allocation-weight 10 --apply-allocation-policy True -- command: - name: iot dps linked-hub list - summary: List all linked IoT hubs in an Azure IoT Hub device provisioning service. - examples: - - summary: List all linked IoT hubs in MyDps - command: > - az iot dps linked-hub list --dps-name MyDps --resource-group MyResourceGroup -- command: - name: iot dps linked-hub show - summary: Show details of a linked IoT hub in an Azure IoT Hub device provisioning service. - examples: - - summary: Show details of linked IoT hub 'MyLinkedHub' in an Azure IoT Hub device provisioning service - command: > - az iot dps linked-hub show --dps-name MyDps --resource-group MyResourceGroup --linked-hub MyLinkedHub -- command: - name: iot dps linked-hub delete - summary: Update a linked IoT hub in an Azure IoT Hub device provisioning service. - examples: - - summary: Delete linked IoT hub 'MyLinkedHub' in an Azure IoT Hub device provisioning service - command: > - az iot dps linked-hub delete --dps-name MyDps --resource-group MyResourceGroup --linked-hub MyLinkedHub -- group: - name: iot dps certificate - summary: Manage Azure IoT Hub Device Provisioning Service certificates. -- command: - name: iot dps certificate create - summary: Create/upload an Azure IoT Hub Device Provisioning Service certificate. - examples: - - summary: Upload a CA certificate PEM file to an Azure IoT Hub device provisioning service. - command: > - az iot dps certificate create --dps-name MyDps --resource-group MyResourceGroup --name MyCertificate --path /certificates/Certificate.pem - - summary: Upload a CA certificate CER file to an Azure IoT Hub device provisioning service. - command: > - az iot dps certificate create --dps-name MyDps --resource-group MyResourceGroup --name MyCertificate --path /certificates/Certificate.cer -- command: - name: iot dps certificate update - summary: Update an Azure IoT Hub Device Provisioning Service certificate. - description: Upload a new certificate to replace the existing certificate with the same name. - examples: - - summary: Update a CA certificate in an Azure IoT Hub device provisioning service by uploading a new PEM file. - command: > - az iot dps certificate update --dps-name MyDps --resource-group MyResourceGroup --name MyCertificate - --path /certificates/NewCertificate.pem --etag AAAAAAAAAAA= - - summary: Update a CA certificate in an Azure IoT Hub device provisioning service by uploading a new CER file. - command: > - az iot dps certificate update --dps-name MyDps --resource-group MyResourceGroup --name MyCertificate - --path /certificates/NewCertificate.cer --etag AAAAAAAAAAA= -- command: - name: iot dps certificate delete - summary: Delete an Azure IoT Hub Device Provisioning Service certificate. - examples: - - summary: Delete MyCertificate in an Azure IoT Hub device provisioning service - command: > - az iot dps certificate delete --dps-name MyDps --resource-group MyResourceGroup --name MyCertificate --etag AAAAAAAAAAA= -- command: - name: iot dps certificate show - summary: Show information about a particular Azure IoT Hub Device Provisioning Service certificate. - examples: - - summary: Show details about MyCertificate in an Azure IoT Hub device provisioning service - command: > - az iot dps certificate show --dps-name MyDps --resource-group MyResourceGroup --name MyCertificate -- command: - name: iot dps certificate list - summary: List all certificates contained within an Azure IoT Hub device provisioning service - examples: - - summary: List all certificates in MyDps - command: > - az iot dps certificate list --dps-name MyDps --resource-group MyResourceGroup -- command: - name: iot dps certificate generate-verification-code - summary: Generate a verification code for an Azure IoT Hub Device Provisioning Service certificate. - description: This verification code is used to complete the proof of possession step for a certificate. Use this verification code as the CN of a new certificate signed with the root certificates private key. - examples: - - summary: Generate a verification code for MyCertificate - command: > - az iot dps certificate generate-verification-code --dps-name MyDps --resource-group MyResourceGroup --name MyCertificate - --etag AAAAAAAAAAA= -- command: - name: iot dps certificate verify - summary: Verify an Azure IoT Hub Device Provisioning Service certificate. - description: Verify a certificate by uploading a verification certificate containing the verification code obtained by calling generate-verification-code. This is the last step in the proof of possession process. - examples: - - summary: Verify ownership of the MyCertificate private key. - command: > - az iot dps certificate verify --dps-name MyDps --resource-group MyResourceGroup --name MyCertificate - --path /certificates/Verification.pem --etag AAAAAAAAAAA= -- group: - name: iot hub certificate - summary: Manage IoT Hub certificates. -- command: - name: iot hub certificate create - summary: Create/upload an Azure IoT Hub certificate. - description: For a detailed explanation of CA certificates in Azure IoT Hub, see https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-x509ca-overview - examples: - - summary: Uploads a CA certificate PEM file to an IoT hub. - command: > - az iot hub certificate create --hub-name MyIotHub --name MyCertificate --path /certificates/Certificate.pem - - summary: Uploads a CA certificate CER file to an IoT hub. - command: > - az iot hub certificate create --hub-name MyIotHub --name MyCertificate --path /certificates/Certificate.cer -- command: - name: iot hub certificate update - summary: Update an Azure IoT Hub certificate. - description: Uploads a new certificate to replace the existing certificate with the same name. For a detailed explanation of CA certificates in Azure IoT Hub, see https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-x509ca-overview - examples: - - summary: Updates a CA certificate in an IoT hub by uploading a new PEM file. - command: > - az iot hub certificate update --hub-name MyIotHub --name MyCertificate --path /certificates/NewCertificate.pem --etag - AAAAAAAAAAA= - - summary: Updates a CA certificate in an IoT hub by uploading a new CER file. - command: > - az iot hub certificate update --hub-name MyIotHub --name MyCertificate --path /certificates/NewCertificate.cer --etag - AAAAAAAAAAA= -- command: - name: iot hub certificate delete - summary: Deletes an Azure IoT Hub certificate. - description: For a detailed explanation of CA certificates in Azure IoT Hub, see https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-x509ca-overview - examples: - - summary: Deletes MyCertificate - command: > - az iot hub certificate delete --hub-name MyIotHub --name MyCertificate --etag AAAAAAAAAAA= -- command: - name: iot hub certificate show - summary: Shows information about a particular Azure IoT Hub certificate. - description: For a detailed explanation of CA certificates in Azure IoT Hub, see https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-x509ca-overview - examples: - - summary: Show details about MyCertificate - command: > - az iot hub certificate show --hub-name MyIotHub --name MyCertificate -- command: - name: iot hub certificate list - summary: Lists all certificates contained within an Azure IoT Hub - description: For a detailed explanation of CA certificates in Azure IoT Hub, see https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-x509ca-overview - examples: - - summary: List all certificates in MyIotHub - command: > - az iot hub certificate list --hub-name MyIotHub -- command: - name: iot hub certificate generate-verification-code - summary: Generates a verification code for an Azure IoT Hub certificate. - description: This verification code is used to complete the proof of possession step for a certificate. Use this verification code as the CN of a new certificate signed with the root certificates private key. For a detailed explanation of CA certificates in Azure IoT Hub, see https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-x509ca-overview - examples: - - summary: Generates a verification code for MyCertificate - command: > - az iot hub certificate generate-verification-code --hub-name MyIotHub --name MyCertificate --etag - AAAAAAAAAAA= -- command: - name: iot hub certificate verify - summary: Verifies an Azure IoT Hub certificate. - description: Verifies a certificate by uploading a verification certificate containing the verification code obtained by calling generate-verification-code. This is the last step in the proof of possession process. For a detailed explanation of CA certificates in Azure IoT Hub, see https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-x509ca-overview - examples: - - summary: Verifies ownership of the MyCertificate private key. - command: > - az iot hub certificate verify --hub-name MyIotHub --name MyCertificate --path /certificates/Verification.pem --etag - AAAAAAAAAAA= -- command: - name: iot hub create - summary: Create an Azure IoT hub. - description: For an introduction to Azure IoT Hub, see https://docs.microsoft.com/azure/iot-hub/ - examples: - - summary: Create an IoT Hub with the free pricing tier F1, in the region of the resource group. - command: > - az iot hub create --resource-group MyResourceGroup --name MyIotHub - - summary: Create an IoT Hub with the standard pricing tier S1 and 4 partitions, in the 'westus' region. - command: > - az iot hub create --resource-group MyResourceGroup --name MyIotHub --sku S1 --location westus - --partition-count 4 -- command: - name: iot hub show - summary: Get the details of an IoT hub. -- command: - name: iot hub update - summary: Update metadata for an IoT hub. - examples: - - summary: Add a firewall filter rule to accept traffic from the IP mask 127.0.0.0/31. - command: > - az iot hub update --name MyIotHub --add properties.ipFilterRules filter_name=test-rule action=Accept ip_mask=127.0.0.0/31 -- command: - name: iot hub list - summary: List IoT hubs. - examples: - - summary: List all IoT hubs in a subscription. - command: > - az iot hub list - - summary: List all IoT hubs in the resource group 'MyGroup' - command: > - az iot hub list --resource-group MyGroup -- command: - name: iot hub show-connection-string - summary: Show the connection strings for an IoT hub. - examples: - - summary: Show the connection string of an IoT hub using default policy and primary key. - command: > - az iot hub show-connection-string --name MyIotHub - - summary: Show the connection string of an IoT Hub using policy 'service' and secondary key. - command: > - az iot hub show-connection-string --name MyIotHub --policy-name service --key secondary - - summary: Show the connection strings for all IoT hubs in a resource group. - command: > - az iot hub show-connection-string --resource-group MyResourceGroup - - summary: Show the connection strings for all IoT hubs in a subscription. - command: > - az iot hub show-connection-string -- command: - name: iot hub delete - summary: Delete an IoT hub. -- group: - name: iot hub consumer-group - summary: Manage the event hub consumer groups of an IoT hub. -- command: - name: iot hub consumer-group create - summary: Create an event hub consumer group. - examples: - - summary: Create a consumer group 'cg1' in the default event hub endpoint. - command: > - az iot hub consumer-group create --hub-name MyIotHub --name cg1 - - summary: Create a consumer group `cg1` in the operation monitoring event hub endpoint `operationsMonitoringEvents`. - command: > - az iot hub consumer-group create --hub-name MyIotHub --event-hub-name operationsMonitoringEvents --name cg1 -- command: - name: iot hub consumer-group list - summary: List event hub consumer groups. -- command: - name: iot hub consumer-group show - summary: Get the details for an event hub consumer group. -- command: - name: iot hub consumer-group delete - summary: Delete an event hub consumer group. -- group: - name: iot hub policy - summary: Manage shared access policies of an IoT hub. -- command: - name: iot hub policy list - summary: List shared access policies of an IoT hub. -- command: - name: iot hub policy show - summary: Get the details of a shared access policy of an IoT hub. -- command: - name: iot hub policy create - summary: Create a new shared access policy in an IoT hub. - examples: - - summary: Create a new shared access policy. - command: > - az iot hub policy create --hub-name MyIotHub --name new-policy --permissions RegistryWrite ServiceConnect DeviceConnect -- command: - name: iot hub policy delete - summary: Delete a shared access policy from an IoT hub. -- command: - name: iot hub list-skus - summary: List available pricing tiers. -- group: - name: iot hub job - summary: Manage jobs in an IoT hub. -- command: - name: iot hub job list - summary: List the jobs in an IoT hub. -- command: - name: iot hub job show - summary: Get the details of a job in an IoT hub. -- command: - name: iot hub job cancel - summary: Cancel a job in an IoT hub. -- command: - name: iot hub show-quota-metrics - summary: Get the quota metrics for an IoT hub. -- command: - name: iot hub show-stats - summary: Get the statistics for an IoT hub. -- group: - name: iot hub routing-endpoint - summary: Manage custom endpoints of an IoT hub. -- command: - name: iot hub routing-endpoint create - summary: Add an endpoint to your IoT Hub. - description: Create a new custom endpoint in your IoT Hub. - examples: - - summary: Add a new endpoint "E2" of type EventHub to "MyIotHub" IoT Hub. - command: > - az iot hub routing-endpoint create --resource-group MyResourceGroup --hub-name MyIotHub - --endpoint-name E2 --endpoint-type eventhub --endpoint-resource-group {ResourceGroup} - --endpoint-subscription-id {SubscriptionId} --connection-string {ConnectionString} - - summary: Add a new endpoint "S1" of type AzureStorageContainer to "MyIotHub" IoT Hub. - command: | - az iot hub routing-endpoint create --resource-group MyResourceGroup --hub-name MyIotHub \ - --endpoint-name S1 --endpoint-type azurestoragecontainer --endpoint-resource-group "[Resource Group]" \ - --endpoint-subscription-id {SubscriptionId} --connection-string {ConnectionString} \ - --container-name {ContainerName} -- command: - name: iot hub routing-endpoint list - summary: Get information on all the endpoints for your IoT Hub. - description: Get information on all endpoints in your IoT Hub. You can also specify which endpoint type you want to get informaiton on. - examples: - - summary: Get all the endpoints from "MyIotHub" IoT Hub. - command: > - az iot hub routing-endpoint list -g MyResourceGroup --hub-name MyIotHub - - summary: Get all the endpoints of type "EventHub" from "MyIotHub" IoT Hub. - command: > - az iot hub routing-endpoint list -g MyResourceGroup --hub-name MyIotHub - --endpoint-type eventhub -- command: - name: iot hub routing-endpoint show - summary: Get information on mentioned endpoint for your IoT Hub. - description: Get information on a specific endpoint in your IoT Hub - examples: - - summary: Get an endpoint information from "MyIotHub" IoT Hub. - command: | - az iot hub routing-endpoint show --resource-group MyResourceGroup --hub-name MyIotHub \ - --endpoint-name {endpointName} -- command: - name: iot hub routing-endpoint delete - summary: Delete all or mentioned endpoint for your IoT Hub. - description: Delete an endpoint for your IoT Hub. We recommend that you delete any routes to the endpoint, before deleting the endpoint. - examples: - - summary: Delete endpoint "E2" from "MyIotHub" IoT Hub. - command: > - az iot hub routing-endpoint delete --resource-group MyResourceGroup --hub-name MyIotHub - --endpoint-name E2 - - summary: Delete all the endpoints of type "EventHub" from "MyIotHub" IoT Hub. - command: > - az iot hub routing-endpoint delete --resource-group MyResourceGroup --hub-name MyIotHub - --endpoint-type eventhub - - summary: Delete all the endpoints from "MyIotHub" IoT Hub. - command: > - az iot hub routing-endpoint delete --resource-group MyResourceGroup --hub-name MyIotHub -- group: - name: iot hub route - summary: Manage routes of an IoT hub. -- command: - name: iot hub route create - summary: Create a route in IoT Hub. - description: Create a route to send specific data source and condition to a desired endpoint. - examples: - - summary: Create a new route "R1". - command: > - az iot hub route create -g MyResourceGroup --hub-name MyIotHub - --endpoint-name E2 --source-type DeviceMessages --route-name R1 - - summary: Create a new route "R1" with all parameters. - command: > - az iot hub route create -g MyResourceGroup --hub-name MyIotHub - --endpoint-name E2 --source-type DeviceMessages --route-name R1 - --condition true --enabled true -- command: - name: iot hub route list - summary: Get all the routes in IoT Hub. - description: Get information on all routes from an IoT Hub. - examples: - - summary: Get all route from "MyIotHub" IoT Hub. - command: > - az iot hub route list -g MyResourceGroup --hub-name MyIotHub - - summary: Get all the routes of source type "DeviceMessages" from "MyIotHub" IoT Hub. - command: > - az iot hub route list -g MyResourceGroup --hub-name MyIotHub --source-type DeviceMessages -- command: - name: iot hub route show - summary: Get information about the route in IoT Hub. - description: Get information on a specific route in your IoT Hub. - examples: - - summary: Get an route information from "MyIotHub" IoT Hub. - command: > - az iot hub route show -g MyResourceGroup --hub-name MyIotHub --route-name {routeName} -- command: - name: iot hub route delete - summary: Delete all or mentioned route for your IoT Hub. - description: Delete a route or all routes for your IoT Hub. - examples: - - summary: Delete route "R1" from "MyIotHub" IoT Hub. - command: > - az iot hub route delete -g MyResourceGroup --hub-name MyIotHub --route-name R1 - - summary: Delete all the routes of source type "DeviceMessages" from "MyIotHub" IoT Hub. - command: > - az iot hub route delete -g MyResourceGroup --hub-name MyIotHub --source-type DeviceMessages - - summary: Delete all the routes from "MyIotHub" IoT Hub. - command: > - az iot hub route delete -g MyResourceGroup --hub-name MyIotHub -- command: - name: iot hub route test - summary: Test all routes or mentioned route in IoT Hub. - description: Test all existing routes or mentioned route in your IoT Hub. You can provide a sample message to test your routes. - examples: - - summary: Test the route "R1" from "MyIotHub" IoT Hub. - command: > - az iot hub route test -g MyResourceGroup --hub-name MyIotHub --route-name R1 - - summary: Test all the route of source type "DeviceMessages" from "MyIotHub" IoT Hub. - command: > - az iot hub route test -g MyResourceGroup --hub-name MyIotHub --source-type DeviceMessages -- command: - name: iot hub route update - summary: Update a route in IoT Hub. - description: Updates a route in IoT Hub. You can change the source, enpoint or query on the route. - examples: - - summary: Update source type of route "R1" from "MyIotHub" IoT Hub. - command: > - az iot hub route update -g MyResourceGroup --hub-name MyIotHub - --source-type DeviceMessages --route-name R1 -- group: - name: iot hub devicestream - summary: Manage device streams of an IoT hub. -- command: - name: iot hub devicestream show - summary: Get IoT Hub's device streams endpoints. - description: Get IoT Hub's device streams endpoints. - examples: - - summary: Get all the device streams from "MyIotHub" IoT Hub. - command: > - az iot hub devicestream show -n MyIotHub diff --git a/src/command_modules/azure-cli-iotcentral/azure/cli/command_modules/iotcentral/help.yaml b/src/command_modules/azure-cli-iotcentral/azure/cli/command_modules/iotcentral/help.yaml deleted file mode 100644 index 088423cfab1..00000000000 --- a/src/command_modules/azure-cli-iotcentral/azure/cli/command_modules/iotcentral/help.yaml +++ /dev/null @@ -1,46 +0,0 @@ -version: 1 -content: -- group: - name: iotcentral - summary: Manage IoT Central assets. -- group: - name: iotcentral app - summary: Manage IoT Central applications. -- command: - name: iotcentral app create - summary: Create an IoT Central application. - description: | - For an introduction to IoT Central, see https://docs.microsoft.com/en-us/azure/iot-central/. - The F1 Sku is no longer supported. Please use the S1 Sku (default) for app creation. - For more pricing information, please visit https://azure.microsoft.com/en-us/pricing/details/iot-central/. - examples: - - summary: Create an IoT Central application in the standard pricing tier S1, in the region of the resource group. - command: > - az iotcentral app create --resource-group MyResourceGroup --name my-app-resource --subdomain my-app-subdomain - - summary: Create an IoT Central application with the standard pricing tier S1 in the 'westus' region, with a custom display name, based on the iotc-default template. - command: > - az iotcentral app create --resource-group MyResourceGroup --name my-app-resource-name --sku S1 --location westus - --subdomain my-app-subdomain --template iotc-default@1.0.0 --display-name 'My Custom Display Name' -- command: - name: iotcentral app show - summary: Get the details of an IoT Central application. - examples: - - summary: Show an IoT Central application. - command: > - az iotcentral app show --name MyApp -- command: - name: iotcentral app update - summary: Update metadata for an IoT Central application. -- command: - name: iotcentral app list - summary: List IoT Central applications. - examples: - - summary: List all IoT Central applications in a subscription. - command: > - az iotcentral app list - - summary: List all IoT Central applications in the resource group 'MyGroup' - command: > - az iotcentral app list --resource-group MyGroup -- command: - name: iotcentral app delete - summary: Delete an IoT Central application. diff --git a/src/command_modules/azure-cli-keyvault/azure/cli/command_modules/keyvault/help.yaml b/src/command_modules/azure-cli-keyvault/azure/cli/command_modules/keyvault/help.yaml deleted file mode 100644 index d307c8cba6b..00000000000 --- a/src/command_modules/azure-cli-keyvault/azure/cli/command_modules/keyvault/help.yaml +++ /dev/null @@ -1,156 +0,0 @@ -version: 1 -content: -- group: - name: keyvault - summary: Manage KeyVault keys, secrets, and certificates. -- command: - name: keyvault create - summary: Create a key vault. - description: Default permissions are created for the current user or service principal unless the `--no-self-perms` flag is specified. -- command: - name: keyvault delete - summary: Delete a key vault. -- command: - name: keyvault list - summary: List key vaults. -- command: - name: keyvault show - summary: Show details of a key vault. -- command: - name: keyvault update - summary: Update the properties of a key vault. -- command: - name: keyvault recover - summary: Recover a key vault. - description: Recovers a previously deleted key vault for which soft delete was enabled. -- group: - name: keyvault key - summary: Manage keys. -- group: - name: keyvault secret - summary: Manage secrets. -- group: - name: keyvault certificate - summary: Manage certificates. -- group: - name: keyvault storage - summary: Manage storage accounts. -- command: - name: keyvault storage add - examples: - - summary: Create a storage account and setup a vault to manage its keys - command: | - $id = az storage account create -g resourcegroup -n storageacct --query id - - # assign the Azure Key Vault service the "Storage Account Key Operator Service Role" role. - az role assignment create --role "Storage Account Key Operator Service Role" --scope $id \ - --assignee cfa8b339-82a2-471a-a3c9-0fc0be7a4093 - - az keyvault storage add --vault-name vault -n storageacct --active-key-name key1 \ - --auto-regenerate-key --regeneration-period P90D --resource-id $id -- group: - name: keyvault storage sas-definition - summary: Manage storage account SAS definitions. -- command: - name: keyvault storage sas-definition create - examples: - - summary: Add a sas-definition for an account sas-token - command: |2 - - $sastoken = az storage account generate-sas --expiry 2020-01-01 --permissions rw \ - --resource-types sco --services bfqt --https-only --account-name storageacct \ - --account-key 00000000 - - az keyvault storage sas-definition create --vault-name vault --account-name storageacct \ - -n rwallserviceaccess --validity-period P2D --sas-type account --template-uri $sastoken - - summary: Add a sas-definition for a blob sas-token - command: >2 - - $sastoken = az storage blob generate-sas --account-name storageacct --account-key 00000000 \ - -c container1 -n blob1 --https-only --permissions rw - - $url = az storage blob url --account-name storageacct -c container1 -n blob1 - - - az keyvault storage sas-definition create --vault-name vault --account-name storageacct \ - -n rwblobaccess --validity-period P2D --sas-type service --template-uri $url?$sastoken -- group: - name: keyvault network-rule - summary: Manage vault network ACLs. -- command: - name: keyvault certificate download - summary: Download the public portion of a Key Vault certificate. - description: The certificate formatted as either PEM or DER. PEM is the default. - examples: - - summary: Download a certificate as PEM and check its fingerprint in openssl. - command: | - az keyvault certificate download --vault-name vault -n cert-name -f cert.pem && \ - openssl x509 -in cert.pem -inform PEM -noout -sha1 -fingerprint - - summary: Download a certificate as DER and check its fingerprint in openssl. - command: | - az keyvault certificate download --vault-name vault -n cert-name -f cert.crt -e DER && \ - openssl x509 -in cert.crt -inform DER -noout -sha1 -fingerprint -- command: - name: keyvault certificate get-default-policy - summary: Get the default policy for self-signed certificates. - description: | - This default policy can be used in conjunction with `az keyvault create` to create a self-signed certificate. - The default policy can also be used as a starting point to create derivative policies. - - For more details, see: https://docs.microsoft.com/en-us/rest/api/keyvault/certificates-and-policies - examples: - - summary: Create a self-signed certificate with the default policy - command: | - az keyvault certificate create --vault-name vaultname -n cert1 \ - -p "$(az keyvault certificate get-default-policy)" -- command: - name: keyvault certificate create - summary: Create a Key Vault certificate. - description: Certificates can be used as a secrets for provisioned virtual machines. - examples: - - summary: Create a self-signed certificate with the default policy and add it to a virtual machine. - command: | - az keyvault certificate create --vault-name vaultname -n cert1 \ - -p "$(az keyvault certificate get-default-policy)" - - secrets=$(az keyvault secret list-versions --vault-name vaultname \ - -n cert1 --query "[?attributes.enabled].id" -o tsv) - - vm_secrets=$(az vm secret format -s "$secrets") - - az vm create -g group-name -n vm-name --admin-username deploy \ - --image debian --secrets "$vm_secrets" -- command: - name: keyvault certificate import - summary: Import a certificate into KeyVault. - description: Certificates can also be used as a secrets in provisioned virtual machines. - examples: - - summary: Create a service principal with a certificate, add the certificate to Key Vault and provision a VM with that certificate. - command: | - service_principal=$(az ad sp create-for-rbac --create-cert) - - cert_file=$(echo $service_principal | jq .fileWithCertAndPrivateKey -r) - - az keyvault create -g my-group -n vaultname - - az keyvault certificate import --vault-name vaultname -n cert_name -f cert_file - - secrets=$(az keyvault secret list-versions --vault-name vaultname \ - -n cert1 --query "[?attributes.enabled].id" -o tsv) - - vm_secrets=$(az vm secret format -s "$secrets") - - az vm create -g group-name -n vm-name --admin-username deploy \ - --image debian --secrets "$vm_secrets" -- group: - name: keyvault certificate pending - summary: Manage pending certificate creation operations. -- group: - name: keyvault certificate contact - summary: Manage contacts for certificate management. -- group: - name: keyvault certificate issuer - summary: Manage certificate issuer information. -- group: - name: keyvault certificate issuer admin - summary: Manage admin information for certificate issuers. diff --git a/src/command_modules/azure-cli-lab/azure/cli/command_modules/lab/help.yaml b/src/command_modules/azure-cli-lab/azure/cli/command_modules/lab/help.yaml deleted file mode 100644 index 3da82bd4778..00000000000 --- a/src/command_modules/azure-cli-lab/azure/cli/command_modules/lab/help.yaml +++ /dev/null @@ -1,263 +0,0 @@ -version: 1 -content: -- group: - name: lab - summary: Manage Azure DevTest Labs. -- group: - name: lab vm - summary: Manage VMs in an Azure DevTest Lab. -- command: - name: lab vm create - summary: Create a VM in a lab. - arguments: - - name: --name - summary: Name of the virtual machine. - - name: --lab-name - summary: Name of the lab. - - name: --notes - summary: Notes for the virtual machine. - - name: --image - summary: The name of the operating system image (gallery image name or custom image name/ID). - description: Use `az lab gallery-image list` for available gallery images or `az lab custom-image list` for available custom images. - - name: --image-type - summary: 'Type of the image. Allowed values are: gallery, custom' - - name: --formula - summary: Name of the formula. Use `az lab formula list` for available formulas. - description: > - Use `az lab formula` with the `--export-artifacts` flag to export and update artifacts, then pass - the results via the `--artifacts` argument. - - name: --size - summary: The size of the VM to be created. See https://azure.microsoft.com/en-us/pricing/details/virtual-machines/ for size info. - - name: --admin-username - summary: Username for the VM admin. - - name: --admin-password - summary: Password for the VM admin. - - name: --ssh-key - summary: The SSH public key or public key file path. Use `--generate-ssh-keys` to generate SSH keys. - - name: --authentication-type - summary: 'Type of authentication allowed for the VM. Allowed values are: password, ssh.' - - name: --saved-secret - summary: Name of the saved secret to be used for authentication. - description: When this value is provided, it is used in the place of other authentication methods. - - name: --vnet-name - summary: Name of the virtual network to add the VM to. - - name: --subnet - summary: Name of the subnet to add the VM to. - - name: --ip-configuration - summary: 'Type of IP configuration to use for the VM. Allowed values are: shared, public, private.' - description: If omitted, will be selected based on the VM's vnet. - - name: --artifacts - summary: JSON encoded array of artifacts to be applied. Use '@{file}' to load from a file. - - name: --tags - summary: Space-separated tags in `key[=value]` format. - description: Tags may be cleared by assigning the empty value "" to them. - - name: --allow-claim - summary: Flag indicating if the VM should be created as claimable. - - name: --disk-type - summary: Storage type to use for virtual machine. - - name: --expiration-date - summary: The expiration date in UTC(YYYY-mm-dd) for the VM. - - name: --generate-ssh-keys - summary: Generate SSH public and private key files if missing. - examples: - - summary: Create a VM in the lab from a gallery image. - command: > - az lab vm create --lab-name {LabName} -g {ResourceGroup} --name {VMName} --image "Ubuntu Server 16.04 LTS" --image-type gallery --size Standard_DS1_v2 - - summary: Create a VM in the lab from a gallery image with SSH authentication. - command: > - az lab vm create --lab-name {LabName} -g {ResourceGroup} --name {VMName} --image "Ubuntu Server 16.04 LTS" --image-type gallery --size Standard_DS1_v2 --authentication-type ssh - - summary: Create a claimable VM in the lab from a gallery image with password authentication. - command: > - az lab vm create --lab-name {LabName} -g {ResourceGroup} --name {VMName} --image "Ubuntu Server 16.04 LTS" --image-type gallery --size Standard_DS1_v2 --allow-claim - - summary: Create a windows VM in the lab from a gallery image with password authentication. - command: > - az lab vm create --lab-name {LabName} -g {ResourceGroup} --name {VMName} --image "Windows Server 2008 R2 SP1" --image-type gallery --size Standard_DS1_v2 - - summary: Create a VM in the lab from a custom image. - command: > - az lab vm create --lab-name {LabName} -g {ResourceGroup} --name {VMName} --image "jenkins_custom" --image-type custom --size Standard_DS1_v2 - - summary: Create a VM in the lab with a public IP. - command: > - az lab vm create --lab-name {LabName} -g {ResourceGroup} --name {VMName} --image "Ubuntu Server 16.04 LTS" --image-type gallery --size Standard_DS1_v2 --ip-configuration public - - summary: Create a VM from a formula. - command: > - az lab vm create --lab-name {LabName} -g {ResourceGroup} --name {VMName} --formula MyFormula --artifacts '@artifacts.json' -- command: - name: lab vm list - summary: List the VMs in an Azure DevTest Lab. - arguments: - - name: --lab-name - summary: Name of the lab. - - name: --order-by - summary: The ordering expression for the results using OData notation. - - name: --top - summary: The maximum number of resources to return. - - name: --filters - summary: The filter to apply. - - name: --expand - summary: The expand query. - - name: --claimable - summary: List only claimable virtual machines in the lab. Cannot be used with `--filters`. - - name: --all - summary: List all virtual machines in the lab. Cannot be used with `--filters` - - name: --environment - summary: Name or ID of the environment to list virtual machines in. Cannot be used with `--filters`. - - name: --object-id - summary: Object ID of the owner to list VMs for. -- command: - name: lab vm apply-artifacts - summary: Apply artifacts to a virtual machine in Azure DevTest Lab. - arguments: - - name: --resource-group - summary: Name of lab's resource group. - - name: --lab-name - summary: Name of the Lab. - - name: --name - summary: Name of the virtual machine. - - name: --artifacts - summary: JSON encoded array of artifacts to be applied. Use '@{file}' to load from a file. -- command: - name: lab vm claim - summary: Claim a virtual machine from the Lab. - arguments: - - name: --resource-group - summary: Name of lab's resource group. - - name: --lab-name - summary: Name of the lab. - - name: --name - summary: Name of the virtual machine to claim. - examples: - - summary: Claim any available virtual machine in the lab. - command: > - az lab vm claim -g {ResourceGroup} --lab-name {LabName} - - summary: Claim a specific virtual machine in the lab. - command: > - az lab vm claim -g {ResourceGroup} --lab-name {LabName} --name {VMName} - - summary: Claim multiple virtual machines in the lab by IDs. - command: | - az lab vm claim --ids \ - /subscriptions/{SubID}/resourcegroups/{ResourceGroup}/providers/microsoft.devtestlab/labs/{LabName}/virtualmachines/{VMName1} \ - /subscriptions/{SubID}/resourcegroups/{ResourceGroup}/providers/microsoft.devtestlab/labs/{LabName}/virtualmachines/{VMName2} -- group: - name: lab custom-image - summary: Manage custom images of a DevTest Lab. -- command: - name: lab custom-image create - summary: Create a custom image in a DevTest Lab. - arguments: - - name: --name - summary: Name of the image. - - name: --lab-name - summary: Name of the Lab. - - name: --author - summary: The author of the custom image. - - name: --description - summary: A detailed description for the custom image. - - name: --source-vm-id - summary: The resource ID of a virtual machine in the provided lab. - - name: --os-type - summary: 'Type of the OS on which the custom image is based. Allowed values are: Windows, Linux' - - name: --os-state - summary: The current state of the virtual machine. - description: > - For Windows virtual machines: NonSysprepped, SysprepRequested, SysprepApplied - For Linux virtual machines: NonDeprovisioned, DeprovisionRequested, DeprovisionApplied - examples: - - summary: Create a custom image in the lab from a running Windows virtual machine without applying sysprep. - command: | - az lab custom-image create --lab-name {LabName} -g {ResourceGroup} --name {VMName} \ - --os-type Windows --os-state NonSysprepped \ - --source-vm-id "/subscriptions/{SubID}/resourcegroups/{ResourceGroup}/microsoft.devtestlab/labs/{LabName}/virtualmachines/{VMName}" -- group: - name: lab gallery-image - summary: List Azure Marketplace images allowed for a DevTest Lab. -- group: - name: lab artifact - summary: Manage DevTest Labs artifacts. -- group: - name: lab artifact-source - summary: Manage DevTest Lab artifact sources. -- group: - name: lab vnet - summary: Manage virtual networks of an Azure DevTest Lab. -- group: - name: lab formula - summary: Manage formulas for an Azure DevTest Lab. -- command: - name: lab formula show - summary: Show formulae from an Azure DevTest Lab. - arguments: - - name: --lab-name - summary: Name of the lab. - - name: --name - summary: Name of the formula. -- command: - name: lab formula export-artifacts - summary: Export artifacts from a formula. - arguments: - - name: --lab-name - summary: Name of the lab. - - name: --name - summary: Name of the formula. -- group: - name: lab secret - summary: Manage secrets of an Azure DevTest Lab. -- command: - name: lab secret set - summary: Set a secret for a lab. - arguments: - - name: --lab-name - summary: Name of the lab. - - name: --name - summary: Name of the secret. - - name: --value - summary: Value of the secret. -- group: - name: lab arm-template - summary: Manage Azure Resource Manager (ARM) templates in an Azure DevTest Lab. -- command: - name: lab arm-template show - summary: Get the details of an ARM template in a lab. - arguments: - - name: --lab-name - summary: Name of the lab. - - name: --name - summary: Name of the Azure Resource Manager template. - - name: --resource-group - summary: Name of lab's resource group. - - name: --export-parameters - summary: Whether or not to export parameters template. - - name: --artifact-source-name - summary: Name of the artifact source. -- group: - name: lab environment - summary: Manage environments for an Azure DevTest Lab. -- command: - name: lab environment create - summary: Create an environment in a lab. - arguments: - - name: --lab-name - summary: Name of the lab. - - name: --name - summary: Name of the environment. - - name: --resource-group - summary: Name of the lab's resource group. - - name: --arm-template - summary: Name or ID of the ARM template in the lab. - - name: --artifact-source-name - summary: Name of the artifact source in the lab. - value-sources: - - link: - command: az lab artifact-source list - - name: --parameters - summary: JSON encoded list of parameters. Use '@{file}' to load from a file. - - name: --tags - summary: The tags for the resource. -- command: - name: lab environment delete - summary: Delete an environment from a lab. -- command: - name: lab environment list - summary: List environments in a lab. -- command: - name: lab environment show - summary: Get the details for an environment of a lab. diff --git a/src/command_modules/azure-cli-maps/azure/cli/command_modules/maps/help.yaml b/src/command_modules/azure-cli-maps/azure/cli/command_modules/maps/help.yaml deleted file mode 100644 index aa966b42873..00000000000 --- a/src/command_modules/azure-cli-maps/azure/cli/command_modules/maps/help.yaml +++ /dev/null @@ -1,43 +0,0 @@ -version: 1 -content: -- group: - name: maps - summary: Manage Azure Maps. -- group: - name: maps account - summary: Manage Azure Maps accounts. -- group: - name: maps account keys - summary: Manage Azure Maps account keys. -- command: - name: maps account show - summary: Show the details of a maps account. -- command: - name: maps account list - summary: Show all maps accounts in a subscription or in a resource group. -- command: - name: maps account create - summary: Create a maps account. - arguments: - - name: --accept-tos - summary: Accept the Terms of Service, and do not prompt for confirmation. - description: | - By creating an Azure Maps account, you agree that you have read and agree to the - License (https://azure.microsoft.com/en-us/support/legal/) and - Privacy Statement (https://privacy.microsoft.com/en-us/privacystatement). -- command: - name: maps account update - summary: Update the properties of a maps account. -- command: - name: maps account delete - summary: Delete a maps account. -- command: - name: maps account keys list - summary: List the keys to use with the Maps APIs. - description: | - A key is used to authenticate and authorize access to the Maps REST APIs. Only one key is needed at a time; two are given to provide seamless key regeneration. -- command: - name: maps account keys renew - summary: Renew either the primary or secondary key for use with the Maps APIs. - description: | - This command immediately invalidates old API keys. Only the renewed keys can be used to connect to maps. diff --git a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/help.yaml b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/help.yaml deleted file mode 100644 index dd855621c92..00000000000 --- a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/help.yaml +++ /dev/null @@ -1,760 +0,0 @@ -version: 1 -content: -- group: - name: monitor - summary: Manage the Azure Monitor Service. -- group: - name: monitor alert - summary: Manage classic metric-based alert rules. -- command: - name: monitor alert create - summary: Create a classic metric-based alert rule. - arguments: - - name: --action - summary: Add an action to fire when the alert is triggered. - description: | - Usage: --action TYPE KEY [ARG ...] - Email: --action email bob@contoso.com ann@contoso.com - Webhook: --action webhook https://www.contoso.com/alert apiKey=value - Webhook: --action webhook https://www.contoso.com/alert?apiKey=value - Multiple actions can be specified by using more than one `--action` argument. - - name: --description - summary: Free-text description of the rule. Defaults to the condition expression. - - name: --disabled - summary: Create the rule in a disabled state. - - name: --condition - summary: The condition which triggers the rule. - description: > - The form of a condition is "METRIC {>,>=,<,<=} THRESHOLD {avg,min,max,total,last} PERIOD". - Values for METRIC and appropriate THRESHOLD values can be obtained from `az monitor metric` commands, - and PERIOD is of the form "##h##m##s". - - name: --email-service-owners - summary: Email the service owners if an alert is triggered. - examples: - - summary: Create a high CPU usage alert on a VM with no actions. - command: > - az monitor alert create -n rule1 -g {ResourceGroup} --target {VirtualMachineID} --condition "Percentage CPU > 90 avg 5m" - - summary: Create a high CPU usage alert on a VM with email and webhook actions. - command: | - az monitor alert create -n rule1 -g {ResourceGroup} --target {VirtualMachineID} \ - --condition "Percentage CPU > 90 avg 5m" \ - --action email bob@contoso.com ann@contoso.com --email-service-owners \ - --action webhook https://www.contoso.com/alerts?type=HighCPU \ - --action webhook https://alerts.contoso.com apiKey={APIKey} type=HighCPU -- command: - name: monitor alert update - summary: Update a classic metric-based alert rule. - arguments: - - name: --description - summary: Description of the rule. - - name: --condition - summary: The condition which triggers the rule. - description: > - The form of a condition is "METRIC {>,>=,<,<=} THRESHOLD {avg,min,max,total,last} PERIOD". - Values for METRIC and appropriate THRESHOLD values can be obtained from `az monitor metric` commands, - and PERIOD is of the form "##h##m##s". - - name: --add-action - summary: Add an action to fire when the alert is triggered. - description: | - Usage: --add-action TYPE KEY [ARG ...] - Email: --add-action email bob@contoso.com ann@contoso.com - Webhook: --add-action webhook https://www.contoso.com/alert apiKey=value - Webhook: --add-action webhook https://www.contoso.com/alert?apiKey=value - Multiple actions can be specified by using more than one `--add-action` argument. - - name: --remove-action - summary: Remove one or more actions. - description: | - Usage: --remove-action TYPE KEY [KEY ...] - Email: --remove-action email bob@contoso.com ann@contoso.com - Webhook: --remove-action webhook https://contoso.com/alert https://alerts.contoso.com - - name: --email-service-owners - summary: Email the service owners if an alert is triggered. - - name: --metric - summary: Name of the metric to base the rule on. - value-sources: - - link: - command: az monitor metrics list-definitions - - name: --operator - summary: How to compare the metric against the threshold. - - name: --threshold - summary: Numeric threshold at which to trigger the alert. - - name: --aggregation - summary: Type of aggregation to apply based on --period. - - name: --period - summary: > - Time span over which to apply --aggregation, in nDnHnMnS shorthand or full ISO8601 format. -- command: - name: monitor alert delete - summary: Delete an alert rule. -- command: - name: monitor alert list - summary: List alert rules in a resource group. -- command: - name: monitor alert show - summary: Show an alert rule. -- command: - name: monitor alert show-incident - summary: Get the details of an alert rule incident. -- command: - name: monitor alert list-incidents - summary: List all incidents for an alert rule. -- group: - name: monitor metrics - summary: View Azure resource metrics. -- command: - name: monitor metrics list - summary: List the metric values for a resource. - arguments: - - name: --aggregation - summary: The list of aggregation types (space-separated) to retrieve. - value-sources: - - link: - command: az monitor metrics list-definitions - - name: --interval - summary: > - The interval over which to aggregate metrics, in ##h##m format. - - name: --filter - summary: A string used to reduce the set of metric data returned. eg. "BlobType eq '*'" - description: For a full list of filters, see the filter string reference at https://docs.microsoft.com/en-us/rest/api/monitor/metrics/list - - name: --metadata - summary: Returns the metadata values instead of metric data - - name: --dimension - summary: The list of dimensions (space-separated) the metrics are queried into. - value-sources: - - link: - command: az monitor metrics list-definitions - - name: --namespace - summary: Namespace to query metric definitions for. - value-sources: - - link: - command: az monitor metrics list-definitions - - name: --offset - summary: > - Time offset of the query range, in ##d##h format. - description: > - Can be used with either --start-time or --end-time. If used with --start-time, then - the end time will be calculated by adding the offset. If used with --end-time (default), then - the start time will be calculated by subtracting the offset. If --start-time and --end-time are - provided, then --offset will be ignored. - - name: --metrics - summary: > - Space-separated list of metric names to retrieve. - value-sources: - - link: - command: az monitor metrics list-definitions - examples: - - summary: List a VM's CPU usage for the past hour - command: > - az monitor metrics list --resource {ResourceName} --metric "Percentage CPU" - - summary: List success E2E latency of a storage account and split the data series based on API name - command: > - az monitor metrics list --resource {ResourceName} --metric SuccessE2ELatency \ - --dimension ApiName - - summary: List success E2E latency of a storage account and split the data series based on both API name and geo type - command: > - az monitor metrics list --resource {ResourceName} --metric SuccessE2ELatency \ - --dimension ApiName GeoType - - summary: List success E2E latency of a storage account and split the data series based on both API name and geo type using "--filter" parameter - command: > - az monitor metrics list --resource {ResourceName} --metric SuccessE2ELatency \ - --filter "ApiName eq '*' and GeoType eq '*'" - - summary: List success E2E latency of a storage account and split the data series based on both API name and geo type. Limits the api name to 'DeleteContainer' - command: > - az monitor metrics list --resource {ResourceName} --metric SuccessE2ELatency \ - --filter "ApiName eq 'DeleteContainer' and GeoType eq '*'" - - summary: List transactions of a storage account per day since 2017-01-01 - command: > - az monitor metrics list --resource {ResourceName} --metric Transactions \ - --start-time 2017-01-01T00:00:00Z \ - --interval PT24H - - summary: List the metadata values for a storage account under transaction metric's api name dimension since 2017 - command: > - az monitor metrics list --resource {ResourceName} --metric Transactions \ - --filter "ApiName eq '*'" \ - --start-time 2017-01-01T00:00:00Z -- command: - name: monitor metrics list-definitions - summary: Lists the metric definitions for the resource. -- group: - name: monitor metrics alert - summary: Manage near-realtime metric alert rules. -- command: - name: monitor metrics alert create - summary: Create a metric-based alert rule. - arguments: - - name: --action - summary: Add an action group and optional webhook properties to fire when the alert is triggered. - description: | - Usage: --action ACTION_GROUP_NAME_OR_ID [KEY=VAL [KEY=VAL ...]] - - Multiple action groups can be specified by using more than one `--action` argument. - - name: --disabled - summary: Create the rule in a disabled state. - - name: --condition - summary: The condition which triggers the rule. - description: | - Usage: --conditon {avg,min,max,total} [NAMESPACE.]METRIC {=,!=,>,>=,<,<=} THRESHOLD - [where DIMENSION {includes,excludes} VALUE [or VALUE ...] - [and DIMENSION {includes,excludes} VALUE [or VALUE ...] ...]] - - Dimensions can be queried by adding the 'where' keyword and multiple dimensions can be queried by combining them with the 'and' keyword. - - Values for METRIC, DIMENSION and appropriate THRESHOLD values can be obtained from `az monitor metrics list-definition` command. - - Multiple conditons can be specified by using more than one `--condition` argument. - examples: - - summary: Create a high CPU usage alert on a VM with no actions. - command: > - az monitor metrics alert create -n alert1 -g {ResourceGroup} --scopes {VirtualMachineID} --condition "avg Percentage CPU > 90" - --description "High CPU" - - summary: Create a high CPU usage alert on a VM with email and webhook actions. - command: | - az monitor metrics alert create -n alert1 -g {ResourceGroup} --scopes {VirtualMachineID} \ - --condition "avg Percentage CPU > 90" --window-size 5m --evaluation-frequency 1m \ - --action {actionGroupId} apiKey={APIKey} type=HighCPU --description "High CPU" - - summary: Create an alert when a storage account shows a high number of slow transactions, using multi-dimensional filters. - command: | - az monitor metrics alert create -g {ResourceGroup} -n alert1 --scopes {StorageAccountId} \ - --description "Storage Slow Transactions" \ - --condition "total transactions > 5 where ResponseType includes Success" \ - --condition "avg SuccessE2ELatency > 250 where ApiName includes GetBlob or PutBlob" -- command: - name: monitor metrics alert update - summary: Update a metric-based alert rule. - arguments: - - name: --add-condition - summary: Add a condition which triggers the rule. - description: | - Usage: --add-conditon {avg,min,max,total} [NAMESPACE.]METRIC {=,!=,>,>=,<,<=} THRESHOLD - [where DIMENSION {includes,excludes} VALUE [or VALUE ...] - [and DIMENSION {includes,excludes} VALUE [or VALUE ...] ...]] - - Dimensions can be queried by adding the 'where' keyword and multiple dimensions can be queried by combining them with the 'and' keyword. - - Values for METRIC, DIMENSION and appropriate THRESHOLD values can be obtained from `az monitor metrics list-definition` command. - - Multiple conditons can be specified by using more than one `--condition` argument. - - name: --remove-conditions - summary: Space-separated list of condition names to remove. - - name: --add-action - summary: Add an action group and optional webhook properties to fire when the alert is triggered. - description: | - Usage: --add-action ACTION_GROUP_NAME_OR_ID [KEY=VAL [KEY=VAL ...]] - - Multiple action groups can be specified by using more than one `--action` argument. - - name: --remove-actions - summary: Space-separated list of action group names to remove. -- command: - name: monitor metrics alert delete - summary: Delete a metrics-based alert rule. -- command: - name: monitor metrics alert list - summary: List metric-based alert rules. -- command: - name: monitor metrics alert show - summary: Show a metrics-based alert rule. -- group: - name: monitor log-profiles - summary: Manage log profiles. -- command: - name: monitor log-profiles create - summary: Create a log profile. - arguments: - - name: --name - summary: The name of the log profile. - - name: --locations - summary: Space-separated list of regions for which Activity Log events should be stored. - - name: --categories - summary: Space-separated categories of the logs. These categories are created as is convenient to the user. Some values are Write, Delete, and/or Action. - - name: --storage-account-id - summary: The resource id of the storage account to which you would like to send the Activity Log. - - name: --service-bus-rule-id - summary: The service bus rule ID of the service bus namespace in which you would like to have Event Hubs created for streaming the Activity Log. The rule ID is of the format '{service bus resource ID}/authorizationrules/{key name}'. - - name: --days - summary: The number of days for the retention in days. A value of 0 will retain the events indefinitely - - name: --enabled - summary: Whether the retention policy is enabled. -- command: - name: monitor log-profiles update - summary: Update a log profile. -- group: - name: monitor diagnostic-settings - summary: Manage service diagnostic settings. -- group: - name: monitor diagnostic-settings categories - summary: Retrieve service diagnostic settings categories. -- command: - name: monitor diagnostic-settings create - summary: Create diagnostic settings for the specified resource. - description: > - For more information, visit: https://docs.microsoft.com/en-us/rest/api/monitor/diagnosticsettings/createorupdate#metricsettings - arguments: - - name: --name - summary: The name of the diagnostic settings. - - name: --resource-group - summary: Name of the resource group for the Log Analytics and Storage Account when the name of the service instead of a full resource ID is given. - - name: --logs - summary: JSON encoded list of logs settings. Use '@{file}' to load from a file. - - name: --metrics - summary: JSON encoded list of metric settings. Use '@{file}' to load from a file. - - name: --storage-account - summary: Name or ID of the storage account to send diagnostic logs to. - - name: --workspace - summary: Name or ID of the Log Analytics workspace to send diagnostic logs to. - - name: --event-hub - summary: > - Name or ID an event hub. If none is specified, the default event hub will be selected. - - name: --event-hub-rule - summary: Name or ID of the event hub authorization rule. - examples: - - summary: Create diagnostic settings with EventHub. - command: | - az monitor diagnostic-settings create --resource {ID} -n {name} - --event-hub-rule {eventHubRuleID} --storage-account {storageAccount} - --logs '[ - { - "category": "WorkflowRuntime", - "enabled": true, - "retentionPolicy": { - "enabled": false, - "days": 0 - } - } - ]' - --metrics '[ - { - "category": "WorkflowRuntime", - "enabled": true, - "retentionPolicy": { - "enabled": false, - "days": 0 - } - } - ]' -- command: - name: monitor diagnostic-settings update - summary: Update diagnostic settings. -- group: - name: monitor autoscale - summary: Manage autoscale settings. - description: > - For more information on autoscaling, visit: https://docs.microsoft.com/en-us/azure/monitoring-and-diagnostics/monitoring-understanding-autoscale-settings -- command: - name: monitor autoscale show - summary: Show autoscale setting details. -- command: - name: monitor autoscale create - summary: Create new autoscale settings. - description: > - For more information on autoscaling, visit: https://docs.microsoft.com/en-us/azure/monitoring-and-diagnostics/monitoring-understanding-autoscale-settings - arguments: - - name: --action - summary: Add an action to fire when a scaling event occurs. - description: | - Usage: --action TYPE KEY [ARG ...] - Email: --action email bob@contoso.com ann@contoso.com - Webhook: --action webhook https://www.contoso.com/alert apiKey=value - Webhook: --action webhook https://www.contoso.com/alert?apiKey=value - Multiple actions can be specified by using more than one `--action` argument. - examples: - - summary: Create autoscale settings to scale between 2 and 5 instances (3 as default). Email the administrator when scaling occurs. - command: | - az monitor autoscale create -g {myrg} --resource {resource-id} --min-count 2 --max-count 5 \ - --count 3 --email-administrator - - az monitor autoscale rule create -g {myrg} --autoscale-name {resource-name} --scale out 1 \ - --condition "Percentage CPU > 75 avg 5m" - - az monitor autoscale rule create -g {myrg} --autoscale-name {resource-name} --scale in 1 \ - --condition "Percentage CPU < 25 avg 5m" - - summary: Create autoscale settings for exactly 4 instances. - command: > - az monitor autoscale create -g {myrg} --resource {resource-id} --count 4 -- command: - name: monitor autoscale update - summary: Update autoscale settings. - description: > - For more information on autoscaling, visit: https://docs.microsoft.com/en-us/azure/monitoring-and-diagnostics/monitoring-understanding-autoscale-settings - arguments: - - name: --add-action - summary: Add an action to fire when a scaling event occurs. - description: | - Usage: --add-action TYPE KEY [ARG ...] - Email: --add-action email bob@contoso.com ann@contoso.com - Webhook: --add-action webhook https://www.contoso.com/alert apiKey=value - Webhook: --add-action webhook https://www.contoso.com/alert?apiKey=value - Multiple actions can be specified by using more than one `--add-action` argument. - - name: --remove-action - summary: Remove one or more actions. - description: | - Usage: --remove-action TYPE KEY [KEY ...] - Email: --remove-action email bob@contoso.com ann@contoso.com - Webhook: --remove-action webhook https://contoso.com/alert https://alerts.contoso.com - examples: - - summary: Update autoscale settings to use a fixed 3 instances by default. - command: | - az monitor autoscale update -g {myrg} -n {autoscale-name} --count 3 - - summary: Update autoscale settings to remove an email notification. - command: | - az monitor autoscale update -g {myrg} -n {autoscale-name} \ - --remove-action email bob@contoso.com -- group: - name: monitor autoscale profile - summary: Manage autoscaling profiles. - description: > - For more information on autoscaling, visit: https://docs.microsoft.com/en-us/azure/monitoring-and-diagnostics/monitoring-understanding-autoscale-settings -- command: - name: monitor autoscale profile create - summary: Create a fixed or recurring autoscale profile. - description: > - For more information on autoscaling, visit: https://docs.microsoft.com/en-us/azure/monitoring-and-diagnostics/monitoring-understanding-autoscale-settings - arguments: - - name: --timezone - summary: Timezone name. - value-sources: - - link: - command: az monitor autoscale profile list-timezones - - name: --recurrence - summary: When the profile recurs. If omitted, a fixed (non-recurring) profile is created. - description: | - Usage: --recurrence {week} [ARG ARG ...] - Weekly: --recurrence week Sat Sun - - name: --start - summary: When the autoscale profile begins. Format depends on the type of profile. - description: | - Fixed: --start yyyy-mm-dd [hh:mm:ss] - Weekly: [--start hh:mm] - - name: --end - summary: When the autoscale profile ends. Format depends on the type of profile. - description: | - Fixed: --end yyyy-mm-dd [hh:mm:ss] - Weekly: [--end hh:mm] - examples: - - summary: Create a fixed date profile, inheriting the default scaling rules but changing the capacity. - command: | - az monitor autoscale create -g {myrg} --resource {resource-id} --min-count 2 --count 3 \ - --max-count 5 - - az monitor autoscale rule create -g {myrg} --autoscale-name {name} --scale out 1 \ - --condition "Percentage CPU > 75 avg 5m" - - az monitor autoscale rule create -g {myrg} --autoscale-name {name} --scale in 1 \ - --condition "Percentage CPU < 25 avg 5m" - - az monitor autoscale profile create -g {myrg} --autoscale-name {name} -n Christmas \ - --copy-rules default --min-count 3 --count 6 --max-count 10 --start 2018-12-24 \ - --end 2018-12-26 --timezone "Pacific Standard Time" - - summary: Create a recurring weekend profile, inheriting the default scaling rules but changing the capacity. - command: | - az monitor autoscale create -g {myrg} --resource {resource-id} --min-count 2 --count 3 \ - --max-count 5 - - az monitor autoscale rule create -g {myrg} --autoscale-name {name} --scale out 1 \ - --condition "Percentage CPU > 75 avg 5m" - - az monitor autoscale rule create -g {myrg} --autoscale-name {name} --scale in 1 \ - --condition "Percentage CPU < 25 avg 5m" - - az monitor autoscale profile create -g {myrg} --autoscale-name {name} -n weeekend \ - --copy-rules default --min-count 1 --count 2 --max-count 2 \ - --recurrence week sat sun --timezone "Pacific Standard Time" -- command: - name: monitor autoscale profile delete - summary: Delete an autoscale profile. -- command: - name: monitor autoscale profile list - summary: List autoscale profiles. -- command: - name: monitor autoscale profile list-timezones - summary: Look up time zone information. -- command: - name: monitor autoscale profile show - summary: Show details of an autoscale profile. -- group: - name: monitor autoscale rule - summary: Manage autoscale scaling rules. - description: > - For more information on autoscaling, visit: https://docs.microsoft.com/en-us/azure/monitoring-and-diagnostics/monitoring-understanding-autoscale-settings -- command: - name: monitor autoscale rule create - summary: Add a new autoscale rule. - description: > - For more information on autoscaling, visit: https://docs.microsoft.com/en-us/azure/monitoring-and-diagnostics/monitoring-understanding-autoscale-settings - arguments: - - name: --condition - summary: The condition which triggers the scaling action. - description: > - The form of a condition is "METRIC {==,!=,>,>=,<,<=} THRESHOLD {avg,min,max,total,count} PERIOD". - Values for METRIC and appropriate THRESHOLD values can be obtained from the `az monitor metric` command. - Format of PERIOD is "##h##m##s". - - name: --scale - summary: The direction and amount to scale. - description: | - Usage: --scale {to,in,out} VAL[%] - Fixed Count: --scale to 5 - In by Count: --scale in 2 - Out by Percent: --scale out 10% - - name: --timegrain - summary: > - The way metrics are polled across instances. - description: > - The form of the timegrain is {avg,min,max,sum} VALUE. Values can be obtained from the `az monitor metric` command. - Format of VALUE is "##h##m##s". - examples: - - summary: Scale to 5 instances when the CPU Percentage across instances is greater than 75 averaged over 10 minutes. - command: | - az monitor autoscale rule create -g {myrg} --autoscale-name {myvmss} \ - --scale to 5 --condition "Percentage CPU > 75 avg 10m" - - summary: Scale up 2 instances when the CPU Percentage across instances is greater than 75 averaged over 5 minutes. - command: | - az monitor autoscale rule create -g {myrg} --autoscale-name {myvmss} \ - --scale out 2 --condition "Percentage CPU > 75 avg 5m" - - summary: Scale down 50% when the CPU Percentage across instances is less than 25 averaged over 15 minutes. - command: | - az monitor autoscale rule create -g {myrg} --autoscale-name {myvmss} \ - --scale in 50% --condition "Percentage CPU < 25 avg 15m" -- command: - name: monitor autoscale rule list - summary: List autoscale rules for a profile. -- command: - name: monitor autoscale rule copy - summary: Copy autoscale rules from one profile to another. -- command: - name: monitor autoscale rule delete - summary: Remove autoscale rules from a profile. -- group: - name: monitor autoscale-settings - summary: Manage autoscale settings. -- command: - name: monitor autoscale-settings update - summary: Updates an autoscale setting. -- group: - name: monitor activity-log - summary: Manage activity logs. -- group: - name: monitor action-group - summary: Manage action groups -- command: - name: monitor action-group list - summary: List action groups under a resource group or the current subscription - arguments: - - name: --resource-group - summary: > - Name of the resource group under which the action groups are being listed. If it is omitted, all the action groups under - the current subscription are listed. -- command: - name: monitor action-group show - summary: Show the details of an action group -- command: - name: monitor action-group create - summary: Create a new action group - arguments: - - name: --action - summary: Add receivers to the action group during the creation - description: | - Usage: --action TYPE NAME [ARG ...] - Email: --action email bob bob@contoso.com - SMS: --action sms charli 1 5551234567 - Webhook: --action webhook alert_hook https://www.contoso.com/alert - Multiple actions can be specified by using more than one `--action` argument. - - name: --short-name - summary: The short name of the action group -- command: - name: monitor action-group update - summary: Update an action group - arguments: - - name: --short-name - summary: Update the group short name of the action group - - name: --add-action - summary: Add receivers to the action group - description: | - Usage: --add-action TYPE NAME [ARG ...] - Email: --add-action email bob bob@contoso.com - SMS: --add-action sms charli 1 5551234567 - Webhook: --add-action https://www.contoso.com/alert - Multiple actions can be specified by using more than one `--add-action` argument. - - name: --remove-action - summary: Remove receivers from the action group. Accept space-separated list of receiver names. -- group: - name: monitor activity-log alert - summary: Manage activity log alerts -- command: - name: monitor activity-log alert list - summary: List activity log alerts under a resource group or the current subscription. - arguments: - - name: --resource-group - summary: Name of the resource group under which the activity log alerts are being listed. If it is omitted, all the activity log alerts under the current subscription are listed. -- command: - name: monitor activity-log alert create - summary: Create a default activity log alert - description: This command will create a default activity log with one condition which compares if the activities logs 'category' field equals to 'ServiceHealth'. The newly created activity log alert does not have any action groups attached to it. - arguments: - - name: --name - summary: Name of the activity log alerts - - name: --scope - summary: A list of strings that will be used as prefixes. - description: > - The alert will only apply to activity logs with resourceIDs that fall under one of these prefixes. - If not provided, the path to the resource group will be used. - - name: --disable - summary: Disable the activity log alert after it is created. - - name: --description - summary: A description of this activity log alert - - name: --condition - summary: The condition that will cause the alert to activate. The format is FIELD=VALUE[ and FIELD=VALUE...]. - description: > - The possible values for the field are 'resourceId', 'category', 'caller', 'level', 'operationName', 'resourceGroup', - 'resourceProvider', 'status', 'subStatus', 'resourceType', or anything beginning with 'properties.'. - - name: --action-group - summary: > - Add an action group. Accepts space-separated action group identifiers. The identifier can be the action group's name - or its resource ID. - - name: --webhook-properties - summary: > - Space-separated webhook properties in 'key[=value]' format. These properties are associated with the action groups - added in this command. - description: > - For any webhook receiver in these action group, this data is appended to the webhook payload. To attach different webhook - properties to different action groups, add the action groups in separate update-action commands. - examples: - - summary: Create an alert with default settings. - command: > - az monitor activity-log alert create -n {AlertName} -g {ResourceGroup} - - summary: Create an alert with condition about error level service health log. - command: > - az monitor activity-log alert create -n {AlertName} -g {ResourceGroup} \ - --condition category=ServiceHealth and level=Error - - summary: Create an alert with an action group and specify webhook properties. - command: > - az monitor activity-log alert create -n {AlertName} -g {ResourceGroup} \ - -a /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/microsoft.insights/actionGroups/{ActionGroup} \ - -w usage=test owner=jane - - summary: Create an alert which is initially disabled. - command: > - az monitor activity-log alert create -n {AlertName} -g {ResourceGroup} --disable -- command: - name: monitor activity-log alert update - summary: Update the details of this activity log alert - arguments: - - name: --description - summary: A description of this activity log alert. - - name: --condition - summary: The conditional expression that will cause the alert to activate. The format is FIELD=VALUE[ and FIELD=VALUE...]. - description: > - The possible values for the field are 'resourceId', 'category', 'caller', 'level', 'operationName', 'resourceGroup', - 'resourceProvider', 'status', 'subStatus', 'resourceType', or anything beginning with 'properties.'. - examples: - - summary: Update the condition - command: > - az monitor activity-log alert update -n {AlertName} -g {ResourceGroup} \ - --condition category=ServiceHealth and level=Error - - summary: Disable an alert - command: > - az monitor activity-log alert update -n {AlertName} -g {ResourceGroup} --enable false -- group: - name: monitor activity-log alert action-group - summary: Manage action groups for activity log alerts -- command: - name: monitor activity-log alert action-group add - summary: Add action groups to this activity log alert. It can also be used to overwrite existing webhook properties of particular action groups. - arguments: - - name: --name - summary: Name of the activity log alerts - - name: --action-group - summary: The names or the resource ids of the action groups to be added. - - name: --reset - summary: Remove all the existing action groups before add new conditions. - - name: --webhook-properties - summary: > - Space-separated webhook properties in 'key[=value]' format. These properties will be associated with - the action groups added in this command. - description: > - For any webhook receiver in these action group, these data are appended to the webhook payload. - To attach different webhook properties to different action groups, add the action groups in separate update-action commands. - - name: --strict - summary: Fails the command if an action group to be added will change existing webhook properties. - examples: - - summary: Add an action group and specify webhook properties. - command: | - az monitor activity-log alert action-group add -n {AlertName} -g {ResourceGroup} \ - --action /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/microsoft.insights/actionGroups/{ActionGroup} \ - --webhook-properties usage=test owner=jane - - summary: Overwite an existing action group's webhook properties. - command: | - az monitor activity-log alert action-group add -n {AlertName} -g {ResourceGroup} \ - -a /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/microsoft.insights/actionGroups/{ActionGroup} \ - --webhook-properties usage=test owner=john - - summary: Remove webhook properties from an existing action group. - command: | - az monitor activity-log alert action-group add -n {AlertName} -g {ResourceGroup} \ - -a /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/microsoft.insights/actionGroups/{ActionGroup} - - summary: Add new action groups but prevent the command from accidently overwrite existing webhook properties - command: | - az monitor activity-log alert action-group add -n {AlertName} -g {ResourceGroup} --strict \ - --action-group {ResourceIDList} -- command: - name: monitor activity-log alert action-group remove - summary: Remove action groups from this activity log alert - arguments: - - name: --name - summary: Name of the activity log alerts - - name: --action-group - summary: The names or the resource ids of the action groups to be added. -- group: - name: monitor activity-log alert scope - summary: Manage scopes for activity log alerts -- command: - name: monitor activity-log alert scope add - summary: Add scopes to this activity log alert. - arguments: - - name: --name - summary: Name of the activity log alerts - - name: --scope - summary: The scopes to add - - name: --reset - summary: Remove all the existing scopes before add new scopes. -- command: - name: monitor activity-log alert scope remove - summary: Removes scopes from this activity log alert. - arguments: - - name: --name - summary: Name of the activity log alerts - - name: --scope - summary: The scopes to remove -- command: - name: monitor activity-log list - summary: List and query activity log events. - arguments: - - name: --correlation-id - summary: Correlation ID to query. - - name: --resource-id - summary: ARM ID of a resource. - - name: --namespace - summary: Resource provider namespace. - - name: --caller - summary: Caller to query for, such as an e-mail address or service principal ID. - - name: --status - summary: > - Status to query for (ex: Failed) - - name: --max-events - summary: Maximum number of records to return. - - name: --select - summary: Space-separated list of properties to return. - - name: --offset - summary: > - Time offset of the query range, in ##d##h format. - description: > - Can be used with either --start-time or --end-time. If used with --start-time, then - the end time will be calculated by adding the offset. If used with --end-time (default), then - the start time will be calculated by subtracting the offset. If --start-time and --end-time are - provided, then --offset will be ignored. - examples: - - summary: List all events from July 1st, looking forward one week. - command: az monitor activity-log list --start-time 2018-07-01 --offset 7d - - summary: List events within the past six hours based on a correlation ID. - command: az monitor activity-log list --correlation-id b5eac9d2-e829-4c9a-9efb-586d19417c5f - - summary: List events within the past hour based on resource group. - command: az monitor activity-log list -g {ResourceGroup} --offset 1h -- command: - name: monitor activity-log list-categories - summary: List the event categories of activity logs. diff --git a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/help.yaml b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/help.yaml deleted file mode 100644 index 52c835357f8..00000000000 --- a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/help.yaml +++ /dev/null @@ -1,3223 +0,0 @@ -version: 1 -content: -- group: - name: network - summary: Manage Azure Network resources. -- command: - name: network list-usages - summary: List the number of network resources in a region that are used against a subscription quota. - examples: - - summary: List the provisioned network resources in East US region within a subscription. - command: az network list-usages --location eastus -o table -- group: - name: network application-gateway - summary: Manage application-level routing and load balancing services. - description: To learn more about Application Gateway, visit https://docs.microsoft.com/en-us/azure/application-gateway/application-gateway-create-gateway-cli -- command: - name: network application-gateway create - summary: Create an application gateway. - examples: - - summary: Create an application gateway with VMs as backend servers. - command: | - az network application-gateway create -g MyResourceGroup -n MyAppGateway --capacity 2 --sku Standard_Medium \ - --vnet-name MyVNet --subnet MySubnet --http-settings-cookie-based-affinity Enabled \ - --public-ip-address MyAppGatewayPublicIp --servers 10.0.0.4 10.0.0.5 -- command: - name: network application-gateway delete - summary: Delete an application gateway. - examples: - - summary: Delete an application gateway. - command: az network application-gateway delete -g MyResourceGroup -n MyAppGateway -- command: - name: network application-gateway list - summary: List application gateways. - examples: - - summary: List application gateways. - command: az network application-gateway list -g MyResourceGroup -- command: - name: network application-gateway show - summary: Get the details of an application gateway. - examples: - - summary: Get the details of an application gateway. - command: az network application-gateway show -g MyResourceGroup -n MyAppGateway -- command: - name: network application-gateway show-backend-health - summary: Get information on the backend health of an application gateway. - examples: - - summary: Show backend health of an application gateway. - command: az network application-gateway show-backend-health -g MyResourceGroup -n MyAppGateway -- command: - name: network application-gateway start - summary: Start an application gateway. - examples: - - summary: Start an application gateway. - command: az network application-gateway start -g MyResourceGroup -n MyAppGateway -- command: - name: network application-gateway stop - summary: Stop an application gateway. - examples: - - summary: Stop an application gateway. - command: az network application-gateway stop -g MyResourceGroup -n MyAppGateway -- command: - name: network application-gateway update - summary: Update an application gateway. -- command: - name: network application-gateway wait - summary: Place the CLI in a waiting state until a condition of the application gateway is met. - examples: - - summary: Place the CLI in a waiting state until the application gateway is created. - command: az network application-gateway wait -g MyResourceGroup -n MyAppGateway --created -- group: - name: network application-gateway address-pool - summary: Manage address pools of an application gateway. -- command: - name: network application-gateway address-pool create - summary: Create an address pool. - examples: - - summary: Create an address pool with two endpoints. - command: | - az network application-gateway address-pool create -g MyResourceGroup \ - --gateway-name MyAppGateway -n MyAddressPool --servers 10.0.0.4 10.0.0.5 -- command: - name: network application-gateway address-pool delete - summary: Delete an address pool. - examples: - - summary: Delete an address pool. - command: az network application-gateway address-pool delete -g MyResourceGroup --gateway-name MyAppGateway -n MyAddressPool -- command: - name: network application-gateway address-pool list - summary: List address pools. - examples: - - summary: List address pools. - command: az network application-gateway address-pool list -g MyResourceGroup --gateway-name MyAppGateway -- command: - name: network application-gateway address-pool show - summary: Get the details of an address pool. - examples: - - summary: Get the details of an address pool. - command: az network application-gateway address-pool show -g MyResourceGroup --gateway-name MyAppGateway -n MyAddressPool -- command: - name: network application-gateway address-pool update - summary: Update an address pool. - examples: - - summary: Update an address pool, add server. - command: az network application-gateway address-pool update -g MyResourceGroup --gateway-name MyAppGateway \ -n MyAddressPool --servers 10.0.0.4 10.0.0.5 10.0.0.6 -- group: - name: network application-gateway auth-cert - summary: Manage authorization certificates of an application gateway. -- command: - name: network application-gateway auth-cert create - summary: Create an authorization certificate. - examples: - - summary: Create an authorization certificate. - command: | - az network application-gateway auth-cert create -g MyResourceGroup --gateway-name MyAppGateway \ - -n MyAuthCert --cert-file /path/to/cert/file -- command: - name: network application-gateway auth-cert delete - summary: Delete an authorization certificate. - examples: - - summary: Delete an authorization certificate. - command: az network application-gateway auth-cert delete -g MyResourceGroup --gateway-name MyAppGateway -n MyAuthCert -- command: - name: network application-gateway auth-cert list - summary: List authorization certificates. - examples: - - summary: List authorization certificates. - command: az network application-gateway auth-cert list -g MyResourceGroup --gateway-name MyAppGateway -- command: - name: network application-gateway auth-cert show - summary: Show an authorization certificate. - examples: - - summary: Show an authorization certificate. - command: az network application-gateway auth-cert show -g MyResourceGroup --gateway-name MyAppGateway -n MyAuthCert -- command: - name: network application-gateway auth-cert update - summary: Update an authorization certificate. - examples: - - summary: Update authorization certificates to use a new cert file. - command: az network application-gateway auth-cert update -g MyResourceGroup --gateway-name MyAppGateway \ -n MyAuthCert --cert-file /path/to/new/cert/file -- group: - name: network application-gateway frontend-ip - summary: Manage frontend IP addresses of an application gateway. -- command: - name: network application-gateway frontend-ip create - summary: Create a frontend IP address. - examples: - - summary: Create a frontend IP address. - command: | - az network application-gateway frontend-ip create -g MyResourceGroup --gateway-name MyAppGateway \ - -n MyFrontendIp --public-ip-address MyPublicIpAddress -- command: - name: network application-gateway frontend-ip delete - summary: Delete a frontend IP address. - examples: - - summary: Delete a frontend IP address. - command: az network application-gateway frontend-ip delete -g MyResourceGroup --gateway-name MyAppGateway -n MyFrontendIp -- command: - name: network application-gateway frontend-ip list - summary: List frontend IP addresses. - examples: - - summary: List frontend IP addresses. - command: az network application-gateway frontend-ip list -g MyResourceGroup --gateway-name MyAppGateway -- command: - name: network application-gateway frontend-ip show - summary: Get the details of a frontend IP address. - examples: - - summary: Get the details of a frontend IP address. - command: az network application-gateway frontend-ip show -g MyResourceGroup --gateway-name MyAppGateway -n MyFrontendIp -- command: - name: network application-gateway frontend-ip update - summary: Update a frontend IP address. - examples: - - summary: Update a frontend IP address to use a new IP address. - command: az network application-gateway frontend-ip update -g MyResourceGroup --gateway-name MyAppGateway \ -n MyFrontendIp --public-ip-address MyNewPublicIpAddress -- group: - name: network application-gateway frontend-port - summary: Manage frontend ports of an application gateway. -- command: - name: network application-gateway frontend-port create - summary: Create a frontend port. - examples: - - summary: Create a frontend port. - command: | - az network application-gateway frontend-port create -g MyResourceGroup --gateway-name MyAppGateway \ - -n MyFrontendPort --port 8080 -- command: - name: network application-gateway frontend-port delete - summary: Delete a frontend port. - examples: - - summary: Delete a frontend port. - command: az network application-gateway frontend-port delete -g MyResourceGroup --gateway-name MyAppGateway -n MyFrontendPort -- command: - name: network application-gateway frontend-port list - summary: List frontend ports. - examples: - - summary: List frontend ports. - command: az network application-gateway frontend-port list -g MyResourceGroup --gateway-name MyAppGateway -- command: - name: network application-gateway frontend-port show - summary: Get the details of a frontend port. - examples: - - summary: Get the details of a frontend port. - command: az network application-gateway frontend-port show -g MyResourceGroup --gateway-name MyAppGateway -n MyFrontendPort -- command: - name: network application-gateway frontend-port update - summary: Update a frontend port. - examples: - - summary: Update a frontend port to use a different port. - command: | - az network application-gateway frontend-port update -g MyResourceGroup --gateway-name MyAppGateway \ - -n MyFrontendPort --port 8081 -- group: - name: network application-gateway http-listener - summary: Manage HTTP listeners of an application gateway. -- command: - name: network application-gateway http-listener create - summary: Create an HTTP listener. - examples: - - summary: Create an HTTP listener. - command: | - az network application-gateway http-listener create -g MyResourceGroup --gateway-name MyAppGateway \ - --frontend-port MyFrontendPort -n MyHttpListener --frontend-ip MyAppGatewayPublicIp -- command: - name: network application-gateway http-listener delete - summary: Delete an HTTP listener. - examples: - - summary: Delete an HTTP listener. - command: az network application-gateway http-listener delete -g MyResourceGroup --gateway-name MyAppGateway -n MyHttpListener -- command: - name: network application-gateway http-listener list - summary: List HTTP listeners. - examples: - - summary: List HTTP listeners. - command: az network application-gateway http-listener list -g MyResourceGroup --gateway-name MyAppGateway -- command: - name: network application-gateway http-listener show - summary: Get the details of an HTTP listener. - examples: - - summary: Get the details of an HTTP listener. - command: az network application-gateway http-listener show -g MyResourceGroup --gateway-name MyAppGateway -n MyHttpListener -- command: - name: network application-gateway http-listener update - summary: Update an HTTP listener. - examples: - - summary: Update an HTTP listener to use a different hostname. - command: | - az network application-gateway http-listener update -g MyResourceGroup --gateway-name MyAppGateway \ - -n MyHttpListener --host-name www.mynewhost.com -- group: - name: network application-gateway http-settings - summary: Manage HTTP settings of an application gateway. -- command: - name: network application-gateway http-settings create - summary: Create HTTP settings. - examples: - - summary: Create HTTP settings. - command: | - az network application-gateway http-settings create -g MyResourceGroup --gateway-name MyAppGateway \ - -n MyHttpSettings --port 80 --protocol Http --cookie-based-affinity Disabled --timeout 30 -- command: - name: network application-gateway http-settings delete - summary: Delete HTTP settings. - examples: - - summary: Delete HTTP settings. - command: az network application-gateway http-settings delete -g MyResourceGroup --gateway-name MyAppGateway -n MyHttpSettings -- command: - name: network application-gateway http-settings list - summary: List HTTP settings. - examples: - - summary: List HTTP settings. - command: az network application-gateway http-settings list -g MyResourceGroup --gateway-name MyAppGateway -- command: - name: network application-gateway http-settings show - summary: Get the details of a gateway's HTTP settings. - examples: - - summary: Get the details of a gateway's HTTP settings. - command: az network application-gateway http-settings show -g MyResourceGroup --gateway-name MyAppGateway -n MyHttpSettings -- command: - name: network application-gateway http-settings update - summary: Update HTTP settings. - examples: - - summary: Update HTTP settings to use a new probe. - command: | - az network application-gateway http-settings update -g MyResourceGroup --gateway-name MyAppGateway \ - -n MyHttpSettings --probe MyNewProbe -- group: - name: network application-gateway probe - summary: Manage probes to gather and evaluate information on a gateway. -- command: - name: network application-gateway probe create - summary: Create a probe. - examples: - - summary: Create an application gateway probe. - command: | - az network application-gateway probe create -g MyResourceGroup --gateway-name MyAppGateway \ - -n MyProbe --protocol https --host 127.0.0.1 --path /path/to/probe -- command: - name: network application-gateway probe delete - summary: Delete a probe. - examples: - - summary: Delete a probe. - command: az network application-gateway probe delete -g MyResourceGroup --gateway-name MyAppGateway -n MyProbe -- command: - name: network application-gateway probe list - summary: List probes. - examples: - - summary: List probes. - command: az network application-gateway probe list -g MyResourceGroup --gateway-name MyAppGateway -- command: - name: network application-gateway probe show - summary: Get the details of a probe. - examples: - - summary: Get the details of a probe. - command: az network application-gateway probe show -g MyResourceGroup --gateway-name MyAppGateway -n MyProbe -- command: - name: network application-gateway probe update - summary: Update a probe. - examples: - - summary: Update an application gateway probe with a timeout of 60 seconds. - command: | - az network application-gateway probe update -g MyResourceGroup --gateway-name MyAppGateway \ - -n MyProbe --timeout 60 -- group: - name: network application-gateway redirect-config - summary: Manage redirect configurations. -- command: - name: network application-gateway redirect-config create - summary: Create a redirect configuration. - examples: - - summary: Create a redirect configuration to a http-listener called MyBackendListener. - command: | - az network application-gateway redirect-config create -g MyResourceGroup \ - --gateway-name MyAppGateway -n MyRedirectConfig --type Permanent \ - --include-path true --include-query-string true --target-listener MyBackendListener -- command: - name: network application-gateway redirect-config delete - summary: Delete a redirect configuration. - examples: - - summary: Delete a redirect configuration. - command: az network application-gateway redirect-config delete -g MyResourceGroup \ --gateway-name MyAppGateway -n MyRedirectConfig -- command: - name: network application-gateway redirect-config list - summary: List redirect configurations. - examples: - - summary: List redirect configurations. - command: az network application-gateway redirect-config list -g MyResourceGroup --gateway-name MyAppGateway -- command: - name: network application-gateway redirect-config show - summary: Get the details of a redirect configuration. - examples: - - summary: Get the details of a redirect configuration. - command: az network application-gateway redirect-config show -g MyResourceGroup --gateway-name MyAppGateway -n MyRedirectConfig -- command: - name: network application-gateway redirect-config update - summary: Update a redirect configuration. - examples: - - summary: Update a redirect configuration to a different http-listener. - command: | - az network application-gateway redirect-config update -g MyResourceGroup --gateway-name MyAppGateway \ - -n MyRedirectConfig --type Permanent --target-listener MyNewBackendListener -- group: - name: network application-gateway rule - summary: Evaluate probe information and define routing rules. - description: > - For more information, visit, https://docs.microsoft.com/en-us/azure/application-gateway/application-gateway-customize-waf-rules-cli -- command: - name: network application-gateway rule create - summary: Create a rule. - description: Rules are executed in the order in which they are created. - examples: - - summary: Create a basic rule. - command: | - az network application-gateway rule create -g MyResourceGroup --gateway-name MyAppGateway \ - -n MyRule --http-listener MyBackendListener --rule-type Basic --address-pool MyAddressPool --http-settings MyHttpSettings -- command: - name: network application-gateway rule delete - summary: Delete a rule. - examples: - - summary: Delete a rule. - command: az network application-gateway rule delete -g MyResourceGroup --gateway-name MyAppGateway -n MyRule -- command: - name: network application-gateway rule list - summary: List rules. - examples: - - summary: List rules. - command: az network application-gateway rule list -g MyResourceGroup --gateway-name MyAppGateway -- command: - name: network application-gateway rule show - summary: Get the details of a rule. - examples: - - summary: Get the details of a rule. - command: az network application-gateway rule show -g MyResourceGroup --gateway-name MyAppGateway -n MyRule -- command: - name: network application-gateway rule update - summary: Update a rule. - examples: - - summary: Update a rule use a new HTTP listener. - command: | - az network application-gateway rule update -g MyResourceGroup --gateway-name MyAppGateway \ - -n MyRule --http-listener MyNewBackendListener -- group: - name: network application-gateway ssl-cert - summary: Manage SSL certificates of an application gateway. - description: For more information visit https://docs.microsoft.com/en-us/azure/application-gateway/application-gateway-ssl-cli -- command: - name: network application-gateway ssl-cert create - summary: Upload an SSL certificate. - examples: - - summary: Upload an SSL certificate. - command: | - az network application-gateway ssl-cert create -g MyResourceGroup --gateway-name MyAppGateway \ - -n MySslCert --cert-file \path\to\cert\file --cert-password Abc123 -- command: - name: network application-gateway ssl-cert delete - summary: Delete an SSL certificate. - examples: - - summary: Delete an SSL certificate. - command: az network application-gateway ssl-cert delete -g MyResourceGroup --gateway-name MyAppGateway -n MySslCert -- command: - name: network application-gateway ssl-cert list - summary: List SSL certificates. - examples: - - summary: List SSL certificates. - command: az network application-gateway ssl-cert list -g MyResourceGroup --gateway-name MyAppGateway -- command: - name: network application-gateway ssl-cert show - summary: Get the details of an SSL certificate. - examples: - - summary: Get the details of an SSL certificate. - command: az network application-gateway ssl-cert show -g MyResourceGroup --gateway-name MyAppGateway -n MySslCert -- command: - name: network application-gateway ssl-cert update - summary: Update an SSL certificate. - examples: - - summary: Change a gateway SSL certificate and password. - command: | - az network application-gateway ssl-cert update -g MyResourceGroup --gateway-name MyAppGateway -n MySslCert \ - --cert-file \path\to\new\cert\file --cert-password Abc123Abc123 -- group: - name: network application-gateway ssl-policy - summary: Manage the SSL policy of an application gateway. -- command: - name: network application-gateway ssl-policy list-options - summary: Lists available SSL options for configuring SSL policy. - examples: - - summary: List available SSL options for configuring SSL policy. - command: az network application-gateway ssl-policy list-options -- command: - name: network application-gateway ssl-policy set - summary: Update or clear SSL policy settings. - description: To view the predefined policies, use `az network application-gateway ssl-policy predefined list`. - arguments: - - name: --cipher-suites - value-sources: - - link: - command: az network application-gateway ssl-policy list-options - - name: --disabled-ssl-protocols - value-sources: - - link: - command: az network application-gateway ssl-policy list-options - - name: --min-protocol-version - value-sources: - - link: - command: az network application-gateway ssl-policy list-options - examples: - - summary: Set a predefined SSL policy. - command: | - az network application-gateway ssl-policy set -g MyResourceGroup --gateway-name MyAppGateway \ - -n AppGwSslPolicy20170401S --policy-type Predefined - - summary: Set a custom SSL policy with TLSv1_2 and the cipher suites below. - command: | - az network application-gateway ssl-policy set -g MyResourceGroup --gateway-name MyAppGateway \ - --policy-type Custom --min-protocol-version TLSv1_2 \ - --cipher-suites TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 TLS_RSA_WITH_AES_128_GCM_SHA256 -- command: - name: network application-gateway ssl-policy show - summary: Get the details of gateway's SSL policy settings. - examples: - - summary: Get the details of a gateway's SSL policy settings. - command: az network application-gateway ssl-policy show -g MyResourceGroup --gateway-name MyAppGateway -- group: - name: network application-gateway ssl-policy predefined - summary: Get information on predefined SSL policies. -- command: - name: network application-gateway ssl-policy predefined list - summary: Lists all SSL predefined policies for configuring SSL policy. - examples: - - summary: Lists all SSL predefined policies for configuring SSL policy. - command: az network application-gateway ssl-policy predefined list -- command: - name: network application-gateway ssl-policy predefined show - summary: Gets SSL predefined policy with the specified policy name. - examples: - - summary: Gets SSL predefined policy with the specified policy name. - command: az network application-gateway ssl-policy predefined show -n AppGwSslPolicy20170401 -- group: - name: network application-gateway root-cert - summary: Manage trusted root certificates of an application gateway. -- command: - name: network application-gateway root-cert create - summary: Upload a trusted root certificate. -- command: - name: network application-gateway root-cert delete - summary: Delete a trusted root certificate. - examples: - - summary: Delete a trusted root certificate. - command: az network application-gateway root-cert delete -g MyResourceGroup --gateway-name MyAppGateway -n MyRootCert -- command: - name: network application-gateway root-cert list - summary: List trusted root certificates. - examples: - - summary: List trusted root certificates. - command: az network application-gateway root-cert list -g MyResourceGroup --gateway-name MyAppGateway -- command: - name: network application-gateway root-cert show - summary: Get the details of a trusted root certificate. - examples: - - summary: Get the details of a trusted root certificate. - command: az network application-gateway root-cert show -g MyResourceGroup --gateway-name MyAppGateway -n MyRootCert -- command: - name: network application-gateway root-cert update - summary: Update a trusted root certificate. -- group: - name: network application-gateway url-path-map - summary: Manage URL path maps of an application gateway. -- command: - name: network application-gateway url-path-map create - summary: Create a URL path map. - description: > - The map must be created with at least one rule. This command requires the creation of the - first rule at the time the map is created. To learn more - visit https://docs.microsoft.com/en-us/azure/application-gateway/application-gateway-create-url-route-cli - examples: - - summary: Create a URL path map with a rule. - command: | - az network application-gateway url-path-map create -g MyResourceGroup --gateway-name MyAppGateway \ - -n MyUrlPathMap --rule-name MyUrlPathMapRule1 --paths /mypath1/* --address-pool MyAddressPool \ - --default-address-pool MyAddressPool --http-settings MyHttpSettings --default-http-settings MyHttpSettings -- command: - name: network application-gateway url-path-map delete - summary: Delete a URL path map. - examples: - - summary: Delete a URL path map. - command: az network application-gateway url-path-map delete -g MyResourceGroup --gateway-name MyAppGateway -n MyUrlPathMap -- command: - name: network application-gateway url-path-map list - summary: List URL path maps. - examples: - - summary: List URL path maps. - command: az network application-gateway url-path-map list -g MyResourceGroup --gateway-name MyAppGateway -- command: - name: network application-gateway url-path-map show - summary: Get the details of a URL path map. - examples: - - summary: Get the details of a URL path map. - command: az network application-gateway url-path-map show -g MyResourceGroup --gateway-name MyAppGateway -n MyUrlPathMap -- command: - name: network application-gateway url-path-map update - summary: Update a URL path map. - examples: - - summary: Update a URL path map to use new default HTTP settings. - command: | - az network application-gateway url-path-map update -g MyResourceGroup --gateway-name MyAppGateway \ - -n MyUrlPathMap --default-http-settings MyNewHttpSettings -- group: - name: network application-gateway url-path-map rule - summary: Manage the rules of a URL path map. -- command: - name: network application-gateway url-path-map rule create - summary: Create a rule for a URL path map. - examples: - - summary: Create a rule for a URL path map. - command: | - az network application-gateway url-path-map rule create -g MyResourceGroup \ - --gateway-name MyAppGateway -n MyUrlPathMapRule2 --path-map-name MyUrlPathMap \ - --paths /mypath2/* --address-pool MyAddressPool --http-settings MyHttpSettings -- command: - name: network application-gateway url-path-map rule delete - summary: Delete a rule of a URL path map. - examples: - - summary: Delete a rule of a URL path map. - command: | - az network application-gateway url-path-map rule delete -g MyResourceGroup --gateway-name MyAppGateway \ - --path-map-name MyUrlPathMap -n MyUrlPathMapRule2 -- group: - name: network application-gateway waf-config - summary: Configure the settings of a web application firewall. - description: > - These commands are only applicable to application gateways with an SKU type of WAF. To learn - more, visit https://docs.microsoft.com/en-us/azure/application-gateway/application-gateway-web-application-firewall-cli -- command: - name: network application-gateway waf-config list-rule-sets - summary: Get information on available WAF rule sets, rule groups, and rule IDs. - arguments: - - name: --group - summary: > - List rules for the specified rule group. Use `*` to list rules for all groups. - Omit to suppress listing individual rules. - - name: --type - summary: Rule set type to list. Omit to list all types. - - name: --version - summary: Rule set version to list. Omit to list all versions. - examples: - - summary: List available rule groups in OWASP type rule sets. - command: az network application-gateway waf-config list-rule-sets --type OWASP - - summary: List available rules in the OWASP 3.0 rule set. - command: az network application-gateway waf-config list-rule-sets --group '*' --type OWASP --version 3.0 - - summary: List available rules in the `crs_35_bad_robots` rule group. - command: az network application-gateway waf-config list-rule-sets --group crs_35_bad_robots - - summary: List available rules in table foramt. - command: az network application-gateway waf-config list-rule-sets -o table -- command: - name: network application-gateway waf-config set - summary: Update the firewall configuration of a web application. - description: > - This command is only applicable to application gateways with an SKU type of WAF. To learn - more, visit https://docs.microsoft.com/en-us/azure/application-gateway/application-gateway-web-application-firewall-cli - arguments: - - name: --rule-set-type - summary: Rule set type. - value-sources: - - link: - command: az network application-gateway waf-config list-rule-sets - - name: --rule-set-version - summary: Rule set version. - value-sources: - - link: - command: az network application-gateway waf-config list-rule-sets - - name: --disabled-rule-groups - summary: Space-separated list of rule groups to disable. To disable individual rules, use `--disabled-rules`. - value-sources: - - link: - command: az network application-gateway waf-config list-rule-sets - - name: --disabled-rules - summary: Space-separated list of rule IDs to disable. - value-sources: - - link: - command: az network application-gateway waf-config list-rule-sets - - name: --exclusion - summary: Add an exclusion expression to the WAF check. - description: | - Usage: --exclusion VARIABLE OPERATOR VALUE - - Multiple exclusions can be specified by using more than one `--exclusion` argument. - examples: - - summary: Configure WAF on an application gateway in detection mode with default values - command: | - az network application-gateway waf-config set -g MyResourceGroup --gateway-name MyAppGateway \ - --enabled true --firewall-mode Detection --rule-set-version 3.0 - - summary: Disable rules for validation of request body parsing and SQL injection. - command: | - az network application-gateway waf-config set -g MyResourceGroup --gateway-name MyAppGateway \ - --enabled true --rule-set-type OWASP --rule-set-version 3.0 \ - --disabled-rule-groups REQUEST-942-APPLICATION-ATTACK-SQLI \ - --disabled-rules 920130 920140 - - summary: Configure WAF on an application gateway with exclusions. - command: | - az network application-gateway waf-config set -g MyResourceGroup --gateway-name MyAppGateway \ - --enabled true --firewall-mode Detection --rule-set-version 3.0 \ - --exclusion "RequestHeaderNames StartsWith x-header" \ - --exclusion "RequestArgNames Equals IgnoreThis" -- command: - name: network application-gateway waf-config show - summary: Get the firewall configuration of a web application. - examples: - - summary: Get the firewall configuration of a web application. - command: az network application-gateway waf-config show -g MyResourceGroup --gateway-name MyAppGateway -- group: - name: network asg - summary: Manage application security groups (ASGs). - description: > - You can configure network security as a natural extension of an application's structure, ASG allows - you to group virtual machines and define network security policies based on those groups. You can specify an - application security group as the source and destination in a NSG security rule. For more information - visit https://docs.microsoft.com/en-us/azure/virtual-network/create-network-security-group-preview -- command: - name: network asg create - summary: Create an application security group. - arguments: - - name: --name - summary: Name of the new application security group resource. - examples: - - summary: Create an application security group. - command: az network asg create -g MyResourceGroup -n MyAsg --tags MyWebApp, CostCenter=Marketing -- command: - name: network asg delete - summary: Delete an application security group. - examples: - - summary: Delete an application security group. - command: az network asg delete -g MyResourceGroup -n MyAsg -- command: - name: network asg list - summary: List all application security groups in a subscription. - examples: - - summary: List all application security groups in a subscription. - command: az network asg list -- command: - name: network asg show - summary: Get details of an application security group. - examples: - - summary: Get details of an application security group. - command: az network asg show -g MyResourceGroup -n MyAsg -- command: - name: network asg update - summary: Update an application security group. - description: > - This command can only be used to update the tags for an application security group. - Name and resource group are immutable and cannot be updated. - examples: - - summary: Update an application security group with a modified tag value. - command: az network asg update -g MyResourceGroup -n MyAsg --set tags.CostCenter=MyBusinessGroup -- group: - name: network ddos-protection - summary: Manage DDoS Protection Plans. -- command: - name: network ddos-protection create - summary: Create a DDoS protection plan. - arguments: - - name: --vnets - description: > - This parameter can only be used if all the VNets are within the same subscription as - the DDoS protection plan. If this is not the case, set the protection plan on the VNet - directly using the `az network vnet update` command. - examples: - - summary: Create a DDoS protection plan. - command: az network ddos-protection create -g MyResourceGroup -n MyDdosPlan -- command: - name: network ddos-protection delete - summary: Delete a DDoS protection plan. - examples: - - summary: Delete a DDoS protection plan. - command: az network ddos-protection delete -g MyResourceGroup -n MyDdosPlan -- command: - name: network ddos-protection list - summary: List DDoS protection plans. - examples: - - summary: List DDoS protection plans - command: az network ddos-protection list -- command: - name: network ddos-protection show - summary: Show details of a DDoS protection plan. - examples: - - summary: Show details of a DDoS protection plan. - command: az network ddos-protection show -g MyResourceGroup -n MyDdosPlan -- command: - name: network ddos-protection update - summary: Update a DDoS protection plan. - arguments: - - name: --vnets - description: > - This parameter can only be used if all the VNets are within the same subscription as - the DDoS protection plan. If this is not the case, set the protection plan on the VNet - directly using the `az network vnet update` command. - examples: - - summary: Add a Vnet to a DDoS protection plan in the same subscription. - command: az network ddos-protection update -g MyResourceGroup -n MyDdosPlan --vnets MyVnet -- group: - name: network dns - summary: Manage DNS domains in Azure. -- group: - name: network dns record-set - summary: Manage DNS records and record sets. -- command: - name: network dns record-set list - summary: List all record sets within a DNS zone. - examples: - - summary: List all "@" record sets within this zone. - command: az network dns record-set list -g MyResourceGroup -z www.mysite.com --query "[?name=='@']" -- group: - name: network dns record-set a - summary: Manage DNS A records. -- command: - name: network dns record-set a add-record - summary: Add an A record. - examples: - - summary: Add an A record. - command: | - az network dns record-set a add-record -g MyResourceGroup -z www.mysite.com \ - -n MyRecordSet -a MyIpv4Address -- command: - name: network dns record-set a create - summary: Create an empty A record set. - examples: - - summary: Create an empty A record set. - command: az network dns record-set a create -g MyResourceGroup -z www.mysite.com -n MyRecordSet -- command: - name: network dns record-set a delete - summary: Delete an A record set and all associated records. - examples: - - summary: Delete an A record set and all associated records. - command: az network dns record-set a delete -g MyResourceGroup -z www.mysite.com -n MyRecordSet -- command: - name: network dns record-set a list - summary: List all A record sets in a zone. - examples: - - summary: List all A record sets in a zone. - command: az network dns record-set a list -g MyResourceGroup -z www.mysite.com -- command: - name: network dns record-set a remove-record - summary: Remove an A record from its record set. - description: > - By default, if the last record in a set is removed, the record set is deleted. - To retain the empty record set, include --keep-empty-record-set. - examples: - - summary: Remove an A record from its record set. - command: | - az network dns record-set a remove-record -g MyResourceGroup -z www.mysite.com \ - -n MyRecordSet -a MyIpv4Address -- command: - name: network dns record-set a show - summary: Get the details of an A record set. - examples: - - summary: Get the details of an A record set. - command: az network dns record-set a show -g MyResourceGroup -n MyRecordSet -z www.mysite.com -- command: - name: network dns record-set a update - summary: Update an A record set. - examples: - - summary: Update an A record set. - command: | - az network dns record-set a update -g MyResourceGroup -n MyRecordSet \ - -z www.mysite.com --metadata owner=WebTeam -- group: - name: network dns record-set aaaa - summary: Manage DNS AAAA records. -- command: - name: network dns record-set aaaa add-record - summary: Add an AAAA record. - examples: - - summary: Add an AAAA record. - command: | - az network dns record-set aaaa add-record -g MyResourceGroup -z www.mysite.com \ - -n MyRecordSet -a MyIpv6Address -- command: - name: network dns record-set aaaa create - summary: Create an empty AAAA record set. - examples: - - summary: Create an empty AAAA record set. - command: az network dns record-set aaaa create -g MyResourceGroup -z www.mysite.com -n MyRecordSet -- command: - name: network dns record-set aaaa delete - summary: Delete an AAAA record set and all associated records. - examples: - - summary: Delete an AAAA record set and all associated records. - command: az network dns record-set aaaa delete -g MyResourceGroup -z www.mysite.com -n MyRecordSet -- command: - name: network dns record-set aaaa list - summary: List all AAAA record sets in a zone. - examples: - - summary: List all AAAA record sets in a zone. - command: az network dns record-set aaaa list -g MyResourceGroup -z www.mysite.com -- command: - name: network dns record-set aaaa remove-record - summary: Remove AAAA record from its record set. - description: > - By default, if the last record in a set is removed, the record set is deleted. - To retain the empty record set, include --keep-empty-record-set. - examples: - - summary: Remove an AAAA record from its record set. - command: | - az network dns record-set aaaa remove-record -g MyResourceGroup -z www.mysite.com \ - -n MyRecordSet -a MyIpv6Address -- command: - name: network dns record-set aaaa show - summary: Get the details of an AAAA record set. - examples: - - summary: Get the details of an AAAA record set. - command: az network dns record-set aaaa show -g MyResourceGroup -z www.mysite.com -n MyRecordSet -- command: - name: network dns record-set aaaa update - summary: Update an AAAA record set. - examples: - - summary: Update an AAAA record set. - command: | - az network dns record-set aaaa update -g MyResourceGroup -z www.mysite.com \ - -n MyRecordSet --metadata owner=WebTeam -- group: - name: network dns record-set caa - summary: Manage DNS CAA records. -- command: - name: network dns record-set caa add-record - summary: Add a CAA record. - examples: - - summary: Add a CAA record. - command: | - az network dns record-set caa add-record -g MyResourceGroup -z www.mysite.com \ - -n MyRecordSet --flags 0 --tag "issue" --value "ca.contoso.com" -- command: - name: network dns record-set caa create - summary: Create an empty CAA record set. - examples: - - summary: Create an empty CAA record set. - command: az network dns record-set caa create -g MyResourceGroup -z www.mysite.com -n MyRecordSet -- command: - name: network dns record-set caa delete - summary: Delete a CAA record set and all associated records. - examples: - - summary: Delete a CAA record set and all associated records. - command: az network dns record-set caa delete -g MyResourceGroup -z www.mysite.com -n MyRecordSet -- command: - name: network dns record-set caa list - summary: List all CAA record sets in a zone. - examples: - - summary: List all CAA record sets in a zone. - command: az network dns record-set caa list -g MyResourceGroup -z www.mysite.com -- command: - name: network dns record-set caa remove-record - summary: Remove a CAA record from its record set. - description: > - By default, if the last record in a set is removed, the record set is deleted. - To retain the empty record set, include --keep-empty-record-set. - examples: - - summary: Remove a CAA record from its record set. - command: | - az network dns record-set caa remove-record -g MyResourceGroup -z www.mysite.com \ - -n MyRecordSet --flags 0 --tag "issue" --value "ca.contoso.com" -- command: - name: network dns record-set caa show - summary: Get the details of a CAA record set. - examples: - - summary: Get the details of a CAA record set. - command: az network dns record-set caa show -g MyResourceGroup -z www.mysite.com -n MyRecordSet -- command: - name: network dns record-set caa update - summary: Update a CAA record set. - examples: - - summary: Update a CAA record set. - command: | - az network dns record-set caa update -g MyResourceGroup -z www.mysite.com \ - -n MyRecordSet --metadata owner=WebTeam -- group: - name: network dns record-set cname - summary: Manage DNS CNAME records. -- command: - name: network dns record-set cname create - summary: Create an empty CNAME record set. - examples: - - summary: Create an empty CNAME record set. - command: az network dns record-set cname create -g MyResourceGroup -z www.mysite.com -n MyRecordSet -- command: - name: network dns record-set cname delete - summary: Delete a CNAME record set and its associated record. - examples: - - summary: Delete a CNAME record set and its associated record. - command: az network dns record-set cname delete -g MyResourceGroup -z www.mysite.com -n MyRecordSet -- command: - name: network dns record-set cname list - summary: List the CNAME record set in a zone. - examples: - - summary: List the CNAME record set in a zone. - command: az network dns record-set cname list -g MyResourceGroup -z www.mysite.com -- command: - name: network dns record-set cname remove-record - summary: Remove a CNAME record from its record set. - description: > - By default, if the last record in a set is removed, the record set is deleted. - To retain the empty record set, include --keep-empty-record-set. - examples: - - summary: Remove a CNAME record from its record set. - command: | - az network dns record-set cname remove-record -g MyResourceGroup -z www.mysite.com \ - -n MyRecordSet -c www.contoso.com -- command: - name: network dns record-set cname set-record - summary: Set the value of a CNAME record. - examples: - - summary: Set the value of a CNAME record. - command: | - az network dns record-set cname set-record -g MyResourceGroup -z www.mysite.com \ - -n MyRecordSet -c www.contoso.com -- command: - name: network dns record-set cname show - summary: Get the details of a CNAME record set. - examples: - - summary: Get the details of a CNAME record set. - command: az network dns record-set cname show -g MyResourceGroup -z www.mysite.com -n MyRecordSet -- group: - name: network dns record-set mx - summary: Manage DNS MX records. -- command: - name: network dns record-set mx add-record - summary: Add an MX record. - examples: - - summary: Add an MX record. - command: | - az network dns record-set mx add-record -g MyResourceGroup -z www.mysite.com \ - -n MyRecordSet -e mail.mysite.com -p 10 -- command: - name: network dns record-set mx create - summary: Create an empty MX record set. - examples: - - summary: Create an empty MX record set. - command: az network dns record-set mx create -g MyResourceGroup -z www.mysite.com -n MyRecordSet -- command: - name: network dns record-set mx delete - summary: Delete an MX record set and all associated records. - examples: - - summary: Delete an MX record set and all associated records. - command: az network dns record-set mx delete -g MyResourceGroup -z www.mysite.com -n MyRecordSet -- command: - name: network dns record-set mx list - summary: List all MX record sets in a zone. - examples: - - summary: List all MX record sets in a zone. - command: az network dns record-set mx list -g MyResourceGroup -z www.mysite.com -- command: - name: network dns record-set mx remove-record - summary: Remove an MX record from its record set. - description: > - By default, if the last record in a set is removed, the record set is deleted. - To retain the empty record set, include --keep-empty-record-set. - examples: - - summary: Remove an MX record from its record set. - command: | - az network dns record-set mx remove-record -g MyResourceGroup -z www.mysite.com \ - -n MyRecordSet -e mail.mysite.com -p 10 -- command: - name: network dns record-set mx show - summary: Get the details of an MX record set. - examples: - - summary: Get the details of an MX record set. - command: az network dns record-set mx show -g MyResourceGroup -z www.mysite.com -n MyRecordSet -- command: - name: network dns record-set mx update - summary: Update an MX record set. - examples: - - summary: Update an MX record set. - command: | - az network dns record-set mx update -g MyResourceGroup -z www.mysite.com \ - -n MyRecordSet --metadata owner=WebTeam -- group: - name: network dns record-set ns - summary: Manage DNS NS records. -- command: - name: network dns record-set ns add-record - summary: Add an NS record. - examples: - - summary: Add an NS record. - command: | - az network dns record-set ns add-record -g MyResourceGroup -z www.mysite.com \ - -n MyRecordSet -d ns.mysite.com -- command: - name: network dns record-set ns create - summary: Create an empty NS record set. - examples: - - summary: Create an empty NS record set. - command: az network dns record-set ns create -g MyResourceGroup -z www.mysite.com -n MyRecordSet -- command: - name: network dns record-set ns delete - summary: Delete an NS record set and all associated records. - examples: - - summary: Delete an NS record set and all associated records. - command: az network dns record-set ns delete -g MyResourceGroup -z www.mysite.com -n MyRecordSet -- command: - name: network dns record-set ns list - summary: List all NS record sets in a zone. - examples: - - summary: List all NS record sets in a zone. - command: az network dns record-set ns list -g MyResourceGroup -z www.mysite.com -- command: - name: network dns record-set ns remove-record - summary: Remove an NS record from its record set. - description: > - By default, if the last record in a set is removed, the record set is deleted. - To retain the empty record set, include --keep-empty-record-set. - examples: - - summary: Remove an NS record from its record set. - command: | - az network dns record-set ns remove-record -g MyResourceGroup -z www.mysite.com \ - -n MyRecordSet -d ns.mysite.com -- command: - name: network dns record-set ns show - summary: Get the details of an NS record set. - examples: - - summary: Get the details of an NS record set. - command: az network dns record-set ns show -g MyResourceGroup -z www.mysite.com -n MyRecordSet -- command: - name: network dns record-set ns update - summary: Update an NS record set. - examples: - - summary: Update an NS record set. - command: | - az network dns record-set ns update -g MyResourceGroup -z www.mysite.com \ - -n MyRecordSet --metadata owner=WebTeam -- group: - name: network dns record-set ptr - summary: Manage DNS PTR records. -- command: - name: network dns record-set ptr add-record - summary: Add a PTR record. - examples: - - summary: Add a PTR record. - command: | - az network dns record-set ptr add-record -g MyResourceGroup -z www.mysite.com \ - -n MyRecordSet -d another.site.com -- command: - name: network dns record-set ptr create - summary: Create an empty PTR record set. - examples: - - summary: Create an empty PTR record set. - command: az network dns record-set ptr create -g MyResourceGroup -z www.mysite.com -n MyRecordSet -- command: - name: network dns record-set ptr delete - summary: Delete a PTR record set and all associated records. - examples: - - summary: Delete a PTR record set and all associated records. - command: az network dns record-set ptr delete -g MyResourceGroup -z www.mysite.com -n MyRecordSet -- command: - name: network dns record-set ptr list - summary: List all PTR record sets in a zone. - examples: - - summary: List all PTR record sets in a zone. - command: az network dns record-set ptr list -g MyResourceGroup -z www.mysite.com -- command: - name: network dns record-set ptr remove-record - summary: Remove a PTR record from its record set. - description: > - By default, if the last record in a set is removed, the record set is deleted. - To retain the empty record set, include --keep-empty-record-set. - examples: - - summary: Remove a PTR record from its record set. - command: | - az network dns record-set ptr remove-record -g MyResourceGroup -z www.mysite.com \ - -n MyRecordSet -d another.site.com -- command: - name: network dns record-set ptr show - summary: Get the details of a PTR record set. - examples: - - summary: Get the details of a PTR record set. - command: az network dns record-set ptr show -g MyResourceGroup -z www.mysite.com -n MyRecordSet -- command: - name: network dns record-set ptr update - summary: Update a PTR record set. - examples: - - summary: Update a PTR record set. - command: | - az network dns record-set ptr update -g MyResourceGroup -z www.mysite.com \ - -n MyRecordSet --metadata owner=WebTeam -- group: - name: network dns record-set srv - summary: Manage DNS SRV records. -- command: - name: network dns record-set srv add-record - summary: Add an SRV record. - examples: - - summary: Add an SRV record. - command: | - az network dns record-set srv add-record -g MyResourceGroup -z www.mysite.com \ - -n MyRecordSet -t webserver.mysite.com -r 8081 -p 10 -w 10 -- command: - name: network dns record-set srv create - summary: Create an empty SRV record set. - examples: - - summary: Create an empty SRV record set. - command: | - az network dns record-set srv create -g MyResourceGroup -z www.mysite.com \ - -n MyRecordSet -- command: - name: network dns record-set srv delete - summary: Delete an SRV record set and all associated records. - examples: - - summary: Delete an SRV record set and all associated records. - command: az network dns record-set srv delete -g MyResourceGroup -z www.mysite.com -n MyRecordSet -- command: - name: network dns record-set srv list - summary: List all SRV record sets in a zone. - examples: - - summary: List all SRV record sets in a zone. - command: az network dns record-set srv list -g MyResourceGroup -z www.mysite.com -- command: - name: network dns record-set srv remove-record - summary: Remove an SRV record from its record set. - description: > - By default, if the last record in a set is removed, the record set is deleted. - To retain the empty record set, include --keep-empty-record-set. - examples: - - summary: Remove an SRV record from its record set. - command: | - az network dns record-set srv remove-record -g MyResourceGroup -z www.mysite.com \ - -n MyRecordSet -t webserver.mysite.com -r 8081 -p 10 -w 10 -- command: - name: network dns record-set srv show - summary: Get the details of an SRV record set. - examples: - - summary: Get the details of an SRV record set. - command: az network dns record-set srv show -g MyResourceGroup -z www.mysite.com -n MyRecordSet -- command: - name: network dns record-set srv update - summary: Update an SRV record set. - examples: - - summary: Update an SRV record set. - command: | - az network dns record-set srv update -g MyResourceGroup -z www.mysite.com \ - -n MyRecordSet --metadata owner=WebTeam -- group: - name: network dns record-set soa - summary: Manage a DNS SOA record. -- command: - name: network dns record-set soa show - summary: Get the details of an SOA record. - examples: - - summary: Get the details of an SOA record. - command: az network dns record-set soa show -g MyResourceGroup -z www.mysite.com -- command: - name: network dns record-set soa update - summary: Update properties of an SOA record. - examples: - - summary: Update properties of an SOA record. - command: | - az network dns record-set soa update -g MyResourceGroup -z www.mysite.com \ - -e myhostmaster.mysite.com -- group: - name: network dns record-set txt - summary: Manage DNS TXT records. -- command: - name: network dns record-set txt add-record - summary: Add a TXT record. - examples: - - summary: Add a TXT record. - command: | - az network dns record-set txt add-record -g MyResourceGroup -z www.mysite.com \ - -n MyRecordSet -v Owner=WebTeam -- command: - name: network dns record-set txt create - summary: Create an empty TXT record set. - examples: - - summary: Create an empty TXT record set. - command: az network dns record-set txt create -g MyResourceGroup -z www.mysite.com -n MyRecordSet -- command: - name: network dns record-set txt delete - summary: Delete a TXT record set and all associated records. - examples: - - summary: Delete a TXT record set and all associated records. - command: az network dns record-set txt delete -g MyResourceGroup -z www.mysite.com -n MyRecordSet -- command: - name: network dns record-set txt list - summary: List all TXT record sets in a zone. - examples: - - summary: List all TXT record sets in a zone. - command: az network dns record-set txt list -g MyResourceGroup -z www.mysite.com -- command: - name: network dns record-set txt remove-record - summary: Remove a TXT record from its record set. - description: > - By default, if the last record in a set is removed, the record set is deleted. - To retain the empty record set, include --keep-empty-record-set. - examples: - - summary: Remove a TXT record from its record set. - command: | - az network dns record-set txt remove-record -g MyResourceGroup -z www.mysite.com \ - -n MyRecordSet -v Owner=WebTeam -- command: - name: network dns record-set txt show - summary: Get the details of a TXT record set. - examples: - - summary: Get the details of a TXT record set. - command: az network dns record-set txt show -g MyResourceGroup -z www.mysite.com -n MyRecordSet -- command: - name: network dns record-set txt update - summary: Update a TXT record set. - examples: - - summary: Update a TXT record set. - command: | - az network dns record-set txt update -g MyResourceGroup -z www.mysite.com \ - -n MyRecordSet --metadata owner=WebTeam -- group: - name: network dns zone - summary: Manage DNS zones. -- command: - name: network dns zone create - summary: Create a DNS zone. - arguments: - - name: --if-none-match - summary: Only create a DNS zone if one doesn't exist that matches the given name. - examples: - - summary: Create a DNS zone using a fully qualified domain name. - command: > - az network dns zone create -g MyResourceGroup -n www.mysite.com -- command: - name: network dns zone delete - summary: Delete a DNS zone and all associated records. - examples: - - summary: Delete a DNS zone using a fully qualified domain name. - command: > - az network dns zone delete -g MyResourceGroup -n www.mysite.com -- command: - name: network dns zone export - summary: Export a DNS zone as a DNS zone file. - examples: - - summary: Export a DNS zone as a DNS zone file in tsv format. - command: > - az network dns zone export -g MyResourceGroup -n www.mysite.com -o mysite_com_zone.tsv -- command: - name: network dns zone import - summary: Create a DNS zone using a DNS zone file. - examples: - - summary: Import a local zone file into a DNS zone resource. - command: > - az network dns zone import -g MyResourceGroup -n MyZone -f /path/to/zone/file -- command: - name: network dns zone list - summary: List DNS zones. - examples: - - summary: List DNS zones in a resource group. - command: > - az network dns zone list -g MyResourceGroup -- command: - name: network dns zone show - summary: Get a DNS zone parameters. Does not show DNS records within the zone. - examples: - - summary: List DNS zones in a resource group. - command: > - az network dns zone show -g MyResourceGroup -n www.mysite.com -- command: - name: network dns zone update - summary: Update a DNS zone properties. Does not modify DNS records within the zone. - arguments: - - name: --if-match - summary: Update only if the resource with the same ETAG exists. - examples: - - summary: Update a DNS zone properties to change the user-defined value of a previously set tag. - command: > - az network dns zone update -g MyResourceGroup -n www.mysite.com --tags CostCenter=Marketing -- group: - name: network express-route - summary: Manage dedicated private network fiber connections to Azure. - description: > - To learn more about ExpressRoute circuits visit - https://docs.microsoft.com/en-us/azure/expressroute/howto-circuit-cli -- command: - name: network express-route create - summary: Create an ExpressRoute circuit. - arguments: - - name: --bandwidth - value-sources: - - link: - command: az network express-route list-service-providers - - name: --peering-location - value-sources: - - link: - command: az network express-route list-service-providers - - name: --provider - value-sources: - - link: - command: az network express-route list-service-providers - examples: - - summary: Create an ExpressRoute circuit. - command: | - az network express-route create --bandwidth 200 -n MyCircuit --peering-location "Silicon Valley" \ - -g MyResourceGroup --provider "Equinix" -l "West US" --sku-family MeteredData --sku-tier Standard -- command: - name: network express-route delete - summary: Delete an ExpressRoute circuit. - examples: - - summary: Delete an ExpressRoute circuit. - command: > - az network express-route delete -n MyCircuit -g MyResourceGroup -- command: - name: network express-route get-stats - summary: Get the statistics of an ExpressRoute circuit. - examples: - - summary: Get the statistics of an ExpressRoute circuit. - command: > - az network express-route get-stats -g MyResourceGroup -n MyCircuit -- command: - name: network express-route list - summary: List all ExpressRoute circuits for the current subscription. - examples: - - summary: List all ExpressRoute circuits for the current subscription. - command: > - az network express-route list -g MyResourceGroup -- command: - name: network express-route list-arp-tables - summary: Show the current Address Resolution Protocol (ARP) table of an ExpressRoute circuit. - examples: - - summary: Show the current Address Resolution Protocol (ARP) table of an ExpressRoute circuit. - command: | - az network express-route list-arp-tables -g MyResourceGroup -n MyCircuit \ - --path primary --peering-name AzurePrivatePeering -- command: - name: network express-route list-route-tables - summary: Show the current routing table of an ExpressRoute circuit peering. - examples: - - summary: Show the current routing table of an ExpressRoute circuit peering. - command: | - az network express-route list-route-tables -g MyResourceGroup -n MyCircuit \ - --path primary --peering-name AzurePrivatePeering -- command: - name: network express-route show - summary: Get the details of an ExpressRoute circuit. - examples: - - summary: Get the details of an ExpressRoute circuit. - command: > - az network express-route show -n MyCircuit -g MyResourceGroup -- command: - name: network express-route update - summary: Update settings of an ExpressRoute circuit. - examples: - - summary: Change the SKU of an ExpressRoute circuit from Standard to Premium. - command: > - az network express-route update -n MyCircuit -g MyResourceGroup --sku-tier Premium -- command: - name: network express-route list-service-providers - summary: List available ExpressRoute service providers. - examples: - - summary: List available ExpressRoute service providers. - command: az network express-route list-service-providers -- command: - name: network express-route wait - summary: Place the CLI in a waiting state until a condition of the ExpressRoute is met. - examples: - - summary: Pause executing next line of CLI script until the ExpressRoute circuit is successfully provisioned. - command: az network express-route wait -n MyCircuit -g MyResourceGroup --created -- group: - name: network express-route auth - summary: Manage authentication of an ExpressRoute circuit. - description: > - To learn more about ExpressRoute circuit authentication visit - https://docs.microsoft.com/en-us/azure/expressroute/howto-linkvnet-cli#connect-a-virtual-network-in-a-different-subscription-to-a-circuit -- command: - name: network express-route auth create - summary: Create a new link authorization for an ExpressRoute circuit. - examples: - - summary: Create a new link authorization for an ExpressRoute circuit. - command: > - az network express-route auth create --circuit-name MyCircuit -g MyResourceGroup -n MyAuthorization -- command: - name: network express-route auth delete - summary: Delete a link authorization of an ExpressRoute circuit. - examples: - - summary: Delete a link authorization of an ExpressRoute circuit. - command: > - az network express-route auth delete --circuit-name MyCircuit -g MyResourceGroup -n MyAuthorization -- command: - name: network express-route auth list - summary: List link authorizations of an ExpressRoute circuit. - examples: - - summary: List link authorizations of an ExpressRoute circuit. - command: > - az network express-route auth list -g MyResourceGroup --circuit-name MyCircuit -- command: - name: network express-route auth show - summary: Get the details of a link authorization of an ExpressRoute circuit. - examples: - - summary: Get the details of a link authorization of an ExpressRoute circuit. - command: > - az network express-route auth show -g MyResourceGroup --circuit-name MyCircuit -n MyAuthorization -- group: - name: network express-route peering - summary: Manage ExpressRoute peering of an ExpressRoute circuit. -- command: - name: network express-route peering create - summary: Create peering settings for an ExpressRoute circuit. - examples: - - summary: Create Microsoft Peering settings with IPv4 configuration. - command: | - az network express-route peering create -g MyResourceGroup --circuit-name MyCircuit \ - --peering-type MicrosoftPeering --peer-asn 10002 --vlan-id 103 \ - --primary-peer-subnet 101.0.0.0/30 --secondary-peer-subnet 102.0.0.0/30 \ - --advertised-public-prefixes 101.0.0.0/30 -- command: - name: network express-route peering delete - summary: Delete peering settings. - examples: - - summary: Delete private peering. - command: > - az network express-route peering delete -g MyResourceGroup --circuit-name MyCircuit -n AzurePrivatePeering -- command: - name: network express-route peering list - summary: List peering settings of an ExpressRoute circuit. - examples: - - summary: List peering settings of an ExpressRoute circuit. - command: > - az network express-route peering list -g MyResourceGroup --circuit-name MyCircuit -- command: - name: network express-route peering show - summary: Get the details of an express route peering. - examples: - - summary: Get private peering details of an ExpressRoute circuit. - command: > - az network express-route peering show -g MyResourceGroup --circuit-name MyCircuit -n AzurePrivatePeering -- command: - name: network express-route peering update - summary: Update peering settings of an ExpressRoute circuit. - examples: - - summary: Add IPv6 Microsoft Peering settings to existing IPv4 config. - command: | - az network express-route peering update -g MyResourceGroup --circuit-name MyCircuit \ - --ip-version ipv6 --primary-peer-subnet 2002:db00::/126 \ - --secondary-peer-subnet 2003:db00::/126 --advertised-public-prefixes 2002:db00::/126 - min_profile: latest -- group: - name: network express-route peering connection - summary: Manage ExpressRoute circuit connections. -- command: - name: network express-route peering connection create - summary: Create connections between two ExpressRoute circuits. - examples: - - summary: Create connection between two ExpressRoute circuits with AzurePrivatePeering settings. - command: | - az network express-route peering connection create -g MyResourceGroup --circuit-name \ - MyCircuit --peering-name AzurePrivatePeering -n myConnection --peer-circuit \ - MyOtherCircuit --address-prefix 104.0.0.0/29 -- command: - name: network express-route peering connection delete - summary: Delete an ExpressRoute circuit connection. -- command: - name: network express-route peering connection show - summary: Get the details of an ExpressRoute circuit connection. -- group: - name: network interface-endpoint - summary: Manage interface endpoints. -- command: - name: network interface-endpoint list - summary: List interface endpoints. -- command: - name: network interface-endpoint show - summary: Get the details of an interface endpoint. -- group: - name: network private-endpoint - summary: Manage private endpoints. -- command: - name: network private-endpoint list - summary: List private endpoints. -- command: - name: network private-endpoint show - summary: Get the details of an private endpoint. -- group: - name: network lb - summary: Manage and configure load balancers. - description: To learn more about Azure Load Balancer visit https://docs.microsoft.com/en-us/azure/load-balancer/load-balancer-get-started-internet-arm-cli -- command: - name: network lb create - summary: Create a load balancer. - examples: - - summary: Create a basic load balancer. - command: > - az network lb create -g MyResourceGroup -n MyLb --sku Basic - - summary: Create a basic internal load balancer on a specific virtual network and subnet. - command: > - az network lb create -g MyResourceGroup -n MyLb --sku Basic --vnet-name MyVnet --subnet MySubnet - - summary: Create a basic zone flavored internal load balancer, through provisioning a zonal public ip. - command: > - az network lb create -g MyResourceGroup -n MyLb --sku Basic --public-ip-zone 2 - - summary: > - Create a standard zone flavored public-facing load balancer, through provisioning a - zonal frontend ip configuration and Vnet. - command: > - az network lb create -g MyResourceGroup -n MyLb --sku Standard --frontend-ip-zone 1 --vnet-name MyVnet --subnet MySubnet -- command: - name: network lb delete - summary: Delete a load balancer. - examples: - - summary: Delete a load balancer. - command: az network lb delete -g MyResourceGroup -n MyLb -- command: - name: network lb list - summary: List load balancers. - examples: - - summary: List load balancers. - command: az network lb list -g MyResourceGroup -- command: - name: network lb show - summary: Get the details of a load balancer. - examples: - - summary: Get the details of a load balancer. - command: az network lb show -g MyResourceGroup -n MyLb -- command: - name: network lb update - summary: Update a load balancer. - description: > - This command can only be used to update the tags for a load balancer. Name and resource group are immutable and cannot be updated. - examples: - - summary: Update the tags of a load balancer. - command: az network lb update -g MyResourceGroup -n MyLb --set tags.CostCenter=MyBusinessGroup -- group: - name: network lb address-pool - summary: Manage address pools of a load balancer. -- command: - name: network lb address-pool create - summary: Create an address pool. - examples: - - summary: Create an address pool. - command: az network lb address-pool create -g MyResourceGroup --lb-name MyLb -n MyAddressPool -- command: - name: network lb address-pool delete - summary: Delete an address pool. - examples: - - summary: Delete an address pool. - command: az network lb address-pool delete -g MyResourceGroup --lb-name MyLb -n MyAddressPool -- command: - name: network lb address-pool list - summary: List address pools. - examples: - - summary: List address pools. - command: az network lb address-pool list -g MyResourceGroup --lb-name MyLb -o table -- command: - name: network lb address-pool show - summary: Get the details of an address pool. - examples: - - summary: Get the details of an address pool. - command: az network lb address-pool show -g MyResourceGroup --lb-name MyLb -n MyAddressPool -- group: - name: network lb frontend-ip - summary: Manage frontend IP addresses of a load balancer. -- command: - name: network lb frontend-ip create - summary: Create a frontend IP address. - examples: - - summary: Create a frontend ip address for a public load balancer. - command: az network lb frontend-ip create -g MyResourceGroup -n MyFrontendIp --lb-name MyLb --public-ip-address MyFrontendIp - - summary: Create a frontend ip address for an internal load balancer. - command: | - az network lb frontend-ip create -g MyResourceGroup -n MyFrontendIp --lb-name MyLb \ - --private-ip-address 10.10.10.100 --subnet MySubnet --vnet-name MyVnet -- command: - name: network lb frontend-ip delete - summary: Delete a frontend IP address. - examples: - - summary: Delete a frontend IP address. - command: az network lb frontend-ip delete -g MyResourceGroup --lb-name MyLb -n MyFrontendIp -- command: - name: network lb frontend-ip list - summary: List frontend IP addresses. - examples: - - summary: List frontend IP addresses. - command: az network lb frontend-ip list -g MyResourceGroup --lb-name MyLb -- command: - name: network lb frontend-ip show - summary: Get the details of a frontend IP address. - examples: - - summary: Get the details of a frontend IP address. - command: az network lb frontend-ip show -g MyResourceGroup --lb-name MyLb -n MyFrontendIp -- command: - name: network lb frontend-ip update - summary: Update a frontend IP address. - examples: - - summary: Update the frontend IP address of a public load balancer. - command: az network lb frontend-ip update -g MyResourceGroup --lb-name MyLb -n MyFrontendIp --public-ip-address MyNewPublicIp - - summary: Update the frontend IP address of an internal load balancer. - command: az network lb frontend-ip update -g MyResourceGroup --lb-name MyLb -n MyFrontendIp --private-ip-address 10.10.10.50 -- group: - name: network lb inbound-nat-pool - summary: Manage inbound NAT address pools of a load balancer. -- command: - name: network lb inbound-nat-pool create - summary: Create an inbound NAT address pool. - examples: - - summary: Create an inbound NAT address pool. - command: | - az network lb inbound-nat-pool create -g MyResourceGroup --lb-name MyLb \ - -n MyNatPool --protocol Tcp --frontend-port-range-start 80 --frontend-port-range-end 89 \ - --backend-port 80 --frontend-ip-name MyFrontendIp -- command: - name: network lb inbound-nat-pool delete - summary: Delete an inbound NAT address pool. - examples: - - summary: Delete an inbound NAT address pool. - command: az network lb inbound-nat-pool delete -g MyResourceGroup --lb-name MyLb -n MyNatPool -- command: - name: network lb inbound-nat-pool list - summary: List inbound NAT address pools. - examples: - - summary: List inbound NAT address pools. - command: az network lb inbound-nat-pool list -g MyResourceGroup --lb-name MyLb -o table -- command: - name: network lb inbound-nat-pool show - summary: Get the details of an inbound NAT address pool. - examples: - - summary: Get the details of an inbound NAT address pool. - command: az network lb inbound-nat-pool show -g MyResourceGroup --lb-name MyLb -n MyNatPool -- command: - name: network lb inbound-nat-pool update - summary: Update an inbound NAT address pool. - examples: - - summary: Update an inbound NAT address pool to a different backend port. - command: | - az network lb inbound-nat-pool update -g MyResourceGroup --lb-name MyLb -n MyNatPool \ - --protocol Tcp --backend-port 8080 -- group: - name: network lb inbound-nat-rule - summary: Manage inbound NAT rules of a load balancer. -- command: - name: network lb inbound-nat-rule create - summary: Create an inbound NAT rule. - examples: - - summary: Create a basic inbound NAT rule for port 80. - command: | - az network lb inbound-nat-rule create -g MyResourceGroup --lb-name MyLb -n MyNatRule \ - --protocol Tcp --frontend-port 80 --backend-port 80 - - summary: Create a basic inbound NAT rule for a specific frontend IP and enable floating IP for NAT Rule. - command: | - az network lb inbound-nat-rule create -g MyResourceGroup --lb-name MyLb -n MyNatRule --protocol Tcp \ - --frontend-port 5432 --backend-port 3389 --frontend-ip-name MyFrontendIp --floating-ip true -- command: - name: network lb inbound-nat-rule delete - summary: Delete an inbound NAT rule. - examples: - - summary: Delete an inbound NAT rule. - command: az network lb inbound-nat-rule delete -g MyResourceGroup --lb-name MyLb -n MyNatRule -- command: - name: network lb inbound-nat-rule list - summary: List inbound NAT rules. - examples: - - summary: List inbound NAT rules. - command: az network lb inbound-nat-rule list -g MyResourceGroup --lb-name MyLb -o table -- command: - name: network lb inbound-nat-rule show - summary: Get the details of an inbound NAT rule. - examples: - - summary: Get the details of an inbound NAT rule. - command: az network lb inbound-nat-rule show -g MyResourceGroup --lb-name MyLb -n MyNatRule -- command: - name: network lb inbound-nat-rule update - summary: Update an inbound NAT rule. - examples: - - summary: Update an inbound NAT rule to disable floating IP and modify idle timeout duration. - command: | - az network lb inbound-nat-rule update -g MyResourceGroup --lb-name MyLb -n MyNatRule \ - --floating-ip false --idle-timeout 5 -- group: - name: network lb outbound-rule - summary: Manage outbound rules of a load balancer. -- command: - name: network lb outbound-rule create - summary: Create an outbound-rule. -- command: - name: network lb outbound-rule delete - summary: Delete an outbound-rule. -- command: - name: network lb outbound-rule list - summary: List outbound rules. -- command: - name: network lb outbound-rule show - summary: Get the details of an outbound rule. -- command: - name: network lb outbound-rule update - summary: Update an outbound-rule. -- group: - name: network lb probe - summary: Evaluate probe information and define routing rules. -- command: - name: network lb probe create - summary: Create a probe. - examples: - - summary: Create a probe on a load balancer over HTTP and port 80. - command: | - az network lb probe create -g MyResourceGroup --lb-name MyLb -n MyProbe \ - --protocol http --port 80 --path / - - summary: Create a probe on a load balancer over TCP on port 443. - command: | - az network lb probe create -g MyResourceGroup --lb-name MyLb -n MyProbe \ - --protocol tcp --port 443 -- command: - name: network lb probe delete - summary: Delete a probe. - examples: - - summary: Delete a probe. - command: az network lb probe delete -g MyResourceGroup --lb-name MyLb -n MyProbe -- command: - name: network lb probe list - summary: List probes. - examples: - - summary: List probes. - command: az network lb probe list -g MyResourceGroup --lb-name MyLb -o table -- command: - name: network lb probe show - summary: Get the details of a probe. - examples: - - summary: Get the details of a probe. - command: az network lb probe show -g MyResourceGroup --lb-name MyLb -n MyProbe -- command: - name: network lb probe update - summary: Update a probe. - examples: - - summary: Update a probe with a different port and interval. - command: az network lb probe update -g MyResourceGroup --lb-name MyLb -n MyProbe --port 81 --interval 10 -- group: - name: network lb rule - summary: Manage load balancing rules. -- command: - name: network lb rule create - summary: Create a load balancing rule. - examples: - - summary: > - Create a load balancing rule that assigns a front-facing IP configuration and port to - an address pool and port. - command: | - az network lb rule create -g MyResourceGroup --lb-name MyLb -n MyLbRule --protocol Tcp \ - --frontend-ip-name MyFrontEndIp --frontend-port 80 \ - --backend-pool-name MyAddressPool --backend-port 80 - - summary: > - Create a load balancing rule that assigns a front-facing IP configuration and port to - an address pool and port with the floating ip feature. - command: | - az network lb rule create -g MyResourceGroup --lb-name MyLb -n MyLbRule --protocol Tcp \ - --frontend-ip-name MyFrontEndIp --backend-pool-name MyAddressPool \ - --floating-ip true --frontend-port 80 --backend-port 80 - - summary: > - Create an HA ports load balancing rule that assigns a frontend IP and port to use all - available backend IPs in a pool on the same port. - command: | - az network lb rule create -g MyResourceGroup --lb-name MyLb -n MyHAPortsRule \ - --protocol All --frontend-port 0 --backend-port 0 --frontend-ip-name MyFrontendIp \ - --backend-pool-name MyAddressPool -- command: - name: network lb rule delete - summary: Delete a load balancing rule. - examples: - - summary: Delete a load balancing rule. - command: az network lb rule delete -g MyResourceGroup --lb-name MyLb -n MyLbRule -- command: - name: network lb rule list - summary: List load balancing rules. - examples: - - summary: List load balancing rules. - command: az network lb rule list -g MyResourceGroup --lb-name MyLb -o table -- command: - name: network lb rule show - summary: Get the details of a load balancing rule. - examples: - - summary: Get the details of a load balancing rule. - command: az network lb rule show -g MyResourceGroup --lb-name MyLb -n MyLbRule -- command: - name: network lb rule update - summary: Update a load balancing rule. - examples: - - summary: Update a load balancing rule to change the protocol to UDP. - command: az network lb rule update -g MyResourceGroup --lb-name MyLb -n MyLbRule --protocol Udp - - summary: Update a load balancing rule to support HA ports. - command: az network lb rule update -g MyResourceGroup --lb-name MyLb -n MyLbRule \ --protocol All --frontend-port 0 --backend-port 0 -- group: - name: network local-gateway - summary: Manage local gateways. - description: > - For more information on local gateways, visit: https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-howto-site-to-site-resource-manager-cli#localnet -- command: - name: network local-gateway create - summary: Create a local VPN gateway. - examples: - - summary: Create a Local Network Gateway to represent your on-premises site. - command: | - az network local-gateway create -g MyResourceGroup -n MyLocalGateway \ - --gateway-ip-address 23.99.221.164 --local-address-prefixes 10.0.0.0/24 20.0.0.0/24 -- command: - name: network local-gateway delete - summary: Delete a local VPN gateway. - description: > - In order to delete a Local Network Gateway, you must first delete ALL Connection objects in Azure - that are connected to the Gateway. After deleting the Gateway, proceed to delete other resources now not in use. - For more information, follow the order of instructions on this page: https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-delete-vnet-gateway-portal - examples: - - summary: Create a Local Network Gateway to represent your on-premises site. - command: az network local-gateway delete -g MyResourceGroup -n MyLocalGateway -- command: - name: network local-gateway list - summary: List all local VPN gateways in a resource group. - examples: - - summary: List all local VPN gateways in a resource group. - command: az network local-gateway list -g MyResourceGroup -- command: - name: network local-gateway show - summary: Get the details of a local VPN gateway. - examples: - - summary: Get the details of a local VPN gateway. - command: az network local-gateway show -g MyResourceGroup -n MyLocalGateway -- command: - name: network local-gateway update - summary: Update a local VPN gateway. - examples: - - summary: Update a Local Network Gateway provisioned with a 10.0.0.0/24 address prefix with additional prefixes. - command: | - az network local-gateway update -g MyResourceGroup -n MyLocalGateway \ - --local-address-prefixes 10.0.0.0/24 20.0.0.0/24 30.0.0.0/24 -- command: - name: network local-gateway wait - summary: Place the CLI in a waiting state until a condition of the local gateway is met. - examples: - - summary: Wait for Local Network Gateway to return as created. - command: | - az network local-gateway wait -g MyResourceGroup -n MyLocalGateway --created -- group: - name: network nic - summary: Manage network interfaces. - description: > - To learn more about network interfaces in Azure visit https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-network-interface -- command: - name: network nic create - summary: Create a network interface. - examples: - - summary: Create a network interface for a specified subnet on a specified virtual network. - command: > - az network nic create -g MyResourceGroup --vnet-name MyVnet --subnet MySubnet -n MyNic - - summary: > - Create a network interface for a specified subnet on a virtual network which allows - IP forwarding subject to a network security group. - command: | - az network nic create -g MyResourceGroup --vnet-name MyVnet --subnet MySubnet -n MyNic \ - --ip-forwarding --network-security-group MyNsg - - summary: > - Create a network interface for a specified subnet on a virtual network with network security group and application security groups. - command: | - az network nic create -g MyResourceGroup --vnet-name MyVnet --subnet MySubnet -n MyNic \ - --network-security-group MyNsg --application-security-groups Web App -- command: - name: network nic delete - summary: Delete a network interface. - examples: - - summary: Delete a network interface. - command: > - az network nic delete -g MyResourceGroup -n MyNic -- command: - name: network nic list - summary: List network interfaces. - description: > - To list network interfaces attached to VMs in VM scale sets use 'az vmss nic list' or 'az vmss nic list-vm-nics'. - examples: - - summary: List all NICs by internal DNS suffix. - command: > - az network nic list --query "[?dnsSettings.internalDomainNameSuffix=`{dnsSuffix}`]" -- command: - name: network nic list-effective-nsg - summary: List all effective network security groups applied to a network interface. - description: > - To learn more about troubleshooting using effective security rules visit https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-nsg-troubleshoot-portal - examples: - - summary: List the effective security groups associated with a NIC. - command: az network nic list-effective-nsg -g MyResourceGroup -n MyNic -- command: - name: network nic show - summary: Get the details of a network interface. - examples: - - summary: Get the internal domain name suffix of a NIC. - command: az network nic show -g MyResourceGroup -n MyNic --query "dnsSettings.internalDomainNameSuffix" -- command: - name: network nic wait - summary: Place the CLI in a waiting state until a condition of the network interface is met. - examples: - - summary: Pause CLI until the network interface is created. - command: az network nic wait -g MyResourceGroup -n MyNic --created -- command: - name: network nic show-effective-route-table - summary: Show the effective route table applied to a network interface. - description: > - To learn more about troubleshooting using the effective route tables visit - https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-routes-troubleshoot-portal#using-effective-routes-to-troubleshoot-vm-traffic-flow - examples: - - summary: Show the effective routes applied to a network interface. - command: az network nic show-effective-route-table -g MyResourceGroup -n MyNic -- command: - name: network nic update - summary: Update a network interface. - examples: - - summary: Update a network interface to use a different network security group. - command: az network nic update -g MyResourceGroup -n MyNic --network-security-group MyNewNsg -- group: - name: network nic ip-config - summary: Manage IP configurations of a network interface. -- command: - name: network nic ip-config create - summary: Create an IP configuration. - description: > - You must have the Microsoft.Network/AllowMultipleIpConfigurationsPerNic feature enabled for your subscription. - Only one configuration may be designated as the primary IP configuration per NIC, using the `--make-primary` flag. - examples: - - summary: Create a primary IP configuration for a NIC. - command: az network nic ip-config create -g MyResourceGroup -n MyIpConfig --nic-name MyNic --make-primary -- command: - name: network nic ip-config delete - summary: Delete an IP configuration. - description: A NIC must have at least one IP configuration. - examples: - - summary: Delete an IP configuration. - command: az network nic ip-config delete -g MyResourceGroup -n MyIpConfig --nic-name MyNic -- command: - name: network nic ip-config list - summary: List the IP configurations of a NIC. - examples: - - summary: List the IP configurations of a NIC. - command: az network nic ip-config list -g MyResourceGroup --nic-name MyNic -- command: - name: network nic ip-config show - summary: Show the details of an IP configuration. - examples: - - summary: Show the details of an IP configuration of a NIC. - command: az network nic ip-config show -g MyResourceGroup -n MyIpConfig --nic-name MyNic -- command: - name: network nic ip-config update - summary: Update an IP configuration. - examples: - - summary: Update a NIC to use a new private IP address. - command: | - az network nic ip-config update -g MyResourceGroup --nic-name MyNic \ - -n MyIpConfig --private-ip-address 10.0.0.9 - - summary: Make an IP configuration the default for the supplied NIC. - command: | - az network nic ip-config update -g MyResourceGroup --nic-name MyNic \ - -n MyIpConfig --make-primary -- group: - name: network nic ip-config address-pool - summary: Manage address pools in an IP configuration. -- command: - name: network nic ip-config address-pool add - summary: Add an address pool to an IP configuration. - examples: - - summary: Add an address pool to an IP configuration. - command: | - az network nic ip-config address-pool add -g MyResourceGroup --nic-name MyNic \ - -n MyIpConfig --address-pool MyAddressPool -- command: - name: network nic ip-config address-pool remove - summary: Remove an address pool of an IP configuration. - examples: - - summary: Remove an address pool of an IP configuration. - command: | - az network nic ip-config address-pool remove -g MyResourceGroup --nic-name MyNic \ - -n MyIpConfig --address-pool MyAddressPool -- group: - name: network nic ip-config inbound-nat-rule - summary: Manage inbound NAT rules of an IP configuration. -- command: - name: network nic ip-config inbound-nat-rule add - summary: Add an inbound NAT rule to an IP configuration. - examples: - - summary: Add an inbound NAT rule to an IP configuration. - command: | - az network nic ip-config inbound-nat-rule add -g MyResourceGroup --nic-name MyNic \ - -n MyIpConfig --inbound-nat-rule MyNatRule -- command: - name: network nic ip-config inbound-nat-rule remove - summary: Remove an inbound NAT rule of an IP configuration. - examples: - - summary: Remove an inbound NAT rule of an IP configuration. - command: | - az network nic ip-config inbound-nat-rule remove -g MyResourceGroup --nic-name MyNic \ - -n MyIpConfig --inbound-nat-rule MyNatRule -- group: - name: network nsg - summary: Manage Azure Network Security Groups (NSGs). - description: > - You can control network traffic to resources in a virtual network using a network security group. - A network security group contains a list of security rules that allow or deny inbound or - outbound network traffic based on source or destination IP addresses, Application Security - Groups, ports, and protocols. For more information visit https://docs.microsoft.com/en-us/azure/virtual-network/virtual-networks-create-nsg-arm-cli -- command: - name: network nsg create - summary: Create a network security group. - examples: - - summary: Create an NSG in a resource group within a region with tags. - command: az network nsg create -g MyResourceGroup -n MyNsg --tags super_secure no_80 no_22 -- command: - name: network nsg delete - summary: Delete a network security group. - examples: - - summary: Delete an NSG in a resource group. - command: az network nsg delete -g MyResourceGroup -n MyNsg -- command: - name: network nsg list - summary: List network security groups. - examples: - - summary: List all NSGs in the 'westus' region. - command: az network nsg list --query "[?location=='westus']" -- command: - name: network nsg show - summary: Get information about a network security group. - examples: - - summary: Get basic information about an NSG. - command: az network nsg show -g MyResourceGroup -n MyNsg - - summary: Get the default security rules of an NSG and format the output as a table. - command: az network nsg show -g MyResourceGroup -n MyNsg --query "defaultSecurityRules[]" -o table - - summary: Get all default NSG rules with "Allow" access and format the output as a table. - command: az network nsg show -g MyResourceGroup -n MyNsg --query "defaultSecurityRules[?access=='Allow']" -o table -- command: - name: network nsg update - summary: Update a network security group. - description: > - This command can only be used to update the tags of an NSG. Name and resource group are immutable and cannot be updated. - examples: - - summary: Remove a tag of an NSG. - command: az network nsg update -g MyResourceGroup -n MyNsg --remove tags.no_80 -- group: - name: network nsg rule - summary: Manage network security group rules. -- command: - name: network nsg rule create - summary: Create a network security group rule. - examples: - - summary: Create a basic "Allow" NSG rule with the highest priority. - command: > - az network nsg rule create -g MyResourceGroup --nsg-name MyNsg -n MyNsgRule --priority 100 - - summary: Create a "Deny" rule over TCP for a specific IP address range with the lowest priority. - command: | - az network nsg rule create -g MyResourceGroup --nsg-name MyNsg -n MyNsgRule --priority 4096 \ - --source-address-prefixes 208.130.28/24 --source-port-ranges 80 \ - --destination-address-prefixes '*' --destination-port-ranges 80 8080 --access Deny \ - --protocol Tcp --description "Deny from specific IP address ranges on 80 and 8080." - - summary: Create a security rule using service tags. For more details visit https://aka.ms/servicetags - command: | - az network nsg rule create -g MyResourceGroup --nsg-name MyNsg -n MyNsgRuleWithTags \ - --priority 400 --source-address-prefixes VirtualNetwork --destination-address-prefixes Storage \ - --destination-port-ranges * --direction Outbound --access Allow --protocol Tcp --description "Allow VirtualNetwork to Storage." - - summary: Create a security rule using application security groups. https://aka.ms/applicationsecuritygroups - command: | - az network nsg rule create -g MyResourceGroup --nsg-name MyNsg -n MyNsgRuleWithAsg \ - --priority 500 --source-address-prefixes Internet --destination-port-ranges 80 8080 \ - --destination-asgs Web --access Allow --protocol Tcp --description "Allow Internet to Web ASG on ports 80,8080." -- command: - name: network nsg rule delete - summary: Delete a network security group rule. - examples: - - summary: Delete a network security group rule. - command: az network nsg rule delete -g MyResourceGroup --nsg-name MyNsg -n MyNsgRule -- command: - name: network nsg rule list - summary: List all rules in a network security group. - examples: - - summary: List all rules in a network security group. - command: az network nsg rule list -g MyResourceGroup --nsg-name MyNsg -- command: - name: network nsg rule show - summary: Get the details of a network security group rule. - examples: - - summary: Get the details of a network security group rule. - command: az network nsg rule show -g MyResourceGroup --nsg-name MyNsg -n MyNsgRule -- command: - name: network nsg rule update - summary: Update a network security group rule. - examples: - - summary: Update an NSG rule with a new wildcard destination address prefix. - command: az network nsg rule update -g MyResourceGroup --nsg-name MyNsg -n MyNsgRule --destination-address-prefix '*' -- group: - name: network profile - summary: Manage network profiles. - description: > - To create a network profile, see the create command for the relevant resource. Currently, - only Azure Container Instances are supported. -- command: - name: network profile delete - summary: Delete a network profile. -- command: - name: network profile list - summary: List network profiles. -- command: - name: network profile show - summary: Get the details of a network profile. -- group: - name: network public-ip - summary: Manage public IP addresses. - description: > - To learn more about public IP addresses visit https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-public-ip-address -- command: - name: network public-ip create - summary: Create a public IP address. - examples: - - summary: Create a basic public IP resource. - command: az network public-ip create -g MyResourceGroup -n MyIp - - summary: Create a static public IP resource for a DNS name label. - command: az network public-ip create -g MyResourceGroup -n MyIp --dns-name MyLabel --allocation-method Static - - summary: Create a public IP resource in an availability zone in the current resource group region. - command: az network public-ip create -g MyResourceGroup -n MyIp --zone 2 -- command: - name: network public-ip delete - summary: Delete a public IP address. - examples: - - summary: Delete a public IP address. - command: az network public-ip delete -g MyResourceGroup -n MyIp -- command: - name: network public-ip list - summary: List public IP addresses. - examples: - - summary: List all public IPs in a subscription. - command: az network public-ip list - - summary: List all public IPs in a resource group. - command: az network public-ip list -g MyResourceGroup - - summary: List all public IPs of a domain name label. - command: az network public-ip list -g MyResourceGroup --query "[?dnsSettings.domainNameLabel=='MyLabel']" -- command: - name: network public-ip show - summary: Get the details of a public IP address. - examples: - - summary: Get information about a public IP resource. - command: az network public-ip show -g MyResourceGroup -n MyIp - - summary: Get the FQDN and IP address of a public IP resource. - command: > - az network public-ip show -g MyResourceGroup -n MyIp --query "{fqdn: dnsSettings.fqdn, address: ipAddress}" -- command: - name: network public-ip update - summary: Update a public IP address. - examples: - - summary: Update a public IP resource with a DNS name label and static allocation. - command: az network public-ip update -g MyResourceGroup -n MyIp --dns-name MyLabel --allocation-method Static -- group: - name: network public-ip prefix - summary: Manage public IP prefix resources. -- command: - name: network public-ip prefix create - summary: Create a public IP prefix resource. -- command: - name: network public-ip prefix delete - summary: Delete a public IP prefix resource. -- command: - name: network public-ip prefix list - summary: List public IP prefix resources. -- command: - name: network public-ip prefix show - summary: Get the details of a public IP prefix resource. -- command: - name: network public-ip prefix update - summary: Update a public IP prefix resource. -- group: - name: network route-table - summary: Manage route tables. -- command: - name: network route-table create - summary: Create a route table. - examples: - - summary: Create a route table. - command: az network route-table create -g MyResourceGroup -n MyRouteTable -- command: - name: network route-table delete - summary: Delete a route table. - examples: - - summary: Delete a route table. - command: az network route-table delete -g MyResourceGroup -n MyRouteTable -- command: - name: network route-table list - summary: List route tables. - examples: - - summary: List all route tables in a subscription. - command: az network route-table list -g MyResourceGroup -- command: - name: network route-table show - summary: Get the details of a route table. - examples: - - summary: Get the details of a route table. - command: az network route-table show -g MyResourceGroup -n MyRouteTable -- command: - name: network route-table update - summary: Update a route table. - examples: - - summary: Update a route table to disable BGP route propogation. - command: az network route-table update -g MyResourceGroup -n MyRouteTable --disable-bgp-route-propagation true -- group: - name: network route-table route - summary: Manage routes in a route table. -- command: - name: network route-table route create - summary: Create a route in a route table. - examples: - - summary: Create a route that forces all inbound traffic to a Network Virtual Appliance. - command: | - az network route-table route create -g MyResourceGroup --route-table-name MyRouteTable -n MyRoute \ - --next-hop-type VirtualAppliance --address-prefix 10.0.0.0/16 --next-hop-ip-address 10.0.100.4 -- command: - name: network route-table route delete - summary: Delete a route from a route table. - examples: - - summary: Delete a route from a route table. - command: az network route-table route delete -g MyResourceGroup --route-table-name MyRouteTable -n MyRoute -- command: - name: network route-table route list - summary: List routes in a route table. - examples: - - summary: List routes in a route table. - command: az network route-table route list -g MyResourceGroup --route-table-name MyRouteTable -- command: - name: network route-table route show - summary: Get the details of a route in a route table. - examples: - - summary: Get the details of a route in a route table. - command: az network route-table route show -g MyResourceGroup --route-table-name MyRouteTable -n MyRoute -o table -- command: - name: network route-table route update - summary: Update a route in a route table. - examples: - - summary: Update a route in a route table to change the next hop ip address. - command: az network route-table route update -g MyResourceGroup --route-table-name MyRouteTable \ -n MyRoute --next-hop-ip-address 10.0.100.5 -- group: - name: network route-filter - summary: (PREVIEW) Manage route filters. - description: > - To learn more about route filters with Microsoft peering with ExpressRoute, visit https://docs.microsoft.com/en-us/azure/expressroute/how-to-routefilter-cli -- command: - name: network route-filter create - summary: Create a route filter. - examples: - - summary: Create a route filter. - command: az network route-filter create -g MyResourceGroup -n MyRouteFilter -- command: - name: network route-filter delete - summary: Delete a route filter. - examples: - - summary: Delete a route filter. - command: az network route-filter delete -g MyResourceGroup -n MyRouteFilter -- command: - name: network route-filter list - summary: List route filters. - examples: - - summary: List route filters in a resource group. - command: az network route-filter list -g MyResourceGroup -- command: - name: network route-filter show - summary: Get the details of a route filter. - examples: - - summary: Get the details of a route filter. - command: az network route-filter show -g MyResourceGroup -n MyRouteFilter -- command: - name: network route-filter update - summary: Update a route filter. - description: > - This command can only be used to update the tags for a route filter. Name and resource group are immutable and cannot be updated. - examples: - - summary: Update the tags on a route filter. - command: az network route-filter update -g MyResourceGroup -n MyRouteFilter --set tags.CostCenter=MyBusinessGroup -- group: - name: network route-filter rule - summary: (PREVIEW) Manage rules in a route filter. - description: > - To learn more about route filters with Microsoft peering with ExpressRoute, visit https://docs.microsoft.com/en-us/azure/expressroute/how-to-routefilter-cli -- command: - name: network route-filter rule create - summary: Create a rule in a route filter. - arguments: - - name: --communities - summary: Space-separated list of border gateway protocol (BGP) community values to filter on. - value-sources: - - link: - command: az network route-filter rule list-service-communities - examples: - - summary: Create a rule in a route filter to allow Dynamics 365. - command: | - az network route-filter rule create -g MyResourceGroup --filter-name MyRouteFilter \ - -n MyRouteFilterRule --communities 12076:5040 --access Allow -- command: - name: network route-filter rule delete - summary: Delete a rule from a route filter. - examples: - - summary: Delete a rule from a route filter. - command: az network route-filter rule delete -g MyResourceGroup --filter-name MyRouteFilter -n MyRouteFilterRule -- command: - name: network route-filter rule list - summary: List rules in a route filter. - examples: - - summary: List rules in a route filter. - command: az network route-filter rule list -g MyResourceGroup --filter-name MyRouteFilter -- command: - name: network route-filter rule list-service-communities - summary: Gets all the available BGP service communities. - examples: - - summary: Gets all the available BGP service communities. - command: az network route-filter rule list-service-communities -o table - - summary: Get the community value for Exchange. - command: | - az network route-filter rule list-service-communities \ - --query '[].bgpCommunities[?communityName==`Exchange`].[communityValue][][]' -o tsv -- command: - name: network route-filter rule show - summary: Get the details of a rule in a route filter. - examples: - - summary: Get the details of a rule in a route filter. - command: az network route-filter rule show -g MyResourceGroup --filter-name MyRouteFilter -n MyRouteFilterRule -- command: - name: network route-filter rule update - summary: Update a rule in a route filter. - examples: - - summary: Update a rule in a route filter to add Exchange to rule list. - command: | - az network route-filter rule update -g MyResourceGroup --filter-name MyRouteFilter \ - -n MyRouteFilterRule --add communities='12076:5010' -- group: - name: network service-endpoint - summary: Manage policies related to service endpoints. -- group: - name: network service-endpoint policy - summary: Manage service endpoint policies. -- command: - name: network service-endpoint policy create - summary: Create a service endpoint policy. -- command: - name: network service-endpoint policy delete - summary: Delete a service endpoint policy. -- command: - name: network service-endpoint policy list - summary: List service endpoint policies. -- command: - name: network service-endpoint policy show - summary: Get the details of a service endpoint policy. -- command: - name: network service-endpoint policy update - summary: Update a service endpoint policy. -- group: - name: network service-endpoint policy-definition - summary: Manage service endpoint policy definitions. -- command: - name: network service-endpoint policy-definition create - summary: Create a service endpoint policy definition. - arguments: - - name: --service - value-sources: - - link: - command: az network service-endpoint list -- command: - name: network service-endpoint policy-definition delete - summary: Delete a service endpoint policy definition. -- command: - name: network service-endpoint policy-definition list - summary: List service endpoint policy definitions. -- command: - name: network service-endpoint policy-definition show - summary: Get the details of a service endpoint policy definition. -- command: - name: network service-endpoint policy-definition update - summary: Update a service endpoint policy definition. -- group: - name: network traffic-manager - summary: Manage the routing of incoming traffic. -- group: - name: network traffic-manager profile - summary: Manage Azure Traffic Manager profiles. -- command: - name: network traffic-manager profile check-dns - summary: Check the availability of a relative DNS name. - description: This checks for the avabilility of dns prefixes for trafficmanager.net. - examples: - - summary: Check the availability of 'mywebapp.trafficmanager.net' in Azure. - command: az network traffic-manager profile check-dns -n mywebapp -- command: - name: network traffic-manager profile create - summary: Create a traffic manager profile. - examples: - - summary: Create a traffic manager profile with performance routing. - command: | - az network traffic-manager profile create -g MyResourceGroup -n MyTmProfile --routing-method Performance \ - --unique-dns-name mywebapp --ttl 30 --protocol HTTP --port 80 --path "/" -- command: - name: network traffic-manager profile delete - summary: Delete a traffic manager profile. - examples: - - summary: Delete a traffic manager profile. - command: az network traffic-manager profile delete -g MyResourceGroup -n MyTmProfile -- command: - name: network traffic-manager profile list - summary: List traffic manager profiles. - examples: - - summary: List traffic manager profiles. - command: az network traffic-manager profile list -g MyResourceGroup -- command: - name: network traffic-manager profile show - summary: Get the details of a traffic manager profile. - examples: - - summary: Get the details of a traffic manager profile. - command: az network traffic-manager profile show -g MyResourceGroup -n MyTmProfile -- command: - name: network traffic-manager profile update - summary: Update a traffic manager profile. - examples: - - summary: Update a traffic manager profile to change the TTL to 300. - command: az network traffic-manager profile update -g MyResourceGroup -n MyTmProfile --ttl 300 -- group: - name: network traffic-manager endpoint - summary: Manage Azure Traffic Manager end points. -- command: - name: network traffic-manager endpoint create - summary: Create a traffic manager endpoint. - arguments: - - name: --geo-mapping - value-sources: - - link: - command: az network traffic-manager endpoint show-geographic-hierarchy - examples: - - summary: Create an endpoint for a performance profile to point to an Azure Web App endpoint. - command: | - az network traffic-manager endpoint create -g MyResourceGroup --profile-name MyTmProfile \ - -n MyEndpoint --type azureEndpoints --target-resource-id $MyWebApp1Id --endpoint-status enabled -- command: - name: network traffic-manager endpoint delete - summary: Delete a traffic manager endpoint. - examples: - - summary: Delete a traffic manager endpoint. - command: az network traffic-manager endpoint delete -g MyResourceGroup \ --profile-name MyTmProfile -n MyEndpoint --type azureEndpoints -- command: - name: network traffic-manager endpoint list - summary: List traffic manager endpoints. - examples: - - summary: List traffic manager endpoints. - command: az network traffic-manager endpoint list -g MyResourceGroup --profile-name MyTmProfile -- command: - name: network traffic-manager endpoint show-geographic-hierarchy - summary: Get the default geographic hierarchy used by the geographic traffic routing method. - examples: - - summary: Get the default geographic hierarchy used by the geographic traffic routing method. - command: az network traffic-manager endpoint show-geographic-hierarchy -- command: - name: network traffic-manager endpoint show - summary: Get the details of a traffic manager endpoint. - examples: - - summary: Get the details of a traffic manager endpoint. - command: | - az network traffic-manager endpoint show -g MyResourceGroup \ - --profile-name MyTmProfile -n MyEndpoint --type azureEndpoints -- command: - name: network traffic-manager endpoint update - summary: Update a traffic manager endpoint. - examples: - - summary: Update a traffic manager endpoint to change its weight. - command: az network traffic-manager endpoint update -g MyResourceGroup --profile-name MyTmProfile \ -n MyEndpoint --weight 20 --type azureEndpoints -- group: - name: network vnet - summary: Manage Azure Virtual Networks. - description: To learn more about Virtual Networks visit https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-manage-network -- command: - name: network vnet check-ip-address - summary: Check if a private IP address is available for use within a virtual network. - examples: - - summary: Check whether 10.0.0.4 is available within MyVnet. - command: az network vnet check-ip-address -g MyResourceGroup -n MyVnet --ip-address 10.0.0.4 -- command: - name: network vnet create - summary: Create a virtual network. - description: > - You may also create a subnet at the same time by specifying a subnet name and (optionally) an address prefix. - To learn about how to create a virtual network visit https://docs.microsoft.com/en-us/azure/virtual-network/manage-virtual-network#create-a-virtual-network - examples: - - summary: Create a virtual network. - command: az network vnet create -g MyResourceGroup -n MyVnet - - summary: Create a virtual network with a specific address prefix and one subnet. - command: | - az network vnet create -g MyResourceGroup -n MyVnet --address-prefix 10.0.0.0/16 \ - --subnet-name MySubnet --subnet-prefix 10.0.0.0/24 -- command: - name: network vnet delete - summary: Delete a virtual network. - examples: - - summary: Delete a virtual network. - command: az network vnet delete -g MyResourceGroup -n myVNet -- command: - name: network vnet list - summary: List virtual networks. - examples: - - summary: List all virtual networks in a subscription. - command: az network vnet list - - summary: List all virtual networks in a resource group. - command: az network vnet list -g MyResourceGroup - - summary: List virtual networks in a subscription which specify a certain address prefix. - command: az network vnet list --query "[?contains(addressSpace.addressPrefixes, '10.0.0.0/16')]" -- command: - name: network vnet list-endpoint-services - summary: List which services support VNET service tunneling in a given region. - description: To learn more about service endpoints visit https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-service-endpoints-configure#azure-cli - examples: - - summary: List the endpoint services available for use in the West US region. - command: az network vnet list-endpoint-services -l westus -o table -- command: - name: network vnet show - summary: Get the details of a virtual network. - examples: - - summary: Get details for MyVNet. - command: az network vnet show -g MyResourceGroup -n MyVNet -- command: - name: network vnet update - summary: Update a virtual network. - examples: - - summary: Update a virtual network with the IP address of a DNS server. - command: az network vnet update -g MyResourceGroup -n MyVNet --dns-servers 10.2.0.8 -- group: - name: network vnet subnet - summary: Manage subnets in an Azure Virtual Network. - description: To learn more about subnets visit https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-manage-subnet -- command: - name: network vnet subnet create - summary: Create a subnet and associate an existing NSG and route table. - arguments: - - name: --service-endpoints - summary: Space-separated list of services allowed private access to this subnet. - value-sources: - - link: - command: az network vnet list-endpoint-services - examples: - - summary: Create new subnet attached to an NSG with a custom route table. - command: | - az network vnet subnet create -g MyResourceGroup --vnet-name MyVnet -n MySubnet \ - --address-prefix 10.0.0.0/24 --network-security-group MyNsg --route-table MyRouteTable -- command: - name: network vnet subnet delete - summary: Delete a subnet. - examples: - - summary: Delete a subnet. - command: az network vnet subnet delete -g MyResourceGroup -n MySubnet -- command: - name: network vnet subnet list - summary: List the subnets in a virtual network. - examples: - - summary: List the subnets in a virtual network. - command: az network vnet subnet list -g MyResourceGroup --vnet-name MyVNet -- command: - name: network vnet subnet list-available-delegations - summary: List the services available for subnet delegation. - examples: - - summary: Retrieve the service names for available delegations in the West US region. - command: az network vnet subnet list-available-delegations -l westus --query [].serviceName -- command: - name: network vnet subnet show - summary: Show details of a subnet. - examples: - - summary: Show the details of a subnet associated with a virtual network. - command: az network vnet subnet show -g MyResourceGroup -n MySubnet --vnet-name MyVNet -- command: - name: network vnet subnet update - summary: Update a subnet. - arguments: - - name: --service-endpoints - summary: Space-separated list of services allowed private access to this subnet. - value-sources: - - link: - command: az network vnet list-endpoint-services - examples: - - summary: Associate a network security group to a subnet. - command: az network vnet subnet update -g MyResourceGroup -n MySubnet --vnet-name MyVNet --network-security-group MyNsg -- group: - name: network vnet peering - summary: Manage peering connections between Azure Virtual Networks. - description: To learn more about virtual network peering visit https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-manage-peering -- command: - name: network vnet peering create - summary: Create a virtual network peering connection. - description: > - To successfully peer two virtual networks this command must be called twice with - the values for --vnet-name and --remote-vnet reversed. - examples: - - summary: Create a peering connection between two virtual networks. - command: | - az network vnet peering create -g MyResourceGroup -n MyVnet1ToMyVnet2 --vnet-name MyVnet1 \ - --remote-vnet-id MyVnet2Id --allow-vnet-access -- command: - name: network vnet peering delete - summary: Delete a peering. - examples: - - summary: Delete a virtual network peering connection. - command: az network vnet peering delete -g MyResourceGroup -n MyVnet1ToMyVnet2 --vnet-name MyVnet1 -- command: - name: network vnet peering list - summary: List peerings. - examples: - - summary: List all peerings of a specified virtual network. - command: az network vnet peering list -g MyResourceGroup --vnet-name MyVnet1 -- command: - name: network vnet peering show - summary: Show details of a peering. - examples: - - summary: Show all details of the specified virtual network peering. - command: az network vnet peering show -g MyResourceGroup -n MyVnet1ToMyVnet2 --vnet-name MyVnet1 -- command: - name: network vnet peering update - summary: Update a peering. - examples: - - summary: Change forwarded traffic configuration of a virtual network peering. - command: > - az network vnet peering update -g MyResourceGroup -n MyVnet1ToMyVnet2 --vnet-name MyVnet1 --set allowForwardedTraffic=true - - summary: Change virtual network access of a virtual network peering. - command: > - az network vnet peering update -g MyResourceGroup -n MyVnet1ToMyVnet2 --vnet-name MyVnet1 --set allowVirtualNetworkAccess=true - - summary: Change gateway transit property configuration of a virtual network peering. - command: > - az network vnet peering update -g MyResourceGroup -n MyVnet1ToMyVnet2 --vnet-name MyVnet1 --set allowGatewayTransit=true - - summary: Use remote gateways in virtual network peering. - command: > - az network vnet peering update -g MyResourceGroup -n MyVnet1ToMyVnet2 --vnet-name MyVnet1 --set useRemoteGateways=true -- group: - name: network vpn-connection - summary: Manage VPN connections. - description: > - For more information on site-to-site connections, - visit https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-howto-site-to-site-resource-manager-cli. - For more information on Vnet-to-Vnet connections, visit https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-howto-vnet-vnet-cli -- command: - name: network vpn-connection create - summary: Create a VPN connection. - description: The VPN Gateway and Local Network Gateway must be provisioned before creating the connection between them. - examples: - - summary: > - Create a site-to-site connection between an Azure virtual network and an on-premises local network gateway. - command: | - az network vpn-connection create -g MyResourceGroup -n MyConnection --vnet-gateway1 MyVnetGateway \ - --local-gateway2 MyLocalGateway --shared-key Abc123 -- command: - name: network vpn-connection delete - summary: Delete a VPN connection. - examples: - - summary: Delete a VPN connection. - command: az network vpn-connection delete -g MyResourceGroup -n MyConnection -- command: - name: network vpn-connection list - summary: List all VPN connections in a resource group. - examples: - - summary: List all VPN connections in a resource group. - command: az network vpn-connection list -g MyResourceGroup -- command: - name: network vpn-connection show - summary: Get the details of a VPN connection. - examples: - - summary: View the details of a VPN connection. - command: az network vpn-connection show -g MyResourceGroup -n MyConnection -- command: - name: network vpn-connection update - summary: Update a VPN connection. - examples: - - summary: Add BGP to an existing connection. - command: az network vpn-connection update -g MyResourceGroup -n MyConnection --enable-bgp True -- group: - name: network vpn-connection ipsec-policy - summary: Manage VPN connection IPSec policies. -- command: - name: network vpn-connection ipsec-policy add - summary: Add a VPN connection IPSec policy. - description: Set all IPsec policies of a VPN connection. If you want to set any IPsec policy, you must set them all. - examples: - - summary: Add specified IPsec policies to a connection instead of relying on defaults. - command: | - az network vpn-connection ipsec-policy add -g MyResourceGroup --connection-name MyConnection \ - --dh-group DHGroup14 --ike-encryption AES256 --ike-integrity SHA384 --ipsec-encryption DES3 \ - --ipsec-integrity GCMAES256 --pfs-group PFS2048 --sa-lifetime 600 --sa-max-size 1024 -- command: - name: network vpn-connection ipsec-policy clear - summary: Delete all IPsec policies on a VPN connection. - examples: - - summary: Remove all previously specified IPsec policies from a connection. - command: az network vpn-connection ipsec-policy clear -g MyResourceGroup --connection-name MyConnection -- command: - name: network vpn-connection ipsec-policy list - summary: List IPSec policies associated with a VPN connection. - examples: - - summary: List the IPsec policies set on a connection. - command: az network vpn-connection ipsec-policy list -g MyResourceGroup --connection-name MyConnection -- group: - name: network vpn-connection shared-key - summary: Manage VPN shared keys. -- command: - name: network vpn-connection shared-key reset - summary: Reset a VPN connection shared key. - examples: - - summary: Reset the shared key on a connection. - command: az network vpn-connection shared-key reset -g MyResourceGroup --connection-name MyConnection --key-length 128 -- command: - name: network vpn-connection shared-key show - summary: Retrieve a VPN connection shared key. - examples: - - summary: View the shared key of a connection. - command: az network vpn-connection shared-key show -g MyResourceGroup --connection-name MyConnection -- command: - name: network vpn-connection shared-key update - summary: Update a VPN connection shared key. - examples: - - summary: Change the shared key for the connection to "Abc123". - command: az network vpn-connection shared-key update -g MyResourceGroup --connection-name MyConnection --value Abc123 -- group: - name: network vnet-gateway - summary: Use an Azure Virtual Network Gateway to establish secure, cross-premises connectivity. - description: > - To learn more about Azure Virtual Network Gateways, visit https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-howto-site-to-site-resource-manager-cli -- command: - name: network vnet-gateway create - summary: Create a virtual network gateway. - examples: - - summary: Create a basic virtual network gateway for site-to-site connectivity. - command: | - az network vnet-gateway create -g MyResourceGroup -n MyVnetGateway --public-ip-address MyGatewayIp \ - --vnet MyVnet --gateway-type Vpn --sku VpnGw1 --vpn-type RouteBased --no-wait - - summary: > - Create a basic virtual network gateway that provides point-to-site connectivity with a RADIUS secret that matches what is configured on a RADIUS server. - command: | - az network vnet-gateway create -g MyResourceGroup -n MyVnetGateway --public-ip-address MyGatewayIp \ - --vnet MyVnet --gateway-type Vpn --sku VpnGw1 --vpn-type RouteBased --address-prefixes 40.1.0.0/24 \ - --client-protocol IkeV2 SSTP --radius-secret 111_aaa --radius-server 30.1.1.15 -- command: - name: network vnet-gateway delete - summary: Delete a virtual network gateway. - description: > - In order to delete a Virtual Network Gateway, you must first delete ALL Connection objects in Azure that are - connected to the Gateway. After deleting the Gateway, proceed to delete other resources now not in use. - For more information, follow the order of instructions on this page: - https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-delete-vnet-gateway-portal - examples: - - summary: Delete a virtual network gateway. - command: az network vnet-gateway delete -g MyResourceGroup -n MyVnetGateway -- command: - name: network vnet-gateway list - summary: List virtual network gateways. - examples: - - summary: List virtual network gateways in a resource group. - command: az network vnet-gateway list -g MyResourceGroup -- command: - name: network vnet-gateway list-advertised-routes - summary: List the routes of a virtual network gateway advertised to the specified peer. - examples: - - summary: List the routes of a virtual network gateway advertised to the specified peer. - command: az network vnet-gateway list-advertised-routes -g MyResourceGroup -n MyVnetGateway --peer 23.10.10.9 -- command: - name: network vnet-gateway list-bgp-peer-status - summary: Retrieve the status of BGP peers. - examples: - - summary: Retrieve the status of a BGP peer. - command: az network vnet-gateway list-bgp-peer-status -g MyResourceGroup -n MyVnetGateway --peer 23.10.10.9 -- command: - name: network vnet-gateway list-learned-routes - summary: This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. - examples: - - summary: Retrieve a list of learned routes. - command: az network vnet-gateway list-learned-routes -g MyResourceGroup -n MyVnetGateway -- command: - name: network vnet-gateway reset - summary: Reset a virtual network gateway. - examples: - - summary: Reset a virtual network gateway. - command: az network vnet-gateway reset -g MyResourceGroup -n MyVnetGateway - - summary: Reset a virtual network gateway with Active-Active feature enabled. - command: az network vnet-gateway reset -g MyResourceGroup -n MyVnetGateway --gateway-vip MyGatewayIP -- command: - name: network vnet-gateway show - summary: Get the details of a virtual network gateway. - examples: - - summary: Get the details of a virtual network gateway. - command: az network vnet-gateway show -g MyResourceGroup -n MyVnetGateway -- command: - name: network vnet-gateway update - summary: Update a virtual network gateway. - examples: - - summary: Change the SKU of a virtual network gateway. - command: az network vnet-gateway update -g MyResourceGroup -n MyVnetGateway --sku VpnGw2 -- command: - name: network vnet-gateway wait - summary: Place the CLI in a waiting state until a condition of the virtual network gateway is met. - examples: - - summary: Pause CLI until the virtual network gateway is created. - command: az network vnet-gateway wait -g MyResourceGroup -n MyVnetGateway --created -- group: - name: network vnet-gateway vpn-client - summary: Download a VPN client configuration required to connect to Azure via point-to-site. -- command: - name: network vnet-gateway vpn-client generate - summary: Generate VPN client configuration. - description: The command outputs a URL to a zip file for the generated VPN client configuration. - examples: - - summary: Create the VPN client configuration for RADIUS with EAP-MSCHAV2 authentication. - command: az network vnet-gateway vpn-client generate -g MyResourceGroup -n MyVnetGateway --authentication-method EAPMSCHAPv2 - - summary: Create the VPN client configuration for AMD64 architecture. - command: az network vnet-gateway vpn-client generate -g MyResourceGroup -n MyVnetGateway --processor-architecture Amd64 -- command: - name: network vnet-gateway vpn-client show-url - summary: Retrieve a pre-generated VPN client configuration. - description: The profile needs to be generated first using vpn-client generate command. - examples: - - summary: Get the pre-generated point-to-site VPN client of the virtual network gateway. - command: az network vnet-gateway vpn-client show-url -g MyResourceGroup -n MyVnetGateway -- group: - name: network vnet-gateway revoked-cert - summary: Manage revoked certificates in a virtual network gateway. - description: Prevent machines using this certificate from accessing Azure through this gateway. -- command: - name: network vnet-gateway revoked-cert create - summary: Revoke a certificate. - examples: - - summary: Revoke a certificate. - command: | - az network vnet-gateway revoked-cert create -g MyResourceGroup -n MyRootCertificate \ - --gateway-name MyVnetGateway --thumbprint abc123 -- command: - name: network vnet-gateway revoked-cert delete - summary: Delete a revoked certificate. - examples: - - summary: Delete a revoked certificate. - command: az network vnet-gateway revoked-cert delete -g MyResourceGroup -n MyRootCertificate --gateway-name MyVnetGateway -- group: - name: network vnet-gateway root-cert - summary: Manage root certificates of a virtual network gateway. -- command: - name: network vnet-gateway root-cert create - summary: Upload a root certificate. - examples: - - summary: Add a Root Certificate to the list of certs allowed to connect to this Gateway. - command: | - az network vnet-gateway root-cert create -g MyResourceGroup -n MyRootCertificate \ - --gateway-name MyVnetGateway --public-cert-data MyCertificateData -- command: - name: network vnet-gateway root-cert delete - summary: Delete a root certificate. - examples: - - summary: Remove a certificate from the list of Root Certificates whose children are allowed to access this Gateway. - command: az network vnet-gateway root-cert delete -g MyResourceGroup -n MyRootCertificate --gateway-name MyVnetGateway -- group: - name: network watcher - summary: Manage the Azure Network Watcher. - description: > - Network Watcher assists with monitoring and diagnosing conditions at a network scenario level. To learn more visit https://docs.microsoft.com/en-us/azure/network-watcher/ -- command: - name: network watcher configure - summary: Configure the Network Watcher service for different regions. - arguments: - - name: --enabled - summary: Enabled status of Network Watcher in the specified regions. - - name: --locations - summary: Space-separated list of locations to configure. - - name: --resource-group - summary: Name of resource group. Required when enabling new regions. - description: > - When a previously disabled region is enabled to use Network Watcher, a - Network Watcher resource will be created in this resource group. - examples: - - summary: Configure Network Watcher for the West US region. - command: az network watcher configure -g NetworkWatcherRG -l westus --enabled true -- command: - name: network watcher list - summary: List Network Watchers. - examples: - - summary: List all Network Watchers in a subscription. - command: az network watcher list -- command: - name: network watcher show-next-hop - summary: Get information on the 'next hop' of a VM. - description: > - Requires that Network Watcher is enabled for the region in which the VM is located. - For more information about show-next-hop visit https://docs.microsoft.com/en-us/azure/network-watcher/network-watcher-check-next-hop-cli - examples: - - summary: Get the next hop from a VMs assigned IP address to a destination at 10.1.0.4. - command: az network watcher show-next-hop -g MyResourceGroup --vm MyVm --source-ip 10.0.0.4 --dest-ip 10.1.0.4 -- command: - name: network watcher show-security-group-view - summary: Get detailed security information on a VM for the currently configured network security group. - description: > - For more information on using security group view visit https://docs.microsoft.com/en-us/azure/network-watcher/network-watcher-security-group-view-cli - examples: - - summary: Get the network security group information for the specified VM. - command: az network watcher show-security-group-view -g MyResourceGroup --vm MyVm -- command: - name: network watcher show-topology - summary: Get the network topology of a resource group, virtual network or subnet. - description: For more information about using network topology visit https://docs.microsoft.com/en-us/azure/network-watcher/network-watcher-topology-cli - arguments: - - name: --resource-group - summary: The name of the target resource group to perform topology on. - - name: --location - summary: Location. Defaults to the location of the target resource group. - description: > - Topology information is only shown for resources within the target - resource group that are within the specified region. - examples: - - summary: Use show-topology to get the topology of resources within a resource group. - command: az network watcher show-topology -g MyResourceGroup -- command: - name: network watcher test-connectivity - summary: (PREVIEW) Test if a connection can be established between a Virtual Machine and a given endpoint. - description: > - To check connectivity between two VMs in different regions, use the VM ids instead of the VM names for the source and destination resource arguments. - To register for this feature or see additional examples visit https://docs.microsoft.com/en-us/azure/network-watcher/network-watcher-connectivity-cli - arguments: - - name: --source-resource - summary: Name or ID of the resource from which to originate traffic. - description: Currently only Virtual Machines are supported. - - name: --source-port - summary: Port number from which to originate traffic. - - name: --dest-resource - summary: Name or ID of the resource to receive traffic. - description: Currently only Virtual Machines are supported. - - name: --dest-port - summary: Port number on which to receive traffic. - - name: --dest-address - summary: The IP address or URI at which to receive traffic. - examples: - - summary: Check connectivity between two virtual machines in the same resource group over port 80. - command: az network watcher test-connectivity -g MyResourceGroup --source-resource MyVmName1 --dest-resource MyVmName2 --dest-port 80 - - summary: Check connectivity between two virtual machines in the same subscription in two different resource groups over port 80. - command: az network watcher test-connectivity --source-resource MyVmId1 --dest-resource MyVmId2 --dest-port 80 -- command: - name: network watcher test-ip-flow - summary: Test IP flow to/from a VM given the currently configured network security group rules. - description: > - Requires that Network Watcher is enabled for the region in which the VM is located. - For more information visit https://docs.microsoft.com/en-us/azure/network-watcher/network-watcher-check-ip-flow-verify-cli - arguments: - - name: --local - summary: > - The private IPv4 address for the VMs NIC and the port of the packet in - X.X.X.X:PORT format. `*` can be used for port when direction is outbound. - - name: --remote - summary: > - The IPv4 address and port for the remote side of the packet - X.X.X.X:PORT format. `*` can be used for port when the direction is inbound. - - name: --direction - summary: Direction of the packet relative to the VM. - - name: --protocol - summary: Protocol to test. - examples: - - summary: Run test-ip-flow verify to test logical connectivity from a VM to the specified destination IPv4 address and port. - command: | - az network watcher test-ip-flow -g MyResourceGroup --direction Outbound \ - --protocol TCP --local 10.0.0.4:* --remote 10.1.0.4:80 --vm MyVm -- command: - name: network watcher run-configuration-diagnostic - summary: Run a configuration diagnostic on a target resource. - description: > - Requires that Network Watcher is enabled for the region in which the target is located. - examples: - - summary: Run configuration diagnostic on a VM with a single query. - command: | - az network watcher run-configuration-diagnostic --resource {VM_ID} - --direction Inbound --protocol TCP --source 12.11.12.14 --destination 10.1.1.4 --port 12100 - - summary: Run configuration diagnostic on a VM with multiple queries. - command: | - az network watcher run-configuration-diagnostic --resource {VM_ID} - --queries '[ - { - "direction": "Inbound", "protocol": "TCP", "source": "12.11.12.14", - "destination": "10.1.1.4", "destinationPort": "12100" - }, - { - "direction": "Inbound", "protocol": "TCP", "source": "12.11.12.0/32", - "destination": "10.1.1.4", "destinationPort": "12100" - }, - { - "direction": "Outbound", "protocol": "TCP", "source": "12.11.12.14", - "destination": "10.1.1.4", "destinationPort": "12100" - }]' -- group: - name: network watcher connection-monitor - summary: Manage connection monitoring between an Azure Virtual Machine and any IP resource. - description: > - Connection monitor can be used to monitor network connectivity between an Azure virtual machine and an IP address. - The IP address can be assigned to another Azure resource or a resource on the Internet or on-premises. To learn - more visit https://aka.ms/connectionmonitordoc -- command: - name: network watcher connection-monitor create - summary: Create a connection monitor. - arguments: - - name: --source-resource - summary: > - Currently only Virtual Machines are supported. - - name: --dest-resource - summary: > - Currently only Virtual Machines are supported. - examples: - - summary: Create a connection monitor for a virtual machine. - command: | - az network watcher connection-monitor create -g MyResourceGroup -n MyConnectionMonitorName \ - --source-resource MyVM -- command: - name: network watcher connection-monitor delete - summary: Delete a connection monitor for the given region. - examples: - - summary: Delete a connection monitor for the given region. - command: az network watcher connection-monitor delete -l westus -n MyConnectionMonitorName -- command: - name: network watcher connection-monitor list - summary: List connection monitors for the given region. - examples: - - summary: List a connection monitor for the given region. - command: az network watcher connection-monitor list -l westus -- command: - name: network watcher connection-monitor query - summary: Query a snapshot of the most recent connection state of a connection monitor. - examples: - - summary: List a connection monitor for the given region. - command: az network watcher connection-monitor query -l westus -n MyConnectionMonitorName -- command: - name: network watcher connection-monitor show - summary: Shows a connection monitor by name. - examples: - - summary: Show a connection monitor for the given name. - command: az network watcher connection-monitor show -l westus -n MyConnectionMonitorName -- command: - name: network watcher connection-monitor start - summary: Start the specified connection monitor. - examples: - - summary: Start the specified connection monitor. - command: az network watcher connection-monitor start -l westus -n MyConnectionMonitorName -- command: - name: network watcher connection-monitor stop - summary: Stop the specified connection monitor. - examples: - - summary: Stop the specified connection monitor. - command: az network watcher connection-monitor stop -l westus -n MyConnectionMonitorName -- group: - name: network watcher packet-capture - summary: Manage packet capture sessions on VMs. - description: > - These commands require that both Azure Network Watcher is enabled for the VMs region and that AzureNetworkWatcherExtension is enabled on the VM. - For more information visit https://docs.microsoft.com/en-us/azure/network-watcher/network-watcher-packet-capture-manage-cli -- command: - name: network watcher packet-capture create - summary: Create and start a packet capture session. - arguments: - - name: --capture-limit - summary: The maximum size in bytes of the capture output. - - name: --capture-size - summary: Number of bytes captured per packet. Excess bytes are truncated. - - name: --time-limit - summary: Maximum duration of the capture session in seconds. - - name: --storage-account - summary: Name or ID of a storage account to save the packet capture to. - - name: --storage-path - summary: Fully qualified URI of an existing storage container in which to store the capture file. - description: > - If not specified, the container 'network-watcher-logs' will be - created if it does not exist and the capture file will be stored there. - - name: --file-path - summary: > - Local path on the targeted VM at which to save the packet capture. For Linux VMs, the - path must start with /var/captures. - - name: --vm - summary: Name or ID of the VM to target. - - name: --filters - summary: JSON encoded list of packet filters. Use `@{path}` to load from file. - examples: - - summary: Create a packet capture session on a VM. - command: az network watcher packet-capture create -g MyResourceGroup -n MyPacketCaptureName --vm MyVm --storage-account MyStorageAccount - - summary: Create a packet capture session on a VM with optional filters for protocols, local IP address and remote IP address ranges and ports. - command: | - az network watcher packet-capture create -g MyResourceGroup -n MyPacketCaptureName --vm MyVm \ - --storage-account MyStorageAccount --filters '[ \ - { \ - "protocol":"TCP", \ - "remoteIPAddress":"1.1.1.1-255.255.255", \ - "localIPAddress":"10.0.0.3", \ - "remotePort":"20" \ - }, \ - { \ - "protocol":"TCP", \ - "remoteIPAddress":"1.1.1.1-255.255.255", \ - "localIPAddress":"10.0.0.3", \ - "remotePort":"80" \ - }, \ - { \ - "protocol":"TCP", \ - "remoteIPAddress":"1.1.1.1-255.255.255", \ - "localIPAddress":"10.0.0.3", \ - "remotePort":"443" \ - }, \ - { \ - "protocol":"UDP" \ - }]' -- command: - name: network watcher packet-capture delete - summary: Delete a packet capture session. - examples: - - summary: Delete a packet capture session. This only deletes the session and not the capture file. - command: az network watcher packet-capture delete -n packetCaptureName -l westcentralus -- command: - name: network watcher packet-capture list - summary: List all packet capture sessions within a resource group. - examples: - - summary: List all packet capture sessions within a region. - command: az network watcher packet-capture list -l westus -- command: - name: network watcher packet-capture show - summary: Show details of a packet capture session. - examples: - - summary: Show a packet capture session. - command: az network watcher packet-capture show -l westus -n MyPacketCapture -- command: - name: network watcher packet-capture show-status - summary: Show the status of a packet capture session. - examples: - - summary: Show the status of a packet capture session. - command: az network watcher packet-capture show-status -l westus -n MyPacketCapture -- command: - name: network watcher packet-capture stop - summary: Stop a running packet capture session. - examples: - - summary: Stop a running packet capture session. - command: az network watcher packet-capture stop -l westus -n MyPacketCapture -- group: - name: network watcher flow-log - summary: Manage network security group flow logging. - description: > - For more information about configuring flow logs visit https://docs.microsoft.com/en-us/azure/network-watcher/network-watcher-nsg-flow-logging-cli -- command: - name: network watcher flow-log configure - summary: Configure flow logging on a network security group. - arguments: - - name: --nsg - summary: Name or ID of the Network Security Group to target. - - name: --enabled - summary: Enable logging. - - name: --retention - summary: Number of days to retain logs. - - name: --storage-account - summary: Name or ID of the storage account in which to save the flow logs. - examples: - - summary: Enable NSG flow logs. - command: az network watcher flow-log configure -g MyResourceGroup --enabled true --nsg MyNsg --storage-account MyStorageAccount - - summary: Disable NSG flow logs. - command: az network watcher flow-log configure -g MyResourceGroup --enabled false --nsg MyNsg -- command: - name: network watcher flow-log show - summary: Get the flow log configuration of a network security group. - examples: - - summary: Show NSG flow logs. - command: az network watcher flow-log show -g MyResourceGroup --nsg MyNsg -- group: - name: network watcher troubleshooting - summary: Manage Network Watcher troubleshooting sessions. - description: > - For more information on configuring troubleshooting visit https://docs.microsoft.com/en-us/azure/network-watcher/network-watcher-troubleshoot-manage-cli -- command: - name: network watcher troubleshooting show - summary: Get the results of the last troubleshooting operation. - examples: - - summary: Show the results or status of a troubleshooting operation for a Vnet Gateway. - command: az network watcher troubleshooting show -g MyResourceGroup --resource MyVnetGateway --resource-type vnetGateway -- command: - name: network watcher troubleshooting start - summary: Troubleshoot issues with VPN connections or gateway connectivity. - arguments: - - name: --resource-type - summary: The type of target resource to troubleshoot, if resource ID is not specified. - - name: --storage-account - summary: Name or ID of the storage account in which to store the troubleshooting results. - - name: --storage-path - summary: Fully qualified URI to the storage blob container in which to store the troubleshooting results. - examples: - - summary: Start a troubleshooting operation on a VPN Connection. - command: | - az network watcher troubleshooting start -g MyResourceGroup --resource MyVPNConnection \ - --resource-type vpnConnection --storage-account MyStorageAccount \ - --storage-path https://{storageAccountName}.blob.core.windows.net/{containerName} diff --git a/src/command_modules/azure-cli-policyinsights/azure/cli/command_modules/policyinsights/help.yaml b/src/command_modules/azure-cli-policyinsights/azure/cli/command_modules/policyinsights/help.yaml deleted file mode 100644 index 548b8a684cd..00000000000 --- a/src/command_modules/azure-cli-policyinsights/azure/cli/command_modules/policyinsights/help.yaml +++ /dev/null @@ -1,164 +0,0 @@ -version: 1 -content: -- group: - name: policy event - summary: Manage policy events. -- command: - name: policy event list - summary: List policy events. - examples: - - summary: Get policy events at current subscription scope created in the last day. - command: > - az policy event list - - summary: Get policy events at management group scope. - command: > - az policy event list -m "myMg" - - summary: Get policy events at resource group scope in current subscription. - command: > - az policy event list -g "myRg" - - summary: Get policy events for a resource using resource ID. - command: > - az policy event list --resource "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup /providers/Microsoft.EventHub/namespaces/myns1/eventhubs/eh1/consumergroups/cg1" - - summary: Get policy events for a resource using resource name. - command: > - az policy event list --resource "myKeyVault" --namespace "Microsoft.KeyVault" --resource-type "vaults" -g "myresourcegroup" - - summary: Get policy events for a nested resource using resource name. - command: > - az policy event list --resource "myRule1" --namespace "Microsoft.Network" --resource-type "securityRules" --parent "networkSecurityGroups/mysecuritygroup1" -g "myresourcegroup" - - summary: Get policy events for a policy set definition in current subscription. - command: > - az policy event list -s "fff58873-fff8-fff5-fffc-fffbe7c9d697" - - summary: Get policy events for a policy definition in current subscription. - command: > - az policy event list -d "fff69973-fff8-fff5-fffc-fffbe7c9d698" - - summary: Get policy events for a policy assignment in current subscription. - command: > - az policy event list -a "ddd8ef92e3714a5ea3d208c1" - - summary: Get policy events for a policy assignment in the specified resource group in current subscription. - command: > - az policy event list -g "myRg" -a "ddd8ef92e3714a5ea3d208c1" - - summary: Get top 5 policy events in current subscription, selecting a subset of properties and customizing ordering. - command: > - az policy event list --top 5 --order-by "timestamp desc, policyAssignmentName asc" --select "timestamp, resourceId, policyAssignmentId, policySetDefinitionId, policyDefinitionId" - - summary: Get policy events in current subscription during a custom time interval. - command: > - az policy event list --from "2018-03-08T00:00:00Z" --to "2018-03-15T00:00:00Z" - - summary: Get policy events in current subscription filtering results based on some property values. - command: > - az policy event list --filter "(policyDefinitionAction eq 'deny' or policyDefinitionAction eq 'audit') and resourceLocation ne 'eastus'" - - summary: Get number of policy events in current subscription. - command: > - az policy event list --apply "aggregate($count as numberOfRecords)" - - summary: Get policy events in current subscription aggregating results based on some properties. - command: > - az policy event list --apply "groupby((policyAssignmentId, policyDefinitionId, policyDefinitionAction, resourceId), aggregate($count as numEvents))" - - summary: Get policy events in current subscription grouping results based on some properties. - command: > - az policy event list --apply "groupby((policyAssignmentName, resourceId))" - - summary: Get policy events in current subscription aggregating results based on some properties specifying multiple groupings. - command: > - az policy event list --apply "groupby((policyAssignmentId, policyDefinitionId, resourceId))/groupby((policyAssignmentId, policyDefinitionId), aggregate($count as numResourcesWithEvents))" -- group: - name: policy state - summary: Manage policy compliance states. -- command: - name: policy state list - summary: List policy compliance states. - examples: - - summary: Get latest policy states at current subscription scope. - command: > - az policy state list - - summary: Get all policy states at current subscription scope. - command: > - az policy state list --all - - summary: Get latest policy states at management group scope. - command: > - az policy state list -m "myMg" - - summary: Get latest policy states at resource group scope in current subscription. - command: > - az policy state list -g "myRg" - - summary: Get latest policy states for a resource using resource ID. - command: > - az policy state list --resource "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup /providers/Microsoft.EventHub/namespaces/myns1/eventhubs/eh1/consumergroups/cg1" - - summary: Get latest policy states for a resource using resource name. - command: > - az policy state list --resource "myKeyVault" --namespace "Microsoft.KeyVault" --resource-type "vaults" -g "myresourcegroup" - - summary: Get latest policy states for a nested resource using resource name. - command: > - az policy state list --resource "myRule1" --namespace "Microsoft.Network" --resource-type "securityRules" --parent "networkSecurityGroups/mysecuritygroup1" -g "myresourcegroup" - - summary: Get latest policy states for a policy set definition in current subscription. - command: > - az policy state list -s "fff58873-fff8-fff5-fffc-fffbe7c9d697" - - summary: Get latest policy states for a policy definition in current subscription. - command: > - az policy state list -d "fff69973-fff8-fff5-fffc-fffbe7c9d698" - - summary: Get latest policy states for a policy assignment in current subscription. - command: > - az policy state list -a "ddd8ef92e3714a5ea3d208c1" - - summary: Get latest policy states for a policy assignment in the specified resource group in current subscription. - command: > - az policy state list -g "myRg" -a "ddd8ef92e3714a5ea3d208c1" - - summary: Get top 5 latest policy states in current subscription, selecting a subset of properties and customizing ordering. - command: > - az policy state list --top 5 --order-by "timestamp desc, policyAssignmentName asc" --select "timestamp, resourceId, policyAssignmentId, policySetDefinitionId, policyDefinitionId" - - summary: Get latest policy states in current subscription during a custom time interval. - command: > - az policy state list --from "2018-03-08T00:00:00Z" --to "2018-03-15T00:00:00Z" - - summary: Get latest policy states in current subscription filtering results based on some property values. - command: > - az policy state list --filter "(policyDefinitionAction eq 'deny' or policyDefinitionAction eq 'audit') and resourceLocation ne 'eastus'" - - summary: Get number of latest policy states in current subscription. - command: > - az policy state list --apply "aggregate($count as numberOfRecords)" - - summary: Get latest policy states in current subscription aggregating results based on some properties. - command: > - az policy state list --apply "groupby((policyAssignmentId, policySetDefinitionId, policyDefinitionReferenceId, policyDefinitionId), aggregate($count as numStates))" - - summary: Get latest policy states in current subscription grouping results based on some properties. - command: > - az policy state list --apply "groupby((policyAssignmentName, resourceId))" - - summary: Get latest policy states in current subscription aggregating results based on some properties specifying multiple groupings. - command: > - az policy state list --apply "groupby((policyAssignmentId, policySetDefinitionId, policyDefinitionReferenceId, policyDefinitionId, resourceId))/groupby((policyAssignmentId, policySetDefinitionId, policyDefinitionReferenceId, policyDefinitionId), aggregate($count as numNonCompliantResources))" -- command: - name: policy state summarize - summary: Summarize policy compliance states. - examples: - - summary: Get latest non-compliant policy states summary at current subscription scope. - command: > - az policy state summarize - - summary: Get latest non-compliant policy states summary at management group scope. - command: > - az policy state summarize -m "myMg" - - summary: Get latest non-compliant policy states summary at resource group scope in current subscription. - command: > - az policy state summarize -g "myRg" - - summary: Get latest non-compliant policy states summary for a resource using resource ID. - command: > - az policy state summarize --resource "/subscriptions/fff10b27-fff3-fff5-fff8-fffbe01e86a5/resourceGroups/myResourceGroup /providers/Microsoft.EventHub/namespaces/myns1/eventhubs/eh1/consumergroups/cg1" - - summary: Get latest non-compliant policy states summary for a resource using resource name. - command: > - az policy state summarize --resource "myKeyVault" --namespace "Microsoft.KeyVault" --resource-type "vaults" -g "myresourcegroup" - - summary: Get latest non-compliant policy states summary for a nested resource using resource name. - command: > - az policy state summarize --resource "myRule1" --namespace "Microsoft.Network" --resource-type "securityRules" --parent "networkSecurityGroups/mysecuritygroup1" -g "myresourcegroup" - - summary: Get latest non-compliant policy states summary for a policy set definition in current subscription. - command: > - az policy state summarize -s "fff58873-fff8-fff5-fffc-fffbe7c9d697" - - summary: Get latest non-compliant policy states summary for a policy definition in current subscription. - command: > - az policy state summarize -d "fff69973-fff8-fff5-fffc-fffbe7c9d698" - - summary: Get latest non-compliant policy states summary for a policy assignment in current subscription. - command: > - az policy state summarize -a "ddd8ef92e3714a5ea3d208c1" - - summary: Get latest non-compliant policy states summary for a policy assignment in the specified resource group in current subscription. - command: > - az policy state summarize -g "myRg" -a "ddd8ef92e3714a5ea3d208c1" - - summary: Get latest non-compliant policy states summary in current subscription, limiting the assignments summary to top 5. - command: > - az policy state summarize --top 5 - - summary: Get latest non-compliant policy states summary in current subscription for a custom time interval. - command: > - az policy state summarize --from "2018-03-08T00:00:00Z" --to "2018-03-15T00:00:00Z" - - summary: Get latest non-compliant policy states summary in current subscription filtering results based on some property values. - command: > - az policy state summarize --filter "(policyDefinitionAction eq 'deny' or policyDefinitionAction eq 'audit') and resourceLocation ne 'eastus'" diff --git a/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/help.yaml b/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/help.yaml deleted file mode 100644 index 467d42bfcbb..00000000000 --- a/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/help.yaml +++ /dev/null @@ -1,53 +0,0 @@ -version: 1 -content: -- command: - name: login - summary: Log in to Azure. - examples: - - summary: Log in interactively. - command: > - az login - - summary: Log in with user name and password. This doesn't work with Microsoft accounts or accounts that have two-factor authentication enabled. - command: > - az login -u johndoe@contoso.com -p VerySecret - - summary: Log in with a service principal using client secret. - command: > - az login --service-principal -u http://azure-cli-2016-08-05-14-31-15 -p VerySecret --tenant contoso.onmicrosoft.com - - summary: Log in with a service principal using client certificate. - command: > - az login --service-principal -u http://azure-cli-2016-08-05-14-31-15 -p ~/mycertfile.pem --tenant contoso.onmicrosoft.com - - summary: Log in using a VM's system assigned identity - command: > - az login --identity - - summary: Log in using a VM's user assigned identity. Client or object ids of the service identity also work - command: > - az login --identity -u /subscriptions//resourcegroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myID -- group: - name: account - summary: Manage Azure subscription information. -- command: - name: account clear - summary: Clear all subscriptions from the CLI's local cache. - description: To clear the current subscription, use 'az logout'. -- command: - name: account list - summary: Get a list of subscriptions for the logged in account. -- command: - name: account list-locations - summary: List supported regions for the current subscription. -- command: - name: account show - summary: Get the details of a subscription. - description: If the subscription isn't specified, shows the details of the default subscription. -- command: - name: account set - summary: Set a subscription to be the current active subscription. -- command: - name: account get-access-token - summary: Get a token for utilities to access Azure. - description: > - The token will be valid for at least 5 minutes with the maximum at 60 minutes. - If the subscription argument isn't specified, the current account is used. -- command: - name: self-test - summary: Runs a self-test of the CLI. diff --git a/src/command_modules/azure-cli-rdbms/azure/cli/command_modules/rdbms/help.yaml b/src/command_modules/azure-cli-rdbms/azure/cli/command_modules/rdbms/help.yaml deleted file mode 100644 index 7242a9cc345..00000000000 --- a/src/command_modules/azure-cli-rdbms/azure/cli/command_modules/rdbms/help.yaml +++ /dev/null @@ -1,537 +0,0 @@ -version: 1 -content: -- group: - name: mariadb - summary: Manage Azure Database for MariaDB servers. -- group: - name: mariadb server - summary: Manage MariaDB servers. -- command: - name: mariadb server create - summary: Create a server. - examples: - - summary: Create a MariaDB server with a Standard performance tier and 2 vcore in North Europe. - command: | - az mariadb server create -l northeurope -g testgroup -n testsvr -u username -p password \ - --sku-name "GP_Gen4_2" - - summary: Create a MariaDB server with all paramaters set. - command: | - az mariadb server create -l northeurope -g testgroup -n testsvr -u username -p password \ - --sku-name "B_Gen4_2" --ssl-enforcement Disabled \ - --storage-size 51200 --tags "key=value" --version {server-version} -- command: - name: mariadb server restore - summary: Restore a server from backup. - examples: - - summary: Restore 'testsvr' as 'testsvrnew'. - command: az mariadb server restore -g testgroup -n testsvrnew --source-server testsvr --restore-point-in-time "2017-06-15T13:10:00Z" - - summary: Restore 'testsvr2' to 'testsvrnew', where 'testsvrnew' is in a different resource group than the backup. - command: | - az mariadb server restore -g testgroup -n testsvrnew \ - -s "/subscriptions/${SubID}/resourceGroups/${ResourceGroup}/providers/Microsoft.DBforMariaDB/servers/testsvr2" \ - --restore-point-in-time "2017-06-15T13:10:00Z" -- command: - name: mariadb server georestore - summary: Georestore a server from backup. - examples: - - summary: Georestore 'testsvr' as 'testsvrnew' where 'testsvrnew' is in same resource group as 'testsvr'. - command: az mariadb server georestore -g testgroup -n testsvrnew --source-server testsvr -l westus2 - - summary: Georestore 'testsvr2' to 'testsvrnew', where 'testsvrnew' is in the different resource group as the original server. - command: | - az mariadb server georestore -g testgroup -n testsvrnew \ - -s "/subscriptions/${SubID}/resourceGroups/${ResourceGroup}/providers/Microsoft.DBforMariaDB/servers/testsvr2" \ - -l westus2 --sku-name GP_Gen4_2 -- group: - name: mysql server replica - summary: Manage cloud replication. -- command: - name: mysql server replica create - summary: Create a cloud replica for a server. - examples: - - summary: Create replica for server testsvr. - command: az mysql server replica create -n testreplsvr -g testgroup -s testsvr - - summary: Create replica testreplsvr for server testsvr2, where 'testreplsvr' is in a different resource group. - command: | - az mysql server replica create -n testreplsvr -g testgroup \ - -s "/subscriptions/${SubID}/resourceGroups/${ResourceGroup}/providers/Microsoft.DBforMySQL/servers/testsvr2" -- command: - name: mysql server replica stop - summary: Stop replica to make it an individual server. - examples: - - summary: Stop server testsvr as replica and make it an individual server. - command: az mysql server replica stop -g testgroup -n testsvr -- command: - name: mysql server replica list - summary: List all replicas for a given server. -- command: - name: mariadb server update - summary: Update a server. - examples: - - summary: Update a server's sku. - command: az mariadb server update -g testgroup -n testsvrnew --sku-name GP_Gen5_4 - - summary: Update a server's tags. - command: az mariadb server update -g testgroup -n testsvrnew --tags "k1=v1" "k2=v2" -- command: - name: mariadb server wait - summary: Wait for server to satisfy certain conditions. -- command: - name: mariadb server delete - summary: Delete a server. -- command: - name: mariadb server show - summary: Get the details of a server. -- command: - name: mariadb server list - summary: List available servers. - examples: - - summary: List all MariaDB servers in a subscription. - command: az mariadb server list - - summary: List all MariaDB servers in a resource group. - command: az mariadb server list -g testgroup -- group: - name: mariadb server firewall-rule - summary: Manage firewall rules for a server. -- command: - name: mariadb server firewall-rule create - summary: Create a new firewall rule for a server. - examples: - - summary: Create a firewall rule allowing all connections from all IP addresses. - command: az mariadb server firewall-rule create -g testgroup -s testsvr -n allowall --start-ip-address 0.0.0.0 --end-ip-address 255.255.255.255 -- command: - name: mariadb server firewall-rule update - summary: Update a firewall rule. - examples: - - summary: Update a firewall rule's start IP address. - command: az mariadb server firewall-rule update -g testgroup -s testsvr -n allowall --start-ip-address 0.0.0.1 - - summary: Update a firewall rule's start and end IP address. - command: az mariadb server firewall-rule update -g testgroup -s testsvr -n allowall --start-ip-address 0.0.0.1 --end-ip-address 255.255.255.254 -- command: - name: mariadb server firewall-rule delete - summary: Delete a firewall rule. -- command: - name: mariadb server firewall-rule show - summary: Get the details of a firewall rule. -- command: - name: mariadb server firewall-rule list - summary: List all firewall rules for a server. -- group: - name: mariadb server vnet-rule - summary: Manage a server's virtual network rules. -- command: - name: mariadb server vnet-rule update - summary: Update a virtual network rule. -- command: - name: mariadb server vnet-rule create - summary: Create a virtual network rule to allows access to a MariaDB server. - examples: - - summary: Create a virtual network rule by providing the subnet id. - command: az mariadb server vnet-rule create -g testgroup -s testsvr -n vnetRuleName --subnet /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Network/virtualNetworks/vnetName/subnets/subnetName - - summary: Create a vnet rule by providing the vnet and subnet name. The subnet id is created by taking the resource group name and subscription id of the server. - command: az mariadb server vnet-rule create -g testgroup -s testsvr -n vnetRuleName --subnet subnetName --vnet-name vnetName -- group: - name: mariadb server configuration - summary: Manage configuration values for a server. -- command: - name: mariadb server configuration set - summary: Update the configuration of a server. - examples: - - summary: Set a new configuration value. - command: az mariadb server configuration set -g testgroup -s testsvr -n {config_name} --value {config_value} - - summary: Set a configuration value to its default. - command: az mariadb server configuration set -g testgroup -s testsvr -n {config_name} -- command: - name: mariadb server configuration show - summary: Get the configuration for a server." -- command: - name: mariadb server configuration list - summary: List the configuration values for a server. -- group: - name: mariadb server-logs - summary: Manage server logs. -- command: - name: mariadb server-logs list - summary: List log files for a server. - examples: - - summary: List log files for 'testsvr' modified in the last 72 hours (default value). - command: az mariadb server-logs list -g testgroup -s testsvr - - summary: List log files for 'testsvr' modified in the last 10 hours. - command: az mariadb server-logs list -g testgroup -s testsvr --file-last-written 10 - - summary: List log files for 'testsvr' less than 30Kb in size. - command: az mariadb server-logs list -g testgroup -s testsvr --max-file-size 30 -- command: - name: mariadb server-logs download - summary: Download log files. - examples: - - summary: Download log files f1 and f2 to the current directory from the server 'testsvr'. - command: az mariadb server-logs download -g testgroup -s testsvr -n f1.log f2.log -- group: - name: mariadb db - summary: Manage MariaDB databases on a server. -- command: - name: mariadb db create - summary: Create a MariaDB database. - examples: - - summary: Create database 'testdb' in the server 'testsvr' with the default parameters. - command: az mariadb db create -g testgroup -s testsvr -n testdb - - summary: Create database 'testdb' in server 'testsvr' with a given character set and collation rules. - command: az mariadb db create -g testgroup -s testsvr -n testdb --charset {valid_charset} --collation {valid_collation} -- command: - name: mariadb db delete - summary: Delete a database. - examples: - - summary: Delete database 'testdb' in the server 'testsvr'. - command: az mariadb db delete -g testgroup -s testsvr -n testdb -- command: - name: mariadb db show - summary: Show the details of a database. - examples: - - summary: Show database 'testdb' in the server 'testsvr'. - command: az mariadb db show -g testgroup -s testsvr -n testdb -- command: - name: mariadb db list - summary: List the databases for a server. - examples: - - summary: List databases in the server 'testsvr'. - command: az mariadb db list -g testgroup -s testsvr -- group: - name: mysql - summary: Manage Azure Database for MySQL servers. -- group: - name: mysql server - summary: Manage MySQL servers. -- command: - name: mysql server create - summary: Create a server. - examples: - - summary: Create a MySQL server with a Standard performance tier and 2 vcore in North Europe. - command: | - az mysql server create -l northeurope -g testgroup -n testsvr -u username -p password \ - --sku-name "GP_Gen4_2" - - summary: Create a MySQL server with all paramaters set. - command: | - az mysql server create -l northeurope -g testgroup -n testsvr -u username -p password \ - --sku-name "B_Gen4_2" --ssl-enforcement Disabled \ - --storage-size 51200 --tags "key=value" --version {server-version} -- command: - name: mysql server restore - summary: Restore a server from backup. - examples: - - summary: Restore 'testsvr' as 'testsvrnew'. - command: az mysql server restore -g testgroup -n testsvrnew --source-server testsvr --restore-point-in-time "2017-06-15T13:10:00Z" - - summary: Restore 'testsvr2' to 'testsvrnew', where 'testsvrnew' is in a different resource group than the backup. - command: | - az mysql server restore -g testgroup -n testsvrnew \ - -s "/subscriptions/${SubID}/resourceGroups/${ResourceGroup}/providers/Microsoft.DBforMySQL/servers/testsvr2" \ - --restore-point-in-time "2017-06-15T13:10:00Z" -- command: - name: mysql server georestore - summary: Georestore a server from backup. - examples: - - summary: Georestore 'testsvr' as 'testsvrnew' where 'testsvrnew' is in same resource group as 'testsvr'. - command: az mysql server georestore -g testgroup -n testsvrnew --source-server testsvr -l westus2 - - summary: Georestore 'testsvr2' to 'testsvrnew', where 'testsvrnew' is in the different resource group as the original server. - command: | - az mysql server georestore -g testgroup -n testsvrnew \ - -s "/subscriptions/${SubID}/resourceGroups/${ResourceGroup}/providers/Microsoft.DBforMySQL/servers/testsvr2" \ - -l westus2 --sku-name GP_Gen4_2 -- command: - name: mysql server update - summary: Update a server. - examples: - - summary: Update a server's sku. - command: az mysql server update -g testgroup -n testsvrnew --sku-name GP_Gen5_4 - - summary: Update a server's tags. - command: az mysql server update -g testgroup -n testsvrnew --tags "k1=v1" "k2=v2" -- command: - name: mysql server wait - summary: Wait for server to satisfy certain conditions. -- command: - name: mysql server delete - summary: Delete a server. -- command: - name: mysql server show - summary: Get the details of a server. -- command: - name: mysql server list - summary: List available servers. - examples: - - summary: List all MySQL servers in a subscription. - command: az mysql server list - - summary: List all MySQL servers in a resource group. - command: az mysql server list -g testgroup -- group: - name: mysql server firewall-rule - summary: Manage firewall rules for a server. -- command: - name: mysql server firewall-rule create - summary: Create a new firewall rule for a server. - examples: - - summary: Create a firewall rule allowing all connections from all IP addresses. - command: az mysql server firewall-rule create -g testgroup -s testsvr -n allowall --start-ip-address 0.0.0.0 --end-ip-address 255.255.255.255 -- command: - name: mysql server firewall-rule update - summary: Update a firewall rule. - examples: - - summary: Update a firewall rule's start IP address. - command: az mysql server firewall-rule update -g testgroup -s testsvr -n allowall --start-ip-address 0.0.0.1 - - summary: Update a firewall rule's start and end IP address. - command: az mysql server firewall-rule update -g testgroup -s testsvr -n allowall --start-ip-address 0.0.0.1 --end-ip-address 255.255.255.254 -- command: - name: mysql server firewall-rule delete - summary: Delete a firewall rule. -- command: - name: mysql server firewall-rule show - summary: Get the details of a firewall rule. -- command: - name: mysql server firewall-rule list - summary: List all firewall rules for a server. -- group: - name: mysql server vnet-rule - summary: Manage a server's virtual network rules. -- command: - name: mysql server vnet-rule update - summary: Update a virtual network rule. -- command: - name: mysql server vnet-rule create - summary: Create a virtual network rule to allows access to a MySQL server. - examples: - - summary: Create a virtual network rule by providing the subnet id. - command: az mysql server vnet-rule create -g testgroup -s testsvr -n vnetRuleName --subnet /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Network/virtualNetworks/vnetName/subnets/subnetName - - summary: Create a vnet rule by providing the vnet and subnet name. The subnet id is created by taking the resource group name and subscription id of the server. - command: az mysql server vnet-rule create -g testgroup -s testsvr -n vnetRuleName --subnet subnetName --vnet-name vnetName -- group: - name: mysql server configuration - summary: Manage configuration values for a server. -- command: - name: mysql server configuration set - summary: Update the configuration of a server. - examples: - - summary: Set a new configuration value. - command: az mysql server configuration set -g testgroup -s testsvr -n {config_name} --value {config_value} - - summary: Set a configuration value to its default. - command: az mysql server configuration set -g testgroup -s testsvr -n {config_name} -- command: - name: mysql server configuration show - summary: Get the configuration for a server." -- command: - name: mysql server configuration list - summary: List the configuration values for a server. -- group: - name: mysql server-logs - summary: Manage server logs. -- command: - name: mysql server-logs list - summary: List log files for a server. - examples: - - summary: List log files for 'testsvr' modified in the last 72 hours (default value). - command: az mysql server-logs list -g testgroup -s testsvr - - summary: List log files for 'testsvr' modified in the last 10 hours. - command: az mysql server-logs list -g testgroup -s testsvr --file-last-written 10 - - summary: List log files for 'testsvr' less than 30Kb in size. - command: az mysql server-logs list -g testgroup -s testsvr --max-file-size 30 -- command: - name: mysql server-logs download - summary: Download log files. - examples: - - summary: Download log files f1 and f2 to the current directory from the server 'testsvr'. - command: az mysql server-logs download -g testgroup -s testsvr -n f1.log f2.log -- group: - name: mysql db - summary: Manage MySQL databases on a server. -- command: - name: mysql db create - summary: Create a MySQL database. - examples: - - summary: Create database 'testdb' in the server 'testsvr' with the default parameters. - command: az mysql db create -g testgroup -s testsvr -n testdb - - summary: Create database 'testdb' in server 'testsvr' with a given character set and collation rules. - command: az mysql db create -g testgroup -s testsvr -n testdb --charset {valid_charset} --collation {valid_collation} -- command: - name: mysql db delete - summary: Delete a database. - examples: - - summary: Delete database 'testdb' in the server 'testsvr'. - command: az mysql db delete -g testgroup -s testsvr -n testdb -- command: - name: mysql db show - summary: Show the details of a database. - examples: - - summary: Show database 'testdb' in the server 'testsvr'. - command: az mysql db show -g testgroup -s testsvr -n testdb -- command: - name: mysql db list - summary: List the databases for a server. - examples: - - summary: List databases in the server 'testsvr'. - command: az mysql db list -g testgroup -s testsvr -- group: - name: postgres - summary: Manage Azure Database for PostgreSQL servers. -- group: - name: postgres server - summary: Manage PostgreSQL servers. -- command: - name: postgres server create - summary: Create a server. - examples: - - summary: Create a PostgreSQL server with a Standard performance tier and 2 vcore in North Europe. - command: | - az postgres server create -l northeurope -g testgroup -n testsvr -u username -p password \ - --sku-name "GP_Gen4_2" - - summary: Create a PostgreSQL server with all paramaters set. - command: | - az postgres server create -l northeurope -g testgroup -n testsvr -u username -p password \ - --sku-name "B_Gen4_2" --ssl-enforcement Disabled \ - --storage-size 51200 --tags "key=value" --version {server-version} -- command: - name: postgres server restore - summary: Restore a server from backup. - examples: - - summary: Restore 'testsvr' as 'testsvrnew'. - command: az postgres server restore -g testgroup -n testsvrnew --source-server testsvr --restore-point-in-time "2017-06-15T13:10:00Z" - - summary: Restore 'testsvr2' to 'testsvrnew', where 'testsvrnew' is in a different resource group than the backup. - command: | - az postgres server restore -g testgroup -n testsvrnew \ - -s "/subscriptions/${SubID}/resourceGroups/${ResourceGroup}/providers/Microsoft.DBforPostgreSQL/servers/testsvr2" \ - --restore-point-in-time "2017-06-15T13:10:00Z" -- command: - name: postgres server georestore - summary: Georestore a server from backup. - examples: - - summary: Georestore 'testsvr' as 'testsvrnew' where 'testsvrnew' is in same resource group as 'testsvr'. - command: az postgres server georestore -g testgroup -n testsvrnew --source-server testsvr -l westus2 - - summary: Georestore 'testsvr2' to 'testsvrnew', where 'testsvrnew' is in the different resource group as the original server. - command: | - az postgres server georestore -g testgroup -n testsvrnew \ - -s "/subscriptions/${SubID}/resourceGroups/${ResourceGroup}/providers/Microsoft.DBforPostgreSQL/servers/testsvr2" \ - -l westus2 --sku-name GP_Gen4_2 -- command: - name: postgres server update - summary: Update a server. - examples: - - summary: Update a server's sku. - command: az postgres server update -g testgroup -n testsvrnew --sku-name GP_Gen5_4 - - summary: Update a server's tags. - command: az postgres server update -g testgroup -n testsvrnew --tags "k1=v1" "k2=v2" -- command: - name: postgres server wait - summary: Wait for server to satisfy certain conditions. -- command: - name: postgres server delete - summary: Delete a server. -- command: - name: postgres server show - summary: Get the details of a server. -- command: - name: postgres server list - summary: List available servers. - examples: - - summary: List all PostgreSQL servers in a subscription. - command: az postgres server list - - summary: List all PostgreSQL servers in a resource group. - command: az postgres server list -g testgroup -- group: - name: postgres server firewall-rule - summary: Manage firewall rules for a server. -- command: - name: postgres server firewall-rule create - summary: Create a new firewall rule for a server. - examples: - - summary: Create a firewall rule allowing all connections from all IP addresses. - command: az postgres server firewall-rule create -g testgroup -s testsvr -n allowall --start-ip-address 0.0.0.0 --end-ip-address 255.255.255.255 -- command: - name: postgres server firewall-rule update - summary: Update a firewall rule. - examples: - - summary: Update a firewall rule's start IP address. - command: az postgres server firewall-rule update -g testgroup -s testsvr -n allowall --start-ip-address 0.0.0.1 - - summary: Update a firewall rule's start and end IP address. - command: az postgres server firewall-rule update -g testgroup -s testsvr -n allowall --start-ip-address 0.0.0.1 --end-ip-address 255.255.255.254 -- command: - name: postgres server firewall-rule delete - summary: Delete a firewall rule. -- command: - name: postgres server firewall-rule show - summary: Get the details of a firewall rule. -- command: - name: postgres server firewall-rule list - summary: List all firewall rules for a server. -- group: - name: postgres server vnet-rule - summary: Manage a server's virtual network rules. -- command: - name: postgres server vnet-rule update - summary: Update a virtual network rule. -- command: - name: postgres server vnet-rule create - summary: Create a virtual network rule to allows access to a PostgreSQL server. - examples: - - summary: Create a virtual network rule by providing the subnet id. - command: az postgres server vnet-rule create -g testgroup -s testsvr -n vnetRuleName --subnet /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Network/virtualNetworks/vnetName/subnets/subnetName - - summary: Create a vnet rule by providing the vnet and subnet name. The subnet id is created by taking the resource group name and subscription id of the server. - command: az postgres server vnet-rule create -g testgroup -s testsvr -n vnetRuleName --subnet subnetName --vnet-name vnetName -- group: - name: postgres server configuration - summary: Manage configuration values for a server. -- command: - name: postgres server configuration set - summary: Update the configuration of a server. - examples: - - summary: Set a new configuration value. - command: az postgres server configuration set -g testgroup -s testsvr -n {config_name} --value {config_value} - - summary: Set a configuration value to its default. - command: az postgres server configuration set -g testgroup -s testsvr -n {config_name} -- command: - name: postgres server configuration show - summary: Get the configuration for a server." -- command: - name: postgres server configuration list - summary: List the configuration values for a server. -- group: - name: postgres server-logs - summary: Manage server logs. -- command: - name: postgres server-logs list - summary: List log files for a server. - examples: - - summary: List log files for 'testsvr' modified in the last 72 hours (default value). - command: az postgres server-logs list -g testgroup -s testsvr - - summary: List log files for 'testsvr' modified in the last 10 hours. - command: az postgres server-logs list -g testgroup -s testsvr --file-last-written 10 - - summary: List log files for 'testsvr' less than 30Kb in size. - command: az postgres server-logs list -g testgroup -s testsvr --max-file-size 30 -- command: - name: postgres server-logs download - summary: Download log files. - examples: - - summary: Download log files f1 and f2 to the current directory from the server 'testsvr'. - command: az postgres server-logs download -g testgroup -s testsvr -n f1.log f2.log -- group: - name: postgres db - summary: Manage PostgreSQL databases on a server. -- command: - name: postgres db create - summary: Create a PostgreSQL database. - examples: - - summary: Create database 'testdb' in the server 'testsvr' with the default parameters. - command: az postgres db create -g testgroup -s testsvr -n testdb - - summary: Create database 'testdb' in server 'testsvr' with a given character set and collation rules. - command: az postgres db create -g testgroup -s testsvr -n testdb --charset {valid_charset} --collation {valid_collation} -- command: - name: postgres db delete - summary: Delete a database. - examples: - - summary: Delete database 'testdb' in the server 'testsvr'. - command: az postgres db delete -g testgroup -s testsvr -n testdb -- command: - name: postgres db show - summary: Show the details of a database. - examples: - - summary: Show database 'testdb' in the server 'testsvr'. - command: az postgres db show -g testgroup -s testsvr -n testdb -- command: - name: postgres db list - summary: List the databases for a server. - examples: - - summary: List databases in the server 'testsvr'. - command: az postgres db list -g testgroup -s testsvr diff --git a/src/command_modules/azure-cli-redis/azure/cli/command_modules/redis/help.yaml b/src/command_modules/azure-cli-redis/azure/cli/command_modules/redis/help.yaml deleted file mode 100644 index d328512f487..00000000000 --- a/src/command_modules/azure-cli-redis/azure/cli/command_modules/redis/help.yaml +++ /dev/null @@ -1,29 +0,0 @@ -version: 1 -content: -- group: - name: redis - summary: Manage dedicated Redis caches for your Azure applications. -- command: - name: redis export - summary: Export data stored in a Redis cache. -- command: - name: redis import - summary: Import data into a Redis cache. -- command: - name: redis import-method - summary: Import data into a Redis cache. -- command: - name: redis list - summary: List Redis caches. -- command: - name: redis list-all - summary: Gets all Redis caches in the specified subscription. -- command: - name: redis update-settings - summary: Update the settings of a Redis cache. -- command: - name: redis update - summary: Scale or update settings of a Redis cache. -- group: - name: redis patch-schedule - summary: Manage Redis patch schedules. diff --git a/src/command_modules/azure-cli-relay/azure/cli/command_modules/relay/help.yaml b/src/command_modules/azure-cli-relay/azure/cli/command_modules/relay/help.yaml deleted file mode 100644 index 5764556229c..00000000000 --- a/src/command_modules/azure-cli-relay/azure/cli/command_modules/relay/help.yaml +++ /dev/null @@ -1,256 +0,0 @@ -version: 1 -content: -- group: - name: relay - summary: Manage Azure Relay Service namespaces, WCF relays, hybrid connections, and rules -- group: - name: relay namespace - summary: Manage Azure Relay Service Namespace -- group: - name: relay namespace authorization-rule - summary: Manage Azure Relay Service Namespace Authorization Rule -- group: - name: relay namespace authorization-rule keys - summary: Manage Azure Authorization Rule connection strings for Namespace -- group: - name: relay wcfrelay - summary: Manage Azure Relay Service WCF Relay and Authorization Rule -- group: - name: relay wcfrelay authorization-rule - summary: Manage Azure Relay Service WCF Relay Authorization Rule -- group: - name: relay wcfrelay authorization-rule keys - summary: Manage Azure Authorization Rule keys for Relay Service WCF Relay -- group: - name: relay hyco - summary: Manage Azure Relay Service Hybrid Connection and Authorization Rule -- group: - name: relay hyco authorization-rule - summary: Manage Azure Relay Service Hybrid Connection Authorization Rule -- group: - name: relay hyco authorization-rule keys - summary: Manage Azure Authorization Rule keys for Relay Service Hybrid Connection -- command: - name: relay namespace exists - summary: check for the availability of the given name for the Namespace - examples: - - summary: check for the availability of mynamespace for the Namespace - command: az relay namespace exists --name mynamespace -- command: - name: relay namespace create - summary: Create a Relay Service Namespace - examples: - - summary: Create a Relay Service Namespace. - command: az relay namespace create --resource-group myresourcegroup --name mynamespace --location westus --tags tag1=value1 tag2=value2 -- command: - name: relay namespace update - summary: Updates a Relay Service Namespace - examples: - - summary: Updates a Relay Service Namespace. - command: az relay namespace update --resource-group myresourcegroup --name mynamespace --tags tag=value -- command: - name: relay namespace show - summary: Shows the Relay Service Namespace details - examples: - - summary: shows the Namespace details. - command: az relay namespace show --resource-group myresourcegroup --name mynamespace -- command: - name: relay namespace list - summary: List the Relay Service Namespaces - examples: - - summary: Get the Relay Service Namespaces by resource group - command: az relay namespace list --resource-group myresourcegroup - - summary: Get the Relay Service Namespaces by Subscription. - command: az relay namespace list -- command: - name: relay namespace delete - summary: Deletes the Relay Service Namespace - examples: - - summary: Deletes the Relay Service Namespace - command: az relay namespace delete --resource-group myresourcegroup --name mynamespace -- command: - name: relay namespace authorization-rule create - summary: Create Authorization Rule for the given Relay Service Namespace - examples: - - summary: Create Authorization Rule 'myrule' for the given Relay Service Namespace 'mynamespace' in resourcegroup - command: az relay namespace authorization-rule create --resource-group myresourcegroup --namespace-name mynamespace --name myauthorule --rights Send Listen -- command: - name: relay namespace authorization-rule update - summary: Updates Authorization Rule for the given Relay Service Namespace - examples: - - summary: Updates Authorization Rule 'myrule' for the given Relay Service Namespace 'mynamespace' in resourcegroup - command: az relay namespace authorization-rule update --resource-group myresourcegroup --namespace-name mynamespace --name myauthorule --rights Send -- command: - name: relay namespace authorization-rule show - summary: Shows the details of Relay Service Namespace Authorization Rule - examples: - - summary: Shows the details of Relay Service Namespace Authorization Rule - command: az relay namespace authorization-rule show --resource-group myresourcegroup --namespace-name mynamespace --name myauthorule -- command: - name: relay namespace authorization-rule list - summary: Shows the list of Authorization Rule by Relay Service Namespace - examples: - - summary: Shows the list of Authorization Rule by Relay Service Namespace - command: az relay namespace authorization-rule list --resource-group myresourcegroup --namespace-name mynamespace -- command: - name: relay namespace authorization-rule keys list - summary: List the keys and connection strings of Authorization Rule for Relay Service Namespace - examples: - - summary: List the keys and connection strings of Authorization Rule for Relay Service Namespace - command: az relay namespace authorization-rule keys list --resource-group myresourcegroup --namespace-name mynamespace --name myauthorule -- command: - name: relay namespace authorization-rule keys renew - summary: Regenerate keys of Authorization Rule for the Relay Service Namespace. - examples: - - summary: Regenerate keys of Authorization Rule for the Relay Service Namespace. - command: az relay namespace authorization-rule keys renew --resource-group myresourcegroup --namespace-name mynamespace --name myauthorule --key PrimaryKey -- command: - name: relay namespace authorization-rule delete - summary: Deletes the Authorization Rule of the Relay Service Namespace. - examples: - - summary: Deletes the Authorization Rule of the Relay Service Namespace. - command: az relay namespace authorization-rule delete --resource-group myresourcegroup --namespace-name mynamespace --name myauthorule -- command: - name: relay wcfrelay create - summary: Create the Relay Service WCF Relay - examples: - - summary: Create Relay Service WCF Relay. - command: az relay wcfrelay create --resource-group myresourcegroup --namespace-name mynamespace --name myrelay --relay-type NetTcp -- command: - name: relay wcfrelay update - summary: Updates existing Relay Service WCF Relay - examples: - - summary: Updates Relay Service WCF Relay. - command: az relay wcfrelay update --resource-group myresourcegroup --namespace-name mynamespace --name myrelay -- command: - name: relay wcfrelay show - summary: shows the Relay Service WCF Relay Details - examples: - - summary: Shows the Relay Service WCF Relay Details - command: az relay wcfrelay show --resource-group myresourcegroup --namespace-name mynamespace --name myrelay -- command: - name: relay wcfrelay list - summary: List the WCF Relay by Relay Service Namepsace - examples: - - summary: Get the WCF Relays by Relay Service Namespace. - command: az relay wcfrelay list --resource-group myresourcegroup --namespace-name mynamespace -- command: - name: relay wcfrelay delete - summary: Deletes the Relay Service WCF Relay - examples: - - summary: Deletes the wcfrelay - command: az relay wcfrelay delete --resource-group myresourcegroup --namespace-name mynamespace --name myrelay -- command: - name: relay wcfrelay authorization-rule create - summary: Create Authorization Rule for the given Relay Service WCF Relay. - examples: - - summary: Create Authorization Rule for WCF Relay - command: az relay wcfrelay authorization-rule create --resource-group myresourcegroup --namespace-name mynamespace --relay-name myrelay --name myauthorule --rights Listen -- command: - name: relay wcfrelay authorization-rule update - summary: Update Authorization Rule for the given Relay Service WCF Relay. - examples: - - summary: Update Authorization Rule for WCF Relay - command: az relay wcfrelay authorization-rule update --resource-group myresourcegroup --namespace-name mynamespace --relay-name myrelay --name myauthorule --rights Send -- command: - name: relay wcfrelay authorization-rule show - summary: show properties of Authorization Rule for the given Relay Service WCF Relay. - examples: - - summary: show properties of Authorization Rule - command: az relay wcfrelay authorization-rule show --resource-group myresourcegroup --namespace-name mynamespace --relay-name myrelay --name myauthorule -- command: - name: relay wcfrelay authorization-rule list - summary: List of Authorization Rule by Relay Service WCF Relay. - examples: - - summary: List of Authorization Rule by WCF Relay - command: az relay wcfrelay authorization-rule list --resource-group myresourcegroup --namespace-name mynamespace --relay-name myrelay -- command: - name: relay wcfrelay authorization-rule keys list - summary: List the keys and connection strings of Authorization Rule for the given Relay Service WCF Relay - examples: - - summary: List the keys and connection strings of Authorization Rule for the given Relay Service WCF Relay - command: az relay wcfrelay authorization-rule keys list --resource-group myresourcegroup --namespace-name mynamespace --relay-name myrelay --name myauthorule -- command: - name: relay wcfrelay authorization-rule keys renew - summary: Regenerate keys of Authorization Rule for Relay Service WCF Relay - examples: - - summary: Regenerate keys of Authorization Rule for Relay Service WCF Relay - command: az relay wcfrelay authorization-rule keys renew --resource-group myresourcegroup --namespace-name mynamespace --relay-name myrelay --name myauthorule --key PrimaryKey -- command: - name: relay wcfrelay authorization-rule delete - summary: Delete the Authorization Rule of Relay Service WCF Relay - examples: - - summary: Delete the Authorization Rule of Relay Service WCF Relay - command: az relay wcfrelay authorization-rule delete --resource-group myresourcegroup --namespace-name mynamespace --relay-name myrelay --name myauthorule -- command: - name: relay hyco create - summary: Create the Relay Service Hybrid Connection - examples: - - summary: Create a new Relay Service Hybrid Connection - command: az relay hyco create --resource-group myresourcegroup --namespace-name mynamespace --name myhyco -- command: - name: relay hyco update - summary: Updates the Relay Service Hybrid Connection - examples: - - summary: Updates existing Relay Service Hybrid Connection. - command: az relay hyco update --resource-group myresourcegroup --namespace-name mynamespace --name myhyco -- command: - name: relay hyco show - summary: Shows the Relay Service Hybrid Connection Details - examples: - - summary: Shows the Hybrid Connection details. - command: az relay hyco show --resource-group myresourcegroup --namespace-name mynamespace --name myhyco -- command: - name: relay hyco list - summary: List the Hybrid Connection by Relay Service Namepsace - examples: - - summary: Get the Hybrid Connections by Namespace. - command: az relay hyco list --resource-group myresourcegroup --namespace-name mynamespace -- command: - name: relay hyco delete - summary: Deletes the Relay Service Hybrid Connection - examples: - - summary: Deletes the Relay Service Hybrid Connection - command: az relay hyco delete --resource-group myresourcegroup --namespace-name mynamespace --name myhyco -- command: - name: relay hyco authorization-rule create - summary: Create Authorization Rule for given Relay Service Hybrid Connection - examples: - - summary: Create Authorization Rule for given Relay Service Hybrid Connection - command: az relay hyco authorization-rule create --resource-group myresourcegroup --namespace-name mynamespace --hybrid-connection-name myhyco --name myauthorule --rights Send Listen -- command: - name: relay hyco authorization-rule update - summary: Create Authorization Rule for given Relay Service Hybrid Connection - examples: - - summary: Create Authorization Rule for given Relay Service Hybrid Connection - command: az relay hyco authorization-rule update --resource-group myresourcegroup --namespace-name mynamespace --hybrid-connection-name myhyco --name myauthorule --rights Send -- command: - name: relay hyco authorization-rule show - summary: Shows the details of Authorization Rule for given Relay Service Hybrid Connection - examples: - - summary: Shows the details of Authorization Rule for given Relay Service Hybrid Connection - command: az relay hyco authorization-rule show --resource-group myresourcegroup --namespace-name mynamespace --hybrid-connection-name myhyco --name myauthorule -- command: - name: relay hyco authorization-rule list - summary: shows list of Authorization Rule by Relay Service Hybrid Connection - examples: - - summary: shows list of Authorization Rule by Relay Service Hybrid Connection - command: az relay hyco authorization-rule list --resource-group myresourcegroup --namespace-name mynamespace --hybrid-connection-name myhyco -- command: - name: relay hyco authorization-rule keys list - summary: List the keys and connection strings of Authorization Rule for Relay Service Hybrid Connection. - examples: - - summary: List the keys and connection strings of Authorization Rule for Relay Service Hybrid Connection. - command: az relay hyco authorization-rule keys list --resource-group myresourcegroup --namespace-name mynamespace --hybrid-connection-name myhyco --name myauthorule -- command: - name: relay hyco authorization-rule keys renew - summary: Regenerate keys of Authorization Rule for Relay Service Hybrid Connection. - examples: - - summary: Regenerate key of Relay Service Hybrid Connection. - command: az relay hyco authorization-rule keys renew --resource-group myresourcegroup --namespace-name mynamespace --hybrid-connection-name myhyco --name myauthorule --key PrimaryKey -- command: - name: relay hyco authorization-rule delete - summary: Deletes the Authorization Rule of the given Relay Service Hybrid Connection. - examples: - - summary: Deletes the Authorization Rule of Relay Service Hybrid Connection. - command: az relay hyco authorization-rule delete --resource-group myresourcegroup --namespace-name mynamespace --hybrid-connection-name myhyco --name myauthorule diff --git a/src/command_modules/azure-cli-reservations/azure/cli/command_modules/reservations/help.yaml b/src/command_modules/azure-cli-reservations/azure/cli/command_modules/reservations/help.yaml deleted file mode 100644 index 6d2b4ea7e09..00000000000 --- a/src/command_modules/azure-cli-reservations/azure/cli/command_modules/reservations/help.yaml +++ /dev/null @@ -1,107 +0,0 @@ -version: 1 -content: -- group: - name: reservations - summary: Manage Azure Reservations. -- group: - name: reservations catalog - summary: See catalog of available reservations -- group: - name: reservations reservation - summary: Manage reservation entities -- group: - name: reservations reservation-order - summary: Manage reservation order, which is container for reservations -- group: - name: reservations reservation-order-id - summary: See reservation order ids that are applied to subscription -- command: - name: reservations reservation-order list - summary: Get all reservation orders - description: | - List of all the reservation orders that the user has access to in the current tenant. -- command: - name: reservations reservation-order show - summary: Get a specific reservation order. - description: Get the details of the reservation order. - arguments: - - name: --reservation-order-id - summary: Id of reservation order to look up -- command: - name: reservations reservation-order-id list - summary: Get list of applicable reservation order ids. - description: | - Get applicable reservations that are applied to this subscription. - arguments: - - name: --subscription-id - summary: Id of the subscription to look up applied reservations -- command: - name: reservations catalog show - summary: Get catalog of available reservation. - description: | - Get the regions and skus that are available for RI purchase for the specified Azure subscription. - arguments: - - name: --subscription-id - summary: Id of the subscription to get the catalog for - - name: --reserved-resource-type - summary: Type of the resource for which the skus should be provided. -- command: - name: reservations reservation list - summary: Get all reservations. - description: | - List all reservations within a reservation order. - arguments: - - name: --reservation-order-id - summary: Id of container reservation order -- command: - name: reservations reservation show - summary: Get details of a reservation. - arguments: - - name: --reservation-order-id - summary: Order id of reservation to look up - - name: --reservation-id - summary: Reservation id of reservation to look up -- command: - name: reservations reservation update - summary: Updates the applied scopes of the reservation. - arguments: - - name: --reservation-order-id - summary: Reservation order id of the reservation to update - - name: --reservation-id - summary: Id of the reservation to update - - name: --applied-scope-type - summary: Type of the Applied Scope to update the reservation with - - name: --applied-scopes - summary: Subscription that the benefit will be applied. Do not specify if AppliedScopeType is Shared. - - name: --instance-flexibility - summary: Type of the Instance Flexibility to update the reservation with -- command: - name: reservations reservation split - summary: Split a reservation. - arguments: - - name: --reservation-order-id - summary: Reservation order id of the reservation to split - - name: --reservation-id - summary: Reservation id of the reservation to split - - name: --quantity-1 - summary: Quantity of the first reservation that will be created from split operation - - name: --quantity-2 - summary: Quantity of the second reservation that will be created from split operation -- command: - name: reservations reservation merge - summary: Merge two reservations. - arguments: - - name: --reservation-order-id - summary: Reservation order id of the reservations to merge - - name: --reservation-id-1 - summary: Id of the first reservation to merge - - name: --reservation-id-2 - summary: Id of the second reservation to merge -- command: - name: reservations reservation list-history - summary: Get history of a reservation. - arguments: - - name: --reservation-order-id - summary: Order id of the reservation - - name: --reservation-id - summary: Reservation id of the reservation diff --git a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/help.yaml b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/help.yaml deleted file mode 100644 index 2c201c150b8..00000000000 --- a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/help.yaml +++ /dev/null @@ -1,846 +0,0 @@ -version: 1 -content: -- group: - name: managedapp - summary: Manage template solutions provided and maintained by Independent Software Vendors (ISVs). -- group: - name: managedapp definition - summary: Manage Azure Managed Applications. -- command: - name: managedapp create - summary: Create a managed application. - examples: - - summary: Create a managed application of kind 'ServiceCatalog'. This requires a valid managed application definition ID. - command: | - az managedapp create -g MyResourceGroup -n MyManagedApp -l westcentralus --kind ServiceCatalog \ - -m "/subscriptions/{SubID}/resourceGroups/{ManagedResourceGroup}" \ - -d "/subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Solutions/applianceDefinitions/{ApplianceDefinition}" - - summary: Create a managed application of kind 'MarketPlace'. This requires a valid plan, containing details about existing marketplace package like plan name, version, publisher and product. - command: | - az managedapp create -g MyResourceGroup -n MyManagedApp -l westcentralus --kind MarketPlace \ - -m "/subscriptions/{SubID}/resourceGroups/{ManagedResourceGroup}" \ - --plan-name ContosoAppliance --plan-version "1.0" --plan-product "contoso-appliance" --plan-publisher Contoso -- command: - name: managedapp definition create - summary: Create a managed application definition. - examples: - - summary: Create a managed application defintion. - command: > - az managedapp definition create -g MyResourceGroup -n MyManagedAppDef -l eastus --display-name "MyManagedAppDef" \ - --description "My Managed App Def description" -a "myPrincipalId:myRoleId" --lock-level None \ - --package-file-uri "https://path/to/myPackage.zip" - - summary: Create a managed application defintion with inline values for createUiDefinition and mainTemplate. - command: > - az managedapp definition create -g MyResourceGroup -n MyManagedAppDef -l eastus --display-name "MyManagedAppDef" \ - --description "My Managed App Def description" -a "myPrincipalId:myRoleId" --lock-level None \ - --create-ui-definition @myCreateUiDef.json --main-template @myMainTemplate.json -- command: - name: managedapp definition delete - summary: Delete a managed application definition. -- command: - name: managedapp definition list - summary: List managed application definitions. -- command: - name: managedapp delete - summary: Delete a managed application. -- command: - name: managedapp list - summary: List managed applications. -- group: - name: lock - summary: Manage Azure locks. -- command: - name: lock create - summary: Create a lock. - description: 'Locks can exist at three different scopes: subscription, resource group and resource.' - examples: - - summary: Create a read-only subscription level lock. - command: > - az lock create --name lockName --resource-group group --lock-type ReadOnly -- command: - name: lock delete - summary: Delete a lock. - examples: - - summary: Delete a resource group-level lock - command: > - az lock delete --name lockName --resource-group group -- command: - name: lock list - summary: List lock information. - examples: - - summary: List out the locks on a vnet resource. Includes locks in the associated group and subscription. - command: > - az lock list --resource myvnet --resource-type Microsoft.Network/virtualNetworks -g group - - summary: List out all locks on the subscription level - command: > - az lock list -- command: - name: lock show - summary: Show the properties of a lock - examples: - - summary: Show a subscription level lock - command: > - az lock show -n lockname -- command: - name: lock update - summary: Update a lock. - examples: - - summary: Update a resource group level lock with new notes and type - command: > - az lock update --name lockName --resource-group group --notes newNotesHere --lock-type CanNotDelete -- group: - name: account lock - summary: Manage Azure subscription level locks. -- command: - name: account lock create - summary: Create a subscription lock. - examples: - - summary: Create a read-only subscription level lock. - command: > - az account lock create --lock-type ReadOnly -n lockName -- command: - name: account lock delete - summary: Delete a subscription lock. - examples: - - summary: Delete a subscription lock - command: > - az account lock delete --name lockName -- command: - name: account lock list - summary: List lock information in the subscription. - examples: - - summary: List out all locks on the subscription level - command: > - az account lock list -- command: - name: account lock show - summary: Show the details of a subscription lock - examples: - - summary: Show a subscription level lock - command: > - az account lock show -n lockname -- command: - name: account lock update - summary: Update a subscription lock. - examples: - - summary: Update a subscription lock with new notes and type - command: > - az account lock update --name lockName --notes newNotesHere --lock-type CanNotDelete -- group: - name: account management-group - summary: Manage Azure Management Groups. -- group: - name: account management-group subscription - summary: Subscription operations for Management Groups. -- command: - name: account management-group list - summary: List all management groups. - description: List of all management groups in the current tenant. - examples: - - summary: List all management groups - command: > - az account management-group list -- command: - name: account management-group show - summary: Get a specific management group. - description: Get the details of the management group. - arguments: - - name: --name - summary: Name of the management group. - - name: --expand - summary: If given, lists the children in the first level of hierarchy. - - name: --recurse - summary: If given, lists the children in all levels of hierarchy. - examples: - - summary: Get a management group. - command: > - az account management-group show --name GroupName - - summary: Get a management group with children in the first level of hierarchy. - command: > - az account management-group show --name GroupName -e - - summary: Get a management group with children in all levels of hierarchy. - command: > - az account management-group show --name GroupName -e -r -- command: - name: account management-group create - summary: Create a new management group. - description: Create a new management group. - arguments: - - name: --name - summary: Name of the management group. - - name: --display-name - summary: Sets the display name of the management group. If null, the group name is set as the display name. - - name: --parent - summary: Sets the parent of the management group. Can be the fully qualified id or the name of the management group. If null, the root tenant group is set as the parent. - examples: - - summary: Create a new management group. - command: > - az account management-group create --name GroupName - - summary: Create a new management group with a specific display name. - command: > - az account management-group create --name GroupName --display-name DisplayName - - summary: Create a new management group with a specific parent. - command: > - az account management-group create --name GroupName --parent ParentId/ParentName - - summary: Create a new management group with a specific display name and parent. - command: > - az account management-group create --name GroupName --display-name DisplayName --parent ParentId/ParentName -- command: - name: account management-group update - summary: Update an existing management group. - description: Update an existing management group. - arguments: - - name: --name - summary: Name of the management group. - - name: --display-name - summary: Updates the display name of the management group. If null, no change is made. - - name: --parent - summary: Update the parent of the management group. Can be the fully qualified id or the name of the management group. If null, no change is made. - examples: - - summary: Update an existing management group with a specific display name. - command: > - az account management-group update --name GroupName --display-name DisplayName - - summary: Update an existing management group with a specific parent. - command: > - az account management-group update --name GroupName --parent ParentId/ParentName - - summary: Update an existing management group with a specific display name and parent. - command: > - az account management-group update --name GroupName --display-name DisplayName --parent ParentId/ParentName -- command: - name: account management-group delete - summary: Delete an existing management group. - description: Delete an existing management group. - arguments: - - name: --name - summary: Name of the management group. - examples: - - summary: Delete an existing management group - command: > - az account management-group delete --name GroupName -- command: - name: account management-group subscription add - summary: Add a subscription to a management group. - description: Add a subscription to a management group. - arguments: - - name: --name - summary: Name of the management group. - - name: --subscription - summary: Subscription Id or Name - examples: - - summary: Add a subscription to a management group. - command: > - az account management-group subscription add --name GroupName --subscription Subscription -- command: - name: account management-group subscription remove - summary: Remove an existing subscription from a management group. - description: Remove an existing subscription from a management group. - arguments: - - name: --name - summary: Name of the management group. - - name: --subscription - summary: Subscription Id or Name - examples: - - summary: Remove an existing subscription from a management group. - command: > - az account management-group subscription remove --name GroupName --subscription Subscription -- group: - name: policy - summary: Manage resource policies. -- group: - name: policy definition - summary: Manage resource policy definitions. -- command: - name: policy definition create - summary: Create a policy definition. - arguments: - - name: --rules - summary: Policy rules in JSON format, or a path to a file containing JSON rules. - - name: --management-group - summary: Name of the management group the new policy definition can be assigned in. - - name: --subscription - summary: Name or id of the subscription the new policy definition can be assigned in. - examples: - - summary: Create a read-only policy. - command: | - az policy definition create --name readOnlyStorage --rules '{ \ - "if": \ - { \ - "field": "type", \ - "equals": "Microsoft.Storage/storageAccounts/write" \ - }, \ - "then": \ - { \ - "effect": "deny" \ - } \ - }' - - summary: Create a policy parameter definition. - command: | - az policy definition create --name allowedLocations --rules '{ \ - "if": { \ - "allOf": [ \ - { \ - "field": "location", \ - "notIn": "[parameters('listOfAllowedLocations')]" \ - }, \ - { \ - "field": "location", \ - "notEquals": "global" \ - }, \ - { \ - "field": "type", \ - "notEquals": "Microsoft.AzureActiveDirectory/b2cDirectories" \ - } \ - ] \ - }, \ - "then": { \ - "effect": "deny" \ - } \ - }' \ - --params '{ \ - "allowedLocations": { \ - "type": "array", \ - "metadata": { \ - "description": "The list of locations that can be specified when deploying resources", \ - "strongType": "location", \ - "displayName": "Allowed locations" \ - } \ - } \ - }' - - summary: Create a read-only policy that can be applied within a management group. - command: | - az policy definition create -n readOnlyStorage --management-group 'MyManagementGroup' --rules '{ \ - "if": \ - { \ - "field": "type", \ - "equals": "Microsoft.Storage/storageAccounts/write" \ - }, \ - "then": \ - { \ - "effect": "deny" \ - } \ - }' -- command: - name: policy definition delete - summary: Delete a policy definition. -- command: - name: policy definition show - summary: Show a policy definition. -- command: - name: policy definition update - summary: Update a policy definition. -- command: - name: policy definition list - summary: List policy definitions. -- group: - name: policy set-definition - summary: Manage resource policy set definitions. -- command: - name: policy set-definition create - summary: Create a policy set definition. - arguments: - - name: --definitions - summary: Policy definitions in JSON format, or a path to a file containing JSON rules. - - name: --management-group - summary: Name of management group the new policy set definition can be assigned in. - - name: --subscription - summary: Name or id of the subscription the new policy set definition can be assigned in. - examples: - - summary: Create a policy set definition. - command: | - az policy set-definition create -n readOnlyStorage --definitions '[ \ - { \ - "policyDefinitionId": "/subscriptions/mySubId/providers/Microsoft.Authorization/policyDefinitions/storagePolicy" \ - } \ - ]' - - summary: Create a policy set definition to be used by a subscription. - command: | - az policy set-definition create -n readOnlyStorage --subscription '0b1f6471-1bf0-4dda-aec3-111122223333' --definitions '[ \ - { \ - "policyDefinitionId": "/subscriptions/mySubId/providers/Microsoft.Authorization/policyDefinitions/storagePolicy" \ - } \ - ]' -- command: - name: policy set-definition delete - summary: Delete a policy set definition. -- command: - name: policy set-definition show - summary: Show a policy set definition. -- command: - name: policy set-definition update - summary: Update a policy set definition. -- command: - name: policy set-definition list - summary: List policy set definitions. -- group: - name: policy assignment - summary: Manage resource policy assignments. -- command: - name: policy assignment create - summary: Create a resource policy assignment. - arguments: - - name: --scope - summary: Scope to which this policy assignment applies. - examples: - - summary: Create a resource policy assignment at scope - command: | - Valid scopes are management group, subscription, resource group, and resource, for example - management group: /providers/Microsoft.Management/managementGroups/MyManagementGroup - subscription: /subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333 - resource group: /subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup - resource: /subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup/providers/Microsoft.Compute/virtualMachines/myVM - az policy assignment create --scope '/providers/Microsoft.Management/managementGroups/MyManagementGroup' --policy {PolicyName} -p '{ \ - "allowedLocations": { \ - "value": [ \ - "australiaeast", \ - "eastus", \ - "japaneast" \ - ] \ - } \ - }' - - summary: Create a resource policy assignment and provide rule parameter values. - command: | - az policy assignment create --policy {PolicyName} -p '{ \ - "allowedLocations": { \ - "value": [ \ - "australiaeast", \ - "eastus", \ - "japaneast" \ - ] \ - } \ - }' - - summary: Create a resource policy assignment with a system assigned identity. - command: > - az policy assignment create --name myPolicy --policy {PolicyName} --assign-identity - - summary: Create a resource policy assignment with a system assigned identity. The identity will have 'Contributor' role access to the subscription. - command: > - az policy assignment create --name myPolicy --policy {PolicyName} --assign-identity --identity-scope /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --role Contributor -- command: - name: policy assignment delete - summary: Delete a resource policy assignment. -- command: - name: policy assignment show - summary: Show a resource policy assignment. -- command: - name: policy assignment list - summary: List resource policy assignments. -- group: - name: policy assignment identity - summary: Manage a policy assignment's managed identity. -- command: - name: policy assignment identity assign - summary: Add a system assigned identity to a policy assignment. - examples: - - summary: Add a system assigned managed identity to a policy assignment. - command: > - az policy assignment identity assign -g MyResourceGroup -n MyPolicyAssignment - - summary: Add a system assigned managed identity to a policy assignment and grant it the 'Contributor' role for the current resource group. - command: > - az policy assignment identity assign -g MyResourceGroup -n MyPolicyAssignment --role Contributor --identity-scope /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/MyResourceGroup -- command: - name: policy assignment identity show - summary: Show a policy assignment's managed identity. -- command: - name: policy assignment identity remove - summary: Remove a managed identity from a policy assignment. -- group: - name: resource - summary: Manage Azure resources. -- command: - name: resource list - summary: List resources. - examples: - - summary: List all resources in the West US region. - command: > - az resource list --location westus - - summary: List all resources with the name 'resourceName'. - command: > - az resource list --name 'resourceName' - - summary: List all resources with the tag 'test'. - command: > - az resource list --tag test - - summary: List all resources with a tag that starts with 'test'. - command: > - az resource list --tag 'test*' - - summary: List all resources with the tag 'test' that have the value 'example'. - command: > - az resource list --tag test=example -- command: - name: resource show - summary: Get the details of a resource. - examples: - - summary: Show a virtual machine resource named 'MyVm'. - command: > - az resource show -g MyResourceGroup -n MyVm --resource-type "Microsoft.Compute/virtualMachines" - - summary: Show a web app using a resource identifier. - command: > - az resource show --ids /subscriptions/0b1f6471-1bf0-4dda-aec3-111111111111/resourceGroups/MyResourceGroup/providers/Microsoft.Web/sites/MyWebapp - - summary: Show a subnet. - command: > - az resource show -g MyResourceGroup -n MySubnet --namespace Microsoft.Network --parent virtualnetworks/MyVnet --resource-type subnets - - summary: Show a subnet using a resource identifier. - command: > - az resource show --ids /subscriptions/0b1f6471-1bf0-4dda-aec3-111111111111/resourceGroups/MyResourceGroup/providers/Microsoft.Network/virtualNetworks/MyVnet/subnets/MySubnet - - summary: Show an application gateway path rule. - command: > - az resource show -g MyResourceGroup --namespace Microsoft.Network --parent applicationGateways/ag1/urlPathMaps/map1 --resource-type pathRules -n rule1 -- command: - name: resource delete - summary: Delete a resource. - examples: - - summary: Delete a virtual machine named 'MyVm'. - command: > - az resource delete -g MyResourceGroup -n MyVm --resource-type "Microsoft.Compute/virtualMachines" - - summary: Delete a web app using a resource identifier. - command: > - az resource delete --ids /subscriptions/0b1f6471-1bf0-4dda-aec3-111111111111/resourceGroups/MyResourceGroup/providers/Microsoft.Web/sites/MyWebapp - - summary: Delete a subnet using a resource identifier. - command: > - az resource delete --ids /subscriptions/0b1f6471-1bf0-4dda-aec3-111111111111/resourceGroups/MyResourceGroup/providers/Microsoft.Network/virtualNetworks/MyVnet/subnets/MySubnet -- command: - name: resource tag - summary: Tag a resource. - examples: - - summary: Tag the virtual machine 'MyVm' with the key 'vmlist' and value 'vm1'. - command: > - az resource tag --tags vmlist=vm1 -g MyResourceGroup -n MyVm --resource-type "Microsoft.Compute/virtualMachines" - - summary: Tag a web app with the key 'vmlist' and value 'vm1', using a resource identifier. - command: > - az resource tag --tags vmlist=vm1 --id /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Web/sites/{WebApp} -- command: - name: resource create - summary: create a resource. - examples: - - summary: Create an API app by providing a full JSON configuration. - command: | - az resource create -g myRG -n myApiApp --resource-type Microsoft.web/sites --is-full-object --properties '{ \ - "kind": "api", \ - "location": "West US", \ - "properties": { \ - "serverFarmId": "/subscriptions/{SubID}/resourcegroups/{ResourceGroup}/providers/Microsoft.Web/serverfarms/{ServicePlan}" \ - } \ - }' - - summary: Create a resource by loading JSON configuration from a file. - command: > - az resource create -g myRG -n myApiApp --resource-type Microsoft.web/sites --is-full-object --properties @jsonConfigFile - - summary: Create a web app with the minimum required configuration information. - command: | - az resource create -g myRG -n myWeb --resource-type Microsoft.web/sites --properties '{ \ - "serverFarmId":"/subscriptions/{SubID}/resourcegroups/{ResourceGroup}/providers/Microsoft.Web/serverfarms/{ServicePlan}" \ - }' -- command: - name: resource update - summary: Update a resource. -- command: - name: resource wait - summary: Place the CLI in a waiting state until a condition of a resources is met. -- command: - name: resource invoke-action - summary: Invoke an action on the resource. - description: > - A list of possible actions corresponding to a resource can be found at https://docs.microsoft.com/en-us/rest/api/. All POST requests are actions that can be invoked and are specified at the end of the URI path. For instance, to stop a VM, the - request URI is https://management.azure.com/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroup}/providers/Microsoft.Compute/virtualMachines/{VM}/powerOff?api-version={APIVersion} and the corresponding action is `powerOff`. This can - be found at https://docs.microsoft.com/en-us/rest/api/compute/virtualmachines/virtualmachines-stop. - examples: - - summary: Power-off a vm, specified by Id. - command: > - az resource invoke-action --action powerOff \ - --ids /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Compute/virtualMachines/{VMName} - - summary: Capture information for a stopped vm. - command: > - az resource invoke-action --action capture \ - --ids /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Compute/virtualMachines/{VMName} \ - --request-body '{ \ - "vhdPrefix": "myPrefix", \ - "destinationContainerName": "myContainer", \ - "overwriteVhds": true \ - }' -- group: - name: feature - summary: Manage resource provider features. -- command: - name: feature list - summary: List preview features. -- command: - name: feature register - summary: register a preview feature. -- group: - name: group - summary: Manage resource groups and template deployments. -- command: - name: group exists - summary: Check if a resource group exists. - examples: - - summary: Check if 'MyResourceGroup' exists. - command: > - az group exists -n MyResourceGroup -- command: - name: group create - summary: Create a new resource group. - examples: - - summary: Create a new resource group in the West US region. - command: > - az group create -l westus -n MyResourceGroup -- command: - name: group delete - summary: Delete a resource group. - examples: - - summary: Delete a resource group. - command: > - az group delete -n MyResourceGroup -- command: - name: group list - summary: List resource groups. - examples: - - summary: List all resource groups located in the West US region. - command: > - az group list --query "[?location=='westus']" -- command: - name: group update - summary: Update a resource group. -- command: - name: group wait - summary: Place the CLI in a waiting state until a condition of the resource group is met. -- group: - name: group deployment - summary: Manage Azure Resource Manager deployments. -- command: - name: group deployment create - summary: Start a deployment. - arguments: - - name: --parameters - summary: Supply deployment parameter values. - description: > - Parameters may be supplied from a file using the `@{path}` syntax, a JSON string, or as pairs. Parameters are evaluated in order, so when a value is assigned twice, the latter value will be used. - It is recommended that you supply your parameters file first, and then override selectively using KEY=VALUE syntax. - examples: - - summary: Create a deployment from a remote template file, using parameters from a local JSON file. - command: > - az group deployment create -g MyResourceGroup --template-uri https://myresource/azuredeploy.json --parameters @myparameters.json - - summary: Create a deployment from a local template file, using parameters from a JSON string. - command: | - az group deployment create -g MyResourceGroup --template-file azuredeploy.json --parameters '{ \ - "location": { \ - "value": "westus" \ - } \ - }' - - summary: Create a deployment from a local template, using a local parameter file, a remote parameter file, and selectively overriding key/value pairs. - command: > - az group deployment create -g MyResourceGroup --template-file azuredeploy.json \ - --parameters @params.json --parameters https://mysite/params.json --parameters MyValue=This MyArray=@array.json -- command: - name: group deployment export - summary: Export the template used for a deployment. -- command: - name: group deployment validate - summary: Validate whether a template is syntactically correct. - arguments: - - name: --parameters - summary: Supply deployment parameter values. - description: > - Parameters may be supplied from a file using the `@{path}` syntax, a JSON string, or as pairs. Parameters are evaluated in order, so when a value is assigned twice, the latter value will be used. - It is recommended that you supply your parameters file first, and then override selectively using KEY=VALUE syntax. -- command: - name: group deployment wait - summary: Place the CLI in a waiting state until a deployment condition is met. -- group: - name: group deployment operation - summary: Manage deployment operations. -- group: - name: deployment - summary: Manage Azure Resource Manager deployments at subscription scope. -- command: - name: deployment create - summary: Start a deployment. - arguments: - - name: --parameters - summary: Supply deployment parameter values. - description: > - Parameters may be supplied from a file using the `@{path}` syntax, a JSON string, or as pairs. Parameters are evaluated in order, so when a value is assigned twice, the latter value will be used. - It is recommended that you supply your parameters file first, and then override selectively using KEY=VALUE syntax. - examples: - - summary: Create a deployment from a remote template file, using parameters from a local JSON file. - command: > - az deployment create --location WestUS --template-uri https://myresource/azuredeploy.json --parameters @myparameters.json - - summary: Create a deployment from a local template file, using parameters from a JSON string. - command: | - az deployment create --location WestUS --template-file azuredeploy.json --parameters '{ \ - "policyName": { \ - "value": "policy2" \ - } \ - }' - - summary: Create a deployment from a local template, using a parameter file, a remote parameter file, and selectively overriding key/value pairs. - command: > - az deployment create --location WestUS --template-file azuredeploy.json \ - --parameters @params.json --parameters https://mysite/params.json --parameters MyValue=This MyArray=@array.json -- command: - name: deployment export - summary: Export the template used for a deployment. -- command: - name: deployment validate - summary: Validate whether a template is syntactically correct. - arguments: - - name: --parameters - summary: Supply deployment parameter values. - description: > - Parameters may be supplied from a file using the `@{path}` syntax, a JSON string, or as pairs. Parameters are evaluated in order, so when a value is assigned twice, the latter value will be used. - It is recommended that you supply your parameters file first, and then override selectively using KEY=VALUE syntax. -- command: - name: deployment wait - summary: Place the CLI in a waiting state until a deployment condition is met. -- group: - name: deployment operation - summary: Manage deployment operations. -- group: - name: group lock - summary: Manage Azure resource group locks. -- command: - name: group lock create - summary: Create a resource group lock. - examples: - - summary: Create a read-only resource group level lock. - command: > - az group lock create --lock-type ReadOnly -n lockName -g MyResourceGroup -- command: - name: group lock delete - summary: Delete a resource group lock. - examples: - - summary: Delete a resource group lock - command: > - az group lock delete --name lockName -g MyResourceGroup -- command: - name: group lock list - summary: List lock information in the resource-group. - examples: - - summary: List out all locks on the resource group level - command: > - az group lock list -g MyResourceGroup -- command: - name: group lock show - summary: Show the details of a resource group lock - examples: - - summary: Show a resource group level lock - command: > - az group lock show -n lockname -g MyResourceGroup -- command: - name: group lock update - summary: Update a resource group lock. - examples: - - summary: Update a resource group lock with new notes and type - command: > - az group lock update --name lockName -g MyResourceGroup --notes newNotesHere --lock-type CanNotDelete -- group: - name: provider - summary: Manage resource providers. -- command: - name: provider list - examples: - - summary: Display all resource types for the network resource provider. - command: > - az provider list --query [?namespace=='Microsoft.Network'].resourceTypes[].resourceType -- command: - name: provider register - summary: Register a provider. -- command: - name: provider unregister - summary: Unregister a provider. -- group: - name: provider operation - summary: Get provider operations metadatas. -- command: - name: provider operation show - summary: Get an individual provider's operations. -- command: - name: provider operation list - summary: Get operations from all providers. -- group: - name: tag - summary: Manage resource tags. -- group: - name: resource link - summary: Manage links between resources. - description: > - Linking is a feature of the Resource Manager. It enables declaring relationships between resources even if they do not reside in the same resource group. - Linking has no impact on resource usage, no impact on billing, and no impact on role-based access. It allows for managing multiple resources across groups - as a single unit. -- command: - name: resource link create - summary: Create a new link between resources. - description: A link-id is of the form /subscriptions/{SubID}/resourceGroups/{ResourceGroupID}/providers/{ProviderNamespace}/{ResourceType}/{ResourceName}/providers/Microsoft.Resources/links/{LinkName} - examples: - - summary: Create a link from {SourceID} to {ResourceID} with notes - command: > - az resource link create --link-id {SourceID} --target-id {ResourceID} --notes "SourceID depends on ResourceID" -- command: - name: resource link update - summary: Update link between resources. - description: A link-id is of the form /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/{ProviderNamespace}/{ResourceType}/{ResourceName}/providers/Microsoft.Resources/links/{LinkName} - examples: - - summary: Update the notes for {LinkID} notes "some notes to explain this link" - command: > - az resource link update --link-id {LinkID} --notes "some notes to explain this link" -- command: - name: resource link delete - summary: Delete a link between resources. - description: A link-id is of the form /subscriptions/{SubID}/resourceGroups/{ResourceGroupID}/providers/{ProviderNamespace}/{ResourceType}/{ResourceName}/providers/Microsoft.Resources/links/{LinkName} - examples: - - summary: Delete link {LinkID} - command: > - az resource link delete --link-id {LinkID} -- command: - name: resource link list - summary: List resource links. - examples: - - summary: List links, filtering with - command: > - az resource link list --filter - - summary: List all links for resource group {ResourceGroup} in subscription {SubID} - command: > - az resource link list --scope /subscriptions/{SubID}/resourceGroups/{ResourceGroup} -- command: - name: resource link show - summary: Get details for a resource link. - description: A link-id is of the form /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/{ProviderNamespace}/{ResourceType}/{ResourceName}/providers/Microsoft.Resources/links/{LinkName} -- group: - name: resource lock - summary: Manage Azure resource level locks. -- command: - name: resource lock create - summary: Create a resource-level lock. - examples: - - summary: Create a read-only resource level lock on a vnet. - command: > - az resource lock create --lock-type ReadOnly -n lockName -g MyResourceGroup --resource myvnet --resource-type Microsoft.Network/virtualNetworks - - summary: Create a read-only resource level lock on a vnet using a vnet id. - command: > - az resource lock create --lock-type ReadOnly -n lockName --resource /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Network/virtualNetworks/{VNETName} -- command: - name: resource lock delete - summary: Delete a resource-level lock. - examples: - - summary: Delete a resource level lock - command: > - az resource lock delete --name lockName -g MyResourceGroup --resource myvnet --resource-type Microsoft.Network/virtualNetworks - - summary: Delete a resource level lock on a vnet using a vnet id. - command: > - az resource lock delete -n lockName --resource /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Network/virtualNetworks/{VMName} -- command: - name: resource lock list - summary: List lock information in the resource-level. - examples: - - summary: List out all locks on a vnet - command: > - az resource lock list -g MyResourceGroup --resource myvnet --resource-type Microsoft.Network/virtualNetworks -- command: - name: resource lock show - summary: Show the details of a resource-level lock - examples: - - summary: Show a resource level lock - command: > - az resource lock show -n lockname -g MyResourceGroup --resource myvnet --resource-type Microsoft.Network/virtualNetworks -- command: - name: resource lock update - summary: Update a resource-level lock. - examples: - - summary: Update a resource level lock with new notes and type - command: > - az resource lock update --name lockName -g MyResourceGroup --resource myvnet --resource-type Microsoft.Network/virtualNetworks --notes newNotesHere --lock-type CanNotDelete diff --git a/src/command_modules/azure-cli-role/azure/cli/command_modules/role/help.yaml b/src/command_modules/azure-cli-role/azure/cli/command_modules/role/help.yaml deleted file mode 100644 index 8f088c66e0c..00000000000 --- a/src/command_modules/azure-cli-role/azure/cli/command_modules/role/help.yaml +++ /dev/null @@ -1,313 +0,0 @@ -version: 1 -content: -- command: - name: ad sp create-for-rbac - summary: Create a service principal and configure its access to Azure resources. - arguments: - - name: --name - summary: a URI to use as the logic name. It doesn't need to exist. If not present, CLI will generate one. - - name: --cert - summary: Certificate to use for credentials. - description: When used with `--keyvault,` indicates the name of the cert to use or create. Otherwise, supply a PEM or DER formatted public certificate string. Use `@{path}` to load from a file. Do not include private key info. - - name: --create-cert - summary: Create a self-signed certificate to use for the credential. - description: Use with `--keyvault` to create the certificate in Key Vault. Otherwise, a certificate will be created locally. - - name: --keyvault - summary: Name or ID of a KeyVault to use for creating or retrieving certificates. - - name: --years - summary: 'Number of years for which the credentials will be valid. Default: 1 year' - - name: --scopes - summary: > - Space-separated list of scopes the service principal's role assignment applies to. - Defaults to the root of the current subscription. - - name: --role - summary: Role of the service principal. - examples: - - summary: Create with a default role assignment. - command: > - az ad sp create-for-rbac - - summary: Create using a custom name, and with a default assignment. - command: > - az ad sp create-for-rbac -n "MyApp" - - summary: Create without a default assignment. - command: > - az ad sp create-for-rbac --skip-assignment - - summary: Create with customized contributor assignments. - command: | - az ad sp create-for-rbac -n "MyApp" --role contributor \ - --scopes /subscriptions/{SubID}/resourceGroups/{ResourceGroup1} \ - /subscriptions/{SubID}/resourceGroups/{ResourceGroup2} - - summary: Create using a self-signed certificte. - command: az ad sp create-for-rbac --create-cert - - summary: Create using a self-signed certificate, and store it within KeyVault. - command: az ad sp create-for-rbac --keyvault MyVault --cert CertName --create-cert - - summary: Create using existing certificate in KeyVault. - command: az ad sp create-for-rbac --keyvault MyVault --cert CertName -- group: - name: ad sp credential - summary: manage a service principal's credentials. - description: the credential update will be applied on the Application object the service principal is associated with. In other words, you can accomplish the same thing using "az ad app credential" -- command: - name: ad sp credential list - summary: list a service principal's credentials. -- command: - name: ad sp credential delete - summary: delete a service principal's credential. -- command: - name: ad sp credential reset - summary: Reset a service principal credential. - description: Use upon expiration of the service principal's credentials, or in the event that login credentials are lost. - arguments: - - name: --name - summary: Name or app URI for the credential. - - name: --password - summary: The password used to log in. - description: If not present and `--cert` is not specified, a random password will be generated. - - name: --cert - summary: Certificate to use for credentials. - description: When using `--keyvault,` indicates the name of the cert to use or create. Otherwise, supply a PEM or DER formatted public certificate string. Use `@{path}` to load from a file. Do not include private key info. - - name: --create-cert - summary: Create a self-signed certificate to use for the credential. - description: Use with `--keyvault` to create the certificate in Key Vault. Otherwise, a certificate will be created locally. - - name: --keyvault - summary: Name or ID of a KeyVault to use for creating or retrieving certificates. - - name: --years - summary: 'Number of years for which the credentials will be valid. Default: 1 year' -- command: - name: ad sp delete - summary: Delete a service principal and its role assignments. -- command: - name: ad sp create - summary: Create a service principal. -- command: - name: ad sp list - summary: List service principals. - description: For low latency, by default, only the first 100 will be returned unless you provide filter arguments or use "--all" -- group: - name: ad sp owner - summary: Manage service principal owners. -- command: - name: ad sp owner list - summary: List service principal owners. -- command: - name: ad sp show - summary: Get the details of a service principal. -- group: - name: ad app - summary: Manage applications with AAD Graph. -- command: - name: ad app delete - summary: Delete an application. -- command: - name: ad app list - summary: List applications. - description: for low latency, by default, only the first 100 will be returned unless you provide filter arguments or use "--all" -- command: - name: ad app show - summary: Get the details of an application. -- command: - name: ad app update - summary: Update an application. - examples: - - summary: update a native application with delegated permission of "access the AAD directory as the signed-in user" - command: | - az ad app update --id e042ec79-34cd-498f-9d9f-123456781234 --required-resource-accesses @manifest.json - ("manifest.json" contains the following content) - [{ - "resourceAppId": "00000002-0000-0000-c000-000000000000", - "resourceAccess": [ - { - "id": "a42657d6-7f20-40e3-b6f0-cee03008a62a", - "type": "Scope" - } - ] - }] - - summary: update an application's group membership claims to "All" - command: > - az ad app update --id e042ec79-34cd-498f-9d9f-123456781234 --set groupMembershipClaims=All -- group: - name: ad app owner - summary: Manage application owners. -- command: - name: ad app owner list - summary: List application owners. -- command: - name: ad app owner add - summary: add an application owner. -- command: - name: ad app owner remove - summary: remove an application owner. -- group: - name: ad app permission - summary: manage an application's OAuth2 permissions. -- command: - name: ad app permission grant - summary: Grant the app an API permission - examples: - - summary: Grant a native application with permissions to access an existing API with TTL of 2 years - command: az ad app permission grant --id e042ec79-34cd-498f-9d9f-1234234 --api a0322f79-57df-498f-9d9f-12678 --expires 2 -- command: - name: ad app permission list - summary: List API permissions the application has requested - examples: - - summary: List the OAuth2 permissions for an existing AAD app - command: az ad app permission list --id e042ec79-34cd-498f-9d9f-1234234 -- command: - name: ad app permission add - summary: add an API permission - description: invoking "az ad app permission grant" is needed to activate it - examples: - - summary: add a Graph API permission of "Sign in and read user profile" - command: az ad app permission add --id eeba0b46-78e5-4a1a-a1aa-cafe6c123456 --api 00000002-0000-0000-c000-000000000000 --api-permissions 311a71cc-e848-46a1-bdf8-97ff7156d8e6=Scope -- command: - name: ad app permission delete - summary: remove an API permission - examples: - - summary: remove an AAD graph permission - command: az ad app permission delete --id eeba0b46-78e5-4a1a-a1aa-cafe6c123456 --api 00000002-0000-0000-c000-000000000000 -- group: - name: ad app credential - summary: manage an application's password or certificate credentials -- command: - name: ad app credential reset - summary: append or overwrite an application's password or certificate credentials -- command: - name: ad app credential list - summary: list an application's password or certificate credentials -- command: - name: ad app credential delete - summary: delete an application's password or certificate credentials -- command: - name: ad user list - summary: List Azure Active Directory users. -- command: - name: ad user get-member-groups - summary: Get groups of which the user is a member -- group: - name: role - summary: Manage user roles for access control with Azure Active Directory and service principals. -- group: - name: role assignment - summary: Manage role assignments. -- command: - name: role assignment create - summary: Create a new role assignment for a user, group, or service principal. - examples: - - summary: Create role assignment for an assignee. - command: az role assignment create --assignee sp_name --role a_role -- command: - name: role assignment delete - summary: Delete role assignments. -- command: - name: role assignment list - summary: List role assignments. - description: By default, only assignments scoped to subscription will be displayed. To view assignments scoped by resource or group, use `--all`. -- command: - name: role assignment list-changelogs - summary: List changelogs for role assignments. -- group: - name: role definition - summary: Manage role definitions. -- command: - name: role definition create - summary: Create a custom role definition. - arguments: - - name: --role-definition - summary: Description of a role as JSON, or a path to a file containing a JSON description. - examples: - - summary: Create a role with read-only access to storage and network resources, and the ability to start or restart VMs. - command: | - az role definition create --role-definition '{ \ - "Name": "Contoso On-call", \ - "Description": "Perform VM actions and read storage and network information." \ - "Actions": [ \ - "Microsoft.Compute/*/read", \ - "Microsoft.Compute/virtualMachines/start/action", \ - "Microsoft.Compute/virtualMachines/restart/action", \ - "Microsoft.Network/*/read", \ - "Microsoft.Storage/*/read", \ - "Microsoft.Authorization/*/read", \ - "Microsoft.Resources/subscriptions/resourceGroups/read", \ - "Microsoft.Resources/subscriptions/resourceGroups/resources/read", \ - "Microsoft.Insights/alertRules/*", \ - "Microsoft.Support/*" \ - ], \ - "DataActions": [ \ - "Microsoft.Storage/storageAccounts/blobServices/containers/blobs/*" \ - ], \ - "NotDataActions": [ \ - "Microsoft.Storage/storageAccounts/blobServices/containers/blobs/write" \ - ], \ - "AssignableScopes": ["/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"] \ - }' - - summary: Create a role from a file containing a JSON description. - command: > - az role definition create --role-definition @ad-role.json -- command: - name: role definition delete - summary: Delete a role definition. -- command: - name: role definition list - summary: List role definitions. -- command: - name: role definition update - summary: Update a role definition. - arguments: - - name: --role-definition - summary: Description of a role as JSON, or a path to a file containing a JSON description. -- group: - name: ad - summary: Manage Azure Active Directory Graph entities needed for Role Based Access Control -- command: - name: ad app create - summary: Create a web application, web API or native application - examples: - - summary: Create a native application with delegated permission of "access the AAD directory as the signed-in user" - command: | - az ad app create --display-name my-native --native-app --required-resource-accesses @manifest.json - ("manifest.json" contains the following content) - [{ - "resourceAppId": "00000002-0000-0000-c000-000000000000", - "resourceAccess": [ - { - "id": "a42657d6-7f20-40e3-b6f0-cee03008a62a", - "type": "Scope" - } - ] - }] -- group: - name: ad group - summary: Manage Azure Active Directory groups. -- command: - name: ad group create - summary: Create a group in the directory. -- group: - name: ad group member - summary: Manage Azure Active Directory group members. -- command: - name: ad group member check - summary: Check if a member is in a group. -- group: - name: ad group owner - summary: Manage Azure Active Directory group owners. -- command: - name: ad group owner list - summary: List group owners. -- command: - name: ad group owner add - summary: add a group owner. -- command: - name: ad group owner remove - summary: remove a group owner. -- group: - name: ad sp - summary: Manage Azure Active Directory service principals for automation authentication. -- group: - name: ad user - summary: Manage Azure Active Directory users and user authentication. -- group: - name: ad signed-in-user - summary: Show graph information about current signed-in user in CLI -- command: - name: ad signed-in-user list-owned-objects - summary: Get the list of directory objects that are owned by the user diff --git a/src/command_modules/azure-cli-search/azure/cli/command_modules/search/help.yaml b/src/command_modules/azure-cli-search/azure/cli/command_modules/search/help.yaml deleted file mode 100644 index 2ba1240921b..00000000000 --- a/src/command_modules/azure-cli-search/azure/cli/command_modules/search/help.yaml +++ /dev/null @@ -1,17 +0,0 @@ -version: 1 -content: -- group: - name: search - summary: Manage Azure Search services, admin keys and query keys. -- group: - name: search service - summary: Manage Azure Search services. -- command: - name: search service update - summary: Update partition and replica of the given search service. -- group: - name: search admin-key - summary: Manage Azure Search admin keys. -- group: - name: search query-key - summary: Manage Azure Search query keys. diff --git a/src/command_modules/azure-cli-security/azure/cli/command_modules/security/help.yaml b/src/command_modules/azure-cli-security/azure/cli/command_modules/security/help.yaml deleted file mode 100644 index d8886f72019..00000000000 --- a/src/command_modules/azure-cli-security/azure/cli/command_modules/security/help.yaml +++ /dev/null @@ -1,282 +0,0 @@ -version: 1 -content: -- group: - name: security - summary: Manage your security posture with Azure Security Center. -- group: - name: security task - summary: View security tasks (recommendations). -- command: - name: security task list - summary: List security tasks (recommendations). - examples: - - summary: Get security tasks (recommendations) on a subscription scope. - command: > - az security task list - - summary: Get security tasks (recommendations) on a resource group scope. - command: > - az security task list -g "myRg" -- command: - name: security task show - summary: shows a security task (recommendation). - examples: - - summary: Get a security task (recommendation) on a subscription scope. - command: > - az security task show -n "taskName" - - summary: Get a security task (recommendation) on a resource group scope. - command: > - az security task show -g "myRg" -n "taskName" -- group: - name: security alert - summary: View security alerts. -- command: - name: security alert list - summary: List security alerts. - examples: - - summary: Get security alerts on a subscription scope. - command: > - az security alert list - - summary: Get security alerts on a resource group scope. - command: > - az security alert list -g "myRg" -- command: - name: security alert show - summary: Shows a security alert. - examples: - - summary: Get a security alert on a subscription scope. - command: > - az security alert show --location "centralus" -n "alertName" - - summary: Get a security alert on a resource group scope. - command: > - az security alert show -g "myRg" --location "centralus" -n "alertName" -- command: - name: security alert update - summary: Updates a security alert status. - examples: - - summary: Dismiss a security alert on a subscription scope. - command: > - az security alert update --location "centralus" -n "alertName" --status "dismiss" - - summary: Dismiss a security alert on a resource group scope. - command: > - az security alert update -g "myRg" --location "centralus" -n "alertName" --status "dismiss" - - summary: Activate a security alert on a subscritpion scope. - command: > - az security alert update --location "centralus" -n "alertName" --status "activate" - - summary: Activate a security alert on a resource group scope. - command: > - az security alert update -g "myRg" --location "centralus" -n "alertName" --status "activate" -- group: - name: security setting - summary: View your security settings. -- command: - name: security setting list - summary: List security settings. - examples: - - summary: Get security settings. - command: > - az security setting list -- command: - name: security setting show - summary: Shows a security setting. - examples: - - summary: Get a security setting. - command: > - az security setting show -n "MCAS" -- group: - name: security contact - summary: View your security contacts. -- command: - name: security contact list - summary: List security contact. - examples: - - summary: Get security contacts. - command: > - az security contact list -- command: - name: security contact show - summary: Shows a security contact. - examples: - - summary: Get a security contact. - command: > - az security contact show -n "default1" -- command: - name: security contact create - summary: Creates a security contact. - examples: - - summary: Creates a security contact. - command: > - az security contact create -n "default1" --email 'john@contoso.com' --phone '(214)275-4038' --alert-notifications 'on' --alerts-admins 'on' -- command: - name: security contact delete - summary: Deletes a security contact. - examples: - - summary: Deletes a security contact. - command: > - az security contact delete -n "default1" -- group: - name: security auto-provisioning-setting - summary: View your auto provisioning settings. -- command: - name: security auto-provisioning-setting list - summary: List the auto provisioning settings. - examples: - - summary: Get auto provisioning settings. - command: > - az security auto-provisioning-setting list -- command: - name: security auto-provisioning-setting show - summary: Shows an auto provisioning setting. - examples: - - summary: Get an auto provisioning setting. - command: > - az security auto-provisioning-setting show -n "default" -- command: - name: security auto-provisioning-setting update - summary: Updates your automatic provisioning settings on the subscription. - examples: - - summary: Turns on automatic provisioning on the subscription. - command: > - az security auto-provisioning-setting update -n "default" --auto-provision "on" - - summary: Turns off automatic provisioning on the subscription. - command: > - az security auto-provisioning-setting update -n "default" --auto-provision "off" -- group: - name: security discovered-security-solution - summary: View your discovered security solutions -- command: - name: security discovered-security-solution list - summary: List the discovered security solutions. - examples: - - summary: Get discovered security solutions. - command: > - az security discovered-security-solution list -- command: - name: security discovered-security-solution show - summary: Shows a discovered security solution. - examples: - - summary: Get a discovered security solution. - command: > - az security discovered-security-solution show -n ContosoWAF2 -g myService1 -- group: - name: security external-security-solution - summary: View your external security solutions -- command: - name: security external-security-solution list - summary: List the external security solutions. - examples: - - summary: Get external security solutions. - command: > - az security external-security-solution list -- command: - name: security external-security-solution show - summary: Shows an external security solution. - examples: - - summary: Get an external security solution. - command: > - az security external-security-solution show -n aad_defaultworkspace-20ff7fc3-e762-44dd-bd96-b71116dcdc23-eus -g defaultresourcegroup-eus -- group: - name: security jit-policy - summary: Manage your Just in Time network access policies -- command: - name: security jit-policy list - summary: List your Just in Time network access policies. - examples: - - summary: Get all the Just in Time network access policies. - command: > - az security jit-policy list -- command: - name: security jit-policy show - summary: Shows a Just in Time network access policy. - examples: - - summary: Get a Just in Time network access policy. - command: > - az security jit-policy show -l northeurope -n default -g myService1 -- group: - name: security location - summary: Shows the Azure Security Center Home region location. -- command: - name: security location list - summary: Shows the Azure Security Center Home region location. - examples: - - summary: Shows the Azure Security Center Home region location. - command: > - az security location list -- command: - name: security location show - summary: Shows the Azure Security Center Home region location. - examples: - - summary: Shows the Azure Security Center Home region location. - command: > - az security location show -n centralus -- group: - name: security pricing - summary: Shows the Azure Security Center Pricing tier for the subscription. -- command: - name: security pricing list - summary: Shows the Azure Security Center Pricing tier for the subscription. - examples: - - summary: Shows the Azure Security Center Pricing tier for the subscription. - command: > - az security pricing list -- command: - name: security pricing show - summary: Shows the Azure Security Center Pricing tier for the subscription. - examples: - - summary: Shows the Azure Security Center Pricing tier for the subscription. - command: > - az security pricing show -n default -- command: - name: security pricing create - summary: Updates the Azure Security Center Pricing tier for the subscription. - examples: - - summary: Updates the Azure Security Center Pricing tier for the subscription. - command: > - az security pricing create -n default --tier 'standard' -- group: - name: security topology - summary: Shows the network topology in your subscription. -- command: - name: security topology list - summary: Shows the network topology in your subscription. - examples: - - summary: Shows the network topology in your subscription. - command: > - az security topology list -- command: - name: security topology show - summary: Shows the network topology in your subscription. - examples: - - summary: Shows the network topology in your subscription. - command: > - az security topology show -n default -g myService1 -- group: - name: security workspace-setting - summary: Shows the workspace settings in your subscription - these settings let you control which workspace will hold your security data -- command: - name: security workspace-setting list - summary: Shows the workspace settings in your subscription - these settings let you control which workspace will hold your security data - examples: - - summary: Shows the workspace settings in your subscription - these settings let you control which workspace will hold your security data - command: > - az security workspace-setting list -- command: - name: security workspace-setting show - summary: Shows the workspace settings in your subscription - these settings let you control which workspace will hold your security data - examples: - - summary: Shows the workspace settings in your subscription - these settings let you control which workspace will hold your security data - command: > - az security workspace-setting show -n default -- command: - name: security workspace-setting create - summary: Creates a workspace settings in your subscription - these settings let you control which workspace will hold your security data - examples: - - summary: Creates a workspace settings in your subscription - these settings let you control which workspace will hold your security data - command: > - az security workspace-setting create -n default --target-workspace '/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.OperationalInsights/workspaces/myWorkspace' -- command: - name: security workspace-setting delete - summary: Deletes the workspace settings in your subscription - this will make the security events on the subscription be reported to the default workspace - examples: - - summary: Deletes the workspace settings in your subscription - this will make the security events on the subscription be reported to the default workspace - command: > - az security workspace-setting delete -n default diff --git a/src/command_modules/azure-cli-servicebus/azure/cli/command_modules/servicebus/help.yaml b/src/command_modules/azure-cli-servicebus/azure/cli/command_modules/servicebus/help.yaml deleted file mode 100644 index 32b9fc8c917..00000000000 --- a/src/command_modules/azure-cli-servicebus/azure/cli/command_modules/servicebus/help.yaml +++ /dev/null @@ -1,411 +0,0 @@ -version: 1 -content: -- group: - name: servicebus - summary: Manage Azure Service Bus namespaces, queues, topics, subscriptions, rules and geo-disaster recovery configuration alias -- group: - name: servicebus namespace - summary: Manage Azure Service Bus Namespace -- group: - name: servicebus namespace authorization-rule - summary: Manage Azure Service Bus Namespace Authorization Rule -- group: - name: servicebus namespace authorization-rule keys - summary: Manage Azure Authorization Rule connection strings for Namespace -- group: - name: servicebus queue - summary: Manage Azure Service Bus Queue and Authorization Rule -- group: - name: servicebus queue authorization-rule - summary: Manage Azure Service Bus Queue Authorization Rule -- group: - name: servicebus queue authorization-rule keys - summary: Manage Azure Authorization Rule keys for Service Bus Queue -- group: - name: servicebus topic - summary: Manage Azure Service Bus Topic and Authorization Rule -- group: - name: servicebus topic authorization-rule - summary: Manage Azure Service Bus Topic Authorization Rule -- group: - name: servicebus topic authorization-rule keys - summary: Manage Azure Authorization Rule keys for Service Bus Topic -- group: - name: servicebus topic subscription - summary: Manage Azure Service Bus Subscription -- group: - name: servicebus topic subscription rule - summary: Manage Azure Service Bus Rule -- group: - name: servicebus georecovery-alias - summary: Manage Azure Service Bus Geo-Disaster Recovery Configuration Alias -- group: - name: servicebus georecovery-alias authorization-rule - summary: Manage Azure Service Bus Authorization Rule for Namespace with Geo-Disaster Recovery Configuration Alias -- group: - name: servicebus georecovery-alias authorization-rule keys - summary: Manage Azure Authorization Rule keys for Service Bus Namespace -- group: - name: servicebus migration - summary: Manage Azure Service Bus Migration of Standard to Premium -- command: - name: servicebus namespace exists - summary: check for the availability of the given name for the Namespace - examples: - - summary: check for the availability of mynamespace for the Namespace - command: az servicebus namespace exists --name mynamespace -- command: - name: servicebus namespace create - summary: Create a Service Bus Namespace - examples: - - summary: Create a Service Bus Namespace. - command: az servicebus namespace create --resource-group myresourcegroup --name mynamespace --location westus --tags tag1=value1 tag2=value2 --sku Standard -- command: - name: servicebus namespace update - summary: Updates a Service Bus Namespace - examples: - - summary: Updates a Service Bus Namespace. - command: az servicebus namespace update --resource-group myresourcegroup --name mynamespace --tags tag=value -- command: - name: servicebus namespace show - summary: Shows the Service Bus Namespace details - examples: - - summary: shows the Namespace details. - command: az servicebus namespace show --resource-group myresourcegroup --name mynamespace -- command: - name: servicebus namespace list - summary: List the Service Bus Namespaces - examples: - - summary: Get the Service Bus Namespaces by resource group - command: az servicebus namespace list --resource-group myresourcegroup - - summary: Get the Service Bus Namespaces by Subscription. - command: az servicebus namespace list -- command: - name: servicebus namespace delete - summary: Deletes the Service Bus Namespace - examples: - - summary: Deletes the Service Bus Namespace - command: az servicebus namespace delete --resource-group myresourcegroup --name mynamespace -- command: - name: servicebus namespace authorization-rule create - summary: Create Authorization Rule for the given Service Bus Namespace - examples: - - summary: Create Authorization Rule 'myauthorule' for the given Service Bus Namespace 'mynamepsace' in resourcegroup - command: az servicebus namespace authorization-rule create --resource-group myresourcegroup --namespace-name mynamespace --name myauthorule --rights Send Listen -- command: - name: servicebus namespace authorization-rule update - summary: Updates Authorization Rule for the given Service Bus Namespace - examples: - - summary: Updates Authorization Rule 'myauthorule' for the given Service Bus Namespace 'mynamepsace' in resourcegroup - command: az servicebus namespace authorization-rule update --resource-group myresourcegroup --namespace-name mynamespace --name myauthorule --rights Send -- command: - name: servicebus namespace authorization-rule show - summary: Shows the details of Service Bus Namespace Authorization Rule - examples: - - summary: Shows the details of Service Bus Namespace Authorization Rule - command: az servicebus namespace authorization-rule show --resource-group myresourcegroup --namespace-name mynamespace --name myauthorule -- command: - name: servicebus namespace authorization-rule list - summary: Shows the list of Authorization Rule by Service Bus Namespace - examples: - - summary: Shows the list of Authorization Rule by Service Bus Namespace - command: az servicebus namespace authorization-rule list --resource-group myresourcegroup --namespace-name mynamespace -- command: - name: servicebus namespace authorization-rule keys list - summary: List the keys and connection strings of Authorization Rule for Service Bus Namespace - examples: - - summary: List the keys and connection strings of Authorization Rule for Service Bus Namespace - command: az servicebus namespace authorization-rule keys list --resource-group myresourcegroup --namespace-name mynamespace --name myauthorule -- command: - name: servicebus namespace authorization-rule keys renew - summary: Regenerate keys of Authorization Rule for the Service Bus Namespace. - examples: - - summary: Regenerate keys of Authorization Rule for the Service Bus Namespace. - command: az servicebus namespace authorization-rule keys renew --resource-group myresourcegroup --namespace-name mynamespace --name myauthorule --key PrimaryKey -- command: - name: servicebus namespace authorization-rule delete - summary: Deletes the Authorization Rule of the Service Bus Namespace. - examples: - - summary: Deletes the Authorization Rule of the Service Bus Namespace. - command: az servicebus namespace authorization-rule delete --resource-group myresourcegroup --namespace-name mynamespace --name myauthorule -- command: - name: servicebus queue create - summary: Create the Service Bus Queue - examples: - - summary: Create Service Bus Queue. - command: az servicebus queue create --resource-group myresourcegroup --namespace-name mynamespace --name myqueue -- command: - name: servicebus queue update - summary: Updates existing Service Bus Queue - examples: - - summary: Updates Service Bus Queue. - command: az servicebus queue update --resource-group myresourcegroup --namespace-name mynamespace --name myqueue --auto-delete-on-idle PT3M -- command: - name: servicebus queue show - summary: shows the Service Bus Queue Details - examples: - - summary: Shows the Service Bus Queue Details - command: az servicebus queue show --resource-group myresourcegroup --namespace-name mynamespace --name myqueue -- command: - name: servicebus queue list - summary: List the Queue by Service Bus Namepsace - examples: - - summary: Get the Queues by Service Bus Namespace. - command: az servicebus queue list --resource-group myresourcegroup --namespace-name mynamespace -- command: - name: servicebus queue delete - summary: Deletes the Service Bus Queue - examples: - - summary: Deletes the queue - command: az servicebus queue delete --resource-group myresourcegroup --namespace-name mynamespace --name myqueue -- command: - name: servicebus queue authorization-rule create - summary: Create Authorization Rule for the given Service Bus Queue. - examples: - - summary: Create Authorization Rule for Queue - command: az servicebus queue authorization-rule create --resource-group myresourcegroup --namespace-name mynamespace --queue-name myqueue --name myauthorule --rights Listen -- command: - name: servicebus queue authorization-rule update - summary: Update Authorization Rule for the given Service Bus Queue. - examples: - - summary: Update Authorization Rule for Queue - command: az servicebus queue authorization-rule update --resource-group myresourcegroup --namespace-name mynamespace --queue-name myqueue --name myauthorule --rights Send -- command: - name: servicebus queue authorization-rule show - summary: show properties of Authorization Rule for the given Service Bus Queue. - examples: - - summary: show properties of Authorization Rule - command: az servicebus queue authorization-rule show --resource-group myresourcegroup --namespace-name mynamespace --queue-name myqueue --name myauthorule -- command: - name: servicebus queue authorization-rule list - summary: List of Authorization Rule by Service Bus Queue. - examples: - - summary: List of Authorization Rule by Queue - command: az servicebus queue authorization-rule list --resource-group myresourcegroup --namespace-name mynamespace --queue-name myqueue -- command: - name: servicebus queue authorization-rule keys list - summary: List the keys and connection strings of Authorization Rule for the given Service Bus Queue - examples: - - summary: List the keys and connection strings of Authorization Rule for the given Service Bus Queue - command: az servicebus queue authorization-rule keys list --resource-group myresourcegroup --namespace-name mynamespace --queue-name myqueue --name myauthorule -- command: - name: servicebus queue authorization-rule keys renew - summary: Regenerate keys of Authorization Rule for Service Bus Queue - examples: - - summary: Regenerate keys of Authorization Rule for Service Bus Queue - command: az servicebus queue authorization-rule keys renew --resource-group myresourcegroup --namespace-name mynamespace --queue-name myqueue --name myauthorule --key PrimaryKey -- command: - name: servicebus queue authorization-rule delete - summary: Delete the Authorization Rule of Service Bus Queue - examples: - - summary: Delete the Authorization Rule of Service Bus Queue - command: az servicebus queue authorization-rule delete --resource-group myresourcegroup --namespace-name mynamespace --queue-name myqueue --name myauthorule -- command: - name: servicebus topic create - summary: Create the Service Bus Topic - examples: - - summary: Create a new Service Bus Topic - command: az servicebus topic create --resource-group myresourcegroup --namespace-name mynamespace --name mytopic -- command: - name: servicebus topic update - summary: Updates the Service Bus Topic - examples: - - summary: Updates existing Service Bus Topic. - command: az servicebus topic update --resource-group myresourcegroup --namespace-name mynamespace --name mytopic --enable-ordering True -- command: - name: servicebus topic show - summary: Shows the Service Bus Topic Details - examples: - - summary: Shows the Topic details. - command: az servicebus topic show --resource-group myresourcegroup --namespace-name mynamespace --name mytopic -- command: - name: servicebus topic list - summary: List the Topic by Service Bus Namepsace - examples: - - summary: Get the Topics by Namespace. - command: az servicebus topic list --resource-group myresourcegroup --namespace-name mynamespace -- command: - name: servicebus topic delete - summary: Deletes the Service Bus Topic - examples: - - summary: Deletes the Service Bus Topic - command: az servicebus topic delete --resource-group myresourcegroup --namespace-name mynamespace --name mytopic -- command: - name: servicebus topic authorization-rule create - summary: Create Authorization Rule for given Service Bus Topic - examples: - - summary: Create Authorization Rule for given Service Bus Topic - command: az servicebus topic authorization-rule create --resource-group myresourcegroup --namespace-name mynamespace --topic-name mytopic --name myauthorule --rights Send Listen -- command: - name: servicebus topic authorization-rule update - summary: Create Authorization Rule for given Service Bus Topic - examples: - - summary: Create Authorization Rule for given Service Bus Topic - command: az servicebus topic authorization-rule update --resource-group myresourcegroup --namespace-name mynamespace --topic-name mytopic --name myauthorule --rights Send -- command: - name: servicebus topic authorization-rule show - summary: Shows the details of Authorization Rule for given Service Bus Topic - examples: - - summary: Shows the details of Authorization Rule for given Service Bus Topic - command: az servicebus topic authorization-rule show --resource-group myresourcegroup --namespace-name mynamespace --topic-name mytopic --name myauthorule -- command: - name: servicebus topic authorization-rule list - summary: shows list of Authorization Rule by Service Bus Topic - examples: - - summary: shows list of Authorization Rule by Service Bus Topic - command: az servicebus topic authorization-rule list --resource-group myresourcegroup --namespace-name mynamespace --topic-name mytopic -- command: - name: servicebus topic authorization-rule keys list - summary: List the keys and connection strings of Authorization Rule for Service Bus Topic. - examples: - - summary: List the keys and connection strings of Authorization Rule for Service Bus Topic. - command: az servicebus topic authorization-rule keys list --resource-group myresourcegroup --namespace-name mynamespace --topic-name mytopic --name myauthorule -- command: - name: servicebus topic authorization-rule keys renew - summary: Regenerate keys of Authorization Rule for Service Bus Topic. - examples: - - summary: Regenerate key of Service Bus Topic. - command: az servicebus topic authorization-rule keys renew --resource-group myresourcegroup --namespace-name mynamespace --topic-name mytopic --name myauthorule --key PrimaryKey -- command: - name: servicebus topic authorization-rule delete - summary: Deletes the Authorization Rule of the given Service Bus Topic. - examples: - - summary: Deletes the Authorization Rule of Service Bus Topic. - command: az servicebus topic authorization-rule delete --resource-group myresourcegroup --namespace-name mynamespace --topic-name mytopic --name myauthorule -- command: - name: servicebus topic subscription create - summary: Create the ServiceBus Subscription - examples: - - summary: Create a new Subscription. - command: az servicebus topic subscription create --resource-group myresourcegroup --namespace-name mynamespace --topic-name mytopic --name mysubscription -- command: - name: servicebus topic subscription update - summary: Updates the ServiceBus Subscription - examples: - - summary: Update a new Subscription. - command: az servicebus topic subscription update --resource-group myresourcegroup --namespace-name mynamespace --topic-name mytopic --name mysubscription --lock-duration PT3M -- command: - name: servicebus topic subscription show - summary: Shows Service Bus Subscription Details - examples: - - summary: Shows the Subscription details. - command: az servicebus topic subscription show --resource-group myresourcegroup --namespace-name mynamespace --topic-name mytopic --name mysubscription -- command: - name: servicebus topic subscription list - summary: List the Subscription by Service Bus Topic - examples: - - summary: Shows the Subscription by Service Bus Topic. - command: az servicebus topic subscription list --resource-group myresourcegroup --namespace-name mynamespace --topic-name mytopic -- command: - name: servicebus topic subscription delete - summary: Deletes the Service Bus Subscription - examples: - - summary: Deletes the Subscription - command: az servicebus topic subscription delete --resource-group myresourcegroup --namespace-name mynamespace --topic-name mytopic --name mysubscription -- command: - name: servicebus topic subscription rule create - summary: Create the ServiceBus Rule for Subscription - examples: - - summary: Create Rule. - command: az servicebus topic subscription rule create --resource-group myresourcegroup --namespace-name mynamespace --topic-name mytopic --subscription-name mysubscription --name myrule --filter-sql-expression myproperty=myvalue -- command: - name: servicebus topic subscription rule update - summary: Updates the ServiceBus Rule for Subscription - examples: - - summary: Updates Rule. - command: az servicebus topic subscription rule update --resource-group myresourcegroup --namespace-name mynamespace --topic-name mytopic --subscription-name mysubscription --name myrule --filter-sql-expression myproperty=myupdatedvalue -- command: - name: servicebus topic subscription rule show - summary: Shows ServiceBus Rule Details - examples: - - summary: Shows the ServiceBus Rule details. - command: az servicebus topic subscription rule show --resource-group myresourcegroup --namespace-name mynamespace --topic-name mytopic --subscription-name mysubscription --name myrule -- command: - name: servicebus topic subscription rule list - summary: List the ServiceBus Rule by Subscription - examples: - - summary: Shows the Rule ServiceBus by Subscription. - command: az servicebus topic subscription rule list --resource-group myresourcegroup --namespace-name mynamespace --topic-name mytopic --subscription-name mysubscription -- command: - name: servicebus topic subscription rule delete - summary: Deletes the ServiceBus Rule - examples: - - summary: Deletes the ServiceBus Rule - command: az servicebus topic subscription rule delete --resource-group myresourcegroup --namespace-name mynamespace --topic-name mytopic --subscription-name mysubscription --name myrule -- command: - name: servicebus georecovery-alias exists - summary: Check if Geo Recovery Alias Name is available - examples: - - summary: Check availability of the Geo-Disaster Recovery Configuration Alias Name - command: az servicebus georecovery-alias exists --resource-group myresourcegroup --namespace-name primarynamespace --alias myaliasname -- command: - name: servicebus georecovery-alias set - summary: Sets Service Bus Geo-Disaster Recovery Configuration Alias for the give Namespace - examples: - - summary: Sets Geo Disaster Recovery configuration - Alias for the give Namespace - command: az servicebus georecovery-alias set --resource-group myresourcegroup --namespace-name primarynamespace --alias myaliasname --partner-namespace armresourceid -- command: - name: servicebus georecovery-alias show - summary: shows properties of Service Bus Geo-Disaster Recovery Configuration Alias for Primay/Secondary Namespace - examples: - - summary: show properties Geo-Disaster Recovery Configuration Alias of the Primary Namespace - command: az servicebus georecovery-alias show --resource-group myresourcegroup --namespace-name primarynamespace --alias myaliasname - - summary: Get details of Alias (Geo DR Configuration) of the Secondary Namespace - command: az servicebus georecovery-alias show --resource-group myresourcegroup --namespace-name secondarynamespace --alias myaliasname -- command: - name: servicebus georecovery-alias authorization-rule list - summary: Shows the list of Authorization Rule by Service Bus Namespace - examples: - - summary: Shows the list of Authorization Rule by Service Bus Namespace - command: az servicebus georecovery-alias authorization-rule list --resource-group myresourcegroup --namespace-name mynamespace --alias myaliasname -- command: - name: servicebus georecovery-alias authorization-rule keys list - summary: List the keys and connection strings of Authorization Rule for the Service Bus Namespace - examples: - - summary: List the keys and connection strings of Authorization Rule for the namespace. - command: az servicebus georecovery-alias authorization-rule keys list --resource-group myresourcegroup --namespace-name mynamespace --name myauthorule --alias myaliasname -- command: - name: servicebus georecovery-alias break-pair - summary: Disables Service Bus Geo-Disaster Recovery Configuration Alias and stops replicating changes from primary to secondary namespaces - examples: - - summary: Disables the Disaster Recovery and stops replicating changes from primary to secondary namespaces - command: az servicebus georecovery-alias break-pair --resource-group myresourcegroup --namespace-name primarynamespace --alias myaliasname -- command: - name: servicebus georecovery-alias fail-over - summary: Invokes Service Bus Geo-Disaster Recovery Configuration Alias failover and re-configure the alias to point to the secondary namespace - examples: - - summary: Invokes Geo-Disaster Recovery Configuration Alias failover and reconfigure the alias to point to the secondary namespace - command: az servicebus georecovery-alias fail-over --resource-group myresourcegroup --namespace-name secondarynamespace --alias myaliasname -- command: - name: servicebus georecovery-alias delete - summary: Deletes Service Bus Geo-Disaster Recovery Configuration Alias request accepted - examples: - - summary: Delete Service Bus Geo-Disaster Recovery Configuration Alias request accepted - command: az servicebus georecovery-alias delete --resource-group myresourcegroup --namespace-name secondarynamespace --alias myaliasname -- command: - name: servicebus migration start - summary: Create and Start Service Bus Migration of Standard to Premium namespace. - description: Service Bus Migration requires an empty Premium namespace to replicate entities from Standard namespace. - examples: - - summary: Create and Start Service Bus Migration of Standard to Premium namespace - command: az servicebus migration start --resource-group myresourcegroup --name standardnamespace --target-namespace ARMIDpremiumnamespace --post-migration-name mypostmigrationname -- command: - name: servicebus migration show - summary: shows properties of properties of Service Bus Migration - examples: - - summary: shows properties of properties of Service Bus Migration - command: az servicebus migration show --resource-group myresourcegroup --name standardnamespace -- command: - name: servicebus migration complete - summary: Completes the Service Bus Migration of Standard to Premium namespace - description: After completing migration, the existing connection strings to standard namespace will connect to premium namespace automatically. Post migration name is the name that can be used to connect to standard namespace after migration is complete. - examples: - - summary: Completes the Service Bus Migration of Standard to Premium namespace - command: az servicebus migration complete --resource-group myresourcegroup --name standardnamespace -- command: - name: servicebus migration abort - summary: Disable the Service Bus Migration of Standard to Premium namespace - description: abort command stops the replication of entities from standard to premium namespaces. The entities replicated to premium namespace before abort command will be available under premium namespace. The aborted migration can not be resumed, its has to restarted. - examples: - - summary: Disable Service Bus Migration of Standard to Premium namespace - command: az servicebus migration abort --resource-group myresourcegroup --name standardnamespace diff --git a/src/command_modules/azure-cli-servicefabric/azure/cli/command_modules/servicefabric/help.yaml b/src/command_modules/azure-cli-servicefabric/azure/cli/command_modules/servicefabric/help.yaml deleted file mode 100644 index 0068d93731b..00000000000 --- a/src/command_modules/azure-cli-servicefabric/azure/cli/command_modules/servicefabric/help.yaml +++ /dev/null @@ -1,147 +0,0 @@ -version: 1 -content: -- group: - name: sf - summary: Manage and administer Azure Service Fabric clusters. -- group: - name: sf application - summary: Manage applications running on an Azure Service Fabric cluster. -- group: - name: sf cluster - summary: Manage an Azure Service Fabric cluster. -- group: - name: sf cluster certificate - summary: Manage a cluster certificate. -- group: - name: sf cluster client-certificate - summary: Manage the client certificate of a cluster. -- group: - name: sf cluster durability - summary: Manage the durability of a cluster. -- group: - name: sf cluster node - summary: Manage the node instance of a cluster. -- group: - name: sf cluster node-type - summary: Manage the node-type of a cluster. -- group: - name: sf cluster reliability - summary: Manage the reliability of a cluster. -- group: - name: sf cluster setting - summary: Manage a cluster's settings. -- group: - name: sf cluster upgrade-type - summary: Manage the upgrade type of a cluster. -- group: - name: sf application certificate - summary: Manage the certificate of an application. -- command: - name: sf cluster list - summary: List cluster resources. -- command: - name: sf cluster create - summary: Create a new Azure Service Fabric cluster. - examples: - - summary: Create a cluster with a given size and self-signed certificate that is downloaded locally. - command: > - az sf cluster create -g group-name -n cluster1 -l westus --cluster-size 4 --vm-password Password#1234 --certificate-output-folder MyCertificates --certificate-subject-name cluster1 - - summary: Use a keyvault certificate and custom template to deploy a cluster. - command: > - az sf cluster create -g group-name -n cluster1 -l westus --template-file template.json \ - --parameter-file parameter.json --secret-identifier https://{KeyVault}.vault.azure.net:443/secrets/{MyCertificate} -- command: - name: sf cluster certificate add - summary: Add a secondary cluster certificate to the cluster. - examples: - - summary: Add a certificate to a cluster using a keyvault secret identifier. - command: | - az sf cluster certificate add -g group-name -n cluster1 \ - --secret-identifier 'https://{KeyVault}.vault.azure.net/secrets/{Secret}' - - summary: Add a self-signed certificate to a cluster. - command: > - az sf cluster certificate add -g group-name -n cluster1 --certificate-subject-name test.com -- command: - name: sf cluster certificate remove - summary: Remove a certificate from a cluster. - examples: - - summary: Remove a certificate by thumbprint. - command: > - az sf cluster certificate remove -g group-name -n cluster1 --thumbprint '5F3660C715EBBDA31DB1FFDCF508302348DE8E7A' -- command: - name: sf cluster client-certificate add - summary: Add a common name or certificate thumbprint to the cluster for client authentication. - examples: - - summary: Add client certificate by thumbprint - command: > - az sf cluster client-certificate add -g group-name -n cluster1 --thumbprint '5F3660C715EBBDA31DB1FFDCF508302348DE8E7A' -- command: - name: sf cluster client-certificate remove - summary: Remove client certificates or subject names used for authentication. - examples: - - summary: Remove a client certificate by thumbprint. - command: > - az sf cluster client-certificate remove -g group-name -n cluster1 --thumbprint '5F3660C715EBBDA31DB1FFDCF508302348DE8E7A' -- command: - name: sf cluster setting set - summary: Update the settings of a cluster. - examples: - - summary: Set the `MaxFileOperationTimeout` setting for a cluster to 5 seconds. - command: > - az sf cluster setting set -g group-name -n cluster1 --section 'NamingService' --parameter 'MaxFileOperationTimeout' --value 5000 -- command: - name: sf cluster setting remove - summary: Remove settings from a cluster. - examples: - - summary: Remove the `MaxFileOperationTimeout` setting from a cluster. - command: > - az sf cluster setting remove -g group-name -n cluster1 --section 'NamingService' --parameter 'MaxFileOperationTimeout' -- command: - name: sf cluster reliability update - summary: Update the reliability tier for the primary node in a cluster. - examples: - - summary: Change the cluster reliability level to 'Silver'. - command: > - az sf cluster reliability update -g group-name -n cluster1 --reliability-level Silver -- command: - name: sf cluster durability update - summary: Update the durability tier or VM SKU of a node type in the cluster. - examples: - - summary: Change the cluster durability level to 'Silver'. - command: > - az sf cluster durability update -g group-name -n cluster1 --durability-level Silver --node-type nt1 -- command: - name: sf cluster node-type add - summary: Add a new node type to a cluster. - examples: - - summary: Add a new node type to a cluster. - command: > - az sf cluster node-type add -g group-name -n cluster1 --node-type 'n2' --capacity 5 --vm-user-name 'adminName' --vm-password User@1234567890 -- command: - name: sf cluster node add - summary: Add nodes to a node type in a cluster. - examples: - - summary: Add 2 'nt1' nodes to a cluster. - command: > - az sf cluster node add -g group-name -n cluster1 --number-of-nodes-to-add 2 --node-type 'nt1' -- command: - name: sf cluster node remove - summary: Remove nodes from a node type in a cluster. - examples: - - summary: Remove 2 'nt1' nodes from a cluster. - command: > - az sf cluster node remove -g group-name -n cluster1 --node-type 'nt1' --number-of-nodes-to-remove 2 -- command: - name: sf cluster upgrade-type set - summary: Change the upgrade type for a cluster. - examples: - - summary: Set a cluster to use the 'Automatic' upgrade mode. - command: > - az sf cluster upgrade-type set -g group-name -n cluster1 --upgrade-mode Automatic -- command: - name: sf application certificate add - summary: Add a new certificate to the Virtual Machine Scale Sets that make up the cluster to be used by hosted applications. - examples: - - summary: Add an application certificate. - command: > - az sf application certificate add -g group-name -n cluster1 --secret-identifier 'https://{KeyVault}.vault.azure.net/secrets/{Secret}' diff --git a/src/command_modules/azure-cli-signalr/azure/cli/command_modules/signalr/help.yaml b/src/command_modules/azure-cli-signalr/azure/cli/command_modules/signalr/help.yaml deleted file mode 100644 index c7565dd4555..00000000000 --- a/src/command_modules/azure-cli-signalr/azure/cli/command_modules/signalr/help.yaml +++ /dev/null @@ -1,53 +0,0 @@ -version: 1 -content: -- group: - name: signalr - summary: Manage Azure SignalR Service. -- group: - name: signalr key - summary: Manage keys for Azure SignalR Service. -- command: - name: signalr list - summary: Lists all the SignalR Service under the current subscription. - examples: - - summary: List SignalR Service and show the results in a table. - command: > - az signalr list -o table - - summary: List SignalR Service in a resource group and show the results in a table. - command: > - az signalr list -g MySignalR -o table -- command: - name: signalr create - summary: Creates a SignalR Service. - examples: - - summary: Create a SignalR Service with the Basic SKU. - command: > - az signalr create -n MySignalR -g MyResourceGroup --sku Standard_S1 --unit-count 1 -- command: - name: signalr delete - summary: Deletes a SignalR Service. - examples: - - summary: Delete a SignalR Service. - command: > - az signalr delete -n MySignalR -g MyResourceGroup -- command: - name: signalr show - summary: Get the details of a SignalR Service. - examples: - - summary: Get the sku for a SignalR Service. - command: > - az signalr show -n MySignalR -g MyResourceGroup --query sku -- command: - name: signalr key list - summary: List the access keys for a SignalR Service. - examples: - - summary: Get the primary key for a SignalR Service. - command: > - az signalr key list -n MySignalR -g MyResourceGroup --query primaryKey -o tsv -- command: - name: signalr key renew - summary: Regenerate the access key for a SignalR Service. - examples: - - summary: Renew the secondary key for a SignalR Service. - command: > - az signalr key renew -n MySignalR -g MyResourceGroup --key-type secondary diff --git a/src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/help.yaml b/src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/help.yaml deleted file mode 100644 index 702cc25156a..00000000000 --- a/src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/help.yaml +++ /dev/null @@ -1,450 +0,0 @@ -version: 1 -content: -- group: - name: sql - summary: Manage Azure SQL Databases and Data Warehouses. -- group: - name: sql db - summary: Manage databases. -- command: - name: sql db copy - summary: Create a copy of a database. - description: A full list of performance level options can be seen by executing `az sql db list-editions -a -o table -l LOCATION`. The copy destination database must have the same edition as the source database, but you can change the edition after the copy has completed. - examples: - - summary: Create a database with performance level S0 as a copy of an existing Standard database. - command: az sql db copy -g mygroup -s myserver -n originalDb --dest-name newDb --service-objective S0 - - summary: Create a database with GeneralPurpose edition, Gen4 hardware, and 1 vcore as a copy of an existing GeneralPurpose database. - command: az sql db copy -g mygroup -s myserver -n originalDb --dest-name newDb -f Gen4 -c 1 -- command: - name: sql db create - summary: Create a database. - description: A full list of performance level options can be seen by executing `az sql db list-editions -a -o table -l LOCATION`. - examples: - - summary: Create a Standard S0 database. - command: az sql db create -g mygroup -s myserver -n mydb --service-objective S0 - - summary: Create a database with GeneralPurpose edition, Gen4 hardware and 1 vcore - command: az sql db create -g mygroup -s myserver -n mydb -e GeneralPurpose -f Gen4 -c 1 - - summary: Create a database with zone redundancy enabled - command: az sql db create -g mygroup -s myserver -n mydb -z - - summary: Create a database with zone redundancy explicitly disabled - command: az sql db create -g mygroup -s myserver -n mydb -z false -- command: - name: sql db delete - summary: Delete a database. -- command: - name: sql db list - summary: List databases a server or elastic pool. -- command: - name: sql db list-editions - summary: Show database editions available for the currently active subscription. - description: Includes available service objectives and storage limits. In order to reduce verbosity, settings to intentionally reduce storage limits are hidden by default. - examples: - - summary: Show all database editions in a location. - command: az sql db list-editions -l westus - - summary: Show all available database service objectives for Standard edition. - command: az sql db list-editions -l westus --edition Standard - - summary: Show available max database sizes for P1 service objective - command: az sql db list-editions -l westus --service-objective P1 --show-details max-size -- command: - name: sql db rename - summary: Rename a database. -- command: - name: sql db show - summary: Get the details for a database. -- command: - name: sql db show-connection-string - summary: Generates a connection string to a database. - examples: - - summary: Generate connection string for ado.net - command: az sql db show-connection-string -s myserver -n mydb -c ado.net -- command: - name: sql db update - summary: Update a database. - examples: - - summary: Update database with zone redundancy enabled - command: az sql db update -g mygroup -s myserver -n mypool -z - - summary: Update database with zone redundancy explicitly disabled - command: az sql db update -g mygroup -s myserver -n mypool -z false -- group: - name: sql db audit-policy - summary: Manage a database's auditing policy. -- group: - name: sql server ad-admin - summary: Manage a server's Active Directory administrator. -- command: - name: sql server ad-admin create - summary: Create a new server Active Directory administrator. -- command: - name: sql server ad-admin update - summary: Update an existing server Active Directory administrator. -- command: - name: sql db audit-policy update - summary: Update a database's auditing policy. - description: If the policy is being enabled, `--storage-account` or both `--storage-endpoint` and `--storage-key` must be specified. - examples: - - summary: Enable by storage account name. - command: az sql db audit-policy update -g mygroup -s myserver -n mydb --state Enabled --storage-account mystorage - - summary: Enable by storage endpoint and key. - command: | - az sql db audit-policy update -g mygroup -s myserver -n mydb --state Enabled \ - --storage-endpoint https://mystorage.blob.core.windows.net --storage-key MYKEY== - - summary: Set the list of audit actions. - command: | - az sql db audit-policy update -g mygroup -s myserver -n mydb \ - --actions FAILED_DATABASE_AUTHENTICATION_GROUP 'UPDATE on database::mydb by public' - - summary: Add an audit action. - command: | - az sql db audit-policy update -g mygroup -s myserver -n mydb \ - --add auditActionsAndGroups FAILED_DATABASE_AUTHENTICATION_GROUP - - summary: Remove an audit action by list index. - command: az sql db audit-policy update -g mygroup -s myserver -n mydb --remove auditActionsAndGroups 0 - - summary: Disable an auditing policy. - command: az sql db audit-policy update -g mygroup -s myserver -n mydb --state Disabled -- group: - name: sql db op - summary: Manage operations on a database. -- command: - name: sql db op cancel - examples: - - summary: Cancel an operation. - command: az sql db op cancel -g mygroup -s myserver -d mydb -n d2896db1-2ba8-4c84-bac1-387c430cce40 -- group: - name: sql db replica - summary: Manage replication between databases. -- command: - name: sql db replica create - summary: Create a database as a readable secondary replica of an existing database. - description: A full list of performance level options can be seen by executing `az sql db list-editions -a -o table -l LOCATION`. The secondary database must have the same edition as the primary database. - examples: - - summary: Create a database with performance level S0 as a secondary replica of an existing Standard database. - command: az sql db replica create -g mygroup -s myserver -n originalDb --partner-server newDb --service-objective S0 - - summary: Create a database with GeneralPurpose edition, Gen4 hardware, and 1 vcore as a secondary replica of an existing GeneralPurpose database - command: az sql db replica create -g mygroup -s myserver -n originalDb --partner-server newDb -f Gen4 -c 1 -- command: - name: sql db replica set-primary - summary: Set the primary replica database by failing over from the current primary replica database. -- command: - name: sql db replica list-links - summary: List the replicas of a database and their replication status. -- command: - name: sql db replica delete-link - summary: Permanently stop data replication between two database replicas. -- command: - name: sql db export - summary: Export a database to a bacpac. - examples: - - summary: Get an SAS key for use in export operation. - command: | - az storage blob generate-sas --account-name myAccountName -c myContainer -n myBacpac.bacpac \ - --permissions w --expiry 2018-01-01T00:00:00Z - - summary: Export bacpac using an SAS key. - command: | - az sql db export -s myserver -n mydatabase -g mygroup -p password -u login \ - --storage-key "?sr=b&sp=rw&se=2018-01-01T00%3A00%3A00Z&sig=mysignature&sv=2015-07-08" \ - --storage-key-type SharedAccessKey \ - --storage-uri https://mystorageaccount.blob.core.windows.net/bacpacs/myBacpac.bacpac - - summary: Export bacpac using a storage account key. - command: | - az sql db export -s myserver -n mydatabase -g mygroup -p password -u login \ - --storage-key MYKEY== --storage-key-type StorageAccessKey \ - --storage-uri https://mystorageaccount.blob.core.windows.net/bacpacs/myBacpac.bacpac -- command: - name: sql db import - summary: Imports a bacpac into an existing database. - examples: - - summary: Get an SAS key for use in import operation. - command: | - az storage blob generate-sas --account-name myAccountName -c myContainer -n myBacpac.bacpac \ - --permissions r --expiry 2018-01-01T00:00:00Z - - summary: Import bacpac into an existing database using an SAS key. - command: | - az sql db import -s myserver -n mydatabase -g mygroup -p password -u login \ - --storage-key "?sr=b&sp=rw&se=2018-01-01T00%3A00%3A00Z&sig=mysignature&sv=2015-07-08" \ - --storage-key-type SharedAccessKey \ - --storage-uri https://mystorageaccount.blob.core.windows.net/bacpacs/myBacpac.bacpac - - summary: Import bacpac into an existing database using a storage account key. - command: | - az sql db import -s myserver -n mydatabase -g mygroup -p password -u login --storage-key MYKEY== \ - --storage-key-type StorageAccessKey \ - --storage-uri https://mystorageaccount.blob.core.windows.net/bacpacs/myBacpac.bacpac -- command: - name: sql db restore - summary: Create a new database by restoring from a backup. -- group: - name: sql db threat-policy - summary: Manage a database's threat detection policies. -- command: - name: sql db threat-policy update - summary: Update a database's threat detection policy. - description: If the policy is being enabled, storage_account or both storage_endpoint and storage_account_access_key must be specified. - examples: - - summary: Enable by storage account name. - command: | - az sql db threat-policy update -g mygroup -s myserver -n mydb \ - --state Enabled --storage-account mystorage - - summary: Enable by storage endpoint and key. - command: | - az sql db threat-policy update -g mygroup -s myserver -n mydb \ - --state Enabled --storage-endpoint https://mystorage.blob.core.windows.net \ - --storage-key MYKEY== - - summary: Disable a subset of alert types. - command: | - az sql db threat-policy update -g mygroup -s myserver -n mydb \ - --disabled-alerts Sql_Injection_Vulnerability Access_Anomaly - - summary: Configure email recipients for a policy. - command: | - az sql db threat-policy update -g mygroup -s myserver -n mydb \ - --email-addresses me@examlee.com you@example.com \ - --email-account-admins Enabled - - summary: Disable a threat policy. - command: az sql db threat-policy update -g mygroup -s myserver -n mydb --state Disabled -- group: - name: sql db tde - summary: Manage a database's transparent data encryption. -- command: - name: sql db tde set - summary: Sets a database's transparent data encryption configuration. -- group: - name: sql dw - summary: Manage data warehouses. -- command: - name: sql dw create - summary: Create a data warehouse. -- command: - name: sql dw delete - summary: Delete a data warehouse. -- command: - name: sql dw list - summary: List data warehouses for a server. -- command: - name: sql dw show - summary: Get the details for a data warehouse. -- command: - name: sql dw update - summary: Update a data warehouse. -- group: - name: sql elastic-pool - summary: Manage elastic pools. -- command: - name: sql elastic-pool create - summary: Create an elastic pool. - examples: - - summary: Create elastic pool with zone redundancy enabled - command: az sql elastic-pool create -g mygroup -s myserver -n mypool -z - - summary: Create elastic pool with zone redundancy explicitly disabled - command: az sql elastic-pool create -g mygroup -s myserver -n mypool -z false - - summary: Create a Standard 100 DTU elastic pool. - command: az sql elastic-pool create -g mygroup -s myserver -n mydb -e Standard -c 100 - - summary: Create an elastic pool with GeneralPurpose edition, Gen4 hardware and 1 vcore. - command: az sql elastic-pool create -g mygroup -s myserver -n mydb -e GeneralPurpose -f Gen4 -c 1 -- command: - name: sql elastic-pool list-editions - summary: List elastic pool editions available for the active subscription. - description: Also includes available pool DTU settings, storage limits, and per database settings. In order to reduce verbosity, additional storage limits and per database settings are hidden by default. - examples: - - summary: Show all elastic pool editions and pool DTU limits in the West US region. - command: az sql elastic-pool list-editions -l westus - - summary: Show all pool DTU limits for Standard edition in the West US region. - command: az sql elastic-pool list-editions -l westus --edition Standard - - summary: Show available max sizes for elastic pools with at least 100 DTUs in the West US region. - command: az sql elastic-pool list-editions -l westus --dtu 100 --show-details max-size - - summary: Show available per database settings for Standard 100 DTU elastic pools in the West US region. - command: az sql elastic-pool list-editions -l westus --edition Standard --dtu 100 --show-details db-min-dtu db-max-dtu db-max-size -- command: - name: sql elastic-pool update - summary: Update an elastic pool. - examples: - - summary: Update elastic pool with zone redundancy enabled - command: az sql elastic-pool update -g mygroup -s myserver -n mypool -z - - summary: Update elastic pool with zone redundancy explicitly disabled - command: az sql elastic-pool update -g mygroup -s myserver -n mypool -z false -- group: - name: sql elastic-pool op - summary: Manage operations on an elastic pool. -- command: - name: sql elastic-pool op cancel - examples: - - summary: Cancel an operation. - command: az sql elastic-pool op cancel -g mygroup -s myserver --elastic-pool myelasticpool -n d2896db1-2ba8-4c84-bac1-387c430cce40 -- group: - name: sql failover-group - summary: Manage SQL Failover Groups. -- command: - name: sql failover-group create - summary: Creates a failover group. -- command: - name: sql failover-group update - summary: Updates the failover group. -- command: - name: sql failover-group set-primary - summary: Set the primary of the failover group by failing over all databases from the current primary server. -- group: - name: sql server - summary: Manage SQL servers. -- command: - name: sql server create - summary: Create a server. - examples: - - summary: Create a server. - command: az sql server create -l westus -g mygroup -n myserver -u myadminuser -p myadminpassword -- command: - name: sql server list - summary: List available servers. - examples: - - summary: List all servers in the current subscription. - command: az sql server list - - summary: List all servers in a resource group. - command: az sql server list -g mygroup -- command: - name: sql server update - summary: Update a server. -- group: - name: sql server conn-policy - summary: Manage a server's connection policy. -- command: - name: sql server conn-policy show - summary: Gets a server's secure connection policy. -- command: - name: sql server conn-policy update - summary: Updates a server's secure connection policy. -- group: - name: sql server dns-alias - summary: Manage a server's DNS aliases. -- command: - name: sql server dns-alias set - summary: Sets a server to which DNS alias should point -- group: - name: sql server firewall-rule - summary: Manage a server's firewall rules. -- command: - name: sql server firewall-rule create - summary: Create a firewall rule. - examples: - - summary: Create a firewall rule - command: az sql server firewall-rule create -g mygroup -s myserver -n myrule --start-ip-address 1.2.3.4 --end-ip-address 5.6.7.8 - - summary: Create a firewall rule that allows access from Azure services - command: az sql server firewall-rule create -g mygroup -s myserver -n myrule --start-ip-address 0.0.0.0 --end-ip-address 0.0.0.0 -- command: - name: sql server firewall-rule update - summary: Update a firewall rule. - examples: - - summary: Update a firewall rule - command: az sql server firewall-rule update -g mygroup -s myserver -n myrule --start-ip-address 9.8.7.6 --end-ip-address 5.4.3.2 -- command: - name: sql server firewall-rule show - summary: Shows the details for a firewall rule. - examples: - - summary: Show a firewall rule - command: az sql server firewall-rule show -g mygroup -s myserver -n myrule -- command: - name: sql server firewall-rule list - summary: List a server's firewall rules. - examples: - - summary: List a server's firewall rules - command: az sql server firewall-rule list -g mygroup -s myserver -- group: - name: sql server key - summary: Manage a server's keys. -- command: - name: sql server key create - summary: Creates a server key. -- command: - name: sql server key show - summary: Shows a server key. -- command: - name: sql server key delete - summary: Deletes a server key. -- group: - name: sql server tde-key - summary: Manage a server's encryption protector. -- command: - name: sql server tde-key set - summary: Sets the server's encryption protector. -- group: - name: sql server vnet-rule - summary: Manage a server's virtual network rules. -- command: - name: sql server vnet-rule update - summary: Update a virtual network rule. -- command: - name: sql server vnet-rule create - summary: Create a virtual network rule to allows access to an Azure SQL server. - examples: - - summary: Create a vnet rule by providing the subnet id. - command: | - az sql server vnet-rule create --server MyAzureSqlServer --name MyVNetRule \ - -g MyResourceGroup --subnet /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Network/virtualNetworks/{VNETName}/subnets/{SubnetName} - - summary: Create a vnet rule by providing the vnet and subnet name. The subnet id is created by taking the resource group name and subscription id of the SQL server. - command: | - az sql server vnet-rule create --server MyAzureSqlServer --name MyVNetRule \ - -g MyResourceGroup --subnet subnetName --vnet-name vnetName -- group: - name: sql mi - summary: Manage SQL managed instances. -- command: - name: sql mi create - summary: Create a managed instance. - examples: - - summary: Create a managed instance with specified parameters and with identity - command: az sql mi create -g mygroup -n myinstance -l mylocation -i -u myusername -p mypassword --license-type LicenseIncluded --subnet /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Network/virtualNetworks/{VNETName}/subnets/{SubnetName} --capacity 8 --storage 32GB --edition GeneralPurpose --family Gen4 - - summary: Create a managed instance with minimal set of parameters - command: az sql mi create -g mygroup -n myinstance -l mylocation -i -u myusername -p mypassword --subnet /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Network/virtualNetworks/{VNETName}/subnets/{SubnetName} -- command: - name: sql mi list - summary: List available managed instances. - examples: - - summary: List all managed instances in the current subscription. - command: az sql mi list - - summary: List all managed instances in a resource group. - command: az sql mi list -g mygroup -- command: - name: sql mi show - summary: Get the details for a managed instance. - examples: - - summary: Get the details for a managed instance - command: az sql mi show -g mygroup -n myinstance -- command: - name: sql mi update - summary: Update a managed instance. - examples: - - summary: Updates a mi with specified parameters and with identity - command: az sql mi update -g mygroup -n myinstance -i -p mypassword --license-type mylicensetype --capacity vcorecapacity --storage storagesize -- command: - name: sql mi delete - summary: Delete a managed instance. - examples: - - summary: Delete a managed instance - command: az sql mi delete -g mygroup -n myinstance --yes -- group: - name: sql midb - summary: Manage SQL managed instance databases. -- command: - name: sql midb create - summary: Create a managed database. - examples: - - summary: Create a managed database with specified collation - command: az sql midb create -g mygroup --mi myinstance -n mymanageddb --collation Latin1_General_100_CS_AS_SC -- command: - name: sql midb list - summary: List maanged databases on a managed instance. - examples: - - summary: List managed databases on a managed instance - command: az sql midb list -g mygroup --mi myinstance -- command: - name: sql midb show - summary: Get the details for a managed database. - examples: - - summary: Get the details for a managed database - command: az sql midb show -g mygroup --mi myinstance -n mymanageddb -- command: - name: sql midb restore - summary: Restore a managed database. - examples: - - summary: Restore a managed database using Point in time restore - command: az sql midb restore -g mygroup --mi myinstance -n mymanageddb --dest-name targetmidb --time "2018-05-20T05:34:22" -- command: - name: sql midb delete - summary: Delete a managed database. - examples: - - summary: Delete a managed database - command: az sql midb delete -g mygroup --mi myinstance -n mymanageddb --yes diff --git a/src/command_modules/azure-cli-sqlvirtualmachine/azure/cli/command_modules/sqlvm/help.yaml b/src/command_modules/azure-cli-sqlvirtualmachine/azure/cli/command_modules/sqlvm/help.yaml deleted file mode 100644 index d9fed82d10e..00000000000 --- a/src/command_modules/azure-cli-sqlvirtualmachine/azure/cli/command_modules/sqlvm/help.yaml +++ /dev/null @@ -1,114 +0,0 @@ -version: 1 -content: -- group: - name: sql vm - summary: Manage SQL virtual machines. -- group: - name: sql vm group - summary: Manage SQL virtual machine groups. -- group: - name: sql vm group ag-listener - summary: Manage SQL availability group listeners. -- command: - name: sql vm group create - summary: Creates a SQL virtual machine group. - examples: - - summary: Create a SQL virtual machine group for SQL2016-WS2016 Enterprise virtual machines. - command: > - az sql vm group create -n sqlvmgroup -l eastus -g myresourcegroup --image-offer SQL2016-WS2016 --image-sku Enterprise - --domain-fqdn Domain.com --operator-acc testop --service-acc testservice --sa-key {PublicKey} --storage-account 'https://storacc.blob.core.windows.net/' -- command: - name: sql vm group update - summary: Updates a SQL virtual machine group if there are not SQL virtual machines attached to the group. - examples: - - summary: Update an empty SQL virtual machine group operator account. - command: > - az sql vm group update -n sqlvmgroup -g myresourcegroup --operator-acc testop - - summary: Update an empty SQL virtual machine group storage account and key. - command: > - az sql vm group update -n sqlvmgroup -g myresourcegroup --sa-key {PublicKey} --storage-account 'https://newstoracc.blob.core.windows.net/' -- command: - name: sql vm group ag-listener create - summary: Creates an availability group listener. - examples: - - summary: Create an availability group listener. Note the SQL virtual machines are in the same resource group as the SQL virtual machine group. - command: > - az sql vm group ag-listener create -n aglistenertest -g myresourcegroup --ag-name agname --group-name sqlvmgroup --ip-address 10.0.0.11 - --load-balancer '/subscriptions/{yoursubscription}/resourceGroups/{yourrg}/providers/Microsoft.Network/loadBalancers/{lbname}' --probe-port 59999 - --subnet '/subscriptions/{yoursubscription}/resourceGroups/{yourrg}/providers/Microsoft.Network/virtualNetworks/{vnname}/subnets/{subnetname}' - --sqlvms sqlvm1 sqlvm2 - - summary: Create an availability group listener. Note all resources are in the same resource group. - command: > - az sql vm group ag-listener create -n aglistenertest -g myresourcegroup --ag-name agname --group-name sqlvmgroup --ip-address 10.0.0.11 - --load-balancer {lbname} --probe-port 59999 --subnet {subnetname} --vnet-name {vnname} --sqlvms sqlvm1 sqlvm2 -- command: - name: sql vm create - summary: Creates a SQL virtual machine. - arguments: - - name: --name - summary: Name of the SQL virtual machine. The name of the new SQL virtual machine must be equal to the underlying virtual machine created from SQL marketplace image. - examples: - - summary: Create a SQL virtual machine with AHUB billing tag. - command: > - az sql vm create -n sqlvm -g myresourcegroup -l eastus --license-type AHUB - - summary: Enable R services in SQL2016 onwards. - command: > - az sql vm create -n sqlvm -g myresourcegroup -l eastus --enable-r-services true - - summary: Create SQL virtual machine and configure auto backup settings. - command: > - az sql vm create -n sqlvm -g myresourcegroup -l eastus --backup-schedule-type manual --full-backup-frequency Weekly --full-backup-start-hour 2 --full-backup-duration 2 - --sa-key {storageKey} --storage-account 'https://storageacc.blob.core.windows.net/' --retention-period 30 --log-backup-frequency 60 - - summary: Create SQL virtual machine and configure auto patching settings. - command: > - az sql vm create -n sqlvm -g myresourcegroup -l eastus --day-of-week sunday --maintenance-window-duration 60 --maintenance-window-start-hour 2 - - summary: Create SQL virtual machine and configure SQL connectivity settings. - command: > - az sql vm create -n sqlvm -g myresourcegroup -l eastus --connectivity-type private --port 1433 --sql-auth-update-username {newlogin} --sql-auth-update-pwd {sqlpassword} -- command: - name: sql vm update - summary: Updates the properties of a SQL virtual machine. - examples: - - summary: Add or update a tag. - command: > - az sql vm update -n sqlvm -g myresourcegroup --set tags.tagName=tagValue - - summary: Remove a tag. - command: > - az sql vm update -n sqlvm -g myresourcegroup --remove tags.tagName - - summary: Update SQL virtual machine auto backup settings. - command: > - az sql vm update -n sqlvm -g myresourcegroup --backup-schedule-type manual --full-backup-frequency Weekly --full-backup-start-hour 2 --full-backup-duration 2 - --sa-key {storageKey} --storage-account 'https://storageacc.blob.core.windows.net/' --retention-period 30 --log-backup-frequency 60 - - summary: Disable SQL virtual machine auto backup settings. - command: > - az sql vm update -n sqlvm -g myresourcegroup --enable-auto-backup false - - summary: Update SQL virtual machine auto patching settings. - command: > - az sql vm update -n sqlvm -g myresourcegroup --day-of-week sunday --maintenance-window-duration 60 --maintenance-window-start-hour 2 - - summary: Disable SQL virtual machine auto patching settings. - command: > - az sql vm update -n sqlvm -g myresourcegroup --enable-auto-patching false - - summary: Update a SQL virtual machine billing tag to AHUB. - command: > - az sql vm update -n sqlvm -g myresourcegroup --license-type AHUB -- command: - name: sql vm add-to-group - summary: Adds SQL virtual machine to a SQL virtual machine group. - examples: - - summary: Add SQL virtual machine to a group. - command: > - az sql vm add-to-group -n sqlvm -g myresourcegroup --sqlvm-group sqlvmgroup --boostrap-acc-pwd - {boostrappassword} --operator-acc-pwd {operatorpassword} --service-acc-pwd {servicepassword} -- command: - name: sql vm remove-from-group - summary: Remove SQL virtual machine from its current SQL virtual machine group. - examples: - - summary: Remove SQL virtual machine from a group. - command: > - az sql vm remove-from-group -n sqlvm -g myresourcegroup -- command: - name: sql vm group ag-listener update - summary: Updates an availability group listener. - examples: - - summary: Replace the SQL virtual machines that were in the availability group. - command: > - az sql vm group ag-listener update --sqlvms sqlvm3 sqlvm4 --group-name mygroup diff --git a/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/help.yaml b/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/help.yaml deleted file mode 100644 index b4ffa2b837a..00000000000 --- a/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/help.yaml +++ /dev/null @@ -1,634 +0,0 @@ -version: 1 -content: -- command: - name: storage entity insert - summary: Insert an entity into a table. - arguments: - - name: --table-name - summary: The name of the table to insert the entity into. - - name: --entity - summary: Space-separated list of key=value pairs. Must contain a PartitionKey and a RowKey. - description: The PartitionKey and RowKey must be unique within the table, and may be up to 64Kb in size. If using an integer value as a key, convert it to a fixed-width string which can be canonically sorted. For example, convert the integer value 1 to the string value "0000001" to ensure proper sorting. - - name: --if-exists - summary: Behavior when an entity already exists for the specified PartitionKey and RowKey. - - name: --timeout - summary: The server timeout, expressed in seconds. -- command: - name: storage blob upload - summary: Upload a file to a storage blob. - description: Creates a new blob from a file path, or updates the content of an existing blob with automatic chunking and progress notifications. - arguments: - - name: --type - summary: Defaults to 'page' for *.vhd files, or 'block' otherwise. - - name: --maxsize-condition - summary: The max length in bytes permitted for an append blob. - - name: --validate-content - summary: Specifies that an MD5 hash shall be calculated for each chunk of the blob and verified by the service when the chunk has arrived. - - name: --tier - summary: A page blob tier value to set the blob to. The tier correlates to the size of the blob and number of allowed IOPS. This is only applicable to page blobs on premium storage accounts. - examples: - - summary: Upload to a blob. - command: az storage blob upload -f /path/to/file -c MyContainer -n MyBlob -- command: - name: storage file upload - summary: Upload a file to a share that uses the SMB 3.0 protocol. - description: Creates or updates an Azure file from a source path with automatic chunking and progress notifications. - examples: - - summary: Upload to a local file to a share. - command: az storage file upload -s MyShare --source /path/to/file -- command: - name: storage blob show - summary: Get the details of a blob. - examples: - - summary: Show all properties of a blob. - command: az storage blob show -c MyContainer -n MyBlob -- command: - name: storage blob delete - summary: Mark a blob or snapshot for deletion. - description: > - The blob is marked for later deletion during garbage collection. In order to delete a blob, all of its snapshots must also be deleted. - Both can be removed at the same time. - examples: - - summary: Delete a blob. - command: az storage blob delete -c MyContainer -n MyBlob -- command: - name: storage account create - summary: Create a storage account. - description: > - The SKU of the storage account defaults to 'Standard_RAGRS'. - examples: - - summary: Create a storage account 'MyStorageAccount' in resource group 'MyResourceGroup' in the West US region with locally redundant storage. - command: az storage account create -n MyStorageAccount -g MyResourceGroup -l westus --sku Standard_LRS - min_profile: latest - - summary: Create a storage account 'MyStorageAccount' in resource group 'MyResourceGroup' in the West US region with locally redundant storage. - command: az storage account create -n MyStorageAccount -g MyResourceGroup -l westus --account-type Standard_LRS - max_profile: 2017-03-09-profile -- command: - name: storage container create - summary: Create a container in a storage account. - examples: - - summary: Create a storage container in a storage account. - command: az storage container create -n MyStorageContainer - - summary: Create a storage container in a storage account and return an error if the container already exists. - command: az storage container create -n MyStorageContainer --fail-on-exist -- command: - name: storage container delete - summary: Marks the specified container for deletion. - description: > - The container and any blobs contained within it are later deleted during garbage collection. -- command: - name: storage account list - summary: List storage accounts. - examples: - - summary: List all storage accounts in a subscription. - command: az storage account list - - summary: List all storage accounts in a resource group. - command: az storage account list -g MyResourceGroup -- command: - name: storage account show - summary: Show storage account properties. - examples: - - summary: Show properties for a storage account by resource ID. - command: az storage account show --ids /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Storage/storageAccounts/{StorageAccount} - - summary: Show properties for a storage account using an account name and resource group. - command: az storage account show -g MyResourceGroup -n MyStorageAccount -- command: - name: storage account show-usage - summary: Show the current count and limit of the storage accounts under the subscription. -- command: - name: storage account delete - summary: Delete a storage account. - examples: - - summary: Delete a storage account using a resource ID. - command: az storage account delete --ids /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Storage/storageAccounts/{StorageAccount} - - summary: Delete a storage account using an account name and resource group. - command: az storage account delete -n MyStorageAccount -g MyResourceGroup -- command: - name: storage account show-connection-string - summary: Get the connection string for a storage account. - examples: - - summary: Get a connection string for a storage account. - command: az storage account show-connection-string -g MyResourceGroup -n MyStorageAccount -- group: - name: storage - summary: Manage Azure Cloud Storage resources. -- group: - name: storage account - summary: Manage storage accounts. -- command: - name: storage account update - summary: Update the properties of a storage account. -- group: - name: storage account keys - summary: Manage storage account keys. -- command: - name: storage account keys list - summary: List the primary and secondary keys for a storage account. - examples: - - summary: List the primary and secondary keys for a storage account. - command: az storage account keys list -g MyResourceGroup -n MyStorageAccount -- group: - name: storage blob - summary: Manage object storage for unstructured data (blobs). -- command: - name: storage blob exists - summary: Check for the existence of a blob in a container. - arguments: - - name: --name - summary: The blob name. -- command: - name: storage blob list - summary: List blobs in a given container. - arguments: - - name: --include - summary: 'Specifies additional datasets to include: (c)opy-info, (m)etadata, (s)napshots, (d)eleted-soft. Can be combined.' - examples: - - summary: List all storage blobs in a container whose names start with 'foo'; will match names such as 'foo', 'foobar', and 'foo/bar' - command: az storage blob list -c MyContainer --prefix foo -- group: - name: storage blob copy - summary: Manage blob copy operations. Use `az storage blob show` to check the status of the blobs. -- group: - name: storage blob incremental-copy - summary: Manage blob incremental copy operations. -- command: - name: storage blob incremental-copy start - summary: Copies an incremental copy of a blob asynchronously. - description: This operation returns a copy operation properties object, including a copy ID you can use to check or abort the copy operation. The Blob service copies blobs on a best-effort basis. The source blob for an incremental copy operation must be a page blob. Call get_blob_properties on the destination blob to check the status of the copy operation. The final blob will be committed when the copy completes. - examples: - - summary: Upload all files that end with .py unless blob exists and has been modified since given date. - command: az storage blob incremental-copy start --source-container MySourceContainer --source-blob MyBlob --source-account-name MySourceAccount --source-account-key MySourceKey --source-snapshot MySnapshot --destination-container MyDestinationContainer --destination-blob MyDestinationBlob -- group: - name: storage blob lease - summary: Manage storage blob leases. -- group: - name: storage blob metadata - summary: Manage blob metadata. -- group: - name: storage blob service-properties - summary: Manage storage blob service properties. -- command: - name: storage blob service-properties update - summary: Update storage blob service properties. -- group: - name: storage blob service-properties delete-policy - summary: Manage storage blob delete-policy service properties. -- command: - name: storage blob service-properties delete-policy show - summary: Show the storage blob delete-policy. -- command: - name: storage blob service-properties delete-policy update - summary: Update the storage blob delete-policy. -- command: - name: storage blob set-tier - summary: Set the block or page tiers on the blob. - description: > - For block blob this command only supports block blob on standard storage accounts. - For page blob, this command only supports for page blobs on premium accounts. - arguments: - - name: --type - summary: The blob type - - name: --tier - summary: The tier value to set the blob to. - - name: --timeout - summary: The timeout parameter is expressed in seconds. This method may make multiple calls to the Azure service and the timeout will apply to each call individually. -- command: - name: storage blob upload-batch - summary: Upload files from a local directory to a blob container. - arguments: - - name: --source - summary: The directory where the files to be uploaded are located. - - name: --destination - summary: The blob container where the files will be uploaded. - description: The destination can be the container URL or the container name. When the destination is the container URL, the storage account name will be parsed from the URL. - - name: --pattern - summary: The pattern used for globbing files or blobs in the source. The supported patterns are '*', '?', '[seq]', and '[!seq]'. - - name: --dryrun - summary: Show the summary of the operations to be taken instead of actually uploading the file(s). - - name: --if-match - summary: An ETag value, or the wildcard character (*). Specify this header to perform the operation only if the resource's ETag matches the value specified. - - name: --if-none-match - summary: An ETag value, or the wildcard character (*). - description: Specify this header to perform the operation only if the resource's ETag does not match the value specified. Specify the wildcard character (*) to perform the operation only if the resource does not exist, and fail the operation if it does exist. - - name: --validate-content - summary: Specifies that an MD5 hash shall be calculated for each chunk of the blob and verified by the service when the chunk has arrived. - - name: --type - summary: Defaults to 'page' for *.vhd files, or 'block' otherwise. The setting will override blob types for every file. - - name: --maxsize-condition - summary: The max length in bytes permitted for an append blob. - - name: --lease-id - summary: Required if the blob has an active lease - examples: - - summary: Upload all files that end with .py unless blob exists and has been modified since given date. - command: az storage blob upload-batch -d MyContainer --account-name MyStorageAccount -s directory_path --pattern *.py --if-unmodified-since 2018-08-27T20:51Z -- command: - name: storage blob download-batch - summary: Download blobs from a blob container recursively. - arguments: - - name: --source - summary: The blob container from where the files will be downloaded. - description: The source can be the container URL or the container name. When the source is the container URL, the storage account name will be parsed from the URL. - - name: --destination - summary: The existing destination folder for this download operation. - - name: --pattern - summary: The pattern used for globbing files or blobs in the source. The supported patterns are '*', '?', '[seq]', and '[!seq]'. - - name: --dryrun - summary: Show the summary of the operations to be taken instead of actually downloading the file(s). - examples: - - summary: Download all blobs that end with .py - command: az storage blob download-batch -d . --pattern *.py -s MyContainer --account-name MyStorageAccount -- command: - name: storage blob delete-batch - summary: Delete blobs from a blob container recursively. - arguments: - - name: --source - summary: The blob container from where the files will be deleted. - description: The source can be the container URL or the container name. When the source is the container URL, the storage account name will be parsed from the URL. - - name: --pattern - summary: The pattern used for globbing files or blobs in the source. The supported patterns are '*', '?', '[seq]', and '[!seq]'. - - name: --dryrun - summary: Show the summary of the operations to be taken instead of actually deleting the file(s). - - name: --if-match - summary: An ETag value, or the wildcard character (*). Specify this header to perform the operation only if the resource's ETag matches the value specified. - - name: --if-none-match - summary: An ETag value, or the wildcard character (*). - description: Specify this header to perform the operation only if the resource's ETag does not match the value specified. Specify the wildcard character (*) to perform the operation only if the resource does not exist, and fail the operation if it does exist. - examples: - - summary: Delete all blobs ending with ".py" in a container that have not been modified for 10 days. - command: | - date=`date -d "10 days ago" '+%Y-%m-%dT%H:%MZ'` - az storage blob delete-batch -s MyContainer --account-name MyStorageAccount --pattern *.py --if-unmodified-since $date -- command: - name: storage blob copy start - summary: Copies a blob asynchronously. Use `az storage blob show` to check the status of the blobs. -- command: - name: storage blob copy start-batch - summary: Copy multiple blobs or files to a blob container. Use `az storage blob show` to check the status of the blobs. - arguments: - - name: --destination-container - summary: The blob container where the selected source files or blobs will be copied to. - - name: --pattern - summary: The pattern used for globbing files or blobs in the source. The supported patterns are '*', '?', '[seq', and '[!seq]'. - - name: --dryrun - summary: List the files or blobs to be uploaded. No actual data transfer will occur. - - name: --source-account-name - summary: The source storage account from which the files or blobs are copied to the destination. If omitted, the source account is used. - - name: --source-account-key - summary: The account key for the source storage account. - - name: --source-container - summary: The source container from which blobs are copied. - - name: --source-share - summary: The source share from which files are copied. - - name: --source-uri - summary: A URI specifying a file share or blob container from which the files or blobs are copied. - description: If the source is in another account, the source must either be public or be authenticated by using a shared access signature. - - name: --source-sas - summary: The shared access signature for the source storage account. -- group: - name: storage container - summary: Manage blob storage containers. -- command: - name: storage container exists - summary: Check for the existence of a storage container. -- command: - name: storage container list - summary: List containers in a storage account. -- group: - name: storage container lease - summary: Manage blob storage container leases. -- group: - name: storage container metadata - summary: Manage container metadata. -- group: - name: storage container policy - summary: Manage container stored access policies. -- group: - name: storage container immutability-policy - summary: Manage container immutability policies. -- group: - name: storage container legal-hold - summary: Manage container legal holds. -- command: - name: storage container legal-hold show - summary: Get the legal hold properties of a container. -- group: - name: storage cors - summary: Manage storage service Cross-Origin Resource Sharing (CORS). -- command: - name: storage cors add - summary: Add a CORS rule to a storage account. - arguments: - - name: --services - summary: > - The storage service(s) to add rules to. Allowed options are: (b)lob, (f)ile, - (q)ueue, (t)able. Can be combined. - - name: --max-age - summary: The maximum number of seconds the client/browser should cache a preflight response. - - name: --origins - summary: Space-separated list of origin domains that will be allowed via CORS, or '*' to allow all domains. - - name: --methods - summary: Space-separated list of HTTP methods allowed to be executed by the origin. - - name: --allowed-headers - summary: Space-separated list of response headers allowed to be part of the cross-origin request. - - name: --exposed-headers - summary: Space-separated list of response headers to expose to CORS clients. -- command: - name: storage cors clear - summary: Remove all CORS rules from a storage account. - arguments: - - name: --services - summary: > - The storage service(s) to remove rules from. Allowed options are: (b)lob, (f)ile, - (q)ueue, (t)able. Can be combined. -- command: - name: storage cors list - summary: List all CORS rules for a storage account. - arguments: - - name: --services - summary: > - The storage service(s) to list rules for. Allowed options are: (b)lob, (f)ile, - (q)ueue, (t)able. Can be combined. -- group: - name: storage directory - summary: Manage file storage directories. -- command: - name: storage directory exists - summary: Check for the existence of a storage directory. -- group: - name: storage directory metadata - summary: Manage file storage directory metadata. -- command: - name: storage directory list - summary: List directories in a share. -- group: - name: storage entity - summary: Manage table storage entities. -- command: - name: storage entity query - summary: List entities which satisfy a query. - arguments: - - name: --marker - summary: Space-separated list of key=value pairs. Must contain a nextpartitionkey and a nextrowkey. - description: This value can be retrieved from the next_marker field of a previous generator object if max_results was specified and that generator has finished enumerating results. If specified, this generator will begin returning results from the point where the previous generator stopped. -- group: - name: storage file - summary: Manage file shares that use the SMB 3.0 protocol. -- command: - name: storage file exists - summary: Check for the existence of a file. -- command: - name: storage file list - summary: List files and directories in a share. - arguments: - - name: --exclude-dir - summary: List only files in the given share. -- group: - name: storage file copy - summary: Manage file copy operations. -- group: - name: storage file metadata - summary: Manage file metadata. -- command: - name: storage file upload-batch - summary: Upload files from a local directory to an Azure Storage File Share in a batch operation. - arguments: - - name: --source - summary: The directory to upload files from. - - name: --destination - summary: The destination of the upload operation. - description: The destination can be the file share URL or the share name. When the destination is the share URL, the storage account name is parsed from the URL. - - name: --destination-path - summary: The directory where the source data is copied to. If omitted, data is copied to the root directory. - - name: --pattern - summary: The pattern used for file globbing. The supported patterns are '*', '?', '[seq', and '[!seq]'. - - name: --dryrun - summary: List the files and blobs to be uploaded. No actual data transfer will occur. - - name: --max-connections - summary: The maximum number of parallel connections to use. Default value is 1. - - name: --validate-content - summary: If set, calculates an MD5 hash for each range of the file for validation. - description: > - The storage service checks the hash of the content that has arrived is identical to the hash that was sent. - This is mostly valuable for detecting bitflips during transfer if using HTTP instead of HTTPS. This hash is not stored. -- command: - name: storage file download-batch - summary: Download files from an Azure Storage File Share to a local directory in a batch operation. - arguments: - - name: --source - summary: The source of the file download operation. The source can be the file share URL or the share name. - - name: --destination - summary: The local directory where the files are downloaded to. This directory must already exist. - - name: --pattern - summary: The pattern used for file globbing. The supported patterns are '*', '?', '[seq]', and '[!seq]'. - - name: --dryrun - summary: List the files and blobs to be downloaded. No actual data transfer will occur. - - name: --max-connections - summary: The maximum number of parallel connections to use. Default value is 1. - - name: --validate-content - summary: If set, calculates an MD5 hash for each range of the file for validation. - description: > - The storage service checks the hash of the content that has arrived is identical to the hash that was sent. - This is mostly valuable for detecting bitflips during transfer if using HTTP instead of HTTPS. This hash is not stored. -- command: - name: storage file delete-batch - summary: Delete files from an Azure Storage File Share. - arguments: - - name: --source - summary: The source of the file delete operation. The source can be the file share URL or the share name. - - name: --pattern - summary: The pattern used for file globbing. The supported patterns are '*', '?', '[seq]', and '[!seq]'. - - name: --dryrun - summary: List the files and blobs to be deleted. No actual data deletion will occur. -- command: - name: storage file copy start-batch - summary: Copy multiple files or blobs to a file share. - arguments: - - name: --destination-share - summary: The file share where the source data is copied to. - - name: --destination-path - summary: The directory where the source data is copied to. If omitted, data is copied to the root directory. - - name: --pattern - summary: The pattern used for globbing files and blobs. The supported patterns are '*', '?', '[seq', and '[!seq]'. - - name: --dryrun - summary: List the files and blobs to be copied. No actual data transfer will occur. - - name: --source-account-name - summary: The source storage account to copy the data from. If omitted, the destination account is used. - - name: --source-account-key - summary: The account key for the source storage account. If omitted, the active login is used to determine the account key. - - name: --source-container - summary: The source container blobs are copied from. - - name: --source-share - summary: The source share files are copied from. - - name: --source-uri - summary: A URI that specifies a the source file share or blob container. - description: If the source is in another account, the source must either be public or authenticated via a shared access signature. - - name: --source-sas - summary: The shared access signature for the source storage account. -- group: - name: storage logging - summary: Manage storage service logging information. -- command: - name: storage logging show - summary: Show logging settings for a storage account. - arguments: - - name: --services - summary: 'The storage services from which to retrieve logging info: (b)lob (q)ueue (t)able. Can be combined.' -- command: - name: storage logging update - summary: Update logging settings for a storage account. - arguments: - - name: --services - summary: 'The storage service(s) for which to update logging info: (b)lob (q)ueue (t)able. Can be combined.' - - name: --log - summary: 'The operations for which to enable logging: (r)ead (w)rite (d)elete. Can be combined.' - - name: --retention - summary: Number of days for which to retain logs. 0 to disable. - - name: --version - summary: Version of the logging schema. -- group: - name: storage message - summary: Manage queue storage messages. -- group: - name: storage metrics - summary: Manage storage service metrics. -- command: - name: storage metrics show - summary: Show metrics settings for a storage account. - arguments: - - name: --services - summary: 'The storage services from which to retrieve metrics info: (b)lob (q)ueue (t)able. Can be combined.' - - name: --interval - summary: Filter the set of metrics to retrieve by time interval -- command: - name: storage metrics update - summary: Update metrics settings for a storage account. - arguments: - - name: --services - summary: 'The storage services from which to retrieve metrics info: (b)lob (q)ueue (t)able. Can be combined.' - - name: --hour - summary: Update the hourly metrics - - name: --minute - summary: Update the by-minute metrics - - name: --api - summary: Specify whether to include API in metrics. Applies to both hour and minute metrics if both are specified. Must be specified if hour or minute metrics are enabled and being updated. - - name: --retention - summary: Number of days for which to retain metrics. 0 to disable. Applies to both hour and minute metrics if both are specified. -- group: - name: storage queue - summary: Manage storage queues. -- command: - name: storage queue list - summary: List queues in a storage account. -- group: - name: storage queue metadata - summary: Manage the metadata for a storage queue. -- group: - name: storage queue policy - summary: Manage shared access policies for a storage queue. -- group: - name: storage share - summary: Manage file shares. -- command: - name: storage share url - summary: Create a URI to access a file share. -- command: - name: storage share exists - summary: Check for the existence of a file share. -- command: - name: storage share list - summary: List the file shares in a storage account. -- group: - name: storage share metadata - summary: Manage the metadata of a file share. -- group: - name: storage share policy - summary: Manage shared access policies of a storage file share. -- command: - name: storage share create - summary: Creates a new share under the specified account. -- group: - name: storage table - summary: Manage NoSQL key-value storage. -- command: - name: storage table list - summary: List tables in a storage account. -- group: - name: storage table policy - summary: Manage shared access policies of a storage table. -- group: - name: storage account network-rule - summary: Manage network rules. -- command: - name: storage account network-rule add - summary: Add a network rule. - description: > - Rules can be created for an IPv4 address, address range (CIDR format), or a virtual network subnet. - examples: - - summary: Create a rule to allow a specific address-range. - command: az storage account network-rule add -g myRg --account-name mystorageaccount --ip-address 23.45.1.0/24 - - summary: Create a rule to allow access for a subnet. - command: az storage account network-rule add -g myRg --account-name mystorageaccount --vnet myvnet --subnet mysubnet -- command: - name: storage account network-rule list - summary: List network rules. -- command: - name: storage account network-rule remove - summary: Remove a network rule. -- command: - name: storage account generate-sas - arguments: - - name: --services - summary: 'The storage services the SAS is applicable for. Allowed values: (b)lob (f)ile (q)ueue (t)able. Can be combined.' - - name: --resource-types - summary: 'The resource types the SAS is applicable for. Allowed values: (s)ervice (c)ontainer (o)bject. Can be combined.' - - name: --expiry - summary: Specifies the UTC datetime (Y-m-d'T'H:M'Z') at which the SAS becomes invalid. - - name: --start - summary: Specifies the UTC datetime (Y-m-d'T'H:M'Z') at which the SAS becomes valid. Defaults to the time of the request. - - name: --account-name - summary: 'Storage account name. Must be used in conjunction with either storage account key or a SAS token. Environment Variable: AZURE_STORAGE_ACCOUNT' - examples: - - summary: Generate a sas token for the account that is valid for queue and table services on Linux. - command: | - end=`date -d "30 minutes" '+%Y-%m-%dT%H:%MZ'` - az storage account generate-sas --permissions cdlruwap --account-name MyStorageAccount --services qt --resource-types sco --expiry $end -otsv - - summary: Generate a sas token for the account that is valid for queue and table services on MacOS. - command: | - end=`date -v+30M '+%Y-%m-%dT%H:%MZ'` - az storage account generate-sas --permissions cdlruwap --account-name MyStorageAccount --services qt --resource-types sco --expiry $end -otsv -- command: - name: storage container generate-sas - examples: - - summary: Generate a sas token for blob container and use it to upload a blob. - command: | - end=`date -d "30 minutes" '+%Y-%m-%dT%H:%MZ'` - sas=`az storage container generate-sas -n MyContainer --account-name MyStorageAccount --https-only --permissions dlrw --expiry $end -otsv` - az storage blob upload -n MyBlob -c MyContainer --account-name MyStorageAccount -f file.txt --sas-token $sas -- command: - name: storage blob generate-sas - examples: - - summary: Generate a sas token for a blob with read-only permissions. - command: | - end=`date -d "30 minutes" '+%Y-%m-%dT%H:%MZ'` - az storage blob generate-sas --account-name MyStorageAccount -c MyContainer -n MyBlob --permissions r --expiry $end --https-only -- command: - name: storage share generate-sas - examples: - - summary: Generate a sas token for a fileshare and use it to upload a file. - command: | - end=`date -d "30 minutes" '+%Y-%m-%dT%H:%MZ'` - sas=`az storage share generate-sas -n MyShare --account-name MyStorageAccount --https-only --permissions dlrw --expiry $end -otsv` - az storage file upload -s MyShare --account-name MyStorageAccount --source file.txt --sas-token $sas -- command: - name: storage file generate-sas - examples: - - summary: Generate a sas token for a file. - command: | - end=`date -d "30 minutes" '+%Y-%m-%dT%H:%MZ'` - az storage file generate-sas -p path/file.txt -s MyShare --account-name MyStorageAccount --permissions rcdw --https-only --expiry $end -- command: - name: storage blob url - summary: Create the url to access a blob. -- command: - name: storage file url - summary: Create the url to access a file. diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_help.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_help.py index dea044a9ade..36174d89a21 100644 --- a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_help.py +++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_help.py @@ -488,40 +488,6 @@ {0} """.format(vm_ids_example.format('Get diagnostics logs for all VMs in a resource group.', boot_diagnostics_log, '')) -helps['acs'] = """ - type: group - short-summary: Manage Azure Container Services. -""" - -helps['acs create'] = """ - type: command - short-summary: Create a container service. - examples: - - name: Create a Kubernetes container service and generate SSH keys to connect to it. - text: > - az acs create -g MyResourceGroup -n MyContainerService --orchestrator-type kubernetes --generate-ssh-keys -""" - -helps['acs delete'] = """ - type: command - short-summary: Delete a container service. -""" - -helps['acs list'] = """ - type: command - short-summary: List container services. -""" - -helps['acs show'] = """ - type: command - short-summary: Get the details for a container service. -""" - -helps['acs scale'] = """ - type: command - short-summary: Change the private agent count of a container service. -""" - helps['vm diagnostics'] = """ type: group short-summary: Configure the Azure Virtual Machine diagnostics extension. diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/help.yaml b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/help.yaml deleted file mode 100644 index 5949bab2c08..00000000000 --- a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/help.yaml +++ /dev/null @@ -1,1323 +0,0 @@ -version: 1 -content: -- group: - name: vm secret - summary: Manage VM secrets. -- command: - name: vm secret add - summary: Add a secret to a VM. -- command: - name: vm secret list - summary: List secrets on a VM. -- command: - name: vm secret remove - summary: Remove a secret from a VM. -- command: - name: vm secret format - summary: Transform secrets into a form that can be used by VMs and VMSSes. - arguments: - - name: --secrets - description: > - The command will attempt to resolve the vault ID for each secret. If it is unable to do so, - specify the vault ID to use for *all* secrets using: --keyvault NAME --resource-group NAME | --keyvault ID. - examples: - - summary: Create a self-signed certificate with the default policy, and add it to a virtual machine. - command: > - az keyvault certificate create --vault-name vaultname -n cert1 \ - -p "$(az keyvault certificate get-default-policy)" - - secrets=$(az keyvault secret list-versions --vault-name vaultname \ - -n cert1 --query "[?attributes.enabled].id" -o tsv) - - vm_secrets=$(az vm secret format -s "$secrets") - - az vm create -g group-name -n vm-name --admin-username deploy \ - --image debian --secrets "$vm_secrets" -- command: - name: vm create - summary: Create an Azure Virtual Machine. - description: For an end-to-end tutorial, see https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-quick-create-cli. - arguments: - - name: --image - summary: > - The name of the operating system image as a URN alias, URN, custom image name or ID, or VHD blob URI. - This parameter is required unless using `--attach-os-disk.` Valid URN format: "Publisher:Offer:Sku:Version". - value-sources: - - link: - command: az vm image list - - link: - command: az vm image show - - name: --ssh-key-value - summary: The SSH public key or public key file path. - examples: - - summary: Create a default Ubuntu VM with automatic SSH authentication. - command: > - az vm create -n MyVm -g MyResourceGroup --image UbuntuLTS - - summary: Create a default RedHat VM with automatic SSH authentication using an image URN. - command: > - az vm create -n MyVm -g MyResourceGroup --image RedHat:RHEL:7-RAW:7.4.2018010506 - - summary: Create a default Windows Server VM with a private IP address. - command: > - az vm create -n MyVm -g MyResourceGroup --public-ip-address "" --image Win2012R2Datacenter - - summary: Create a VM from a custom managed image. - command: > - az vm create -g MyResourceGroup -n MyVm --image MyImage - - summary: Create a VM by attaching to a managed operating system disk. - command: > - az vm create -g MyResourceGroup -n MyVm --attach-os-disk MyOsDisk --os-type linux - - summary: 'Create an Ubuntu Linux VM using a cloud-init script for configuration. See: https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init.' - command: > - az vm create -g MyResourceGroup -n MyVm --image debian --custom-data MyCloudInitScript.yml - - summary: Create a Debian VM with SSH key authentication and a public DNS entry, located on an existing virtual network and availability set. - command: | - az vm create -n MyVm -g MyResourceGroup --image debian --vnet-name MyVnet --subnet subnet1 \ - --availability-set MyAvailabilitySet --public-ip-address-dns-name MyUniqueDnsName \ - --ssh-key-value @key-file - - summary: Create a simple Ubuntu Linux VM with a public IP address, DNS entry, two data disks (10GB and 20GB), and then generate ssh key pairs. - command: | - az vm create -n MyVm -g MyResourceGroup --public-ip-address-dns-name MyUniqueDnsName \ - --image ubuntults --data-disk-sizes-gb 10 20 --size Standard_DS2_v2 \ - --generate-ssh-keys - - summary: Create a Debian VM using Key Vault secrets. - command: > - az keyvault certificate create --vault-name vaultname -n cert1 \ - -p "$(az keyvault certificate get-default-policy)" - - secrets=$(az keyvault secret list-versions --vault-name vaultname \ - -n cert1 --query "[?attributes.enabled].id" -o tsv) - - vm_secrets=$(az vm secret format -s "$secrets") - - - az vm create -g group-name -n vm-name --admin-username deploy \ - --image debian --secrets "$vm_secrets" - - summary: Create a CentOS VM with a system assigned identity. The VM will have a 'Contributor' role with access to a storage account. - command: > - az vm create -n MyVm -g rg1 --image centos --assign-identity --scope /subscriptions/99999999-1bf0-4dda-aec3-cb9272f09590/MyResourceGroup/myRG/providers/Microsoft.Storage/storageAccounts/storage1 - - summary: Create a debian VM with a user assigned identity. - command: > - az vm create -n MyVm -g rg1 --image debian --assign-identity /subscriptions/99999999-1bf0-4dda-aec3-cb9272f09590/resourcegroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myID - - summary: Create a debian VM with both system and user assigned identity. - command: > - az vm create -n MyVm -g rg1 --image debian --assign-identity [system] /subscriptions/99999999-1bf0-4dda-aec3-cb9272f09590/resourcegroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myID - - summary: Create a VM in an availability zone in the current resource group's region - command: > - az vm create -n MyVm -g MyResourceGroup --image Centos --zone 1 - min_profile: latest -- command: - name: vmss create - summary: Create an Azure Virtual Machine Scale Set. - description: For an end-to-end tutorial, see https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-linux-create-cli. - arguments: - - name: --image - summary: > - The name of the operating system image as a URN alias, URN, custom image name or ID, or VHD blob URI. - Valid URN format: "Publisher:Offer:Sku:Version". - value-sources: - - link: - command: az vm image list - - link: - command: az vm image show - examples: - - summary: Create a Windows VM scale set with 5 instances, a load balancer, a public IP address, and a 2GB data disk. - command: > - az vmss create -n MyVmss -g MyResourceGroup --instance-count 5 --image Win2016Datacenter --data-disk-sizes-gb 2 - - summary: Create a Linux VM scale set with an auto-generated ssh key pair, a public IP address, a DNS entry, an existing load balancer, and an existing virtual network. - command: | - az vmss create -n MyVmss -g MyResourceGroup --public-ip-address-dns-name my-globally-dns-name \ - --load-balancer MyLoadBalancer --vnet-name MyVnet --subnet MySubnet --image UbuntuLTS \ - --generate-ssh-keys - - summary: Create a Linux VM scale set from a custom image using the default existing public SSH key. - command: > - az vmss create -n MyVmss -g MyResourceGroup --image MyImage - - summary: Create a Linux VM scale set with a load balancer and custom DNS servers. Each VM has a public-ip address and a custom domain name. - command: > - az vmss create -n MyVmss -g MyResourceGroup --image centos \ - --public-ip-per-vm --vm-domain-name myvmss --dns-servers 10.0.0.6 10.0.0.5 - - summary: 'Create a Linux VM scale set using a cloud-init script for configuration. See: https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init' - command: > - az vmss create -g MyResourceGroup -n MyVmss --image debian --custom-data MyCloudInitScript.yml - - summary: Create a Debian VM scaleset using Key Vault secrets. - command: > - az keyvault certificate create --vault-name vaultname -n cert1 \ - -p "$(az keyvault certificate get-default-policy)" - - secrets=$(az keyvault secret list-versions --vault-name vaultname \ - -n cert1 --query "[?attributes.enabled].id" -o tsv) - - vm_secrets=$(az vm secret format -s "$secrets") - - - az vmss create -g group-name -n vm-name --admin-username deploy \ - --image debian --secrets "$vm_secrets" - - summary: Create a VM scaleset with system assigned identity. The VM will have a 'Contributor' Role with access to a storage account. - command: > - az vmss create -n MyVmss -g MyResourceGroup --image centos --assign-identity --scope /subscriptions/99999999-1bf0-4dda-aec3-cb9272f09590/MyResourceGroup/myRG/providers/Microsoft.Storage/storageAccounts/storage1 - - summary: Create a debian VM scaleset with a user assigned identity. - command: > - az vmss create -n MyVmss -g rg1 --image debian --assign-identity /subscriptions/99999999-1bf0-4dda-aec3-cb9272f09590/resourcegroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myID - - summary: Create a debian VM scaleset with both system and user assigned identity. - command: > - az vmss create -n MyVmss -g rg1 --image debian --assign-identity [system] /subscriptions/99999999-1bf0-4dda-aec3-cb9272f09590/resourcegroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myID - - summary: Create a single zone VM scaleset in the current resource group's region - command: > - az vmss create -n MyVmss -g MyResourceGroup --image Centos --zones 1 - min_profile: latest -- command: - name: vm availability-set create - summary: Create an Azure Availability Set. - description: For more information, see https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-manage-availability. - examples: - - summary: Create an availability set. - command: az vm availability-set create -n MyAvSet -g MyResourceGroup --platform-fault-domain-count 2 --platform-update-domain-count 2 -- command: - name: vm availability-set update - summary: Update an Azure Availability Set. - examples: - - summary: Update an availability set. - command: az vm availability-set update -n MyAvSet -g MyResourceGroup - - summary: Update an availability set tag. - command: az vm availability-set update -n MyAvSet -g MyResourceGroup --set tags.foo=value - - summary: Remove an availability set tag. - command: az vm availability-set update -n MyAvSet -g MyResourceGroup --remove tags.foo -- command: - name: vm availability-set convert - summary: Convert an Azure Availability Set to contain VMs with managed disks. - examples: - - summary: Convert an availabiity set to use managed disks by name. - command: az vm availability-set convert -g MyResourceGroup -n MyAvSet - - summary: Convert an availability set to use managed disks by ID. - command: > - az vm availability-set convert --ids $(az vm availability-set list -g MyResourceGroup --query "[].id" -o tsv) -- command: - name: vm extension set - summary: Set extensions for a VM. - description: Get extension details from `az vm extension image list`. - arguments: - - name: --name - value-sources: - - link: - command: az vm extension image list - examples: - - summary: Add a user account to a Linux VM. - command: | - az vm extension set -n VMAccessForLinux --publisher Microsoft.OSTCExtensions --version 1.4 \ - --vm-name MyVm --resource-group MyResourceGroup \ - --protected-settings '{"username":"user1", "ssh_key":"ssh_rsa ..."}' -- command: - name: vm extension wait - summary: Place the CLI in a waiting state until a condition of a virtual machine extension is met. -- command: - name: vm availability-set delete - summary: Delete an availability set. - examples: - - summary: Delete an availability set. - command: az vm availability-set delete -n MyAvSet -g MyResourceGroup -- command: - name: vm availability-set list - summary: List availability sets. - examples: - - summary: List availability sets. - command: az vm availability-set list -g MyResourceGroup -- command: - name: vm availability-set list-sizes - summary: List VM sizes for an availability set. - examples: - - summary: List VM sizes for an availability set. - command: az vm availability-set list-sizes -n MyAvSet -g MyResourceGroup -- command: - name: vm availability-set show - summary: Get information for an availability set. - examples: - - summary: Get information about an availability set. - command: az vm availability-set show -n MyAvSet -g MyResourceGroup -- command: - name: vm update - summary: Update the properties of a VM. - description: Update VM objects and properties using paths that correspond to 'az vm show'. - examples: - - summary: Add or update a tag. - command: az vm update -n name -g group --set tags.tagName=tagValue - - summary: Remove a tag. - command: az vm update -n name -g group --remove tags.tagName - - summary: Set the primary NIC of a VM. - command: az vm update -n name -g group --set networkProfile.networkInterfaces[1].primary=false networkProfile.networkInterfaces[0].primary=true - - summary: Add a new non-primary NIC to a VM. - command: az vm update -n name -g group --add networkProfile.networkInterfaces primary=false id= - - summary: Remove the fourth NIC from a VM. - command: az vm update -n name -g group --remove networkProfile.networkInterfaces 3 -- command: - name: vmss deallocate - summary: Deallocate VMs within a VMSS. -- command: - name: vmss delete-instances - summary: Delete VMs within a VMSS. -- command: - name: vmss get-instance-view - summary: View an instance of a VMSS. - arguments: - - name: --instance-id - summary: A VM instance ID or "*" to list instance view for all VMs in a scale set. -- command: - name: vmss list - summary: List VMSS. -- command: - name: vmss reimage - summary: Reimage VMs within a VMSS. - arguments: - - name: --instance-id - summary: VM instance ID. If missing, reimage all instances. -- command: - name: vmss restart - summary: Restart VMs within a VMSS. -- command: - name: vmss scale - summary: Change the number of VMs within a VMSS. - arguments: - - name: --new-capacity - summary: Number of VMs in the VMSS. -- command: - name: vmss show - summary: Get details on VMs within a VMSS. - arguments: - - name: --instance-id - summary: VM instance ID. If missing, show the VMSS. -- command: - name: vmss start - summary: Start VMs within a VMSS. -- command: - name: vmss stop - summary: Power off (stop) VMs within a VMSS. - description: The VMs will continue to be billed. To avoid this, you can deallocate VM instances within a VMSS through "az vmss deallocate" -- command: - name: vmss update - summary: Update a VMSS. -- command: - name: vmss update-instances - summary: Upgrade VMs within a VMSS. -- command: - name: vmss wait - summary: Place the CLI in a waiting state until a condition of a scale set is met. -- group: - name: vmss disk - summary: Manage data disks of a VMSS. -- command: - name: vmss disk attach - summary: Attach managed data disks to a scale set or its instances. -- command: - name: vmss disk detach - summary: Detach managed data disks from a scale set or its instances. -- group: - name: vmss nic - summary: Manage network interfaces of a VMSS. -- group: - name: vmss rolling-upgrade - summary: (PREVIEW) Manage rolling upgrades. -- command: - name: vm convert - summary: Convert a VM with unmanaged disks to use managed disks. - examples: - - summary: Convert a VM with unmanaged disks to use managed disks. - command: az vm convert -g MyResourceGroup -n MyVm - - summary: Convert all VMs with unmanaged disks in a resource group to use managed disks. - command: > - az vm convert --ids $(az vm list -g MyResourceGroup --query "[].id" -o tsv) -- group: - name: vm - summary: Manage Linux or Windows virtual machines. -- group: - name: vm user - summary: Manage user accounts for a VM. -- command: - name: vm user delete - summary: Delete a user account from a VM. - examples: - - summary: Delete a user account. - command: az vm user delete -u username -n MyVm -g MyResourceGroup - - summary: Delete a user on all VMs in a resource group. - command: > - az vm user delete -u username --ids $(az vm list -g MyResourceGroup --query "[].id" -o tsv) -- command: - name: vm user reset-ssh - summary: Reset the SSH configuration on a VM. - description: > - The extension will restart the SSH service, open the SSH port on your VM, and reset the SSH configuration to default values. The user account (name, password, and SSH keys) are not changed. - examples: - - summary: Reset the SSH configuration. - command: az vm user reset-ssh -n MyVm -g MyResourceGroup - - summary: Reset the SSH server on all VMs in a resource group. - command: > - az vm user reset-ssh --ids $(az vm list -g MyResourceGroup --query "[].id" -o tsv) -- command: - name: vm user update - summary: Update a user account. - arguments: - - name: --ssh-key-value - summary: SSH public key file value or public key file path - examples: - - summary: Update a Windows user account. - command: az vm user update -u username -p password -n MyVm -g MyResourceGroup - - summary: Update a Linux user account. - command: az vm user update -u username --ssh-key-value "$(< ~/.ssh/id_rsa.pub)" -n MyVm -g MyResourceGroup - - summary: Update a user on all VMs in a resource group. - command: > - az vm user update -u username --ssh-key-value "$(< ~/.ssh/id_rsa.pub)" --ids $(az vm list -g MyResourceGroup --query "[].id" -o tsv) -- group: - name: vm availability-set - summary: Group resources into availability sets. - description: > - To provide redundancy to an application, it is recommended to group two or more virtual machines in an availability set. - This configuration ensures that during either a planned or unplanned maintenance event, at least one virtual machine - will be available. -- group: - name: vm boot-diagnostics - summary: Troubleshoot the startup of an Azure Virtual Machine. - description: Use this feature to troubleshoot boot failures for custom or platform images. -- command: - name: vm boot-diagnostics disable - summary: Disable the boot diagnostics on a VM. - examples: - - summary: Disable boot diagnostics on all VMs in a resource group. - command: > - az vm boot-diagnostics disable --ids $(az vm list -g MyResourceGroup --query "[].id" -o tsv) -- command: - name: vm boot-diagnostics enable - summary: Enable the boot diagnostics on a VM. - arguments: - - name: --storage - summary: Name or URI of a storage account (e.g. https://your_storage_account_name.blob.core.windows.net/) - examples: - - summary: Enable boot diagnostics on all VMs in a resource group. - command: > - az vm boot-diagnostics enable --storage https://mystor.blob.core.windows.net/ --ids $(az vm list -g MyResourceGroup --query "[].id" -o tsv) -- command: - name: vm boot-diagnostics get-boot-log - summary: Get the boot diagnostics log from a VM. - examples: - - summary: Get diagnostics logs for all VMs in a resource group. - command: > - az vm boot-diagnostics get-boot-log --ids $(az vm list -g MyResourceGroup --query "[].id" -o tsv) -- group: - name: acs - summary: Manage Azure Container Services. -- command: - name: acs create - summary: Create a container service. - examples: - - summary: Create a Kubernetes container service and generate SSH keys to connect to it. - command: > - az acs create -g MyResourceGroup -n MyContainerService --orchestrator-type kubernetes --generate-ssh-keys -- command: - name: acs delete - summary: Delete a container service. -- command: - name: acs list - summary: List container services. -- command: - name: acs show - summary: Get the details for a container service. -- command: - name: acs scale - summary: Change the private agent count of a container service. -- group: - name: vm diagnostics - summary: Configure the Azure Virtual Machine diagnostics extension. -- command: - name: vm diagnostics get-default-config - summary: Get the default configuration settings for a VM. - examples: - - summary: Get the default diagnostics for a Linux VM and override the storage account name and the VM resource ID. - command: | - az vm diagnostics get-default-config \ - | sed "s#__DIAGNOSTIC_STORAGE_ACCOUNT__#MyStorageAccount#g" \ - | sed "s#__VM_OR_VMSS_RESOURCE_ID__#MyVmResourceId#g" - - summary: Get the default diagnostics for a Windows VM. - command: > - az vm diagnostics get-default-config --is-windows-os -- command: - name: vm diagnostics set - summary: Configure the Azure VM diagnostics extension. - examples: - - summary: Set up default diagnostics on a Linux VM for Azure Portal VM metrics graphs and syslog collection. - command: | - # Set the following 3 parameters first. - my_resource_group= - my_linux_vm= - my_diagnostic_storage_account= - - my_vm_resource_id=$(az vm show -g $my_resource_group -n $my_linux_vm --query "id" -o tsv) - - default_config=$(az vm diagnostics get-default-config \ - | sed "s#__DIAGNOSTIC_STORAGE_ACCOUNT__#$my_diagnostic_storage_account#g" \ - | sed "s#__VM_OR_VMSS_RESOURCE_ID__#$my_vm_resource_id#g") - - storage_sastoken=$(az storage account generate-sas \ - --account-name $my_diagnostic_storage_account --expiry 2037-12-31T23:59:00Z \ - --permissions wlacu --resource-types co --services bt -o tsv) - - protected_settings="{'storageAccountName': '$my_diagnostic_storage_account', \ - 'storageAccountSasToken': '$storage_sastoken'}" - - az vm diagnostics set --settings "$default_config" \ - --protected-settings "$protected_settings" \ - --resource-group $my_resource_group --vm-name $my_linux_vm - - summary: Set up default diagnostics on a Windows VM. - command: | - # Set the following 3 parameters first. - my_resource_group= - my_windows_vm= - my_diagnostic_storage_account= - - my_vm_resource_id=$(az vm show -g $my_resource_group -n $my_windows_vm --query "id" -o tsv) - - default_config=$(az vm diagnostics get-default-config --is-windows-os \ - | sed "s#__DIAGNOSTIC_STORAGE_ACCOUNT__#$my_diagnostic_storage_account#g" \ - | sed "s#__VM_OR_VMSS_RESOURCE_ID__#$my_vm_resource_id#g") - - # Please use the same options, the WAD diagnostic extension has strict - # expectations of the sas token's format. Set the expiry as desired. - storage_sastoken=$(az storage account generate-sas \ - --account-name $my_diagnostic_storage_account --expiry 2037-12-31T23:59:00Z \ - --permissions acuw --resource-types co --services bt --https-only --output tsv) - - protected_settings="{'storageAccountName': '$my_diagnostic_storage_account', \ - 'storageAccountSasToken': '$storage_sastoken'}" - - az vm diagnostics set --settings "$default_config" \ - --protected-settings "$protected_settings" \ - --resource-group $my_resource_group --vm-name $my_windows_vm - - # # Alternatively, if the WAD extension has issues parsing the sas token, - # # one can use a storage account key instead. - storage_account_key=$(az storage account keys list --account-name {my_storage_account} \ - --query [0].value -o tsv) - protected_settings="{'storageAccountName': '$my_diagnostic_storage_account', \ - 'storageAccountKey': '$storage_account_key'}" -- group: - name: vm disk - summary: Manage the managed data disks attached to a VM. - description: >2 - - Azure Virtual Machines use disks as a place to store an operating system, applications, and data. - All Azure virtual machines have at least two disks: An operating system disk, and a temporary disk. - The operating system disk is created from an image, and both the operating system disk and the image are actually virtual hard disks (VHDs) - stored in an Azure storage account. Virtual machines also can have one or more data disks, that are also stored as VHDs. - - - Azure Managed and Unmanaged Data Disks have a maximum size of 4095 GB (with the exception of larger disks in preview). Azure Unmanaged Disks also have a maximum capacity of 4095 GB. - - - For more information, see: - - - Azure Disks - https://docs.microsoft.com/en-us/azure/virtual-machines/linux/about-disks-and-vhds and https://docs.microsoft.com/en-us/azure/virtual-machines/windows/about-disks-and-vhds. - - - Larger Managed Disks in Public Preview - https://azure.microsoft.com/en-us/blog/introducing-the-public-preview-of-larger-managed-disks-sizes/ - - - Ultra SSD Managed Disks in Public Preview - https://docs.microsoft.com/en-us/azure/virtual-machines/windows/disks-ultra-ssd -- group: - name: vm unmanaged-disk - summary: Manage the unmanaged data disks attached to a VM. - description: >2 - - Azure Virtual Machines use disks as a place to store an operating system, applications, and data. - All Azure virtual machines have at least two disks: An operating system disk, and a temporary disk. - The operating system disk is created from an image, and both the operating system disk and the image are actually virtual hard disks (VHDs) - stored in an Azure storage account. Virtual machines also can have one or more data disks, that are also stored as VHDs. - - - Azure Managed and Unmanaged Data Disks have a maximum size of 4095 GB (with the exception of larger disks in preview). Azure Unmanaged Disks also have a maximum capacity of 4095 GB. - - - For more information, see: - - - Azure Disks - https://docs.microsoft.com/en-us/azure/virtual-machines/linux/about-disks-and-vhds and https://docs.microsoft.com/en-us/azure/virtual-machines/windows/about-disks-and-vhds. - - - Larger Managed Disks in Public Preview - https://azure.microsoft.com/en-us/blog/introducing-the-public-preview-of-larger-managed-disks-sizes/ - - - Ultra SSD Managed Disks in Public Preview - https://docs.microsoft.com/en-us/azure/virtual-machines/windows/disks-ultra-ssd -- command: - name: vm unmanaged-disk attach - summary: Attach an unmanaged persistent disk to a VM. - description: This allows for the preservation of data, even if the VM is reprovisioned due to maintenance or resizing. - examples: - - summary: Attach a new default sized (1023 GB) unmanaged data disk to a VM. - command: az vm unmanaged-disk attach -g MyResourceGroup --vm-name MyVm --new - - summary: Attach an existing data disk to a VM as unmanaged. - command: > - az vm unmanaged-disk attach -g MyResourceGroup --vm-name MyVm \ - --vhd-uri https://mystorage.blob.core.windows.net/vhds/d1.vhd -- command: - name: vm unmanaged-disk detach - summary: Detach an unmanaged disk from a VM. - examples: - - summary: Detach a data disk from a VM. - command: > - az vm unmanaged-disk detach -g MyResourceGroup --vm-name MyVm -n disk_name -- command: - name: vm unmanaged-disk list - summary: List unmanaged disks of a VM. - examples: - - summary: List the unmanaged disks attached to a VM. - command: az vm unmanaged-disk list -g MyResourceGroup --vm-name MyVm - - summary: List unmanaged disks with names containing the string "data_disk". - command: > - az vm unmanaged-disk list -g MyResourceGroup --vm-name MyVm \ - --query "[?contains(name, 'data_disk')]" --output table -- command: - name: vm disk detach - summary: Detach a managed disk from a VM. - examples: - - summary: Detach a data disk from a VM. - command: > - az vm disk detach -g MyResourceGroup --vm-name MyVm --name disk_name -- command: - name: vm disk attach - summary: Attach a managed persistent disk to a VM. - description: This allows for the preservation of data, even if the VM is reprovisioned due to maintenance or resizing. - examples: - - summary: Attach a new default sized (1023 GB) managed data disk to a VM. - command: az vm disk attach -g MyResourceGroup --vm-name MyVm --name disk_name --new -- group: - name: vm encryption - summary: Manage encryption of VM disks. -- command: - name: vm encryption enable - summary: Enable disk encryption on the OS disk and/or data disks. - arguments: - - name: --aad-client-id - summary: Client ID of an AAD app with permissions to write secrets to the key vault. - - name: --aad-client-secret - summary: Client secret of the AAD app with permissions to write secrets to the key vault. - - name: --aad-client-cert-thumbprint - summary: Thumbprint of the AAD app certificate with permissions to write secrets to the key vault. -- command: - name: vm encryption disable - summary: Disable disk encryption on the OS disk and/or data disks. -- command: - name: vm encryption show - summary: Show encryption status. -- group: - name: vm extension - summary: Manage extensions on VMs. - description: > - Extensions are small applications that provide post-deployment configuration and automation tasks on Azure virtual machines. - For example, if a virtual machine requires software installation, anti-virus protection, or Docker configuration, a VM extension - can be used to complete these tasks. Extensions can be bundled with a new virtual machine deployment or run against any existing system. -- command: - name: vm extension list - summary: List the extensions attached to a VM. - examples: - - summary: List attached extensions to a named VM. - command: az vm extension list -g MyResourceGroup --vm-name MyVm -- command: - name: vm extension delete - summary: Remove an extension attached to a VM. - examples: - - summary: Use a VM name and extension to delete an extension from a VM. - command: az vm extension delete -g MyResourceGroup --vm-name MyVm -n extension_name - - summary: Delete extensions with IDs containing the string "MyExtension" from a VM. - command: > - az vm extension delete --ids \ - $(az resource list --query "[?contains(name, 'MyExtension')].id" -o tsv) -- command: - name: vm extension show - summary: Display information about extensions attached to a VM. - examples: - - summary: Use VM name and extension name to show the extensions attached to a VM. - command: az vm extension show -g MyResourceGroup --vm-name MyVm -n extension_name -- group: - name: vm extension image - summary: Find the available VM extensions for a subscription and region. -- command: - name: vm extension image list - summary: List the information on available extensions. - examples: - - summary: List the unique publishers for extensions. - command: az vm extension image list --query "[].publisher" -o tsv | sort -u - - summary: Find extensions with "Docker" in the name. - command: az vm extension image list --query "[].name" -o tsv | sort -u | grep Docker - - summary: List extension names where the publisher name starts with "Microsoft.Azure.App". - command: | - az vm extension image list --query \ - "[?starts_with(publisher, 'Microsoft.Azure.App')].publisher" \ - -o tsv | sort -u | xargs -I{} az vm extension image list-names --publisher {} -l westus -- command: - name: vm extension image list-names - summary: List the names of available extensions. - examples: - - summary: Find Docker extensions by publisher and location. - command: > - az vm extension image list-names --publisher Microsoft.Azure.Extensions \ - -l westus --query "[?starts_with(name, 'Docker')]" - - summary: Find CustomScript extensions by publisher and location. - command: > - az vm extension image list-names --publisher Microsoft.Azure.Extensions \ - -l westus --query "[?starts_with(name, 'Custom')]" -- command: - name: vm extension image list-versions - summary: List the versions for available extensions. - examples: - - summary: Find the available versions for the Docker extension. - command: > - az vm extension image list-versions --publisher Microsoft.Azure.Extensions \ - -l westus -n DockerExtension -otable -- command: - name: vm extension image show - summary: Display information for an extension. - examples: - - summary: Show the CustomScript extension version 2.0.2. - command: > - az vm extension image show -l westus -n CustomScript \ - --publisher Microsoft.Azure.Extensions --version 2.0.2 - - summary: Show the latest version of the Docker extension. - command: > - publisher=Microsoft.Azure.Extensions - - extension=DockerExtension - - location=westus - - - latest=$(az vm extension image list-versions \ - --publisher {publisher} -l {location} -n {extension} \ - --query "[].name" -o tsv | sort | tail -n 1) - - az vm extension image show -l {location} \ - --publisher {publisher} -n {extension} --version {latest} -- group: - name: vm image - summary: Information on available virtual machine images. -- command: - name: vm image list - summary: List the VM/VMSS images available in the Azure Marketplace. - arguments: - - name: --all - summary: Retrieve image list from live Azure service rather using an offline image list - - name: --offer - summary: Image offer name, partial name is accepted - - name: --publisher - summary: Image publisher name, partial name is accepted - - name: --sku - summary: Image sku name, partial name is accepted - examples: - - summary: List all available images. - command: az vm image list --all - - summary: List all offline cached CentOS images. - command: az vm image list -f CentOS - - summary: List all CentOS images. - command: az vm image list -f CentOS --all -- command: - name: vm image list-offers - summary: List the VM image offers available in the Azure Marketplace. - arguments: - - name: --publisher - value-sources: - - link: - command: az vm list-publishers - examples: - - summary: List all offers from Microsoft in the West US region. - command: az vm image list-offers -l westus -p MicrosoftWindowsServer - - summary: List all offers from OpenLocic in the West US region. - command: az vm image list-offers -l westus -p OpenLogic -- command: - name: vm image list-publishers - summary: List the VM image publishers available in the Azure Marketplace. - examples: - - summary: List all publishers in the West US region. - command: az vm image list-publishers -l westus - - summary: List all publishers with names starting with "Open" in westus. - command: az vm image list-publishers -l westus --query "[?starts_with(name, 'Open')]" -- command: - name: vm image list-skus - summary: List the VM image SKUs available in the Azure Marketplace. - arguments: - - name: --publisher - value-sources: - - link: - command: az vm list-publishers - examples: - - summary: List all skus available for CentOS published by OpenLogic in the West US region. - command: az vm image list-skus -l westus -f CentOS -p OpenLogic -- command: - name: vm image show - summary: Get the details for a VM image available in the Azure Marketplace. - examples: - - summary: Show information for the latest available CentOS image from OpenLogic. - command: > - latest=$(az vm image list -p OpenLogic -s 7.3 --all --query \ - "[?offer=='CentOS'].version" -o tsv | sort -u | tail -n 1) - az vm image show -l westus -f CentOS -p OpenLogic --sku 7.3 --version {latest} -- command: - name: vm image accept-terms - summary: Accept Azure Marketplace term so that the image can be used to create VMs -- group: - name: vm nic - summary: Manage network interfaces. See also `az network nic`. - description: > - A network interface (NIC) is the interconnection between a VM and the underlying software - network. For more information, see https://docs.microsoft.com/azure/virtual-network/virtual-network-network-interface-overview. -- command: - name: vm nic list - summary: List the NICs available on a VM. - examples: - - summary: List all of the NICs on a VM. - command: az vm nic list -g MyResourceGroup --vm-name MyVm -- command: - name: vm nic add - summary: Add existing NICs to a VM. - examples: - - summary: Add two NICs to a VM. - command: az vm nic add -g MyResourceGroup --vm-name MyVm --nics nic_name1 nic_name2 -- command: - name: vm nic remove - summary: Remove NICs from a VM. - examples: - - summary: Remove two NICs from a VM. - command: az vm nic remove -g MyResourceGroup --vm-name MyVm --nics nic_name1 nic_name2 -- command: - name: vm nic show - summary: Display information for a NIC attached to a VM. - examples: - - summary: Show details of a NIC on a VM. - command: az vm nic show -g MyResourceGroup --vm-name MyVm --nic nic_name1 -- command: - name: vm nic set - summary: Configure settings of a NIC attached to a VM. - examples: - - summary: Set a NIC on a VM to be the primary interface. - command: az vm nic set -g MyResourceGroup --vm-name MyVm --nic nic_name1 nic_name2 --primary-nic nic_name2 -- group: - name: vmss - summary: Manage groupings of virtual machines in an Azure Virtual Machine Scale Set (VMSS). -- group: - name: vmss diagnostics - summary: Configure the Azure Virtual Machine Scale Set diagnostics extension. -- command: - name: vmss diagnostics get-default-config - summary: Show the default config file which defines data to be collected. -- command: - name: vmss diagnostics set - summary: Enable diagnostics on a VMSS. -- command: - name: vmss list-instance-connection-info - summary: Get the IP address and port number used to connect to individual VM instances within a set. -- command: - name: vmss list-instance-public-ips - summary: List public IP addresses of VM instances within a set. -- group: - name: vmss extension - summary: Manage extensions on a VM scale set. -- command: - name: vmss extension delete - summary: Delete an extension from a VMSS. -- command: - name: vmss extension list - summary: List extensions associated with a VMSS. -- command: - name: vmss extension set - summary: Add an extension to a VMSS or update an existing extension. - description: Get extension details from `az vmss extension image list`. - arguments: - - name: --name - value-sources: - - link: - command: az vm extension image list - examples: - - summary: > - Set an extension which depends on two previously set extensions. That is, When a VMSS instance is - created or reimaged, the customScript extension will be provisioned only after all extensions that - it depends on have been provisioned. The extension need not depend on the other extensions for - pre-requisite configurations. - command: > - az vmss extension set --vmss-name my-vmss --name customScript --resource-group my-group \ - --version 2.0 --publisher Microsoft.Azure.Extensions \ - --provision-after-extensions NetworkWatcherAgentLinux VMAccessForLinux \ - --settings '{"commandToExecute": "echo testing"}' -- command: - name: vmss extension show - summary: Show details on a VMSS extension. -- group: - name: vmss extension image - summary: Find the available VM extensions for a subscription and region. -- command: - name: vmss extension image list - summary: List the information on available extensions. - examples: - - summary: List the unique publishers for extensions. - command: az vmss extension image list --query "[].publisher" -o tsv | sort -u - - summary: Find extensions with "Docker" in the name. - command: az vmss extension image list --query "[].name" -o tsv | sort -u | grep Docker - - summary: List extension names where the publisher name starts with "Microsoft.Azure.App". - command: | - az vmss extension image list --query \ - "[?starts_with(publisher, 'Microsoft.Azure.App')].publisher" \ - -o tsv | sort -u | xargs -I{} az vmss extension image list-names --publisher {} -l westus -- group: - name: vmss encryption - summary: (PREVIEW) Manage encryption of VMSS. -- command: - name: vmss encryption enable - summary: Encrypt a VMSS with managed disks. - examples: - - summary: encrypt a VM scale set using a key vault in the same resource group - command: > - az vmss encryption enable -g MyResourceGroup -n MyVm --disk-encryption-keyvault myvault -- command: - name: vmss encryption disable - summary: Disable the encryption on a VMSS with managed disks. - examples: - - summary: disable encryption a VMSS - command: > - az vmss encryption disable -g MyResourceGroup -n MyVm -- command: - name: vmss encryption show - summary: Show encryption status. -- command: - name: vm capture - summary: Capture information for a stopped VM. - description: For an end-to-end tutorial, see https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-capture-image - arguments: - - name: --vhd-name-prefix - summary: The VHD name prefix specify for the VM disks. - - name: --storage-container - summary: The storage account container name in which to save the disks. - - name: --overwrite - summary: Overwrite the existing disk file. - examples: - - summary: Deallocate, generalize, and capture a stopped virtual machine. - command: | - az vm deallocate -g MyResourceGroup -n MyVm - az vm generalize -g MyResourceGroup -n MyVm - az vm capture -g MyResourceGroup -n MyVm --vhd-name-prefix MyPrefix - - summary: Deallocate, generalize, and capture multiple stopped virtual machines. - command: | - vms_ids=$(az vm list -g MyResourceGroup --query "[].id" -o tsv) - az vm deallocate --ids {vms_ids} - az vm generalize --ids {vms_ids} - az vm capture --ids {vms_ids} --vhd-name-prefix MyPrefix -- command: - name: vm delete - summary: Delete a VM. - examples: - - summary: Delete a VM without a prompt for confirmation. - command: > - az vm delete -g MyResourceGroup -n MyVm --yes - - summary: Delete all VMs in a resource group. - command: > - az vm delete --ids $(az vm list -g MyResourceGroup --query "[].id" -o tsv) -- command: - name: vm deallocate - summary: Deallocate a VM. - description: For an end-to-end tutorial, see https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-capture-image - examples: - - summary: Deallocate, generalize, and capture a stopped virtual machine. - command: | - az vm deallocate -g MyResourceGroup -n MyVm - az vm generalize -g MyResourceGroup -n MyVm - az vm capture -g MyResourceGroup -n MyVm --vhd-name-prefix MyPrefix - - summary: Deallocate, generalize, and capture multiple stopped virtual machines. - command: | - vms_ids=$(az vm list -g MyResourceGroup --query "[].id" -o tsv) - az vm deallocate --ids {vms_ids} - az vm generalize --ids {vms_ids} - az vm capture --ids {vms_ids} --vhd-name-prefix MyPrefix -- command: - name: vm generalize - summary: Mark a VM as generalized, allowing it to be imaged for multiple deployments. - description: For an end-to-end tutorial, see https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-capture-image - examples: - - summary: Deallocate, generalize, and capture a stopped virtual machine. - command: | - az vm deallocate -g MyResourceGroup -n MyVm - az vm generalize -g MyResourceGroup -n MyVm - az vm capture -g MyResourceGroup -n MyVm --vhd-name-prefix MyPrefix - - summary: Deallocate, generalize, and capture multiple stopped virtual machines. - command: | - vms_ids=$(az vm list -g MyResourceGroup --query "[].id" -o tsv) - az vm deallocate --ids {vms_ids} - az vm generalize --ids {vms_ids} - az vm capture --ids {vms_ids} --vhd-name-prefix MyPrefix -- command: - name: vm get-instance-view - summary: Get instance information about a VM. - examples: - - summary: Use a resource group and name to get instance view information of a VM. - command: az vm get-instance-view -g MyResourceGroup -n MyVm - - summary: Get instance views for all VMs in a resource group. - command: > - az vm get-instance-view --ids $(az vm list -g MyResourceGroup --query "[].id" -o tsv) -- command: - name: vm list - summary: List details of Virtual Machines. - description: For more information on querying information about Virtual Machines, see https://docs.microsoft.com/en-us/cli/azure/query-az-cli2 - examples: - - summary: List all VMs. - command: az vm list - - summary: List all VMs by resource group. - command: az vm list -g MyResourceGroup - - summary: List all VMs by resource group with details. - command: az vm list -g MyResourceGroup -d -- command: - name: vm list-ip-addresses - summary: List IP addresses associated with a VM. - examples: - - summary: Get the IP addresses for a VM. - command: az vm list-ip-addresses -g MyResourceGroup -n MyVm - - summary: Get IP addresses for all VMs in a resource group. - command: > - az vm list-ip-addresses --ids $(az vm list -g MyResourceGroup --query "[].id" -o tsv) -- command: - name: vm list-sizes - summary: List available sizes for VMs. - examples: - - summary: List the available VM sizes in the West US region. - command: az vm list-sizes -l westus -- command: - name: vm list-usage - summary: List available usage resources for VMs. - examples: - - summary: Get the compute resource usage for the West US region. - command: az vm list-usage -l westus -- command: - name: vm list-vm-resize-options - summary: List available resizing options for VMs. - examples: - - summary: List all available VM sizes for resizing. - command: az vm list-vm-resize-options -g MyResourceGroup -n MyVm - - summary: List available sizes for all VMs in a resource group. - command: > - az vm list-vm-resize-options --ids $(az vm list -g MyResourceGroup --query "[].id" -o tsv) -- command: - name: vm list-skus - summary: Get details for compute-related resource SKUs. - description: This command incorporates subscription level restriction, offering the most accurate information. - examples: - - summary: List all SKUs in the West US region. - command: az vm list-skus -l westus - - summary: List all available vm sizes in the East US2 region which support availability zone. - command: az vm list-skus -l eastus2 --zone - - summary: List all available vm sizes in the East US2 region which support availability zone with name like "standard_ds1...". - command: az vm list-skus -l eastus2 --zone --size standard_ds1 - - summary: List availability set related sku information in The West US region. - command: az vm list-skus -l westus --resource-type availabilitySets -- command: - name: vm open-port - summary: Opens a VM to inbound traffic on specified ports. - description: > - Adds a security rule to the network security group (NSG) that is attached to the VM's - network interface (NIC) or subnet. The existing NSG will be used or a new one will be - created. The rule name is 'open-port-{port}' and will overwrite an existing rule with - this name. For multi-NIC VMs, or for more fine-grained control, use the appropriate - network commands directly (nsg rule create, etc). - examples: - - summary: Open all ports on a VM to inbound traffic. - command: az vm open-port -g MyResourceGroup -n MyVm --port '*' - - summary: Open a range of ports on a VM to inbound traffic with the highest priority. - command: az vm open-port -g MyResourceGroup -n MyVm --port 80-100 --priority 100 - - summary: Open all ports for all VMs in a resource group. - command: > - az vm open-port --ids $(az vm list -g MyResourceGroup --query "[].id" -o tsv) --port '*' -- command: - name: vm redeploy - summary: Redeploy an existing VM. - examples: - - summary: Redeploy a VM. - command: az vm redeploy -g MyResourceGroup -n MyVm - - summary: Redeploy all VMs in a resource group. - command: > - az vm redeploy --ids $(az vm list -g MyResourceGroup --query "[].id" -o tsv) -- command: - name: vm resize - summary: Update a VM's size. - arguments: - - name: --size - summary: The VM size. - value-sources: - - link: - command: az vm list-vm-resize-options - examples: - - summary: Resize a VM. - command: az vm resize -g MyResourceGroup -n MyVm --size Standard_DS3_v2 - - summary: Resize all VMs in a resource group. - command: > - az vm resize --size Standard_DS3_v2 --ids $(az vm list -g MyResourceGroup --query "[].id" -o tsv) -- command: - name: vm restart - summary: Restart VMs. - examples: - - summary: Restart a VM. - command: az vm restart -g MyResourceGroup -n MyVm - - summary: Restart all VMs in a resource group. - command: > - az vm restart --ids $(az vm list -g MyResourceGroup --query "[].id" -o tsv) -- command: - name: vm show - summary: Get the details of a VM. - examples: - - summary: Show information about a VM. - command: az vm show -g MyResourceGroup -n MyVm -d - - summary: Get the details for all VMs in a resource group. - command: > - az vm show -d --ids $(az vm list -g MyResourceGroup --query "[].id" -o tsv) -- command: - name: vm start - summary: Start a stopped VM. - examples: - - summary: Start a stopped VM. - command: az vm start -g MyResourceGroup -n MyVm - - summary: Start all VMs in a resource group. - command: > - az vm start --ids $(az vm list -g MyResourceGroup --query "[].id" -o tsv) -- command: - name: vm stop - summary: Power off (stop) a running VM. - description: The VM will continue to be billed. To avoid this, you can deallocate the VM through "az vm deallocate" - examples: - - summary: Power off (stop) a running VM. - command: az vm stop -g MyResourceGroup -n MyVm - - summary: Stop all VMs in a resource group. - command: > - az vm stop --ids $(az vm list -g MyResourceGroup --query "[].id" -o tsv) -- command: - name: vm wait - summary: Place the CLI in a waiting state until a condition of the VM is met. - examples: - - summary: Wait until a VM is created. - command: az vm wait -g MyResourceGroup -n MyVm --created - - summary: Wait until all VMs in a resource group are deleted. - command: > - az vm wait --deleted --ids $(az vm list -g MyResourceGroup --query "[].id" -o tsv) -- group: - name: vm identity - summary: manage service identities of a VM -- command: - name: vm identity assign - summary: Enable managed service identity on a VM. - description: This is required to authenticate and interact with other Azure services using bearer tokens. - examples: - - summary: Enable the system assigned identity on a VM with the 'Reader' role. - command: az vm identity assign -g MyResourceGroup -n MyVm --role Reader --scope /subscriptions/db5eb68e-73e2-4fa8-b18a-0123456789999/resourceGroups/MyResourceGroup - - summary: Enable the system assigned identity and a user assigned identity on a VM. - command: az vm identity assign -g MyResourceGroup -n MyVm --role Reader --identities [system] myAssignedId -- command: - name: vm identity remove - summary: Remove managed service identities from a VM. - examples: - - summary: Remove the system assigned identity - command: az vm identity remove -g MyResourceGroup -n MyVm - - summary: Remove a user assigned identity - command: az vm identity remove -g MyResourceGroup -n MyVm --identities readerId - - summary: Remove 2 identities which are in the same resource group with the VM - command: az vm identity remove -g MyResourceGroup -n MyVm --identities readerId writerId - - summary: Remove the system assigned identity and a user identity - command: az vm identity remove -g MyResourceGroup -n MyVm --identities [system] readerId -- command: - name: vm identity show - summary: display VM's managed identity info. -- group: - name: vm run-command - summary: Manage run commands on a Virtual Machine. - description: For more information, see https://docs.microsoft.com/en-us/azure/virtual-machines/windows/run-command or https://docs.microsoft.com/en-us/azure/virtual-machines/linux/run-command. -- command: - name: vm run-command invoke - summary: Execute a specific run command on a vm. - examples: - - summary: install nginx on a vm - command: az vm run-command invoke -g MyResourceGroup -n MyVm --command-id RunShellScript --scripts "sudo apt-get update && sudo apt-get install -y nginx" - - summary: invoke command with parameters - command: az vm run-command invoke -g MyResourceGroup -n MyVm --command-id RunShellScript --scripts 'echo $1 $2' --parameters hello world -- group: - name: vmss identity - summary: manage service identities of a VM scaleset. -- command: - name: vmss identity assign - summary: Enable managed service identity on a VMSS. - description: This is required to authenticate and interact with other Azure services using bearer tokens. - examples: - - summary: Enable system assigned identity on a VMSS with the 'Owner' role. - command: az vmss identity assign -g MyResourceGroup -n MyVmss --role Owner --scope /subscriptions/db5eb68e-73e2-4fa8-b18a-0123456789999/resourceGroups/MyResourceGroup -- command: - name: vmss identity remove - summary: (PREVIEW) Remove user assigned identities from a VM scaleset. - examples: - - summary: Remove system assigned identity - command: az vmss identity remove -g MyResourceGroup -n MyVmss - - summary: Remove 2 identities which are in the same resource group with the VM scaleset - command: az vmss identity remove -g MyResourceGroup -n MyVmss --identities readerId writerId - - summary: Remove system assigned identity and a user identity - command: az vmss identity remove -g MyResourceGroup -n MyVmss --identities [system] readerId -- command: - name: vmss identity show - summary: display VM scaleset's managed identity info. -- group: - name: disk - summary: Manage Azure Managed Disks. - description: >2 - - Azure Virtual Machines use disks as a place to store an operating system, applications, and data. - All Azure virtual machines have at least two disks: An operating system disk, and a temporary disk. - The operating system disk is created from an image, and both the operating system disk and the image are actually virtual hard disks (VHDs) - stored in an Azure storage account. Virtual machines also can have one or more data disks, that are also stored as VHDs. - - - Azure Managed and Unmanaged Data Disks have a maximum size of 4095 GB (with the exception of larger disks in preview). Azure Unmanaged Disks also have a maximum capacity of 4095 GB. - - - For more information, see: - - - Azure Disks - https://docs.microsoft.com/en-us/azure/virtual-machines/linux/about-disks-and-vhds and https://docs.microsoft.com/en-us/azure/virtual-machines/windows/about-disks-and-vhds. - - - Larger Managed Disks in Public Preview - https://azure.microsoft.com/en-us/blog/introducing-the-public-preview-of-larger-managed-disks-sizes/ - - - Ultra SSD Managed Disks in Public Preview - https://docs.microsoft.com/en-us/azure/virtual-machines/windows/disks-ultra-ssd -- group: - name: image - summary: Manage custom virtual machine images. -- command: - name: disk create - summary: Create a managed disk. - examples: - - summary: Create a managed disk by importing from a blob uri. - command: > - az disk create -g MyResourceGroup -n MyDisk --source https://vhd1234.blob.core.windows.net/vhds/osdisk1234.vhd - - summary: Create an empty managed disk. - command: > - az disk create -g MyResourceGroup -n MyDisk --size-gb 10 - - summary: Create a managed disk by copying an existing disk or snapshot. - command: > - az disk create -g MyResourceGroup -n MyDisk2 --source MyDisk - - summary: Create a disk in an availability zone in the region of "East US 2" - command: > - az disk create -n MyDisk -g MyResourceGroup --size-gb 10 --location eastus2 --zone 1 -- command: - name: disk list - summary: List managed disks. -- command: - name: disk delete - summary: Delete a managed disk. -- command: - name: disk update - summary: Update a managed disk. -- command: - name: disk wait - summary: Place the CLI in a waiting state until a condition of a managed disk is met. -- command: - name: disk grant-access - summary: Grant a resource read access to a managed disk. -- command: - name: disk revoke-access - summary: Revoke a resource's read access to a managed disk. -- group: - name: snapshot - summary: Manage point-in-time copies of managed disks, native blobs, or other snapshots. -- command: - name: snapshot create - summary: Create a snapshot. - examples: - - summary: Create a snapshot by importing from a blob uri. - command: > - az snapshot create -g MyResourceGroup -n MySnapshot --source https://vhd1234.blob.core.windows.net/vhds/osdisk1234.vhd - - summary: Create an empty snapshot. - command: az snapshot create -g MyResourceGroup -n MySnapshot --size-gb 10 - - summary: Create a snapshot by copying an existing disk in the same resource group. - command: az snapshot create -g MyResourceGroup -n MySnapshot2 --source MyDisk -- command: - name: snapshot update - summary: Update a snapshot. -- command: - name: snapshot list - summary: List snapshots. -- command: - name: snapshot grant-access - summary: Grant read access to a snapshot. -- command: - name: snapshot revoke-access - summary: Revoke read access to a snapshot. -- command: - name: snapshot wait - summary: Place the CLI in a waiting state until a condition of a snapshot is met. -- command: - name: image create - summary: Create a custom Virtual Machine Image from managed disks or snapshots. - examples: - - summary: Create an image from an existing disk. - command: | - az image create -g MyResourceGroup -n image1 --os-type Linux \ - --source /subscriptions/db5eb68e-73e2-4fa8-b18a-0123456789999/resourceGroups/rg1/providers/Microsoft.Compute/snapshots/s1 - - summary: Create an image by capturing an existing generalized virtual machine in the same resource group. - command: az image create -g MyResourceGroup -n image1 --source MyVm1 -- command: - name: image list - summary: List custom VM images. -- group: - name: identity - summary: Managed Service Identities -- command: - name: identity list - summary: List Managed Service Identities -- command: - name: identity list-operations - summary: Lists available operations for the Managed Identity provider -- group: - name: sig - summary: manage shared image gallery -- command: - name: sig create - summary: create a share image gallery. -- command: - name: sig list - summary: list share image galleries. -- command: - name: sig update - summary: update a share image gallery. -- group: - name: sig image-definition - summary: create an image definition -- command: - name: sig image-definition create - summary: create a gallery image definition - examples: - - summary: Create a linux image defintion - command: | - az sig image-definition create -g MyResourceGroup --gallery-name MyGallery --gallery-image-definition MyImage --publisher GreatPublisher --offer GreatOffer --sku GreatSku --os-type linux -- command: - name: sig image-definition update - summary: update a share image defintiion. -- group: - name: sig image-version - summary: create a new version from an image defintion -- command: - name: sig image-version create - summary: creat a new image version - description: this operation might take a long time depending on the replicate region number. Use "--no-wait" is advised. - examples: - - summary: Add a new image version - command: | - az sig image-version create -g MyResourceGroup --gallery-name MyGallery --gallery-image-definition MyImage --gallery-image-version 1.0.0 --managed-image /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/images/MyManagedImage - - summary: Add a new image version replicated across multiple regions with different replication counts each. Eastus2 will have it's replica count set to the default replica count. - command: | - az sig image-version create -g MyResourceGroup --gallery-name MyGallery \ - --gallery-image-definition MyImage --gallery-image-version 1.0.0 \ - --managed-image image-name --target-regions eastus2 ukwest=3 southindia=2 - - summary: Add a new image version and don't wait on it. Later you can invoke "az sig image-version wait" command when ready to create a vm from the gallery image version - command: | - az sig image-version create --no-wait -g MyResourceGroup --gallery-name MyGallery \ - --gallery-image-definition MyImage --gallery-image-version 1.0.0 \ - --managed-image imageInTheSameResourceGroup -- command: - name: sig image-version update - summary: update a share image version - examples: - - summary: Replicate to a new set of regions - command: | - az sig image-version update -g MyResourceGroup --gallery-name MyGallery --gallery-image-definition MyImage --gallery-image-version 1.0.0 --target-regions westcentralus=2 eastus2 - - summary: Replicate to one more region - command: | - az sig image-version update -g MyResourceGroup --gallery-name MyGallery --gallery-image-definition MyImage --gallery-image-version 1.0.0 --add publishingProfile.targetRegions name=westcentralus -- command: - name: sig image-version wait - summary: wait for image version related operation - examples: - - summary: wait for an image version gets updated - command: | - az sig image-version wait --updated -g MyResourceGroup --gallery-name MyGallery --gallery-image-definition MyImage --gallery-image-version 1.0.0 From e90f54ad87e931ebb6c9c9d3ffb2b050e2f2d20f Mon Sep 17 00:00:00 2001 From: Oluwatosin Adewale Date: Mon, 28 Jan 2019 18:37:40 -0800 Subject: [PATCH 09/16] Updated _get_yaml_help_for_nouns to check all possible loader paths for command group help. Minor updates to scripts. --- scripts/temp_help/convert_all.py | 2 +- scripts/temp_help/help_convert.py | 1 + .../azure/cli/core/_help_loaders.py | 76 +++++++++---------- 3 files changed, 39 insertions(+), 40 deletions(-) diff --git a/scripts/temp_help/convert_all.py b/scripts/temp_help/convert_all.py index 25e4d1cf72f..fa8d76ef7e6 100644 --- a/scripts/temp_help/convert_all.py +++ b/scripts/temp_help/convert_all.py @@ -76,7 +76,7 @@ def decomment_import_help(init_file, out_file): if successes: print("\n----------------------------------------------------------" - "Successfuly converted {} help.py files to help.yaml files." + "\nSuccessfuly converted {} help.py files to help.yaml files." "\n----------------------------------------------------------".format(successes)) elif args[0].lower() == "--extensions": diff --git a/scripts/temp_help/help_convert.py b/scripts/temp_help/help_convert.py index 1921337c8ed..cc6cc377018 100644 --- a/scripts/temp_help/help_convert.py +++ b/scripts/temp_help/help_convert.py @@ -314,6 +314,7 @@ def assert_true_or_warn(x, y): # test = True if args[0].lower() == "--delete": mod_names = get_all_mod_names() + mod_names.append("sqlvm") target_mods = ["{}.{}._help".format(PACKAGE_PREFIX, mod) for mod in mod_names] delete(target_mods) exit(0) diff --git a/src/azure-cli-core/azure/cli/core/_help_loaders.py b/src/azure-cli-core/azure/cli/core/_help_loaders.py index 1454357a149..274a2956eab 100644 --- a/src/azure-cli-core/azure/cli/core/_help_loaders.py +++ b/src/azure-cli-core/azure/cli/core/_help_loaders.py @@ -89,7 +89,7 @@ def _update_help_obj_params(help_obj, data_params, params_equal, attr_key_tups): # get the yaml help @staticmethod - def _get_yaml_help_for_nouns(nouns, cmd_loader_map_ref, cmd_group_table): + def _get_yaml_help_for_nouns(nouns, cmd_loader_map_ref): import inspect import os @@ -110,35 +110,33 @@ def _parse_yaml_from_string(text, help_file_path): command_nouns = " ".join(nouns) # if command in map, get the loader. Path of loader is path of helpfile. - loader = cmd_loader_map_ref.get(command_nouns, [None])[0] - - # otherwise likely a group, try to find command loader through command group object. - if not loader: - for grp_name, grp_obj in cmd_group_table.items(): - # Note, some groups such as 'az sf' do not have azcommandgroup objects ("with self.command_group()") - if grp_obj and grp_name == command_nouns: - loader = grp_obj.command_loader - break - - # if couldn't find group object in cmd_group_table, try using command loader object through command prefix. - if not loader: + ldr_or_none = cmd_loader_map_ref.get(command_nouns, [None])[0] + if ldr_or_none: + loaders = {ldr_or_none} + else: + loaders = set() + + # otherwise likely a group, try to find all command loaders under group as the group help could be defined + # in either. + if not loaders: for cmd_name, cmd_ldr in cmd_loader_map_ref.items(): # if first word in loader name is the group, this is a command in the command group if cmd_name.startswith(command_nouns + " "): - loader = cmd_ldr[0] - break - - if loader: - loader_file_path = inspect.getfile(loader.__class__) - dir_name = os.path.dirname(loader_file_path) - files = os.listdir(dir_name) - for file in files: - if file.endswith("help.yaml") or file.endswith("help.yml"): - help_file_path = os.path.join(dir_name, file) - with open(help_file_path, "r") as f: - text = f.read() - return _parse_yaml_from_string(text, help_file_path) - return None + loaders.add(cmd_ldr[0]) + + results = [] + if loaders: + for loader in loaders: + loader_file_path = inspect.getfile(loader.__class__) + dir_name = os.path.dirname(loader_file_path) + files = os.listdir(dir_name) + for file in files: + if file.endswith("help.yaml") or file.endswith("help.yml"): + help_file_path = os.path.join(dir_name, file) + with open(help_file_path, "r") as f: + text = f.read() + results.append(_parse_yaml_from_string(text, help_file_path)) + return results class HelpLoaderV0(BaseHelpLoader): @@ -176,12 +174,11 @@ def load_raw_data(self, help_obj, parser): prog = parser.prog if hasattr(parser, "prog") else parser._prog_prefix command_nouns = prog.split()[1:] cmd_loader_map_ref = self.help_ctx.cli_ctx.invocation.commands_loader.cmd_to_loader_map - cmd_group_tbl = self.help_ctx.cli_ctx.invocation.commands_loader.command_group_table - all_data = self._get_yaml_help_for_nouns(command_nouns, cmd_loader_map_ref, cmd_group_tbl) - self._data = self._get_entry_data(help_obj.command, all_data) + data_list = self._get_yaml_help_for_nouns(command_nouns, cmd_loader_map_ref) + self._data = self._get_entry_data(help_obj.command, data_list) def load_help_body(self, help_obj): - help_obj.long_summary = "" # TEMPORARY TO MIMIC KNACK behavior + help_obj.long_summary = "" # similar to knack... self._update_obj_from_data_dict(help_obj, self._data, self.body_attrs_to_keys) def load_help_parameters(self, help_obj): @@ -205,12 +202,13 @@ def load_help_examples(self, help_obj): help_obj.examples = [HelpExample(**ex) for ex in self._data["examples"] if help_obj._should_include_example(ex)] @staticmethod - def _get_entry_data(cmd_name, data): - if data and data.get("content"): - try: - entry_data = next(value for elem in data.get("content") for key, value in elem.items() if value.get("name") == cmd_name) - entry_data["version"] = data['version'] - return entry_data - except StopIteration: - pass + def _get_entry_data(cmd_name, data_list): + for data in data_list: + if data and data.get("content"): + try: + entry_data = next(value for elem in data.get("content") for key, value in elem.items() if value.get("name") == cmd_name) + entry_data["version"] = data['version'] + return entry_data + except StopIteration: + continue return None From 5e2d17b478a8f2e269cd80b1223fabffc32e6327 Mon Sep 17 00:00:00 2001 From: Oluwatosin Adewale Date: Tue, 29 Jan 2019 13:09:11 -0800 Subject: [PATCH 10/16] Added extension installation helpers to convert_all script. Remove unneccessary import in redis/_params.py --- scripts/temp_help/convert_all.py | 46 +++++++++++++++++++ .../cli/command_modules/redis/_params.py | 1 - 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/scripts/temp_help/convert_all.py b/scripts/temp_help/convert_all.py index fa8d76ef7e6..85672386e4e 100644 --- a/scripts/temp_help/convert_all.py +++ b/scripts/temp_help/convert_all.py @@ -52,6 +52,26 @@ def decomment_import_help(init_file, out_file): f_out.close() return updated +def install_extension(ext_name): + command = "az extension add -n " + ext_name + completed = subprocess.run(command.split()) + if completed.returncode == 0: + print("{} was successfully installed.".format(ext_name)) + return True + else: + print("{} was not installed.".format(ext_name)) + return False + +def uninstall_extension(ext_name): + command = "az extension remove -n " + ext_name + completed = subprocess.run(command.split()) + if completed.returncode == 0: + print("{} was successfully uninstalled.".format(ext_name)) + return True + else: + print("{} was not uninstalled.".format(ext_name)) + return False + if __name__ == "__main__": args = sys.argv[1:] @@ -171,3 +191,29 @@ def decomment_import_help(init_file, out_file): print("Renamed {} foo.py files to _help.py.\n".format(py_count)) print("There were {} failures to decomment import statements\n".format(failures)) + + elif args[0].lower() == "--add-extensions": + command = "az extension list-available --query [].name -o tsv" + completed = subprocess.run(command.split(), stdout=subprocess.PIPE, universal_newlines=True) + if completed.returncode == 0: + num_installed = 0 + extensions = completed.stdout.splitlines() + for ext in extensions: + success = install_extension(ext) + if success: + num_installed += 1 + + print("Installed {} extensions".format(num_installed)) + + elif args[0].lower() == "--remove-extensions": + command = "az extension list --query [].name -o tsv" + completed = subprocess.run(command.split(), stdout=subprocess.PIPE, universal_newlines=True) + if completed.returncode == 0: + num_installed = 0 + extensions = completed.stdout.splitlines() + for ext in extensions: + success = uninstall_extension(ext) + if success: + num_installed += 1 + + print("Uninstalled {} extensions".format(num_installed)) diff --git a/src/command_modules/azure-cli-redis/azure/cli/command_modules/redis/_params.py b/src/command_modules/azure-cli-redis/azure/cli/command_modules/redis/_params.py index 2595660dbfd..c1a91d27839 100644 --- a/src/command_modules/azure-cli-redis/azure/cli/command_modules/redis/_params.py +++ b/src/command_modules/azure-cli-redis/azure/cli/command_modules/redis/_params.py @@ -5,7 +5,6 @@ # pylint: disable=line-too-long from knack.arguments import CLIArgumentType -import azure.cli.command_modules.redis._help # pylint: disable=unused-import def load_arguments(self, _): From 515c25d124fc0bbf284a7ceea56d6cb0277db161 Mon Sep 17 00:00:00 2001 From: Oluwatosin Adewale Date: Tue, 29 Jan 2019 13:37:41 -0800 Subject: [PATCH 11/16] Updated / Fixed test help loader. --- src/azure-cli-core/azure/cli/core/tests/test_help_loaders.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/azure-cli-core/azure/cli/core/tests/test_help_loaders.py b/src/azure-cli-core/azure/cli/core/tests/test_help_loaders.py index 6ee00e1dce9..a428cce095b 100644 --- a/src/azure-cli-core/azure/cli/core/tests/test_help_loaders.py +++ b/src/azure-cli-core/azure/cli/core/tests/test_help_loaders.py @@ -115,5 +115,5 @@ def _parse_json_from_string(text, help_file_path): help_file_path = os.path.join(dir_name, file) with open(help_file_path, "r") as f: text = f.read() - return _parse_json_from_string(text, help_file_path) + return [_parse_json_from_string(text, help_file_path)] return None From 31f77fe08b26aa56df8d9df7afee035320f61dc2 Mon Sep 17 00:00:00 2001 From: Oluwatosin Adewale Date: Tue, 29 Jan 2019 15:18:44 -0800 Subject: [PATCH 12/16] Address pylint --- src/azure-cli-core/azure/cli/core/__init__.py | 2 +- src/azure-cli-core/azure/cli/core/_help.py | 8 +++----- .../azure/cli/core/_help_loaders.py | 18 +++++++++--------- 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/src/azure-cli-core/azure/cli/core/__init__.py b/src/azure-cli-core/azure/cli/core/__init__.py index 741d5c8fd5d..8657444eb81 100644 --- a/src/azure-cli-core/azure/cli/core/__init__.py +++ b/src/azure-cli-core/azure/cli/core/__init__.py @@ -134,7 +134,7 @@ def _update_command_table_from_modules(args): if modname not in BLACKLISTED_MODS] except ImportError as e: logger.warning(e) - pass + logger.debug('Installed command modules %s', installed_command_modules) cumulative_elapsed_time = 0 for mod in [m for m in installed_command_modules if m not in BLACKLISTED_MODS]: diff --git a/src/azure-cli-core/azure/cli/core/_help.py b/src/azure-cli-core/azure/cli/core/_help.py index 27c88de1d3d..cceedf75e0a 100644 --- a/src/azure-cli-core/azure/cli/core/_help.py +++ b/src/azure-cli-core/azure/cli/core/_help.py @@ -53,7 +53,8 @@ def _print_header(self, cli_name, help_file): links = help_file.links # TODO: this needs to be updated to handle links obj not just link text if links: - link_text = "{} and {}".format(", ".join([link["url"] for link in links[0:-1]]), links[-1]["url"]) if len(links) > 1 else links[0]["url"] + link_text = "{} and {}".format(", ".join([link["url"] for link in links[0:-1]]), + links[-1]["url"]) if len(links) > 1 else links[0]["url"] link_text = "For more information, see: {}\n".format(link_text) _print_indent(link_text, 2, width=self.textwrap_width) @@ -151,7 +152,7 @@ def is_loader_cls(cls): versioned_loaders[cls_name] = loader if len(versioned_loaders) != len({ldr.version for ldr in versioned_loaders.values()}): - ldrs_str = " ".join("{}-version:{}".format(cls_name, ldr.version) for cls_name, ldr in versioned_loaders.items()) + ldrs_str = " ".join("{}-version:{}".format(cls_name, ldr.version) for cls_name, ldr in versioned_loaders.items()) # pylint: disable=line-too-long raise CLIError("Two loaders have the same version. Loaders:\n\t{}".format(ldrs_str)) self.versioned_loaders = versioned_loaders @@ -206,8 +207,6 @@ def load(self, options): class CliGroupHelpFile(KnackGroupHelpFile, CliHelpFile): - def __init__(self, help_ctx, delimiters, parser): - super(CliGroupHelpFile, self).__init__(help_ctx, delimiters, parser) def load(self, options): # forces class to use this load method even if KnackGroupHelpFile overrides CliHelpFile's method. @@ -218,7 +217,6 @@ class CliCommandHelpFile(KnackCommandHelpFile, CliHelpFile): def __init__(self, help_ctx, delimiters, parser): super(CliCommandHelpFile, self).__init__(help_ctx, delimiters, parser) - import argparse self.type = 'command' self.command_source = getattr(parser, 'command_source', None) diff --git a/src/azure-cli-core/azure/cli/core/_help_loaders.py b/src/azure-cli-core/azure/cli/core/_help_loaders.py index 274a2956eab..d0666929d05 100644 --- a/src/azure-cli-core/azure/cli/core/_help_loaders.py +++ b/src/azure-cli-core/azure/cli/core/_help_loaders.py @@ -3,11 +3,10 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- +import abc from knack.util import CLIError from knack.log import get_logger - from azure.cli.core._help import (HelpExample, CliHelpFile) -import abc logger = get_logger(__name__) @@ -45,7 +44,7 @@ def _data_is_applicable(self): ldr_name, self.version) logger.info(msg) else: - logger.info("There is no applicable data for loader {}.".format(ldr_name)) + logger.info("There is no applicable data for loader %s.", ldr_name) return is_applicable @@ -146,7 +145,7 @@ def version(self): return 0 def versioned_load(self, help_obj, parser): - super(CliHelpFile, help_obj).load(parser) + super(CliHelpFile, help_obj).load(parser) # pylint:disable=bad-super-call def load_raw_data(self, help_obj, parser): pass @@ -171,7 +170,7 @@ def version(self): return 1 def load_raw_data(self, help_obj, parser): - prog = parser.prog if hasattr(parser, "prog") else parser._prog_prefix + prog = parser.prog if hasattr(parser, "prog") else parser._prog_prefix # pylint: disable=protected-access command_nouns = prog.split()[1:] cmd_loader_map_ref = self.help_ctx.cli_ctx.invocation.commands_loader.cmd_to_loader_map data_list = self._get_yaml_help_for_nouns(command_nouns, cmd_loader_map_ref) @@ -185,8 +184,8 @@ def load_help_parameters(self, help_obj): def params_equal(param, param_dict): if param_dict['name'].startswith("--"): # for optionals, help file name must be one of the long options return param_dict['name'] in param.name.split() - else: # for positionals, help file must name must match param name shown when -h is run - return param_dict['name'] == param.name + # for positionals, help file must name must match param name shown when -h is run + return param_dict['name'] == param.name if help_obj.type == "command" and hasattr(help_obj, "parameters") and self._data.get("arguments"): loaded_params = [] @@ -199,14 +198,15 @@ def params_equal(param, param_dict): def load_help_examples(self, help_obj): if help_obj.type == "command" and self._data.get("examples"): - help_obj.examples = [HelpExample(**ex) for ex in self._data["examples"] if help_obj._should_include_example(ex)] + help_obj.examples = [HelpExample(**ex) for ex in self._data["examples"] if help_obj._should_include_example(ex)] # pylint: disable=line-too-long, protected-access @staticmethod def _get_entry_data(cmd_name, data_list): for data in data_list: if data and data.get("content"): try: - entry_data = next(value for elem in data.get("content") for key, value in elem.items() if value.get("name") == cmd_name) + entry_data = next(value for elem in data.get("content") + for key, value in elem.items() if value.get("name") == cmd_name) entry_data["version"] = data['version'] return entry_data except StopIteration: From abf9f8711734a4e33da411880bd12094961354d4 Mon Sep 17 00:00:00 2001 From: Oluwatosin Adewale Date: Fri, 1 Feb 2019 11:53:04 -0800 Subject: [PATCH 13/16] Added --test to convert_all script. --- scripts/temp_help/convert_all.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/temp_help/convert_all.py b/scripts/temp_help/convert_all.py index 85672386e4e..a763654fd98 100644 --- a/scripts/temp_help/convert_all.py +++ b/scripts/temp_help/convert_all.py @@ -77,6 +77,13 @@ def uninstall_extension(ext_name): if args: if args[0].lower() == "--core": + test = False + try: + if args[1].lower() == "--test": + test = True + except IndexError: + pass + subprocess.run(["python", "./help_convert.py", "--get-all-mods"]) module_names = [] @@ -90,6 +97,8 @@ def uninstall_extension(ext_name): with open(os.devnull, 'w') as devnull: # silence stdout by redirecting to devnull for mod in module_names: args = ["python", "./help_convert.py", mod] + if test: + args.append("--test") completed_process = subprocess.run(args, stdout=devnull) if completed_process.returncode == 0: successes += 1 From bae82facbc0a21c6b11b721a35074a17bd409421 Mon Sep 17 00:00:00 2001 From: Oluwatosin Adewale Date: Fri, 1 Feb 2019 16:00:53 -0800 Subject: [PATCH 14/16] Aliased old example paramaeters with new params. Removed some todos. pep8 fix. --- doc/sphinx/azhelpgen/azhelpgen.py | 1 - src/azure-cli-core/azure/cli/core/_help.py | 25 ++++++++++++++++++---- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/doc/sphinx/azhelpgen/azhelpgen.py b/doc/sphinx/azhelpgen/azhelpgen.py index 4fd4becb399..8080412de0c 100644 --- a/doc/sphinx/azhelpgen/azhelpgen.py +++ b/doc/sphinx/azhelpgen/azhelpgen.py @@ -9,7 +9,6 @@ from os.path import expanduser from docutils import nodes from docutils.statemachine import ViewList -# TODO: Directive not in latest release of sphinx, need to pip install sphinx==1.6.7 will need to update code to support latest version of sphinx. from sphinx.util.compat import Directive from sphinx.util.nodes import nested_parse_with_titles diff --git a/src/azure-cli-core/azure/cli/core/_help.py b/src/azure-cli-core/azure/cli/core/_help.py index cceedf75e0a..d9da0df7bc1 100644 --- a/src/azure-cli-core/azure/cli/core/_help.py +++ b/src/azure-cli-core/azure/cli/core/_help.py @@ -51,7 +51,7 @@ class CLIPrintMixin(CLIHelp): def _print_header(self, cli_name, help_file): super(CLIPrintMixin, self)._print_header(cli_name, help_file) - links = help_file.links # TODO: this needs to be updated to handle links obj not just link text + links = help_file.links if links: link_text = "{} and {}".format(", ".join([link["url"] for link in links[0:-1]]), links[-1]["url"]) if len(links) > 1 else links[0]["url"] @@ -293,13 +293,30 @@ def __init__(self, **_data): _data['text'] = _data.get('text', '') super(HelpExample, self).__init__(_data) - # new attributes in lieu of old attributes. TODO: SHOULD WE DELETE OLD ATTRS?? TO ENFORCE new ones? - self.short_summary = _data.get('summary', '') if _data.get('summary', '') else self.name - self.command = _data.get('command', '') if _data.get('command', '') else self.text + self.name = _data.get('summary', '') if _data.get('summary', '') else self.name + self.text = _data.get('command', '') if _data.get('command', '') else self.text + self.long_summary = _data.get('description', '') self.min_profile = _data.get('min_profile', '') self.max_profile = _data.get('max_profile', '') + # alias old params with new + @property + def short_summary(self): + return self.name + + @short_summary.setter + def short_summary(self, value): + self.name = value + + @property + def command(self): + return self.text + + @command.setter + def command(self, value): + self.text = value + class HelpParameter(KnackHelpParameter): # pylint: disable=too-many-instance-attributes From 1758373634b40b7a587292c9e5cf639eace8d43b Mon Sep 17 00:00:00 2001 From: Oluwatosin Adewale Date: Thu, 7 Feb 2019 15:39:41 -0800 Subject: [PATCH 15/16] Updated authoring_help doc. --- doc/authoring_help.md | 98 +++++++++++++++++++++++++++++++++++++++---- 1 file changed, 90 insertions(+), 8 deletions(-) diff --git a/doc/authoring_help.md b/doc/authoring_help.md index a077bb37c6f..cbc2dc4816b 100644 --- a/doc/authoring_help.md +++ b/doc/authoring_help.md @@ -13,8 +13,10 @@ To override help for a given command: 2. Search result: src/command_modules/azure-cli-**profile**/azure/cli/command_modules/**profile**/commands.py. 3. Result shows "account clear" is in the "profile" module. 2. Using the module name, find the YAML help file which follows the path pattern: - 1. src/command_modules/azure-cli-**[module name]**/azure/cli/command_modules/**[module name]**/_help.py. - 2. If the file doesn't exist, it can be created. + 1. src/command_modules/azure-cli-**[module name]**/azure/cli/command_modules/**[module name]**/_help.py + 2. src/command_modules/azure-cli-**[module name]**/azure/cli/command_modules/**[module name]**/help.yaml + - **Pure Yaml format. Coming Soon** + 3. If the file doesn't exist, it can be created. 3. Find or create a help entry with the name of the command/group you want to document. See example below. ### Example YAML help file, _help.py ### @@ -65,6 +67,72 @@ helps['account'] = """ """ + +### (Coming Soon) Example YAML help file, help.yaml (Version 1) ### +
+#---------------------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+#---------------------------------------------------------------------------------------------
+
+version: 1
+
+content:
+
+- command:
+    name: account clear
+    summary: Clear account
+    description: Longer summary of how the dummy account clear command works
+    links:
+      - title: Azure Accounts Webpage
+        url: https://azure.microsoft.com/en-us/account/
+      - url: https://aka.ms/just-a-url
+    arguments:
+      - name: --account-name
+        summary: Account name
+        description: |
+          Longer summary with newlines preserved.
+          Preserving newlines is helpful for paragraph breaks.
+        value-sources:
+          - link:
+              title: List accounts
+              command: az account list
+          - link:
+              title: Show an accounts details
+              command: az account show
+          - link:
+              title: Azure Accounts Webpage
+              url: https://azure.microsoft.com/en-us/account/
+          - link:
+              title: Azure Billing Documentation
+              url: https://docs.microsoft.com/en-us/azure/billing/
+          - string:
+              "Account name should be lower case with no numbers or special symbol."
+    examples:
+    - summary: Clear an account
+      description: >
+        This is a longer description of the example.
+        The > character collapses multiple lines into a single line,
+        which is good for on-screen wrapping.
+      command: |
+        az account clear --acount-name myaccount
+
+
+ +You can also document groups using a similar format. + +
+
+- group:
+    name: account
+    summary: Manage Azure accounts
+    description: Longer summary of the account command group
+    links:
+      - title: Azure Accounts Webpage
+        url: https://azure.microsoft.com/en-us/account/
+      - url: https://aka.ms/just-a-url
+
+ # Tips to write effective help for your command - Make sure the doc contains all the details that someone unfamiliar with the API needs to use the command. @@ -91,12 +159,12 @@ Command help starts with its raw SDK docstring text, if available. Non-SDK comm Here are the layers of Project Az help, with each layer overriding the layer below it: -| Help Display | -|----------------| -| YAML Authoring | -| Code Specified | -| Docstring | -| SDK Text | +| Help Display | +|------------------------------------------| +| YAML Authoring - help.yaml (coming soon) | +| Code Specified - _help.py | +| Docstring | +| SDK Text | ## Page titles for command groups ## @@ -123,6 +191,8 @@ For command examples, you optionally specify the profile the example is for with Here's a samply for `storage account create`: The first example is only supported on the profile `latest` and above whilst the second example if only supported on `2017-03-09-profile` and below. +### _help.py + ``` examples: - name: Create a storage account MyStorageAccount in resource group MyResourceGroup in the West US region with locally redundant storage. @@ -133,6 +203,18 @@ The first example is only supported on the profile `latest` and above whilst the max_profile: 2017-03-09-profile ``` +### help.yaml + +``` + examples: + - summary: Create a storage account MyStorageAccount in resource group MyResourceGroup in the West US region with locally redundant storage. + command: az storage account create -n MyStorageAccount -g MyResourceGroup -l westus --sku Standard_LRS + min_profile: latest + - summary: Create a storage account MyStorageAccount in resource group MyResourceGroup in the West US region with locally redundant storage. + command: az storage account create -n MyStorageAccount -g MyResourceGroup -l westus --account-type Standard_LRS + max_profile: 2017-03-09-profile +``` + Here is how this looks in CLI `--help`: On profile `latest`. From bcc7c553353e8e415fd7d35fa95a5f5d53f3bd74 Mon Sep 17 00:00:00 2001 From: Oluwatosin Adewale Date: Thu, 7 Feb 2019 16:13:30 -0800 Subject: [PATCH 16/16] Removed 'coming soon' comments and made other minor updates to authoring_help.md. --- doc/authoring_help.md | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/doc/authoring_help.md b/doc/authoring_help.md index cbc2dc4816b..0c322709363 100644 --- a/doc/authoring_help.md +++ b/doc/authoring_help.md @@ -12,13 +12,20 @@ To override help for a given command: 1. Search code base for "account clear". 2. Search result: src/command_modules/azure-cli-**profile**/azure/cli/command_modules/**profile**/commands.py. 3. Result shows "account clear" is in the "profile" module. -2. Using the module name, find the YAML help file which follows the path pattern: - 1. src/command_modules/azure-cli-**[module name]**/azure/cli/command_modules/**[module name]**/_help.py - 2. src/command_modules/azure-cli-**[module name]**/azure/cli/command_modules/**[module name]**/help.yaml - - **Pure Yaml format. Coming Soon** - 3. If the file doesn't exist, it can be created. +2. Using the module name, find the YAML help file which follows the path pattern.: + 1. src/command_modules/azure-cli-**[module name]**/azure/cli/command_modules/**[module name]**/_help.py
+ **or**
+ src/command_modules/azure-cli-**[module name]**/azure/cli/command_modules/**[module name]**/help.yaml + 2. If the file doesn't exist, it can be created. 3. Find or create a help entry with the name of the command/group you want to document. See example below. + +> ###Notes:
+> 1. If using **_help.py** files for help authoring, the command module's **\_\_init\_\_.py** file must import the **_help.py** file. i.e:
+> `import azure.cli.command_modules.examplemod._help`
+> 2. The Help Authoring System now supports **help.yaml** files. Eventually, **_help.py** files will be replaced by **help.yaml**. + + ### Example YAML help file, _help.py ###
@@ -27,7 +34,7 @@ To override help for a given command:
 # Licensed under the MIT License. See License.txt in the project root for license information.
 #---------------------------------------------------------------------------------------------
 
-from azure.cli.help_files import helps
+from knack.help_files import helps
 
 #pylint: disable=line-too-long
 
@@ -68,7 +75,7 @@ helps['account'] = """
 
-### (Coming Soon) Example YAML help file, help.yaml (Version 1) ### +### Example YAML help file, help.yaml (Version 1) ###
 #---------------------------------------------------------------------------------------------
 # Copyright (c) Microsoft Corporation. All rights reserved.
@@ -159,12 +166,13 @@ Command help starts with its raw SDK docstring text, if available.  Non-SDK comm
 
 Here are the layers of Project Az help, with each layer overriding the layer below it:
 
-| Help Display                             |
-|------------------------------------------|
-| YAML Authoring - help.yaml (coming soon) |
-| Code Specified - _help.py                |
-| Docstring                                |
-| SDK Text                                 |
+| Help Display                  |
+|-------------------------------|
+| YAML Authoring via *help.yaml*|
+| YAML Authoring via *_help.py* |
+| Code Specified                |
+| Docstring                     |
+| SDK Text                      |
 
 ## Page titles for command groups ##