diff --git a/src/log-analytics-solution/HISTORY.rst b/src/log-analytics-solution/HISTORY.rst index 34b147f8c6d..2d21824c106 100644 --- a/src/log-analytics-solution/HISTORY.rst +++ b/src/log-analytics-solution/HISTORY.rst @@ -3,6 +3,10 @@ Release History =============== +1.0.0 ++++++++++++++++ +* Make extension from experimental to stable. + 0.1.1 +++++++++++++++ * deprecate --plan-publisher, --name, --plan-product and add --solution-type for create diff --git a/src/log-analytics-solution/azext_log_analytics_solution/__init__.py b/src/log-analytics-solution/azext_log_analytics_solution/__init__.py index 5b8afb59574..620cebeaa30 100644 --- a/src/log-analytics-solution/azext_log_analytics_solution/__init__.py +++ b/src/log-analytics-solution/azext_log_analytics_solution/__init__.py @@ -12,15 +12,23 @@ class LogAnalyticsSolutionCommandsLoader(AzCommandsLoader): def __init__(self, cli_ctx=None): from azure.cli.core.commands import CliCommandType - from azext_log_analytics_solution._client_factory import cf_log_analytics_solution log_analytics_solution_custom = CliCommandType( - operations_tmpl='azext_log_analytics_solution.custom#{}', - client_factory=cf_log_analytics_solution) - super(LogAnalyticsSolutionCommandsLoader, self).__init__(cli_ctx=cli_ctx, - custom_command_type=log_analytics_solution_custom) + operations_tmpl='azext_log_analytics_solution.custom#{}') + super().__init__(cli_ctx=cli_ctx, custom_command_type=log_analytics_solution_custom) def load_command_table(self, args): from azext_log_analytics_solution.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) return self.command_table diff --git a/src/log-analytics-solution/azext_log_analytics_solution/_client_factory.py b/src/log-analytics-solution/azext_log_analytics_solution/_client_factory.py deleted file mode 100644 index ac7c5fb5d98..00000000000 --- a/src/log-analytics-solution/azext_log_analytics_solution/_client_factory.py +++ /dev/null @@ -1,15 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- - - -def cf_log_analytics_solution(cli_ctx, *_): - from azure.cli.core.commands.client_factory import get_mgmt_service_client - from .vendored_sdks.operationsmanagement import OperationsManagementClient - return get_mgmt_service_client(cli_ctx, OperationsManagementClient, provider_name="Microsoft.OperationsManagement", - resource_type="solutions", resource_name="") - - -def cf_solutions(cli_ctx, *_): - return cf_log_analytics_solution(cli_ctx, *_).solutions diff --git a/src/log-analytics-solution/azext_log_analytics_solution/_help.py b/src/log-analytics-solution/azext_log_analytics_solution/_help.py index 56944d18ea4..1e6176ca70d 100644 --- a/src/log-analytics-solution/azext_log_analytics_solution/_help.py +++ b/src/log-analytics-solution/azext_log_analytics_solution/_help.py @@ -7,64 +7,3 @@ # pylint: disable=too-many-lines # pylint: disable=line-too-long from knack.help_files import helps # pylint: disable=unused-import - - -helps['monitor log-analytics solution'] = """ -type: group -short-summary: Commands to manage monitor log-analytics solution. -""" - -helps['monitor log-analytics solution create'] = """ -type: command -short-summary: Create a log-analytics solution. -examples: - - name: Create a log-analytics solution of type Containers - text: |- - az monitor log-analytics solution create --resource-group MyResourceGroup \\ - --solution-type Containers --tags key=value \\ - --workspace "/subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/ \\ - Microsoft.OperationalInsights/workspaces/{WorkspaceName}" -""" - -helps['monitor log-analytics solution update'] = """ -type: command -short-summary: Update an existing log-analytics solution. -examples: - - name: Update a log-analytics solution - text: |- - az monitor log-analytics solution update --resource-group MyResourceGroup \\ - --name SolutionName --tags key=value -""" - -helps['monitor log-analytics solution delete'] = """ -type: command -short-summary: Delete a log-analytics solution. -examples: - - name: Delete a log-analytics solution - text: |- - az monitor log-analytics solution delete --resource-group MyResourceGroup --name SolutionName -""" - -helps['monitor log-analytics solution show'] = """ -type: command -short-summary: Get details about the specified log-analytics solution. -examples: - - name: Get a log-analytics solution - text: |- - az monitor log-analytics solution show --resource-group MyResourceGroup --name SolutionName -""" - -helps['monitor log-analytics solution list'] = """ -type: command -short-summary: List all of the log-analytics solutions in the specified subscription or resource group -examples: - - name: List all log-analytics solutions in the current subscription - text: |- - az monitor log-analytics solution list - - name: List all log-analytics solutions in a subscription - text: |- - az monitor log-analytics solution list --subscription MySubscription - - name: List all log-analytics solutions in a resource group - text: |- - az monitor log-analytics solution list --resource-group MyResourceGroup -""" diff --git a/src/log-analytics-solution/azext_log_analytics_solution/_params.py b/src/log-analytics-solution/azext_log_analytics_solution/_params.py index 9fce555941c..22b087125f2 100644 --- a/src/log-analytics-solution/azext_log_analytics_solution/_params.py +++ b/src/log-analytics-solution/azext_log_analytics_solution/_params.py @@ -2,46 +2,8 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -# pylint: disable=line-too-long -# pylint: disable=too-many-lines -# pylint: disable=too-many-statements - -from azure.cli.core.commands.parameters import tags_type -from knack.arguments import CLIArgumentType -from ._validators import validate_workspace_resource_id - -solution_name = CLIArgumentType(options_list=['--name', '-n'], - help='Name of the log-analytics solution. It should be in the format of ' - 'solutionType(workspaceName). SolutionType part is case sensitive. ') +# pylint: disable=unused-argument def load_arguments(self, _): - - with self.argument_context('monitor log-analytics solution create') as c: - c.ignore('location') - c.argument('solution_type', options_list=['--solution-type', '-t'], - help='Type of the log-analytics solution. The most used are: SecurityCenterFree, Security, Updates, ' - 'ContainerInsights, ServiceMap, AzureActivity, ChangeTracking, VMInsights, SecurityInsights, ' - 'NetworkMonitoring, SQLVulnerabilityAssessment, SQLAdvancedThreatProtection, AntiMalware, ' - 'AzureAutomation, LogicAppsManagement, SQLDataClassification') - c.argument('solution_name', solution_name, deprecate_info=c.deprecate(hide=True)) - c.argument('tags', tags_type) - c.argument('plan_publisher', - help='Publisher name of the plan for solution. For gallery solution, it is Microsoft.', - deprecate_info=c.deprecate(hide=True)) - c.argument('plan_product', - help='Product name of the plan for solution. It should be in the format of OMSGallery/. This is case sensitive.', - deprecate_info=c.deprecate(hide=True)) - c.argument('workspace_resource_id', options_list=['--workspace', '-w'], - validator=validate_workspace_resource_id, - help='The name or resource ID of the log analytics workspace with which the solution will be linked.') - - with self.argument_context('monitor log-analytics solution update') as c: - c.argument('solution_name', solution_name) - c.argument('tags', tags_type) - - with self.argument_context('monitor log-analytics solution delete') as c: - c.argument('solution_name', solution_name) - - with self.argument_context('monitor log-analytics solution show') as c: - c.argument('solution_name', solution_name) + pass diff --git a/src/log-analytics-solution/azext_log_analytics_solution/_validators.py b/src/log-analytics-solution/azext_log_analytics_solution/_validators.py deleted file mode 100644 index 76767644ecf..00000000000 --- a/src/log-analytics-solution/azext_log_analytics_solution/_validators.py +++ /dev/null @@ -1,38 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -------------------------------------------------------------------------------------------- -from msrestazure.tools import is_valid_resource_id, parse_resource_id, resource_id -from knack.util import CLIError -from azure.mgmt.loganalytics import LogAnalyticsManagementClient -from azure.cli.core.commands.client_factory import get_mgmt_service_client, get_subscription_id - - -def validate_workspace_resource_id(cmd, namespace): - - if namespace.workspace_resource_id: - # If the workspace_resource_id is invalid, use it as a workspace name to splice the workspace_resource_id - if not is_valid_resource_id(namespace.workspace_resource_id): - namespace.workspace_resource_id = resource_id( - subscription=get_subscription_id(cmd.cli_ctx), - resource_group=namespace.resource_group_name, - namespace='microsoft.OperationalInsights', - type='workspaces', - name=namespace.workspace_resource_id - ) - - if not is_valid_resource_id(namespace.workspace_resource_id): - raise CLIError('usage error: --workspace is invalid, it must be name of resource id of workspace') - - # Determine whether the workspace already exists - workspace_param = parse_resource_id(namespace.workspace_resource_id) - if workspace_param['resource_group'] != namespace.resource_group_name: - raise CLIError('usage error: workspace and solution must be under the same resource group') - - workspaces_client = get_mgmt_service_client(cmd.cli_ctx, LogAnalyticsManagementClient).workspaces - workspaces = workspaces_client.get(workspace_param['resource_group'], workspace_param['resource_name']) - - # The location of solution is the same as the location of the workspace - namespace.location = workspaces.location - - namespace.solution_name = namespace.solution_type + "(" + workspace_param['resource_name'] + ")" diff --git a/src/log-analytics-solution/azext_log_analytics_solution/vendored_sdks/__init__.py b/src/log-analytics-solution/azext_log_analytics_solution/aaz/__init__.py similarity index 85% rename from src/log-analytics-solution/azext_log_analytics_solution/vendored_sdks/__init__.py rename to src/log-analytics-solution/azext_log_analytics_solution/aaz/__init__.py index a5b81f3bde4..5757aea3175 100644 --- a/src/log-analytics-solution/azext_log_analytics_solution/vendored_sdks/__init__.py +++ b/src/log-analytics-solution/azext_log_analytics_solution/aaz/__init__.py @@ -1,6 +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 # -------------------------------------------------------------------------------------------- - -__import__('pkg_resources').declare_namespace(__name__) diff --git a/src/log-analytics-solution/azext_log_analytics_solution/aaz/latest/__init__.py b/src/log-analytics-solution/azext_log_analytics_solution/aaz/latest/__init__.py new file mode 100644 index 00000000000..5757aea3175 --- /dev/null +++ b/src/log-analytics-solution/azext_log_analytics_solution/aaz/latest/__init__.py @@ -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 +# -------------------------------------------------------------------------------------------- diff --git a/src/log-analytics-solution/azext_log_analytics_solution/aaz/latest/monitor/__cmd_group.py b/src/log-analytics-solution/azext_log_analytics_solution/aaz/latest/monitor/__cmd_group.py new file mode 100644 index 00000000000..b7be6b843b5 --- /dev/null +++ b/src/log-analytics-solution/azext_log_analytics_solution/aaz/latest/monitor/__cmd_group.py @@ -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( + "monitor", +) +class __CMDGroup(AAZCommandGroup): + """Manage the Azure Monitor Service. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/log-analytics-solution/azext_log_analytics_solution/vendored_sdks/operationsmanagement/version.py b/src/log-analytics-solution/azext_log_analytics_solution/aaz/latest/monitor/__init__.py similarity index 51% rename from src/log-analytics-solution/azext_log_analytics_solution/vendored_sdks/operationsmanagement/version.py rename to src/log-analytics-solution/azext_log_analytics_solution/aaz/latest/monitor/__init__.py index e0ec669828c..5a9d61963d6 100644 --- a/src/log-analytics-solution/azext_log_analytics_solution/vendored_sdks/operationsmanagement/version.py +++ b/src/log-analytics-solution/azext_log_analytics_solution/aaz/latest/monitor/__init__.py @@ -1,13 +1,11 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- +# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. +# Licensed under the MIT License. See License.txt in the project root for license information. # -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- -VERSION = "0.1.0" +# pylint: skip-file +# flake8: noqa +from .__cmd_group import * diff --git a/src/log-analytics-solution/azext_log_analytics_solution/aaz/latest/monitor/log_analytics/__cmd_group.py b/src/log-analytics-solution/azext_log_analytics_solution/aaz/latest/monitor/log_analytics/__cmd_group.py new file mode 100644 index 00000000000..16575d78395 --- /dev/null +++ b/src/log-analytics-solution/azext_log_analytics_solution/aaz/latest/monitor/log_analytics/__cmd_group.py @@ -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( + "monitor log-analytics", +) +class __CMDGroup(AAZCommandGroup): + """Manage Azure log analytics. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/log-analytics-solution/azext_log_analytics_solution/aaz/latest/monitor/log_analytics/__init__.py b/src/log-analytics-solution/azext_log_analytics_solution/aaz/latest/monitor/log_analytics/__init__.py new file mode 100644 index 00000000000..5a9d61963d6 --- /dev/null +++ b/src/log-analytics-solution/azext_log_analytics_solution/aaz/latest/monitor/log_analytics/__init__.py @@ -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 * diff --git a/src/log-analytics-solution/azext_log_analytics_solution/aaz/latest/monitor/log_analytics/solution/__cmd_group.py b/src/log-analytics-solution/azext_log_analytics_solution/aaz/latest/monitor/log_analytics/solution/__cmd_group.py new file mode 100644 index 00000000000..4f701d4233a --- /dev/null +++ b/src/log-analytics-solution/azext_log_analytics_solution/aaz/latest/monitor/log_analytics/solution/__cmd_group.py @@ -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( + "monitor log-analytics solution", +) +class __CMDGroup(AAZCommandGroup): + """Commands to manage monitor log-analytics solution. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/log-analytics-solution/azext_log_analytics_solution/aaz/latest/monitor/log_analytics/solution/__init__.py b/src/log-analytics-solution/azext_log_analytics_solution/aaz/latest/monitor/log_analytics/solution/__init__.py new file mode 100644 index 00000000000..db73033039b --- /dev/null +++ b/src/log-analytics-solution/azext_log_analytics_solution/aaz/latest/monitor/log_analytics/solution/__init__.py @@ -0,0 +1,17 @@ +# -------------------------------------------------------------------------------------------- +# 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 * +from ._wait import * diff --git a/src/log-analytics-solution/azext_log_analytics_solution/aaz/latest/monitor/log_analytics/solution/_create.py b/src/log-analytics-solution/azext_log_analytics_solution/aaz/latest/monitor/log_analytics/solution/_create.py new file mode 100644 index 00000000000..7dce884b0a8 --- /dev/null +++ b/src/log-analytics-solution/azext_log_analytics_solution/aaz/latest/monitor/log_analytics/solution/_create.py @@ -0,0 +1,299 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "monitor log-analytics solution create", +) +class Create(AAZCommand): + """Create the Solution. + + :example: Create a log-analytics solution of type Containers + az monitor log-analytics solution create --resource-group MyResourceGroup --solution-type Containers --tags key=value --workspace "/subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/ Microsoft.OperationalInsights/workspaces/{WorkspaceName}" + """ + + _aaz_info = { + "version": "2015-11-01-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.operationsmanagement/solutions/{}", "2015-11-01-preview"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="Name of the log-analytics solution. It should be in the format of solutionType(workspaceName). SolutionType part is case sensitive.", + required=True, + ) + _args_schema.location = AAZResourceLocationArg( + help="Resource location", + fmt=AAZResourceLocationArgFormat( + resource_group_arg="resource_group", + ), + ) + _args_schema.plan = AAZObjectArg( + options=["--plan"], + help="Plan for solution object supported by the OperationsManagement resource provider.", + ) + _args_schema.workspace_id = AAZStrArg( + options=["--workspace-id"], + help="The azure resourceId for the workspace where the solution will be deployed/enabled.", + ) + _args_schema.tags = AAZDictArg( + options=["--tags"], + help="Space-separated tags: key[=value] [key[=value] ...]. Use \"\" to clear existing tags.", + ) + + plan = cls._args_schema.plan + plan.name = AAZStrArg( + options=["name"], + help="name of the solution to be created. For Microsoft published solution it should be in the format of solutionType(workspaceName). SolutionType part is case sensitive. For third party solution, it can be anything.", + ) + plan.product = AAZStrArg( + options=["product"], + help="name of the solution to enabled/add. For Microsoft published gallery solution it should be in the format of OMSGallery/. This is case sensitive", + ) + plan.promotion_code = AAZStrArg( + options=["promotion-code"], + help="promotionCode, Not really used now, can you left as empty", + ) + plan.publisher = AAZStrArg( + options=["publisher"], + help="Publisher name. For gallery solution, it is Microsoft.", + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg() + + # define Arg Group "Properties" + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.SolutionsCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class SolutionsCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/solutions/{solutionName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "solutionName", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2015-11-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("location", AAZStrType, ".location") + _builder.set_prop("plan", AAZObjectType, ".plan") + _builder.set_prop("properties", AAZObjectType) + _builder.set_prop("tags", AAZDictType, ".tags") + + plan = _builder.get(".plan") + if plan is not None: + plan.set_prop("name", AAZStrType, ".name") + plan.set_prop("product", AAZStrType, ".product") + plan.set_prop("promotionCode", AAZStrType, ".promotion_code") + plan.set_prop("publisher", AAZStrType, ".publisher") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("workspaceResourceId", AAZStrType, ".workspace_id", typ_kwargs={"flags": {"required": True}}) + + tags = _builder.get(".tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + return self.serialize_content(_content_value) + + def on_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_201 + ) + + _schema_on_201 = None + + @classmethod + def _build_schema_on_201(cls): + if cls._schema_on_201 is not None: + return cls._schema_on_201 + + cls._schema_on_201 = AAZObjectType() + + _schema_on_201 = cls._schema_on_201 + _schema_on_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_201.location = AAZStrType() + _schema_on_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_201.plan = AAZObjectType() + _schema_on_201.properties = AAZObjectType() + _schema_on_201.tags = AAZDictType() + _schema_on_201.type = AAZStrType( + flags={"read_only": True}, + ) + + plan = cls._schema_on_201.plan + plan.name = AAZStrType() + plan.product = AAZStrType() + plan.promotion_code = AAZStrType( + serialized_name="promotionCode", + ) + plan.publisher = AAZStrType() + + properties = cls._schema_on_201.properties + properties.contained_resources = AAZListType( + serialized_name="containedResources", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.referenced_resources = AAZListType( + serialized_name="referencedResources", + ) + properties.workspace_resource_id = AAZStrType( + serialized_name="workspaceResourceId", + flags={"required": True}, + ) + + contained_resources = cls._schema_on_201.properties.contained_resources + contained_resources.Element = AAZStrType() + + referenced_resources = cls._schema_on_201.properties.referenced_resources + referenced_resources.Element = AAZStrType() + + tags = cls._schema_on_201.tags + tags.Element = AAZStrType() + + return cls._schema_on_201 + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/log-analytics-solution/azext_log_analytics_solution/aaz/latest/monitor/log_analytics/solution/_delete.py b/src/log-analytics-solution/azext_log_analytics_solution/aaz/latest/monitor/log_analytics/solution/_delete.py new file mode 100644 index 00000000000..93f92010844 --- /dev/null +++ b/src/log-analytics-solution/azext_log_analytics_solution/aaz/latest/monitor/log_analytics/solution/_delete.py @@ -0,0 +1,151 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "monitor log-analytics solution delete", + confirmation="Are you sure you want to perform this operation?", +) +class Delete(AAZCommand): + """Delete the solution in the subscription. + + :example: Delete a log-analytics solution + az monitor log-analytics solution delete --resource-group MyResourceGroup --name SolutionName + """ + + _aaz_info = { + "version": "2015-11-01-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.operationsmanagement/solutions/{}", "2015-11-01-preview"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, None) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="Name of the log-analytics solution. It should be in the format of solutionType(workspaceName). SolutionType part is case sensitive.", + required=True, + id_part="name", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.SolutionsDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class SolutionsDelete(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/solutions/{solutionName}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "solutionName", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2015-11-01-preview", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/log-analytics-solution/azext_log_analytics_solution/aaz/latest/monitor/log_analytics/solution/_list.py b/src/log-analytics-solution/azext_log_analytics_solution/aaz/latest/monitor/log_analytics/solution/_list.py new file mode 100644 index 00000000000..bda67badb59 --- /dev/null +++ b/src/log-analytics-solution/azext_log_analytics_solution/aaz/latest/monitor/log_analytics/solution/_list.py @@ -0,0 +1,344 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "monitor log-analytics solution list", +) +class List(AAZCommand): + """List the solution list. It will retrieve both first party and third party solutions + + :example: List all log-analytics solutions in the current subscription + az monitor log-analytics solution list + + :example: List all log-analytics solutions in a subscription + az monitor log-analytics solution list --subscription MySubscription + + :example: List all log-analytics solutions in a resource group + az monitor log-analytics solution list --resource-group MyResourceGroup + """ + + _aaz_info = { + "version": "2015-11-01-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/microsoft.operationsmanagement/solutions", "2015-11-01-preview"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.operationsmanagement/solutions", "2015-11-01-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_group = AAZResourceGroupNameArg() + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + condition_0 = has_value(self.ctx.subscription_id) and has_value(self.ctx.args.resource_group) is not True + condition_1 = has_value(self.ctx.args.resource_group) and has_value(self.ctx.subscription_id) + if condition_0: + self.SolutionsListBySubscription(ctx=self.ctx)() + if condition_1: + self.SolutionsListByResourceGroup(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class SolutionsListBySubscription(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/providers/Microsoft.OperationsManagement/solutions", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2015-11-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.value = AAZListType() + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.location = AAZStrType() + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.plan = AAZObjectType() + _element.properties = AAZObjectType() + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + plan = cls._schema_on_200.value.Element.plan + plan.name = AAZStrType() + plan.product = AAZStrType() + plan.promotion_code = AAZStrType( + serialized_name="promotionCode", + ) + plan.publisher = AAZStrType() + + properties = cls._schema_on_200.value.Element.properties + properties.contained_resources = AAZListType( + serialized_name="containedResources", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.referenced_resources = AAZListType( + serialized_name="referencedResources", + ) + properties.workspace_resource_id = AAZStrType( + serialized_name="workspaceResourceId", + flags={"required": True}, + ) + + contained_resources = cls._schema_on_200.value.Element.properties.contained_resources + contained_resources.Element = AAZStrType() + + referenced_resources = cls._schema_on_200.value.Element.properties.referenced_resources + referenced_resources.Element = AAZStrType() + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + class SolutionsListByResourceGroup(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/solutions", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2015-11-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.value = AAZListType() + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.location = AAZStrType() + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.plan = AAZObjectType() + _element.properties = AAZObjectType() + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + plan = cls._schema_on_200.value.Element.plan + plan.name = AAZStrType() + plan.product = AAZStrType() + plan.promotion_code = AAZStrType( + serialized_name="promotionCode", + ) + plan.publisher = AAZStrType() + + properties = cls._schema_on_200.value.Element.properties + properties.contained_resources = AAZListType( + serialized_name="containedResources", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.referenced_resources = AAZListType( + serialized_name="referencedResources", + ) + properties.workspace_resource_id = AAZStrType( + serialized_name="workspaceResourceId", + flags={"required": True}, + ) + + contained_resources = cls._schema_on_200.value.Element.properties.contained_resources + contained_resources.Element = AAZStrType() + + referenced_resources = cls._schema_on_200.value.Element.properties.referenced_resources + referenced_resources.Element = AAZStrType() + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/log-analytics-solution/azext_log_analytics_solution/aaz/latest/monitor/log_analytics/solution/_show.py b/src/log-analytics-solution/azext_log_analytics_solution/aaz/latest/monitor/log_analytics/solution/_show.py new file mode 100644 index 00000000000..be91d0765a5 --- /dev/null +++ b/src/log-analytics-solution/azext_log_analytics_solution/aaz/latest/monitor/log_analytics/solution/_show.py @@ -0,0 +1,210 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "monitor log-analytics solution show", +) +class Show(AAZCommand): + """Get the user solution. + + :example: Show a log-analytics solution + az monitor log-analytics solution show --resource-group MyResourceGroup --name SolutionName + """ + + _aaz_info = { + "version": "2015-11-01-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.operationsmanagement/solutions/{}", "2015-11-01-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="Name of the log-analytics solution. It should be in the format of solutionType(workspaceName). SolutionType part is case sensitive.", + required=True, + id_part="name", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.SolutionsGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class SolutionsGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/solutions/{solutionName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "solutionName", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2015-11-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.location = AAZStrType() + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.plan = AAZObjectType() + _schema_on_200.properties = AAZObjectType() + _schema_on_200.tags = AAZDictType() + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + plan = cls._schema_on_200.plan + plan.name = AAZStrType() + plan.product = AAZStrType() + plan.promotion_code = AAZStrType( + serialized_name="promotionCode", + ) + plan.publisher = AAZStrType() + + properties = cls._schema_on_200.properties + properties.contained_resources = AAZListType( + serialized_name="containedResources", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.referenced_resources = AAZListType( + serialized_name="referencedResources", + ) + properties.workspace_resource_id = AAZStrType( + serialized_name="workspaceResourceId", + flags={"required": True}, + ) + + contained_resources = cls._schema_on_200.properties.contained_resources + contained_resources.Element = AAZStrType() + + referenced_resources = cls._schema_on_200.properties.referenced_resources + referenced_resources.Element = AAZStrType() + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/log-analytics-solution/azext_log_analytics_solution/aaz/latest/monitor/log_analytics/solution/_update.py b/src/log-analytics-solution/azext_log_analytics_solution/aaz/latest/monitor/log_analytics/solution/_update.py new file mode 100644 index 00000000000..43b9dd0cfa6 --- /dev/null +++ b/src/log-analytics-solution/azext_log_analytics_solution/aaz/latest/monitor/log_analytics/solution/_update.py @@ -0,0 +1,252 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "monitor log-analytics solution update", +) +class Update(AAZCommand): + """Update a Solution. Only updating tags supported. + + :example: Update a log-analytics solution + az monitor log-analytics solution update --resource-group MyResourceGroup --name SolutionName --tags key=value + """ + + _aaz_info = { + "version": "2015-11-01-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.operationsmanagement/solutions/{}", "2015-11-01-preview"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="Name of the log-analytics solution. It should be in the format of solutionType(workspaceName). SolutionType part is case sensitive.", + required=True, + id_part="name", + ) + _args_schema.tags = AAZDictArg( + options=["--tags"], + help="Space-separated tags: key[=value] [key[=value] ...]. Use \"\" to clear existing tags.", + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg() + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.SolutionsUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class SolutionsUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/solutions/{solutionName}", + **self.url_parameters + ) + + @property + def method(self): + return "PATCH" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "solutionName", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2015-11-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("tags", AAZDictType, ".tags") + + tags = _builder.get(".tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + return self.serialize_content(_content_value) + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.location = AAZStrType() + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.plan = AAZObjectType() + _schema_on_200.properties = AAZObjectType() + _schema_on_200.tags = AAZDictType() + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + plan = cls._schema_on_200.plan + plan.name = AAZStrType() + plan.product = AAZStrType() + plan.promotion_code = AAZStrType( + serialized_name="promotionCode", + ) + plan.publisher = AAZStrType() + + properties = cls._schema_on_200.properties + properties.contained_resources = AAZListType( + serialized_name="containedResources", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.referenced_resources = AAZListType( + serialized_name="referencedResources", + ) + properties.workspace_resource_id = AAZStrType( + serialized_name="workspaceResourceId", + flags={"required": True}, + ) + + contained_resources = cls._schema_on_200.properties.contained_resources + contained_resources.Element = AAZStrType() + + referenced_resources = cls._schema_on_200.properties.referenced_resources + referenced_resources.Element = AAZStrType() + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _UpdateHelper: + """Helper class for Update""" + + +__all__ = ["Update"] diff --git a/src/log-analytics-solution/azext_log_analytics_solution/aaz/latest/monitor/log_analytics/solution/_wait.py b/src/log-analytics-solution/azext_log_analytics_solution/aaz/latest/monitor/log_analytics/solution/_wait.py new file mode 100644 index 00000000000..2d911d09c7b --- /dev/null +++ b/src/log-analytics-solution/azext_log_analytics_solution/aaz/latest/monitor/log_analytics/solution/_wait.py @@ -0,0 +1,206 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "monitor log-analytics solution wait", +) +class Wait(AAZWaitCommand): + """Place the CLI in a waiting state until a condition is met. + """ + + _aaz_info = { + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.operationsmanagement/solutions/{}", "2015-11-01-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="Name of the log-analytics solution. It should be in the format of solutionType(workspaceName). SolutionType part is case sensitive.", + required=True, + id_part="name", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.SolutionsGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False) + return result + + class SolutionsGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/solutions/{solutionName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "solutionName", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2015-11-01-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.location = AAZStrType() + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.plan = AAZObjectType() + _schema_on_200.properties = AAZObjectType() + _schema_on_200.tags = AAZDictType() + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + plan = cls._schema_on_200.plan + plan.name = AAZStrType() + plan.product = AAZStrType() + plan.promotion_code = AAZStrType( + serialized_name="promotionCode", + ) + plan.publisher = AAZStrType() + + properties = cls._schema_on_200.properties + properties.contained_resources = AAZListType( + serialized_name="containedResources", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.referenced_resources = AAZListType( + serialized_name="referencedResources", + ) + properties.workspace_resource_id = AAZStrType( + serialized_name="workspaceResourceId", + flags={"required": True}, + ) + + contained_resources = cls._schema_on_200.properties.contained_resources + contained_resources.Element = AAZStrType() + + referenced_resources = cls._schema_on_200.properties.referenced_resources + referenced_resources.Element = AAZStrType() + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _WaitHelper: + """Helper class for Wait""" + + +__all__ = ["Wait"] diff --git a/src/log-analytics-solution/azext_log_analytics_solution/aaz/latest/monitor/log_analytics/workspace/__cmd_group.py b/src/log-analytics-solution/azext_log_analytics_solution/aaz/latest/monitor/log_analytics/workspace/__cmd_group.py new file mode 100644 index 00000000000..c55331736e6 --- /dev/null +++ b/src/log-analytics-solution/azext_log_analytics_solution/aaz/latest/monitor/log_analytics/workspace/__cmd_group.py @@ -0,0 +1,20 @@ +# -------------------------------------------------------------------------------------------- +# 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 * + + +class __CMDGroup(AAZCommandGroup): + """Manage Azure log analytics workspace + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/log-analytics-solution/azext_log_analytics_solution/aaz/latest/monitor/log_analytics/workspace/__init__.py b/src/log-analytics-solution/azext_log_analytics_solution/aaz/latest/monitor/log_analytics/workspace/__init__.py new file mode 100644 index 00000000000..28d5f355813 --- /dev/null +++ b/src/log-analytics-solution/azext_log_analytics_solution/aaz/latest/monitor/log_analytics/workspace/__init__.py @@ -0,0 +1,12 @@ +# -------------------------------------------------------------------------------------------- +# 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 ._show import * diff --git a/src/log-analytics-solution/azext_log_analytics_solution/aaz/latest/monitor/log_analytics/workspace/_show.py b/src/log-analytics-solution/azext_log_analytics_solution/aaz/latest/monitor/log_analytics/workspace/_show.py new file mode 100644 index 00000000000..eb1dfc51c18 --- /dev/null +++ b/src/log-analytics-solution/azext_log_analytics_solution/aaz/latest/monitor/log_analytics/workspace/_show.py @@ -0,0 +1,351 @@ +# -------------------------------------------------------------------------------------------- +# 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 * + + +class Show(AAZCommand): + """Show a workspace instance. + + :example: Show a workspace instance. + az monitor log-analytics workspace show --resource-group MyResourceGroup --workspace-name MyWorkspace + """ + + _aaz_info = { + "version": "2022-10-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.operationalinsights/workspaces/{}", "2022-10-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.workspace_name = AAZStrArg( + options=["-n", "--name", "--workspace-name"], + help="Name of the Log Analytics Workspace.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$", + max_length=63, + min_length=4, + ), + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.WorkspacesGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class WorkspacesGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "workspaceName", self.ctx.args.workspace_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-10-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.etag = AAZStrType() + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.identity = AAZObjectType() + _schema_on_200.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.tags = AAZDictType() + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = cls._schema_on_200.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType( + flags={"required": True}, + ) + identity.user_assigned_identities = AAZDictType( + serialized_name="userAssignedIdentities", + ) + + user_assigned_identities = cls._schema_on_200.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectType() + + _element = cls._schema_on_200.identity.user_assigned_identities.Element + _element.client_id = AAZStrType( + serialized_name="clientId", + flags={"read_only": True}, + ) + _element.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.created_date = AAZStrType( + serialized_name="createdDate", + flags={"read_only": True}, + ) + properties.customer_id = AAZStrType( + serialized_name="customerId", + flags={"read_only": True}, + ) + properties.default_data_collection_rule_resource_id = AAZStrType( + serialized_name="defaultDataCollectionRuleResourceId", + ) + properties.features = AAZObjectType() + properties.force_cmk_for_query = AAZBoolType( + serialized_name="forceCmkForQuery", + ) + properties.modified_date = AAZStrType( + serialized_name="modifiedDate", + flags={"read_only": True}, + ) + properties.private_link_scoped_resources = AAZListType( + serialized_name="privateLinkScopedResources", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.public_network_access_for_ingestion = AAZStrType( + serialized_name="publicNetworkAccessForIngestion", + ) + properties.public_network_access_for_query = AAZStrType( + serialized_name="publicNetworkAccessForQuery", + ) + properties.retention_in_days = AAZIntType( + serialized_name="retentionInDays", + nullable=True, + ) + properties.sku = AAZObjectType() + properties.workspace_capping = AAZObjectType( + serialized_name="workspaceCapping", + ) + + features = cls._schema_on_200.properties.features + features.cluster_resource_id = AAZStrType( + serialized_name="clusterResourceId", + nullable=True, + ) + features.disable_local_auth = AAZBoolType( + serialized_name="disableLocalAuth", + nullable=True, + ) + features.enable_data_export = AAZBoolType( + serialized_name="enableDataExport", + nullable=True, + ) + features.enable_log_access_using_only_resource_permissions = AAZBoolType( + serialized_name="enableLogAccessUsingOnlyResourcePermissions", + nullable=True, + ) + features.immediate_purge_data_on30_days = AAZBoolType( + serialized_name="immediatePurgeDataOn30Days", + nullable=True, + ) + + private_link_scoped_resources = cls._schema_on_200.properties.private_link_scoped_resources + private_link_scoped_resources.Element = AAZObjectType( + flags={"read_only": True}, + ) + + _element = cls._schema_on_200.properties.private_link_scoped_resources.Element + _element.resource_id = AAZStrType( + serialized_name="resourceId", + flags={"read_only": True}, + ) + _element.scope_id = AAZStrType( + serialized_name="scopeId", + flags={"read_only": True}, + ) + + sku = cls._schema_on_200.properties.sku + sku.capacity_reservation_level = AAZIntType( + serialized_name="capacityReservationLevel", + ) + sku.last_sku_update = AAZStrType( + serialized_name="lastSkuUpdate", + flags={"read_only": True}, + ) + sku.name = AAZStrType( + flags={"required": True}, + ) + + workspace_capping = cls._schema_on_200.properties.workspace_capping + workspace_capping.daily_quota_gb = AAZFloatType( + serialized_name="dailyQuotaGb", + ) + workspace_capping.data_ingestion_status = AAZStrType( + serialized_name="dataIngestionStatus", + flags={"read_only": True}, + ) + workspace_capping.quota_next_reset_time = AAZStrType( + serialized_name="quotaNextResetTime", + flags={"read_only": True}, + ) + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + flags={"read_only": True}, + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + flags={"read_only": True}, + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + flags={"read_only": True}, + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + flags={"read_only": True}, + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + flags={"read_only": True}, + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/log-analytics-solution/azext_log_analytics_solution/azext_metadata.json b/src/log-analytics-solution/azext_log_analytics_solution/azext_metadata.json index 707b3ad69f7..c91b1a720cc 100644 --- a/src/log-analytics-solution/azext_log_analytics_solution/azext_metadata.json +++ b/src/log-analytics-solution/azext_log_analytics_solution/azext_metadata.json @@ -1,4 +1,3 @@ { - "azext.isExperimental": true, - "azext.minCliCoreVersion": "2.3.0" + "azext.minCliCoreVersion": "2.50.0" } \ No newline at end of file diff --git a/src/log-analytics-solution/azext_log_analytics_solution/commands.py b/src/log-analytics-solution/azext_log_analytics_solution/commands.py index dbdc428cb58..330fb3b43f4 100644 --- a/src/log-analytics-solution/azext_log_analytics_solution/commands.py +++ b/src/log-analytics-solution/azext_log_analytics_solution/commands.py @@ -7,20 +7,13 @@ # pylint: disable=too-many-lines # pylint: disable=too-many-statements # pylint: disable=too-many-locals -from azure.cli.core.commands import CliCommandType -from ._client_factory import cf_solutions def load_command_table(self, _): - log_analytics_solution_solutions = CliCommandType( - operations_tmpl='azext_log_analytics_solution.vendored_sdks.operationsmanagement.operations._solutions_operations#SolutionsOperations.{}', - client_factory=cf_solutions) - - with self.command_group('monitor log-analytics solution', log_analytics_solution_solutions, - client_factory=cf_solutions, is_experimental=True) as g: - g.custom_command('create', 'create_monitor_log_analytics_solution', supports_no_wait=True) - g.custom_command('update', 'update_monitor_log_analytics_solution', supports_no_wait=True) - g.custom_command('delete', 'delete_monitor_log_analytics_solution', supports_no_wait=True, confirmation=True) - g.custom_show_command('show', 'get_monitor_log_analytics_solution') - g.custom_command('list', 'list_monitor_log_analytics_solution') + with self.command_group('monitor log-analytics solution'): + from .custom import SolutionCreate, SolutionUpdate, SolutionDelete, SolutionShow + self.command_table['monitor log-analytics solution create'] = SolutionCreate(loader=self) + self.command_table['monitor log-analytics solution update'] = SolutionUpdate(loader=self) + self.command_table['monitor log-analytics solution delete'] = SolutionDelete(loader=self) + self.command_table['monitor log-analytics solution show'] = SolutionShow(loader=self) diff --git a/src/log-analytics-solution/azext_log_analytics_solution/custom.py b/src/log-analytics-solution/azext_log_analytics_solution/custom.py index 21b1c954141..4f64e249cd9 100644 --- a/src/log-analytics-solution/azext_log_analytics_solution/custom.py +++ b/src/log-analytics-solution/azext_log_analytics_solution/custom.py @@ -2,68 +2,81 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -# pylint: disable=line-too-long -# pylint: disable=too-many-statements -# pylint: disable=too-many-lines -# pylint: disable=too-many-locals -# pylint: disable=unused-argument +# pylint: disable=line-too-long, protected-access -from azure.cli.core.util import sdk_no_wait +from .aaz.latest.monitor.log_analytics.solution import Create as _SolutionCreate, Update as _SolutionUpdate, Delete as _SolutionDelete, Show as _SolutionShow, List as _SolutionList +from .aaz.latest.monitor.log_analytics.workspace import Show as _WorkspaceShow -def create_monitor_log_analytics_solution(client, - resource_group_name, - solution_type, - workspace_resource_id, - location, - solution_name=None, - plan_publisher=None, - plan_product=None, - tags=None, - no_wait=False): +class SolutionCreate(_SolutionCreate): + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + from azure.cli.core.aaz import AAZStrArg, AAZResourceIdArg, AAZResourceIdArgFormat + args_schema = super()._build_arguments_schema(*args, **kwargs) + args_schema.workspace = AAZResourceIdArg( + options=['--workspace', '-w'], + help='The name or resource ID of the log analytics workspace with which the solution will be linked.', + required=True, + fmt=AAZResourceIdArgFormat( + "/subscriptions/{subscription}/resourceGroups/{resource_group}/providers/Microsoft.OperationalInsights/workspaces/{}" + ) + ) + args_schema.solution_type = AAZStrArg( + options=['--solution-type', '-t'], + required=True, + help='Type of the log-analytics solution. ' + 'The most used are: SecurityCenterFree, Security, Updates, ContainerInsights, ServiceMap, AzureActivity, ChangeTracking, VMInsights, SecurityInsights, NetworkMonitoring, SQLVulnerabilityAssessment, SQLAdvancedThreatProtection, AntiMalware, AzureAutomation, LogicAppsManagement, SQLDataClassification.' + ) + args_schema.workspace_id._registered = False + args_schema.plan._registered = False + args_schema.location._registered = False + args_schema.name._required = False + args_schema.name._registered = False + return args_schema - body = { - 'location': location, - 'tags': tags, - 'properties': { - "workspace_resource_id": workspace_resource_id - }, - "plan": { - "name": solution_name, - "product": "OMSGallery/" + solution_type, + def pre_operations(self): + from msrestazure.tools import parse_resource_id + from azure.cli.core.azclierror import ArgumentUsageError + args = self.ctx.args + args.workspace_id = args.workspace + + workspace_param = parse_resource_id(args.workspace.to_serialized_data()) + if workspace_param['resource_group'] != args.resource_group.to_serialized_data(): + raise ArgumentUsageError('usage error: workspace and solution must be under the same resource group') + workspace = _WorkspaceShow(cli_ctx=self.cli_ctx)(command_args={ + "resource_group": workspace_param['resource_group'], + "workspace_name": workspace_param['resource_name'] + }) + + args.location = workspace['location'] + args.plan = { + "name": args.solution_type.to_serialized_data(), + "product": "OMSGallery/" + args.solution_type.to_serialized_data(), "publisher": "Microsoft", "promotion_code": "" } - } - - return sdk_no_wait(no_wait, client.create_or_update, resource_group_name=resource_group_name, - solution_name=solution_name, parameters=body) - - -def update_monitor_log_analytics_solution(client, - resource_group_name, - solution_name, - tags=None, - no_wait=False): - - return sdk_no_wait(no_wait, client.update, resource_group_name=resource_group_name, - solution_name=solution_name, tags=tags) + args.name = args.solution_type.to_serialized_data() + "(" + args.workspace.to_serialized_data().split("/")[-1] + ")" -def delete_monitor_log_analytics_solution(client, - resource_group_name, - solution_name, - no_wait=False): - return sdk_no_wait(no_wait, client.delete, resource_group_name=resource_group_name, solution_name=solution_name) +class SolutionUpdate(_SolutionUpdate): + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + args_schema = super()._build_arguments_schema(*args, **kwargs) + args_schema.name._id_part = '' + return args_schema -def get_monitor_log_analytics_solution(client, - resource_group_name, - solution_name): - return client.get(resource_group_name=resource_group_name, solution_name=solution_name) +class SolutionDelete(_SolutionDelete): + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + args_schema = super()._build_arguments_schema(*args, **kwargs) + args_schema.name._id_part = '' + return args_schema -def list_monitor_log_analytics_solution(client, resource_group_name=None): - if resource_group_name: - return client.list_by_resource_group(resource_group_name=resource_group_name) - return client.list_by_subscription() +class SolutionShow(_SolutionShow): + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + args_schema = super()._build_arguments_schema(*args, **kwargs) + args_schema.name._id_part = '' + return args_schema diff --git a/src/log-analytics-solution/azext_log_analytics_solution/tests/latest/log_analytics.json b/src/log-analytics-solution/azext_log_analytics_solution/tests/latest/log_analytics.json index 538cbdf9c46..bad63c8157e 100644 --- a/src/log-analytics-solution/azext_log_analytics_solution/tests/latest/log_analytics.json +++ b/src/log-analytics-solution/azext_log_analytics_solution/tests/latest/log_analytics.json @@ -3,9 +3,9 @@ "legacy": "0", "searchVersion": "1" }, - "retentionInDays": "7", + "retentionInDays": "30", "sku": { - "name": "free" + "name": "pergb2018" }, "source": "Azure" } \ No newline at end of file diff --git a/src/log-analytics-solution/azext_log_analytics_solution/tests/latest/recordings/test_log_analytics_solution.yaml b/src/log-analytics-solution/azext_log_analytics_solution/tests/latest/recordings/test_log_analytics_solution.yaml index 70cd9ab055e..d425058a73e 100644 --- a/src/log-analytics-solution/azext_log_analytics_solution/tests/latest/recordings/test_log_analytics_solution.yaml +++ b/src/log-analytics-solution/azext_log_analytics_solution/tests/latest/recordings/test_log_analytics_solution.yaml @@ -13,12 +13,9 @@ interactions: ParameterSetName: - -g -n -l --resource-type -p User-Agent: - - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3 - azure-mgmt-resource/9.0.0 Azure-SDK-For-Python AZURECLI/2.5.1 - accept-language: - - en-US + - AZURECLI/2.51.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.10.9 (Windows-10-10.0.22621-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.OperationalInsights?api-version=2019-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.OperationalInsights?api-version=2022-09-01 response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.OperationalInsights","namespace":"Microsoft.OperationalInsights","authorizations":[{"applicationId":"d2a0a418-0aac-4541-82b2-b3142c89da77","roleDefinitionId":"86695298-2eb9-48a7-9ec3-2fdb38b6878b"},{"applicationId":"ca7f3f0b-7d91-482c-8e09-c5d840d0eac5","roleDefinitionId":"5d5a2e56-9835-44aa-93db-d2f19e155438"}],"resourceTypes":[{"resourceType":"workspaces","locations":["East @@ -26,50 +23,126 @@ interactions: East","UK South","Central India","Canada Central","West US 2","Australia Central","Australia East","France Central","Korea Central","North Europe","Central US","East Asia","East US 2","South Central US","North Central US","West US","UK West","South Africa - North","Brazil South","Switzerland North","Switzerland West"],"apiVersions":["2020-03-01-preview","2017-04-26-preview","2017-03-15-preview","2017-03-03-preview","2017-01-01-preview","2015-11-01-preview","2015-03-20"],"capabilities":"CrossResourceGroupResourceMove, - CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"locations","locations":[],"apiVersions":["2020-03-01-preview","2019-08-01-preview","2017-04-26-preview","2017-03-15-preview","2017-03-03-preview","2017-01-01-preview","2015-11-01-preview","2015-03-20"],"defaultApiVersion":"2015-11-01-preview","capabilities":"None"},{"resourceType":"locations/operationStatuses","locations":["East + North","Brazil South","Switzerland North","Switzerland West","Germany West + Central","Australia Central 2","UAE Central","UAE North","Japan West","Brazil + Southeast","Norway East","Norway West","France South","South India","Korea + South","Jio India Central","Jio India West","Qatar Central","Canada East","West + US 3","Sweden Central","South Africa West","Germany North","Poland Central"],"apiVersions":["2022-10-01","2021-12-01-preview","2021-06-01","2021-03-01-privatepreview","2020-10-01","2020-08-01","2020-03-01-preview","2017-04-26-preview","2017-03-15-preview","2017-03-03-preview","2017-01-01-preview","2015-11-01-preview","2015-03-20"],"defaultApiVersion":"2022-10-01","capabilities":"CrossResourceGroupResourceMove, + CrossSubscriptionResourceMove, SystemAssignedResourceIdentity, SupportsTags, + SupportsLocation"},{"resourceType":"querypacks","locations":["West Central + US","East US","South Central US","North Europe","West Europe","Southeast Asia","West + US 2","UK South","Canada Central","Central India","Japan East","Australia + East","Korea Central","France Central","Central US","East US 2","East Asia","West + US","South Africa North","North Central US","Brazil South","Switzerland North","Norway + East","Australia Southeast","Australia Central 2","Germany West Central","Switzerland + West","UAE Central","UK West","Brazil Southeast","Japan West","UAE North","Australia + Central","France South","South India","Korea South","Jio India Central","Jio + India West","Qatar Central","Canada East","West US 3","Sweden Central"],"apiVersions":["2019-09-01-preview","2019-09-01"],"capabilities":"SupportsTags, + SupportsLocation"},{"resourceType":"locations","locations":[],"apiVersions":["2020-10-01","2020-08-01","2020-03-01-preview","2019-08-01-preview","2017-04-26-preview","2017-03-15-preview","2017-03-03-preview","2017-01-01-preview","2015-11-01-preview","2015-03-20"],"defaultApiVersion":"2020-08-01","capabilities":"None"},{"resourceType":"locations/operationStatuses","locations":["East US","West Europe","Southeast Asia","Australia Southeast","West Central US","Japan East","UK South","Central India","Canada Central","West US 2","Australia Central","Australia East","France Central","Korea Central","North Europe","Central US","East Asia","East US 2","South Central US","North Central US","West US","UK West","South Africa - North","Brazil South","Switzerland North","Switzerland West"],"apiVersions":["2020-03-01-preview","2019-08-01-preview","2017-04-26-preview","2017-03-15-preview","2017-03-03-preview","2017-01-01-preview","2015-11-01-preview","2015-03-20"],"defaultApiVersion":"2015-11-01-preview","capabilities":"None"},{"resourceType":"workspaces/scopedPrivateLinkProxies","locations":["East + North","Brazil South","Switzerland North","Switzerland West","Germany West + Central","Australia Central 2","UAE Central","UAE North","Japan West","Brazil + Southeast","Norway East","Norway West","France South","South India","Korea + South","Jio India Central","Jio India West","Qatar Central","Canada East","West + US 3","Sweden Central","South Africa West","Germany North","Poland Central"],"apiVersions":["2023-01-01-preview","2022-10-01","2022-09-01-privatepreview","2021-12-01-preview","2020-10-01","2020-08-01","2020-03-01-preview","2019-08-01-preview","2017-04-26-preview","2017-03-15-preview","2017-03-03-preview","2017-01-01-preview","2015-11-01-preview","2015-03-20"],"defaultApiVersion":"2022-10-01","capabilities":"None"},{"resourceType":"workspaces/scopedPrivateLinkProxies","locations":["East US","West Europe","Southeast Asia","Australia Southeast","West Central US","Japan East","UK South","Central India","Canada Central","West US 2","Australia Central","Australia East","France Central","Korea Central","North Europe","Central US","East Asia","East US 2","South Central US","North Central US","West US","UK West","South Africa - North","Brazil South","Switzerland North","Switzerland West"],"apiVersions":["2020-03-01-preview","2019-08-01-preview","2015-11-01-preview"],"defaultApiVersion":"2015-11-01-preview","capabilities":"None"},{"resourceType":"workspaces/query","locations":[],"apiVersions":["2017-10-01"],"capabilities":"None"},{"resourceType":"workspaces/metadata","locations":[],"apiVersions":["2017-10-01"],"capabilities":"None"},{"resourceType":"workspaces/dataSources","locations":["East + North","Brazil South","Switzerland North","Switzerland West","Germany West + Central","Australia Central 2","UAE Central","UAE North","Japan West","Brazil + Southeast","Norway East","Norway West","France South","South India","Korea + South","Jio India Central","Jio India West","Qatar Central","Canada East","West + US 3","Sweden Central","South Africa West","Germany North","Poland Central"],"apiVersions":["2020-03-01-preview","2019-08-01-preview","2015-11-01-preview"],"defaultApiVersion":"2020-03-01-preview","capabilities":"None"},{"resourceType":"workspaces/api","locations":[],"apiVersions":["2020-08-01","2020-03-01-preview","2017-01-01-preview"],"capabilities":"None"},{"resourceType":"workspaces/query","locations":[],"apiVersions":["2017-10-01"],"capabilities":"None"},{"resourceType":"workspaces/metadata","locations":[],"apiVersions":["2017-10-01"],"capabilities":"None"},{"resourceType":"workspaces/purge","locations":[],"apiVersions":["2022-10-01","2020-10-01","2020-08-01","2017-04-26-preview","2015-03-20"],"capabilities":"None"},{"resourceType":"workspaces/operations","locations":[],"apiVersions":["2022-10-01","2020-08-01","2017-04-26-preview","2015-03-20"],"capabilities":"None"},{"resourceType":"workspaces/dataSources","locations":["East US","West Europe","Southeast Asia","Australia Southeast","West Central US","Japan East","UK South","Central India","Canada Central","West US 2","Australia Central","Australia East","France Central","Korea Central","North Europe","Central US","East Asia","East US 2","South Central US","North Central US","West US","UK West","South Africa - North","Brazil South","Switzerland North","Switzerland West"],"apiVersions":["2020-03-01-preview","2015-11-01-preview"],"defaultApiVersion":"2015-11-01-preview","capabilities":"None"},{"resourceType":"workspaces/linkedStorageAccounts","locations":["East + North","Brazil South","Switzerland North","Switzerland West","Germany West + Central","Australia Central 2","UAE Central","UAE North","Japan West","Brazil + Southeast","Norway East","Norway West","France South","South India","Korea + South","Jio India Central","Jio India West","Qatar Central","Canada East","West + US 3","Sweden Central","South Africa West","Germany North","Poland Central"],"apiVersions":["2020-08-01","2020-03-01-preview","2015-11-01-preview"],"defaultApiVersion":"2020-08-01","capabilities":"None"},{"resourceType":"workspaces/linkedStorageAccounts","locations":["East US","West Europe","Southeast Asia","Australia Southeast","West Central US","Japan East","UK South","Central India","Canada Central","West US 2","Australia Central","Australia East","France Central","Korea Central","North Europe","Central US","East Asia","East US 2","South Central US","North Central US","West US","UK West","South Africa - North","Brazil South","Switzerland North","Switzerland West"],"apiVersions":["2020-03-01-preview","2019-08-01-preview"],"defaultApiVersion":"2019-08-01-preview","capabilities":"None"},{"resourceType":"storageInsightConfigs","locations":[],"apiVersions":["2020-03-01-preview","2014-10-10"],"capabilities":"SupportsExtension"},{"resourceType":"workspaces/linkedServices","locations":["East + North","Brazil South","Switzerland North","Switzerland West","Germany West + Central","Australia Central 2","UAE Central","UAE North","Japan West","Brazil + Southeast","Norway East","Norway West","France South","South India","Korea + South","Jio India Central","Jio India West","Qatar Central","Canada East","West + US 3","Sweden Central","South Africa West","Germany North","Poland Central"],"apiVersions":["2020-08-01","2020-03-01-preview","2019-08-01-preview"],"defaultApiVersion":"2020-08-01","capabilities":"None"},{"resourceType":"workspaces/tables","locations":["East + US","West Europe","Southeast Asia","Australia Southeast","West Central US","Japan + East","UK South","Central India","Canada Central","West US 2","Australia East","Australia + Central","France Central","Korea Central","North Europe","Central US","East + Asia","East US 2","South Central US","North Central US","West US","UK West","South + Africa North","Brazil South","Switzerland North","Switzerland West","Germany + West Central","Australia Central 2","UAE Central","UAE North","Japan West","Brazil + Southeast","Norway East","Norway West","France South","South India","Korea + South","Jio India Central","Jio India West","Qatar Central","Canada East","West + US 3","Sweden Central","South Africa West","Germany North","Poland Central","East + US 2 EUAP","Sweden South","Central US EUAP","Israel Central","Italy North"],"apiVersions":["2021-07-01-privatepreview","2021-03-01-privatepreview","2020-10-01"],"capabilities":"None"},{"resourceType":"workspaces/storageInsightConfigs","locations":["East + US","West Europe","Southeast Asia","Australia Southeast","West Central US","Japan + East","UK South","Central India","Canada Central","West US 2","Australia East","Australia + Central","France Central","Korea Central","North Europe","Central US","East + Asia","East US 2","South Central US","North Central US","West US","UK West","South + Africa North","Brazil South","Switzerland North","Switzerland West","Germany + West Central","Australia Central 2","UAE Central","UAE North","Japan West","Brazil + Southeast","Norway East","Norway West","France South","South India","Korea + South","Jio India Central","Jio India West","Qatar Central","Canada East","West + US 3","Sweden Central","South Africa West","Germany North","Poland Central"],"apiVersions":["2020-08-01","2020-03-01-preview","2017-04-26-preview","2017-03-15-preview","2017-03-03-preview","2017-01-01-preview","2015-11-01-preview","2015-03-20"],"capabilities":"None"},{"resourceType":"storageInsightConfigs","locations":[],"apiVersions":["2020-08-01","2020-03-01-preview","2014-10-10"],"capabilities":"SupportsExtension"},{"resourceType":"workspaces/linkedServices","locations":["East US","West Europe","Southeast Asia","Australia Southeast","West Central US","Japan East","UK South","Central India","Canada Central","West US 2","Australia Central","Australia East","France Central","Korea Central","North Europe","Central US","East Asia","East US 2","South Central US","North Central US","West US","UK West","South Africa - North","Brazil South","Switzerland North","Switzerland West"],"apiVersions":["2020-03-01-preview","2019-08-01-preview","2015-11-01-preview"],"defaultApiVersion":"2015-11-01-preview","capabilities":"None"},{"resourceType":"linkTargets","locations":["East - US"],"apiVersions":["2020-03-01-preview","2015-03-20"],"capabilities":"None"},{"resourceType":"operations","locations":[],"apiVersions":["2020-03-01-preview","2015-11-01-preview","2014-11-10"],"defaultApiVersion":"2015-11-01-preview","capabilities":"None"},{"resourceType":"clusters","locations":["East + North","Brazil South","Switzerland North","Switzerland West","Germany West + Central","Australia Central 2","UAE Central","UAE North","Japan West","Brazil + Southeast","Norway East","Norway West","France South","South India","Korea + South","Jio India Central","Jio India West","Qatar Central","Canada East","West + US 3","Sweden Central","South Africa West","Germany North","Poland Central"],"apiVersions":["2020-08-01","2020-03-01-preview","2019-08-01-preview","2015-11-01-preview"],"defaultApiVersion":"2020-08-01","capabilities":"None"},{"resourceType":"linkTargets","locations":["East + US"],"apiVersions":["2020-03-01-preview","2015-03-20"],"capabilities":"None"},{"resourceType":"deletedWorkspaces","locations":["East US","West Europe","Southeast Asia","Australia Southeast","West Central US","Japan East","UK South","Central India","Canada Central","West US 2","Australia Central","Australia East","France Central","Korea Central","North Europe","Central US","East Asia","East US 2","South Central US","North Central US","West US","UK West","South Africa - North","Switzerland North","Switzerland West","Brazil South"],"apiVersions":["2020-03-01-preview","2019-08-01-preview"],"defaultApiVersion":"2019-08-01-preview","capabilities":"CrossResourceGroupResourceMove, + North","Brazil South","Switzerland North","Switzerland West","Germany West + Central","Australia Central 2","UAE Central","UAE North","Japan West","Brazil + Southeast","Norway East","Norway West","France South","South India","Korea + South","Jio India Central","Jio India West","Qatar Central","Canada East","West + US 3","Sweden Central","South Africa West","Germany North","Poland Central"],"apiVersions":["2022-10-01","2021-12-01-preview","2020-10-01","2020-08-01","2020-03-01-preview"],"defaultApiVersion":"2022-10-01","capabilities":"None"},{"resourceType":"operations","locations":[],"apiVersions":["2022-10-01","2021-12-01-preview","2020-10-01","2020-08-01","2020-03-01-preview","2015-11-01-preview","2014-11-10"],"defaultApiVersion":"2020-08-01","capabilities":"None"},{"resourceType":"clusters","locations":["East + US","West Europe","Southeast Asia","Australia Southeast","West Central US","Japan + East","UK South","Central India","Canada Central","West US 2","Australia Central","Australia + East","France Central","Korea Central","North Europe","Central US","East Asia","East + US 2","South Central US","North Central US","West US","UK West","South Africa + North","Switzerland North","Switzerland West","Germany West Central","Australia + Central 2","UAE Central","Brazil South","UAE North","Japan West","Brazil Southeast","Norway + East","Norway West","France South","South India","Korea South","Jio India + Central","Jio India West","Qatar Central","Canada East","West US 3","Sweden + Central","South Africa West","Germany North","Poland Central"],"apiVersions":["2021-06-01","2020-10-01","2020-08-01","2020-03-01-preview","2019-08-01-preview"],"defaultApiVersion":"2021-06-01","capabilities":"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity, SupportsTags, - SupportsLocation"}],"registrationState":"Registered","registrationPolicy":"RegistrationRequired"}' + SupportsLocation"},{"resourceType":"workspaces/dataExports","locations":["East + US","West Europe","Southeast Asia","Australia Southeast","West Central US","Japan + East","UK South","Central India","Canada Central","West US 2","Australia Central","Australia + East","France Central","Korea Central","North Europe","Central US","East Asia","East + US 2","South Central US","North Central US","West US","UK West","South Africa + North","Brazil South","Switzerland North","Switzerland West","Germany West + Central","Australia Central 2","UAE Central","UAE North","Japan West","Brazil + Southeast","Norway East","Norway West","France South","South India","Korea + South","Jio India Central","Jio India West","Qatar Central","Canada East","West + US 3","Sweden Central","South Africa West","Germany North","Poland Central"],"apiVersions":["2020-08-01","2020-03-01-preview","2019-08-01-preview"],"defaultApiVersion":"2020-08-01","capabilities":"None"},{"resourceType":"locations/notifyNetworkSecurityPerimeterUpdatesAvailable","locations":["North + Central US","East US 2 EUAP"],"apiVersions":["2021-10-01"],"defaultApiVersion":"2021-10-01","capabilities":"None"}],"registrationState":"Registered","registrationPolicy":"RegistrationRequired"}' headers: cache-control: - no-cache content-length: - - '5930' + - '13850' content-type: - application/json; charset=utf-8 date: - - Mon, 11 May 2020 02:57:16 GMT + - Tue, 29 Aug 2023 07:30:05 GMT expires: - '-1' pragma: @@ -85,7 +158,7 @@ interactions: message: OK - request: body: '{"location": "westus", "properties": {"features": {"legacy": "0", "searchVersion": - "1"}, "retentionInDays": "7", "sku": {"name": "free"}, "source": "Azure"}}' + "1"}, "retentionInDays": "30", "sku": {"name": "pergb2018"}, "source": "Azure"}}' headers: Accept: - application/json @@ -96,45 +169,39 @@ interactions: Connection: - keep-alive Content-Length: - - '157' + - '163' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - -g -n -l --resource-type -p User-Agent: - - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3 - azure-mgmt-resource/9.0.0 Azure-SDK-For-Python AZURECLI/2.5.1 - accept-language: - - en-US + - AZURECLI/2.51.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.10.9 (Windows-10-10.0.22621-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.OperationalInsights/workspaces/workspace000004?api-version=2015-03-20 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.OperationalInsights/workspaces/workspace000004?api-version=2022-10-01 response: body: - string: "{\r\n \"properties\": {\r\n \"source\": \"Azure\",\r\n \"customerId\": - \"ac2fa443-2f85-430e-aa7b-98c3c1d54cb4\",\r\n \"provisioningState\": \"Creating\",\r\n - \ \"sku\": {\r\n \"name\": \"free\",\r\n \"lastSkuUpdate\": \"Mon, - 11 May 2020 02:57:23 GMT\"\r\n },\r\n \"retentionInDays\": 7,\r\n \"features\": - {\r\n \"legacy\": 0,\r\n \"searchVersion\": 1,\r\n \"enableLogAccessUsingOnlyResourcePermissions\": - true\r\n },\r\n \"workspaceCapping\": {\r\n \"dailyQuotaGb\": 0.5,\r\n - \ \"quotaNextResetTime\": \"Mon, 11 May 2020 15:00:00 GMT\",\r\n \"dataIngestionStatus\": - \"RespectQuota\"\r\n },\r\n \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n - \ \"publicNetworkAccessForQuery\": \"Enabled\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/microsoft.operationalinsights/workspaces/workspace000004\",\r\n - \ \"name\": \"workspace000004\",\r\n \"type\": \"Microsoft.OperationalInsights/workspaces\",\r\n - \ \"location\": \"westus\"\r\n}" + string: '{"properties":{"customerId":"eb8887a7-987e-4962-9771-56a88d2faa5e","provisioningState":"Creating","sku":{"name":"pergb2018","lastSkuUpdate":"2023-08-29T07:30:10.0026335Z"},"retentionInDays":30,"features":{"legacy":0,"searchVersion":1,"enableLogAccessUsingOnlyResourcePermissions":true},"workspaceCapping":{"dailyQuotaGb":-1.0,"quotaNextResetTime":"2023-08-29T08:00:00Z","dataIngestionStatus":"RespectQuota"},"publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled","createdDate":"2023-08-29T07:30:10.0026335Z","modifiedDate":"2023-08-29T07:30:10.0026335Z"},"location":"westus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.OperationalInsights/workspaces/workspace000004","name":"workspace000004","type":"Microsoft.OperationalInsights/workspaces"}' headers: + access-control-allow-origin: + - '*' + api-supported-versions: + - 2015-03-20, 2020-08-01, 2020-10-01, 2021-06-01, 2022-10-01 cache-control: - no-cache content-length: - - '1019' + - '837' content-type: - - application/json + - application/json; charset=utf-8 date: - - Mon, 11 May 2020 02:57:25 GMT + - Tue, 29 Aug 2023 07:30:10 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.OperationalInsights/workspaces/workspace000004?api-version=2022-10-01 pragma: - no-cache - server: - - Microsoft-IIS/10.0 - - Microsoft-IIS/10.0 + request-context: + - appId=cid-v1:e6336c63-aab2-45f0-996a-e5dbab2a1508 strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: @@ -143,7 +210,6 @@ interactions: - '1199' x-powered-by: - ASP.NET - - ASP.NET status: code: 201 message: Created @@ -151,7 +217,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -161,37 +227,31 @@ interactions: ParameterSetName: - -g -n -l --resource-type -p User-Agent: - - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3 - azure-mgmt-resource/9.0.0 Azure-SDK-For-Python AZURECLI/2.5.1 + - AZURECLI/2.51.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.10.9 (Windows-10-10.0.22621-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.OperationalInsights/workspaces/workspace000004?api-version=2015-03-20 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.OperationalInsights/workspaces/workspace000004?api-version=2022-10-01 response: body: - string: "{\r\n \"properties\": {\r\n \"source\": \"Azure\",\r\n \"customerId\": - \"ac2fa443-2f85-430e-aa7b-98c3c1d54cb4\",\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"sku\": {\r\n \"name\": \"free\",\r\n \"lastSkuUpdate\": \"Mon, - 11 May 2020 02:57:23 GMT\"\r\n },\r\n \"retentionInDays\": 7,\r\n \"features\": - {\r\n \"legacy\": 0,\r\n \"searchVersion\": 1,\r\n \"enableLogAccessUsingOnlyResourcePermissions\": - true\r\n },\r\n \"workspaceCapping\": {\r\n \"dailyQuotaGb\": 0.5,\r\n - \ \"quotaNextResetTime\": \"Mon, 11 May 2020 15:00:00 GMT\",\r\n \"dataIngestionStatus\": - \"RespectQuota\"\r\n },\r\n \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n - \ \"publicNetworkAccessForQuery\": \"Enabled\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/microsoft.operationalinsights/workspaces/workspace000004\",\r\n - \ \"name\": \"workspace000004\",\r\n \"type\": \"Microsoft.OperationalInsights/workspaces\",\r\n - \ \"location\": \"westus\"\r\n}" + string: '{"properties":{"customerId":"eb8887a7-987e-4962-9771-56a88d2faa5e","provisioningState":"Creating","sku":{"name":"pergb2018","lastSkuUpdate":"2023-08-29T07:30:10.0026335Z"},"retentionInDays":30,"features":{"legacy":0,"searchVersion":1,"enableLogAccessUsingOnlyResourcePermissions":true},"workspaceCapping":{"dailyQuotaGb":-1.0,"quotaNextResetTime":"2023-08-29T08:00:00Z","dataIngestionStatus":"RespectQuota"},"publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled","createdDate":"2023-08-29T07:30:10.0026335Z","modifiedDate":"2023-08-29T07:30:10.0026335Z"},"location":"westus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.OperationalInsights/workspaces/workspace000004","name":"workspace000004","type":"Microsoft.OperationalInsights/workspaces"}' headers: + access-control-allow-origin: + - '*' + api-supported-versions: + - 2015-03-20, 2020-08-01, 2020-10-01, 2021-06-01, 2022-10-01 cache-control: - no-cache content-length: - - '1020' + - '837' content-type: - - application/json + - application/json; charset=utf-8 date: - - Mon, 11 May 2020 02:57:56 GMT + - Tue, 29 Aug 2023 07:30:11 GMT + expires: + - '-1' pragma: - no-cache - server: - - Microsoft-IIS/10.0 - - Microsoft-IIS/10.0 + request-context: + - appId=cid-v1:e6336c63-aab2-45f0-996a-e5dbab2a1508 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -202,7 +262,90 @@ interactions: - nosniff x-powered-by: - ASP.NET - - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - monitor log-analytics solution create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --solution-type --workspace + User-Agent: + - AZURECLI/2.51.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.10.9 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2022-09-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","test":"test_log_analytics_solution","date":"2023-08-29T07:29:56Z","module":"log-analytics-solution"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '381' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 29 Aug 2023 07:30:11 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - monitor log-analytics solution create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --solution-type --workspace + User-Agent: + - AZURECLI/2.51.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.10.9 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000002?api-version=2022-09-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002","name":"clitest.rg000002","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","test":"test_log_analytics_solution","date":"2023-08-29T07:30:00Z","module":"log-analytics-solution"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '381' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 29 Aug 2023 07:30:12 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff status: code: 200 message: OK @@ -220,39 +363,73 @@ interactions: ParameterSetName: - --resource-group --solution-type --workspace --tags User-Agent: - - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3 - azure-mgmt-loganalytics/0.5.0 Azure-SDK-For-Python AZURECLI/2.5.1 - accept-language: - - en-US + - AZURECLI/2.51.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.10.9 (Windows-10-10.0.22621-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.OperationalInsights/workspaces/workspace000004?api-version=2020-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2022-09-01 response: body: - string: "{\r\n \"properties\": {\r\n \"source\": \"Azure\",\r\n \"customerId\": - \"ac2fa443-2f85-430e-aa7b-98c3c1d54cb4\",\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"sku\": {\r\n \"name\": \"free\",\r\n \"lastSkuUpdate\": \"Mon, - 11 May 2020 02:57:23 GMT\"\r\n },\r\n \"retentionInDays\": 7,\r\n \"features\": - {\r\n \"legacy\": 0,\r\n \"searchVersion\": 1,\r\n \"enableLogAccessUsingOnlyResourcePermissions\": - true\r\n },\r\n \"workspaceCapping\": {\r\n \"dailyQuotaGb\": 0.5,\r\n - \ \"quotaNextResetTime\": \"Mon, 11 May 2020 15:00:00 GMT\",\r\n \"dataIngestionStatus\": - \"RespectQuota\"\r\n },\r\n \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n - \ \"publicNetworkAccessForQuery\": \"Enabled\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/microsoft.operationalinsights/workspaces/workspace000004\",\r\n - \ \"name\": \"workspace000004\",\r\n \"type\": \"Microsoft.OperationalInsights/workspaces\",\r\n - \ \"location\": \"westus\"\r\n}" + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","test":"test_log_analytics_solution","date":"2023-08-29T07:29:56Z","module":"log-analytics-solution"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '1020' + - '381' content-type: + - application/json; charset=utf-8 + date: + - Tue, 29 Aug 2023 07:30:13 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - monitor log-analytics solution create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --solution-type --workspace --tags + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.OperationalInsights/workspaces/workspace000004?api-version=2022-10-01 + response: + body: + string: '{"properties":{"customerId":"eb8887a7-987e-4962-9771-56a88d2faa5e","provisioningState":"Succeeded","sku":{"name":"pergb2018","lastSkuUpdate":"2023-08-29T07:30:10.0026335Z"},"retentionInDays":30,"features":{"legacy":0,"searchVersion":1,"enableLogAccessUsingOnlyResourcePermissions":true},"workspaceCapping":{"dailyQuotaGb":-1.0,"quotaNextResetTime":"2023-08-29T08:00:00Z","dataIngestionStatus":"RespectQuota"},"publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled","createdDate":"2023-08-29T07:30:10.0026335Z","modifiedDate":"2023-08-29T07:30:13.2457799Z"},"location":"westus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.OperationalInsights/workspaces/workspace000004","name":"workspace000004","type":"Microsoft.OperationalInsights/workspaces"}' + headers: + access-control-allow-origin: + - '*' + api-supported-versions: + - 2015-03-20, 2020-08-01, 2020-10-01, 2021-06-01, 2022-10-01 + cache-control: + - no-cache + content-length: + - '838' + content-type: + - application/json; charset=utf-8 date: - - Mon, 11 May 2020 02:57:58 GMT + - Tue, 29 Aug 2023 07:30:14 GMT + expires: + - '-1' pragma: - no-cache - server: - - Microsoft-IIS/10.0 - - Microsoft-IIS/10.0 + request-context: + - appId=cid-v1:e6336c63-aab2-45f0-996a-e5dbab2a1508 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -263,14 +440,14 @@ interactions: - nosniff x-powered-by: - ASP.NET - - ASP.NET status: code: 200 message: OK - request: - body: 'b''{"location": "westus", "tags": {"key1": "value1"}, "plan": {"name": - "Containers(workspace000004)", "publisher": "Microsoft", "promotionCode": "", - "product": "OMSGallery/Containers"}, "properties": {"workspaceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/microsoft.operationalinsights/workspaces/workspace000004"}}''' + body: '{"location": "westus", "plan": {"name": "Containers", "product": "OMSGallery/Containers", + "promotionCode": "", "publisher": "Microsoft"}, "properties": {"workspaceResourceId": + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.OperationalInsights/workspaces/workspace000004"}, + "tags": {"key1": "value1"}}' headers: Accept: - application/json @@ -281,63 +458,104 @@ interactions: Connection: - keep-alive Content-Length: - - '444' + - '358' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - --resource-group --solution-type --workspace --tags User-Agent: - - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3 - azure-mgmt-operationsmanagement/0.1.0 Azure-SDK-For-Python AZURECLI/2.5.1 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.OperationsManagement/solutions/Containers%28workspace000004%29?api-version=2015-11-01-preview response: body: - string: "{\r\n \"plan\": {\r\n \"name\": \"Containers(workspace000004)\",\r\n - \ \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": - \"OMSGallery/Containers\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/microsoft.operationalinsights/workspaces/workspace000004\",\r\n - \ \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Mon, - 01 Jan 0001 00:00:00 GMT\",\r\n \"lastModifiedTime\": \"Mon, 01 Jan 0001 - 00:00:00 GMT\",\r\n \"containedResources\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.OperationalInsights/workspaces/workspace000004/views/Containers(workspace000004)\"\r\n - \ ]\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.OperationsManagement/solutions/Containers(workspace000004)\",\r\n - \ \"name\": \"Containers(workspace000004)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n - \ \"location\": \"West US\",\r\n \"tags\": {\r\n \"key1\": \"value1\"\r\n - \ }\r\n}" + string: '{"plan":{"name":"Containers(workspace000004)","publisher":"Microsoft","promotionCode":"","product":"OMSGallery/Containers"},"properties":{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.OperationalInsights/workspaces/workspace000004","provisioningState":"Succeeded","creationTime":"Tue, + 29 Aug 2023 07:30:18 GMT","lastModifiedTime":"Tue, 29 Aug 2023 07:30:18 GMT","containedResources":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.OperationalInsights/workspaces/workspace000004/views/Containers(workspace000004)"]},"location":"westus","tags":{"key1":"value1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.OperationsManagement/solutions/Containers(workspace000004)","name":"Containers(workspace000004)","type":"Microsoft.OperationsManagement/solutions"}' headers: + access-control-allow-origin: + - '*' + api-supported-versions: + - 2015-11-01-preview cache-control: - no-cache - cachecontrol: - - no-cache content-length: - - '1297' + - '956' content-type: - application/json; charset=utf-8 date: - - Mon, 11 May 2020 02:58:06 GMT + - Tue, 29 Aug 2023 07:30:19 GMT expires: - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.OperationsManagement/solutions/Containers(workspace000004)?api-version=2015-11-01-preview pragma: - no-cache - server: - - Microsoft-IIS/10.0 - - Microsoft-IIS/10.0 + request-context: + - appId=cid-v1:e6336c63-aab2-45f0-996a-e5dbab2a1508 strict-transport-security: - max-age=31536000; includeSubDomains - x-ams-apiversion: - - WebAPI1.0 x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - '1199' x-powered-by: - ASP.NET - - ASP.NET status: code: 201 message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - monitor log-analytics solution create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --solution-type --workspace --tags + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.OperationsManagement/solutions/Containers(workspace000004)?api-version=2015-11-01-preview + response: + body: + string: '{"plan":{"name":"Containers(workspace000004)","publisher":"Microsoft","promotionCode":"","product":"OMSGallery/Containers"},"properties":{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.OperationalInsights/workspaces/workspace000004","provisioningState":"Succeeded","creationTime":"Tue, + 29 Aug 2023 07:30:18 GMT","lastModifiedTime":"Tue, 29 Aug 2023 07:30:18 GMT","containedResources":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.OperationalInsights/workspaces/workspace000004/views/Containers(workspace000004)"]},"location":"westus","tags":{"key1":"value1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.OperationsManagement/solutions/Containers(workspace000004)","name":"Containers(workspace000004)","type":"Microsoft.OperationsManagement/solutions"}' + headers: + access-control-allow-origin: + - '*' + api-supported-versions: + - 2015-11-01-preview + cache-control: + - no-cache + content-length: + - '956' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 29 Aug 2023 07:30:19 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:e6336c63-aab2-45f0-996a-e5dbab2a1508 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK - request: body: null headers: @@ -352,56 +570,42 @@ interactions: ParameterSetName: - --resource-group --name User-Agent: - - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3 - azure-mgmt-operationsmanagement/0.1.0 Azure-SDK-For-Python AZURECLI/2.5.1 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.OperationsManagement/solutions/Containers%28workspace000004%29?api-version=2015-11-01-preview response: body: - string: "{\r\n \"plan\": {\r\n \"name\": \"Containers(workspace000004)\",\r\n - \ \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": - \"OMSGallery/Containers\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.OperationalInsights/workspaces/workspace000004\",\r\n - \ \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Mon, - 11 May 2020 02:58:05 GMT\",\r\n \"lastModifiedTime\": \"Mon, 11 May 2020 - 02:58:05 GMT\",\r\n \"containedResources\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.OperationalInsights/workspaces/workspace000004/views/Containers(workspace000004)\"\r\n - \ ]\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.OperationsManagement/solutions/Containers(workspace000004)\",\r\n - \ \"name\": \"Containers(workspace000004)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n - \ \"location\": \"West US\",\r\n \"tags\": {\r\n \"key1\": \"value1\"\r\n - \ }\r\n}" + string: '{"plan":{"name":"Containers(workspace000004)","publisher":"Microsoft","promotionCode":"","product":"OMSGallery/Containers"},"properties":{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.OperationalInsights/workspaces/workspace000004","provisioningState":"Succeeded","creationTime":"Tue, + 29 Aug 2023 07:30:18 GMT","lastModifiedTime":"Tue, 29 Aug 2023 07:30:18 GMT","containedResources":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.OperationalInsights/workspaces/workspace000004/views/Containers(workspace000004)"]},"location":"westus","tags":{"key1":"value1"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.OperationsManagement/solutions/Containers(workspace000004)","name":"Containers(workspace000004)","type":"Microsoft.OperationsManagement/solutions"}' headers: + access-control-allow-origin: + - '*' + api-supported-versions: + - 2015-11-01-preview cache-control: - no-cache - cachecontrol: - - no-cache content-length: - - '1297' + - '956' content-type: - application/json; charset=utf-8 date: - - Mon, 11 May 2020 02:58:08 GMT + - Tue, 29 Aug 2023 07:30:22 GMT expires: - '-1' pragma: - no-cache - server: - - Microsoft-IIS/10.0 - - Microsoft-IIS/10.0 + request-context: + - appId=cid-v1:e6336c63-aab2-45f0-996a-e5dbab2a1508 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: - chunked vary: - Accept-Encoding - x-ams-apiversion: - - WebAPI1.0 x-content-type-options: - nosniff x-powered-by: - ASP.NET - - ASP.NET status: code: 200 message: OK @@ -419,62 +623,48 @@ interactions: Content-Length: - '28' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - --resource-group --name --tags User-Agent: - - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3 - azure-mgmt-operationsmanagement/0.1.0 Azure-SDK-For-Python AZURECLI/2.5.1 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) method: PATCH uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.OperationsManagement/solutions/Containers%28workspace000004%29?api-version=2015-11-01-preview response: body: - string: "{\r\n \"plan\": {\r\n \"name\": \"Containers(workspace000004)\",\r\n - \ \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": - \"OMSGallery/Containers\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.OperationalInsights/workspaces/workspace000004\",\r\n - \ \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Mon, - 11 May 2020 02:58:05 GMT\",\r\n \"lastModifiedTime\": \"Mon, 11 May 2020 - 02:58:05 GMT\",\r\n \"containedResources\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.OperationalInsights/workspaces/workspace000004/views/Containers(workspace000004)\"\r\n - \ ]\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.OperationsManagement/solutions/Containers(workspace000004)\",\r\n - \ \"name\": \"Containers(workspace000004)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n - \ \"location\": \"West US\",\r\n \"tags\": {\r\n \"key2\": \"value2\"\r\n - \ }\r\n}" + string: '{"plan":{"name":"Containers(workspace000004)","publisher":"Microsoft","promotionCode":"","product":"OMSGallery/Containers"},"properties":{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.OperationalInsights/workspaces/workspace000004","provisioningState":"Succeeded","creationTime":"Tue, + 29 Aug 2023 07:30:18 GMT","lastModifiedTime":"Tue, 29 Aug 2023 07:30:23 GMT","containedResources":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.OperationalInsights/workspaces/workspace000004/views/Containers(workspace000004)"]},"location":"westus","tags":{"key2":"value2"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.OperationsManagement/solutions/Containers(workspace000004)","name":"Containers(workspace000004)","type":"Microsoft.OperationsManagement/solutions"}' headers: + access-control-allow-origin: + - '*' + api-supported-versions: + - 2015-11-01-preview cache-control: - no-cache - cachecontrol: - - no-cache content-length: - - '1297' + - '956' content-type: - application/json; charset=utf-8 date: - - Mon, 11 May 2020 02:58:15 GMT + - Tue, 29 Aug 2023 07:30:25 GMT expires: - '-1' pragma: - no-cache - server: - - Microsoft-IIS/10.0 - - Microsoft-IIS/10.0 + request-context: + - appId=cid-v1:e6336c63-aab2-45f0-996a-e5dbab2a1508 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: - chunked vary: - Accept-Encoding - x-ams-apiversion: - - WebAPI1.0 x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1197' x-powered-by: - ASP.NET - - ASP.NET status: code: 200 message: OK @@ -492,56 +682,42 @@ interactions: ParameterSetName: - --resource-group --name User-Agent: - - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3 - azure-mgmt-operationsmanagement/0.1.0 Azure-SDK-For-Python AZURECLI/2.5.1 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.OperationsManagement/solutions/Containers%28workspace000004%29?api-version=2015-11-01-preview response: body: - string: "{\r\n \"plan\": {\r\n \"name\": \"Containers(workspace000004)\",\r\n - \ \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": - \"OMSGallery/Containers\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.OperationalInsights/workspaces/workspace000004\",\r\n - \ \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Mon, - 11 May 2020 02:58:05 GMT\",\r\n \"lastModifiedTime\": \"Mon, 11 May 2020 - 02:58:11 GMT\",\r\n \"containedResources\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.OperationalInsights/workspaces/workspace000004/views/Containers(workspace000004)\"\r\n - \ ]\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.OperationsManagement/solutions/Containers(workspace000004)\",\r\n - \ \"name\": \"Containers(workspace000004)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n - \ \"location\": \"West US\",\r\n \"tags\": {\r\n \"key2\": \"value2\"\r\n - \ }\r\n}" + string: '{"plan":{"name":"Containers(workspace000004)","publisher":"Microsoft","promotionCode":"","product":"OMSGallery/Containers"},"properties":{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.OperationalInsights/workspaces/workspace000004","provisioningState":"Succeeded","creationTime":"Tue, + 29 Aug 2023 07:30:18 GMT","lastModifiedTime":"Tue, 29 Aug 2023 07:30:23 GMT","containedResources":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.OperationalInsights/workspaces/workspace000004/views/Containers(workspace000004)"]},"location":"westus","tags":{"key2":"value2"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.OperationsManagement/solutions/Containers(workspace000004)","name":"Containers(workspace000004)","type":"Microsoft.OperationsManagement/solutions"}' headers: + access-control-allow-origin: + - '*' + api-supported-versions: + - 2015-11-01-preview cache-control: - no-cache - cachecontrol: - - no-cache content-length: - - '1297' + - '956' content-type: - application/json; charset=utf-8 date: - - Mon, 11 May 2020 02:58:17 GMT + - Tue, 29 Aug 2023 07:30:27 GMT expires: - '-1' pragma: - no-cache - server: - - Microsoft-IIS/10.0 - - Microsoft-IIS/10.0 + request-context: + - appId=cid-v1:e6336c63-aab2-45f0-996a-e5dbab2a1508 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: - chunked vary: - Accept-Encoding - x-ams-apiversion: - - WebAPI1.0 x-content-type-options: - nosniff x-powered-by: - ASP.NET - - ASP.NET status: code: 200 message: OK @@ -559,12 +735,9 @@ interactions: ParameterSetName: - -g -n -l --resource-type -p User-Agent: - - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3 - azure-mgmt-resource/9.0.0 Azure-SDK-For-Python AZURECLI/2.5.1 - accept-language: - - en-US + - AZURECLI/2.51.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.10.9 (Windows-10-10.0.22621-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.OperationalInsights?api-version=2019-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.OperationalInsights?api-version=2022-09-01 response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.OperationalInsights","namespace":"Microsoft.OperationalInsights","authorizations":[{"applicationId":"d2a0a418-0aac-4541-82b2-b3142c89da77","roleDefinitionId":"86695298-2eb9-48a7-9ec3-2fdb38b6878b"},{"applicationId":"ca7f3f0b-7d91-482c-8e09-c5d840d0eac5","roleDefinitionId":"5d5a2e56-9835-44aa-93db-d2f19e155438"}],"resourceTypes":[{"resourceType":"workspaces","locations":["East @@ -572,50 +745,126 @@ interactions: East","UK South","Central India","Canada Central","West US 2","Australia Central","Australia East","France Central","Korea Central","North Europe","Central US","East Asia","East US 2","South Central US","North Central US","West US","UK West","South Africa - North","Brazil South","Switzerland North","Switzerland West"],"apiVersions":["2020-03-01-preview","2017-04-26-preview","2017-03-15-preview","2017-03-03-preview","2017-01-01-preview","2015-11-01-preview","2015-03-20"],"capabilities":"CrossResourceGroupResourceMove, - CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"locations","locations":[],"apiVersions":["2020-03-01-preview","2019-08-01-preview","2017-04-26-preview","2017-03-15-preview","2017-03-03-preview","2017-01-01-preview","2015-11-01-preview","2015-03-20"],"defaultApiVersion":"2015-11-01-preview","capabilities":"None"},{"resourceType":"locations/operationStatuses","locations":["East + North","Brazil South","Switzerland North","Switzerland West","Germany West + Central","Australia Central 2","UAE Central","UAE North","Japan West","Brazil + Southeast","Norway East","Norway West","France South","South India","Korea + South","Jio India Central","Jio India West","Qatar Central","Canada East","West + US 3","Sweden Central","South Africa West","Germany North","Poland Central"],"apiVersions":["2022-10-01","2021-12-01-preview","2021-06-01","2021-03-01-privatepreview","2020-10-01","2020-08-01","2020-03-01-preview","2017-04-26-preview","2017-03-15-preview","2017-03-03-preview","2017-01-01-preview","2015-11-01-preview","2015-03-20"],"defaultApiVersion":"2022-10-01","capabilities":"CrossResourceGroupResourceMove, + CrossSubscriptionResourceMove, SystemAssignedResourceIdentity, SupportsTags, + SupportsLocation"},{"resourceType":"querypacks","locations":["West Central + US","East US","South Central US","North Europe","West Europe","Southeast Asia","West + US 2","UK South","Canada Central","Central India","Japan East","Australia + East","Korea Central","France Central","Central US","East US 2","East Asia","West + US","South Africa North","North Central US","Brazil South","Switzerland North","Norway + East","Australia Southeast","Australia Central 2","Germany West Central","Switzerland + West","UAE Central","UK West","Brazil Southeast","Japan West","UAE North","Australia + Central","France South","South India","Korea South","Jio India Central","Jio + India West","Qatar Central","Canada East","West US 3","Sweden Central"],"apiVersions":["2019-09-01-preview","2019-09-01"],"capabilities":"SupportsTags, + SupportsLocation"},{"resourceType":"locations","locations":[],"apiVersions":["2020-10-01","2020-08-01","2020-03-01-preview","2019-08-01-preview","2017-04-26-preview","2017-03-15-preview","2017-03-03-preview","2017-01-01-preview","2015-11-01-preview","2015-03-20"],"defaultApiVersion":"2020-08-01","capabilities":"None"},{"resourceType":"locations/operationStatuses","locations":["East US","West Europe","Southeast Asia","Australia Southeast","West Central US","Japan East","UK South","Central India","Canada Central","West US 2","Australia Central","Australia East","France Central","Korea Central","North Europe","Central US","East Asia","East US 2","South Central US","North Central US","West US","UK West","South Africa - North","Brazil South","Switzerland North","Switzerland West"],"apiVersions":["2020-03-01-preview","2019-08-01-preview","2017-04-26-preview","2017-03-15-preview","2017-03-03-preview","2017-01-01-preview","2015-11-01-preview","2015-03-20"],"defaultApiVersion":"2015-11-01-preview","capabilities":"None"},{"resourceType":"workspaces/scopedPrivateLinkProxies","locations":["East + North","Brazil South","Switzerland North","Switzerland West","Germany West + Central","Australia Central 2","UAE Central","UAE North","Japan West","Brazil + Southeast","Norway East","Norway West","France South","South India","Korea + South","Jio India Central","Jio India West","Qatar Central","Canada East","West + US 3","Sweden Central","South Africa West","Germany North","Poland Central"],"apiVersions":["2023-01-01-preview","2022-10-01","2022-09-01-privatepreview","2021-12-01-preview","2020-10-01","2020-08-01","2020-03-01-preview","2019-08-01-preview","2017-04-26-preview","2017-03-15-preview","2017-03-03-preview","2017-01-01-preview","2015-11-01-preview","2015-03-20"],"defaultApiVersion":"2022-10-01","capabilities":"None"},{"resourceType":"workspaces/scopedPrivateLinkProxies","locations":["East US","West Europe","Southeast Asia","Australia Southeast","West Central US","Japan East","UK South","Central India","Canada Central","West US 2","Australia Central","Australia East","France Central","Korea Central","North Europe","Central US","East Asia","East US 2","South Central US","North Central US","West US","UK West","South Africa - North","Brazil South","Switzerland North","Switzerland West"],"apiVersions":["2020-03-01-preview","2019-08-01-preview","2015-11-01-preview"],"defaultApiVersion":"2015-11-01-preview","capabilities":"None"},{"resourceType":"workspaces/query","locations":[],"apiVersions":["2017-10-01"],"capabilities":"None"},{"resourceType":"workspaces/metadata","locations":[],"apiVersions":["2017-10-01"],"capabilities":"None"},{"resourceType":"workspaces/dataSources","locations":["East + North","Brazil South","Switzerland North","Switzerland West","Germany West + Central","Australia Central 2","UAE Central","UAE North","Japan West","Brazil + Southeast","Norway East","Norway West","France South","South India","Korea + South","Jio India Central","Jio India West","Qatar Central","Canada East","West + US 3","Sweden Central","South Africa West","Germany North","Poland Central"],"apiVersions":["2020-03-01-preview","2019-08-01-preview","2015-11-01-preview"],"defaultApiVersion":"2020-03-01-preview","capabilities":"None"},{"resourceType":"workspaces/api","locations":[],"apiVersions":["2020-08-01","2020-03-01-preview","2017-01-01-preview"],"capabilities":"None"},{"resourceType":"workspaces/query","locations":[],"apiVersions":["2017-10-01"],"capabilities":"None"},{"resourceType":"workspaces/metadata","locations":[],"apiVersions":["2017-10-01"],"capabilities":"None"},{"resourceType":"workspaces/purge","locations":[],"apiVersions":["2022-10-01","2020-10-01","2020-08-01","2017-04-26-preview","2015-03-20"],"capabilities":"None"},{"resourceType":"workspaces/operations","locations":[],"apiVersions":["2022-10-01","2020-08-01","2017-04-26-preview","2015-03-20"],"capabilities":"None"},{"resourceType":"workspaces/dataSources","locations":["East US","West Europe","Southeast Asia","Australia Southeast","West Central US","Japan East","UK South","Central India","Canada Central","West US 2","Australia Central","Australia East","France Central","Korea Central","North Europe","Central US","East Asia","East US 2","South Central US","North Central US","West US","UK West","South Africa - North","Brazil South","Switzerland North","Switzerland West"],"apiVersions":["2020-03-01-preview","2015-11-01-preview"],"defaultApiVersion":"2015-11-01-preview","capabilities":"None"},{"resourceType":"workspaces/linkedStorageAccounts","locations":["East + North","Brazil South","Switzerland North","Switzerland West","Germany West + Central","Australia Central 2","UAE Central","UAE North","Japan West","Brazil + Southeast","Norway East","Norway West","France South","South India","Korea + South","Jio India Central","Jio India West","Qatar Central","Canada East","West + US 3","Sweden Central","South Africa West","Germany North","Poland Central"],"apiVersions":["2020-08-01","2020-03-01-preview","2015-11-01-preview"],"defaultApiVersion":"2020-08-01","capabilities":"None"},{"resourceType":"workspaces/linkedStorageAccounts","locations":["East US","West Europe","Southeast Asia","Australia Southeast","West Central US","Japan East","UK South","Central India","Canada Central","West US 2","Australia Central","Australia East","France Central","Korea Central","North Europe","Central US","East Asia","East US 2","South Central US","North Central US","West US","UK West","South Africa - North","Brazil South","Switzerland North","Switzerland West"],"apiVersions":["2020-03-01-preview","2019-08-01-preview"],"defaultApiVersion":"2019-08-01-preview","capabilities":"None"},{"resourceType":"storageInsightConfigs","locations":[],"apiVersions":["2020-03-01-preview","2014-10-10"],"capabilities":"SupportsExtension"},{"resourceType":"workspaces/linkedServices","locations":["East + North","Brazil South","Switzerland North","Switzerland West","Germany West + Central","Australia Central 2","UAE Central","UAE North","Japan West","Brazil + Southeast","Norway East","Norway West","France South","South India","Korea + South","Jio India Central","Jio India West","Qatar Central","Canada East","West + US 3","Sweden Central","South Africa West","Germany North","Poland Central"],"apiVersions":["2020-08-01","2020-03-01-preview","2019-08-01-preview"],"defaultApiVersion":"2020-08-01","capabilities":"None"},{"resourceType":"workspaces/tables","locations":["East + US","West Europe","Southeast Asia","Australia Southeast","West Central US","Japan + East","UK South","Central India","Canada Central","West US 2","Australia East","Australia + Central","France Central","Korea Central","North Europe","Central US","East + Asia","East US 2","South Central US","North Central US","West US","UK West","South + Africa North","Brazil South","Switzerland North","Switzerland West","Germany + West Central","Australia Central 2","UAE Central","UAE North","Japan West","Brazil + Southeast","Norway East","Norway West","France South","South India","Korea + South","Jio India Central","Jio India West","Qatar Central","Canada East","West + US 3","Sweden Central","South Africa West","Germany North","Poland Central","East + US 2 EUAP","Sweden South","Central US EUAP","Israel Central","Italy North"],"apiVersions":["2021-07-01-privatepreview","2021-03-01-privatepreview","2020-10-01"],"capabilities":"None"},{"resourceType":"workspaces/storageInsightConfigs","locations":["East + US","West Europe","Southeast Asia","Australia Southeast","West Central US","Japan + East","UK South","Central India","Canada Central","West US 2","Australia East","Australia + Central","France Central","Korea Central","North Europe","Central US","East + Asia","East US 2","South Central US","North Central US","West US","UK West","South + Africa North","Brazil South","Switzerland North","Switzerland West","Germany + West Central","Australia Central 2","UAE Central","UAE North","Japan West","Brazil + Southeast","Norway East","Norway West","France South","South India","Korea + South","Jio India Central","Jio India West","Qatar Central","Canada East","West + US 3","Sweden Central","South Africa West","Germany North","Poland Central"],"apiVersions":["2020-08-01","2020-03-01-preview","2017-04-26-preview","2017-03-15-preview","2017-03-03-preview","2017-01-01-preview","2015-11-01-preview","2015-03-20"],"capabilities":"None"},{"resourceType":"storageInsightConfigs","locations":[],"apiVersions":["2020-08-01","2020-03-01-preview","2014-10-10"],"capabilities":"SupportsExtension"},{"resourceType":"workspaces/linkedServices","locations":["East US","West Europe","Southeast Asia","Australia Southeast","West Central US","Japan East","UK South","Central India","Canada Central","West US 2","Australia Central","Australia East","France Central","Korea Central","North Europe","Central US","East Asia","East US 2","South Central US","North Central US","West US","UK West","South Africa - North","Brazil South","Switzerland North","Switzerland West"],"apiVersions":["2020-03-01-preview","2019-08-01-preview","2015-11-01-preview"],"defaultApiVersion":"2015-11-01-preview","capabilities":"None"},{"resourceType":"linkTargets","locations":["East - US"],"apiVersions":["2020-03-01-preview","2015-03-20"],"capabilities":"None"},{"resourceType":"operations","locations":[],"apiVersions":["2020-03-01-preview","2015-11-01-preview","2014-11-10"],"defaultApiVersion":"2015-11-01-preview","capabilities":"None"},{"resourceType":"clusters","locations":["East + North","Brazil South","Switzerland North","Switzerland West","Germany West + Central","Australia Central 2","UAE Central","UAE North","Japan West","Brazil + Southeast","Norway East","Norway West","France South","South India","Korea + South","Jio India Central","Jio India West","Qatar Central","Canada East","West + US 3","Sweden Central","South Africa West","Germany North","Poland Central"],"apiVersions":["2020-08-01","2020-03-01-preview","2019-08-01-preview","2015-11-01-preview"],"defaultApiVersion":"2020-08-01","capabilities":"None"},{"resourceType":"linkTargets","locations":["East + US"],"apiVersions":["2020-03-01-preview","2015-03-20"],"capabilities":"None"},{"resourceType":"deletedWorkspaces","locations":["East US","West Europe","Southeast Asia","Australia Southeast","West Central US","Japan East","UK South","Central India","Canada Central","West US 2","Australia Central","Australia East","France Central","Korea Central","North Europe","Central US","East Asia","East US 2","South Central US","North Central US","West US","UK West","South Africa - North","Switzerland North","Switzerland West","Brazil South"],"apiVersions":["2020-03-01-preview","2019-08-01-preview"],"defaultApiVersion":"2019-08-01-preview","capabilities":"CrossResourceGroupResourceMove, + North","Brazil South","Switzerland North","Switzerland West","Germany West + Central","Australia Central 2","UAE Central","UAE North","Japan West","Brazil + Southeast","Norway East","Norway West","France South","South India","Korea + South","Jio India Central","Jio India West","Qatar Central","Canada East","West + US 3","Sweden Central","South Africa West","Germany North","Poland Central"],"apiVersions":["2022-10-01","2021-12-01-preview","2020-10-01","2020-08-01","2020-03-01-preview"],"defaultApiVersion":"2022-10-01","capabilities":"None"},{"resourceType":"operations","locations":[],"apiVersions":["2022-10-01","2021-12-01-preview","2020-10-01","2020-08-01","2020-03-01-preview","2015-11-01-preview","2014-11-10"],"defaultApiVersion":"2020-08-01","capabilities":"None"},{"resourceType":"clusters","locations":["East + US","West Europe","Southeast Asia","Australia Southeast","West Central US","Japan + East","UK South","Central India","Canada Central","West US 2","Australia Central","Australia + East","France Central","Korea Central","North Europe","Central US","East Asia","East + US 2","South Central US","North Central US","West US","UK West","South Africa + North","Switzerland North","Switzerland West","Germany West Central","Australia + Central 2","UAE Central","Brazil South","UAE North","Japan West","Brazil Southeast","Norway + East","Norway West","France South","South India","Korea South","Jio India + Central","Jio India West","Qatar Central","Canada East","West US 3","Sweden + Central","South Africa West","Germany North","Poland Central"],"apiVersions":["2021-06-01","2020-10-01","2020-08-01","2020-03-01-preview","2019-08-01-preview"],"defaultApiVersion":"2021-06-01","capabilities":"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity, SupportsTags, - SupportsLocation"}],"registrationState":"Registered","registrationPolicy":"RegistrationRequired"}' + SupportsLocation"},{"resourceType":"workspaces/dataExports","locations":["East + US","West Europe","Southeast Asia","Australia Southeast","West Central US","Japan + East","UK South","Central India","Canada Central","West US 2","Australia Central","Australia + East","France Central","Korea Central","North Europe","Central US","East Asia","East + US 2","South Central US","North Central US","West US","UK West","South Africa + North","Brazil South","Switzerland North","Switzerland West","Germany West + Central","Australia Central 2","UAE Central","UAE North","Japan West","Brazil + Southeast","Norway East","Norway West","France South","South India","Korea + South","Jio India Central","Jio India West","Qatar Central","Canada East","West + US 3","Sweden Central","South Africa West","Germany North","Poland Central"],"apiVersions":["2020-08-01","2020-03-01-preview","2019-08-01-preview"],"defaultApiVersion":"2020-08-01","capabilities":"None"},{"resourceType":"locations/notifyNetworkSecurityPerimeterUpdatesAvailable","locations":["North + Central US","East US 2 EUAP"],"apiVersions":["2021-10-01"],"defaultApiVersion":"2021-10-01","capabilities":"None"}],"registrationState":"Registered","registrationPolicy":"RegistrationRequired"}' headers: cache-control: - no-cache content-length: - - '5930' + - '13850' content-type: - application/json; charset=utf-8 date: - - Mon, 11 May 2020 02:58:17 GMT + - Tue, 29 Aug 2023 07:30:27 GMT expires: - '-1' pragma: @@ -631,7 +880,7 @@ interactions: message: OK - request: body: '{"location": "westus", "properties": {"features": {"legacy": "0", "searchVersion": - "1"}, "retentionInDays": "7", "sku": {"name": "free"}, "source": "Azure"}}' + "1"}, "retentionInDays": "30", "sku": {"name": "pergb2018"}, "source": "Azure"}}' headers: Accept: - application/json @@ -642,54 +891,47 @@ interactions: Connection: - keep-alive Content-Length: - - '157' + - '163' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - -g -n -l --resource-type -p User-Agent: - - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3 - azure-mgmt-resource/9.0.0 Azure-SDK-For-Python AZURECLI/2.5.1 - accept-language: - - en-US + - AZURECLI/2.51.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.10.9 (Windows-10-10.0.22621-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000002/providers/Microsoft.OperationalInsights/workspaces/workspace000005?api-version=2015-03-20 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000002/providers/Microsoft.OperationalInsights/workspaces/workspace000005?api-version=2022-10-01 response: body: - string: "{\r\n \"properties\": {\r\n \"source\": \"Azure\",\r\n \"customerId\": - \"5811660e-3349-4a8a-9431-e7d9487078e9\",\r\n \"provisioningState\": \"Creating\",\r\n - \ \"sku\": {\r\n \"name\": \"free\",\r\n \"lastSkuUpdate\": \"Mon, - 11 May 2020 02:58:25 GMT\"\r\n },\r\n \"retentionInDays\": 7,\r\n \"features\": - {\r\n \"legacy\": 0,\r\n \"searchVersion\": 1,\r\n \"enableLogAccessUsingOnlyResourcePermissions\": - true\r\n },\r\n \"workspaceCapping\": {\r\n \"dailyQuotaGb\": 0.5,\r\n - \ \"quotaNextResetTime\": \"Mon, 11 May 2020 09:00:00 GMT\",\r\n \"dataIngestionStatus\": - \"RespectQuota\"\r\n },\r\n \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n - \ \"publicNetworkAccessForQuery\": \"Enabled\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000002/providers/microsoft.operationalinsights/workspaces/workspace000005\",\r\n - \ \"name\": \"workspace000005\",\r\n \"type\": \"Microsoft.OperationalInsights/workspaces\",\r\n - \ \"location\": \"westus\"\r\n}" + string: '{"properties":{"customerId":"8c07dbee-5522-4770-9c9c-8edb61092dce","provisioningState":"Creating","sku":{"name":"pergb2018","lastSkuUpdate":"2023-08-29T07:30:31.2908385Z"},"retentionInDays":30,"features":{"legacy":0,"searchVersion":1,"enableLogAccessUsingOnlyResourcePermissions":true},"workspaceCapping":{"dailyQuotaGb":-1.0,"quotaNextResetTime":"2023-08-29T15:00:00Z","dataIngestionStatus":"RespectQuota"},"publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled","createdDate":"2023-08-29T07:30:31.2908385Z","modifiedDate":"2023-08-29T07:30:31.2908385Z"},"location":"westus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.OperationalInsights/workspaces/workspace000005","name":"workspace000005","type":"Microsoft.OperationalInsights/workspaces"}' headers: + access-control-allow-origin: + - '*' + api-supported-versions: + - 2015-03-20, 2020-08-01, 2020-10-01, 2021-06-01, 2022-10-01 cache-control: - no-cache content-length: - - '1019' + - '837' content-type: - - application/json + - application/json; charset=utf-8 date: - - Mon, 11 May 2020 02:58:27 GMT + - Tue, 29 Aug 2023 07:30:31 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.OperationalInsights/workspaces/workspace000005?api-version=2022-10-01 pragma: - no-cache - server: - - Microsoft-IIS/10.0 - - Microsoft-IIS/10.0 + request-context: + - appId=cid-v1:e6336c63-aab2-45f0-996a-e5dbab2a1508 strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1197' + - '1198' x-powered-by: - ASP.NET - - ASP.NET status: code: 201 message: Created @@ -697,7 +939,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -707,37 +949,31 @@ interactions: ParameterSetName: - -g -n -l --resource-type -p User-Agent: - - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3 - azure-mgmt-resource/9.0.0 Azure-SDK-For-Python AZURECLI/2.5.1 + - AZURECLI/2.51.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.10.9 (Windows-10-10.0.22621-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000002/providers/Microsoft.OperationalInsights/workspaces/workspace000005?api-version=2015-03-20 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.OperationalInsights/workspaces/workspace000005?api-version=2022-10-01 response: body: - string: "{\r\n \"properties\": {\r\n \"source\": \"Azure\",\r\n \"customerId\": - \"5811660e-3349-4a8a-9431-e7d9487078e9\",\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"sku\": {\r\n \"name\": \"free\",\r\n \"lastSkuUpdate\": \"Mon, - 11 May 2020 02:58:25 GMT\"\r\n },\r\n \"retentionInDays\": 7,\r\n \"features\": - {\r\n \"legacy\": 0,\r\n \"searchVersion\": 1,\r\n \"enableLogAccessUsingOnlyResourcePermissions\": - true\r\n },\r\n \"workspaceCapping\": {\r\n \"dailyQuotaGb\": 0.5,\r\n - \ \"quotaNextResetTime\": \"Mon, 11 May 2020 09:00:00 GMT\",\r\n \"dataIngestionStatus\": - \"RespectQuota\"\r\n },\r\n \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n - \ \"publicNetworkAccessForQuery\": \"Enabled\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000002/providers/microsoft.operationalinsights/workspaces/workspace000005\",\r\n - \ \"name\": \"workspace000005\",\r\n \"type\": \"Microsoft.OperationalInsights/workspaces\",\r\n - \ \"location\": \"westus\"\r\n}" + string: '{"properties":{"customerId":"8c07dbee-5522-4770-9c9c-8edb61092dce","provisioningState":"Creating","sku":{"name":"pergb2018","lastSkuUpdate":"2023-08-29T07:30:31.2908385Z"},"retentionInDays":30,"features":{"legacy":0,"searchVersion":1,"enableLogAccessUsingOnlyResourcePermissions":true},"workspaceCapping":{"dailyQuotaGb":-1.0,"quotaNextResetTime":"2023-08-29T15:00:00Z","dataIngestionStatus":"RespectQuota"},"publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled","createdDate":"2023-08-29T07:30:31.2908385Z","modifiedDate":"2023-08-29T07:30:31.2908385Z"},"location":"westus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.OperationalInsights/workspaces/workspace000005","name":"workspace000005","type":"Microsoft.OperationalInsights/workspaces"}' headers: + access-control-allow-origin: + - '*' + api-supported-versions: + - 2015-03-20, 2020-08-01, 2020-10-01, 2021-06-01, 2022-10-01 cache-control: - no-cache content-length: - - '1020' + - '837' content-type: - - application/json + - application/json; charset=utf-8 date: - - Mon, 11 May 2020 02:58:58 GMT + - Tue, 29 Aug 2023 07:30:31 GMT + expires: + - '-1' pragma: - no-cache - server: - - Microsoft-IIS/10.0 - - Microsoft-IIS/10.0 + request-context: + - appId=cid-v1:e6336c63-aab2-45f0-996a-e5dbab2a1508 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -748,7 +984,6 @@ interactions: - nosniff x-powered-by: - ASP.NET - - ASP.NET status: code: 200 message: OK @@ -766,39 +1001,73 @@ interactions: ParameterSetName: - --resource-group -t --workspace --tags User-Agent: - - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3 - azure-mgmt-loganalytics/0.5.0 Azure-SDK-For-Python AZURECLI/2.5.1 - accept-language: - - en-US + - AZURECLI/2.51.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.10.9 (Windows-10-10.0.22621-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000002/providers/Microsoft.OperationalInsights/workspaces/workspace000005?api-version=2020-03-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000002?api-version=2022-09-01 response: body: - string: "{\r\n \"properties\": {\r\n \"source\": \"Azure\",\r\n \"customerId\": - \"5811660e-3349-4a8a-9431-e7d9487078e9\",\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"sku\": {\r\n \"name\": \"free\",\r\n \"lastSkuUpdate\": \"Mon, - 11 May 2020 02:58:25 GMT\"\r\n },\r\n \"retentionInDays\": 7,\r\n \"features\": - {\r\n \"legacy\": 0,\r\n \"searchVersion\": 1,\r\n \"enableLogAccessUsingOnlyResourcePermissions\": - true\r\n },\r\n \"workspaceCapping\": {\r\n \"dailyQuotaGb\": 0.5,\r\n - \ \"quotaNextResetTime\": \"Mon, 11 May 2020 09:00:00 GMT\",\r\n \"dataIngestionStatus\": - \"RespectQuota\"\r\n },\r\n \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n - \ \"publicNetworkAccessForQuery\": \"Enabled\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000002/providers/microsoft.operationalinsights/workspaces/workspace000005\",\r\n - \ \"name\": \"workspace000005\",\r\n \"type\": \"Microsoft.OperationalInsights/workspaces\",\r\n - \ \"location\": \"westus\"\r\n}" + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002","name":"clitest.rg000002","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","test":"test_log_analytics_solution","date":"2023-08-29T07:30:00Z","module":"log-analytics-solution"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '1020' + - '381' content-type: + - application/json; charset=utf-8 + date: + - Tue, 29 Aug 2023 07:30:32 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - monitor log-analytics solution create + Connection: + - keep-alive + ParameterSetName: + - --resource-group -t --workspace --tags + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000002/providers/Microsoft.OperationalInsights/workspaces/workspace000005?api-version=2022-10-01 + response: + body: + string: '{"properties":{"customerId":"8c07dbee-5522-4770-9c9c-8edb61092dce","provisioningState":"Succeeded","sku":{"name":"pergb2018","lastSkuUpdate":"2023-08-29T07:30:31.2908385Z"},"retentionInDays":30,"features":{"legacy":0,"searchVersion":1,"enableLogAccessUsingOnlyResourcePermissions":true},"workspaceCapping":{"dailyQuotaGb":-1.0,"quotaNextResetTime":"2023-08-29T15:00:00Z","dataIngestionStatus":"RespectQuota"},"publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled","createdDate":"2023-08-29T07:30:31.2908385Z","modifiedDate":"2023-08-29T07:30:32.9121698Z"},"location":"westus","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.OperationalInsights/workspaces/workspace000005","name":"workspace000005","type":"Microsoft.OperationalInsights/workspaces"}' + headers: + access-control-allow-origin: + - '*' + api-supported-versions: + - 2015-03-20, 2020-08-01, 2020-10-01, 2021-06-01, 2022-10-01 + cache-control: + - no-cache + content-length: + - '838' + content-type: + - application/json; charset=utf-8 date: - - Mon, 11 May 2020 02:59:01 GMT + - Tue, 29 Aug 2023 07:30:33 GMT + expires: + - '-1' pragma: - no-cache - server: - - Microsoft-IIS/10.0 - - Microsoft-IIS/10.0 + request-context: + - appId=cid-v1:e6336c63-aab2-45f0-996a-e5dbab2a1508 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -809,14 +1078,14 @@ interactions: - nosniff x-powered-by: - ASP.NET - - ASP.NET status: code: 200 message: OK - request: - body: 'b''{"location": "westus", "tags": {"key3": "value3"}, "plan": {"name": - "Containers(workspace000005)", "publisher": "Microsoft", "promotionCode": "", - "product": "OMSGallery/Containers"}, "properties": {"workspaceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/microsoft.OperationalInsights/workspaces/workspace000005"}}''' + body: '{"location": "westus", "plan": {"name": "Containers", "product": "OMSGallery/Containers", + "promotionCode": "", "publisher": "Microsoft"}, "properties": {"workspaceResourceId": + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.OperationalInsights/workspaces/workspace000005"}, + "tags": {"key3": "value3"}}' headers: Accept: - application/json @@ -827,63 +1096,104 @@ interactions: Connection: - keep-alive Content-Length: - - '444' + - '358' Content-Type: - - application/json; charset=utf-8 + - application/json ParameterSetName: - --resource-group -t --workspace --tags User-Agent: - - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3 - azure-mgmt-operationsmanagement/0.1.0 Azure-SDK-For-Python AZURECLI/2.5.1 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000002/providers/Microsoft.OperationsManagement/solutions/Containers%28workspace000005%29?api-version=2015-11-01-preview response: body: - string: "{\r\n \"plan\": {\r\n \"name\": \"Containers(workspace000005)\",\r\n - \ \"publisher\": \"Microsoft\",\r\n \"promotionCode\": \"\",\r\n \"product\": - \"OMSGallery/Containers\"\r\n },\r\n \"properties\": {\r\n \"workspaceResourceId\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/microsoft.OperationalInsights/workspaces/workspace000005\",\r\n - \ \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": \"Mon, - 01 Jan 0001 00:00:00 GMT\",\r\n \"lastModifiedTime\": \"Mon, 01 Jan 0001 - 00:00:00 GMT\",\r\n \"containedResources\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000002/providers/Microsoft.OperationalInsights/workspaces/workspace000005/views/Containers(workspace000005)\"\r\n - \ ]\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000002/providers/Microsoft.OperationsManagement/solutions/Containers(workspace000005)\",\r\n - \ \"name\": \"Containers(workspace000005)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n - \ \"location\": \"West US\",\r\n \"tags\": {\r\n \"key3\": \"value3\"\r\n - \ }\r\n}" + string: '{"plan":{"name":"Containers(workspace000005)","publisher":"Microsoft","promotionCode":"","product":"OMSGallery/Containers"},"properties":{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.OperationalInsights/workspaces/workspace000005","provisioningState":"Succeeded","creationTime":"Tue, + 29 Aug 2023 07:30:38 GMT","lastModifiedTime":"Tue, 29 Aug 2023 07:30:38 GMT","containedResources":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.OperationalInsights/workspaces/workspace000005/views/Containers(workspace000005)"]},"location":"westus","tags":{"key3":"value3"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.OperationsManagement/solutions/Containers(workspace000005)","name":"Containers(workspace000005)","type":"Microsoft.OperationsManagement/solutions"}' headers: + access-control-allow-origin: + - '*' + api-supported-versions: + - 2015-11-01-preview cache-control: - no-cache - cachecontrol: - - no-cache content-length: - - '1297' + - '956' content-type: - application/json; charset=utf-8 date: - - Mon, 11 May 2020 02:59:08 GMT + - Tue, 29 Aug 2023 07:30:38 GMT expires: - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.OperationsManagement/solutions/Containers(workspace000005)?api-version=2015-11-01-preview pragma: - no-cache - server: - - Microsoft-IIS/10.0 - - Microsoft-IIS/10.0 + request-context: + - appId=cid-v1:e6336c63-aab2-45f0-996a-e5dbab2a1508 strict-transport-security: - max-age=31536000; includeSubDomains - x-ams-apiversion: - - WebAPI1.0 x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - '1198' x-powered-by: - ASP.NET - - ASP.NET status: code: 201 message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - monitor log-analytics solution create + Connection: + - keep-alive + ParameterSetName: + - --resource-group -t --workspace --tags + User-Agent: + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.OperationsManagement/solutions/Containers(workspace000005)?api-version=2015-11-01-preview + response: + body: + string: '{"plan":{"name":"Containers(workspace000005)","publisher":"Microsoft","promotionCode":"","product":"OMSGallery/Containers"},"properties":{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.OperationalInsights/workspaces/workspace000005","provisioningState":"Succeeded","creationTime":"Tue, + 29 Aug 2023 07:30:38 GMT","lastModifiedTime":"Tue, 29 Aug 2023 07:30:38 GMT","containedResources":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.OperationalInsights/workspaces/workspace000005/views/Containers(workspace000005)"]},"location":"westus","tags":{"key3":"value3"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.OperationsManagement/solutions/Containers(workspace000005)","name":"Containers(workspace000005)","type":"Microsoft.OperationsManagement/solutions"}' + headers: + access-control-allow-origin: + - '*' + api-supported-versions: + - 2015-11-01-preview + cache-control: + - no-cache + content-length: + - '956' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 29 Aug 2023 07:30:39 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:e6336c63-aab2-45f0-996a-e5dbab2a1508 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK - request: body: null headers: @@ -898,32 +1208,26 @@ interactions: ParameterSetName: - --query User-Agent: - - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3 - azure-mgmt-operationsmanagement/0.1.0 Azure-SDK-For-Python AZURECLI/2.5.1 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.OperationsManagement/solutions?api-version=2015-11-01-preview response: body: - string: '{"value":[{"plan":{"name":"SecurityCenterFree(azps-test-la3)","publisher":"Microsoft","promotionCode":"","product":"OMSGallery/SecurityCenterFree"},"properties":{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/azps-test-group/providers/microsoft.operationalinsights/workspaces/azps-test-la3","provisioningState":"Succeeded","creationTime":"Sat, - 09 May 2020 01:16:14 GMT","lastModifiedTime":"Sun, 10 May 2020 06:46:19 GMT","containedResources":[]},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/azps-test-group/providers/Microsoft.OperationsManagement/solutions/SecurityCenterFree(azps-test-la3)","name":"SecurityCenterFree(azps-test-la3)","type":"Microsoft.OperationsManagement/solutions","location":"East - US"},{"plan":{"name":"Containers(zhoxing-test11)","publisher":"Microsoft","promotionCode":"","product":"OMSGallery/Containers"},"properties":{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/zhoxing-test/providers/microsoft.operationalinsights/workspaces/zhoxing-test11","provisioningState":"Succeeded","creationTime":"Mon, - 11 May 2020 02:53:09 GMT","lastModifiedTime":"Mon, 11 May 2020 02:55:26 GMT","containedResources":["/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/zhoxing-test/providers/microsoft.operationalinsights/workspaces/zhoxing-test11/views/Containers(zhoxing-test11)"]},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/zhoxing-test/providers/Microsoft.OperationsManagement/solutions/Containers(zhoxing-test11)","name":"Containers(zhoxing-test11)","type":"Microsoft.OperationsManagement/solutions","location":"Central - US"},{"plan":{"name":"Containers(workspace000005)","publisher":"Microsoft","promotionCode":"","product":"OMSGallery/Containers"},"properties":{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000002/providers/microsoft.operationalinsights/workspaces/workspace000005","provisioningState":"Succeeded","creationTime":"Mon, - 11 May 2020 02:59:07 GMT","lastModifiedTime":"Mon, 11 May 2020 02:59:07 GMT","containedResources":["/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000002/providers/microsoft.operationalinsights/workspaces/workspace000005/views/Containers(workspace000005)"]},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000002/providers/Microsoft.OperationsManagement/solutions/Containers(workspace000005)","name":"Containers(workspace000005)","type":"Microsoft.OperationsManagement/solutions","location":"West - US","tags":{"key3":"value3"}},{"plan":{"name":"Containers(workspace000004)","publisher":"Microsoft","promotionCode":"","product":"OMSGallery/Containers"},"properties":{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/microsoft.operationalinsights/workspaces/workspace000004","provisioningState":"Succeeded","creationTime":"Mon, - 11 May 2020 02:58:05 GMT","lastModifiedTime":"Mon, 11 May 2020 02:58:11 GMT","containedResources":["/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/microsoft.operationalinsights/workspaces/workspace000004/views/Containers(workspace000004)"]},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.OperationsManagement/solutions/Containers(workspace000004)","name":"Containers(workspace000004)","type":"Microsoft.OperationsManagement/solutions","location":"West - US","tags":{"key2":"value2"}}]}' + string: '{"value":[{"plan":{"name":"SecurityInsights(acctestlaw-221011134813007315)","publisher":"Microsoft","promotionCode":"","product":"OMSGallery/SecurityInsights"},"properties":{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-sentinel-221011134813007315/providers/Microsoft.OperationalInsights/workspaces/acctestLAW-221011134813007315","provisioningState":"Succeeded","creationTime":"Mon, + 31 Oct 2022 03:26:12 GMT","sku":{"name":"PerGB"},"lastModifiedTime":"Fri, + 04 Nov 2022 08:11:29 GMT","containedResources":[],"workbookTemplates":[]},"location":"westeurope","tags":{},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-sentinel-221011134813007315/providers/Microsoft.OperationsManagement/solutions/SecurityInsights(acctestLAW-221011134813007315)","name":"SecurityInsights(acctestLAW-221011134813007315)","type":"Microsoft.OperationsManagement/solutions"},{"plan":{"name":"SecurityCenterFree(acctestlaw-221011134813007315)","publisher":"Microsoft","promotionCode":"","product":"OMSGallery/SecurityCenterFree"},"properties":{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestrg-sentinel-221011134813007315/providers/Microsoft.OperationalInsights/workspaces/acctestLAW-221011134813007315","provisioningState":"Succeeded","creationTime":"Mon, + 07 Nov 2022 08:00:38 GMT","lastModifiedTime":"Sat, 26 Aug 2023 11:52:03 GMT","containedResources":[],"workbookTemplates":[]},"location":"westeurope","tags":{},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestrg-sentinel-221011134813007315/providers/Microsoft.OperationsManagement/solutions/SecurityCenterFree(acctestLAW-221011134813007315)","name":"SecurityCenterFree(acctestLAW-221011134813007315)","type":"Microsoft.OperationsManagement/solutions"},{"plan":{"name":"Containers(workspace000004)","publisher":"Microsoft","promotionCode":"","product":"OMSGallery/Containers"},"properties":{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.OperationalInsights/workspaces/workspace000004","provisioningState":"Succeeded","creationTime":"Tue, + 29 Aug 2023 07:30:18 GMT","lastModifiedTime":"Tue, 29 Aug 2023 07:30:23 GMT","containedResources":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.OperationalInsights/workspaces/workspace000004/views/Containers(workspace000004)"]},"location":"westus","tags":{"key2":"value2"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.OperationsManagement/solutions/Containers(workspace000004)","name":"Containers(workspace000004)","type":"Microsoft.OperationsManagement/solutions"},{"plan":{"name":"Containers(workspace000005)","publisher":"Microsoft","promotionCode":"","product":"OMSGallery/Containers"},"properties":{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.OperationalInsights/workspaces/workspace000005","provisioningState":"Succeeded","creationTime":"Tue, + 29 Aug 2023 07:30:38 GMT","lastModifiedTime":"Tue, 29 Aug 2023 07:30:38 GMT","containedResources":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.OperationalInsights/workspaces/workspace000005/views/Containers(workspace000005)"]},"location":"westus","tags":{"key3":"value3"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.OperationsManagement/solutions/Containers(workspace000005)","name":"Containers(workspace000005)","type":"Microsoft.OperationsManagement/solutions"}]}' headers: cache-control: - no-cache content-length: - - '4028' + - '3766' content-type: - application/json; charset=utf-8 date: - - Mon, 11 May 2020 02:59:11 GMT + - Tue, 29 Aug 2023 07:30:41 GMT expires: - '-1' pragma: @@ -935,9 +1239,8 @@ interactions: x-content-type-options: - nosniff x-ms-original-request-ids: - - 5d008318-c215-40e1-a88e-89be6e3ef055 - - e078ca37-7462-487d-af14-ff6b0c99e488 - - 7fe67036-bb57-4df5-a1b4-916afcac65eb + - '' + - '' status: code: 200 message: OK @@ -955,56 +1258,42 @@ interactions: ParameterSetName: - --resource-group --query User-Agent: - - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3 - azure-mgmt-operationsmanagement/0.1.0 Azure-SDK-For-Python AZURECLI/2.5.1 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000002/providers/Microsoft.OperationsManagement/solutions?api-version=2015-11-01-preview response: body: - string: "{\r\n \"value\": [\r\n {\r\n \"plan\": {\r\n \"name\": - \"Containers(workspace000005)\",\r\n \"publisher\": \"Microsoft\",\r\n - \ \"promotionCode\": \"\",\r\n \"product\": \"OMSGallery/Containers\"\r\n - \ },\r\n \"properties\": {\r\n \"workspaceResourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000002/providers/microsoft.operationalinsights/workspaces/workspace000005\",\r\n - \ \"provisioningState\": \"Succeeded\",\r\n \"creationTime\": - \"Mon, 11 May 2020 02:59:07 GMT\",\r\n \"lastModifiedTime\": \"Mon, - 11 May 2020 02:59:07 GMT\",\r\n \"containedResources\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000002/providers/microsoft.operationalinsights/workspaces/workspace000005/views/Containers(workspace000005)\"\r\n - \ ]\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000002/providers/Microsoft.OperationsManagement/solutions/Containers(workspace000005)\",\r\n - \ \"name\": \"Containers(workspace000005)\",\r\n \"type\": \"Microsoft.OperationsManagement/solutions\",\r\n - \ \"location\": \"West US\",\r\n \"tags\": {\r\n \"key3\": - \"value3\"\r\n }\r\n }\r\n ]\r\n}" + string: '{"value":[{"plan":{"name":"Containers(workspace000005)","publisher":"Microsoft","promotionCode":"","product":"OMSGallery/Containers"},"properties":{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.OperationalInsights/workspaces/workspace000005","provisioningState":"Succeeded","creationTime":"Tue, + 29 Aug 2023 07:30:38 GMT","lastModifiedTime":"Tue, 29 Aug 2023 07:30:38 GMT","containedResources":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.OperationalInsights/workspaces/workspace000005/views/Containers(workspace000005)"]},"location":"westus","tags":{"key3":"value3"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000002/providers/Microsoft.OperationsManagement/solutions/Containers(workspace000005)","name":"Containers(workspace000005)","type":"Microsoft.OperationsManagement/solutions"}]}' headers: + access-control-allow-origin: + - '*' + api-supported-versions: + - 2015-11-01-preview cache-control: - no-cache - cachecontrol: - - no-cache content-length: - - '1418' + - '968' content-type: - application/json; charset=utf-8 date: - - Mon, 11 May 2020 02:59:13 GMT + - Tue, 29 Aug 2023 07:30:43 GMT expires: - '-1' pragma: - no-cache - server: - - Microsoft-IIS/10.0 - - Microsoft-IIS/10.0 + request-context: + - appId=cid-v1:e6336c63-aab2-45f0-996a-e5dbab2a1508 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: - chunked vary: - Accept-Encoding - x-ams-apiversion: - - WebAPI1.0 x-content-type-options: - nosniff x-powered-by: - ASP.NET - - ASP.NET status: code: 200 message: OK @@ -1012,7 +1301,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -1024,42 +1313,37 @@ interactions: ParameterSetName: - --resource-group --name -y User-Agent: - - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3 - azure-mgmt-operationsmanagement/0.1.0 Azure-SDK-For-Python AZURECLI/2.5.1 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.OperationsManagement/solutions/Containers%28workspace000004%29?api-version=2015-11-01-preview response: body: string: '' headers: + access-control-allow-origin: + - '*' + api-supported-versions: + - 2015-11-01-preview cache-control: - no-cache - cachecontrol: - - no-cache content-length: - '0' date: - - Mon, 11 May 2020 02:59:21 GMT + - Tue, 29 Aug 2023 07:30:48 GMT expires: - '-1' pragma: - no-cache - server: - - Microsoft-IIS/10.0 - - Microsoft-IIS/10.0 + request-context: + - appId=cid-v1:e6336c63-aab2-45f0-996a-e5dbab2a1508 strict-transport-security: - max-age=31536000; includeSubDomains - x-ams-apiversion: - - WebAPI1.0 x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-deletes: - '14999' x-powered-by: - ASP.NET - - ASP.NET status: code: 200 message: OK @@ -1067,7 +1351,7 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate CommandName: @@ -1079,42 +1363,37 @@ interactions: ParameterSetName: - --resource-group --name -y User-Agent: - - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3 - azure-mgmt-operationsmanagement/0.1.0 Azure-SDK-For-Python AZURECLI/2.5.1 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000002/providers/Microsoft.OperationsManagement/solutions/Containers%28workspace000005%29?api-version=2015-11-01-preview response: body: string: '' headers: + access-control-allow-origin: + - '*' + api-supported-versions: + - 2015-11-01-preview cache-control: - no-cache - cachecontrol: - - no-cache content-length: - '0' date: - - Mon, 11 May 2020 02:59:27 GMT + - Tue, 29 Aug 2023 07:30:52 GMT expires: - '-1' pragma: - no-cache - server: - - Microsoft-IIS/10.0 - - Microsoft-IIS/10.0 + request-context: + - appId=cid-v1:e6336c63-aab2-45f0-996a-e5dbab2a1508 strict-transport-security: - max-age=31536000; includeSubDomains - x-ams-apiversion: - - WebAPI1.0 x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-deletes: - - '14999' + - '14998' x-powered-by: - ASP.NET - - ASP.NET status: code: 200 message: OK @@ -1132,12 +1411,9 @@ interactions: ParameterSetName: - -g -n --resource-type User-Agent: - - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3 - azure-mgmt-resource/9.0.0 Azure-SDK-For-Python AZURECLI/2.5.1 - accept-language: - - en-US + - AZURECLI/2.51.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.10.9 (Windows-10-10.0.22621-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.OperationalInsights?api-version=2019-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.OperationalInsights?api-version=2022-09-01 response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.OperationalInsights","namespace":"Microsoft.OperationalInsights","authorizations":[{"applicationId":"d2a0a418-0aac-4541-82b2-b3142c89da77","roleDefinitionId":"86695298-2eb9-48a7-9ec3-2fdb38b6878b"},{"applicationId":"ca7f3f0b-7d91-482c-8e09-c5d840d0eac5","roleDefinitionId":"5d5a2e56-9835-44aa-93db-d2f19e155438"}],"resourceTypes":[{"resourceType":"workspaces","locations":["East @@ -1145,50 +1421,126 @@ interactions: East","UK South","Central India","Canada Central","West US 2","Australia Central","Australia East","France Central","Korea Central","North Europe","Central US","East Asia","East US 2","South Central US","North Central US","West US","UK West","South Africa - North","Brazil South","Switzerland North","Switzerland West"],"apiVersions":["2020-03-01-preview","2017-04-26-preview","2017-03-15-preview","2017-03-03-preview","2017-01-01-preview","2015-11-01-preview","2015-03-20"],"capabilities":"CrossResourceGroupResourceMove, - CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"locations","locations":[],"apiVersions":["2020-03-01-preview","2019-08-01-preview","2017-04-26-preview","2017-03-15-preview","2017-03-03-preview","2017-01-01-preview","2015-11-01-preview","2015-03-20"],"defaultApiVersion":"2015-11-01-preview","capabilities":"None"},{"resourceType":"locations/operationStatuses","locations":["East + North","Brazil South","Switzerland North","Switzerland West","Germany West + Central","Australia Central 2","UAE Central","UAE North","Japan West","Brazil + Southeast","Norway East","Norway West","France South","South India","Korea + South","Jio India Central","Jio India West","Qatar Central","Canada East","West + US 3","Sweden Central","South Africa West","Germany North","Poland Central"],"apiVersions":["2022-10-01","2021-12-01-preview","2021-06-01","2021-03-01-privatepreview","2020-10-01","2020-08-01","2020-03-01-preview","2017-04-26-preview","2017-03-15-preview","2017-03-03-preview","2017-01-01-preview","2015-11-01-preview","2015-03-20"],"defaultApiVersion":"2022-10-01","capabilities":"CrossResourceGroupResourceMove, + CrossSubscriptionResourceMove, SystemAssignedResourceIdentity, SupportsTags, + SupportsLocation"},{"resourceType":"querypacks","locations":["West Central + US","East US","South Central US","North Europe","West Europe","Southeast Asia","West + US 2","UK South","Canada Central","Central India","Japan East","Australia + East","Korea Central","France Central","Central US","East US 2","East Asia","West + US","South Africa North","North Central US","Brazil South","Switzerland North","Norway + East","Australia Southeast","Australia Central 2","Germany West Central","Switzerland + West","UAE Central","UK West","Brazil Southeast","Japan West","UAE North","Australia + Central","France South","South India","Korea South","Jio India Central","Jio + India West","Qatar Central","Canada East","West US 3","Sweden Central"],"apiVersions":["2019-09-01-preview","2019-09-01"],"capabilities":"SupportsTags, + SupportsLocation"},{"resourceType":"locations","locations":[],"apiVersions":["2020-10-01","2020-08-01","2020-03-01-preview","2019-08-01-preview","2017-04-26-preview","2017-03-15-preview","2017-03-03-preview","2017-01-01-preview","2015-11-01-preview","2015-03-20"],"defaultApiVersion":"2020-08-01","capabilities":"None"},{"resourceType":"locations/operationStatuses","locations":["East + US","West Europe","Southeast Asia","Australia Southeast","West Central US","Japan + East","UK South","Central India","Canada Central","West US 2","Australia Central","Australia + East","France Central","Korea Central","North Europe","Central US","East Asia","East + US 2","South Central US","North Central US","West US","UK West","South Africa + North","Brazil South","Switzerland North","Switzerland West","Germany West + Central","Australia Central 2","UAE Central","UAE North","Japan West","Brazil + Southeast","Norway East","Norway West","France South","South India","Korea + South","Jio India Central","Jio India West","Qatar Central","Canada East","West + US 3","Sweden Central","South Africa West","Germany North","Poland Central"],"apiVersions":["2023-01-01-preview","2022-10-01","2022-09-01-privatepreview","2021-12-01-preview","2020-10-01","2020-08-01","2020-03-01-preview","2019-08-01-preview","2017-04-26-preview","2017-03-15-preview","2017-03-03-preview","2017-01-01-preview","2015-11-01-preview","2015-03-20"],"defaultApiVersion":"2022-10-01","capabilities":"None"},{"resourceType":"workspaces/scopedPrivateLinkProxies","locations":["East US","West Europe","Southeast Asia","Australia Southeast","West Central US","Japan East","UK South","Central India","Canada Central","West US 2","Australia Central","Australia East","France Central","Korea Central","North Europe","Central US","East Asia","East US 2","South Central US","North Central US","West US","UK West","South Africa - North","Brazil South","Switzerland North","Switzerland West"],"apiVersions":["2020-03-01-preview","2019-08-01-preview","2017-04-26-preview","2017-03-15-preview","2017-03-03-preview","2017-01-01-preview","2015-11-01-preview","2015-03-20"],"defaultApiVersion":"2015-11-01-preview","capabilities":"None"},{"resourceType":"workspaces/scopedPrivateLinkProxies","locations":["East + North","Brazil South","Switzerland North","Switzerland West","Germany West + Central","Australia Central 2","UAE Central","UAE North","Japan West","Brazil + Southeast","Norway East","Norway West","France South","South India","Korea + South","Jio India Central","Jio India West","Qatar Central","Canada East","West + US 3","Sweden Central","South Africa West","Germany North","Poland Central"],"apiVersions":["2020-03-01-preview","2019-08-01-preview","2015-11-01-preview"],"defaultApiVersion":"2020-03-01-preview","capabilities":"None"},{"resourceType":"workspaces/api","locations":[],"apiVersions":["2020-08-01","2020-03-01-preview","2017-01-01-preview"],"capabilities":"None"},{"resourceType":"workspaces/query","locations":[],"apiVersions":["2017-10-01"],"capabilities":"None"},{"resourceType":"workspaces/metadata","locations":[],"apiVersions":["2017-10-01"],"capabilities":"None"},{"resourceType":"workspaces/purge","locations":[],"apiVersions":["2022-10-01","2020-10-01","2020-08-01","2017-04-26-preview","2015-03-20"],"capabilities":"None"},{"resourceType":"workspaces/operations","locations":[],"apiVersions":["2022-10-01","2020-08-01","2017-04-26-preview","2015-03-20"],"capabilities":"None"},{"resourceType":"workspaces/dataSources","locations":["East US","West Europe","Southeast Asia","Australia Southeast","West Central US","Japan East","UK South","Central India","Canada Central","West US 2","Australia Central","Australia East","France Central","Korea Central","North Europe","Central US","East Asia","East US 2","South Central US","North Central US","West US","UK West","South Africa - North","Brazil South","Switzerland North","Switzerland West"],"apiVersions":["2020-03-01-preview","2019-08-01-preview","2015-11-01-preview"],"defaultApiVersion":"2015-11-01-preview","capabilities":"None"},{"resourceType":"workspaces/query","locations":[],"apiVersions":["2017-10-01"],"capabilities":"None"},{"resourceType":"workspaces/metadata","locations":[],"apiVersions":["2017-10-01"],"capabilities":"None"},{"resourceType":"workspaces/dataSources","locations":["East + North","Brazil South","Switzerland North","Switzerland West","Germany West + Central","Australia Central 2","UAE Central","UAE North","Japan West","Brazil + Southeast","Norway East","Norway West","France South","South India","Korea + South","Jio India Central","Jio India West","Qatar Central","Canada East","West + US 3","Sweden Central","South Africa West","Germany North","Poland Central"],"apiVersions":["2020-08-01","2020-03-01-preview","2015-11-01-preview"],"defaultApiVersion":"2020-08-01","capabilities":"None"},{"resourceType":"workspaces/linkedStorageAccounts","locations":["East US","West Europe","Southeast Asia","Australia Southeast","West Central US","Japan East","UK South","Central India","Canada Central","West US 2","Australia Central","Australia East","France Central","Korea Central","North Europe","Central US","East Asia","East US 2","South Central US","North Central US","West US","UK West","South Africa - North","Brazil South","Switzerland North","Switzerland West"],"apiVersions":["2020-03-01-preview","2015-11-01-preview"],"defaultApiVersion":"2015-11-01-preview","capabilities":"None"},{"resourceType":"workspaces/linkedStorageAccounts","locations":["East + North","Brazil South","Switzerland North","Switzerland West","Germany West + Central","Australia Central 2","UAE Central","UAE North","Japan West","Brazil + Southeast","Norway East","Norway West","France South","South India","Korea + South","Jio India Central","Jio India West","Qatar Central","Canada East","West + US 3","Sweden Central","South Africa West","Germany North","Poland Central"],"apiVersions":["2020-08-01","2020-03-01-preview","2019-08-01-preview"],"defaultApiVersion":"2020-08-01","capabilities":"None"},{"resourceType":"workspaces/tables","locations":["East + US","West Europe","Southeast Asia","Australia Southeast","West Central US","Japan + East","UK South","Central India","Canada Central","West US 2","Australia East","Australia + Central","France Central","Korea Central","North Europe","Central US","East + Asia","East US 2","South Central US","North Central US","West US","UK West","South + Africa North","Brazil South","Switzerland North","Switzerland West","Germany + West Central","Australia Central 2","UAE Central","UAE North","Japan West","Brazil + Southeast","Norway East","Norway West","France South","South India","Korea + South","Jio India Central","Jio India West","Qatar Central","Canada East","West + US 3","Sweden Central","South Africa West","Germany North","Poland Central","East + US 2 EUAP","Sweden South","Central US EUAP","Israel Central","Italy North"],"apiVersions":["2021-07-01-privatepreview","2021-03-01-privatepreview","2020-10-01"],"capabilities":"None"},{"resourceType":"workspaces/storageInsightConfigs","locations":["East + US","West Europe","Southeast Asia","Australia Southeast","West Central US","Japan + East","UK South","Central India","Canada Central","West US 2","Australia East","Australia + Central","France Central","Korea Central","North Europe","Central US","East + Asia","East US 2","South Central US","North Central US","West US","UK West","South + Africa North","Brazil South","Switzerland North","Switzerland West","Germany + West Central","Australia Central 2","UAE Central","UAE North","Japan West","Brazil + Southeast","Norway East","Norway West","France South","South India","Korea + South","Jio India Central","Jio India West","Qatar Central","Canada East","West + US 3","Sweden Central","South Africa West","Germany North","Poland Central"],"apiVersions":["2020-08-01","2020-03-01-preview","2017-04-26-preview","2017-03-15-preview","2017-03-03-preview","2017-01-01-preview","2015-11-01-preview","2015-03-20"],"capabilities":"None"},{"resourceType":"storageInsightConfigs","locations":[],"apiVersions":["2020-08-01","2020-03-01-preview","2014-10-10"],"capabilities":"SupportsExtension"},{"resourceType":"workspaces/linkedServices","locations":["East US","West Europe","Southeast Asia","Australia Southeast","West Central US","Japan East","UK South","Central India","Canada Central","West US 2","Australia Central","Australia East","France Central","Korea Central","North Europe","Central US","East Asia","East US 2","South Central US","North Central US","West US","UK West","South Africa - North","Brazil South","Switzerland North","Switzerland West"],"apiVersions":["2020-03-01-preview","2019-08-01-preview"],"defaultApiVersion":"2019-08-01-preview","capabilities":"None"},{"resourceType":"storageInsightConfigs","locations":[],"apiVersions":["2020-03-01-preview","2014-10-10"],"capabilities":"SupportsExtension"},{"resourceType":"workspaces/linkedServices","locations":["East + North","Brazil South","Switzerland North","Switzerland West","Germany West + Central","Australia Central 2","UAE Central","UAE North","Japan West","Brazil + Southeast","Norway East","Norway West","France South","South India","Korea + South","Jio India Central","Jio India West","Qatar Central","Canada East","West + US 3","Sweden Central","South Africa West","Germany North","Poland Central"],"apiVersions":["2020-08-01","2020-03-01-preview","2019-08-01-preview","2015-11-01-preview"],"defaultApiVersion":"2020-08-01","capabilities":"None"},{"resourceType":"linkTargets","locations":["East + US"],"apiVersions":["2020-03-01-preview","2015-03-20"],"capabilities":"None"},{"resourceType":"deletedWorkspaces","locations":["East US","West Europe","Southeast Asia","Australia Southeast","West Central US","Japan East","UK South","Central India","Canada Central","West US 2","Australia Central","Australia East","France Central","Korea Central","North Europe","Central US","East Asia","East US 2","South Central US","North Central US","West US","UK West","South Africa - North","Brazil South","Switzerland North","Switzerland West"],"apiVersions":["2020-03-01-preview","2019-08-01-preview","2015-11-01-preview"],"defaultApiVersion":"2015-11-01-preview","capabilities":"None"},{"resourceType":"linkTargets","locations":["East - US"],"apiVersions":["2020-03-01-preview","2015-03-20"],"capabilities":"None"},{"resourceType":"operations","locations":[],"apiVersions":["2020-03-01-preview","2015-11-01-preview","2014-11-10"],"defaultApiVersion":"2015-11-01-preview","capabilities":"None"},{"resourceType":"clusters","locations":["East + North","Brazil South","Switzerland North","Switzerland West","Germany West + Central","Australia Central 2","UAE Central","UAE North","Japan West","Brazil + Southeast","Norway East","Norway West","France South","South India","Korea + South","Jio India Central","Jio India West","Qatar Central","Canada East","West + US 3","Sweden Central","South Africa West","Germany North","Poland Central"],"apiVersions":["2022-10-01","2021-12-01-preview","2020-10-01","2020-08-01","2020-03-01-preview"],"defaultApiVersion":"2022-10-01","capabilities":"None"},{"resourceType":"operations","locations":[],"apiVersions":["2022-10-01","2021-12-01-preview","2020-10-01","2020-08-01","2020-03-01-preview","2015-11-01-preview","2014-11-10"],"defaultApiVersion":"2020-08-01","capabilities":"None"},{"resourceType":"clusters","locations":["East US","West Europe","Southeast Asia","Australia Southeast","West Central US","Japan East","UK South","Central India","Canada Central","West US 2","Australia Central","Australia East","France Central","Korea Central","North Europe","Central US","East Asia","East US 2","South Central US","North Central US","West US","UK West","South Africa - North","Switzerland North","Switzerland West","Brazil South"],"apiVersions":["2020-03-01-preview","2019-08-01-preview"],"defaultApiVersion":"2019-08-01-preview","capabilities":"CrossResourceGroupResourceMove, + North","Switzerland North","Switzerland West","Germany West Central","Australia + Central 2","UAE Central","Brazil South","UAE North","Japan West","Brazil Southeast","Norway + East","Norway West","France South","South India","Korea South","Jio India + Central","Jio India West","Qatar Central","Canada East","West US 3","Sweden + Central","South Africa West","Germany North","Poland Central"],"apiVersions":["2021-06-01","2020-10-01","2020-08-01","2020-03-01-preview","2019-08-01-preview"],"defaultApiVersion":"2021-06-01","capabilities":"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity, SupportsTags, - SupportsLocation"}],"registrationState":"Registered","registrationPolicy":"RegistrationRequired"}' + SupportsLocation"},{"resourceType":"workspaces/dataExports","locations":["East + US","West Europe","Southeast Asia","Australia Southeast","West Central US","Japan + East","UK South","Central India","Canada Central","West US 2","Australia Central","Australia + East","France Central","Korea Central","North Europe","Central US","East Asia","East + US 2","South Central US","North Central US","West US","UK West","South Africa + North","Brazil South","Switzerland North","Switzerland West","Germany West + Central","Australia Central 2","UAE Central","UAE North","Japan West","Brazil + Southeast","Norway East","Norway West","France South","South India","Korea + South","Jio India Central","Jio India West","Qatar Central","Canada East","West + US 3","Sweden Central","South Africa West","Germany North","Poland Central"],"apiVersions":["2020-08-01","2020-03-01-preview","2019-08-01-preview"],"defaultApiVersion":"2020-08-01","capabilities":"None"},{"resourceType":"locations/notifyNetworkSecurityPerimeterUpdatesAvailable","locations":["North + Central US","East US 2 EUAP"],"apiVersions":["2021-10-01"],"defaultApiVersion":"2021-10-01","capabilities":"None"}],"registrationState":"Registered","registrationPolicy":"RegistrationRequired"}' headers: cache-control: - no-cache content-length: - - '5930' + - '13850' content-type: - application/json; charset=utf-8 date: - - Mon, 11 May 2020 02:59:28 GMT + - Tue, 29 Aug 2023 07:30:54 GMT expires: - '-1' pragma: @@ -1218,36 +1570,37 @@ interactions: ParameterSetName: - -g -n --resource-type User-Agent: - - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3 - azure-mgmt-resource/9.0.0 Azure-SDK-For-Python AZURECLI/2.5.1 - accept-language: - - en-US + - AZURECLI/2.51.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.10.9 (Windows-10-10.0.22621-SP0) method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.OperationalInsights/workspaces/workspace000004?api-version=2015-03-20 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.OperationalInsights/workspaces/workspace000004?api-version=2022-10-01 response: body: string: '' headers: + access-control-allow-origin: + - '*' + api-supported-versions: + - 2015-03-20, 2020-08-01, 2020-10-01, 2021-06-01, 2022-10-01 cache-control: - no-cache content-length: - '0' date: - - Mon, 11 May 2020 02:59:31 GMT + - Tue, 29 Aug 2023 07:31:01 GMT + expires: + - '-1' pragma: - no-cache - server: - - Microsoft-IIS/10.0 - - Microsoft-IIS/10.0 + request-context: + - appId=cid-v1:e6336c63-aab2-45f0-996a-e5dbab2a1508 strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-deletes: - - '14998' + - '14999' x-powered-by: - ASP.NET - - ASP.NET status: code: 200 message: OK @@ -1265,12 +1618,9 @@ interactions: ParameterSetName: - -g -n --resource-type User-Agent: - - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3 - azure-mgmt-resource/9.0.0 Azure-SDK-For-Python AZURECLI/2.5.1 - accept-language: - - en-US + - AZURECLI/2.51.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.10.9 (Windows-10-10.0.22621-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.OperationalInsights?api-version=2019-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.OperationalInsights?api-version=2022-09-01 response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.OperationalInsights","namespace":"Microsoft.OperationalInsights","authorizations":[{"applicationId":"d2a0a418-0aac-4541-82b2-b3142c89da77","roleDefinitionId":"86695298-2eb9-48a7-9ec3-2fdb38b6878b"},{"applicationId":"ca7f3f0b-7d91-482c-8e09-c5d840d0eac5","roleDefinitionId":"5d5a2e56-9835-44aa-93db-d2f19e155438"}],"resourceTypes":[{"resourceType":"workspaces","locations":["East @@ -1278,50 +1628,126 @@ interactions: East","UK South","Central India","Canada Central","West US 2","Australia Central","Australia East","France Central","Korea Central","North Europe","Central US","East Asia","East US 2","South Central US","North Central US","West US","UK West","South Africa - North","Brazil South","Switzerland North","Switzerland West"],"apiVersions":["2020-03-01-preview","2017-04-26-preview","2017-03-15-preview","2017-03-03-preview","2017-01-01-preview","2015-11-01-preview","2015-03-20"],"capabilities":"CrossResourceGroupResourceMove, - CrossSubscriptionResourceMove, SupportsTags, SupportsLocation"},{"resourceType":"locations","locations":[],"apiVersions":["2020-03-01-preview","2019-08-01-preview","2017-04-26-preview","2017-03-15-preview","2017-03-03-preview","2017-01-01-preview","2015-11-01-preview","2015-03-20"],"defaultApiVersion":"2015-11-01-preview","capabilities":"None"},{"resourceType":"locations/operationStatuses","locations":["East + North","Brazil South","Switzerland North","Switzerland West","Germany West + Central","Australia Central 2","UAE Central","UAE North","Japan West","Brazil + Southeast","Norway East","Norway West","France South","South India","Korea + South","Jio India Central","Jio India West","Qatar Central","Canada East","West + US 3","Sweden Central","South Africa West","Germany North","Poland Central"],"apiVersions":["2022-10-01","2021-12-01-preview","2021-06-01","2021-03-01-privatepreview","2020-10-01","2020-08-01","2020-03-01-preview","2017-04-26-preview","2017-03-15-preview","2017-03-03-preview","2017-01-01-preview","2015-11-01-preview","2015-03-20"],"defaultApiVersion":"2022-10-01","capabilities":"CrossResourceGroupResourceMove, + CrossSubscriptionResourceMove, SystemAssignedResourceIdentity, SupportsTags, + SupportsLocation"},{"resourceType":"querypacks","locations":["West Central + US","East US","South Central US","North Europe","West Europe","Southeast Asia","West + US 2","UK South","Canada Central","Central India","Japan East","Australia + East","Korea Central","France Central","Central US","East US 2","East Asia","West + US","South Africa North","North Central US","Brazil South","Switzerland North","Norway + East","Australia Southeast","Australia Central 2","Germany West Central","Switzerland + West","UAE Central","UK West","Brazil Southeast","Japan West","UAE North","Australia + Central","France South","South India","Korea South","Jio India Central","Jio + India West","Qatar Central","Canada East","West US 3","Sweden Central"],"apiVersions":["2019-09-01-preview","2019-09-01"],"capabilities":"SupportsTags, + SupportsLocation"},{"resourceType":"locations","locations":[],"apiVersions":["2020-10-01","2020-08-01","2020-03-01-preview","2019-08-01-preview","2017-04-26-preview","2017-03-15-preview","2017-03-03-preview","2017-01-01-preview","2015-11-01-preview","2015-03-20"],"defaultApiVersion":"2020-08-01","capabilities":"None"},{"resourceType":"locations/operationStatuses","locations":["East US","West Europe","Southeast Asia","Australia Southeast","West Central US","Japan East","UK South","Central India","Canada Central","West US 2","Australia Central","Australia East","France Central","Korea Central","North Europe","Central US","East Asia","East US 2","South Central US","North Central US","West US","UK West","South Africa - North","Brazil South","Switzerland North","Switzerland West"],"apiVersions":["2020-03-01-preview","2019-08-01-preview","2017-04-26-preview","2017-03-15-preview","2017-03-03-preview","2017-01-01-preview","2015-11-01-preview","2015-03-20"],"defaultApiVersion":"2015-11-01-preview","capabilities":"None"},{"resourceType":"workspaces/scopedPrivateLinkProxies","locations":["East + North","Brazil South","Switzerland North","Switzerland West","Germany West + Central","Australia Central 2","UAE Central","UAE North","Japan West","Brazil + Southeast","Norway East","Norway West","France South","South India","Korea + South","Jio India Central","Jio India West","Qatar Central","Canada East","West + US 3","Sweden Central","South Africa West","Germany North","Poland Central"],"apiVersions":["2023-01-01-preview","2022-10-01","2022-09-01-privatepreview","2021-12-01-preview","2020-10-01","2020-08-01","2020-03-01-preview","2019-08-01-preview","2017-04-26-preview","2017-03-15-preview","2017-03-03-preview","2017-01-01-preview","2015-11-01-preview","2015-03-20"],"defaultApiVersion":"2022-10-01","capabilities":"None"},{"resourceType":"workspaces/scopedPrivateLinkProxies","locations":["East US","West Europe","Southeast Asia","Australia Southeast","West Central US","Japan East","UK South","Central India","Canada Central","West US 2","Australia Central","Australia East","France Central","Korea Central","North Europe","Central US","East Asia","East US 2","South Central US","North Central US","West US","UK West","South Africa - North","Brazil South","Switzerland North","Switzerland West"],"apiVersions":["2020-03-01-preview","2019-08-01-preview","2015-11-01-preview"],"defaultApiVersion":"2015-11-01-preview","capabilities":"None"},{"resourceType":"workspaces/query","locations":[],"apiVersions":["2017-10-01"],"capabilities":"None"},{"resourceType":"workspaces/metadata","locations":[],"apiVersions":["2017-10-01"],"capabilities":"None"},{"resourceType":"workspaces/dataSources","locations":["East + North","Brazil South","Switzerland North","Switzerland West","Germany West + Central","Australia Central 2","UAE Central","UAE North","Japan West","Brazil + Southeast","Norway East","Norway West","France South","South India","Korea + South","Jio India Central","Jio India West","Qatar Central","Canada East","West + US 3","Sweden Central","South Africa West","Germany North","Poland Central"],"apiVersions":["2020-03-01-preview","2019-08-01-preview","2015-11-01-preview"],"defaultApiVersion":"2020-03-01-preview","capabilities":"None"},{"resourceType":"workspaces/api","locations":[],"apiVersions":["2020-08-01","2020-03-01-preview","2017-01-01-preview"],"capabilities":"None"},{"resourceType":"workspaces/query","locations":[],"apiVersions":["2017-10-01"],"capabilities":"None"},{"resourceType":"workspaces/metadata","locations":[],"apiVersions":["2017-10-01"],"capabilities":"None"},{"resourceType":"workspaces/purge","locations":[],"apiVersions":["2022-10-01","2020-10-01","2020-08-01","2017-04-26-preview","2015-03-20"],"capabilities":"None"},{"resourceType":"workspaces/operations","locations":[],"apiVersions":["2022-10-01","2020-08-01","2017-04-26-preview","2015-03-20"],"capabilities":"None"},{"resourceType":"workspaces/dataSources","locations":["East US","West Europe","Southeast Asia","Australia Southeast","West Central US","Japan East","UK South","Central India","Canada Central","West US 2","Australia Central","Australia East","France Central","Korea Central","North Europe","Central US","East Asia","East US 2","South Central US","North Central US","West US","UK West","South Africa - North","Brazil South","Switzerland North","Switzerland West"],"apiVersions":["2020-03-01-preview","2015-11-01-preview"],"defaultApiVersion":"2015-11-01-preview","capabilities":"None"},{"resourceType":"workspaces/linkedStorageAccounts","locations":["East + North","Brazil South","Switzerland North","Switzerland West","Germany West + Central","Australia Central 2","UAE Central","UAE North","Japan West","Brazil + Southeast","Norway East","Norway West","France South","South India","Korea + South","Jio India Central","Jio India West","Qatar Central","Canada East","West + US 3","Sweden Central","South Africa West","Germany North","Poland Central"],"apiVersions":["2020-08-01","2020-03-01-preview","2015-11-01-preview"],"defaultApiVersion":"2020-08-01","capabilities":"None"},{"resourceType":"workspaces/linkedStorageAccounts","locations":["East US","West Europe","Southeast Asia","Australia Southeast","West Central US","Japan East","UK South","Central India","Canada Central","West US 2","Australia Central","Australia East","France Central","Korea Central","North Europe","Central US","East Asia","East US 2","South Central US","North Central US","West US","UK West","South Africa - North","Brazil South","Switzerland North","Switzerland West"],"apiVersions":["2020-03-01-preview","2019-08-01-preview"],"defaultApiVersion":"2019-08-01-preview","capabilities":"None"},{"resourceType":"storageInsightConfigs","locations":[],"apiVersions":["2020-03-01-preview","2014-10-10"],"capabilities":"SupportsExtension"},{"resourceType":"workspaces/linkedServices","locations":["East + North","Brazil South","Switzerland North","Switzerland West","Germany West + Central","Australia Central 2","UAE Central","UAE North","Japan West","Brazil + Southeast","Norway East","Norway West","France South","South India","Korea + South","Jio India Central","Jio India West","Qatar Central","Canada East","West + US 3","Sweden Central","South Africa West","Germany North","Poland Central"],"apiVersions":["2020-08-01","2020-03-01-preview","2019-08-01-preview"],"defaultApiVersion":"2020-08-01","capabilities":"None"},{"resourceType":"workspaces/tables","locations":["East + US","West Europe","Southeast Asia","Australia Southeast","West Central US","Japan + East","UK South","Central India","Canada Central","West US 2","Australia East","Australia + Central","France Central","Korea Central","North Europe","Central US","East + Asia","East US 2","South Central US","North Central US","West US","UK West","South + Africa North","Brazil South","Switzerland North","Switzerland West","Germany + West Central","Australia Central 2","UAE Central","UAE North","Japan West","Brazil + Southeast","Norway East","Norway West","France South","South India","Korea + South","Jio India Central","Jio India West","Qatar Central","Canada East","West + US 3","Sweden Central","South Africa West","Germany North","Poland Central","East + US 2 EUAP","Sweden South","Central US EUAP","Israel Central","Italy North"],"apiVersions":["2021-07-01-privatepreview","2021-03-01-privatepreview","2020-10-01"],"capabilities":"None"},{"resourceType":"workspaces/storageInsightConfigs","locations":["East + US","West Europe","Southeast Asia","Australia Southeast","West Central US","Japan + East","UK South","Central India","Canada Central","West US 2","Australia East","Australia + Central","France Central","Korea Central","North Europe","Central US","East + Asia","East US 2","South Central US","North Central US","West US","UK West","South + Africa North","Brazil South","Switzerland North","Switzerland West","Germany + West Central","Australia Central 2","UAE Central","UAE North","Japan West","Brazil + Southeast","Norway East","Norway West","France South","South India","Korea + South","Jio India Central","Jio India West","Qatar Central","Canada East","West + US 3","Sweden Central","South Africa West","Germany North","Poland Central"],"apiVersions":["2020-08-01","2020-03-01-preview","2017-04-26-preview","2017-03-15-preview","2017-03-03-preview","2017-01-01-preview","2015-11-01-preview","2015-03-20"],"capabilities":"None"},{"resourceType":"storageInsightConfigs","locations":[],"apiVersions":["2020-08-01","2020-03-01-preview","2014-10-10"],"capabilities":"SupportsExtension"},{"resourceType":"workspaces/linkedServices","locations":["East US","West Europe","Southeast Asia","Australia Southeast","West Central US","Japan East","UK South","Central India","Canada Central","West US 2","Australia Central","Australia East","France Central","Korea Central","North Europe","Central US","East Asia","East US 2","South Central US","North Central US","West US","UK West","South Africa - North","Brazil South","Switzerland North","Switzerland West"],"apiVersions":["2020-03-01-preview","2019-08-01-preview","2015-11-01-preview"],"defaultApiVersion":"2015-11-01-preview","capabilities":"None"},{"resourceType":"linkTargets","locations":["East - US"],"apiVersions":["2020-03-01-preview","2015-03-20"],"capabilities":"None"},{"resourceType":"operations","locations":[],"apiVersions":["2020-03-01-preview","2015-11-01-preview","2014-11-10"],"defaultApiVersion":"2015-11-01-preview","capabilities":"None"},{"resourceType":"clusters","locations":["East + North","Brazil South","Switzerland North","Switzerland West","Germany West + Central","Australia Central 2","UAE Central","UAE North","Japan West","Brazil + Southeast","Norway East","Norway West","France South","South India","Korea + South","Jio India Central","Jio India West","Qatar Central","Canada East","West + US 3","Sweden Central","South Africa West","Germany North","Poland Central"],"apiVersions":["2020-08-01","2020-03-01-preview","2019-08-01-preview","2015-11-01-preview"],"defaultApiVersion":"2020-08-01","capabilities":"None"},{"resourceType":"linkTargets","locations":["East + US"],"apiVersions":["2020-03-01-preview","2015-03-20"],"capabilities":"None"},{"resourceType":"deletedWorkspaces","locations":["East US","West Europe","Southeast Asia","Australia Southeast","West Central US","Japan East","UK South","Central India","Canada Central","West US 2","Australia Central","Australia East","France Central","Korea Central","North Europe","Central US","East Asia","East US 2","South Central US","North Central US","West US","UK West","South Africa - North","Switzerland North","Switzerland West","Brazil South"],"apiVersions":["2020-03-01-preview","2019-08-01-preview"],"defaultApiVersion":"2019-08-01-preview","capabilities":"CrossResourceGroupResourceMove, + North","Brazil South","Switzerland North","Switzerland West","Germany West + Central","Australia Central 2","UAE Central","UAE North","Japan West","Brazil + Southeast","Norway East","Norway West","France South","South India","Korea + South","Jio India Central","Jio India West","Qatar Central","Canada East","West + US 3","Sweden Central","South Africa West","Germany North","Poland Central"],"apiVersions":["2022-10-01","2021-12-01-preview","2020-10-01","2020-08-01","2020-03-01-preview"],"defaultApiVersion":"2022-10-01","capabilities":"None"},{"resourceType":"operations","locations":[],"apiVersions":["2022-10-01","2021-12-01-preview","2020-10-01","2020-08-01","2020-03-01-preview","2015-11-01-preview","2014-11-10"],"defaultApiVersion":"2020-08-01","capabilities":"None"},{"resourceType":"clusters","locations":["East + US","West Europe","Southeast Asia","Australia Southeast","West Central US","Japan + East","UK South","Central India","Canada Central","West US 2","Australia Central","Australia + East","France Central","Korea Central","North Europe","Central US","East Asia","East + US 2","South Central US","North Central US","West US","UK West","South Africa + North","Switzerland North","Switzerland West","Germany West Central","Australia + Central 2","UAE Central","Brazil South","UAE North","Japan West","Brazil Southeast","Norway + East","Norway West","France South","South India","Korea South","Jio India + Central","Jio India West","Qatar Central","Canada East","West US 3","Sweden + Central","South Africa West","Germany North","Poland Central"],"apiVersions":["2021-06-01","2020-10-01","2020-08-01","2020-03-01-preview","2019-08-01-preview"],"defaultApiVersion":"2021-06-01","capabilities":"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity, SupportsTags, - SupportsLocation"}],"registrationState":"Registered","registrationPolicy":"RegistrationRequired"}' + SupportsLocation"},{"resourceType":"workspaces/dataExports","locations":["East + US","West Europe","Southeast Asia","Australia Southeast","West Central US","Japan + East","UK South","Central India","Canada Central","West US 2","Australia Central","Australia + East","France Central","Korea Central","North Europe","Central US","East Asia","East + US 2","South Central US","North Central US","West US","UK West","South Africa + North","Brazil South","Switzerland North","Switzerland West","Germany West + Central","Australia Central 2","UAE Central","UAE North","Japan West","Brazil + Southeast","Norway East","Norway West","France South","South India","Korea + South","Jio India Central","Jio India West","Qatar Central","Canada East","West + US 3","Sweden Central","South Africa West","Germany North","Poland Central"],"apiVersions":["2020-08-01","2020-03-01-preview","2019-08-01-preview"],"defaultApiVersion":"2020-08-01","capabilities":"None"},{"resourceType":"locations/notifyNetworkSecurityPerimeterUpdatesAvailable","locations":["North + Central US","East US 2 EUAP"],"apiVersions":["2021-10-01"],"defaultApiVersion":"2021-10-01","capabilities":"None"}],"registrationState":"Registered","registrationPolicy":"RegistrationRequired"}' headers: cache-control: - no-cache content-length: - - '5930' + - '13850' content-type: - application/json; charset=utf-8 date: - - Mon, 11 May 2020 02:59:32 GMT + - Tue, 29 Aug 2023 07:31:01 GMT expires: - '-1' pragma: @@ -1351,27 +1777,29 @@ interactions: ParameterSetName: - -g -n --resource-type User-Agent: - - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3 - azure-mgmt-resource/9.0.0 Azure-SDK-For-Python AZURECLI/2.5.1 - accept-language: - - en-US + - AZURECLI/2.51.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.10.9 (Windows-10-10.0.22621-SP0) method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000002/providers/Microsoft.OperationalInsights/workspaces/workspace000005?api-version=2015-03-20 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000002/providers/Microsoft.OperationalInsights/workspaces/workspace000005?api-version=2022-10-01 response: body: string: '' headers: + access-control-allow-origin: + - '*' + api-supported-versions: + - 2015-03-20, 2020-08-01, 2020-10-01, 2021-06-01, 2022-10-01 cache-control: - no-cache content-length: - '0' date: - - Mon, 11 May 2020 02:59:37 GMT + - Tue, 29 Aug 2023 07:31:07 GMT + expires: + - '-1' pragma: - no-cache - server: - - Microsoft-IIS/10.0 - - Microsoft-IIS/10.0 + request-context: + - appId=cid-v1:e6336c63-aab2-45f0-996a-e5dbab2a1508 strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: @@ -1380,7 +1808,6 @@ interactions: - '14999' x-powered-by: - ASP.NET - - ASP.NET status: code: 200 message: OK @@ -1398,41 +1825,44 @@ interactions: ParameterSetName: - --query User-Agent: - - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3 - azure-mgmt-operationsmanagement/0.1.0 Azure-SDK-For-Python AZURECLI/2.5.1 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.OperationsManagement/solutions?api-version=2015-11-01-preview response: body: - string: '{"value":[{"plan":{"name":"SecurityCenterFree(azps-test-la3)","publisher":"Microsoft","promotionCode":"","product":"OMSGallery/SecurityCenterFree"},"properties":{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/azps-test-group/providers/microsoft.operationalinsights/workspaces/azps-test-la3","provisioningState":"Succeeded","creationTime":"Sat, - 09 May 2020 01:16:14 GMT","lastModifiedTime":"Sun, 10 May 2020 06:46:19 GMT","containedResources":[]},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/azps-test-group/providers/Microsoft.OperationsManagement/solutions/SecurityCenterFree(azps-test-la3)","name":"SecurityCenterFree(azps-test-la3)","type":"Microsoft.OperationsManagement/solutions","location":"East - US"},{"plan":{"name":"Containers(zhoxing-test11)","publisher":"Microsoft","promotionCode":"","product":"OMSGallery/Containers"},"properties":{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/zhoxing-test/providers/microsoft.operationalinsights/workspaces/zhoxing-test11","provisioningState":"Succeeded","creationTime":"Mon, - 11 May 2020 02:53:09 GMT","lastModifiedTime":"Mon, 11 May 2020 02:55:26 GMT","containedResources":["/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/zhoxing-test/providers/microsoft.operationalinsights/workspaces/zhoxing-test11/views/Containers(zhoxing-test11)"]},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/zhoxing-test/providers/Microsoft.OperationsManagement/solutions/Containers(zhoxing-test11)","name":"Containers(zhoxing-test11)","type":"Microsoft.OperationsManagement/solutions","location":"Central - US"}]}' + string: '{"value":[{"plan":{"name":"SecurityInsights(acctestlaw-221011134813007315)","publisher":"Microsoft","promotionCode":"","product":"OMSGallery/SecurityInsights"},"properties":{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-sentinel-221011134813007315/providers/Microsoft.OperationalInsights/workspaces/acctestLAW-221011134813007315","provisioningState":"Succeeded","creationTime":"Mon, + 31 Oct 2022 03:26:12 GMT","sku":{"name":"PerGB"},"lastModifiedTime":"Fri, + 04 Nov 2022 08:11:29 GMT","containedResources":[],"workbookTemplates":[]},"location":"westeurope","tags":{},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-sentinel-221011134813007315/providers/Microsoft.OperationsManagement/solutions/SecurityInsights(acctestLAW-221011134813007315)","name":"SecurityInsights(acctestLAW-221011134813007315)","type":"Microsoft.OperationsManagement/solutions"},{"plan":{"name":"SecurityCenterFree(acctestlaw-221011134813007315)","publisher":"Microsoft","promotionCode":"","product":"OMSGallery/SecurityCenterFree"},"properties":{"workspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestrg-sentinel-221011134813007315/providers/Microsoft.OperationalInsights/workspaces/acctestLAW-221011134813007315","provisioningState":"Succeeded","creationTime":"Mon, + 07 Nov 2022 08:00:38 GMT","lastModifiedTime":"Sat, 26 Aug 2023 11:52:03 GMT","containedResources":[],"workbookTemplates":[]},"location":"westeurope","tags":{},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestrg-sentinel-221011134813007315/providers/Microsoft.OperationsManagement/solutions/SecurityCenterFree(acctestLAW-221011134813007315)","name":"SecurityCenterFree(acctestLAW-221011134813007315)","type":"Microsoft.OperationsManagement/solutions"}]}' headers: + access-control-allow-origin: + - '*' + api-supported-versions: + - 2015-11-01-preview cache-control: - no-cache content-length: - - '1698' + - '1852' content-type: - application/json; charset=utf-8 date: - - Mon, 11 May 2020 02:59:39 GMT + - Tue, 29 Aug 2023 07:31:08 GMT expires: - '-1' pragma: - no-cache + request-context: + - appId=cid-v1:c7ec48f5-2684-46e8-accb-45e7dbec242b strict-transport-security: - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked vary: - Accept-Encoding x-content-type-options: - nosniff - x-ms-original-request-ids: - - a8abae67-3e78-4ec8-a004-d05c3f9db796 - - de73015e-5859-4f8f-9785-bde9f0a16d3b + x-powered-by: + - ASP.NET status: code: 200 message: OK @@ -1450,10 +1880,7 @@ interactions: ParameterSetName: - --resource-group --query User-Agent: - - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3 - azure-mgmt-operationsmanagement/0.1.0 Azure-SDK-For-Python AZURECLI/2.5.1 - accept-language: - - en-US + - AZURECLI/2.51.0 (AAZ) azsdk-python-core/1.26.0 Python/3.10.9 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000002/providers/Microsoft.OperationsManagement/solutions?api-version=2015-11-01-preview response: @@ -1467,7 +1894,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Mon, 11 May 2020 02:59:40 GMT + - Tue, 29 Aug 2023 07:31:10 GMT expires: - '-1' pragma: diff --git a/src/log-analytics-solution/azext_log_analytics_solution/tests/latest/test_log_analytics_solution_scenario.py b/src/log-analytics-solution/azext_log_analytics_solution/tests/latest/test_log_analytics_solution_scenario.py index b9b9565ab68..01d0d406cb4 100644 --- a/src/log-analytics-solution/azext_log_analytics_solution/tests/latest/test_log_analytics_solution_scenario.py +++ b/src/log-analytics-solution/azext_log_analytics_solution/tests/latest/test_log_analytics_solution_scenario.py @@ -8,7 +8,7 @@ from azure.cli.testsdk.scenario_tests import AllowLargeResponse from azure.cli.testsdk import (ScenarioTest, ResourceGroupPreparer) -from knack.util import CLIError +from azure.cli.core.azclierror import ArgumentUsageError, InvalidArgumentValueError TEST_DIR = os.path.abspath(os.path.join(os.path.abspath(__file__), '..')) @@ -39,14 +39,14 @@ def test_log_analytics_solution(self, resource_group_1, resource_group_2, locati 'wrong_workspace_resource_id': workspace['id'][1:] }) - with self.assertRaises(CLIError) as err: + with self.assertRaises(InvalidArgumentValueError) as err: self.cmd('az monitor log-analytics solution create ' '--resource-group {rg} ' '--solution-type {solution_type} ' '--workspace "{wrong_workspace_resource_id}" ') - self.assertTrue("usage error: --workspace is invalid" == err.exception) + self.assertTrue("InvalidArgumentValue: --workspace: Invalid format: resource id should be in '/subscriptions/{subscription}/resourceGroups/{resource_group}/providers/Microsoft.OperationalInsights/workspaces/{}' format." == err.exception) - with self.assertRaises(CLIError) as err: + with self.assertRaises(ArgumentUsageError) as err: self.cmd('az monitor log-analytics solution create ' '--resource-group {rg2} ' '--solution-type {solution_type} ' diff --git a/src/log-analytics-solution/azext_log_analytics_solution/vendored_sdks/operationsmanagement/__init__.py b/src/log-analytics-solution/azext_log_analytics_solution/vendored_sdks/operationsmanagement/__init__.py deleted file mode 100644 index 35c1a070aa9..00000000000 --- a/src/log-analytics-solution/azext_log_analytics_solution/vendored_sdks/operationsmanagement/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._configuration import OperationsManagementClientConfiguration -from ._operations_management_client import OperationsManagementClient -__all__ = ['OperationsManagementClient', 'OperationsManagementClientConfiguration'] - -from .version import VERSION - -__version__ = VERSION - diff --git a/src/log-analytics-solution/azext_log_analytics_solution/vendored_sdks/operationsmanagement/_configuration.py b/src/log-analytics-solution/azext_log_analytics_solution/vendored_sdks/operationsmanagement/_configuration.py deleted file mode 100644 index 9cbd71f615f..00000000000 --- a/src/log-analytics-solution/azext_log_analytics_solution/vendored_sdks/operationsmanagement/_configuration.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- -from msrestazure import AzureConfiguration - -from .version import VERSION - - -class OperationsManagementClientConfiguration(AzureConfiguration): - """Configuration for OperationsManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Gets subscription credentials which uniquely - identify Microsoft Azure subscription. The subscription ID forms part of - the URI for every service call. - :type subscription_id: str - :param provider_name: Provider name for the parent resource. - :type provider_name: str - :param resource_type: Resource type for the parent resource - :type resource_type: str - :param resource_name: Parent resource name. - :type resource_name: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, provider_name, resource_type, resource_name, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if provider_name is None: - raise ValueError("Parameter 'provider_name' must not be None.") - if resource_type is None: - raise ValueError("Parameter 'resource_type' must not be None.") - if resource_name is None: - raise ValueError("Parameter 'resource_name' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(OperationsManagementClientConfiguration, self).__init__(base_url) - - # Starting Autorest.Python 4.0.64, make connection pool activated by default - self.keep_alive = True - - self.add_user_agent('azure-mgmt-operationsmanagement/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id - self.provider_name = provider_name - self.resource_type = resource_type - self.resource_name = resource_name diff --git a/src/log-analytics-solution/azext_log_analytics_solution/vendored_sdks/operationsmanagement/_operations_management_client.py b/src/log-analytics-solution/azext_log_analytics_solution/vendored_sdks/operationsmanagement/_operations_management_client.py deleted file mode 100644 index 1d7c40270c1..00000000000 --- a/src/log-analytics-solution/azext_log_analytics_solution/vendored_sdks/operationsmanagement/_operations_management_client.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Serializer, Deserializer - -from ._configuration import OperationsManagementClientConfiguration -from .operations import SolutionsOperations -from .operations import ManagementAssociationsOperations -from .operations import ManagementConfigurationsOperations -from .operations import Operations -from . import models - - -class OperationsManagementClient(SDKClient): - """Operations Management Client - - :ivar config: Configuration for client. - :vartype config: OperationsManagementClientConfiguration - - :ivar solutions: Solutions operations - :vartype solutions: azure.mgmt.operationsmanagement.operations.SolutionsOperations - :ivar management_associations: ManagementAssociations operations - :vartype management_associations: azure.mgmt.operationsmanagement.operations.ManagementAssociationsOperations - :ivar management_configurations: ManagementConfigurations operations - :vartype management_configurations: azure.mgmt.operationsmanagement.operations.ManagementConfigurationsOperations - :ivar operations: Operations operations - :vartype operations: azure.mgmt.operationsmanagement.operations.Operations - - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :param subscription_id: Gets subscription credentials which uniquely - identify Microsoft Azure subscription. The subscription ID forms part of - the URI for every service call. - :type subscription_id: str - :param provider_name: Provider name for the parent resource. - :type provider_name: str - :param resource_type: Resource type for the parent resource - :type resource_type: str - :param resource_name: Parent resource name. - :type resource_name: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, provider_name, resource_type, resource_name, base_url=None): - - self.config = OperationsManagementClientConfiguration(credentials, subscription_id, provider_name, resource_type, resource_name, base_url) - super(OperationsManagementClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2015-11-01-preview' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.solutions = SolutionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.management_associations = ManagementAssociationsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.management_configurations = ManagementConfigurationsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.operations = Operations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/log-analytics-solution/azext_log_analytics_solution/vendored_sdks/operationsmanagement/models/__init__.py b/src/log-analytics-solution/azext_log_analytics_solution/vendored_sdks/operationsmanagement/models/__init__.py deleted file mode 100644 index b024f0b3847..00000000000 --- a/src/log-analytics-solution/azext_log_analytics_solution/vendored_sdks/operationsmanagement/models/__init__.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -try: - from ._models_py3 import ArmTemplateParameter - from ._models_py3 import CodeMessageError, CodeMessageErrorException - from ._models_py3 import CodeMessageErrorError - from ._models_py3 import ManagementAssociation - from ._models_py3 import ManagementAssociationProperties - from ._models_py3 import ManagementAssociationPropertiesList - from ._models_py3 import ManagementConfiguration - from ._models_py3 import ManagementConfigurationProperties - from ._models_py3 import ManagementConfigurationPropertiesList - from ._models_py3 import Operation - from ._models_py3 import OperationDisplay - from ._models_py3 import Solution - from ._models_py3 import SolutionPatch - from ._models_py3 import SolutionPlan - from ._models_py3 import SolutionProperties - from ._models_py3 import SolutionPropertiesList -except (SyntaxError, ImportError): - from ._models import ArmTemplateParameter - from ._models import CodeMessageError, CodeMessageErrorException - from ._models import CodeMessageErrorError - from ._models import ManagementAssociation - from ._models import ManagementAssociationProperties - from ._models import ManagementAssociationPropertiesList - from ._models import ManagementConfiguration - from ._models import ManagementConfigurationProperties - from ._models import ManagementConfigurationPropertiesList - from ._models import Operation - from ._models import OperationDisplay - from ._models import Solution - from ._models import SolutionPatch - from ._models import SolutionPlan - from ._models import SolutionProperties - from ._models import SolutionPropertiesList -from ._paged_models import OperationPaged - -__all__ = [ - 'ArmTemplateParameter', - 'CodeMessageError', 'CodeMessageErrorException', - 'CodeMessageErrorError', - 'ManagementAssociation', - 'ManagementAssociationProperties', - 'ManagementAssociationPropertiesList', - 'ManagementConfiguration', - 'ManagementConfigurationProperties', - 'ManagementConfigurationPropertiesList', - 'Operation', - 'OperationDisplay', - 'Solution', - 'SolutionPatch', - 'SolutionPlan', - 'SolutionProperties', - 'SolutionPropertiesList', - 'OperationPaged', -] diff --git a/src/log-analytics-solution/azext_log_analytics_solution/vendored_sdks/operationsmanagement/models/_models.py b/src/log-analytics-solution/azext_log_analytics_solution/vendored_sdks/operationsmanagement/models/_models.py deleted file mode 100644 index a609b5a9d32..00000000000 --- a/src/log-analytics-solution/azext_log_analytics_solution/vendored_sdks/operationsmanagement/models/_models.py +++ /dev/null @@ -1,491 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class ArmTemplateParameter(Model): - """Parameter to pass to ARM template. - - :param name: name of the parameter. - :type name: str - :param value: value for the parameter. In Jtoken - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ArmTemplateParameter, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) - - -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - -class CodeMessageError(Model): - """The error body contract. - - :param error: The error details for a failed request. - :type error: ~azure.mgmt.operationsmanagement.models.CodeMessageErrorError - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CodeMessageErrorError'}, - } - - def __init__(self, **kwargs): - super(CodeMessageError, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class CodeMessageErrorException(HttpOperationError): - """Server responsed with exception of type: 'CodeMessageError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CodeMessageErrorException, self).__init__(deserialize, response, 'CodeMessageError', *args) - - -class CodeMessageErrorError(Model): - """The error details for a failed request. - - :param code: The error type. - :type code: str - :param message: The error message. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CodeMessageErrorError, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - - -class ManagementAssociation(Model): - """The container for solution. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location - :type location: str - :param properties: Properties for ManagementAssociation object supported - by the OperationsManagement resource provider. - :type properties: - ~azure.mgmt.operationsmanagement.models.ManagementAssociationProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'ManagementAssociationProperties'}, - } - - def __init__(self, **kwargs): - super(ManagementAssociation, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.properties = kwargs.get('properties', None) - - -class ManagementAssociationProperties(Model): - """ManagementAssociation properties supported by the OperationsManagement - resource provider. - - All required parameters must be populated in order to send to Azure. - - :param application_id: Required. The applicationId of the appliance for - this association. - :type application_id: str - """ - - _validation = { - 'application_id': {'required': True}, - } - - _attribute_map = { - 'application_id': {'key': 'applicationId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagementAssociationProperties, self).__init__(**kwargs) - self.application_id = kwargs.get('application_id', None) - - -class ManagementAssociationPropertiesList(Model): - """the list of ManagementAssociation response. - - :param value: List of Management Association properties within the - subscription. - :type value: - list[~azure.mgmt.operationsmanagement.models.ManagementAssociation] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ManagementAssociation]'}, - } - - def __init__(self, **kwargs): - super(ManagementAssociationPropertiesList, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class ManagementConfiguration(Model): - """The container for solution. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location - :type location: str - :param properties: Properties for ManagementConfiguration object supported - by the OperationsManagement resource provider. - :type properties: - ~azure.mgmt.operationsmanagement.models.ManagementConfigurationProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'ManagementConfigurationProperties'}, - } - - def __init__(self, **kwargs): - super(ManagementConfiguration, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.properties = kwargs.get('properties', None) - - -class ManagementConfigurationProperties(Model): - """ManagementConfiguration properties supported by the OperationsManagement - resource provider. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param application_id: The applicationId of the appliance for this - Management. - :type application_id: str - :param parent_resource_type: Required. The type of the parent resource. - :type parent_resource_type: str - :param parameters: Required. Parameters to run the ARM template - :type parameters: - list[~azure.mgmt.operationsmanagement.models.ArmTemplateParameter] - :ivar provisioning_state: The provisioning state for the - ManagementConfiguration. - :vartype provisioning_state: str - :param template: Required. The Json object containing the ARM template to - deploy - :type template: object - """ - - _validation = { - 'parent_resource_type': {'required': True}, - 'parameters': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'template': {'required': True}, - } - - _attribute_map = { - 'application_id': {'key': 'applicationId', 'type': 'str'}, - 'parent_resource_type': {'key': 'parentResourceType', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ArmTemplateParameter]'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'template': {'key': 'template', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(ManagementConfigurationProperties, self).__init__(**kwargs) - self.application_id = kwargs.get('application_id', None) - self.parent_resource_type = kwargs.get('parent_resource_type', None) - self.parameters = kwargs.get('parameters', None) - self.provisioning_state = None - self.template = kwargs.get('template', None) - - -class ManagementConfigurationPropertiesList(Model): - """the list of ManagementConfiguration response. - - :param value: List of Management Configuration properties within the - subscription. - :type value: - list[~azure.mgmt.operationsmanagement.models.ManagementConfiguration] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ManagementConfiguration]'}, - } - - def __init__(self, **kwargs): - super(ManagementConfigurationPropertiesList, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class Operation(Model): - """Supported operation of OperationsManagement resource provider. - - :param name: Operation name: {provider}/{resource}/{operation} - :type name: str - :param display: Display metadata associated with the operation. - :type display: ~azure.mgmt.operationsmanagement.models.OperationDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display = kwargs.get('display', None) - - -class OperationDisplay(Model): - """Display metadata associated with the operation. - - :param provider: Service provider: Microsoft OperationsManagement. - :type provider: str - :param resource: Resource on which the operation is performed etc. - :type resource: str - :param operation: Type of operation: get, read, delete, etc. - :type operation: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = kwargs.get('provider', None) - self.resource = kwargs.get('resource', None) - self.operation = kwargs.get('operation', None) - - -class Solution(Model): - """The container for solution. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param plan: Plan for solution object supported by the - OperationsManagement resource provider. - :type plan: ~azure.mgmt.operationsmanagement.models.SolutionPlan - :param properties: Properties for solution object supported by the - OperationsManagement resource provider. - :type properties: - ~azure.mgmt.operationsmanagement.models.SolutionProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'plan': {'key': 'plan', 'type': 'SolutionPlan'}, - 'properties': {'key': 'properties', 'type': 'SolutionProperties'}, - } - - def __init__(self, **kwargs): - super(Solution, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - self.plan = kwargs.get('plan', None) - self.properties = kwargs.get('properties', None) - - -class SolutionPatch(Model): - """The properties of a Solution that can be patched. - - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(SolutionPatch, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - - -class SolutionPlan(Model): - """Plan for solution object supported by the OperationsManagement resource - provider. - - :param name: name of the solution to be created. For Microsoft published - solution it should be in the format of solutionType(workspaceName). - SolutionType part is case sensitive. For third party solution, it can be - anything. - :type name: str - :param publisher: Publisher name. For gallery solution, it is Microsoft. - :type publisher: str - :param promotion_code: promotionCode, Not really used now, can you left as - empty - :type promotion_code: str - :param product: name of the solution to enabled/add. For Microsoft - published gallery solution it should be in the format of - OMSGallery/. This is case sensitive - :type product: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SolutionPlan, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.publisher = kwargs.get('publisher', None) - self.promotion_code = kwargs.get('promotion_code', None) - self.product = kwargs.get('product', None) - - -class SolutionProperties(Model): - """Solution properties supported by the OperationsManagement resource - provider. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param workspace_resource_id: Required. The azure resourceId for the - workspace where the solution will be deployed/enabled. - :type workspace_resource_id: str - :ivar provisioning_state: The provisioning state for the solution. - :vartype provisioning_state: str - :param contained_resources: The azure resources that will be contained - within the solutions. They will be locked and gets deleted automatically - when the solution is deleted. - :type contained_resources: list[str] - :param referenced_resources: The resources that will be referenced from - this solution. Deleting any of those solution out of band will break the - solution. - :type referenced_resources: list[str] - """ - - _validation = { - 'workspace_resource_id': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'workspace_resource_id': {'key': 'workspaceResourceId', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'contained_resources': {'key': 'containedResources', 'type': '[str]'}, - 'referenced_resources': {'key': 'referencedResources', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(SolutionProperties, self).__init__(**kwargs) - self.workspace_resource_id = kwargs.get('workspace_resource_id', None) - self.provisioning_state = None - self.contained_resources = kwargs.get('contained_resources', None) - self.referenced_resources = kwargs.get('referenced_resources', None) - - -class SolutionPropertiesList(Model): - """the list of solution response. - - :param value: List of solution properties within the subscription. - :type value: list[~azure.mgmt.operationsmanagement.models.Solution] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Solution]'}, - } - - def __init__(self, **kwargs): - super(SolutionPropertiesList, self).__init__(**kwargs) - self.value = kwargs.get('value', None) diff --git a/src/log-analytics-solution/azext_log_analytics_solution/vendored_sdks/operationsmanagement/models/_models_py3.py b/src/log-analytics-solution/azext_log_analytics_solution/vendored_sdks/operationsmanagement/models/_models_py3.py deleted file mode 100644 index 7e6e39f9e4f..00000000000 --- a/src/log-analytics-solution/azext_log_analytics_solution/vendored_sdks/operationsmanagement/models/_models_py3.py +++ /dev/null @@ -1,491 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class ArmTemplateParameter(Model): - """Parameter to pass to ARM template. - - :param name: name of the parameter. - :type name: str - :param value: value for the parameter. In Jtoken - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, value: str=None, **kwargs) -> None: - super(ArmTemplateParameter, self).__init__(**kwargs) - self.name = name - self.value = value - - -class CloudError(Model): - """CloudError. - """ - - _attribute_map = { - } - - -class CodeMessageError(Model): - """The error body contract. - - :param error: The error details for a failed request. - :type error: ~azure.mgmt.operationsmanagement.models.CodeMessageErrorError - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'CodeMessageErrorError'}, - } - - def __init__(self, *, error=None, **kwargs) -> None: - super(CodeMessageError, self).__init__(**kwargs) - self.error = error - - -class CodeMessageErrorException(HttpOperationError): - """Server responsed with exception of type: 'CodeMessageError'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(CodeMessageErrorException, self).__init__(deserialize, response, 'CodeMessageError', *args) - - -class CodeMessageErrorError(Model): - """The error details for a failed request. - - :param code: The error type. - :type code: str - :param message: The error message. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: - super(CodeMessageErrorError, self).__init__(**kwargs) - self.code = code - self.message = message - - -class ManagementAssociation(Model): - """The container for solution. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location - :type location: str - :param properties: Properties for ManagementAssociation object supported - by the OperationsManagement resource provider. - :type properties: - ~azure.mgmt.operationsmanagement.models.ManagementAssociationProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'ManagementAssociationProperties'}, - } - - def __init__(self, *, location: str=None, properties=None, **kwargs) -> None: - super(ManagementAssociation, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.properties = properties - - -class ManagementAssociationProperties(Model): - """ManagementAssociation properties supported by the OperationsManagement - resource provider. - - All required parameters must be populated in order to send to Azure. - - :param application_id: Required. The applicationId of the appliance for - this association. - :type application_id: str - """ - - _validation = { - 'application_id': {'required': True}, - } - - _attribute_map = { - 'application_id': {'key': 'applicationId', 'type': 'str'}, - } - - def __init__(self, *, application_id: str, **kwargs) -> None: - super(ManagementAssociationProperties, self).__init__(**kwargs) - self.application_id = application_id - - -class ManagementAssociationPropertiesList(Model): - """the list of ManagementAssociation response. - - :param value: List of Management Association properties within the - subscription. - :type value: - list[~azure.mgmt.operationsmanagement.models.ManagementAssociation] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ManagementAssociation]'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(ManagementAssociationPropertiesList, self).__init__(**kwargs) - self.value = value - - -class ManagementConfiguration(Model): - """The container for solution. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location - :type location: str - :param properties: Properties for ManagementConfiguration object supported - by the OperationsManagement resource provider. - :type properties: - ~azure.mgmt.operationsmanagement.models.ManagementConfigurationProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'ManagementConfigurationProperties'}, - } - - def __init__(self, *, location: str=None, properties=None, **kwargs) -> None: - super(ManagementConfiguration, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.properties = properties - - -class ManagementConfigurationProperties(Model): - """ManagementConfiguration properties supported by the OperationsManagement - resource provider. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param application_id: The applicationId of the appliance for this - Management. - :type application_id: str - :param parent_resource_type: Required. The type of the parent resource. - :type parent_resource_type: str - :param parameters: Required. Parameters to run the ARM template - :type parameters: - list[~azure.mgmt.operationsmanagement.models.ArmTemplateParameter] - :ivar provisioning_state: The provisioning state for the - ManagementConfiguration. - :vartype provisioning_state: str - :param template: Required. The Json object containing the ARM template to - deploy - :type template: object - """ - - _validation = { - 'parent_resource_type': {'required': True}, - 'parameters': {'required': True}, - 'provisioning_state': {'readonly': True}, - 'template': {'required': True}, - } - - _attribute_map = { - 'application_id': {'key': 'applicationId', 'type': 'str'}, - 'parent_resource_type': {'key': 'parentResourceType', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '[ArmTemplateParameter]'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'template': {'key': 'template', 'type': 'object'}, - } - - def __init__(self, *, parent_resource_type: str, parameters, template, application_id: str=None, **kwargs) -> None: - super(ManagementConfigurationProperties, self).__init__(**kwargs) - self.application_id = application_id - self.parent_resource_type = parent_resource_type - self.parameters = parameters - self.provisioning_state = None - self.template = template - - -class ManagementConfigurationPropertiesList(Model): - """the list of ManagementConfiguration response. - - :param value: List of Management Configuration properties within the - subscription. - :type value: - list[~azure.mgmt.operationsmanagement.models.ManagementConfiguration] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ManagementConfiguration]'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(ManagementConfigurationPropertiesList, self).__init__(**kwargs) - self.value = value - - -class Operation(Model): - """Supported operation of OperationsManagement resource provider. - - :param name: Operation name: {provider}/{resource}/{operation} - :type name: str - :param display: Display metadata associated with the operation. - :type display: ~azure.mgmt.operationsmanagement.models.OperationDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, *, name: str=None, display=None, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = name - self.display = display - - -class OperationDisplay(Model): - """Display metadata associated with the operation. - - :param provider: Service provider: Microsoft OperationsManagement. - :type provider: str - :param resource: Resource on which the operation is performed etc. - :type resource: str - :param operation: Type of operation: get, read, delete, etc. - :type operation: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - } - - def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = provider - self.resource = resource - self.operation = operation - - -class Solution(Model): - """The container for solution. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param plan: Plan for solution object supported by the - OperationsManagement resource provider. - :type plan: ~azure.mgmt.operationsmanagement.models.SolutionPlan - :param properties: Properties for solution object supported by the - OperationsManagement resource provider. - :type properties: - ~azure.mgmt.operationsmanagement.models.SolutionProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'plan': {'key': 'plan', 'type': 'SolutionPlan'}, - 'properties': {'key': 'properties', 'type': 'SolutionProperties'}, - } - - def __init__(self, *, location: str=None, tags=None, plan=None, properties=None, **kwargs) -> None: - super(Solution, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags - self.plan = plan - self.properties = properties - - -class SolutionPatch(Model): - """The properties of a Solution that can be patched. - - :param tags: Resource tags - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(SolutionPatch, self).__init__(**kwargs) - self.tags = tags - - -class SolutionPlan(Model): - """Plan for solution object supported by the OperationsManagement resource - provider. - - :param name: name of the solution to be created. For Microsoft published - solution it should be in the format of solutionType(workspaceName). - SolutionType part is case sensitive. For third party solution, it can be - anything. - :type name: str - :param publisher: Publisher name. For gallery solution, it is Microsoft. - :type publisher: str - :param promotion_code: promotionCode, Not really used now, can you left as - empty - :type promotion_code: str - :param product: name of the solution to enabled/add. For Microsoft - published gallery solution it should be in the format of - OMSGallery/. This is case sensitive - :type product: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, publisher: str=None, promotion_code: str=None, product: str=None, **kwargs) -> None: - super(SolutionPlan, self).__init__(**kwargs) - self.name = name - self.publisher = publisher - self.promotion_code = promotion_code - self.product = product - - -class SolutionProperties(Model): - """Solution properties supported by the OperationsManagement resource - provider. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param workspace_resource_id: Required. The azure resourceId for the - workspace where the solution will be deployed/enabled. - :type workspace_resource_id: str - :ivar provisioning_state: The provisioning state for the solution. - :vartype provisioning_state: str - :param contained_resources: The azure resources that will be contained - within the solutions. They will be locked and gets deleted automatically - when the solution is deleted. - :type contained_resources: list[str] - :param referenced_resources: The resources that will be referenced from - this solution. Deleting any of those solution out of band will break the - solution. - :type referenced_resources: list[str] - """ - - _validation = { - 'workspace_resource_id': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'workspace_resource_id': {'key': 'workspaceResourceId', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'contained_resources': {'key': 'containedResources', 'type': '[str]'}, - 'referenced_resources': {'key': 'referencedResources', 'type': '[str]'}, - } - - def __init__(self, *, workspace_resource_id: str, contained_resources=None, referenced_resources=None, **kwargs) -> None: - super(SolutionProperties, self).__init__(**kwargs) - self.workspace_resource_id = workspace_resource_id - self.provisioning_state = None - self.contained_resources = contained_resources - self.referenced_resources = referenced_resources - - -class SolutionPropertiesList(Model): - """the list of solution response. - - :param value: List of solution properties within the subscription. - :type value: list[~azure.mgmt.operationsmanagement.models.Solution] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Solution]'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(SolutionPropertiesList, self).__init__(**kwargs) - self.value = value diff --git a/src/log-analytics-solution/azext_log_analytics_solution/vendored_sdks/operationsmanagement/models/_paged_models.py b/src/log-analytics-solution/azext_log_analytics_solution/vendored_sdks/operationsmanagement/models/_paged_models.py deleted file mode 100644 index d933945d04b..00000000000 --- a/src/log-analytics-solution/azext_log_analytics_solution/vendored_sdks/operationsmanagement/models/_paged_models.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.paging import Paged - - -class OperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Operation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Operation]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/src/log-analytics-solution/azext_log_analytics_solution/vendored_sdks/operationsmanagement/operations/__init__.py b/src/log-analytics-solution/azext_log_analytics_solution/vendored_sdks/operationsmanagement/operations/__init__.py deleted file mode 100644 index 215feff34f6..00000000000 --- a/src/log-analytics-solution/azext_log_analytics_solution/vendored_sdks/operationsmanagement/operations/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from ._solutions_operations import SolutionsOperations -from ._management_associations_operations import ManagementAssociationsOperations -from ._management_configurations_operations import ManagementConfigurationsOperations -from ._operations import Operations - -__all__ = [ - 'SolutionsOperations', - 'ManagementAssociationsOperations', - 'ManagementConfigurationsOperations', - 'Operations', -] diff --git a/src/log-analytics-solution/azext_log_analytics_solution/vendored_sdks/operationsmanagement/operations/_management_associations_operations.py b/src/log-analytics-solution/azext_log_analytics_solution/vendored_sdks/operationsmanagement/operations/_management_associations_operations.py deleted file mode 100644 index 0925e2f2e34..00000000000 --- a/src/log-analytics-solution/azext_log_analytics_solution/vendored_sdks/operationsmanagement/operations/_management_associations_operations.py +++ /dev/null @@ -1,299 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class ManagementAssociationsOperations(object): - """ManagementAssociationsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2015-11-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-11-01-preview" - - self.config = config - - def list_by_subscription( - self, custom_headers=None, raw=False, **operation_config): - """Retrieves the ManagementAssociations list for the subscription. - - Retrieves the ManagementAssociations list. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagementAssociationPropertiesList or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.operationsmanagement.models.ManagementAssociationPropertiesList - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`CodeMessageErrorException` - """ - # Construct URL - url = self.list_by_subscription.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.CodeMessageErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagementAssociationPropertiesList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.OperationsManagement/ManagementAssociations'} - - def create_or_update( - self, resource_group_name, management_association_name, location=None, properties=None, custom_headers=None, raw=False, **operation_config): - """Create/Update ManagementAssociation. - - Creates or updates the ManagementAssociation. - - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. - :type resource_group_name: str - :param management_association_name: User ManagementAssociation Name. - :type management_association_name: str - :param location: Resource location - :type location: str - :param properties: Properties for ManagementAssociation object - supported by the OperationsManagement resource provider. - :type properties: - ~azure.mgmt.operationsmanagement.models.ManagementAssociationProperties - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagementAssociation or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.operationsmanagement.models.ManagementAssociation - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`CodeMessageErrorException` - """ - parameters = models.ManagementAssociation(location=location, properties=properties) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'providerName': self._serialize.url("self.config.provider_name", self.config.provider_name, 'str'), - 'resourceType': self._serialize.url("self.config.resource_type", self.config.resource_type, 'str'), - 'resourceName': self._serialize.url("self.config.resource_name", self.config.resource_name, 'str'), - 'managementAssociationName': self._serialize.url("management_association_name", management_association_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagementAssociation') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.CodeMessageErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagementAssociation', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}/providers/Microsoft.OperationsManagement/ManagementAssociations/{managementAssociationName}'} - - def delete( - self, resource_group_name, management_association_name, custom_headers=None, raw=False, **operation_config): - """Deletes the ManagementAssociation. - - Deletes the ManagementAssociation in the subscription. - - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. - :type resource_group_name: str - :param management_association_name: User ManagementAssociation Name. - :type management_association_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`CodeMessageErrorException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'providerName': self._serialize.url("self.config.provider_name", self.config.provider_name, 'str'), - 'resourceType': self._serialize.url("self.config.resource_type", self.config.resource_type, 'str'), - 'resourceName': self._serialize.url("self.config.resource_name", self.config.resource_name, 'str'), - 'managementAssociationName': self._serialize.url("management_association_name", management_association_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.CodeMessageErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}/providers/Microsoft.OperationsManagement/ManagementAssociations/{managementAssociationName}'} - - def get( - self, resource_group_name, management_association_name, custom_headers=None, raw=False, **operation_config): - """Retrieve ManagementAssociation. - - Retrieves the user ManagementAssociation. - - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. - :type resource_group_name: str - :param management_association_name: User ManagementAssociation Name. - :type management_association_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagementAssociation or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.operationsmanagement.models.ManagementAssociation - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`CodeMessageErrorException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'providerName': self._serialize.url("self.config.provider_name", self.config.provider_name, 'str'), - 'resourceType': self._serialize.url("self.config.resource_type", self.config.resource_type, 'str'), - 'resourceName': self._serialize.url("self.config.resource_name", self.config.resource_name, 'str'), - 'managementAssociationName': self._serialize.url("management_association_name", management_association_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.CodeMessageErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagementAssociation', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}/providers/Microsoft.OperationsManagement/ManagementAssociations/{managementAssociationName}'} diff --git a/src/log-analytics-solution/azext_log_analytics_solution/vendored_sdks/operationsmanagement/operations/_management_configurations_operations.py b/src/log-analytics-solution/azext_log_analytics_solution/vendored_sdks/operationsmanagement/operations/_management_configurations_operations.py deleted file mode 100644 index f07bc75b692..00000000000 --- a/src/log-analytics-solution/azext_log_analytics_solution/vendored_sdks/operationsmanagement/operations/_management_configurations_operations.py +++ /dev/null @@ -1,295 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class ManagementConfigurationsOperations(object): - """ManagementConfigurationsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2015-11-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-11-01-preview" - - self.config = config - - def list_by_subscription( - self, custom_headers=None, raw=False, **operation_config): - """Retrieves the ManagementConfigurations list for the subscription. - - Retrieves the ManagementConfigurations list. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagementConfigurationPropertiesList or ClientRawResponse if - raw=true - :rtype: - ~azure.mgmt.operationsmanagement.models.ManagementConfigurationPropertiesList - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`CodeMessageErrorException` - """ - # Construct URL - url = self.list_by_subscription.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.CodeMessageErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagementConfigurationPropertiesList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.OperationsManagement/ManagementConfigurations'} - - def create_or_update( - self, resource_group_name, management_configuration_name, location=None, properties=None, custom_headers=None, raw=False, **operation_config): - """Create/Update ManagementConfiguration. - - Creates or updates the ManagementConfiguration. - - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. - :type resource_group_name: str - :param management_configuration_name: User Management Configuration - Name. - :type management_configuration_name: str - :param location: Resource location - :type location: str - :param properties: Properties for ManagementConfiguration object - supported by the OperationsManagement resource provider. - :type properties: - ~azure.mgmt.operationsmanagement.models.ManagementConfigurationProperties - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagementConfiguration or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.operationsmanagement.models.ManagementConfiguration or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`CodeMessageErrorException` - """ - parameters = models.ManagementConfiguration(location=location, properties=properties) - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'managementConfigurationName': self._serialize.url("management_configuration_name", management_configuration_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagementConfiguration') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.CodeMessageErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagementConfiguration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/ManagementConfigurations/{managementConfigurationName}'} - - def delete( - self, resource_group_name, management_configuration_name, custom_headers=None, raw=False, **operation_config): - """Deletes the ManagementConfiguration. - - Deletes the ManagementConfiguration in the subscription. - - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. - :type resource_group_name: str - :param management_configuration_name: User Management Configuration - Name. - :type management_configuration_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`CodeMessageErrorException` - """ - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'managementConfigurationName': self._serialize.url("management_configuration_name", management_configuration_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.CodeMessageErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/ManagementConfigurations/{managementConfigurationName}'} - - def get( - self, resource_group_name, management_configuration_name, custom_headers=None, raw=False, **operation_config): - """Retrieve ManagementConfiguration. - - Retrieves the user ManagementConfiguration. - - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. - :type resource_group_name: str - :param management_configuration_name: User Management Configuration - Name. - :type management_configuration_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagementConfiguration or ClientRawResponse if raw=true - :rtype: - ~azure.mgmt.operationsmanagement.models.ManagementConfiguration or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`CodeMessageErrorException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'managementConfigurationName': self._serialize.url("management_configuration_name", management_configuration_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.CodeMessageErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagementConfiguration', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/ManagementConfigurations/{managementConfigurationName}'} diff --git a/src/log-analytics-solution/azext_log_analytics_solution/vendored_sdks/operationsmanagement/operations/_operations.py b/src/log-analytics-solution/azext_log_analytics_solution/vendored_sdks/operationsmanagement/operations/_operations.py deleted file mode 100644 index 781193478d9..00000000000 --- a/src/log-analytics-solution/azext_log_analytics_solution/vendored_sdks/operationsmanagement/operations/_operations.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class Operations(object): - """Operations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2015-11-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-11-01-preview" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """Lists all of the available OperationsManagement Rest API operations. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of Operation - :rtype: - ~azure.mgmt.operationsmanagement.models.OperationPaged[~azure.mgmt.operationsmanagement.models.Operation] - :raises: :class:`CloudError` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list.metadata = {'url': '/providers/Microsoft.OperationsManagement/operations'} diff --git a/src/log-analytics-solution/azext_log_analytics_solution/vendored_sdks/operationsmanagement/operations/_solutions_operations.py b/src/log-analytics-solution/azext_log_analytics_solution/vendored_sdks/operationsmanagement/operations/_solutions_operations.py deleted file mode 100644 index 842623cb482..00000000000 --- a/src/log-analytics-solution/azext_log_analytics_solution/vendored_sdks/operationsmanagement/operations/_solutions_operations.py +++ /dev/null @@ -1,509 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# 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 Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class SolutionsOperations(object): - """SolutionsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: Client Api Version. Constant value: "2015-11-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2015-11-01-preview" - - self.config = config - - - def _create_or_update_initial( - self, resource_group_name, solution_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'solutionName': self._serialize.url("solution_name", solution_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'Solution') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [201]: - raise models.CodeMessageErrorException(self._deserialize, response) - - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('Solution', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, solution_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Create/Update Solution. - - Creates or updates the Solution. - - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. - :type resource_group_name: str - :param solution_name: User Solution Name. - :type solution_name: str - :param parameters: The parameters required to create OMS Solution. - :type parameters: ~azure.mgmt.operationsmanagement.models.Solution - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Solution or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.operationsmanagement.models.Solution] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.operationsmanagement.models.Solution]] - :raises: - :class:`CodeMessageErrorException` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - solution_name=solution_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Solution', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/solutions/{solutionName}'} - - - def _update_initial( - self, resource_group_name, solution_name, tags=None, custom_headers=None, raw=False, **operation_config): - parameters = models.SolutionPatch(tags=tags) - - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'solutionName': self._serialize.url("solution_name", solution_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'SolutionPatch') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.CodeMessageErrorException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Solution', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, solution_name, tags=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Patch a Solution. - - Patch a Solution. Only updating tags supported. - - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. - :type resource_group_name: str - :param solution_name: User Solution Name. - :type solution_name: str - :param tags: Resource tags - :type tags: dict[str, str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns Solution or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.operationsmanagement.models.Solution] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.operationsmanagement.models.Solution]] - :raises: - :class:`CodeMessageErrorException` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - solution_name=solution_name, - tags=tags, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('Solution', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/solutions/{solutionName}'} - - - def _delete_initial( - self, resource_group_name, solution_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'solutionName': self._serialize.url("solution_name", solution_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.CodeMessageErrorException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, solution_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes the solution. - - Deletes the solution in the subscription. - - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. - :type resource_group_name: str - :param solution_name: User Solution Name. - :type solution_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`CodeMessageErrorException` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - solution_name=solution_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/solutions/{solutionName}'} - - def get( - self, resource_group_name, solution_name, custom_headers=None, raw=False, **operation_config): - """Retrieve solution. - - Retrieves the user solution. - - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. - :type resource_group_name: str - :param solution_name: User Solution Name. - :type solution_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: Solution or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.operationsmanagement.models.Solution or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`CodeMessageErrorException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'solutionName': self._serialize.url("solution_name", solution_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.CodeMessageErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Solution', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/solutions/{solutionName}'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Retrieves the solution list for the subscription. - - Retrieves the solution list. It will retrieve both first party and - third party solutions. - - :param resource_group_name: The name of the resource group to get. The - name is case insensitive. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SolutionPropertiesList or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.operationsmanagement.models.SolutionPropertiesList - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`CodeMessageErrorException` - """ - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.CodeMessageErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SolutionPropertiesList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/solutions'} - - def list_by_subscription( - self, custom_headers=None, raw=False, **operation_config): - """Retrieves the solution list for the subscription. - - Retrieves the solution list. It will retrieve both first party and - third party solutions. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: SolutionPropertiesList or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.operationsmanagement.models.SolutionPropertiesList - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`CodeMessageErrorException` - """ - # Construct URL - url = self.list_by_subscription.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.CodeMessageErrorException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('SolutionPropertiesList', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.OperationsManagement/solutions'} diff --git a/src/log-analytics-solution/setup.py b/src/log-analytics-solution/setup.py index 94bb6eda6fb..8691a9d2ae1 100644 --- a/src/log-analytics-solution/setup.py +++ b/src/log-analytics-solution/setup.py @@ -16,7 +16,7 @@ # TODO: Confirm this is the right version number you want and it matches your # HISTORY.rst entry. -VERSION = '0.1.1' +VERSION = '1.0.0' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers @@ -44,7 +44,7 @@ name='log_analytics_solution', version=VERSION, description='Support for Azure Log Analytics Solution', - # TODO: Update author and email, if applicable + # TODO: Update author and email, if applicable author='Microsoft Corporation', author_email='azpycli@microsoft.com', # TODO: consider pointing directly to your source code instead of the generic repo