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

Azure Automation Hybrid Worker resource commands added #5261

Merged
merged 9 commits into from
Aug 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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"]
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