From 04feecbd57d599e34fad806ad54e144f531c690f Mon Sep 17 00:00:00 2001 From: kai ru <69238381+kairu-ms@users.noreply.github.com> Date: Wed, 23 Dec 2020 10:21:24 +0800 Subject: [PATCH] Add autorest.az configurations for azure monitor control service (#12090) * add AMCS config for codegen * reorganize command group * rename command group * Codegen modify try to rename DataCollectionRules create parameters * hide DataCollectionRules Create & Update commands and DataCollectionRuleAssociations Create command * use alias instand of rename in code-gen * use monitor-control-service as the extension name * Update readme.python.md --- .../monitor/resource-manager/readme.az.md | 92 +++++++++++++++++++ .../monitor/resource-manager/readme.md | 5 + .../monitor/resource-manager/readme.python.md | 10 ++ 3 files changed, 107 insertions(+) create mode 100644 specification/monitor/resource-manager/readme.az.md diff --git a/specification/monitor/resource-manager/readme.az.md b/specification/monitor/resource-manager/readme.az.md new file mode 100644 index 000000000000..c7734d5fa721 --- /dev/null +++ b/specification/monitor/resource-manager/readme.az.md @@ -0,0 +1,92 @@ +## AZ + +These settings apply only when `--az` is specified on the command line. +``` yaml $(az) +batch: + - AMCS: true +``` + +``` yaml $(az) && $(AMCS) +az: + extensions: monitor-control-service + parent-extension: monitor + namespace: azure.mgmt.amcs + package-name: azure-mgmt-amcs +az-output-folder: $(azure-cli-extension-folder)/src/monitor-control-service +python-sdk-output-folder: "$(az-output-folder)/azext_amcs/vendored_sdks/amcs" +# add additinal configuration here specific for Azure CLI +# refer to the faq.md for more details +``` + +# Az.AMCS +This directory contains the CLI common model for the Azure Monitor Control Service (AMCS). + +> Metadata +``` yaml $(AMCS) + +extension-mode: preview + +directive: + + - where: + group: monitor monitor-control-service data-collection-rule + set: + group: monitor data-collection-rule + - where: + group: monitor data-collection-rule + set: + group: monitor data-collection rule + + - where: + group: monitor monitor-control-service data-collection-rule-association + set: + group: monitor data-collection-rule-association + - where: + group: monitor data-collection-rule-association + set: + group: monitor data-collection rule-association + - where: + group: monitor data-collection rule-association + set: + group: monitor data-collection rule association + +cli: + cli-directive: +# -------- data-collection rule -------- + - where: + group: DataCollectionRules + param: dataCollectionRuleName + alias: + - name + - n + - where: + group: DataCollectionRuleAssociations + op: Create + hidden: True + - where: + group: DataCollectionRules + op: Create + hidden: True + - where: + group: DataCollectionRules + op: Update + hidden: True + +# -------- data-collection rule association -------- + - where: + group: DataCollectionRuleAssociations + param: resourceUri + alias: + - resource + - where: + group: DataCollectionRuleAssociations + param: dataCollectionRuleName + alias: + - rule_name + - where: + group: DataCollectionRuleAssociations + param: associationName + alias: + - name + - n +``` diff --git a/specification/monitor/resource-manager/readme.md b/specification/monitor/resource-manager/readme.md index 9db5e8348fbc..89ad698475e8 100644 --- a/specification/monitor/resource-manager/readme.md +++ b/specification/monitor/resource-manager/readme.md @@ -22,6 +22,11 @@ To see additional help and options, run: ### Basic Information +There are the global settings for the Azure Monitor Control Service (AMCS) extension. +``` yaml $(AMCS) +tag: package-2019-11-01-preview-only +``` + These are the global settings for the MonitorClient API. ``` yaml diff --git a/specification/monitor/resource-manager/readme.python.md b/specification/monitor/resource-manager/readme.python.md index ff27201f25ab..dc4bb3a2d29d 100644 --- a/specification/monitor/resource-manager/readme.python.md +++ b/specification/monitor/resource-manager/readme.python.md @@ -26,6 +26,16 @@ modelerfour: lenient-model-deduplication: true ``` +These settings apply when `--track2` and `--AMCS` is specified on the command line. + +``` yaml $(track2) && $(AMCS) +package-version: 0.1.0 +namespace: azure.mgmt.amcs +package-name: azure-mgmt-amcs +basic-setup-py: true +output-folder: $(python-sdks-folder)/amcs/azure-mgmt-amcs +``` + ### Python multi-api Generate all API versions currently shipped for this package