Skip to content

Commit

Permalink
Azure Automation Hybrid Worker resource commands added (#5261)
Browse files Browse the repository at this point in the history
  • Loading branch information
krmanupa committed Aug 24, 2022
1 parent 397e604 commit 76182a6
Show file tree
Hide file tree
Showing 27 changed files with 3,659 additions and 273 deletions.
5 changes: 5 additions & 0 deletions src/automation/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@ Release History
0.1.0
++++++
* Initial release.

0.1.2
++++++
* Added Hybrid Runbook Worker Group and Hybrid Runbook Workers related commands.

87 changes: 87 additions & 0 deletions src/automation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,91 @@ az automation job resume \
--name jobName
```

##### Create a hybrid runbook worker group
```
az automation hrwg create \
--automation-account-name accountName \
--resource-group groupName \
--name hybridrunbookworkergroupName
```

##### List all hybrid runbook worker groups
```
az automation hrwg list \
--automation-account-name accountName \
--resource-group groupName
```

##### Get hybrid worker group
```
az automation hrwg show \
--automation-account-name accountName \
--resource-group groupName \
--name hybridrunbookworkergroupName
```

##### Update hybrid worker group
```
az automation hrwg update \
--automation-account-name accountName \
--resource-group groupName \
--name hybridrunbookworkergroupName \
--credential "{name: credentialname}"
```

##### Delete hybrid worker group
```
az automation hrwg delete \
--automation-account-name accountName \
--resource-group groupName \
--name hybridrunbookworkergroupName
```

##### Create a hybrid runbook worker
```
az automation hrwg hrw create \
--automation-account-name accountName \
--resource-group groupName \
--hybrid-runbook-worker-group-name hybridRunbookWorkerGroupName \
--name hybridRunbookWorkerName \
--vm-resource-id vmResourceId
```

##### List all hybrid runbook workers in a worker group
```
az automation hrwg hrw list \
--automation-account-name accountName \
--resource-group groupName \
--hybrid-runbook-worker-group-name hybridRunbookWorkerGroupName
```

##### Get hybrid runbook worker
```
az automation hrwg hrw show \
--automation-account-name accountName \
--resource-group groupName \
--hybrid-runbook-worker-group-name hybridRunbookWorkerGroupName \
--name hybridRunbookWorkerName
```

##### delete a hybrid worker
```
az automation hrwg hrw delete \
--automation-account-name accountName \
--resource-group groupName \
--hybrid-runbook-worker-group-name hybridRunbookWorkerGroupName \
--name hybridRunbookWorkerName
```

##### Move a hybrid runbook worker to a different hybrid runbook worker group
```
az automation hrwg hrw move \
--automation-account-name accountName \
--resource-group groupName \
--hybrid-runbook-worker-group-name hybridRunbookWorkerGroupName \
--name hybridRunbookWorkerName
```



If you have issues, please give feedback by opening an issue at https://github.com/Azure/azure-cli-extensions/issues.
11 changes: 11 additions & 0 deletions src/automation/azext_automation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@ def __init__(self, cli_ctx=None):

def load_command_table(self, args):
from azext_automation.generated.commands import load_command_table
from azure.cli.core.aaz import load_aaz_command_table
try:
from . import aaz
except ImportError:
aaz = None
if aaz:
load_aaz_command_table(
loader=self,
aaz_pkg_name=aaz.__name__,
args=args
)
load_command_table(self, args)
try:
from azext_automation.manual.commands import load_command_table as load_command_table_manual
Expand Down
6 changes: 6 additions & 0 deletions src/automation/azext_automation/aaz/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------
6 changes: 6 additions & 0 deletions src/automation/azext_automation/aaz/latest/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: skip-file
# flake8: noqa

from azure.cli.core.aaz import *


@register_command_group(
"automation",
)
class __CMDGroup(AAZCommandGroup):
"""Automation Account.
"""
pass


__all__ = ["__CMDGroup"]
11 changes: 11 additions & 0 deletions src/automation/azext_automation/aaz/latest/automation/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: skip-file
# flake8: noqa

from .__cmd_group import *
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: skip-file
# flake8: noqa

from azure.cli.core.aaz import *


@register_command_group(
"automation hrwg",
)
class __CMDGroup(AAZCommandGroup):
"""Automation Hybrid Runbook Worker Group
"""
pass


__all__ = ["__CMDGroup"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: skip-file
# flake8: noqa

from .__cmd_group import *
from ._create import *
from ._delete import *
from ._list import *
from ._show import *
from ._update import *
Loading

0 comments on commit 76182a6

Please sign in to comment.