Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ARM] az ts: Add new commands for template specs ; [ARM] az deployment : Add support for --template-spec -s #14448

Merged
merged 173 commits into from
Sep 24, 2020
Merged
Show file tree
Hide file tree
Changes from 101 commits
Commits
Show all changes
173 commits
Select commit Hold shift + click to select a range
00b9235
{Docs} Remove stale reference in README to closed issue about extensi…
dkmiller Apr 27, 2020
ab16df0
Merge remote-tracking branch 'upstream/release'
azclibot Apr 28, 2020
03436bc
Merge remote-tracking branch 'upstream/release'
azclibot Apr 30, 2020
7d98b1f
Merge remote-tracking branch 'upstream/release'
azclibot May 19, 2020
06f6ec5
Merge remote-tracking branch 'upstream/release'
azclibot Jun 2, 2020
125406f
Merge branch 'master' of git://github.com/Azure/azure-cli into dev
Jun 16, 2020
a497390
Preliminary changes made to add support for template-specs
Jun 22, 2020
e43a151
Reconfiguration
Jun 22, 2020
adab2d2
Merge remote-tracking branch 'upstream/release'
azclibot Jun 23, 2020
37c8522
Merge branch 'master' of git://github.com/Azure/azure-cli into dev
Jun 23, 2020
ef1e3f2
Merge remote-tracking branch 'upstream/dev' into dev
Jun 26, 2020
50e7c9c
validate function error rectified
Jun 27, 2020
68f47fd
validate command works for template-uri
Jun 29, 2020
7f184f8
Merge branch 'dev' of git://github.com/Azure/azure-cli into dev
Jun 29, 2020
bf962b1
Template-specs deployment works at resource-group level
Jun 29, 2020
4b90edd
Group deployment updated to function with 2020 SDK
Jun 30, 2020
4f39504
validate with template specs added
Jun 30, 2020
2e04882
Management scope and tenant scope errors fixed
Jul 1, 2020
7be894f
Testing Complete
Jul 2, 2020
87ccc2e
Merge branch 'dev' of git://github.com/Azure/azure-cli into dev
Jul 6, 2020
4f1348c
Template-Specs Deployment Added
Jul 6, 2020
9eb09f2
Template-Specs Deployment Added
Jul 6, 2020
44362eb
Merge branch 'dev' of git://github.com/Azure/azure-cli into dev
Jul 6, 2020
cf7b97a
Updated test cases and removed unnecessary comments
Jul 6, 2020
fb78986
Removed test cases from launch.json
Jul 6, 2020
504fda7
Uncommented test case
Jul 6, 2020
8f21f7c
Cleaned up repo
Jul 6, 2020
e73132c
Cleaned up repo
Jul 6, 2020
e8153f8
Merge branch 'dev' of git://github.com/Azure/azure-cli into dev
Jul 7, 2020
eac8414
Style checks complete, template_spec parameter placed at the end, tim…
Jul 8, 2020
74666fe
Merged with /dev
Jul 8, 2020
0e28ed8
Fixed failing CLI Check Test
Jul 8, 2020
583352f
Added fixes for deployment create_or_update and validate usage
Jul 9, 2020
a6344b8
Merge branch 'dev' of git://github.com/Azure/azure-cli into dev
Jul 9, 2020
b810571
Merge branch 'dev' of git://github.com/Azure/azure-cli into daetienn/…
Jul 10, 2020
b6a9759
Merge branch 'dev' of git://github.com/Azure/azure-cli into daetienn/…
Jul 10, 2020
9bf2611
Merged with /dev
Jul 10, 2020
f571b0a
Added template-specs command group, added help
Jul 13, 2020
68d6d8b
Merge branch 'dev' of git://github.com/Azure/azure-cli into daetienn/…
Jul 13, 2020
52275db
Create or update template spec functioning
Jul 13, 2020
c09578c
packing engine packing mechanism complete
Jul 17, 2020
8e33b91
Template-Specs CRUD Implemented, Artifacts has full support, added te…
Jul 21, 2020
f489dcb
Merge branch 'dev' of git://github.com/Azure/azure-cli into daetienn/…
Jul 21, 2020
8695281
Updated template-specs CRUD tests and template-specs deployment-tests
Jul 21, 2020
476e5f4
Merge branch 'dev' of git://github.com/Azure/azure-cli into daetienn/…
Jul 21, 2020
8ec88d9
Updated all tests for template-specs
Jul 21, 2020
374f94c
Updated tests
Jul 21, 2020
4d9e089
Merge branch 'dev' of git://github.com/Azure/azure-cli into daetienn/…
Jul 21, 2020
31c0022
Fixed style and linter
Jul 21, 2020
bfb9d3d
Uncommented test case
Jul 21, 2020
609e4bd
Fixed linter resource:
Jul 21, 2020
879da7b
Merge branch 'dev' of git://github.com/Azure/azure-cli into daetienn/…
Jul 22, 2020
7a4b60d
Merge branch 'dev' of git://github.com/Azure/azure-cli into daetienn/…
Jul 22, 2020
4ad7448
merged with dev
Jul 22, 2020
9eb5db4
merged
Jul 23, 2020
d076407
Fixed merge conflicts
Jul 23, 2020
0c43c4a
Merge branch 'dev' of git://github.com/Azure/azure-cli into daetienn/…
Jul 24, 2020
c2fc9f2
Merge branch 'dev' of git://github.com/Azure/azure-cli into daetienn/…
Jul 27, 2020
afbaff4
Merged
Jul 28, 2020
a7c3c4e
Fixed merge errors
Jul 28, 2020
1197257
Fixed json parsing errors
Jul 28, 2020
3c2ff2b
Merge pull request #1 from detienne20/daetienn/template-spec-crud-PR
detienne20 Jul 28, 2020
99f6257
Merge branch 'daetienn/template-spec-crud' of https://github.com/deti…
Jul 28, 2020
9101ec0
Revert changed deployment name
Jul 28, 2020
2f31b4f
Revert changed deployment name
Jul 28, 2020
bf48cb1
deleted extra deployment object causing bot error
Jul 29, 2020
003ad02
Revered launch.json changes
Jul 29, 2020
51fab43
Merge branch 'dev' of git://github.com/Azure/azure-cli into daetienn/…
Jul 29, 2020
2274481
Removed unnecessary changes
Jul 29, 2020
90479ac
Merge branch 'dev' of git://github.com/Azure/azure-cli into daetienn/…
Jul 29, 2020
3266d81
Reinstalled requirements, fixed resource linter and style
Jul 29, 2020
758a56d
Merge branch 'dev' of git://github.com/Azure/azure-cli into daetienn/…
Jul 29, 2020
159a302
Update src/azure-cli/azure/cli/command_modules/resource/_help.py
detienne20 Jul 29, 2020
a366099
Update src/azure-cli/azure/cli/command_modules/resource/_help.py
detienne20 Jul 29, 2020
01d712e
Update src/azure-cli/azure/cli/command_modules/resource/_validators.py
detienne20 Jul 29, 2020
2f18b56
Update src/azure-cli/azure/cli/command_modules/resource/_help.py
detienne20 Jul 29, 2020
61a1ec6
Update src/azure-cli/azure/cli/command_modules/resource/_help.py
detienne20 Jul 29, 2020
74431df
Update src/azure-cli/azure/cli/command_modules/resource/_help.py
detienne20 Jul 29, 2020
ee6e65e
Small syntax suggested by reviewers made
Jul 29, 2020
ae9a64a
Merge branch 'daetienn/template-spec-crud' of https://github.com/deti…
Jul 29, 2020
7f8b3c0
Removed unnecessary changes in test_resource
Jul 29, 2020
ad93868
Merged recordings
Jul 29, 2020
4441549
Changed python path in launch.json
Jul 29, 2020
466a2f4
Merge branch 'dev' of git://github.com/Azure/azure-cli into daetienn/…
Jul 30, 2020
6546233
recorded deployment tests for template-specs
Jul 30, 2020
862aa9f
Recorded template-specs CRUD
Jul 30, 2020
5500971
TemplateSpecs is a live test
Jul 30, 2020
dd0c881
Tests are updated to latest
Jul 30, 2020
bf92667
Commands now work with 10.1.0
Jul 31, 2020
57e38e0
Merged with what-if changes
Jul 31, 2020
1140e0f
Updated what if parameters
Jul 31, 2020
ff8f7c9
Fixed style and linter
Jul 31, 2020
0eb4c71
acs tests restored
Jul 31, 2020
94896f6
Removed unnecessary changes
Jul 31, 2020
a8f025f
Restored launch.json
Jul 31, 2020
7aafb11
added git ignore back in
Jul 31, 2020
372ba62
Bot_template restored
Jul 31, 2020
5f3b3c8
removed unnecessary comment
Jul 31, 2020
cc9dfca
Merge branch 'dev' of git://github.com/Azure/azure-cli into daetienn/…
Jul 31, 2020
51ac614
Updated web app folderto new one
Jul 31, 2020
efe9257
revereted
Jul 31, 2020
c16401e
Syntax changes for function names in packing_engine
Aug 3, 2020
6d9e71f
launch.json issue
Aug 3, 2020
10fc279
Merge branch 'dev' of git://github.com/Azure/azure-cli into daetienn/…
Aug 3, 2020
0f2707f
Merge branch 'dev' of git://github.com/Azure/azure-cli into daetienn/…
Aug 4, 2020
6cb0fa5
changed to new sdk release
Aug 4, 2020
3b666f7
Update src/azure-cli/azure/cli/command_modules/resource/_help.py
detienne20 Aug 4, 2020
dd3915e
Update src/azure-cli/azure/cli/command_modules/resource/_help.py
detienne20 Aug 4, 2020
e7db216
Made recommended changes
Aug 4, 2020
21ed0b5
snake_case for _packing_engine
Aug 4, 2020
f6a4c65
Merge pull request #2 from detienne20/daetienn/10.2.0SDK
detienne20 Aug 4, 2020
7542db4
Restored network tests
Aug 4, 2020
0fd9f3d
Fixed CLI Linter
Aug 4, 2020
c658fdf
Small syntax errors fixed
Aug 4, 2020
ef157b4
reverted launch.json changes
Aug 4, 2020
cb3e4c5
Deleted local context file
Aug 4, 2020
3b96956
Updated get template-specs
Aug 5, 2020
0492b9a
Updated get template-specs
Aug 5, 2020
2cbdef1
Merge branch 'dev' of git://github.com/Azure/azure-cli into daetienn/…
Aug 5, 2020
8dbe157
Merge branch 'dev' of git://github.com/Azure/azure-cli into daetienn/…
Aug 5, 2020
a2e00da
changed validator logic, added tests for template-specs list, changed…
Aug 5, 2020
f0e1312
changed validator
Aug 5, 2020
3feb570
Fixed validators
Aug 5, 2020
1886858
Fix getting resource API version in ARM cmdlt
eladperets Aug 5, 2020
49a55c8
Merge branch 'daetienn/template-spec-crud' of https://github.com/deti…
eladperets Aug 5, 2020
e4dc3f4
Changed validators, added what_if test for template_specs
Aug 5, 2020
5440ef8
Fixed linter and style resource
Aug 5, 2020
71728bb
Merge branch 'dev' of git://github.com/Azure/azure-cli into daetienn/…
Aug 6, 2020
62300d6
Merge branch 'dev' of git://github.com/Azure/azure-cli into daetienn/…
Aug 6, 2020
a6d06e4
Merge branch 'dev' of git://github.com/Azure/azure-cli into daetienn/…
Aug 7, 2020
ddbf8c3
Updated packing_engine, pulled dev
Aug 12, 2020
9cf8352
Merge branch 'dev' of git://github.com/Azure/azure-cli into daetienn/…
Aug 12, 2020
e2f7e0f
Update sample_policy_set.json
detienne20 Aug 12, 2020
c957083
Update sample_policy_set.json
detienne20 Aug 12, 2020
7fe74b3
Update sample_policy_set_parameterized.json
detienne20 Aug 12, 2020
9cec703
Merge branch 'dev' of git://github.com/Azure/azure-cli into daetienn/…
Aug 13, 2020
3b39cd1
Allows string for --template-spec parameter
Aug 13, 2020
bbbc1d4
Merge branch 'daetienn/template-spec-crud' of https://github.com/deti…
Aug 13, 2020
587e687
template-spec validators updated
Aug 13, 2020
b807ad7
Better error handling for deployment
Aug 13, 2020
72ca92b
Merge branch 'dev' of git://github.com/Azure/azure-cli into daetienn/…
Aug 19, 2020
9bb162d
Merge branch 'dev' of git://github.com/Azure/azure-cli into daetienn/…
Aug 20, 2020
87f6104
merged with dev, updated template-specs command module name to ts
Aug 20, 2020
5173c28
Fixed style
Aug 20, 2020
c46825c
Added temporary fix for preview message bug for private preview
Aug 21, 2020
8d605df
Different bug fix attempt
Aug 21, 2020
24c5b91
Merge branch 'dev' of git://github.com/Azure/azure-cli into daetienn/…
Sep 1, 2020
bbb4c82
Merge branch 'dev' of git://github.com/Azure/azure-cli into daetienn/…
Sep 2, 2020
1650a61
Merge branch 'dev' of git://github.com/Azure/azure-cli into daetienn/…
Sep 14, 2020
9d4772b
Removed unnecessary changes in preparation for merge
Sep 14, 2020
ac88600
Update src/azure-cli-core/azure/cli/core/commands/__init__.py
detienne20 Sep 15, 2020
fb95968
Merge branch 'dev' into daetienn/template-spec-crud
detienne20 Sep 15, 2020
45fae21
Fixed merged conflicts
Sep 15, 2020
2959310
Fixed merged conflicts
Sep 15, 2020
b98362c
restored new line at end of files
Sep 15, 2020
71538dc
restored new line at end of files
Sep 15, 2020
f2ed2c8
restored no new line at end of files
Sep 15, 2020
30eecfd
restored no new line at end of files
Sep 15, 2020
07cded8
Merge branch 'dev' of git://github.com/Azure/azure-cli into daetienn/…
Sep 16, 2020
5ae6bf0
min_api added
Sep 16, 2020
b12ba0d
Template Specs no longer a live test
Sep 16, 2020
680e594
New build for recent changes committed to dev
Sep 16, 2020
22b0779
Resource type for template specs changed to profiel type
Sep 16, 2020
ac016bc
Export template specs is a live scenario test
Sep 16, 2020
a87fff7
restored launch.json
Sep 16, 2020
a3371d9
restored launch.json
Sep 16, 2020
f0a9055
removed export test folder
Sep 16, 2020
f13d4ca
Reduced repetitive code in _help.py
Sep 22, 2020
5c11061
Fixed trailing white spaces and added new line at end of _params.py
Sep 22, 2020
fb88245
Merge branch 'dev' of git://github.com/Azure/azure-cli into daetienn/…
Sep 22, 2020
15c9bb2
Merge branch 'dev' of git://github.com/Azure/azure-cli into daetienn/…
Sep 23, 2020
7e972e7
set a default version in other profiles for ResourceType.MGMT_RESOUR…
Sep 24, 2020
171c958
Update launch.json
detienne20 Sep 24, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/azure-cli-core/azure/cli/core/profiles/_shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class ResourceType(Enum): # pylint: disable=too-few-public-methods
MGMT_RESOURCE_RESOURCES = ('azure.mgmt.resource.resources', 'ResourceManagementClient')
MGMT_RESOURCE_SUBSCRIPTIONS = ('azure.mgmt.resource.subscriptions', 'SubscriptionClient')
MGMT_RESOURCE_DEPLOYMENTSCRIPTS = ('azure.mgmt.resource.deploymentscripts', 'DeploymentScriptsClient')
MGMT_RESOURCE_TEMPLATESPECS = ('azure.mgmt.resource.templatespecs', 'TemplateSpecsClient')
MGMT_MONITOR = ('azure.mgmt.monitor', 'MonitorManagementClient')
DATA_KEYVAULT = ('azure.keyvault', 'KeyVaultClient')
MGMT_EVENTHUB = ('azure.mgmt.eventhub', 'EventHubManagementClient')
Expand Down Expand Up @@ -150,6 +151,7 @@ def default_api_version(self):
ResourceType.MGMT_RESOURCE_RESOURCES: '2020-06-01',
ResourceType.MGMT_RESOURCE_SUBSCRIPTIONS: '2019-11-01',
ResourceType.MGMT_RESOURCE_DEPLOYMENTSCRIPTS: '2019-10-01-preview',
ResourceType.MGMT_RESOURCE_TEMPLATESPECS: '2019-06-01-preview',
ResourceType.MGMT_NETWORK_DNS: '2018-05-01',
ResourceType.MGMT_KEYVAULT: '2019-09-01',
ResourceType.MGMT_AUTHORIZATION: SDKProfile('2018-09-01-preview', {
Expand Down Expand Up @@ -520,6 +522,8 @@ def get_versioned_sdk(api_profile, resource_type, *attr_args, **kwargs):
sub_mod_prefix = kwargs.get('mod', None)
operation_group = kwargs.get('operation_group', None)
sdk_path = get_versioned_sdk_path(api_profile, resource_type, operation_group)
if str(resource_type) == "ResourceType.MGMT_RESOURCE_TEMPLATESPECS":
sdk_path = 'azure.mgmt.resource.templatespecs.v2019_06_preview'
detienne20 marked this conversation as resolved.
Show resolved Hide resolved
if not attr_args:
# No attributes to load. Return the versioned sdk
return import_module(sdk_path)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ def _resource_managementgroups_client_factory(cli_ctx, **_):
return get_mgmt_service_client(cli_ctx, ManagementGroupsAPI, subscription_bound=False)


def _resource_templatespecs_client_factory(cli_ctx, **_):
from azure.cli.core.commands.client_factory import get_mgmt_service_client
from azure.cli.core.profiles import ResourceType
return get_mgmt_service_client(cli_ctx, ResourceType.MGMT_RESOURCE_TEMPLATESPECS)


def cf_resource_groups(cli_ctx, _):
return _resource_client_factory(cli_ctx).resource_groups

Expand Down Expand Up @@ -120,3 +126,7 @@ def cf_management_groups(cli_ctx, _):

def cf_management_group_subscriptions(cli_ctx, _):
return _resource_managementgroups_client_factory(cli_ctx).management_group_subscriptions


def cf_resource_templatespecs(cli_ctx, _):
return _resource_templatespecs_client_factory(cli_ctx).template_specs
170 changes: 170 additions & 0 deletions src/azure-cli/azure/cli/command_modules/resource/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,8 @@
short-summary: The path to the template file.
- name: --template-uri -u
short-summary: The URI to the template file.
- name: --template-spec -t
detienne20 marked this conversation as resolved.
Show resolved Hide resolved
short-summary: The template spec resource id.
- name: --location -l
short-summary: The location to store the deployment metadata.
- name: --name -n
Expand All @@ -279,6 +281,8 @@
short-summary: The path to the template file.
- name: --template-uri -u
short-summary: The URI to the template file.
- name: --template-spec -t
short-summary: The template spec resource id.
- name: --location -l
short-summary: The location to store the deployment metadata.
- name: --name -n
Expand All @@ -297,6 +301,9 @@
text: >
az deployment create --location WestUS --template-file azuredeploy.json \\
--parameters @params.json --parameters https://mysite/params.json --parameters MyValue=This [email protected]
- name: Create a deployment at subscription scope from a template-spec
text: >
az deployment create --location WestUS --template-spec resourceID
detienne20 marked this conversation as resolved.
Show resolved Hide resolved
"""

helps['deployment export'] = """
Expand Down Expand Up @@ -388,6 +395,8 @@
short-summary: The path to the template file.
- name: --template-uri -u
short-summary: The URI to the template file.
- name: --template-spec -t
short-summary: The template spec resource id.
- name: --location -l
short-summary: The location to store the deployment metadata.
- name: --name -n
Expand All @@ -414,6 +423,8 @@
short-summary: The path to the template file.
- name: --template-uri -u
short-summary: The URI to the template file.
- name: --template-spec -t
short-summary: The template spec resource id.
- name: --location -l
short-summary: The location to store the deployment metadata.
- name: --name -n
Expand Down Expand Up @@ -448,6 +459,8 @@
short-summary: The path to the template file.
- name: --template-uri -u
short-summary: The URI to the template file.
- name: --template-spec -t
short-summary: The template spec resource id.
- name: --location -l
short-summary: The location to store the deployment What-If operation metadata.
- name: --name -n
Expand Down Expand Up @@ -549,6 +562,8 @@
short-summary: The path to the template file.
- name: --template-uri -u
short-summary: The URI to the template file.
- name: --template-spec -t
short-summary: The template spec resource id.
- name: --resource-group -g
short-summary: The resource group to create deployment at.
- name: --name -n
Expand Down Expand Up @@ -577,6 +592,8 @@
short-summary: The path to the template file.
- name: --template-uri -u
short-summary: The URI to the template file.
- name: --template-spec -t
short-summary: The template spec resource id.
- name: --resource-group -g
short-summary: The resource group to create deployment at.
- name: --name -n
Expand All @@ -603,6 +620,9 @@
az deployment group create --resource-group testrg --name rollout01 \\
--template-file azuredeploy.json --parameters @params.json \\
--parameters https://mysite/params.json --parameters MyValue=This [email protected]
- name: Create a deployment at subscription scope from a template-spec
text: >
az deployment group create --resource-group testrg --template-spec resourceID
detienne20 marked this conversation as resolved.
Show resolved Hide resolved
"""

helps['deployment group what-if'] = """
Expand All @@ -618,6 +638,8 @@
short-summary: The path to the template file.
- name: --template-uri -u
short-summary: The URI to the template file.
- name: --template-spec -t
short-summary: The template spec resource id.
- name: --resource-group -g
short-summary: The resource group to execute deployment What-If operation at.
- name: --name -n
Expand Down Expand Up @@ -726,6 +748,8 @@
short-summary: The path to the template file.
- name: --template-uri -u
short-summary: The URI to the template file.
- name: --template-spec -t
short-summary: The template spec resource id.
- name: --management-group-id -m
short-summary: The management group id to create deployment at.
- name: --name -n
Expand All @@ -750,6 +774,8 @@
short-summary: The path to the template file.
- name: --template-uri -u
short-summary: The URI to the template file.
- name: --template-spec -t
short-summary: The template spec resource id.
- name: --management-group-id -m
short-summary: The management group id to create deployment at.
- name: --name -n
Expand Down Expand Up @@ -783,6 +809,8 @@
short-summary: The path to the template file.
- name: --template-uri -u
detienne20 marked this conversation as resolved.
Show resolved Hide resolved
short-summary: The URI to the template file.
- name: --template-spec -t
short-summary: The template spec resource id.
- name: --management-group-id -m
short-summary: The management group id to create deployment at.
- name: --name -n
Expand Down Expand Up @@ -886,6 +914,8 @@
short-summary: The path to the template file.
- name: --template-uri -u
short-summary: The URI to the template file.
- name: --template-spec -t
short-summary: The template spec resource id.
- name: --name -n
short-summary: The deployment name.
- name: --location -l
Expand All @@ -908,6 +938,8 @@
short-summary: The path to the template file.
- name: --template-uri -u
short-summary: The URI to the template file.
- name: --template-spec -t
short-summary: The template spec resource id.
- name: --location -l
short-summary: The location to store the deployment What-If operation metadata.
- name: --name -n
Expand Down Expand Up @@ -939,6 +971,8 @@
short-summary: The path to the template file.
- name: --template-uri -u
short-summary: The URI to the template file.
- name: --template-spec -t
short-summary: The template spec resource id.
- name: --name -n
short-summary: The deployment name.
- name: --location -l
Expand Down Expand Up @@ -2141,3 +2175,139 @@
text: >
az tag update --resource-id /subscriptions/{sub-id}/resourcegroups/{rg}/providers/Microsoft.Compute/virtualMachines/{vmName} --operation delete --tags key1=value1
"""

helps['template-specs'] = """
type: group
short-summary: Manage template specs at subscription or resource group scope.
"""

helps['template-specs create'] = """
type: command
short-summary: Create or update a template spec and or template spec version.
parameters:
- name: --resource-group -g
type: string
short-summary: Name of resource group.
- name: --name -n
type: string
short-summary: Name of the template spec.
- name: --version -v
type: string
short-summary: The template spec version.
detienne20 marked this conversation as resolved.
Show resolved Hide resolved
- name: --template-file -f
type: template_spec
short-summary: The path to the template file.
- name: --location -l
short-summary: The location to store the template-spec.
- name: --display-name -d
type: string
short-summary: The display name of the template spec.
- name : --description
type: string
short-summary: The description of the root template spec.
- name : --vdescription
detienne20 marked this conversation as resolved.
Show resolved Hide resolved
type: string
short-summary: The description of template spec version.
- name: --tags
short-summary: Resource Tags.
examples:
- name: Create a template spec.
text: az template-specs create -g testRG --name TemplateSpecName -l WestUS --display-name "BasicTemplate" --description "Simple template spec"
- name: Create a template spec version.
text: az template-specs create -g testRG --name TemplateSpecName -v 2.0 -l WestUS --template-file templateSpec.json --vdescription "Less simple template spec"
- name: Create a template spec and a version of the template spec.
text: az template-specs create -g testRG --name TemplateSpecName -v 1.0 -l WestUS --template-file templateSpec.json --display-name "SimpleTemplate" --description "Basic template spec" --vdescription "Version of basic template spec"
- name: Update an existing template spec.
text: az template-specs create -g testrg -n MyTemplateSpecName -l WestUS -v 1.0 -f updatedFile.json
"""

helps['template-specs get'] = """
detienne20 marked this conversation as resolved.
Show resolved Hide resolved
type: command
short-summary: Get the specified template spec or template spec version.
parameters:
- name: --resource-group -g
type: string
short-summary: Name of the resource group.
- name: --name -n
type: string
short-summary: Name of the template spec.
- name: --version -v
type: string
short-summary: The template spec version.
- name: --template-spec -t
short-summary: The template spec resource ID.
examples:
- name: Get the specified template spec with all versions.
text: az template-specs get -g testrg --name TemplateSpecName
- name: Get the specified template spec version.
text: az template-specs get -g testrg --name TemplateSpecName --version VersionName
- name: Get specified template spec based on the resource ID.
text: az template-specs get --template-spec resourceID
"""

helps['template-specs export'] = """
type: command
short-summary: Export the specified template spec and artifacts (if any) to the specified output folder.
parameters:
- name: --resource-group -g
type: string
short-summary: Name of resource group.
- name: --name -n
type: string
short-summary: Name of the template spec.
- name: --version -v
type: string
short-summary: The template spec version.
- name: --template-spec -t
short-summary: The template spec resource ID.
- name: --output-folder
short-summary: Existing folder to output export(s).
examples:
- name: Export the specified template spec with all versions.
text: az template-specs export -g testrg --name TemplateSpecName --output-folder C:/path/
- name: Export the specified template spec.
text: az template-specs export -t resourceID --output-folder C:/path/
- name: Export the specified template spec version.
text: az template-specs export -g testrg --name TemplateSpecName --version VersionName --output-folder C:/path/
"""


helps['template-specs delete'] = """
type: command
short-summary: Delete a specified template spec or template spec version by name or resource ID.
parameters:
- name: --resource-group -g
type: string
short-summary: Name of resource group.
- name: --name -n
type: string
short-summary: Name of the template spec.
- name: --template-spec -t
short-summary: The template spec resource ID.
- name: --version -v
type: string
short-summary: The template spec version.
examples:
- name: Delete the specified template spec and all versions.
text: az template-specs delete -g MyResourceGroup --name TemplateSpecName
- name: Delete the specified version from the template spec.
text: az template-specs delete -g MyResourceGroup --name TemplateSpecName --version VersionName
- name: Delete the template spec or version based on resource ID.
text: az template-specs delete --template-spec resourceID
"""

helps['template-specs list'] = """
type: command
short-summary: List all the template specs within the specified subscription or resource group.
parameters:
- name: --resource-group -g
type: string
short-summary: Name of resource group.
examples:
- name: List all template specs in current default subscription.
text: az template-specs list
- name: List all template specs in specified subscription.
text: az template-specs list --subscription Subscription
- name: List all template specs in resource group.
text: az template-specs list -g MyResourceGroup
"""
Loading