diff --git a/src/azure-cli/HISTORY.rst b/src/azure-cli/HISTORY.rst index 75c654b8376..da5bb57a5ca 100644 --- a/src/azure-cli/HISTORY.rst +++ b/src/azure-cli/HISTORY.rst @@ -20,6 +20,10 @@ Release History * Fix issue #11658: `az group export` command does not support `--query` and `--output` parameters * Fix issue #10279: The exit code of `az group deployment validate` is 0 when the verification fails +**IoT** + +* Deprecated 'IoT hub Job' commands. + **IoT Central** * Support app creation/update with the new sku name ST0, ST1, ST2. @@ -384,6 +388,7 @@ Release History * Add --runtime-version property to `az functionapp create` * az appservice vnet-integration add: Fixed so that subnet delegation is case insensitive and delegating subnets does not overwrite previous data. + **ARM** * deployment/group deployment validate: Add --handle-extended-json-format parameter to support multiline and comments in json template when deployment. diff --git a/src/azure-cli/azure/cli/command_modules/iot/commands.py b/src/azure-cli/azure/cli/command_modules/iot/commands.py index f61462ed059..420a6a65dc8 100644 --- a/src/azure-cli/azure/cli/command_modules/iot/commands.py +++ b/src/azure-cli/azure/cli/command_modules/iot/commands.py @@ -9,6 +9,9 @@ from ._client_factory import iot_pnp_service_factory +JOB_DEPRECATION_INFO = 'IoT Extension (azure-cli-iot-ext) Job commands' + + class PolicyUpdateResultTransform(LongRunningOperation): # pylint: disable=too-few-public-methods def __call__(self, poller): result = super(PolicyUpdateResultTransform, self).__call__(poller) @@ -119,7 +122,8 @@ def load_command_table(self, _): # pylint: disable=too-many-statements g.custom_command('renew-key', 'iot_hub_policy_key_renew', supports_no_wait=True) # iot hub job commands - with self.command_group('iot hub job', client_factory=iot_hub_service_factory) as g: + with self.command_group('iot hub job', deprecate_info=self.deprecate(redirect=JOB_DEPRECATION_INFO), + client_factory=iot_hub_service_factory) as g: g.custom_command('list', 'iot_hub_job_list') g.custom_command('show', 'iot_hub_job_get') g.custom_command('cancel', 'iot_hub_job_cancel')