Skip to content
This repository was archived by the owner on May 13, 2025. It is now read-only.
Merged
Changes from 5 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
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from ..utils import get_cluster_rp_api_version

from knack.log import get_logger
from .. import consts

from azure.cli.core.azclierror import AzCLIError, CLIError, InvalidArgumentValueError, ClientRequestError
from azure.cli.core.commands import LongRunningOperation
Expand Down Expand Up @@ -244,7 +245,10 @@ def _ensure_default_log_analytics_workspace_for_monitoring(cmd, subscription_id,
cluster_resource_id = '/subscriptions/{0}/resourceGroups/{1}/providers/{2}/{3}/{4}'.format(
subscription_id, cluster_resource_group_name, cluster_rp, cluster_type, cluster_name)
try:
resource = resources.get_by_id(cluster_resource_id, '2022-05-01-preview')
if cluster_rp.lower() == consts.HYBRIDCONTAINERSERVICE_RP:
resource = resources.get_by_id(cluster_resource_id, '2022-05-01-preview')
Comment thread
bavneetsingh16 marked this conversation as resolved.
Outdated
else:
resource = resources.get_by_id(cluster_resource_id, '2020-01-01-preview')
Comment thread
bavneetsingh16 marked this conversation as resolved.
cluster_location = resource.location.lower()
except HttpResponseError as ex:
raise ex
Expand Down Expand Up @@ -574,7 +578,10 @@ def _ensure_container_insights_dcr_for_monitoring(cmd, subscription_id, cluster_
cluster_resource_id = '/subscriptions/{0}/resourceGroups/{1}/providers/{2}/{3}/{4}'.format(
subscription_id, cluster_resource_group_name, cluster_rp, cluster_type, cluster_name)
try:
resource = resources.get_by_id(cluster_resource_id, '2022-05-01-preview')
if cluster_rp.lower() == consts.HYBRIDCONTAINERSERVICE_RP:
resource = resources.get_by_id(cluster_resource_id, '2022-05-01-preview')
else:
resource = resources.get_by_id(cluster_resource_id, '2020-01-01-preview')
cluster_region = resource.location.lower()
except HttpResponseError as ex:
raise ex
Expand Down