diff --git a/sdk/maintenance/azure-mgmt-maintenance/_meta.json b/sdk/maintenance/azure-mgmt-maintenance/_meta.json index 89f22e7ec91ed..aa06a834427c0 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/_meta.json +++ b/sdk/maintenance/azure-mgmt-maintenance/_meta.json @@ -1,11 +1,11 @@ { - "commit": "e6d90862a97c4f04f0c26a8869602bbfd8b10280", + "commit": "c24ace7c6d6c03b5621189c4fd15f5bdc3a49ef6", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest": "3.9.7", "use": [ "@autorest/python@6.7.1", "@autorest/modelerfour@4.26.2" ], - "autorest_command": "autorest specification/maintenance/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.7.1 --use=@autorest/modelerfour@4.26.2 --version=3.9.7 --version-tolerant=False", + "autorest_command": "autorest specification/maintenance/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.7.1 --use=@autorest/modelerfour@4.26.2 --version=3.9.7 --version-tolerant=False", "readme": "specification/maintenance/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/_configuration.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/_configuration.py index 6b44ec0a34b1d..fb2b1d57ec68e 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/_configuration.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/_configuration.py @@ -27,17 +27,16 @@ class MaintenanceManagementClientConfiguration(Configuration): # pylint: disabl :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: Subscription credentials that uniquely identify a Microsoft Azure - subscription. The subscription ID forms part of the URI for every service call. Required. + :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str - :keyword api_version: Api Version. Default value is "2023-09-01-preview". Note that overriding + :keyword api_version: Api Version. Default value is "2023-10-01-preview". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MaintenanceManagementClientConfiguration, self).__init__(**kwargs) - api_version: str = kwargs.pop("api_version", "2023-09-01-preview") + api_version: str = kwargs.pop("api_version", "2023-10-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/_maintenance_management_client.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/_maintenance_management_client.py index d9b8d12143fe6..e6628e9fdd281 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/_maintenance_management_client.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/_maintenance_management_client.py @@ -26,6 +26,7 @@ MaintenanceConfigurationsOperations, Operations, PublicMaintenanceConfigurationsOperations, + ScheduledEventOperations, UpdatesOperations, ) @@ -37,6 +38,8 @@ class MaintenanceManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes """Azure Maintenance Management Client. + :ivar scheduled_event: ScheduledEventOperations operations + :vartype scheduled_event: azure.mgmt.maintenance.operations.ScheduledEventOperations :ivar public_maintenance_configurations: PublicMaintenanceConfigurationsOperations operations :vartype public_maintenance_configurations: azure.mgmt.maintenance.operations.PublicMaintenanceConfigurationsOperations @@ -73,12 +76,11 @@ class MaintenanceManagementClient: # pylint: disable=client-accepts-api-version :vartype updates: azure.mgmt.maintenance.operations.UpdatesOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: Subscription credentials that uniquely identify a Microsoft Azure - subscription. The subscription ID forms part of the URI for every service call. Required. + :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str :param base_url: Service URL. Default value is "https://management.azure.com". :type base_url: str - :keyword api_version: Api Version. Default value is "2023-09-01-preview". Note that overriding + :keyword api_version: Api Version. Default value is "2023-10-01-preview". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ @@ -99,6 +101,7 @@ def __init__( self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self._serialize.client_side_validation = False + self.scheduled_event = ScheduledEventOperations(self._client, self._config, self._serialize, self._deserialize) self.public_maintenance_configurations = PublicMaintenanceConfigurationsOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/_version.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/_version.py index 67a252e2565e1..e5754a47ce68f 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/_version.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "2.2.0b1" +VERSION = "1.0.0b1" diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/_configuration.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/_configuration.py index 51fe7f2115995..75e846c5259e2 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/_configuration.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/_configuration.py @@ -27,17 +27,16 @@ class MaintenanceManagementClientConfiguration(Configuration): # pylint: disabl :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: Subscription credentials that uniquely identify a Microsoft Azure - subscription. The subscription ID forms part of the URI for every service call. Required. + :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str - :keyword api_version: Api Version. Default value is "2023-09-01-preview". Note that overriding + :keyword api_version: Api Version. Default value is "2023-10-01-preview". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MaintenanceManagementClientConfiguration, self).__init__(**kwargs) - api_version: str = kwargs.pop("api_version", "2023-09-01-preview") + api_version: str = kwargs.pop("api_version", "2023-10-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/_maintenance_management_client.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/_maintenance_management_client.py index ece472f4259e9..a952a9fd8a0b9 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/_maintenance_management_client.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/_maintenance_management_client.py @@ -26,6 +26,7 @@ MaintenanceConfigurationsOperations, Operations, PublicMaintenanceConfigurationsOperations, + ScheduledEventOperations, UpdatesOperations, ) @@ -37,6 +38,8 @@ class MaintenanceManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes """Azure Maintenance Management Client. + :ivar scheduled_event: ScheduledEventOperations operations + :vartype scheduled_event: azure.mgmt.maintenance.aio.operations.ScheduledEventOperations :ivar public_maintenance_configurations: PublicMaintenanceConfigurationsOperations operations :vartype public_maintenance_configurations: azure.mgmt.maintenance.aio.operations.PublicMaintenanceConfigurationsOperations @@ -73,12 +76,11 @@ class MaintenanceManagementClient: # pylint: disable=client-accepts-api-version :vartype updates: azure.mgmt.maintenance.aio.operations.UpdatesOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: Subscription credentials that uniquely identify a Microsoft Azure - subscription. The subscription ID forms part of the URI for every service call. Required. + :param subscription_id: The ID of the target subscription. The value must be an UUID. Required. :type subscription_id: str :param base_url: Service URL. Default value is "https://management.azure.com". :type base_url: str - :keyword api_version: Api Version. Default value is "2023-09-01-preview". Note that overriding + :keyword api_version: Api Version. Default value is "2023-10-01-preview". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ @@ -99,6 +101,7 @@ def __init__( self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self._serialize.client_side_validation = False + self.scheduled_event = ScheduledEventOperations(self._client, self._config, self._serialize, self._deserialize) self.public_maintenance_configurations = PublicMaintenanceConfigurationsOperations( self._client, self._config, self._serialize, self._deserialize ) diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/__init__.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/__init__.py index 722f9ecf0f5e3..693c408629187 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/__init__.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/__init__.py @@ -6,6 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from ._scheduled_event_operations import ScheduledEventOperations from ._public_maintenance_configurations_operations import PublicMaintenanceConfigurationsOperations from ._apply_updates_operations import ApplyUpdatesOperations from ._configuration_assignments_operations import ConfigurationAssignmentsOperations @@ -27,6 +28,7 @@ from ._patch import patch_sdk as _patch_sdk __all__ = [ + "ScheduledEventOperations", "PublicMaintenanceConfigurationsOperations", "ApplyUpdatesOperations", "ConfigurationAssignmentsOperations", diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/_scheduled_event_operations.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/_scheduled_event_operations.py new file mode 100644 index 0000000000000..a8911d4f948a8 --- /dev/null +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/_scheduled_event_operations.py @@ -0,0 +1,121 @@ +# pylint: disable=too-many-lines +# 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 typing import Any, Callable, Dict, Optional, TypeVar + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._scheduled_event_operations import build_acknowledge_request + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + + +class ScheduledEventOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.maintenance.aio.MaintenanceManagementClient`'s + :attr:`scheduled_event` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace_async + async def acknowledge( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_type: str, resource_name: str, scheduled_event_id: str, **kwargs: Any + ) -> None: + """Post Scheduled Event Acknowledgement. + + Post Scheduled Event Acknowledgement. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_type: Resource type. Required. + :type resource_type: str + :param resource_name: Resource Name. Required. + :type resource_name: str + :param scheduled_event_id: Scheduled Event Id. This is a GUID-formatted string (e.g. + 00000000-0000-0000-0000-000000000000). Required. + :type scheduled_event_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None or the result of cls(response) + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_acknowledge_request( + resource_group_name=resource_group_name, + resource_type=resource_type, + resource_name=resource_name, + scheduled_event_id=scheduled_event_id, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.acknowledge.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.MaintenanceError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + acknowledge.metadata = { + "url": "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Compute/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/scheduledevents/{scheduledEventId}/acknowledge" + } diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/__init__.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/__init__.py index 722f9ecf0f5e3..693c408629187 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/__init__.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/__init__.py @@ -6,6 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from ._scheduled_event_operations import ScheduledEventOperations from ._public_maintenance_configurations_operations import PublicMaintenanceConfigurationsOperations from ._apply_updates_operations import ApplyUpdatesOperations from ._configuration_assignments_operations import ConfigurationAssignmentsOperations @@ -27,6 +28,7 @@ from ._patch import patch_sdk as _patch_sdk __all__ = [ + "ScheduledEventOperations", "PublicMaintenanceConfigurationsOperations", "ApplyUpdatesOperations", "ConfigurationAssignmentsOperations", diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_apply_update_for_resource_group_operations.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_apply_update_for_resource_group_operations.py index 6114ed1aea237..d2f5a223106ba 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_apply_update_for_resource_group_operations.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_apply_update_for_resource_group_operations.py @@ -40,7 +40,7 @@ def build_list_request(resource_group_name: str, subscription_id: str, **kwargs: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-09-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-10-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_apply_updates_operations.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_apply_updates_operations.py index 5e8562ae1833c..96917b32ffc49 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_apply_updates_operations.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_apply_updates_operations.py @@ -51,7 +51,7 @@ def build_get_parent_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-09-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-10-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -93,7 +93,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-09-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-10-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -133,7 +133,7 @@ def build_create_or_update_or_cancel_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-09-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-10-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -177,7 +177,7 @@ def build_create_or_update_parent_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-09-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-10-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -217,7 +217,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-09-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-10-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -248,7 +248,7 @@ def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-09-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-10-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_configuration_assignments_for_resource_group_operations.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_configuration_assignments_for_resource_group_operations.py index d06203eed11ca..d8f5ed880f861 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_configuration_assignments_for_resource_group_operations.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_configuration_assignments_for_resource_group_operations.py @@ -41,7 +41,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-09-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-10-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -74,7 +74,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-09-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-10-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -110,7 +110,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-09-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-10-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -146,7 +146,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-09-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-10-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_configuration_assignments_for_subscriptions_operations.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_configuration_assignments_for_subscriptions_operations.py index a727d19ae2709..5857b4a56e07f 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_configuration_assignments_for_subscriptions_operations.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_configuration_assignments_for_subscriptions_operations.py @@ -39,7 +39,7 @@ def build_get_request(configuration_assignment_name: str, subscription_id: str, _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-09-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-10-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -71,7 +71,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-09-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-10-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -104,7 +104,7 @@ def build_update_request(configuration_assignment_name: str, subscription_id: st _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-09-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-10-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -137,7 +137,7 @@ def build_delete_request(configuration_assignment_name: str, subscription_id: st _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-09-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-10-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_configuration_assignments_operations.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_configuration_assignments_operations.py index 030a93f9e3d60..46ce465778d92 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_configuration_assignments_operations.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_configuration_assignments_operations.py @@ -51,7 +51,7 @@ def build_get_parent_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-09-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-10-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -97,7 +97,7 @@ def build_create_or_update_parent_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-09-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-10-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -146,7 +146,7 @@ def build_delete_parent_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-09-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-10-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -190,7 +190,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-09-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-10-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -232,7 +232,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-09-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-10-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -277,7 +277,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-09-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-10-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -320,7 +320,7 @@ def build_list_parent_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-09-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-10-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -360,7 +360,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-09-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-10-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_configuration_assignments_within_subscription_operations.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_configuration_assignments_within_subscription_operations.py index b93d6cd8e0c57..f2c98013d3862 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_configuration_assignments_within_subscription_operations.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_configuration_assignments_within_subscription_operations.py @@ -40,7 +40,7 @@ def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-09-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-10-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_maintenance_configurations_for_resource_group_operations.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_maintenance_configurations_for_resource_group_operations.py index 02b2dbb9a41ce..b52e0dfab0ebb 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_maintenance_configurations_for_resource_group_operations.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_maintenance_configurations_for_resource_group_operations.py @@ -40,7 +40,7 @@ def build_list_request(resource_group_name: str, subscription_id: str, **kwargs: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-09-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-10-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_maintenance_configurations_operations.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_maintenance_configurations_operations.py index 6273e3bcbc96b..a0bfa31ae8e67 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_maintenance_configurations_operations.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_maintenance_configurations_operations.py @@ -41,7 +41,7 @@ def build_get_request(resource_group_name: str, resource_name: str, subscription _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-09-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-10-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -72,7 +72,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-09-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-10-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -106,7 +106,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-09-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-10-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -137,7 +137,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-09-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-10-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -169,7 +169,7 @@ def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-09-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-10-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_operations.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_operations.py index 8ecd8faea315e..78d499435e46b 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_operations.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_operations.py @@ -40,7 +40,7 @@ def build_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-09-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-10-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_public_maintenance_configurations_operations.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_public_maintenance_configurations_operations.py index e5cbaaaa3aaa1..f52f44a677abe 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_public_maintenance_configurations_operations.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_public_maintenance_configurations_operations.py @@ -40,7 +40,7 @@ def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-09-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-10-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -67,7 +67,7 @@ def build_get_request(resource_name: str, subscription_id: str, **kwargs: Any) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-09-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-10-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_scheduled_event_operations.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_scheduled_event_operations.py new file mode 100644 index 0000000000000..288eccca87d35 --- /dev/null +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_scheduled_event_operations.py @@ -0,0 +1,164 @@ +# pylint: disable=too-many-lines +# 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 typing import Any, Callable, Dict, Optional, TypeVar + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._serialization import Serializer +from .._vendor import _convert_request + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_acknowledge_request( + resource_group_name: str, + resource_type: str, + resource_name: str, + scheduled_event_id: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-10-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Compute/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/scheduledevents/{scheduledEventId}/acknowledge", + ) # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + "resourceGroupName": _SERIALIZER.url( + "resource_group_name", resource_group_name, "str", max_length=90, min_length=1 + ), + "resourceType": _SERIALIZER.url("resource_type", resource_type, "str"), + "resourceName": _SERIALIZER.url("resource_name", resource_name, "str"), + "scheduledEventId": _SERIALIZER.url("scheduled_event_id", scheduled_event_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +class ScheduledEventOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.maintenance.MaintenanceManagementClient`'s + :attr:`scheduled_event` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def acknowledge( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, resource_type: str, resource_name: str, scheduled_event_id: str, **kwargs: Any + ) -> None: + """Post Scheduled Event Acknowledgement. + + Post Scheduled Event Acknowledgement. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + Required. + :type resource_group_name: str + :param resource_type: Resource type. Required. + :type resource_type: str + :param resource_name: Resource Name. Required. + :type resource_name: str + :param scheduled_event_id: Scheduled Event Id. This is a GUID-formatted string (e.g. + 00000000-0000-0000-0000-000000000000). Required. + :type scheduled_event_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None or the result of cls(response) + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_acknowledge_request( + resource_group_name=resource_group_name, + resource_type=resource_type, + resource_name=resource_name, + scheduled_event_id=scheduled_event_id, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.acknowledge.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.MaintenanceError, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + acknowledge.metadata = { + "url": "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Compute/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/scheduledevents/{scheduledEventId}/acknowledge" + } diff --git a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_updates_operations.py b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_updates_operations.py index 4f8efcaf1f88d..67ca4fd8bdc1f 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_updates_operations.py +++ b/sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/operations/_updates_operations.py @@ -49,7 +49,7 @@ def build_list_parent_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-09-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-10-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -89,7 +89,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-09-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-10-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL diff --git a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/apply_updates_create_or_update.py b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/apply_updates_create_or_update.py index cdbd5a4346edb..678f551db88bf 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/apply_updates_create_or_update.py +++ b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/apply_updates_create_or_update.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-09-01-preview/examples/ApplyUpdates_CreateOrUpdate.json +# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-10-01-preview/examples/ApplyUpdates_CreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/apply_updates_create_or_update_cancel_maintenance.py b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/apply_updates_create_or_update_cancel_maintenance.py index 4d6e0f14a6c23..ec8a2f404b72b 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/apply_updates_create_or_update_cancel_maintenance.py +++ b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/apply_updates_create_or_update_cancel_maintenance.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-09-01-preview/examples/ApplyUpdates_CreateOrUpdate_CancelMaintenance.json +# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-10-01-preview/examples/ApplyUpdates_CreateOrUpdate_CancelMaintenance.json if __name__ == "__main__": main() diff --git a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/apply_updates_create_or_update_parent.py b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/apply_updates_create_or_update_parent.py index ae2090c9722d4..d286f006ebac3 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/apply_updates_create_or_update_parent.py +++ b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/apply_updates_create_or_update_parent.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-09-01-preview/examples/ApplyUpdates_CreateOrUpdateParent.json +# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-10-01-preview/examples/ApplyUpdates_CreateOrUpdateParent.json if __name__ == "__main__": main() diff --git a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/apply_updates_get.py b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/apply_updates_get.py index 401230b6eb708..d118b604b56ea 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/apply_updates_get.py +++ b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/apply_updates_get.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-09-01-preview/examples/ApplyUpdates_Get.json +# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-10-01-preview/examples/ApplyUpdates_Get.json if __name__ == "__main__": main() diff --git a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/apply_updates_get_parent.py b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/apply_updates_get_parent.py index ecfaefe92dd74..90d5408bc96a9 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/apply_updates_get_parent.py +++ b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/apply_updates_get_parent.py @@ -41,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-09-01-preview/examples/ApplyUpdates_GetParent.json +# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-10-01-preview/examples/ApplyUpdates_GetParent.json if __name__ == "__main__": main() diff --git a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/apply_updates_list.py b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/apply_updates_list.py index a78f8ff09af45..df694d4f4f9d1 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/apply_updates_list.py +++ b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/apply_updates_list.py @@ -34,6 +34,6 @@ def main(): print(item) -# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-09-01-preview/examples/ApplyUpdates_List.json +# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-10-01-preview/examples/ApplyUpdates_List.json if __name__ == "__main__": main() diff --git a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/apply_updates_resource_group_list.py b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/apply_updates_resource_group_list.py index 425141e41975f..c1025b7a7c6c1 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/apply_updates_resource_group_list.py +++ b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/apply_updates_resource_group_list.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-09-01-preview/examples/ApplyUpdatesResourceGroup_List.json +# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-10-01-preview/examples/ApplyUpdatesResourceGroup_List.json if __name__ == "__main__": main() diff --git a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_create_or_update.py b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_create_or_update.py index 14dfe754f0c13..7507bb2b78d6f 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_create_or_update.py +++ b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_create_or_update.py @@ -44,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-09-01-preview/examples/ConfigurationAssignments_CreateOrUpdate.json +# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-10-01-preview/examples/ConfigurationAssignments_CreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_create_or_update_parent.py b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_create_or_update_parent.py index e880a132cb943..054ffe7ac6671 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_create_or_update_parent.py +++ b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_create_or_update_parent.py @@ -46,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-09-01-preview/examples/ConfigurationAssignments_CreateOrUpdateParent.json +# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-10-01-preview/examples/ConfigurationAssignments_CreateOrUpdateParent.json if __name__ == "__main__": main() diff --git a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_delete.py b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_delete.py index b6fdf61217217..e9b9a246be983 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_delete.py +++ b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_delete.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-09-01-preview/examples/ConfigurationAssignments_Delete.json +# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-10-01-preview/examples/ConfigurationAssignments_Delete.json if __name__ == "__main__": main() diff --git a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_delete_parent.py b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_delete_parent.py index 7040ca1477884..1afbd45aad831 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_delete_parent.py +++ b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_delete_parent.py @@ -41,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-09-01-preview/examples/ConfigurationAssignments_DeleteParent.json +# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-10-01-preview/examples/ConfigurationAssignments_DeleteParent.json if __name__ == "__main__": main() diff --git a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_for_resource_group_create_or_update.py b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_for_resource_group_create_or_update.py index 2ef9a3f71bc47..7c8b80a6aaed3 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_for_resource_group_create_or_update.py +++ b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_for_resource_group_create_or_update.py @@ -52,6 +52,6 @@ def main(): print(response) -# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-09-01-preview/examples/ConfigurationAssignmentsForResourceGroup_CreateOrUpdate.json +# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-10-01-preview/examples/ConfigurationAssignmentsForResourceGroup_CreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_for_resource_group_delete.py b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_for_resource_group_delete.py index 31685d637b9ff..a3fa420a8ba3a 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_for_resource_group_delete.py +++ b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_for_resource_group_delete.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-09-01-preview/examples/ConfigurationAssignmentsForResourceGroup_Delete.json +# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-10-01-preview/examples/ConfigurationAssignmentsForResourceGroup_Delete.json if __name__ == "__main__": main() diff --git a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_for_resource_group_get.py b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_for_resource_group_get.py index cd0c71e032377..c9e27f042a113 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_for_resource_group_get.py +++ b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_for_resource_group_get.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-09-01-preview/examples/ConfigurationAssignmentsForResourceGroup_Get.json +# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-10-01-preview/examples/ConfigurationAssignmentsForResourceGroup_Get.json if __name__ == "__main__": main() diff --git a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_for_resource_group_update_for_resource.py b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_for_resource_group_update_for_resource.py index 818d6f1ab6cbc..75db51f5ccd63 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_for_resource_group_update_for_resource.py +++ b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_for_resource_group_update_for_resource.py @@ -52,6 +52,6 @@ def main(): print(response) -# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-09-01-preview/examples/ConfigurationAssignmentsForResourceGroup_UpdateForResource.json +# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-10-01-preview/examples/ConfigurationAssignmentsForResourceGroup_UpdateForResource.json if __name__ == "__main__": main() diff --git a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_for_subscriptions_create_or_update.py b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_for_subscriptions_create_or_update.py index f43a5bf5c785c..3d88bad4fa9d4 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_for_subscriptions_create_or_update.py +++ b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_for_subscriptions_create_or_update.py @@ -52,6 +52,6 @@ def main(): print(response) -# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-09-01-preview/examples/ConfigurationAssignmentsForSubscriptions_CreateOrUpdate.json +# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-10-01-preview/examples/ConfigurationAssignmentsForSubscriptions_CreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_for_subscriptions_delete.py b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_for_subscriptions_delete.py index c78860fe92cef..6dbcc86b844dc 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_for_subscriptions_delete.py +++ b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_for_subscriptions_delete.py @@ -35,6 +35,6 @@ def main(): print(response) -# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-09-01-preview/examples/ConfigurationAssignmentsForSubscriptions_Delete.json +# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-10-01-preview/examples/ConfigurationAssignmentsForSubscriptions_Delete.json if __name__ == "__main__": main() diff --git a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_for_subscriptions_get.py b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_for_subscriptions_get.py index 8aff724a0f961..a811e635163f7 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_for_subscriptions_get.py +++ b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_for_subscriptions_get.py @@ -35,6 +35,6 @@ def main(): print(response) -# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-09-01-preview/examples/ConfigurationAssignmentsForSubscriptions_Get.json +# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-10-01-preview/examples/ConfigurationAssignmentsForSubscriptions_Get.json if __name__ == "__main__": main() diff --git a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_for_subscriptions_update_for_resource.py b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_for_subscriptions_update_for_resource.py index 5f23cf7927549..02cb80775d679 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_for_subscriptions_update_for_resource.py +++ b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_for_subscriptions_update_for_resource.py @@ -52,6 +52,6 @@ def main(): print(response) -# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-09-01-preview/examples/ConfigurationAssignmentsForSubscriptions_UpdateForResource.json +# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-10-01-preview/examples/ConfigurationAssignmentsForSubscriptions_UpdateForResource.json if __name__ == "__main__": main() diff --git a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_get.py b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_get.py index 2263b924958f1..837cc210877d2 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_get.py +++ b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_get.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-09-01-preview/examples/ConfigurationAssignments_Get.json +# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-10-01-preview/examples/ConfigurationAssignments_Get.json if __name__ == "__main__": main() diff --git a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_get_parent.py b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_get_parent.py index df66f9d76f955..31e19258cf46c 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_get_parent.py +++ b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_get_parent.py @@ -41,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-09-01-preview/examples/ConfigurationAssignments_GetParent.json +# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-10-01-preview/examples/ConfigurationAssignments_GetParent.json if __name__ == "__main__": main() diff --git a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_list.py b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_list.py index a7e45a439a30f..e6d9343b9c3fb 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_list.py +++ b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_list.py @@ -39,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-09-01-preview/examples/ConfigurationAssignments_List.json +# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-10-01-preview/examples/ConfigurationAssignments_List.json if __name__ == "__main__": main() diff --git a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_list_parent.py b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_list_parent.py index 2689a4bb0d693..848abdb663ac7 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_list_parent.py +++ b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_list_parent.py @@ -41,6 +41,6 @@ def main(): print(item) -# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-09-01-preview/examples/ConfigurationAssignments_ListParent.json +# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-10-01-preview/examples/ConfigurationAssignments_ListParent.json if __name__ == "__main__": main() diff --git a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_result_within_subscription_list.py b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_result_within_subscription_list.py index 8200601ff1cf7..088b7ceea1670 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_result_within_subscription_list.py +++ b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/configuration_assignments_result_within_subscription_list.py @@ -34,6 +34,6 @@ def main(): print(item) -# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-09-01-preview/examples/ConfigurationAssignmentsResultWithinSubscription_List.json +# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-10-01-preview/examples/ConfigurationAssignmentsResultWithinSubscription_List.json if __name__ == "__main__": main() diff --git a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/maintenance_configurations_create_or_update_for_resource.py b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/maintenance_configurations_create_or_update_for_resource.py index a0b1cd9c4be1e..468abdb2a96b4 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/maintenance_configurations_create_or_update_for_resource.py +++ b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/maintenance_configurations_create_or_update_for_resource.py @@ -51,6 +51,6 @@ def main(): print(response) -# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-09-01-preview/examples/MaintenanceConfigurations_CreateOrUpdateForResource.json +# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-10-01-preview/examples/MaintenanceConfigurations_CreateOrUpdateForResource.json if __name__ == "__main__": main() diff --git a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/maintenance_configurations_delete_for_resource.py b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/maintenance_configurations_delete_for_resource.py index 09c7fb77e4c51..43191c704cc7e 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/maintenance_configurations_delete_for_resource.py +++ b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/maintenance_configurations_delete_for_resource.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-09-01-preview/examples/MaintenanceConfigurations_DeleteForResource.json +# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-10-01-preview/examples/MaintenanceConfigurations_DeleteForResource.json if __name__ == "__main__": main() diff --git a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/maintenance_configurations_get_for_resource.py b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/maintenance_configurations_get_for_resource.py index 62da2da833597..d28c58d5fcdfd 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/maintenance_configurations_get_for_resource.py +++ b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/maintenance_configurations_get_for_resource.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-09-01-preview/examples/MaintenanceConfigurations_GetForResource.json +# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-10-01-preview/examples/MaintenanceConfigurations_GetForResource.json if __name__ == "__main__": main() diff --git a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/maintenance_configurations_get_for_resource_guest_os_patch_linux.py b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/maintenance_configurations_get_for_resource_guest_os_patch_linux.py index 43f1a16988e24..320e584724d2d 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/maintenance_configurations_get_for_resource_guest_os_patch_linux.py +++ b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/maintenance_configurations_get_for_resource_guest_os_patch_linux.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-09-01-preview/examples/MaintenanceConfigurations_GetForResource_GuestOSPatchLinux.json +# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-10-01-preview/examples/MaintenanceConfigurations_GetForResource_GuestOSPatchLinux.json if __name__ == "__main__": main() diff --git a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/maintenance_configurations_get_for_resource_guest_os_patch_windows.py b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/maintenance_configurations_get_for_resource_guest_os_patch_windows.py index d43be4d74f7e7..a0cdbe9398cb4 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/maintenance_configurations_get_for_resource_guest_os_patch_windows.py +++ b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/maintenance_configurations_get_for_resource_guest_os_patch_windows.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-09-01-preview/examples/MaintenanceConfigurations_GetForResource_GuestOSPatchWindows.json +# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-10-01-preview/examples/MaintenanceConfigurations_GetForResource_GuestOSPatchWindows.json if __name__ == "__main__": main() diff --git a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/maintenance_configurations_list.py b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/maintenance_configurations_list.py index b489624b99605..359239aeabe3a 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/maintenance_configurations_list.py +++ b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/maintenance_configurations_list.py @@ -34,6 +34,6 @@ def main(): print(item) -# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-09-01-preview/examples/MaintenanceConfigurations_List.json +# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-10-01-preview/examples/MaintenanceConfigurations_List.json if __name__ == "__main__": main() diff --git a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/maintenance_configurations_resource_group_list.py b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/maintenance_configurations_resource_group_list.py index d07f9e919715b..71508d99e9d7f 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/maintenance_configurations_resource_group_list.py +++ b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/maintenance_configurations_resource_group_list.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-09-01-preview/examples/MaintenanceConfigurationsResourceGroup_List.json +# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-10-01-preview/examples/MaintenanceConfigurationsResourceGroup_List.json if __name__ == "__main__": main() diff --git a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/maintenance_configurations_update_for_resource.py b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/maintenance_configurations_update_for_resource.py index d48b3f6fef195..f28688df9fdc4 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/maintenance_configurations_update_for_resource.py +++ b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/maintenance_configurations_update_for_resource.py @@ -51,6 +51,6 @@ def main(): print(response) -# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-09-01-preview/examples/MaintenanceConfigurations_UpdateForResource.json +# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-10-01-preview/examples/MaintenanceConfigurations_UpdateForResource.json if __name__ == "__main__": main() diff --git a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/operations_list.py b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/operations_list.py index 493012295f95f..9cf759bebbdac 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/operations_list.py +++ b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/operations_list.py @@ -34,6 +34,6 @@ def main(): print(item) -# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-09-01-preview/examples/Operations_List.json +# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-10-01-preview/examples/Operations_List.json if __name__ == "__main__": main() diff --git a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/public_maintenance_configurations_get_for_resource.py b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/public_maintenance_configurations_get_for_resource.py index c5ac8f6299b79..02dfb2a7a33e7 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/public_maintenance_configurations_get_for_resource.py +++ b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/public_maintenance_configurations_get_for_resource.py @@ -35,6 +35,6 @@ def main(): print(response) -# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-09-01-preview/examples/PublicMaintenanceConfigurations_GetForResource.json +# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-10-01-preview/examples/PublicMaintenanceConfigurations_GetForResource.json if __name__ == "__main__": main() diff --git a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/public_maintenance_configurations_list.py b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/public_maintenance_configurations_list.py index 611f5d2580493..72a12caa08d18 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/public_maintenance_configurations_list.py +++ b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/public_maintenance_configurations_list.py @@ -34,6 +34,6 @@ def main(): print(item) -# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-09-01-preview/examples/PublicMaintenanceConfigurations_List.json +# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-10-01-preview/examples/PublicMaintenanceConfigurations_List.json if __name__ == "__main__": main() diff --git a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/scheduled_events_acknowledge.py b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/scheduled_events_acknowledge.py new file mode 100644 index 0000000000000..67ec4eec4948b --- /dev/null +++ b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/scheduled_events_acknowledge.py @@ -0,0 +1,42 @@ +# 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 azure.identity import DefaultAzureCredential +from azure.mgmt.maintenance import MaintenanceManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-maintenance +# USAGE + python scheduled_events_acknowledge.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = MaintenanceManagementClient( + credential=DefaultAzureCredential(), + subscription_id="5b4b650e-28b9-4790-b3ab-ddbd88d727c4", + ) + + client.scheduled_event.acknowledge( + resource_group_name="examplerg", + resource_type="virtualMachines", + resource_name="configuration1", + scheduled_event_id="ad6d85cf-2c9e-4eec-9a1e-af3213cc0486", + ) + + +# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-10-01-preview/examples/ScheduledEvents_Acknowledge.json +if __name__ == "__main__": + main() diff --git a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/updates_list.py b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/updates_list.py index 1631cc9ff6c05..f8f56f1ad1f02 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/updates_list.py +++ b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/updates_list.py @@ -39,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-09-01-preview/examples/Updates_List.json +# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-10-01-preview/examples/Updates_List.json if __name__ == "__main__": main() diff --git a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/updates_list_parent.py b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/updates_list_parent.py index 51639aad431d9..eae3ad6233786 100644 --- a/sdk/maintenance/azure-mgmt-maintenance/generated_samples/updates_list_parent.py +++ b/sdk/maintenance/azure-mgmt-maintenance/generated_samples/updates_list_parent.py @@ -41,6 +41,6 @@ def main(): print(item) -# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-09-01-preview/examples/Updates_ListParent.json +# x-ms-original-file: specification/maintenance/resource-manager/Microsoft.Maintenance/preview/2023-10-01-preview/examples/Updates_ListParent.json if __name__ == "__main__": main()