Skip to content

Commit 77b5869

Browse files
author
SDKAuto
committed
CodeGen from PR 13166 in Azure/azure-rest-api-specs
Merge b353336f78b47a9a9d83765d68a6b9b87ea76f95 into 89f00c2
1 parent 0d16cef commit 77b5869

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+5848
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.. :changelog:
2+
3+
Release History
4+
===============
5+
6+
0.1.0
7+
++++++
8+
* Initial release.

src/operationsmanagement/README.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Azure CLI operationsmanagement Extension #
2+
This is the extension for operationsmanagement
3+
4+
### How to use ###
5+
Install this extension using the below CLI command
6+
```
7+
az extension add --name operationsmanagement
8+
```
9+
10+
### Included Features ###
11+
#### operationsmanagement solution ####
12+
##### Create #####
13+
```
14+
az operationsmanagement solution create --location "East US" \
15+
--plan name="name1" product="product1" promotion-code="promocode1" publisher="publisher1" \
16+
--properties contained-resources="/subscriptions/sub2/resourceGroups/rg2/providers/provider1/resources/resource1" contained-resources="/subscriptions/sub2/resourceGroups/rg2/providers/provider2/resources/resource2" referenced-resources="/subscriptions/sub2/resourceGroups/rg2/providers/provider1/resources/resource2" referenced-resources="/subscriptions/sub2/resourceGroups/rg2/providers/provider2/resources/resource3" workspace-resource-id="/subscriptions/sub2/resourceGroups/rg2/providers/Microsoft.OperationalInsights/workspaces/ws1" \
17+
--resource-group "rg1" --name "solution1"
18+
```
19+
##### Show #####
20+
```
21+
az operationsmanagement solution show --resource-group "rg1" --name "solution1"
22+
```
23+
##### List #####
24+
```
25+
az operationsmanagement solution list --resource-group "rg1"
26+
```
27+
##### Update #####
28+
```
29+
az operationsmanagement solution update --tags Dept="IT" Environment="Test" --resource-group "rg1" --name "solution1"
30+
```
31+
##### Delete #####
32+
```
33+
az operationsmanagement solution delete --resource-group "rg1" --name "solution1"
34+
```
35+
#### operationsmanagement management-association ####
36+
##### Create #####
37+
```
38+
az operationsmanagement management-association create --name "managementAssociation1" --location "East US" \
39+
--application-id "/subscriptions/sub1/resourcegroups/rg1/providers/Microsoft.Appliance/Appliances/appliance1" \
40+
--provider-name "providerName" --resource-group "rg1" --resource-name "resourceName" \
41+
--resource-type "resourceType"
42+
```
43+
##### Show #####
44+
```
45+
az operationsmanagement management-association show --name "managementAssociation1" --provider-name "providerName" \
46+
--resource-group "rg1" --resource-name "resourceName" --resource-type "resourceType"
47+
```
48+
##### List #####
49+
```
50+
az operationsmanagement management-association list
51+
```
52+
##### Delete #####
53+
```
54+
az operationsmanagement management-association delete --name "managementAssociationName" \
55+
--provider-name "providerName" --resource-group "rg1" --resource-name "resourceName" \
56+
--resource-type "resourceType"
57+
```
58+
#### operationsmanagement management-configuration ####
59+
##### Create #####
60+
```
61+
az operationsmanagement management-configuration create --name "managementConfiguration1" --location "East US" \
62+
--resource-group "rg1"
63+
```
64+
##### Show #####
65+
```
66+
az operationsmanagement management-configuration show --name "managementConfigurationName" --resource-group "rg1"
67+
```
68+
##### List #####
69+
```
70+
az operationsmanagement management-configuration list
71+
```
72+
##### Delete #####
73+
```
74+
az operationsmanagement management-configuration delete --name "managementConfigurationName" --resource-group "rg1"
75+
```
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for
4+
# license information.
5+
#
6+
# Code generated by Microsoft (R) AutoRest Code Generator.
7+
# Changes may cause incorrect behavior and will be lost if the code is
8+
# regenerated.
9+
# --------------------------------------------------------------------------
10+
11+
from azure.cli.core import AzCommandsLoader
12+
from azext_operationsmanagement.generated._help import helps # pylint: disable=unused-import
13+
try:
14+
from azext_operationsmanagement.manual._help import helps # pylint: disable=reimported
15+
except ImportError:
16+
pass
17+
18+
19+
class OperationsManagementClientCommandsLoader(AzCommandsLoader):
20+
21+
def __init__(self, cli_ctx=None):
22+
from azure.cli.core.commands import CliCommandType
23+
from azext_operationsmanagement.generated._client_factory import cf_operationsmanagement_cl
24+
operationsmanagement_custom = CliCommandType(
25+
operations_tmpl='azext_operationsmanagement.custom#{}',
26+
client_factory=cf_operationsmanagement_cl)
27+
parent = super(OperationsManagementClientCommandsLoader, self)
28+
parent.__init__(cli_ctx=cli_ctx, custom_command_type=operationsmanagement_custom)
29+
30+
def load_command_table(self, args):
31+
from azext_operationsmanagement.generated.commands import load_command_table
32+
load_command_table(self, args)
33+
try:
34+
from azext_operationsmanagement.manual.commands import load_command_table as load_command_table_manual
35+
load_command_table_manual(self, args)
36+
except ImportError:
37+
pass
38+
return self.command_table
39+
40+
def load_arguments(self, command):
41+
from azext_operationsmanagement.generated._params import load_arguments
42+
load_arguments(self, command)
43+
try:
44+
from azext_operationsmanagement.manual._params import load_arguments as load_arguments_manual
45+
load_arguments_manual(self, command)
46+
except ImportError:
47+
pass
48+
49+
50+
COMMAND_LOADER_CLS = OperationsManagementClientCommandsLoader
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for
4+
# license information.
5+
#
6+
# Code generated by Microsoft (R) AutoRest Code Generator.
7+
# Changes may cause incorrect behavior and will be lost if the code is
8+
# regenerated.
9+
# --------------------------------------------------------------------------
10+
# pylint: disable=wildcard-import
11+
# pylint: disable=unused-wildcard-import
12+
13+
from .generated.action import * # noqa: F403
14+
try:
15+
from .manual.action import * # noqa: F403
16+
except ImportError:
17+
pass
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"azext.isExperimental": true,
3+
"azext.minCliCoreVersion": "2.15.0"
4+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for
4+
# license information.
5+
#
6+
# Code generated by Microsoft (R) AutoRest Code Generator.
7+
# Changes may cause incorrect behavior and will be lost if the code is
8+
# regenerated.
9+
# --------------------------------------------------------------------------
10+
# pylint: disable=wildcard-import
11+
# pylint: disable=unused-wildcard-import
12+
13+
from .generated.custom import * # noqa: F403
14+
try:
15+
from .manual.custom import * # noqa: F403
16+
except ImportError:
17+
pass
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for
4+
# license information.
5+
#
6+
# Code generated by Microsoft (R) AutoRest Code Generator.
7+
# Changes may cause incorrect behavior and will be lost if the code is
8+
# regenerated.
9+
# --------------------------------------------------------------------------
10+
11+
12+
def cf_operationsmanagement_cl(cli_ctx, *_):
13+
from azure.cli.core.commands.client_factory import get_mgmt_service_client
14+
from azext_operationsmanagement.vendored_sdks.operationsmanagement import OperationsManagementClient
15+
return get_mgmt_service_client(cli_ctx,
16+
OperationsManagementClient)
17+
18+
19+
def cf_solution(cli_ctx, *_):
20+
return cf_operationsmanagement_cl(cli_ctx).solutions
21+
22+
23+
def cf_management_association(cli_ctx, *_):
24+
return cf_operationsmanagement_cl(cli_ctx).management_associations
25+
26+
27+
def cf_management_configuration(cli_ctx, *_):
28+
return cf_operationsmanagement_cl(cli_ctx).management_configurations

0 commit comments

Comments
 (0)