diff --git a/sdk/automation/azure-mgmt-automation/_meta.json b/sdk/automation/azure-mgmt-automation/_meta.json
index fef7e751fada..451afac522cb 100644
--- a/sdk/automation/azure-mgmt-automation/_meta.json
+++ b/sdk/automation/azure-mgmt-automation/_meta.json
@@ -1,11 +1,11 @@
{
- "commit": "690a7656d65a03b134fa44fc7bb8013dc18a15b5",
+ "commit": "ce415ddc79aa454faab934c23e7ccef6bddfe3f4",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.10.2",
"use": [
- "@autorest/python@6.19.0",
+ "@autorest/python@6.26.4",
"@autorest/modelerfour@4.27.0"
],
- "autorest_command": "autorest specification/automation/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/azure-sdk-for-python/sdk --tag=package-2022-08-08 --use=@autorest/python@6.19.0 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False",
+ "autorest_command": "autorest specification/automation/resource-manager/readme.md --generate-sample=True --generate-test=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.26.4 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False",
"readme": "specification/automation/resource-manager/readme.md"
}
\ No newline at end of file
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/__init__.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/__init__.py
index 78ecf85f77e0..ed517639ae29 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/__init__.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/__init__.py
@@ -5,15 +5,21 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
+# pylint: disable=wrong-import-position
-from ._automation_client import AutomationClient
+from typing import TYPE_CHECKING
+
+if TYPE_CHECKING:
+ from ._patch import * # pylint: disable=unused-wildcard-import
+
+from ._automation_client import AutomationClient # type: ignore
from ._version import VERSION
__version__ = VERSION
try:
from ._patch import __all__ as _patch_all
- from ._patch import * # pylint: disable=unused-wildcard-import
+ from ._patch import *
except ImportError:
_patch_all = []
from ._patch import patch_sdk as _patch_sdk
@@ -21,6 +27,6 @@
__all__ = [
"AutomationClient",
]
-__all__.extend([p for p in _patch_all if p not in __all__])
+__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
_patch_sdk()
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_automation_client.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_automation_client.py
index 01a06d89d815..55beba4ace8d 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_automation_client.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_automation_client.py
@@ -28,8 +28,6 @@
ConnectionTypeOperations,
CredentialOperations,
DeletedAutomationAccountsOperations,
- DscCompilationJobOperations,
- DscCompilationJobStreamOperations,
DscConfigurationOperations,
DscNodeConfigurationOperations,
DscNodeOperations,
@@ -46,12 +44,14 @@
NodeReportsOperations,
ObjectDataTypesOperations,
Operations,
+ PackageOperations,
PrivateEndpointConnectionsOperations,
PrivateLinkResourcesOperations,
Python2PackageOperations,
Python3PackageOperations,
RunbookDraftOperations,
RunbookOperations,
+ RuntimeEnvironmentsOperations,
ScheduleOperations,
SoftwareUpdateConfigurationMachineRunsOperations,
SoftwareUpdateConfigurationRunsOperations,
@@ -69,18 +69,21 @@
)
if TYPE_CHECKING:
- # pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials import TokenCredential
-class AutomationClient(
- AutomationClientOperationsMixin
-): # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
+class AutomationClient(AutomationClientOperationsMixin): # pylint: disable=too-many-instance-attributes
"""Automation Client.
- :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations
- :vartype private_endpoint_connections:
- azure.mgmt.automation.operations.PrivateEndpointConnectionsOperations
+ :ivar node_count_information: NodeCountInformationOperations operations
+ :vartype node_count_information:
+ azure.mgmt.automation.operations.NodeCountInformationOperations
+ :ivar software_update_configurations: SoftwareUpdateConfigurationsOperations operations
+ :vartype software_update_configurations:
+ azure.mgmt.automation.operations.SoftwareUpdateConfigurationsOperations
+ :ivar deleted_automation_accounts: DeletedAutomationAccountsOperations operations
+ :vartype deleted_automation_accounts:
+ azure.mgmt.automation.operations.DeletedAutomationAccountsOperations
:ivar private_link_resources: PrivateLinkResourcesOperations operations
:vartype private_link_resources:
azure.mgmt.automation.operations.PrivateLinkResourcesOperations
@@ -91,24 +94,6 @@ class AutomationClient(
:vartype dsc_node: azure.mgmt.automation.operations.DscNodeOperations
:ivar node_reports: NodeReportsOperations operations
:vartype node_reports: azure.mgmt.automation.operations.NodeReportsOperations
- :ivar dsc_compilation_job: DscCompilationJobOperations operations
- :vartype dsc_compilation_job: azure.mgmt.automation.operations.DscCompilationJobOperations
- :ivar dsc_compilation_job_stream: DscCompilationJobStreamOperations operations
- :vartype dsc_compilation_job_stream:
- azure.mgmt.automation.operations.DscCompilationJobStreamOperations
- :ivar node_count_information: NodeCountInformationOperations operations
- :vartype node_count_information:
- azure.mgmt.automation.operations.NodeCountInformationOperations
- :ivar watcher: WatcherOperations operations
- :vartype watcher: azure.mgmt.automation.operations.WatcherOperations
- :ivar software_update_configurations: SoftwareUpdateConfigurationsOperations operations
- :vartype software_update_configurations:
- azure.mgmt.automation.operations.SoftwareUpdateConfigurationsOperations
- :ivar webhook: WebhookOperations operations
- :vartype webhook: azure.mgmt.automation.operations.WebhookOperations
- :ivar deleted_automation_accounts: DeletedAutomationAccountsOperations operations
- :vartype deleted_automation_accounts:
- azure.mgmt.automation.operations.DeletedAutomationAccountsOperations
:ivar automation_account: AutomationAccountOperations operations
:vartype automation_account: azure.mgmt.automation.operations.AutomationAccountOperations
:ivar statistics: StatisticsOperations operations
@@ -154,6 +139,11 @@ class AutomationClient(
:vartype fields: azure.mgmt.automation.operations.FieldsOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.automation.operations.Operations
+ :ivar package: PackageOperations operations
+ :vartype package: azure.mgmt.automation.operations.PackageOperations
+ :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations
+ :vartype private_endpoint_connections:
+ azure.mgmt.automation.operations.PrivateEndpointConnectionsOperations
:ivar python2_package: Python2PackageOperations operations
:vartype python2_package: azure.mgmt.automation.operations.Python2PackageOperations
:ivar python3_package: Python3PackageOperations operations
@@ -166,6 +156,8 @@ class AutomationClient(
:vartype test_job_streams: azure.mgmt.automation.operations.TestJobStreamsOperations
:ivar test_job: TestJobOperations operations
:vartype test_job: azure.mgmt.automation.operations.TestJobOperations
+ :ivar runtime_environments: RuntimeEnvironmentsOperations operations
+ :vartype runtime_environments: azure.mgmt.automation.operations.RuntimeEnvironmentsOperations
:ivar schedule: ScheduleOperations operations
:vartype schedule: azure.mgmt.automation.operations.ScheduleOperations
:ivar software_update_configuration_machine_runs:
@@ -185,6 +177,10 @@ class AutomationClient(
azure.mgmt.automation.operations.SourceControlSyncJobStreamsOperations
:ivar variable: VariableOperations operations
:vartype variable: azure.mgmt.automation.operations.VariableOperations
+ :ivar watcher: WatcherOperations operations
+ :vartype watcher: azure.mgmt.automation.operations.WatcherOperations
+ :ivar webhook: WebhookOperations operations
+ :vartype webhook: azure.mgmt.automation.operations.WebhookOperations
:param credential: Credential needed for the client to connect to Azure. Required.
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: Gets subscription credentials which uniquely identify Microsoft Azure
@@ -192,6 +188,9 @@ class AutomationClient(
: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 "2024-10-23". Note that overriding this
+ default value may result in unsupported behavior.
+ :paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
"""
@@ -228,34 +227,23 @@ def __init__(
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
- self.private_endpoint_connections = PrivateEndpointConnectionsOperations(
- self._client, self._config, self._serialize, self._deserialize
- )
- self.private_link_resources = PrivateLinkResourcesOperations(
- self._client, self._config, self._serialize, self._deserialize
- )
- self.agent_registration_information = AgentRegistrationInformationOperations(
- self._client, self._config, self._serialize, self._deserialize
- )
- self.dsc_node = DscNodeOperations(self._client, self._config, self._serialize, self._deserialize)
- self.node_reports = NodeReportsOperations(self._client, self._config, self._serialize, self._deserialize)
- self.dsc_compilation_job = DscCompilationJobOperations(
+ self.node_count_information = NodeCountInformationOperations(
self._client, self._config, self._serialize, self._deserialize
)
- self.dsc_compilation_job_stream = DscCompilationJobStreamOperations(
+ self.software_update_configurations = SoftwareUpdateConfigurationsOperations(
self._client, self._config, self._serialize, self._deserialize
)
- self.node_count_information = NodeCountInformationOperations(
+ self.deleted_automation_accounts = DeletedAutomationAccountsOperations(
self._client, self._config, self._serialize, self._deserialize
)
- self.watcher = WatcherOperations(self._client, self._config, self._serialize, self._deserialize)
- self.software_update_configurations = SoftwareUpdateConfigurationsOperations(
+ self.private_link_resources = PrivateLinkResourcesOperations(
self._client, self._config, self._serialize, self._deserialize
)
- self.webhook = WebhookOperations(self._client, self._config, self._serialize, self._deserialize)
- self.deleted_automation_accounts = DeletedAutomationAccountsOperations(
+ self.agent_registration_information = AgentRegistrationInformationOperations(
self._client, self._config, self._serialize, self._deserialize
)
+ self.dsc_node = DscNodeOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.node_reports = NodeReportsOperations(self._client, self._config, self._serialize, self._deserialize)
self.automation_account = AutomationAccountOperations(
self._client, self._config, self._serialize, self._deserialize
)
@@ -291,12 +279,19 @@ def __init__(
)
self.fields = FieldsOperations(self._client, self._config, self._serialize, self._deserialize)
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
+ self.package = PackageOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.private_endpoint_connections = PrivateEndpointConnectionsOperations(
+ self._client, self._config, self._serialize, self._deserialize
+ )
self.python2_package = Python2PackageOperations(self._client, self._config, self._serialize, self._deserialize)
self.python3_package = Python3PackageOperations(self._client, self._config, self._serialize, self._deserialize)
self.runbook_draft = RunbookDraftOperations(self._client, self._config, self._serialize, self._deserialize)
self.runbook = RunbookOperations(self._client, self._config, self._serialize, self._deserialize)
self.test_job_streams = TestJobStreamsOperations(self._client, self._config, self._serialize, self._deserialize)
self.test_job = TestJobOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.runtime_environments = RuntimeEnvironmentsOperations(
+ self._client, self._config, self._serialize, self._deserialize
+ )
self.schedule = ScheduleOperations(self._client, self._config, self._serialize, self._deserialize)
self.software_update_configuration_machine_runs = SoftwareUpdateConfigurationMachineRunsOperations(
self._client, self._config, self._serialize, self._deserialize
@@ -312,6 +307,8 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize
)
self.variable = VariableOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.watcher = WatcherOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.webhook = WebhookOperations(self._client, self._config, self._serialize, self._deserialize)
def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_configuration.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_configuration.py
index 1c318645d2dd..f2a9834504f0 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_configuration.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_configuration.py
@@ -14,11 +14,10 @@
from ._version import VERSION
if TYPE_CHECKING:
- # pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials import TokenCredential
-class AutomationClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
+class AutomationClientConfiguration: # pylint: disable=too-many-instance-attributes
"""Configuration for AutomationClient.
Note that all parameters used to create this instance are saved as instance
@@ -29,9 +28,14 @@ class AutomationClientConfiguration: # pylint: disable=too-many-instance-attrib
:param subscription_id: Gets subscription credentials which uniquely identify Microsoft Azure
subscription. The subscription ID forms part of the URI for every service call. Required.
:type subscription_id: str
+ :keyword api_version: Api Version. Default value is "2024-10-23". 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:
+ api_version: str = kwargs.pop("api_version", "2024-10-23")
+
if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
if subscription_id is None:
@@ -39,6 +43,7 @@ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs
self.credential = credential
self.subscription_id = subscription_id
+ self.api_version = api_version
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
kwargs.setdefault("sdk_moniker", "mgmt-automation/{}".format(VERSION))
self.polling_interval = kwargs.get("polling_interval", 30)
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_serialization.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_serialization.py
index 8139854b97bb..ce17d1798ce7 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_serialization.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_serialization.py
@@ -1,3 +1,4 @@
+# pylint: disable=too-many-lines
# --------------------------------------------------------------------------
#
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -24,7 +25,6 @@
#
# --------------------------------------------------------------------------
-# pylint: skip-file
# pyright: reportUnnecessaryTypeIgnoreComment=false
from base64 import b64decode, b64encode
@@ -52,7 +52,6 @@
MutableMapping,
Type,
List,
- Mapping,
)
try:
@@ -91,6 +90,8 @@ def deserialize_from_text(cls, data: Optional[Union[AnyStr, IO]], content_type:
:param data: Input, could be bytes or stream (will be decoded with UTF8) or text
:type data: str or bytes or IO
:param str content_type: The content type.
+ :return: The deserialized data.
+ :rtype: object
"""
if hasattr(data, "read"):
# Assume a stream
@@ -112,7 +113,7 @@ def deserialize_from_text(cls, data: Optional[Union[AnyStr, IO]], content_type:
try:
return json.loads(data_as_str)
except ValueError as err:
- raise DeserializationError("JSON is invalid: {}".format(err), err)
+ raise DeserializationError("JSON is invalid: {}".format(err), err) from err
elif "xml" in (content_type or []):
try:
@@ -155,6 +156,11 @@ def deserialize_from_http_generics(cls, body_bytes: Optional[Union[AnyStr, IO]],
Use bytes and headers to NOT use any requests/aiohttp or whatever
specific implementation.
Headers will tested for "content-type"
+
+ :param bytes body_bytes: The body of the response.
+ :param dict headers: The headers of the response.
+ :returns: The deserialized data.
+ :rtype: object
"""
# Try to use content-type from headers if available
content_type = None
@@ -184,15 +190,30 @@ class UTC(datetime.tzinfo):
"""Time Zone info for handling UTC"""
def utcoffset(self, dt):
- """UTF offset for UTC is 0."""
+ """UTF offset for UTC is 0.
+
+ :param datetime.datetime dt: The datetime
+ :returns: The offset
+ :rtype: datetime.timedelta
+ """
return datetime.timedelta(0)
def tzname(self, dt):
- """Timestamp representation."""
+ """Timestamp representation.
+
+ :param datetime.datetime dt: The datetime
+ :returns: The timestamp representation
+ :rtype: str
+ """
return "Z"
def dst(self, dt):
- """No daylight saving for UTC."""
+ """No daylight saving for UTC.
+
+ :param datetime.datetime dt: The datetime
+ :returns: The daylight saving time
+ :rtype: datetime.timedelta
+ """
return datetime.timedelta(hours=1)
@@ -206,7 +227,7 @@ class _FixedOffset(datetime.tzinfo): # type: ignore
:param datetime.timedelta offset: offset in timedelta format
"""
- def __init__(self, offset):
+ def __init__(self, offset) -> None:
self.__offset = offset
def utcoffset(self, dt):
@@ -235,24 +256,26 @@ def __getinitargs__(self):
_FLATTEN = re.compile(r"(? None:
self.additional_properties: Optional[Dict[str, Any]] = {}
- for k in kwargs:
+ for k in kwargs: # pylint: disable=consider-using-dict-items
if k not in self._attribute_map:
_LOGGER.warning("%s is not a known attribute of class %s and will be ignored", k, self.__class__)
elif k in self._validation and self._validation[k].get("readonly", False):
@@ -300,13 +330,23 @@ def __init__(self, **kwargs: Any) -> None:
setattr(self, k, kwargs[k])
def __eq__(self, other: Any) -> bool:
- """Compare objects by comparing all attributes."""
+ """Compare objects by comparing all attributes.
+
+ :param object other: The object to compare
+ :returns: True if objects are equal
+ :rtype: bool
+ """
if isinstance(other, self.__class__):
return self.__dict__ == other.__dict__
return False
def __ne__(self, other: Any) -> bool:
- """Compare objects by comparing all attributes."""
+ """Compare objects by comparing all attributes.
+
+ :param object other: The object to compare
+ :returns: True if objects are not equal
+ :rtype: bool
+ """
return not self.__eq__(other)
def __str__(self) -> str:
@@ -326,7 +366,11 @@ def is_xml_model(cls) -> bool:
@classmethod
def _create_xml_node(cls):
- """Create XML node."""
+ """Create XML node.
+
+ :returns: The XML node
+ :rtype: xml.etree.ElementTree.Element
+ """
try:
xml_map = cls._xml_map # type: ignore
except AttributeError:
@@ -346,7 +390,9 @@ def serialize(self, keep_readonly: bool = False, **kwargs: Any) -> JSON:
:rtype: dict
"""
serializer = Serializer(self._infer_class_models())
- return serializer._serialize(self, keep_readonly=keep_readonly, **kwargs) # type: ignore
+ return serializer._serialize( # type: ignore # pylint: disable=protected-access
+ self, keep_readonly=keep_readonly, **kwargs
+ )
def as_dict(
self,
@@ -380,12 +426,15 @@ def my_key_transformer(key, attr_desc, value):
If you want XML serialization, you can pass the kwargs is_xml=True.
+ :param bool keep_readonly: If you want to serialize the readonly attributes
:param function key_transformer: A key transformer function.
:returns: A dict JSON compatible object
:rtype: dict
"""
serializer = Serializer(self._infer_class_models())
- return serializer._serialize(self, key_transformer=key_transformer, keep_readonly=keep_readonly, **kwargs) # type: ignore
+ return serializer._serialize( # type: ignore # pylint: disable=protected-access
+ self, key_transformer=key_transformer, keep_readonly=keep_readonly, **kwargs
+ )
@classmethod
def _infer_class_models(cls):
@@ -395,7 +444,7 @@ def _infer_class_models(cls):
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
if cls.__name__ not in client_models:
raise ValueError("Not Autorest generated code")
- except Exception:
+ except Exception: # pylint: disable=broad-exception-caught
# Assume it's not Autorest generated (tests?). Add ourselves as dependencies.
client_models = {cls.__name__: cls}
return client_models
@@ -408,6 +457,7 @@ def deserialize(cls: Type[ModelType], data: Any, content_type: Optional[str] = N
:param str content_type: JSON by default, set application/xml if XML.
:returns: An instance of this model
:raises: DeserializationError if something went wrong
+ :rtype: ModelType
"""
deserializer = Deserializer(cls._infer_class_models())
return deserializer(cls.__name__, data, content_type=content_type) # type: ignore
@@ -426,9 +476,11 @@ def from_dict(
and last_rest_key_case_insensitive_extractor)
:param dict data: A dict using RestAPI structure
+ :param function key_extractors: A key extractor function.
:param str content_type: JSON by default, set application/xml if XML.
:returns: An instance of this model
:raises: DeserializationError if something went wrong
+ :rtype: ModelType
"""
deserializer = Deserializer(cls._infer_class_models())
deserializer.key_extractors = ( # type: ignore
@@ -448,21 +500,25 @@ def _flatten_subtype(cls, key, objects):
return {}
result = dict(cls._subtype_map[key])
for valuetype in cls._subtype_map[key].values():
- result.update(objects[valuetype]._flatten_subtype(key, objects))
+ result.update(objects[valuetype]._flatten_subtype(key, objects)) # pylint: disable=protected-access
return result
@classmethod
def _classify(cls, response, objects):
"""Check the class _subtype_map for any child classes.
We want to ignore any inherited _subtype_maps.
- Remove the polymorphic key from the initial data.
+
+ :param dict response: The initial data
+ :param dict objects: The class objects
+ :returns: The class to be used
+ :rtype: class
"""
for subtype_key in cls.__dict__.get("_subtype_map", {}).keys():
subtype_value = None
if not isinstance(response, ET.Element):
rest_api_response_key = cls._get_rest_key_parts(subtype_key)[-1]
- subtype_value = response.pop(rest_api_response_key, None) or response.pop(subtype_key, None)
+ subtype_value = response.get(rest_api_response_key, None) or response.get(subtype_key, None)
else:
subtype_value = xml_key_extractor(subtype_key, cls._attribute_map[subtype_key], response)
if subtype_value:
@@ -501,11 +557,13 @@ def _decode_attribute_map_key(key):
inside the received data.
:param str key: A key string from the generated code
+ :returns: The decoded key
+ :rtype: str
"""
return key.replace("\\.", ".")
-class Serializer(object):
+class Serializer(object): # pylint: disable=too-many-public-methods
"""Request object model serializer."""
basic_types = {str: "str", int: "int", bool: "bool", float: "float"}
@@ -540,7 +598,7 @@ class Serializer(object):
"multiple": lambda x, y: x % y != 0,
}
- def __init__(self, classes: Optional[Mapping[str, type]] = None):
+ def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None:
self.serialize_type = {
"iso-8601": Serializer.serialize_iso,
"rfc-1123": Serializer.serialize_rfc,
@@ -560,13 +618,16 @@ def __init__(self, classes: Optional[Mapping[str, type]] = None):
self.key_transformer = full_restapi_key_transformer
self.client_side_validation = True
- def _serialize(self, target_obj, data_type=None, **kwargs):
+ def _serialize( # pylint: disable=too-many-nested-blocks, too-many-branches, too-many-statements, too-many-locals
+ self, target_obj, data_type=None, **kwargs
+ ):
"""Serialize data into a string according to type.
- :param target_obj: The data to be serialized.
+ :param object target_obj: The data to be serialized.
:param str data_type: The type to be serialized from.
:rtype: str, dict
:raises: SerializationError if serialization fails.
+ :returns: The serialized data.
"""
key_transformer = kwargs.get("key_transformer", self.key_transformer)
keep_readonly = kwargs.get("keep_readonly", False)
@@ -592,12 +653,14 @@ def _serialize(self, target_obj, data_type=None, **kwargs):
serialized = {}
if is_xml_model_serialization:
- serialized = target_obj._create_xml_node()
+ serialized = target_obj._create_xml_node() # pylint: disable=protected-access
try:
- attributes = target_obj._attribute_map
+ attributes = target_obj._attribute_map # pylint: disable=protected-access
for attr, attr_desc in attributes.items():
attr_name = attr
- if not keep_readonly and target_obj._validation.get(attr_name, {}).get("readonly", False):
+ if not keep_readonly and target_obj._validation.get( # pylint: disable=protected-access
+ attr_name, {}
+ ).get("readonly", False):
continue
if attr_name == "additional_properties" and attr_desc["key"] == "":
@@ -633,7 +696,8 @@ def _serialize(self, target_obj, data_type=None, **kwargs):
if isinstance(new_attr, list):
serialized.extend(new_attr) # type: ignore
elif isinstance(new_attr, ET.Element):
- # If the down XML has no XML/Name, we MUST replace the tag with the local tag. But keeping the namespaces.
+ # If the down XML has no XML/Name,
+ # we MUST replace the tag with the local tag. But keeping the namespaces.
if "name" not in getattr(orig_attr, "_xml_map", {}):
splitted_tag = new_attr.tag.split("}")
if len(splitted_tag) == 2: # Namespace
@@ -664,17 +728,17 @@ def _serialize(self, target_obj, data_type=None, **kwargs):
except (AttributeError, KeyError, TypeError) as err:
msg = "Attribute {} in object {} cannot be serialized.\n{}".format(attr_name, class_name, str(target_obj))
raise SerializationError(msg) from err
- else:
- return serialized
+ return serialized
def body(self, data, data_type, **kwargs):
"""Serialize data intended for a request body.
- :param data: The data to be serialized.
+ :param object data: The data to be serialized.
:param str data_type: The type to be serialized from.
:rtype: dict
:raises: SerializationError if serialization fails.
:raises: ValueError if data is None
+ :returns: The serialized request body
"""
# Just in case this is a dict
@@ -703,7 +767,7 @@ def body(self, data, data_type, **kwargs):
attribute_key_case_insensitive_extractor,
last_rest_key_case_insensitive_extractor,
]
- data = deserializer._deserialize(data_type, data)
+ data = deserializer._deserialize(data_type, data) # pylint: disable=protected-access
except DeserializationError as err:
raise SerializationError("Unable to build a model: " + str(err)) from err
@@ -712,9 +776,11 @@ def body(self, data, data_type, **kwargs):
def url(self, name, data, data_type, **kwargs):
"""Serialize data intended for a URL path.
- :param data: The data to be serialized.
+ :param str name: The name of the URL path parameter.
+ :param object data: The data to be serialized.
:param str data_type: The type to be serialized from.
:rtype: str
+ :returns: The serialized URL path
:raises: TypeError if serialization fails.
:raises: ValueError if data is None
"""
@@ -728,21 +794,20 @@ def url(self, name, data, data_type, **kwargs):
output = output.replace("{", quote("{")).replace("}", quote("}"))
else:
output = quote(str(output), safe="")
- except SerializationError:
- raise TypeError("{} must be type {}.".format(name, data_type))
- else:
- return output
+ except SerializationError as exc:
+ raise TypeError("{} must be type {}.".format(name, data_type)) from exc
+ return output
def query(self, name, data, data_type, **kwargs):
"""Serialize data intended for a URL query.
- :param data: The data to be serialized.
+ :param str name: The name of the query parameter.
+ :param object data: The data to be serialized.
:param str data_type: The type to be serialized from.
- :keyword bool skip_quote: Whether to skip quote the serialized result.
- Defaults to False.
:rtype: str, list
:raises: TypeError if serialization fails.
:raises: ValueError if data is None
+ :returns: The serialized query parameter
"""
try:
# Treat the list aside, since we don't want to encode the div separator
@@ -759,19 +824,20 @@ def query(self, name, data, data_type, **kwargs):
output = str(output)
else:
output = quote(str(output), safe="")
- except SerializationError:
- raise TypeError("{} must be type {}.".format(name, data_type))
- else:
- return str(output)
+ except SerializationError as exc:
+ raise TypeError("{} must be type {}.".format(name, data_type)) from exc
+ return str(output)
def header(self, name, data, data_type, **kwargs):
"""Serialize data intended for a request header.
- :param data: The data to be serialized.
+ :param str name: The name of the header.
+ :param object data: The data to be serialized.
:param str data_type: The type to be serialized from.
:rtype: str
:raises: TypeError if serialization fails.
:raises: ValueError if data is None
+ :returns: The serialized header
"""
try:
if data_type in ["[str]"]:
@@ -780,21 +846,20 @@ def header(self, name, data, data_type, **kwargs):
output = self.serialize_data(data, data_type, **kwargs)
if data_type == "bool":
output = json.dumps(output)
- except SerializationError:
- raise TypeError("{} must be type {}.".format(name, data_type))
- else:
- return str(output)
+ except SerializationError as exc:
+ raise TypeError("{} must be type {}.".format(name, data_type)) from exc
+ return str(output)
def serialize_data(self, data, data_type, **kwargs):
"""Serialize generic data according to supplied data type.
- :param data: The data to be serialized.
+ :param object data: The data to be serialized.
:param str data_type: The type to be serialized from.
- :param bool required: Whether it's essential that the data not be
- empty or None
:raises: AttributeError if required data is None.
:raises: ValueError if data is None
:raises: SerializationError if serialization fails.
+ :returns: The serialized data.
+ :rtype: str, int, float, bool, dict, list
"""
if data is None:
raise ValueError("No value for given attribute")
@@ -805,7 +870,7 @@ def serialize_data(self, data, data_type, **kwargs):
if data_type in self.basic_types.values():
return self.serialize_basic(data, data_type, **kwargs)
- elif data_type in self.serialize_type:
+ if data_type in self.serialize_type:
return self.serialize_type[data_type](data, **kwargs)
# If dependencies is empty, try with current data class
@@ -821,11 +886,10 @@ def serialize_data(self, data, data_type, **kwargs):
except (ValueError, TypeError) as err:
msg = "Unable to serialize value: {!r} as type: {!r}."
raise SerializationError(msg.format(data, data_type)) from err
- else:
- return self._serialize(data, **kwargs)
+ return self._serialize(data, **kwargs)
@classmethod
- def _get_custom_serializers(cls, data_type, **kwargs):
+ def _get_custom_serializers(cls, data_type, **kwargs): # pylint: disable=inconsistent-return-statements
custom_serializer = kwargs.get("basic_types_serializers", {}).get(data_type)
if custom_serializer:
return custom_serializer
@@ -841,23 +905,26 @@ def serialize_basic(cls, data, data_type, **kwargs):
- basic_types_serializers dict[str, callable] : If set, use the callable as serializer
- is_xml bool : If set, use xml_basic_types_serializers
- :param data: Object to be serialized.
+ :param obj data: Object to be serialized.
:param str data_type: Type of object in the iterable.
+ :rtype: str, int, float, bool
+ :return: serialized object
"""
custom_serializer = cls._get_custom_serializers(data_type, **kwargs)
if custom_serializer:
return custom_serializer(data)
if data_type == "str":
return cls.serialize_unicode(data)
- return eval(data_type)(data) # nosec
+ return eval(data_type)(data) # nosec # pylint: disable=eval-used
@classmethod
def serialize_unicode(cls, data):
"""Special handling for serializing unicode strings in Py2.
Encode to UTF-8 if unicode, otherwise handle as a str.
- :param data: Object to be serialized.
+ :param str data: Object to be serialized.
:rtype: str
+ :return: serialized object
"""
try: # If I received an enum, return its value
return data.value
@@ -871,8 +938,7 @@ def serialize_unicode(cls, data):
return data
except NameError:
return str(data)
- else:
- return str(data)
+ return str(data)
def serialize_iter(self, data, iter_type, div=None, **kwargs):
"""Serialize iterable.
@@ -882,15 +948,13 @@ def serialize_iter(self, data, iter_type, div=None, **kwargs):
serialization_ctxt['type'] should be same as data_type.
- is_xml bool : If set, serialize as XML
- :param list attr: Object to be serialized.
+ :param list data: Object to be serialized.
:param str iter_type: Type of object in the iterable.
- :param bool required: Whether the objects in the iterable must
- not be None or empty.
:param str div: If set, this str will be used to combine the elements
in the iterable into a combined string. Default is 'None'.
- :keyword bool do_quote: Whether to quote the serialized result of each iterable element.
Defaults to False.
:rtype: list, str
+ :return: serialized iterable
"""
if isinstance(data, str):
raise SerializationError("Refuse str type as a valid iter type.")
@@ -945,9 +1009,8 @@ def serialize_dict(self, attr, dict_type, **kwargs):
:param dict attr: Object to be serialized.
:param str dict_type: Type of object in the dictionary.
- :param bool required: Whether the objects in the dictionary must
- not be None or empty.
:rtype: dict
+ :return: serialized dictionary
"""
serialization_ctxt = kwargs.get("serialization_ctxt", {})
serialized = {}
@@ -971,7 +1034,7 @@ def serialize_dict(self, attr, dict_type, **kwargs):
return serialized
- def serialize_object(self, attr, **kwargs):
+ def serialize_object(self, attr, **kwargs): # pylint: disable=too-many-return-statements
"""Serialize a generic object.
This will be handled as a dictionary. If object passed in is not
a basic type (str, int, float, dict, list) it will simply be
@@ -979,6 +1042,7 @@ def serialize_object(self, attr, **kwargs):
:param dict attr: Object to be serialized.
:rtype: dict or str
+ :return: serialized object
"""
if attr is None:
return None
@@ -1003,7 +1067,7 @@ def serialize_object(self, attr, **kwargs):
return self.serialize_decimal(attr)
# If it's a model or I know this dependency, serialize as a Model
- elif obj_type in self.dependencies.values() or isinstance(attr, Model):
+ if obj_type in self.dependencies.values() or isinstance(attr, Model):
return self._serialize(attr)
if obj_type == dict:
@@ -1034,56 +1098,61 @@ def serialize_enum(attr, enum_obj=None):
try:
enum_obj(result) # type: ignore
return result
- except ValueError:
+ except ValueError as exc:
for enum_value in enum_obj: # type: ignore
if enum_value.value.lower() == str(attr).lower():
return enum_value.value
error = "{!r} is not valid value for enum {!r}"
- raise SerializationError(error.format(attr, enum_obj))
+ raise SerializationError(error.format(attr, enum_obj)) from exc
@staticmethod
- def serialize_bytearray(attr, **kwargs):
+ def serialize_bytearray(attr, **kwargs): # pylint: disable=unused-argument
"""Serialize bytearray into base-64 string.
- :param attr: Object to be serialized.
+ :param str attr: Object to be serialized.
:rtype: str
+ :return: serialized base64
"""
return b64encode(attr).decode()
@staticmethod
- def serialize_base64(attr, **kwargs):
+ def serialize_base64(attr, **kwargs): # pylint: disable=unused-argument
"""Serialize str into base-64 string.
- :param attr: Object to be serialized.
+ :param str attr: Object to be serialized.
:rtype: str
+ :return: serialized base64
"""
encoded = b64encode(attr).decode("ascii")
return encoded.strip("=").replace("+", "-").replace("/", "_")
@staticmethod
- def serialize_decimal(attr, **kwargs):
+ def serialize_decimal(attr, **kwargs): # pylint: disable=unused-argument
"""Serialize Decimal object to float.
- :param attr: Object to be serialized.
+ :param decimal attr: Object to be serialized.
:rtype: float
+ :return: serialized decimal
"""
return float(attr)
@staticmethod
- def serialize_long(attr, **kwargs):
+ def serialize_long(attr, **kwargs): # pylint: disable=unused-argument
"""Serialize long (Py2) or int (Py3).
- :param attr: Object to be serialized.
+ :param int attr: Object to be serialized.
:rtype: int/long
+ :return: serialized long
"""
return _long_type(attr)
@staticmethod
- def serialize_date(attr, **kwargs):
+ def serialize_date(attr, **kwargs): # pylint: disable=unused-argument
"""Serialize Date object into ISO-8601 formatted string.
:param Date attr: Object to be serialized.
:rtype: str
+ :return: serialized date
"""
if isinstance(attr, str):
attr = isodate.parse_date(attr)
@@ -1091,11 +1160,12 @@ def serialize_date(attr, **kwargs):
return t
@staticmethod
- def serialize_time(attr, **kwargs):
+ def serialize_time(attr, **kwargs): # pylint: disable=unused-argument
"""Serialize Time object into ISO-8601 formatted string.
:param datetime.time attr: Object to be serialized.
:rtype: str
+ :return: serialized time
"""
if isinstance(attr, str):
attr = isodate.parse_time(attr)
@@ -1105,30 +1175,32 @@ def serialize_time(attr, **kwargs):
return t
@staticmethod
- def serialize_duration(attr, **kwargs):
+ def serialize_duration(attr, **kwargs): # pylint: disable=unused-argument
"""Serialize TimeDelta object into ISO-8601 formatted string.
:param TimeDelta attr: Object to be serialized.
:rtype: str
+ :return: serialized duration
"""
if isinstance(attr, str):
attr = isodate.parse_duration(attr)
return isodate.duration_isoformat(attr)
@staticmethod
- def serialize_rfc(attr, **kwargs):
+ def serialize_rfc(attr, **kwargs): # pylint: disable=unused-argument
"""Serialize Datetime object into RFC-1123 formatted string.
:param Datetime attr: Object to be serialized.
:rtype: str
:raises: TypeError if format invalid.
+ :return: serialized rfc
"""
try:
if not attr.tzinfo:
_LOGGER.warning("Datetime with no tzinfo will be considered UTC.")
utc = attr.utctimetuple()
- except AttributeError:
- raise TypeError("RFC1123 object must be valid Datetime object.")
+ except AttributeError as exc:
+ raise TypeError("RFC1123 object must be valid Datetime object.") from exc
return "{}, {:02} {} {:04} {:02}:{:02}:{:02} GMT".format(
Serializer.days[utc.tm_wday],
@@ -1141,12 +1213,13 @@ def serialize_rfc(attr, **kwargs):
)
@staticmethod
- def serialize_iso(attr, **kwargs):
+ def serialize_iso(attr, **kwargs): # pylint: disable=unused-argument
"""Serialize Datetime object into ISO-8601 formatted string.
:param Datetime attr: Object to be serialized.
:rtype: str
:raises: SerializationError if format invalid.
+ :return: serialized iso
"""
if isinstance(attr, str):
attr = isodate.parse_datetime(attr)
@@ -1172,13 +1245,14 @@ def serialize_iso(attr, **kwargs):
raise TypeError(msg) from err
@staticmethod
- def serialize_unix(attr, **kwargs):
+ def serialize_unix(attr, **kwargs): # pylint: disable=unused-argument
"""Serialize Datetime object into IntTime format.
This is represented as seconds.
:param Datetime attr: Object to be serialized.
:rtype: int
:raises: SerializationError if format invalid
+ :return: serialied unix
"""
if isinstance(attr, int):
return attr
@@ -1186,11 +1260,11 @@ def serialize_unix(attr, **kwargs):
if not attr.tzinfo:
_LOGGER.warning("Datetime with no tzinfo will be considered UTC.")
return int(calendar.timegm(attr.utctimetuple()))
- except AttributeError:
- raise TypeError("Unix time object must be valid Datetime object.")
+ except AttributeError as exc:
+ raise TypeError("Unix time object must be valid Datetime object.") from exc
-def rest_key_extractor(attr, attr_desc, data):
+def rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument
key = attr_desc["key"]
working_data = data
@@ -1211,7 +1285,9 @@ def rest_key_extractor(attr, attr_desc, data):
return working_data.get(key)
-def rest_key_case_insensitive_extractor(attr, attr_desc, data):
+def rest_key_case_insensitive_extractor( # pylint: disable=unused-argument, inconsistent-return-statements
+ attr, attr_desc, data
+):
key = attr_desc["key"]
working_data = data
@@ -1232,17 +1308,29 @@ def rest_key_case_insensitive_extractor(attr, attr_desc, data):
return attribute_key_case_insensitive_extractor(key, None, working_data)
-def last_rest_key_extractor(attr, attr_desc, data):
- """Extract the attribute in "data" based on the last part of the JSON path key."""
+def last_rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument
+ """Extract the attribute in "data" based on the last part of the JSON path key.
+
+ :param str attr: The attribute to extract
+ :param dict attr_desc: The attribute description
+ :param dict data: The data to extract from
+ :rtype: object
+ :returns: The extracted attribute
+ """
key = attr_desc["key"]
dict_keys = _FLATTEN.split(key)
return attribute_key_extractor(dict_keys[-1], None, data)
-def last_rest_key_case_insensitive_extractor(attr, attr_desc, data):
+def last_rest_key_case_insensitive_extractor(attr, attr_desc, data): # pylint: disable=unused-argument
"""Extract the attribute in "data" based on the last part of the JSON path key.
This is the case insensitive version of "last_rest_key_extractor"
+ :param str attr: The attribute to extract
+ :param dict attr_desc: The attribute description
+ :param dict data: The data to extract from
+ :rtype: object
+ :returns: The extracted attribute
"""
key = attr_desc["key"]
dict_keys = _FLATTEN.split(key)
@@ -1279,7 +1367,7 @@ def _extract_name_from_internal_type(internal_type):
return xml_name
-def xml_key_extractor(attr, attr_desc, data):
+def xml_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument,too-many-return-statements
if isinstance(data, dict):
return None
@@ -1331,22 +1419,21 @@ def xml_key_extractor(attr, attr_desc, data):
if is_iter_type:
if is_wrapped:
return None # is_wrapped no node, we want None
- else:
- return [] # not wrapped, assume empty list
+ return [] # not wrapped, assume empty list
return None # Assume it's not there, maybe an optional node.
# If is_iter_type and not wrapped, return all found children
if is_iter_type:
if not is_wrapped:
return children
- else: # Iter and wrapped, should have found one node only (the wrap one)
- if len(children) != 1:
- raise DeserializationError(
- "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format(
- xml_name
- )
+ # Iter and wrapped, should have found one node only (the wrap one)
+ if len(children) != 1:
+ raise DeserializationError(
+ "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( # pylint: disable=line-too-long
+ xml_name
)
- return list(children[0]) # Might be empty list and that's ok.
+ )
+ return list(children[0]) # Might be empty list and that's ok.
# Here it's not a itertype, we should have found one element only or empty
if len(children) > 1:
@@ -1363,9 +1450,9 @@ class Deserializer(object):
basic_types = {str: "str", int: "int", bool: "bool", float: "float"}
- valid_date = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}" r"\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?")
+ valid_date = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?")
- def __init__(self, classes: Optional[Mapping[str, type]] = None):
+ def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None:
self.deserialize_type = {
"iso-8601": Deserializer.deserialize_iso,
"rfc-1123": Deserializer.deserialize_rfc,
@@ -1403,11 +1490,12 @@ def __call__(self, target_obj, response_data, content_type=None):
:param str content_type: Swagger "produces" if available.
:raises: DeserializationError if deserialization fails.
:return: Deserialized object.
+ :rtype: object
"""
data = self._unpack_content(response_data, content_type)
return self._deserialize(target_obj, data)
- def _deserialize(self, target_obj, data):
+ def _deserialize(self, target_obj, data): # pylint: disable=inconsistent-return-statements
"""Call the deserializer on a model.
Data needs to be already deserialized as JSON or XML ElementTree
@@ -1416,12 +1504,13 @@ def _deserialize(self, target_obj, data):
:param object data: Object to deserialize.
:raises: DeserializationError if deserialization fails.
:return: Deserialized object.
+ :rtype: object
"""
# This is already a model, go recursive just in case
if hasattr(data, "_attribute_map"):
constants = [name for name, config in getattr(data, "_validation", {}).items() if config.get("constant")]
try:
- for attr, mapconfig in data._attribute_map.items():
+ for attr, mapconfig in data._attribute_map.items(): # pylint: disable=protected-access
if attr in constants:
continue
value = getattr(data, attr)
@@ -1440,13 +1529,13 @@ def _deserialize(self, target_obj, data):
if isinstance(response, str):
return self.deserialize_data(data, response)
- elif isinstance(response, type) and issubclass(response, Enum):
+ if isinstance(response, type) and issubclass(response, Enum):
return self.deserialize_enum(data, response)
if data is None or data is CoreNull:
return data
try:
- attributes = response._attribute_map # type: ignore
+ attributes = response._attribute_map # type: ignore # pylint: disable=protected-access
d_attrs = {}
for attr, attr_desc in attributes.items():
# Check empty string. If it's not empty, someone has a real "additionalProperties"...
@@ -1476,9 +1565,8 @@ def _deserialize(self, target_obj, data):
except (AttributeError, TypeError, KeyError) as err:
msg = "Unable to deserialize to object: " + class_name # type: ignore
raise DeserializationError(msg) from err
- else:
- additional_properties = self._build_additional_properties(attributes, data)
- return self._instantiate_model(response, d_attrs, additional_properties)
+ additional_properties = self._build_additional_properties(attributes, data)
+ return self._instantiate_model(response, d_attrs, additional_properties)
def _build_additional_properties(self, attribute_map, data):
if not self.additional_properties_detection:
@@ -1505,6 +1593,8 @@ def _classify_target(self, target, data):
:param str target: The target object type to deserialize to.
:param str/dict data: The response data to deserialize.
+ :return: The classified target object and its class name.
+ :rtype: tuple
"""
if target is None:
return None, None
@@ -1516,7 +1606,7 @@ def _classify_target(self, target, data):
return target, target
try:
- target = target._classify(data, self.dependencies) # type: ignore
+ target = target._classify(data, self.dependencies) # type: ignore # pylint: disable=protected-access
except AttributeError:
pass # Target is not a Model, no classify
return target, target.__class__.__name__ # type: ignore
@@ -1531,10 +1621,12 @@ def failsafe_deserialize(self, target_obj, data, content_type=None):
:param str target_obj: The target object type to deserialize to.
:param str/dict data: The response data to deserialize.
:param str content_type: Swagger "produces" if available.
+ :return: Deserialized object.
+ :rtype: object
"""
try:
return self(target_obj, data, content_type=content_type)
- except:
+ except: # pylint: disable=bare-except
_LOGGER.debug(
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
)
@@ -1552,10 +1644,12 @@ def _unpack_content(raw_data, content_type=None):
If raw_data is something else, bypass all logic and return it directly.
- :param raw_data: Data to be processed.
- :param content_type: How to parse if raw_data is a string/bytes.
+ :param obj raw_data: Data to be processed.
+ :param str content_type: How to parse if raw_data is a string/bytes.
:raises JSONDecodeError: If JSON is requested and parsing is impossible.
:raises UnicodeDecodeError: If bytes is not UTF8
+ :rtype: object
+ :return: Unpacked content.
"""
# Assume this is enough to detect a Pipeline Response without importing it
context = getattr(raw_data, "context", {})
@@ -1579,14 +1673,21 @@ def _unpack_content(raw_data, content_type=None):
def _instantiate_model(self, response, attrs, additional_properties=None):
"""Instantiate a response model passing in deserialized args.
- :param response: The response model class.
- :param d_attrs: The deserialized response attributes.
+ :param Response response: The response model class.
+ :param dict attrs: The deserialized response attributes.
+ :param dict additional_properties: Additional properties to be set.
+ :rtype: Response
+ :return: The instantiated response model.
"""
if callable(response):
subtype = getattr(response, "_subtype_map", {})
try:
- readonly = [k for k, v in response._validation.items() if v.get("readonly")]
- const = [k for k, v in response._validation.items() if v.get("constant")]
+ readonly = [
+ k for k, v in response._validation.items() if v.get("readonly") # pylint: disable=protected-access
+ ]
+ const = [
+ k for k, v in response._validation.items() if v.get("constant") # pylint: disable=protected-access
+ ]
kwargs = {k: v for k, v in attrs.items() if k not in subtype and k not in readonly + const}
response_obj = response(**kwargs)
for attr in readonly:
@@ -1596,7 +1697,7 @@ def _instantiate_model(self, response, attrs, additional_properties=None):
return response_obj
except TypeError as err:
msg = "Unable to deserialize {} into model {}. ".format(kwargs, response) # type: ignore
- raise DeserializationError(msg + str(err))
+ raise DeserializationError(msg + str(err)) from err
else:
try:
for attr, value in attrs.items():
@@ -1605,15 +1706,16 @@ def _instantiate_model(self, response, attrs, additional_properties=None):
except Exception as exp:
msg = "Unable to populate response model. "
msg += "Type: {}, Error: {}".format(type(response), exp)
- raise DeserializationError(msg)
+ raise DeserializationError(msg) from exp
- def deserialize_data(self, data, data_type):
+ def deserialize_data(self, data, data_type): # pylint: disable=too-many-return-statements
"""Process data for deserialization according to data type.
:param str data: The response string to be deserialized.
:param str data_type: The type to deserialize to.
:raises: DeserializationError if deserialization fails.
:return: Deserialized object.
+ :rtype: object
"""
if data is None:
return data
@@ -1627,7 +1729,11 @@ def deserialize_data(self, data, data_type):
if isinstance(data, self.deserialize_expected_types.get(data_type, tuple())):
return data
- is_a_text_parsing_type = lambda x: x not in ["object", "[]", r"{}"]
+ is_a_text_parsing_type = lambda x: x not in [ # pylint: disable=unnecessary-lambda-assignment
+ "object",
+ "[]",
+ r"{}",
+ ]
if isinstance(data, ET.Element) and is_a_text_parsing_type(data_type) and not data.text:
return None
data_val = self.deserialize_type[data_type](data)
@@ -1647,14 +1753,14 @@ def deserialize_data(self, data, data_type):
msg = "Unable to deserialize response data."
msg += " Data: {}, {}".format(data, data_type)
raise DeserializationError(msg) from err
- else:
- return self._deserialize(obj_type, data)
+ return self._deserialize(obj_type, data)
def deserialize_iter(self, attr, iter_type):
"""Deserialize an iterable.
:param list attr: Iterable to be deserialized.
:param str iter_type: The type of object in the iterable.
+ :return: Deserialized iterable.
:rtype: list
"""
if attr is None:
@@ -1671,6 +1777,7 @@ def deserialize_dict(self, attr, dict_type):
:param dict/list attr: Dictionary to be deserialized. Also accepts
a list of key, value pairs.
:param str dict_type: The object type of the items in the dictionary.
+ :return: Deserialized dictionary.
:rtype: dict
"""
if isinstance(attr, list):
@@ -1681,11 +1788,12 @@ def deserialize_dict(self, attr, dict_type):
attr = {el.tag: el.text for el in attr}
return {k: self.deserialize_data(v, dict_type) for k, v in attr.items()}
- def deserialize_object(self, attr, **kwargs):
+ def deserialize_object(self, attr, **kwargs): # pylint: disable=too-many-return-statements
"""Deserialize a generic object.
This will be handled as a dictionary.
:param dict attr: Dictionary to be deserialized.
+ :return: Deserialized object.
:rtype: dict
:raises: TypeError if non-builtin datatype encountered.
"""
@@ -1720,11 +1828,10 @@ def deserialize_object(self, attr, **kwargs):
pass
return deserialized
- else:
- error = "Cannot deserialize generic object with type: "
- raise TypeError(error + str(obj_type))
+ error = "Cannot deserialize generic object with type: "
+ raise TypeError(error + str(obj_type))
- def deserialize_basic(self, attr, data_type):
+ def deserialize_basic(self, attr, data_type): # pylint: disable=too-many-return-statements
"""Deserialize basic builtin data type from string.
Will attempt to convert to str, int, float and bool.
This function will also accept '1', '0', 'true' and 'false' as
@@ -1732,6 +1839,7 @@ def deserialize_basic(self, attr, data_type):
:param str attr: response string to be deserialized.
:param str data_type: deserialization data type.
+ :return: Deserialized basic type.
:rtype: str, int, float or bool
:raises: TypeError if string format is not valid.
"""
@@ -1743,24 +1851,23 @@ def deserialize_basic(self, attr, data_type):
if data_type == "str":
# None or '', node is empty string.
return ""
- else:
- # None or '', node with a strong type is None.
- # Don't try to model "empty bool" or "empty int"
- return None
+ # None or '', node with a strong type is None.
+ # Don't try to model "empty bool" or "empty int"
+ return None
if data_type == "bool":
if attr in [True, False, 1, 0]:
return bool(attr)
- elif isinstance(attr, str):
+ if isinstance(attr, str):
if attr.lower() in ["true", "1"]:
return True
- elif attr.lower() in ["false", "0"]:
+ if attr.lower() in ["false", "0"]:
return False
raise TypeError("Invalid boolean value: {}".format(attr))
if data_type == "str":
return self.deserialize_unicode(attr)
- return eval(data_type)(attr) # nosec
+ return eval(data_type)(attr) # nosec # pylint: disable=eval-used
@staticmethod
def deserialize_unicode(data):
@@ -1768,6 +1875,7 @@ def deserialize_unicode(data):
as a string.
:param str data: response string to be deserialized.
+ :return: Deserialized string.
:rtype: str or unicode
"""
# We might be here because we have an enum modeled as string,
@@ -1781,8 +1889,7 @@ def deserialize_unicode(data):
return data
except NameError:
return str(data)
- else:
- return str(data)
+ return str(data)
@staticmethod
def deserialize_enum(data, enum_obj):
@@ -1794,6 +1901,7 @@ def deserialize_enum(data, enum_obj):
:param str data: Response string to be deserialized. If this value is
None or invalid it will be returned as-is.
:param Enum enum_obj: Enum object to deserialize to.
+ :return: Deserialized enum object.
:rtype: Enum
"""
if isinstance(data, enum_obj) or data is None:
@@ -1804,9 +1912,9 @@ def deserialize_enum(data, enum_obj):
# Workaround. We might consider remove it in the future.
try:
return list(enum_obj.__members__.values())[data]
- except IndexError:
+ except IndexError as exc:
error = "{!r} is not a valid index for enum {!r}"
- raise DeserializationError(error.format(data, enum_obj))
+ raise DeserializationError(error.format(data, enum_obj)) from exc
try:
return enum_obj(str(data))
except ValueError:
@@ -1822,6 +1930,7 @@ def deserialize_bytearray(attr):
"""Deserialize string into bytearray.
:param str attr: response string to be deserialized.
+ :return: Deserialized bytearray
:rtype: bytearray
:raises: TypeError if string format invalid.
"""
@@ -1834,6 +1943,7 @@ def deserialize_base64(attr):
"""Deserialize base64 encoded string into string.
:param str attr: response string to be deserialized.
+ :return: Deserialized base64 string
:rtype: bytearray
:raises: TypeError if string format invalid.
"""
@@ -1849,8 +1959,9 @@ def deserialize_decimal(attr):
"""Deserialize string into Decimal object.
:param str attr: response string to be deserialized.
- :rtype: Decimal
+ :return: Deserialized decimal
:raises: DeserializationError if string format invalid.
+ :rtype: decimal
"""
if isinstance(attr, ET.Element):
attr = attr.text
@@ -1865,6 +1976,7 @@ def deserialize_long(attr):
"""Deserialize string into long (Py2) or int (Py3).
:param str attr: response string to be deserialized.
+ :return: Deserialized int
:rtype: long or int
:raises: ValueError if string format invalid.
"""
@@ -1877,6 +1989,7 @@ def deserialize_duration(attr):
"""Deserialize ISO-8601 formatted string into TimeDelta object.
:param str attr: response string to be deserialized.
+ :return: Deserialized duration
:rtype: TimeDelta
:raises: DeserializationError if string format invalid.
"""
@@ -1887,14 +2000,14 @@ def deserialize_duration(attr):
except (ValueError, OverflowError, AttributeError) as err:
msg = "Cannot deserialize duration object."
raise DeserializationError(msg) from err
- else:
- return duration
+ return duration
@staticmethod
def deserialize_date(attr):
"""Deserialize ISO-8601 formatted string into Date object.
:param str attr: response string to be deserialized.
+ :return: Deserialized date
:rtype: Date
:raises: DeserializationError if string format invalid.
"""
@@ -1910,6 +2023,7 @@ def deserialize_time(attr):
"""Deserialize ISO-8601 formatted string into time object.
:param str attr: response string to be deserialized.
+ :return: Deserialized time
:rtype: datetime.time
:raises: DeserializationError if string format invalid.
"""
@@ -1924,6 +2038,7 @@ def deserialize_rfc(attr):
"""Deserialize RFC-1123 formatted string into Datetime object.
:param str attr: response string to be deserialized.
+ :return: Deserialized RFC datetime
:rtype: Datetime
:raises: DeserializationError if string format invalid.
"""
@@ -1939,14 +2054,14 @@ def deserialize_rfc(attr):
except ValueError as err:
msg = "Cannot deserialize to rfc datetime object."
raise DeserializationError(msg) from err
- else:
- return date_obj
+ return date_obj
@staticmethod
def deserialize_iso(attr):
"""Deserialize ISO-8601 formatted string into Datetime object.
:param str attr: response string to be deserialized.
+ :return: Deserialized ISO datetime
:rtype: Datetime
:raises: DeserializationError if string format invalid.
"""
@@ -1976,8 +2091,7 @@ def deserialize_iso(attr):
except (ValueError, OverflowError, AttributeError) as err:
msg = "Cannot deserialize datetime object."
raise DeserializationError(msg) from err
- else:
- return date_obj
+ return date_obj
@staticmethod
def deserialize_unix(attr):
@@ -1985,6 +2099,7 @@ def deserialize_unix(attr):
This is represented as seconds.
:param int attr: Object to be serialized.
+ :return: Deserialized datetime
:rtype: Datetime
:raises: DeserializationError if format invalid
"""
@@ -1996,5 +2111,4 @@ def deserialize_unix(attr):
except ValueError as err:
msg = "Cannot deserialize to unix datetime object."
raise DeserializationError(msg) from err
- else:
- return date_obj
+ return date_obj
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_vendor.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_vendor.py
index 36f1cf507c1a..19e3ae55b2fc 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_vendor.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_vendor.py
@@ -11,7 +11,6 @@
from ._configuration import AutomationClientConfiguration
if TYPE_CHECKING:
- # pylint: disable=unused-import,ungrouped-imports
from azure.core import PipelineClient
from ._serialization import Deserializer, Serializer
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_version.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_version.py
index a741dc7b69b5..e5754a47ce68 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_version.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_version.py
@@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-VERSION = "1.1.0b4"
+VERSION = "1.0.0b1"
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/__init__.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/__init__.py
index dd297a2db1bb..a019f6ceb932 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/__init__.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/__init__.py
@@ -5,12 +5,18 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
+# pylint: disable=wrong-import-position
-from ._automation_client import AutomationClient
+from typing import TYPE_CHECKING
+
+if TYPE_CHECKING:
+ from ._patch import * # pylint: disable=unused-wildcard-import
+
+from ._automation_client import AutomationClient # type: ignore
try:
from ._patch import __all__ as _patch_all
- from ._patch import * # pylint: disable=unused-wildcard-import
+ from ._patch import *
except ImportError:
_patch_all = []
from ._patch import patch_sdk as _patch_sdk
@@ -18,6 +24,6 @@
__all__ = [
"AutomationClient",
]
-__all__.extend([p for p in _patch_all if p not in __all__])
+__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
_patch_sdk()
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/_automation_client.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/_automation_client.py
index a12b29ddef41..d466a1851b82 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/_automation_client.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/_automation_client.py
@@ -28,8 +28,6 @@
ConnectionTypeOperations,
CredentialOperations,
DeletedAutomationAccountsOperations,
- DscCompilationJobOperations,
- DscCompilationJobStreamOperations,
DscConfigurationOperations,
DscNodeConfigurationOperations,
DscNodeOperations,
@@ -46,12 +44,14 @@
NodeReportsOperations,
ObjectDataTypesOperations,
Operations,
+ PackageOperations,
PrivateEndpointConnectionsOperations,
PrivateLinkResourcesOperations,
Python2PackageOperations,
Python3PackageOperations,
RunbookDraftOperations,
RunbookOperations,
+ RuntimeEnvironmentsOperations,
ScheduleOperations,
SoftwareUpdateConfigurationMachineRunsOperations,
SoftwareUpdateConfigurationRunsOperations,
@@ -69,18 +69,21 @@
)
if TYPE_CHECKING:
- # pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials_async import AsyncTokenCredential
-class AutomationClient(
- AutomationClientOperationsMixin
-): # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
+class AutomationClient(AutomationClientOperationsMixin): # pylint: disable=too-many-instance-attributes
"""Automation Client.
- :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations
- :vartype private_endpoint_connections:
- azure.mgmt.automation.aio.operations.PrivateEndpointConnectionsOperations
+ :ivar node_count_information: NodeCountInformationOperations operations
+ :vartype node_count_information:
+ azure.mgmt.automation.aio.operations.NodeCountInformationOperations
+ :ivar software_update_configurations: SoftwareUpdateConfigurationsOperations operations
+ :vartype software_update_configurations:
+ azure.mgmt.automation.aio.operations.SoftwareUpdateConfigurationsOperations
+ :ivar deleted_automation_accounts: DeletedAutomationAccountsOperations operations
+ :vartype deleted_automation_accounts:
+ azure.mgmt.automation.aio.operations.DeletedAutomationAccountsOperations
:ivar private_link_resources: PrivateLinkResourcesOperations operations
:vartype private_link_resources:
azure.mgmt.automation.aio.operations.PrivateLinkResourcesOperations
@@ -91,24 +94,6 @@ class AutomationClient(
:vartype dsc_node: azure.mgmt.automation.aio.operations.DscNodeOperations
:ivar node_reports: NodeReportsOperations operations
:vartype node_reports: azure.mgmt.automation.aio.operations.NodeReportsOperations
- :ivar dsc_compilation_job: DscCompilationJobOperations operations
- :vartype dsc_compilation_job: azure.mgmt.automation.aio.operations.DscCompilationJobOperations
- :ivar dsc_compilation_job_stream: DscCompilationJobStreamOperations operations
- :vartype dsc_compilation_job_stream:
- azure.mgmt.automation.aio.operations.DscCompilationJobStreamOperations
- :ivar node_count_information: NodeCountInformationOperations operations
- :vartype node_count_information:
- azure.mgmt.automation.aio.operations.NodeCountInformationOperations
- :ivar watcher: WatcherOperations operations
- :vartype watcher: azure.mgmt.automation.aio.operations.WatcherOperations
- :ivar software_update_configurations: SoftwareUpdateConfigurationsOperations operations
- :vartype software_update_configurations:
- azure.mgmt.automation.aio.operations.SoftwareUpdateConfigurationsOperations
- :ivar webhook: WebhookOperations operations
- :vartype webhook: azure.mgmt.automation.aio.operations.WebhookOperations
- :ivar deleted_automation_accounts: DeletedAutomationAccountsOperations operations
- :vartype deleted_automation_accounts:
- azure.mgmt.automation.aio.operations.DeletedAutomationAccountsOperations
:ivar automation_account: AutomationAccountOperations operations
:vartype automation_account: azure.mgmt.automation.aio.operations.AutomationAccountOperations
:ivar statistics: StatisticsOperations operations
@@ -154,6 +139,11 @@ class AutomationClient(
:vartype fields: azure.mgmt.automation.aio.operations.FieldsOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.automation.aio.operations.Operations
+ :ivar package: PackageOperations operations
+ :vartype package: azure.mgmt.automation.aio.operations.PackageOperations
+ :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations
+ :vartype private_endpoint_connections:
+ azure.mgmt.automation.aio.operations.PrivateEndpointConnectionsOperations
:ivar python2_package: Python2PackageOperations operations
:vartype python2_package: azure.mgmt.automation.aio.operations.Python2PackageOperations
:ivar python3_package: Python3PackageOperations operations
@@ -166,6 +156,9 @@ class AutomationClient(
:vartype test_job_streams: azure.mgmt.automation.aio.operations.TestJobStreamsOperations
:ivar test_job: TestJobOperations operations
:vartype test_job: azure.mgmt.automation.aio.operations.TestJobOperations
+ :ivar runtime_environments: RuntimeEnvironmentsOperations operations
+ :vartype runtime_environments:
+ azure.mgmt.automation.aio.operations.RuntimeEnvironmentsOperations
:ivar schedule: ScheduleOperations operations
:vartype schedule: azure.mgmt.automation.aio.operations.ScheduleOperations
:ivar software_update_configuration_machine_runs:
@@ -185,6 +178,10 @@ class AutomationClient(
azure.mgmt.automation.aio.operations.SourceControlSyncJobStreamsOperations
:ivar variable: VariableOperations operations
:vartype variable: azure.mgmt.automation.aio.operations.VariableOperations
+ :ivar watcher: WatcherOperations operations
+ :vartype watcher: azure.mgmt.automation.aio.operations.WatcherOperations
+ :ivar webhook: WebhookOperations operations
+ :vartype webhook: azure.mgmt.automation.aio.operations.WebhookOperations
:param credential: Credential needed for the client to connect to Azure. Required.
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param subscription_id: Gets subscription credentials which uniquely identify Microsoft Azure
@@ -192,6 +189,9 @@ class AutomationClient(
: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 "2024-10-23". Note that overriding this
+ default value may result in unsupported behavior.
+ :paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
"""
@@ -228,34 +228,23 @@ def __init__(
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
- self.private_endpoint_connections = PrivateEndpointConnectionsOperations(
- self._client, self._config, self._serialize, self._deserialize
- )
- self.private_link_resources = PrivateLinkResourcesOperations(
- self._client, self._config, self._serialize, self._deserialize
- )
- self.agent_registration_information = AgentRegistrationInformationOperations(
- self._client, self._config, self._serialize, self._deserialize
- )
- self.dsc_node = DscNodeOperations(self._client, self._config, self._serialize, self._deserialize)
- self.node_reports = NodeReportsOperations(self._client, self._config, self._serialize, self._deserialize)
- self.dsc_compilation_job = DscCompilationJobOperations(
+ self.node_count_information = NodeCountInformationOperations(
self._client, self._config, self._serialize, self._deserialize
)
- self.dsc_compilation_job_stream = DscCompilationJobStreamOperations(
+ self.software_update_configurations = SoftwareUpdateConfigurationsOperations(
self._client, self._config, self._serialize, self._deserialize
)
- self.node_count_information = NodeCountInformationOperations(
+ self.deleted_automation_accounts = DeletedAutomationAccountsOperations(
self._client, self._config, self._serialize, self._deserialize
)
- self.watcher = WatcherOperations(self._client, self._config, self._serialize, self._deserialize)
- self.software_update_configurations = SoftwareUpdateConfigurationsOperations(
+ self.private_link_resources = PrivateLinkResourcesOperations(
self._client, self._config, self._serialize, self._deserialize
)
- self.webhook = WebhookOperations(self._client, self._config, self._serialize, self._deserialize)
- self.deleted_automation_accounts = DeletedAutomationAccountsOperations(
+ self.agent_registration_information = AgentRegistrationInformationOperations(
self._client, self._config, self._serialize, self._deserialize
)
+ self.dsc_node = DscNodeOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.node_reports = NodeReportsOperations(self._client, self._config, self._serialize, self._deserialize)
self.automation_account = AutomationAccountOperations(
self._client, self._config, self._serialize, self._deserialize
)
@@ -291,12 +280,19 @@ def __init__(
)
self.fields = FieldsOperations(self._client, self._config, self._serialize, self._deserialize)
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
+ self.package = PackageOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.private_endpoint_connections = PrivateEndpointConnectionsOperations(
+ self._client, self._config, self._serialize, self._deserialize
+ )
self.python2_package = Python2PackageOperations(self._client, self._config, self._serialize, self._deserialize)
self.python3_package = Python3PackageOperations(self._client, self._config, self._serialize, self._deserialize)
self.runbook_draft = RunbookDraftOperations(self._client, self._config, self._serialize, self._deserialize)
self.runbook = RunbookOperations(self._client, self._config, self._serialize, self._deserialize)
self.test_job_streams = TestJobStreamsOperations(self._client, self._config, self._serialize, self._deserialize)
self.test_job = TestJobOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.runtime_environments = RuntimeEnvironmentsOperations(
+ self._client, self._config, self._serialize, self._deserialize
+ )
self.schedule = ScheduleOperations(self._client, self._config, self._serialize, self._deserialize)
self.software_update_configuration_machine_runs = SoftwareUpdateConfigurationMachineRunsOperations(
self._client, self._config, self._serialize, self._deserialize
@@ -312,6 +308,8 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize
)
self.variable = VariableOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.watcher = WatcherOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.webhook = WebhookOperations(self._client, self._config, self._serialize, self._deserialize)
def _send_request(
self, request: HttpRequest, *, stream: bool = False, **kwargs: Any
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/_configuration.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/_configuration.py
index e646eef1aee2..f2e4e262bf48 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/_configuration.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/_configuration.py
@@ -14,11 +14,10 @@
from .._version import VERSION
if TYPE_CHECKING:
- # pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials_async import AsyncTokenCredential
-class AutomationClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
+class AutomationClientConfiguration: # pylint: disable=too-many-instance-attributes
"""Configuration for AutomationClient.
Note that all parameters used to create this instance are saved as instance
@@ -29,9 +28,14 @@ class AutomationClientConfiguration: # pylint: disable=too-many-instance-attrib
:param subscription_id: Gets subscription credentials which uniquely identify Microsoft Azure
subscription. The subscription ID forms part of the URI for every service call. Required.
:type subscription_id: str
+ :keyword api_version: Api Version. Default value is "2024-10-23". 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:
+ api_version: str = kwargs.pop("api_version", "2024-10-23")
+
if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
if subscription_id is None:
@@ -39,6 +43,7 @@ def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **k
self.credential = credential
self.subscription_id = subscription_id
+ self.api_version = api_version
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
kwargs.setdefault("sdk_moniker", "mgmt-automation/{}".format(VERSION))
self.polling_interval = kwargs.get("polling_interval", 30)
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/_vendor.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/_vendor.py
index 275e83ccb7e0..8ffcba772cfb 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/_vendor.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/_vendor.py
@@ -11,7 +11,6 @@
from ._configuration import AutomationClientConfiguration
if TYPE_CHECKING:
- # pylint: disable=unused-import,ungrouped-imports
from azure.core import AsyncPipelineClient
from .._serialization import Deserializer, Serializer
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/__init__.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/__init__.py
index ceadd5d1de73..46ebbfa5f78c 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/__init__.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/__init__.py
@@ -5,72 +5,73 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
+# pylint: disable=wrong-import-position
-from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations
-from ._private_link_resources_operations import PrivateLinkResourcesOperations
-from ._agent_registration_information_operations import AgentRegistrationInformationOperations
-from ._dsc_node_operations import DscNodeOperations
-from ._node_reports_operations import NodeReportsOperations
-from ._dsc_compilation_job_operations import DscCompilationJobOperations
-from ._dsc_compilation_job_stream_operations import DscCompilationJobStreamOperations
-from ._node_count_information_operations import NodeCountInformationOperations
-from ._watcher_operations import WatcherOperations
-from ._software_update_configurations_operations import SoftwareUpdateConfigurationsOperations
-from ._webhook_operations import WebhookOperations
-from ._deleted_automation_accounts_operations import DeletedAutomationAccountsOperations
-from ._automation_account_operations import AutomationAccountOperations
-from ._statistics_operations import StatisticsOperations
-from ._usages_operations import UsagesOperations
-from ._keys_operations import KeysOperations
-from ._certificate_operations import CertificateOperations
-from ._connection_operations import ConnectionOperations
-from ._connection_type_operations import ConnectionTypeOperations
-from ._credential_operations import CredentialOperations
-from ._dsc_configuration_operations import DscConfigurationOperations
-from ._dsc_node_configuration_operations import DscNodeConfigurationOperations
-from ._hybrid_runbook_workers_operations import HybridRunbookWorkersOperations
-from ._hybrid_runbook_worker_group_operations import HybridRunbookWorkerGroupOperations
-from ._job_operations import JobOperations
-from ._job_stream_operations import JobStreamOperations
-from ._job_schedule_operations import JobScheduleOperations
-from ._linked_workspace_operations import LinkedWorkspaceOperations
-from ._activity_operations import ActivityOperations
-from ._module_operations import ModuleOperations
-from ._object_data_types_operations import ObjectDataTypesOperations
-from ._fields_operations import FieldsOperations
-from ._operations import Operations
-from ._automation_client_operations import AutomationClientOperationsMixin
-from ._python2_package_operations import Python2PackageOperations
-from ._python3_package_operations import Python3PackageOperations
-from ._runbook_draft_operations import RunbookDraftOperations
-from ._runbook_operations import RunbookOperations
-from ._test_job_streams_operations import TestJobStreamsOperations
-from ._test_job_operations import TestJobOperations
-from ._schedule_operations import ScheduleOperations
-from ._software_update_configuration_machine_runs_operations import SoftwareUpdateConfigurationMachineRunsOperations
-from ._software_update_configuration_runs_operations import SoftwareUpdateConfigurationRunsOperations
-from ._source_control_operations import SourceControlOperations
-from ._source_control_sync_job_operations import SourceControlSyncJobOperations
-from ._source_control_sync_job_streams_operations import SourceControlSyncJobStreamsOperations
-from ._variable_operations import VariableOperations
+from typing import TYPE_CHECKING
+
+if TYPE_CHECKING:
+ from ._patch import * # pylint: disable=unused-wildcard-import
+
+from ._node_count_information_operations import NodeCountInformationOperations # type: ignore
+from ._software_update_configurations_operations import SoftwareUpdateConfigurationsOperations # type: ignore
+from ._deleted_automation_accounts_operations import DeletedAutomationAccountsOperations # type: ignore
+from ._private_link_resources_operations import PrivateLinkResourcesOperations # type: ignore
+from ._agent_registration_information_operations import AgentRegistrationInformationOperations # type: ignore
+from ._dsc_node_operations import DscNodeOperations # type: ignore
+from ._node_reports_operations import NodeReportsOperations # type: ignore
+from ._automation_account_operations import AutomationAccountOperations # type: ignore
+from ._statistics_operations import StatisticsOperations # type: ignore
+from ._usages_operations import UsagesOperations # type: ignore
+from ._keys_operations import KeysOperations # type: ignore
+from ._certificate_operations import CertificateOperations # type: ignore
+from ._connection_operations import ConnectionOperations # type: ignore
+from ._connection_type_operations import ConnectionTypeOperations # type: ignore
+from ._credential_operations import CredentialOperations # type: ignore
+from ._dsc_configuration_operations import DscConfigurationOperations # type: ignore
+from ._dsc_node_configuration_operations import DscNodeConfigurationOperations # type: ignore
+from ._hybrid_runbook_workers_operations import HybridRunbookWorkersOperations # type: ignore
+from ._hybrid_runbook_worker_group_operations import HybridRunbookWorkerGroupOperations # type: ignore
+from ._job_operations import JobOperations # type: ignore
+from ._job_stream_operations import JobStreamOperations # type: ignore
+from ._job_schedule_operations import JobScheduleOperations # type: ignore
+from ._linked_workspace_operations import LinkedWorkspaceOperations # type: ignore
+from ._activity_operations import ActivityOperations # type: ignore
+from ._module_operations import ModuleOperations # type: ignore
+from ._object_data_types_operations import ObjectDataTypesOperations # type: ignore
+from ._fields_operations import FieldsOperations # type: ignore
+from ._operations import Operations # type: ignore
+from ._automation_client_operations import AutomationClientOperationsMixin # type: ignore
+from ._package_operations import PackageOperations # type: ignore
+from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations # type: ignore
+from ._python2_package_operations import Python2PackageOperations # type: ignore
+from ._python3_package_operations import Python3PackageOperations # type: ignore
+from ._runbook_draft_operations import RunbookDraftOperations # type: ignore
+from ._runbook_operations import RunbookOperations # type: ignore
+from ._test_job_streams_operations import TestJobStreamsOperations # type: ignore
+from ._test_job_operations import TestJobOperations # type: ignore
+from ._runtime_environments_operations import RuntimeEnvironmentsOperations # type: ignore
+from ._schedule_operations import ScheduleOperations # type: ignore
+from ._software_update_configuration_machine_runs_operations import SoftwareUpdateConfigurationMachineRunsOperations # type: ignore
+from ._software_update_configuration_runs_operations import SoftwareUpdateConfigurationRunsOperations # type: ignore
+from ._source_control_operations import SourceControlOperations # type: ignore
+from ._source_control_sync_job_operations import SourceControlSyncJobOperations # type: ignore
+from ._source_control_sync_job_streams_operations import SourceControlSyncJobStreamsOperations # type: ignore
+from ._variable_operations import VariableOperations # type: ignore
+from ._watcher_operations import WatcherOperations # type: ignore
+from ._webhook_operations import WebhookOperations # type: ignore
from ._patch import __all__ as _patch_all
-from ._patch import * # pylint: disable=unused-wildcard-import
+from ._patch import *
from ._patch import patch_sdk as _patch_sdk
__all__ = [
- "PrivateEndpointConnectionsOperations",
+ "NodeCountInformationOperations",
+ "SoftwareUpdateConfigurationsOperations",
+ "DeletedAutomationAccountsOperations",
"PrivateLinkResourcesOperations",
"AgentRegistrationInformationOperations",
"DscNodeOperations",
"NodeReportsOperations",
- "DscCompilationJobOperations",
- "DscCompilationJobStreamOperations",
- "NodeCountInformationOperations",
- "WatcherOperations",
- "SoftwareUpdateConfigurationsOperations",
- "WebhookOperations",
- "DeletedAutomationAccountsOperations",
"AutomationAccountOperations",
"StatisticsOperations",
"UsagesOperations",
@@ -93,12 +94,15 @@
"FieldsOperations",
"Operations",
"AutomationClientOperationsMixin",
+ "PackageOperations",
+ "PrivateEndpointConnectionsOperations",
"Python2PackageOperations",
"Python3PackageOperations",
"RunbookDraftOperations",
"RunbookOperations",
"TestJobStreamsOperations",
"TestJobOperations",
+ "RuntimeEnvironmentsOperations",
"ScheduleOperations",
"SoftwareUpdateConfigurationMachineRunsOperations",
"SoftwareUpdateConfigurationRunsOperations",
@@ -106,6 +110,8 @@
"SourceControlSyncJobOperations",
"SourceControlSyncJobStreamsOperations",
"VariableOperations",
+ "WatcherOperations",
+ "WebhookOperations",
]
-__all__.extend([p for p in _patch_all if p not in __all__])
+__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
_patch_sdk()
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_activity_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_activity_operations.py
index eab8810e54b9..64fcd8f6eecb 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_activity_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_activity_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,8 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar
+from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar
+import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import (
@@ -31,7 +31,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -81,7 +81,7 @@ async def get(
:rtype: ~azure.mgmt.automation.models.Activity
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -92,7 +92,7 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.Activity] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -148,10 +148,10 @@ def list_by_module(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ActivityListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -174,7 +174,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_agent_registration_information_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_agent_registration_information_operations.py
index 564d0552c687..f517ba1d2cb2 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_agent_registration_information_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_agent_registration_information_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload
+from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -30,7 +29,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -71,7 +70,7 @@ async def get(
:rtype: ~azure.mgmt.automation.models.AgentRegistration
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -82,7 +81,7 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.AgentRegistration] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -197,7 +196,7 @@ async def regenerate_key(
:rtype: ~azure.mgmt.automation.models.AgentRegistration
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -208,7 +207,7 @@ async def regenerate_key(
_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", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.AgentRegistration] = kwargs.pop("cls", None)
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_automation_account_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_automation_account_operations.py
index bc619402d3fb..d4f4d3a610b4 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_automation_account_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_automation_account_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,8 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload
+from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload
+import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import (
@@ -32,6 +32,7 @@
build_delete_request,
build_get_request,
build_list_by_resource_group_request,
+ build_list_deleted_runbooks_request,
build_list_request,
build_update_request,
)
@@ -39,7 +40,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -145,7 +146,7 @@ async def update(
:rtype: ~azure.mgmt.automation.models.AutomationAccount
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -156,7 +157,7 @@ async def update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.AutomationAccount] = kwargs.pop("cls", None)
@@ -283,7 +284,7 @@ async def create_or_update(
:rtype: ~azure.mgmt.automation.models.AutomationAccount
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -294,7 +295,7 @@ async def create_or_update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.AutomationAccount] = kwargs.pop("cls", None)
@@ -339,9 +340,7 @@ async def create_or_update(
return deserialized # type: ignore
@distributed_trace_async
- async def delete( # pylint: disable=inconsistent-return-statements
- self, resource_group_name: str, automation_account_name: str, **kwargs: Any
- ) -> None:
+ async def delete(self, resource_group_name: str, automation_account_name: str, **kwargs: Any) -> None:
"""Delete an automation account.
.. seealso::
@@ -355,7 +354,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -366,7 +365,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_delete_request(
@@ -411,7 +410,7 @@ async def get(
:rtype: ~azure.mgmt.automation.models.AutomationAccount
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -422,7 +421,7 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.AutomationAccount] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -473,10 +472,10 @@ def list_by_resource_group(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.AutomationAccountListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -497,7 +496,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
@@ -541,10 +551,10 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.AutomationAccount"]:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.AutomationAccountListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -564,7 +574,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
@@ -593,3 +614,86 @@ async def get_next(next_link=None):
return pipeline_response
return AsyncItemPaged(get_next, extract_data)
+
+ @distributed_trace
+ def list_deleted_runbooks(
+ self, resource_group_name: str, automation_account_name: str, **kwargs: Any
+ ) -> AsyncIterable["_models.DeletedRunbook"]:
+ """Retrieve the deleted runbooks for an automation account.
+
+ :param resource_group_name: Name of an Azure Resource group. Required.
+ :type resource_group_name: str
+ :param automation_account_name: The name of the automation account. Required.
+ :type automation_account_name: str
+ :return: An iterator like instance of either DeletedRunbook or the result of cls(response)
+ :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.automation.models.DeletedRunbook]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _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[_models.DeletedRunbookListResult] = kwargs.pop("cls", None)
+
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ def prepare_request(next_link=None):
+ if not next_link:
+
+ _request = build_list_deleted_runbooks_request(
+ resource_group_name=resource_group_name,
+ automation_account_name=automation_account_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ else:
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
+ _request.url = self._client.format_url(_request.url)
+ _request.method = "GET"
+ return _request
+
+ async def extract_data(pipeline_response):
+ deserialized = self._deserialize("DeletedRunbookListResult", pipeline_response)
+ list_of_elem = deserialized.value
+ if cls:
+ list_of_elem = cls(list_of_elem) # type: ignore
+ return deserialized.next_link or None, AsyncList(list_of_elem)
+
+ async def get_next(next_link=None):
+ _request = prepare_request(next_link)
+
+ _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.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return AsyncItemPaged(get_next, extract_data)
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_automation_client_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_automation_client_operations.py
index 201b4d34c99e..e01463cf67b7 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_automation_client_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_automation_client_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload
+from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -31,7 +30,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -111,7 +110,7 @@ async def convert_graph_runbook_content(
:rtype: ~azure.mgmt.automation.models.GraphicalRunbookContent
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -122,7 +121,7 @@ async def convert_graph_runbook_content(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.GraphicalRunbookContent] = kwargs.pop("cls", None)
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_certificate_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_certificate_operations.py
index 7cc02325d85b..3c2f44931bd1 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_certificate_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_certificate_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,8 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload
+from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload
+import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import (
@@ -38,7 +38,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -63,7 +63,7 @@ def __init__(self, *args, **kwargs) -> None:
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
@distributed_trace_async
- async def delete( # pylint: disable=inconsistent-return-statements
+ async def delete(
self, resource_group_name: str, automation_account_name: str, certificate_name: str, **kwargs: Any
) -> None:
"""Delete the certificate.
@@ -81,7 +81,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -92,7 +92,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_delete_request(
@@ -140,7 +140,7 @@ async def get(
:rtype: ~azure.mgmt.automation.models.Certificate
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -151,7 +151,7 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.Certificate] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -281,7 +281,7 @@ async def create_or_update(
:rtype: ~azure.mgmt.automation.models.Certificate
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -292,7 +292,7 @@ async def create_or_update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Certificate] = kwargs.pop("cls", None)
@@ -428,7 +428,7 @@ async def update(
:rtype: ~azure.mgmt.automation.models.Certificate
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -439,7 +439,7 @@ async def update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Certificate] = kwargs.pop("cls", None)
@@ -504,10 +504,10 @@ def list_by_automation_account(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.CertificateListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -529,7 +529,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_connection_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_connection_operations.py
index b6574d8f02f3..b726ad87b9ce 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_connection_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_connection_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,8 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload
+from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload
+import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import (
@@ -38,7 +38,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -63,7 +63,7 @@ def __init__(self, *args, **kwargs) -> None:
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
@distributed_trace_async
- async def delete( # pylint: disable=inconsistent-return-statements
+ async def delete(
self, resource_group_name: str, automation_account_name: str, connection_name: str, **kwargs: Any
) -> None:
"""Delete the connection.
@@ -81,7 +81,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -92,7 +92,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_delete_request(
@@ -140,7 +140,7 @@ async def get(
:rtype: ~azure.mgmt.automation.models.Connection
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -151,7 +151,7 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.Connection] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -280,7 +280,7 @@ async def create_or_update(
:rtype: ~azure.mgmt.automation.models.Connection
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -291,7 +291,7 @@ async def create_or_update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Connection] = kwargs.pop("cls", None)
@@ -427,7 +427,7 @@ async def update(
:rtype: ~azure.mgmt.automation.models.Connection
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -438,7 +438,7 @@ async def update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Connection] = kwargs.pop("cls", None)
@@ -503,10 +503,10 @@ def list_by_automation_account(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ConnectionListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -528,7 +528,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_connection_type_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_connection_type_operations.py
index ed99e229ea26..a88039338517 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_connection_type_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_connection_type_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,8 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload
+from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload
+import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import (
@@ -37,7 +37,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -62,7 +62,7 @@ def __init__(self, *args, **kwargs) -> None:
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
@distributed_trace_async
- async def delete( # pylint: disable=inconsistent-return-statements
+ async def delete(
self, resource_group_name: str, automation_account_name: str, connection_type_name: str, **kwargs: Any
) -> None:
"""Delete the connection type.
@@ -80,7 +80,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -91,7 +91,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_delete_request(
@@ -139,7 +139,7 @@ async def get(
:rtype: ~azure.mgmt.automation.models.ConnectionType
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -150,7 +150,7 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ConnectionType] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -280,7 +280,7 @@ async def create_or_update(
:rtype: ~azure.mgmt.automation.models.ConnectionType
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -291,7 +291,7 @@ async def create_or_update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.ConnectionType] = kwargs.pop("cls", None)
@@ -356,10 +356,10 @@ def list_by_automation_account(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ConnectionTypeListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -381,7 +381,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_credential_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_credential_operations.py
index 179c573a20b4..01886a23da23 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_credential_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_credential_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,8 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload
+from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload
+import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import (
@@ -38,7 +38,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -63,7 +63,7 @@ def __init__(self, *args, **kwargs) -> None:
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
@distributed_trace_async
- async def delete( # pylint: disable=inconsistent-return-statements
+ async def delete(
self, resource_group_name: str, automation_account_name: str, credential_name: str, **kwargs: Any
) -> None:
"""Delete the credential.
@@ -81,7 +81,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -92,7 +92,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_delete_request(
@@ -140,7 +140,7 @@ async def get(
:rtype: ~azure.mgmt.automation.models.Credential
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -151,7 +151,7 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.Credential] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -280,7 +280,7 @@ async def create_or_update(
:rtype: ~azure.mgmt.automation.models.Credential
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -291,7 +291,7 @@ async def create_or_update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Credential] = kwargs.pop("cls", None)
@@ -427,7 +427,7 @@ async def update(
:rtype: ~azure.mgmt.automation.models.Credential
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -438,7 +438,7 @@ async def update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Credential] = kwargs.pop("cls", None)
@@ -503,10 +503,10 @@ def list_by_automation_account(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.CredentialListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -528,7 +528,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_deleted_automation_accounts_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_deleted_automation_accounts_operations.py
index ba4c397021c2..1e115fdbf4d8 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_deleted_automation_accounts_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_deleted_automation_accounts_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,7 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, Callable, Dict, Optional, Type, TypeVar
+from typing import Any, Callable, Dict, Optional, TypeVar
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -29,7 +28,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -61,7 +60,7 @@ async def list_by_subscription(self, **kwargs: Any) -> _models.DeletedAutomation
:rtype: ~azure.mgmt.automation.models.DeletedAutomationAccountListResult
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -72,7 +71,7 @@ async def list_by_subscription(self, **kwargs: Any) -> _models.DeletedAutomation
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-01-31"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.DeletedAutomationAccountListResult] = kwargs.pop("cls", None)
_request = build_list_by_subscription_request(
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_compilation_job_stream_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_compilation_job_stream_operations.py
deleted file mode 100644
index f56ebe0fc155..000000000000
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_compilation_job_stream_operations.py
+++ /dev/null
@@ -1,117 +0,0 @@
-# pylint: disable=too-many-lines,too-many-statements
-# 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 sys
-from typing import Any, Callable, Dict, Optional, Type, TypeVar
-
-from azure.core.exceptions import (
- ClientAuthenticationError,
- HttpResponseError,
- ResourceExistsError,
- ResourceNotFoundError,
- ResourceNotModifiedError,
- map_error,
-)
-from azure.core.pipeline import PipelineResponse
-from azure.core.rest import AsyncHttpResponse, 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 ...operations._dsc_compilation_job_stream_operations import build_list_by_job_request
-
-if sys.version_info >= (3, 9):
- from collections.abc import MutableMapping
-else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
-T = TypeVar("T")
-ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
-
-
-class DscCompilationJobStreamOperations:
- """
- .. warning::
- **DO NOT** instantiate this class directly.
-
- Instead, you should access the following operations through
- :class:`~azure.mgmt.automation.aio.AutomationClient`'s
- :attr:`dsc_compilation_job_stream` 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 list_by_job(
- self, resource_group_name: str, automation_account_name: str, job_id: str, **kwargs: Any
- ) -> _models.JobStreamListResult:
- """Retrieve all the job streams for the compilation Job.
-
- .. seealso::
- - http://aka.ms/azureautomationsdk/jobstreamoperations
-
- :param resource_group_name: Name of an Azure Resource group. Required.
- :type resource_group_name: str
- :param automation_account_name: The name of the automation account. Required.
- :type automation_account_name: str
- :param job_id: The job id. Required.
- :type job_id: str
- :return: JobStreamListResult or the result of cls(response)
- :rtype: ~azure.mgmt.automation.models.JobStreamListResult
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
- 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", "2020-01-13-preview"))
- cls: ClsType[_models.JobStreamListResult] = kwargs.pop("cls", None)
-
- _request = build_list_by_job_request(
- resource_group_name=resource_group_name,
- automation_account_name=automation_account_name,
- job_id=job_id,
- subscription_id=self._config.subscription_id,
- api_version=api_version,
- headers=_headers,
- params=_params,
- )
- _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.ErrorResponse, pipeline_response)
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- deserialized = self._deserialize("JobStreamListResult", pipeline_response.http_response)
-
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
-
- return deserialized # type: ignore
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_configuration_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_configuration_operations.py
index 068b7a0b347a..8e40fe610ff2 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_configuration_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_configuration_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,8 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, Optional, Type, TypeVar, Union, overload
+from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, Optional, TypeVar, Union, overload
+import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import (
@@ -40,7 +40,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -65,7 +65,7 @@ def __init__(self, *args, **kwargs) -> None:
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
@distributed_trace_async
- async def delete( # pylint: disable=inconsistent-return-statements
+ async def delete(
self, resource_group_name: str, automation_account_name: str, configuration_name: str, **kwargs: Any
) -> None:
"""Delete the dsc configuration identified by configuration name.
@@ -83,7 +83,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -94,7 +94,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_delete_request(
@@ -142,7 +142,7 @@ async def get(
:rtype: ~azure.mgmt.automation.models.DscConfiguration
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -153,7 +153,7 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.DscConfiguration] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -277,7 +277,7 @@ async def create_or_update(
:rtype: ~azure.mgmt.automation.models.DscConfiguration
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -288,7 +288,7 @@ async def create_or_update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.DscConfiguration] = kwargs.pop("cls", None)
@@ -424,7 +424,7 @@ async def update(
:rtype: ~azure.mgmt.automation.models.DscConfiguration
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -435,7 +435,7 @@ async def update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.DscConfiguration] = kwargs.pop("cls", None)
@@ -505,7 +505,7 @@ async def get_content(
:rtype: AsyncIterator[bytes]
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -516,7 +516,7 @@ async def get_content(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
_request = build_get_content_request(
@@ -588,10 +588,10 @@ def list_by_automation_account(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.DscConfigurationListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -617,7 +617,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_node_configuration_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_node_configuration_operations.py
index d42ec517e739..42e5e83e94e4 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_node_configuration_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_node_configuration_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,8 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
+import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import (
@@ -41,7 +41,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -66,7 +66,7 @@ def __init__(self, *args, **kwargs) -> None:
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
@distributed_trace_async
- async def delete( # pylint: disable=inconsistent-return-statements
+ async def delete(
self, resource_group_name: str, automation_account_name: str, node_configuration_name: str, **kwargs: Any
) -> None:
"""Delete the Dsc node configurations by node configuration.
@@ -84,7 +84,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -95,7 +95,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_delete_request(
@@ -143,7 +143,7 @@ async def get(
:rtype: ~azure.mgmt.automation.models.DscNodeConfiguration
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -154,7 +154,7 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.DscNodeConfiguration] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -195,7 +195,7 @@ async def _create_or_update_initial(
parameters: Union[_models.DscNodeConfigurationCreateOrUpdateParameters, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -206,7 +206,7 @@ async def _create_or_update_initial(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
@@ -354,7 +354,7 @@ async def begin_create_or_update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[None] = kwargs.pop("cls", None)
polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
@@ -436,10 +436,10 @@ def list_by_automation_account(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.DscNodeConfigurationListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -465,7 +465,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_node_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_node_operations.py
index f6e455617b6a..0490b92cf623 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_node_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_node_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,8 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload
+from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload
+import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import (
@@ -37,7 +37,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -62,9 +62,7 @@ def __init__(self, *args, **kwargs) -> None:
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
@distributed_trace_async
- async def delete( # pylint: disable=inconsistent-return-statements
- self, resource_group_name: str, automation_account_name: str, node_id: str, **kwargs: Any
- ) -> None:
+ async def delete(self, resource_group_name: str, automation_account_name: str, node_id: str, **kwargs: Any) -> None:
"""Delete the dsc node identified by node id.
.. seealso::
@@ -80,7 +78,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -91,7 +89,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_delete_request(
@@ -139,7 +137,7 @@ async def get(
:rtype: ~azure.mgmt.automation.models.DscNode
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -150,7 +148,7 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.DscNode] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -275,7 +273,7 @@ async def update(
:rtype: ~azure.mgmt.automation.models.DscNode
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -286,7 +284,7 @@ async def update(
_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", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.DscNode] = kwargs.pop("cls", None)
@@ -366,10 +364,10 @@ def list_by_automation_account(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.DscNodeListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -395,7 +393,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_fields_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_fields_operations.py
index 67d8594cfb41..efb5d136d521 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_fields_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_fields_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,8 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar
+from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar
+import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import (
@@ -30,7 +30,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -78,10 +78,10 @@ def list_by_type(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.TypeFieldListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -105,7 +105,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_hybrid_runbook_worker_group_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_hybrid_runbook_worker_group_operations.py
index 8bd6cf59cf4b..597df7f3909b 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_hybrid_runbook_worker_group_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_hybrid_runbook_worker_group_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,8 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload
+from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload
+import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import (
@@ -38,7 +38,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -63,7 +63,7 @@ def __init__(self, *args, **kwargs) -> None:
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
@distributed_trace_async
- async def delete( # pylint: disable=inconsistent-return-statements
+ async def delete(
self,
resource_group_name: str,
automation_account_name: str,
@@ -85,7 +85,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -96,7 +96,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_delete_request(
@@ -148,7 +148,7 @@ async def get(
:rtype: ~azure.mgmt.automation.models.HybridRunbookWorkerGroup
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -159,7 +159,7 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.HybridRunbookWorkerGroup] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -290,7 +290,7 @@ async def create(
:rtype: ~azure.mgmt.automation.models.HybridRunbookWorkerGroup
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -301,7 +301,7 @@ async def create(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.HybridRunbookWorkerGroup] = kwargs.pop("cls", None)
@@ -445,7 +445,7 @@ async def update(
:rtype: ~azure.mgmt.automation.models.HybridRunbookWorkerGroup
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -456,7 +456,7 @@ async def update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.HybridRunbookWorkerGroup] = kwargs.pop("cls", None)
@@ -527,10 +527,10 @@ def list_by_automation_account(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.HybridRunbookWorkerGroupsListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -553,7 +553,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_hybrid_runbook_workers_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_hybrid_runbook_workers_operations.py
index 0d698bd49231..dadc7fb13318 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_hybrid_runbook_workers_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_hybrid_runbook_workers_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,8 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload
+from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload
+import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import (
@@ -33,12 +33,13 @@
build_get_request,
build_list_by_hybrid_runbook_worker_group_request,
build_move_request,
+ build_patch_request,
)
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -63,7 +64,7 @@ def __init__(self, *args, **kwargs) -> None:
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
@distributed_trace_async
- async def delete( # pylint: disable=inconsistent-return-statements
+ async def delete(
self,
resource_group_name: str,
automation_account_name: str,
@@ -88,7 +89,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -99,7 +100,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_delete_request(
@@ -155,7 +156,7 @@ async def get(
:rtype: ~azure.mgmt.automation.models.HybridRunbookWorker
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -166,7 +167,7 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.HybridRunbookWorker] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -305,7 +306,7 @@ async def create(
:rtype: ~azure.mgmt.automation.models.HybridRunbookWorker
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -316,7 +317,7 @@ async def create(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.HybridRunbookWorker] = kwargs.pop("cls", None)
@@ -365,7 +366,176 @@ async def create(
return deserialized # type: ignore
@overload
- async def move( # pylint: disable=inconsistent-return-statements
+ async def patch(
+ self,
+ resource_group_name: str,
+ automation_account_name: str,
+ hybrid_runbook_worker_group_name: str,
+ hybrid_runbook_worker_id: str,
+ hybrid_runbook_worker_creation_parameters: Optional[_models.HybridRunbookWorkerCreateParameters] = None,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> _models.HybridRunbookWorker:
+ """Update a hybrid runbook worker.
+
+ .. seealso::
+ - http://aka.ms/azureautomationsdk/hybridrunbookworkeroperations
+
+ :param resource_group_name: Name of an Azure Resource group. Required.
+ :type resource_group_name: str
+ :param automation_account_name: The name of the automation account. Required.
+ :type automation_account_name: str
+ :param hybrid_runbook_worker_group_name: The hybrid runbook worker group name. Required.
+ :type hybrid_runbook_worker_group_name: str
+ :param hybrid_runbook_worker_id: The hybrid runbook worker id. Required.
+ :type hybrid_runbook_worker_id: str
+ :param hybrid_runbook_worker_creation_parameters: The create or update parameters for hybrid
+ runbook worker. Default value is None.
+ :type hybrid_runbook_worker_creation_parameters:
+ ~azure.mgmt.automation.models.HybridRunbookWorkerCreateParameters
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: HybridRunbookWorker or the result of cls(response)
+ :rtype: ~azure.mgmt.automation.models.HybridRunbookWorker
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @overload
+ async def patch(
+ self,
+ resource_group_name: str,
+ automation_account_name: str,
+ hybrid_runbook_worker_group_name: str,
+ hybrid_runbook_worker_id: str,
+ hybrid_runbook_worker_creation_parameters: Optional[IO[bytes]] = None,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> _models.HybridRunbookWorker:
+ """Update a hybrid runbook worker.
+
+ .. seealso::
+ - http://aka.ms/azureautomationsdk/hybridrunbookworkeroperations
+
+ :param resource_group_name: Name of an Azure Resource group. Required.
+ :type resource_group_name: str
+ :param automation_account_name: The name of the automation account. Required.
+ :type automation_account_name: str
+ :param hybrid_runbook_worker_group_name: The hybrid runbook worker group name. Required.
+ :type hybrid_runbook_worker_group_name: str
+ :param hybrid_runbook_worker_id: The hybrid runbook worker id. Required.
+ :type hybrid_runbook_worker_id: str
+ :param hybrid_runbook_worker_creation_parameters: The create or update parameters for hybrid
+ runbook worker. Default value is None.
+ :type hybrid_runbook_worker_creation_parameters: IO[bytes]
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: HybridRunbookWorker or the result of cls(response)
+ :rtype: ~azure.mgmt.automation.models.HybridRunbookWorker
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @distributed_trace_async
+ async def patch(
+ self,
+ resource_group_name: str,
+ automation_account_name: str,
+ hybrid_runbook_worker_group_name: str,
+ hybrid_runbook_worker_id: str,
+ hybrid_runbook_worker_creation_parameters: Optional[
+ Union[_models.HybridRunbookWorkerCreateParameters, IO[bytes]]
+ ] = None,
+ **kwargs: Any
+ ) -> _models.HybridRunbookWorker:
+ """Update a hybrid runbook worker.
+
+ .. seealso::
+ - http://aka.ms/azureautomationsdk/hybridrunbookworkeroperations
+
+ :param resource_group_name: Name of an Azure Resource group. Required.
+ :type resource_group_name: str
+ :param automation_account_name: The name of the automation account. Required.
+ :type automation_account_name: str
+ :param hybrid_runbook_worker_group_name: The hybrid runbook worker group name. Required.
+ :type hybrid_runbook_worker_group_name: str
+ :param hybrid_runbook_worker_id: The hybrid runbook worker id. Required.
+ :type hybrid_runbook_worker_id: str
+ :param hybrid_runbook_worker_creation_parameters: The create or update parameters for hybrid
+ runbook worker. Is either a HybridRunbookWorkerCreateParameters type or a IO[bytes] type.
+ Default value is None.
+ :type hybrid_runbook_worker_creation_parameters:
+ ~azure.mgmt.automation.models.HybridRunbookWorkerCreateParameters or IO[bytes]
+ :return: HybridRunbookWorker or the result of cls(response)
+ :rtype: ~azure.mgmt.automation.models.HybridRunbookWorker
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ _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", self._config.api_version))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ cls: ClsType[_models.HybridRunbookWorker] = kwargs.pop("cls", None)
+
+ content_type = content_type or "application/json"
+ _json = None
+ _content = None
+ if isinstance(hybrid_runbook_worker_creation_parameters, (IOBase, bytes)):
+ _content = hybrid_runbook_worker_creation_parameters
+ else:
+ if hybrid_runbook_worker_creation_parameters is not None:
+ _json = self._serialize.body(
+ hybrid_runbook_worker_creation_parameters, "HybridRunbookWorkerCreateParameters"
+ )
+ else:
+ _json = None
+
+ _request = build_patch_request(
+ resource_group_name=resource_group_name,
+ automation_account_name=automation_account_name,
+ hybrid_runbook_worker_group_name=hybrid_runbook_worker_group_name,
+ hybrid_runbook_worker_id=hybrid_runbook_worker_id,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ content_type=content_type,
+ json=_json,
+ content=_content,
+ headers=_headers,
+ params=_params,
+ )
+ _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.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize("HybridRunbookWorker", pipeline_response.http_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+
+ return deserialized # type: ignore
+
+ @overload
+ async def move(
self,
resource_group_name: str,
automation_account_name: str,
@@ -402,7 +572,7 @@ async def move( # pylint: disable=inconsistent-return-statements
"""
@overload
- async def move( # pylint: disable=inconsistent-return-statements
+ async def move(
self,
resource_group_name: str,
automation_account_name: str,
@@ -438,7 +608,7 @@ async def move( # pylint: disable=inconsistent-return-statements
"""
@distributed_trace_async
- async def move( # pylint: disable=inconsistent-return-statements
+ async def move(
self,
resource_group_name: str,
automation_account_name: str,
@@ -468,7 +638,7 @@ async def move( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -479,7 +649,7 @@ async def move( # pylint: disable=inconsistent-return-statements
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[None] = kwargs.pop("cls", None)
@@ -551,10 +721,10 @@ def list_by_hybrid_runbook_worker_group(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.HybridRunbookWorkersListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -578,7 +748,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_job_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_job_operations.py
index 11887b633601..6f0047f947e7 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_job_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_job_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,8 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload
+from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload
+import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import (
@@ -41,7 +41,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -91,7 +91,7 @@ async def get_output(
:rtype: str
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -102,7 +102,7 @@ async def get_output(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[str] = kwargs.pop("cls", None)
_request = build_get_output_request(
@@ -161,7 +161,7 @@ async def get_runbook_content(
:rtype: str
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -172,7 +172,7 @@ async def get_runbook_content(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[str] = kwargs.pop("cls", None)
_request = build_get_runbook_content_request(
@@ -206,7 +206,7 @@ async def get_runbook_content(
return deserialized # type: ignore
@distributed_trace_async
- async def suspend( # pylint: disable=inconsistent-return-statements
+ async def suspend(
self,
resource_group_name: str,
automation_account_name: str,
@@ -231,7 +231,7 @@ async def suspend( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -242,7 +242,7 @@ async def suspend( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_suspend_request(
@@ -273,7 +273,7 @@ async def suspend( # pylint: disable=inconsistent-return-statements
return cls(pipeline_response, None, {}) # type: ignore
@distributed_trace_async
- async def stop( # pylint: disable=inconsistent-return-statements
+ async def stop(
self,
resource_group_name: str,
automation_account_name: str,
@@ -298,7 +298,7 @@ async def stop( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -309,7 +309,7 @@ async def stop( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_stop_request(
@@ -365,7 +365,7 @@ async def get(
:rtype: ~azure.mgmt.automation.models.Job
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -376,7 +376,7 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.Job] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -510,7 +510,7 @@ async def create(
:rtype: ~azure.mgmt.automation.models.Job
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -521,7 +521,7 @@ async def create(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Job] = kwargs.pop("cls", None)
@@ -597,10 +597,10 @@ def list_by_automation_account(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.JobListResultV2] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -624,7 +624,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
@@ -655,7 +666,7 @@ async def get_next(next_link=None):
return AsyncItemPaged(get_next, extract_data)
@distributed_trace_async
- async def resume( # pylint: disable=inconsistent-return-statements
+ async def resume(
self,
resource_group_name: str,
automation_account_name: str,
@@ -680,7 +691,7 @@ async def resume( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -691,7 +702,7 @@ async def resume( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_resume_request(
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_job_schedule_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_job_schedule_operations.py
index 178b6d10339a..ee8a13650b41 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_job_schedule_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_job_schedule_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,8 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload
+from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload
+import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import (
@@ -37,7 +37,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -62,7 +62,7 @@ def __init__(self, *args, **kwargs) -> None:
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
@distributed_trace_async
- async def delete( # pylint: disable=inconsistent-return-statements
+ async def delete(
self, resource_group_name: str, automation_account_name: str, job_schedule_id: str, **kwargs: Any
) -> None:
"""Delete the job schedule identified by job schedule name.
@@ -80,7 +80,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -91,7 +91,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_delete_request(
@@ -139,7 +139,7 @@ async def get(
:rtype: ~azure.mgmt.automation.models.JobSchedule
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -150,7 +150,7 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.JobSchedule] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -274,7 +274,7 @@ async def create(
:rtype: ~azure.mgmt.automation.models.JobSchedule
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -285,7 +285,7 @@ async def create(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.JobSchedule] = kwargs.pop("cls", None)
@@ -352,10 +352,10 @@ def list_by_automation_account(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.JobScheduleListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -378,7 +378,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_job_stream_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_job_stream_operations.py
index 3fc94e5dc8e8..ede2e12bbd71 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_job_stream_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_job_stream_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,8 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar
+from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar
+import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import (
@@ -31,7 +31,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -84,7 +84,7 @@ async def get(
:rtype: ~azure.mgmt.automation.models.JobStream
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -95,7 +95,7 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.JobStream] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -162,10 +162,10 @@ def list_by_job(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.JobStreamListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -190,7 +190,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_keys_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_keys_operations.py
index 9a4e13ea71a0..43e04b84b7d2 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_keys_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_keys_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,7 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, Callable, Dict, Optional, Type, TypeVar
+from typing import Any, Callable, Dict, Optional, TypeVar
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -29,7 +28,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -67,7 +66,7 @@ async def list_by_automation_account(
:rtype: ~azure.mgmt.automation.models.KeyListResult
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -78,7 +77,7 @@ async def list_by_automation_account(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.KeyListResult] = kwargs.pop("cls", None)
_request = build_list_by_automation_account_request(
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_linked_workspace_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_linked_workspace_operations.py
index 15f368f225f0..f394e6abef67 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_linked_workspace_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_linked_workspace_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,7 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, Callable, Dict, Optional, Type, TypeVar
+from typing import Any, Callable, Dict, Optional, TypeVar
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -29,7 +28,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -70,7 +69,7 @@ async def get(
:rtype: ~azure.mgmt.automation.models.LinkedWorkspace
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -81,7 +80,7 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.LinkedWorkspace] = kwargs.pop("cls", None)
_request = build_get_request(
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_module_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_module_operations.py
index 5af04c53f7a4..602bfac1b6f1 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_module_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_module_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,8 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload
+from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload
+import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import (
@@ -38,7 +38,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -63,7 +63,7 @@ def __init__(self, *args, **kwargs) -> None:
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
@distributed_trace_async
- async def delete( # pylint: disable=inconsistent-return-statements
+ async def delete(
self, resource_group_name: str, automation_account_name: str, module_name: str, **kwargs: Any
) -> None:
"""Delete the module by name.
@@ -81,7 +81,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -92,7 +92,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_delete_request(
@@ -140,7 +140,7 @@ async def get(
:rtype: ~azure.mgmt.automation.models.Module
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -151,7 +151,7 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.Module] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -275,7 +275,7 @@ async def create_or_update(
:rtype: ~azure.mgmt.automation.models.Module
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -286,7 +286,7 @@ async def create_or_update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Module] = kwargs.pop("cls", None)
@@ -422,7 +422,7 @@ async def update(
:rtype: ~azure.mgmt.automation.models.Module
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -433,7 +433,7 @@ async def update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Module] = kwargs.pop("cls", None)
@@ -498,10 +498,10 @@ def list_by_automation_account(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ModuleListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -523,7 +523,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_node_count_information_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_node_count_information_operations.py
index a1b57eba0371..36ceaed95601 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_node_count_information_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_node_count_information_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,7 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, Callable, Dict, Optional, Type, TypeVar, Union
+from typing import Any, Callable, Dict, Optional, TypeVar, Union
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -29,7 +28,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -77,7 +76,7 @@ async def get(
:rtype: ~azure.mgmt.automation.models.NodeCounts
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -88,7 +87,7 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.NodeCounts] = kwargs.pop("cls", None)
_request = build_get_request(
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_node_reports_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_node_reports_operations.py
index 462804d95350..08497def5eff 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_node_reports_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_node_reports_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,8 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar
+from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar
+import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import (
@@ -35,7 +35,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -89,10 +89,10 @@ def list_by_node(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.DscNodeReportListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -116,7 +116,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
@@ -167,7 +178,7 @@ async def get(
:rtype: ~azure.mgmt.automation.models.DscNodeReport
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -178,7 +189,7 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.DscNodeReport] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -233,7 +244,7 @@ async def get_content(
:rtype: JSON
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -244,7 +255,7 @@ async def get_content(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[JSON] = kwargs.pop("cls", None)
_request = build_get_content_request(
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_object_data_types_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_object_data_types_operations.py
index a31237870262..7413e322b37b 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_object_data_types_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_object_data_types_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,8 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar
+from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar
+import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import (
@@ -33,7 +33,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -81,10 +81,10 @@ def list_fields_by_module_and_type(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.TypeFieldListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -108,7 +108,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
@@ -160,10 +171,10 @@ def list_fields_by_type(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.TypeFieldListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -186,7 +197,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_operations.py
index 30b01b203a50..87e46f9c5f8a 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,8 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar
+from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar
+import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import (
@@ -30,7 +30,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -65,10 +65,10 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -87,7 +87,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_package_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_package_operations.py
new file mode 100644
index 000000000000..ebc1f3cf330c
--- /dev/null
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_package_operations.py
@@ -0,0 +1,605 @@
+# 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 io import IOBase
+import sys
+from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload
+import urllib.parse
+
+from azure.core.async_paging import AsyncItemPaged, AsyncList
+from azure.core.exceptions import (
+ ClientAuthenticationError,
+ HttpResponseError,
+ ResourceExistsError,
+ ResourceNotFoundError,
+ ResourceNotModifiedError,
+ map_error,
+)
+from azure.core.pipeline import PipelineResponse
+from azure.core.rest import AsyncHttpResponse, HttpRequest
+from azure.core.tracing.decorator import distributed_trace
+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 ...operations._package_operations import (
+ build_create_or_update_request,
+ build_delete_request,
+ build_get_request,
+ build_list_by_runtime_environment_request,
+ build_update_request,
+)
+
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore
+T = TypeVar("T")
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
+
+
+class PackageOperations:
+ """
+ .. warning::
+ **DO NOT** instantiate this class directly.
+
+ Instead, you should access the following operations through
+ :class:`~azure.mgmt.automation.aio.AutomationClient`'s
+ :attr:`package` 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 delete(
+ self,
+ resource_group_name: str,
+ automation_account_name: str,
+ runtime_environment_name: str,
+ package_name: str,
+ **kwargs: Any
+ ) -> None:
+ """Delete the package by name.
+
+ .. seealso::
+ - http://aka.ms/azureautomationsdk/packageoperations
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param automation_account_name: The name of the automation account. Required.
+ :type automation_account_name: str
+ :param runtime_environment_name: The name of the Runtime Environment. Required.
+ :type runtime_environment_name: str
+ :param package_name: The Package name. Required.
+ :type package_name: str
+ :return: None or the result of cls(response)
+ :rtype: None
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map: MutableMapping = {
+ 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_delete_request(
+ resource_group_name=resource_group_name,
+ automation_account_name=automation_account_name,
+ runtime_environment_name=runtime_environment_name,
+ package_name=package_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ headers=_headers,
+ params=_params,
+ )
+ _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, 204]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ if cls:
+ return cls(pipeline_response, None, {}) # type: ignore
+
+ @distributed_trace_async
+ async def get(
+ self,
+ resource_group_name: str,
+ automation_account_name: str,
+ runtime_environment_name: str,
+ package_name: str,
+ **kwargs: Any
+ ) -> _models.Package:
+ """Retrieve the Package identified by Package name.
+
+ .. seealso::
+ - http://aka.ms/azureautomationsdk/packageoperations
+
+ :param resource_group_name: Name of an Azure Resource group. Required.
+ :type resource_group_name: str
+ :param automation_account_name: The name of the automation account. Required.
+ :type automation_account_name: str
+ :param runtime_environment_name: The name of the Runtime Environment. Required.
+ :type runtime_environment_name: str
+ :param package_name: The Package name. Required.
+ :type package_name: str
+ :return: Package or the result of cls(response)
+ :rtype: ~azure.mgmt.automation.models.Package
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map: MutableMapping = {
+ 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[_models.Package] = kwargs.pop("cls", None)
+
+ _request = build_get_request(
+ resource_group_name=resource_group_name,
+ automation_account_name=automation_account_name,
+ runtime_environment_name=runtime_environment_name,
+ package_name=package_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ headers=_headers,
+ params=_params,
+ )
+ _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.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize("Package", pipeline_response.http_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+
+ return deserialized # type: ignore
+
+ @overload
+ async def create_or_update(
+ self,
+ resource_group_name: str,
+ automation_account_name: str,
+ runtime_environment_name: str,
+ package_name: str,
+ parameters: _models.PackageCreateOrUpdateParameters,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> _models.Package:
+ """Create or update the package identified by package name.
+
+ .. seealso::
+ - http://aka.ms/azureautomationsdk/packageoperations
+
+ :param resource_group_name: Name of an Azure Resource group. Required.
+ :type resource_group_name: str
+ :param automation_account_name: The name of the automation account. Required.
+ :type automation_account_name: str
+ :param runtime_environment_name: The name of the Runtime Environment. Required.
+ :type runtime_environment_name: str
+ :param package_name: The name of Package. Required.
+ :type package_name: str
+ :param parameters: The create or update parameters for Package. Required.
+ :type parameters: ~azure.mgmt.automation.models.PackageCreateOrUpdateParameters
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: Package or the result of cls(response)
+ :rtype: ~azure.mgmt.automation.models.Package
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @overload
+ async def create_or_update(
+ self,
+ resource_group_name: str,
+ automation_account_name: str,
+ runtime_environment_name: str,
+ package_name: str,
+ parameters: IO[bytes],
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> _models.Package:
+ """Create or update the package identified by package name.
+
+ .. seealso::
+ - http://aka.ms/azureautomationsdk/packageoperations
+
+ :param resource_group_name: Name of an Azure Resource group. Required.
+ :type resource_group_name: str
+ :param automation_account_name: The name of the automation account. Required.
+ :type automation_account_name: str
+ :param runtime_environment_name: The name of the Runtime Environment. Required.
+ :type runtime_environment_name: str
+ :param package_name: The name of Package. Required.
+ :type package_name: str
+ :param parameters: The create or update parameters for Package. Required.
+ :type parameters: IO[bytes]
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: Package or the result of cls(response)
+ :rtype: ~azure.mgmt.automation.models.Package
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @distributed_trace_async
+ async def create_or_update(
+ self,
+ resource_group_name: str,
+ automation_account_name: str,
+ runtime_environment_name: str,
+ package_name: str,
+ parameters: Union[_models.PackageCreateOrUpdateParameters, IO[bytes]],
+ **kwargs: Any
+ ) -> _models.Package:
+ """Create or update the package identified by package name.
+
+ .. seealso::
+ - http://aka.ms/azureautomationsdk/packageoperations
+
+ :param resource_group_name: Name of an Azure Resource group. Required.
+ :type resource_group_name: str
+ :param automation_account_name: The name of the automation account. Required.
+ :type automation_account_name: str
+ :param runtime_environment_name: The name of the Runtime Environment. Required.
+ :type runtime_environment_name: str
+ :param package_name: The name of Package. Required.
+ :type package_name: str
+ :param parameters: The create or update parameters for Package. Is either a
+ PackageCreateOrUpdateParameters type or a IO[bytes] type. Required.
+ :type parameters: ~azure.mgmt.automation.models.PackageCreateOrUpdateParameters or IO[bytes]
+ :return: Package or the result of cls(response)
+ :rtype: ~azure.mgmt.automation.models.Package
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ _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", self._config.api_version))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ cls: ClsType[_models.Package] = kwargs.pop("cls", None)
+
+ content_type = content_type or "application/json"
+ _json = None
+ _content = None
+ if isinstance(parameters, (IOBase, bytes)):
+ _content = parameters
+ else:
+ _json = self._serialize.body(parameters, "PackageCreateOrUpdateParameters")
+
+ _request = build_create_or_update_request(
+ resource_group_name=resource_group_name,
+ automation_account_name=automation_account_name,
+ runtime_environment_name=runtime_environment_name,
+ package_name=package_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ content_type=content_type,
+ json=_json,
+ content=_content,
+ headers=_headers,
+ params=_params,
+ )
+ _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, 201]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize("Package", pipeline_response.http_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+
+ return deserialized # type: ignore
+
+ @overload
+ async def update(
+ self,
+ resource_group_name: str,
+ automation_account_name: str,
+ runtime_environment_name: str,
+ package_name: str,
+ parameters: _models.PackageUpdateParameters,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> _models.Package:
+ """Update the Package identified by Package name.
+
+ .. seealso::
+ - http://aka.ms/azureautomationsdk/packageoperations
+
+ :param resource_group_name: Name of an Azure Resource group. Required.
+ :type resource_group_name: str
+ :param automation_account_name: The name of the automation account. Required.
+ :type automation_account_name: str
+ :param runtime_environment_name: The name of the Runtime Environment. Required.
+ :type runtime_environment_name: str
+ :param package_name: The name of Package. Required.
+ :type package_name: str
+ :param parameters: The update parameters for Package. Required.
+ :type parameters: ~azure.mgmt.automation.models.PackageUpdateParameters
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: Package or the result of cls(response)
+ :rtype: ~azure.mgmt.automation.models.Package
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @overload
+ async def update(
+ self,
+ resource_group_name: str,
+ automation_account_name: str,
+ runtime_environment_name: str,
+ package_name: str,
+ parameters: IO[bytes],
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> _models.Package:
+ """Update the Package identified by Package name.
+
+ .. seealso::
+ - http://aka.ms/azureautomationsdk/packageoperations
+
+ :param resource_group_name: Name of an Azure Resource group. Required.
+ :type resource_group_name: str
+ :param automation_account_name: The name of the automation account. Required.
+ :type automation_account_name: str
+ :param runtime_environment_name: The name of the Runtime Environment. Required.
+ :type runtime_environment_name: str
+ :param package_name: The name of Package. Required.
+ :type package_name: str
+ :param parameters: The update parameters for Package. Required.
+ :type parameters: IO[bytes]
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: Package or the result of cls(response)
+ :rtype: ~azure.mgmt.automation.models.Package
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @distributed_trace_async
+ async def update(
+ self,
+ resource_group_name: str,
+ automation_account_name: str,
+ runtime_environment_name: str,
+ package_name: str,
+ parameters: Union[_models.PackageUpdateParameters, IO[bytes]],
+ **kwargs: Any
+ ) -> _models.Package:
+ """Update the Package identified by Package name.
+
+ .. seealso::
+ - http://aka.ms/azureautomationsdk/packageoperations
+
+ :param resource_group_name: Name of an Azure Resource group. Required.
+ :type resource_group_name: str
+ :param automation_account_name: The name of the automation account. Required.
+ :type automation_account_name: str
+ :param runtime_environment_name: The name of the Runtime Environment. Required.
+ :type runtime_environment_name: str
+ :param package_name: The name of Package. Required.
+ :type package_name: str
+ :param parameters: The update parameters for Package. Is either a PackageUpdateParameters type
+ or a IO[bytes] type. Required.
+ :type parameters: ~azure.mgmt.automation.models.PackageUpdateParameters or IO[bytes]
+ :return: Package or the result of cls(response)
+ :rtype: ~azure.mgmt.automation.models.Package
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ _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", self._config.api_version))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ cls: ClsType[_models.Package] = kwargs.pop("cls", None)
+
+ content_type = content_type or "application/json"
+ _json = None
+ _content = None
+ if isinstance(parameters, (IOBase, bytes)):
+ _content = parameters
+ else:
+ _json = self._serialize.body(parameters, "PackageUpdateParameters")
+
+ _request = build_update_request(
+ resource_group_name=resource_group_name,
+ automation_account_name=automation_account_name,
+ runtime_environment_name=runtime_environment_name,
+ package_name=package_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ content_type=content_type,
+ json=_json,
+ content=_content,
+ headers=_headers,
+ params=_params,
+ )
+ _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.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize("Package", pipeline_response.http_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+
+ return deserialized # type: ignore
+
+ @distributed_trace
+ def list_by_runtime_environment(
+ self, resource_group_name: str, automation_account_name: str, runtime_environment_name: str, **kwargs: Any
+ ) -> AsyncIterable["_models.Package"]:
+ """Retrieve the a list of Packages.
+
+ .. seealso::
+ - http://aka.ms/azureautomationsdk/packageoperations
+
+ :param resource_group_name: Name of an Azure Resource group. Required.
+ :type resource_group_name: str
+ :param automation_account_name: The name of the automation account. Required.
+ :type automation_account_name: str
+ :param runtime_environment_name: The name of the Runtime Environment. Required.
+ :type runtime_environment_name: str
+ :return: An iterator like instance of either Package or the result of cls(response)
+ :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.automation.models.Package]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _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[_models.PackageListResult] = kwargs.pop("cls", None)
+
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ def prepare_request(next_link=None):
+ if not next_link:
+
+ _request = build_list_by_runtime_environment_request(
+ resource_group_name=resource_group_name,
+ automation_account_name=automation_account_name,
+ runtime_environment_name=runtime_environment_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ else:
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
+ _request.url = self._client.format_url(_request.url)
+ _request.method = "GET"
+ return _request
+
+ async def extract_data(pipeline_response):
+ deserialized = self._deserialize("PackageListResult", pipeline_response)
+ list_of_elem = deserialized.value
+ if cls:
+ list_of_elem = cls(list_of_elem) # type: ignore
+ return deserialized.next_link or None, AsyncList(list_of_elem)
+
+ async def get_next(next_link=None):
+ _request = prepare_request(next_link)
+
+ _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.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return AsyncItemPaged(get_next, extract_data)
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_private_endpoint_connections_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_private_endpoint_connections_operations.py
index c01c5856fbd0..fd9f52351a32 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_private_endpoint_connections_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_private_endpoint_connections_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,8 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
+import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import (
@@ -41,7 +41,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -84,10 +84,10 @@ def list_by_automation_account(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -109,7 +109,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
@@ -158,7 +169,7 @@ async def get(
:rtype: ~azure.mgmt.automation.models.PrivateEndpointConnection
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -169,7 +180,7 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -209,7 +220,7 @@ async def _create_or_update_initial(
parameters: Union[_models.PrivateEndpointConnection, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -220,7 +231,7 @@ async def _create_or_update_initial(
_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", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
@@ -360,7 +371,7 @@ async def begin_create_or_update(
_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", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None)
polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
@@ -412,7 +423,7 @@ async def _delete_initial(
private_endpoint_connection_name: str,
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -423,7 +434,7 @@ async def _delete_initial(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
_request = build_delete_request(
@@ -454,10 +465,14 @@ async def _delete_initial(
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+ response_headers = {}
+ if response.status_code == 202:
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
return deserialized # type: ignore
@@ -484,7 +499,7 @@ async def begin_delete(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_private_link_resources_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_private_link_resources_operations.py
index 00e3722848c2..edd063a1b1e7 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_private_link_resources_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_private_link_resources_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,8 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar
+from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar
+import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import (
@@ -30,7 +30,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -72,10 +72,10 @@ def automation(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.PrivateLinkResourceListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -97,7 +97,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_python2_package_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_python2_package_operations.py
index 05a40ba7e870..cebfe57cad80 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_python2_package_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_python2_package_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,8 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload
+from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload
+import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import (
@@ -38,7 +38,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -63,7 +63,7 @@ def __init__(self, *args, **kwargs) -> None:
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
@distributed_trace_async
- async def delete( # pylint: disable=inconsistent-return-statements
+ async def delete(
self, resource_group_name: str, automation_account_name: str, package_name: str, **kwargs: Any
) -> None:
"""Delete the python 2 package by name.
@@ -81,7 +81,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -92,7 +92,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_delete_request(
@@ -140,7 +140,7 @@ async def get(
:rtype: ~azure.mgmt.automation.models.Module
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -151,7 +151,7 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.Module] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -275,7 +275,7 @@ async def create_or_update(
:rtype: ~azure.mgmt.automation.models.Module
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -286,7 +286,7 @@ async def create_or_update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Module] = kwargs.pop("cls", None)
@@ -422,7 +422,7 @@ async def update(
:rtype: ~azure.mgmt.automation.models.Module
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -433,7 +433,7 @@ async def update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Module] = kwargs.pop("cls", None)
@@ -498,10 +498,10 @@ def list_by_automation_account(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ModuleListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -523,7 +523,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_python3_package_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_python3_package_operations.py
index 7bea655a19e9..e93cb4ccf29f 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_python3_package_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_python3_package_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,8 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload
+from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload
+import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import (
@@ -38,7 +38,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -63,7 +63,7 @@ def __init__(self, *args, **kwargs) -> None:
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
@distributed_trace_async
- async def delete( # pylint: disable=inconsistent-return-statements
+ async def delete(
self, resource_group_name: str, automation_account_name: str, package_name: str, **kwargs: Any
) -> None:
"""Delete the python 3 package by name.
@@ -81,7 +81,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -92,7 +92,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_delete_request(
@@ -140,7 +140,7 @@ async def get(
:rtype: ~azure.mgmt.automation.models.Module
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -151,7 +151,7 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.Module] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -275,7 +275,7 @@ async def create_or_update(
:rtype: ~azure.mgmt.automation.models.Module
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -286,7 +286,7 @@ async def create_or_update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Module] = kwargs.pop("cls", None)
@@ -422,7 +422,7 @@ async def update(
:rtype: ~azure.mgmt.automation.models.Module
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -433,7 +433,7 @@ async def update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Module] = kwargs.pop("cls", None)
@@ -498,10 +498,10 @@ def list_by_automation_account(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ModuleListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -523,7 +523,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_runbook_draft_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_runbook_draft_operations.py
index 4335aa6616df..94312f5b73fd 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_runbook_draft_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_runbook_draft_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,7 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast
+from typing import Any, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -38,7 +37,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -81,7 +80,7 @@ async def get_content(
:rtype: AsyncIterator[bytes]
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -92,7 +91,7 @@ async def get_content(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
_request = build_get_content_request(
@@ -137,7 +136,7 @@ async def _replace_content_initial(
runbook_content: IO[bytes],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -148,7 +147,7 @@ async def _replace_content_initial(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
@@ -225,7 +224,7 @@ async def begin_replace_content(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
@@ -292,7 +291,7 @@ async def get(
:rtype: ~azure.mgmt.automation.models.RunbookDraft
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -303,7 +302,7 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.RunbookDraft] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -355,7 +354,7 @@ async def undo_edit(
:rtype: ~azure.mgmt.automation.models.RunbookDraftUndoEditResult
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -366,7 +365,7 @@ async def undo_edit(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.RunbookDraftUndoEditResult] = kwargs.pop("cls", None)
_request = build_undo_edit_request(
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_runbook_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_runbook_operations.py
index 428ce24a70af..3768658eaac5 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_runbook_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_runbook_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,8 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
+import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import (
@@ -44,7 +44,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -71,7 +71,7 @@ def __init__(self, *args, **kwargs) -> None:
async def _publish_initial(
self, resource_group_name: str, automation_account_name: str, runbook_name: str, **kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -82,7 +82,7 @@ async def _publish_initial(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
_request = build_publish_request(
@@ -145,7 +145,7 @@ async def begin_publish(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
@@ -202,7 +202,7 @@ async def get_content(
:rtype: AsyncIterator[bytes]
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -213,7 +213,7 @@ async def get_content(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
_request = build_get_content_request(
@@ -269,7 +269,7 @@ async def get(
:rtype: ~azure.mgmt.automation.models.Runbook
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -280,7 +280,7 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.Runbook] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -407,7 +407,7 @@ async def create_or_update(
:rtype: ~azure.mgmt.automation.models.Runbook
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -418,7 +418,7 @@ async def create_or_update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Runbook] = kwargs.pop("cls", None)
@@ -554,7 +554,7 @@ async def update(
:rtype: ~azure.mgmt.automation.models.Runbook
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -565,7 +565,7 @@ async def update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Runbook] = kwargs.pop("cls", None)
@@ -611,7 +611,7 @@ async def update(
return deserialized # type: ignore
@distributed_trace_async
- async def delete( # pylint: disable=inconsistent-return-statements
+ async def delete(
self, resource_group_name: str, automation_account_name: str, runbook_name: str, **kwargs: Any
) -> None:
"""Delete the runbook by name.
@@ -629,7 +629,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -640,7 +640,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_delete_request(
@@ -689,10 +689,10 @@ def list_by_automation_account(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.RunbookListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -714,7 +714,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_compilation_job_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_runtime_environments_operations.py
similarity index 53%
rename from sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_compilation_job_operations.py
rename to sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_runtime_environments_operations.py
index 94825d144c08..0abc749fae10 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_compilation_job_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_runtime_environments_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,8 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload
+import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import (
@@ -17,43 +17,40 @@
ResourceExistsError,
ResourceNotFoundError,
ResourceNotModifiedError,
- StreamClosedError,
- StreamConsumedError,
map_error,
)
from azure.core.pipeline import PipelineResponse
-from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod
from azure.core.rest import AsyncHttpResponse, HttpRequest
from azure.core.tracing.decorator import distributed_trace
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 azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling
from ... import models as _models
-from ...operations._dsc_compilation_job_operations import (
+from ...operations._runtime_environments_operations import (
build_create_request,
+ build_delete_request,
build_get_request,
- build_get_stream_request,
build_list_by_automation_account_request,
+ build_update_request,
)
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
-class DscCompilationJobOperations:
+class RuntimeEnvironmentsOperations:
"""
.. warning::
**DO NOT** instantiate this class directly.
Instead, you should access the following operations through
:class:`~azure.mgmt.automation.aio.AutomationClient`'s
- :attr:`dsc_compilation_job` attribute.
+ :attr:`runtime_environments` attribute.
"""
models = _models
@@ -65,15 +62,98 @@ def __init__(self, *args, **kwargs) -> None:
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")
- async def _create_initial(
+ @overload
+ async def update(
self,
resource_group_name: str,
automation_account_name: str,
- compilation_job_name: str,
- parameters: Union[_models.DscCompilationJobCreateParameters, IO[bytes]],
+ runtime_environment_name: str,
+ parameters: _models.RuntimeEnvironmentUpdateParameters,
+ *,
+ content_type: str = "application/json",
**kwargs: Any
- ) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ ) -> _models.RuntimeEnvironment:
+ """Update an Runtime Environment.
+
+ .. seealso::
+ - http://aka.ms/azureautomationsdk/automationaccountoperations
+
+ :param resource_group_name: Name of an Azure Resource group. Required.
+ :type resource_group_name: str
+ :param automation_account_name: The name of the automation account. Required.
+ :type automation_account_name: str
+ :param runtime_environment_name: The name of the Runtime Environment. Required.
+ :type runtime_environment_name: str
+ :param parameters: Parameters supplied to the Runtime Environment. Required.
+ :type parameters: ~azure.mgmt.automation.models.RuntimeEnvironmentUpdateParameters
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: RuntimeEnvironment or the result of cls(response)
+ :rtype: ~azure.mgmt.automation.models.RuntimeEnvironment
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @overload
+ async def update(
+ self,
+ resource_group_name: str,
+ automation_account_name: str,
+ runtime_environment_name: str,
+ parameters: IO[bytes],
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> _models.RuntimeEnvironment:
+ """Update an Runtime Environment.
+
+ .. seealso::
+ - http://aka.ms/azureautomationsdk/automationaccountoperations
+
+ :param resource_group_name: Name of an Azure Resource group. Required.
+ :type resource_group_name: str
+ :param automation_account_name: The name of the automation account. Required.
+ :type automation_account_name: str
+ :param runtime_environment_name: The name of the Runtime Environment. Required.
+ :type runtime_environment_name: str
+ :param parameters: Parameters supplied to the Runtime Environment. Required.
+ :type parameters: IO[bytes]
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: RuntimeEnvironment or the result of cls(response)
+ :rtype: ~azure.mgmt.automation.models.RuntimeEnvironment
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @distributed_trace_async
+ async def update(
+ self,
+ resource_group_name: str,
+ automation_account_name: str,
+ runtime_environment_name: str,
+ parameters: Union[_models.RuntimeEnvironmentUpdateParameters, IO[bytes]],
+ **kwargs: Any
+ ) -> _models.RuntimeEnvironment:
+ """Update an Runtime Environment.
+
+ .. seealso::
+ - http://aka.ms/azureautomationsdk/automationaccountoperations
+
+ :param resource_group_name: Name of an Azure Resource group. Required.
+ :type resource_group_name: str
+ :param automation_account_name: The name of the automation account. Required.
+ :type automation_account_name: str
+ :param runtime_environment_name: The name of the Runtime Environment. Required.
+ :type runtime_environment_name: str
+ :param parameters: Parameters supplied to the Runtime Environment. Is either a
+ RuntimeEnvironmentUpdateParameters type or a IO[bytes] type. Required.
+ :type parameters: ~azure.mgmt.automation.models.RuntimeEnvironmentUpdateParameters or IO[bytes]
+ :return: RuntimeEnvironment or the result of cls(response)
+ :rtype: ~azure.mgmt.automation.models.RuntimeEnvironment
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -84,9 +164,9 @@ async def _create_initial(
_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", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
+ cls: ClsType[_models.RuntimeEnvironment] = kwargs.pop("cls", None)
content_type = content_type or "application/json"
_json = None
@@ -94,12 +174,12 @@ async def _create_initial(
if isinstance(parameters, (IOBase, bytes)):
_content = parameters
else:
- _json = self._serialize.body(parameters, "DscCompilationJobCreateParameters")
+ _json = self._serialize.body(parameters, "RuntimeEnvironmentUpdateParameters")
- _request = build_create_request(
+ _request = build_update_request(
resource_group_name=resource_group_name,
automation_account_name=automation_account_name,
- compilation_job_name=compilation_job_name,
+ runtime_environment_name=runtime_environment_name,
subscription_id=self._config.subscription_id,
api_version=api_version,
content_type=content_type,
@@ -110,24 +190,19 @@ async def _create_initial(
)
_request.url = self._client.format_url(_request.url)
- _decompress = kwargs.pop("decompress", True)
- _stream = True
+ _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 [201]:
- try:
- await response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
+ 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.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
- deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
+ deserialized = self._deserialize("RuntimeEnvironment", pipeline_response.http_response)
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -135,167 +210,231 @@ async def _create_initial(
return deserialized # type: ignore
@overload
- async def begin_create(
+ async def create(
self,
resource_group_name: str,
automation_account_name: str,
- compilation_job_name: str,
- parameters: _models.DscCompilationJobCreateParameters,
+ runtime_environment_name: str,
+ parameters: _models.RuntimeEnvironment,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> AsyncLROPoller[_models.DscCompilationJob]:
- """Creates the Dsc compilation job of the configuration.
+ ) -> _models.RuntimeEnvironment:
+ """Create or update Runtime Environment.
.. seealso::
- - http://aka.ms/azureautomationsdk/dscconfigurationcompilejoboperations
+ - http://aka.ms/azureautomationsdk/runtimeEnvironmentOperations
:param resource_group_name: Name of an Azure Resource group. Required.
:type resource_group_name: str
:param automation_account_name: The name of the automation account. Required.
:type automation_account_name: str
- :param compilation_job_name: The DSC configuration Id. Required.
- :type compilation_job_name: str
- :param parameters: The parameters supplied to the create compilation job operation. Required.
- :type parameters: ~azure.mgmt.automation.models.DscCompilationJobCreateParameters
+ :param runtime_environment_name: The name of the Runtime Environment. Required.
+ :type runtime_environment_name: str
+ :param parameters: Parameters supplied to the create the runtime environment. Required.
+ :type parameters: ~azure.mgmt.automation.models.RuntimeEnvironment
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns either DscCompilationJob or the result of
- cls(response)
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.automation.models.DscCompilationJob]
+ :return: RuntimeEnvironment or the result of cls(response)
+ :rtype: ~azure.mgmt.automation.models.RuntimeEnvironment
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- async def begin_create(
+ async def create(
self,
resource_group_name: str,
automation_account_name: str,
- compilation_job_name: str,
+ runtime_environment_name: str,
parameters: IO[bytes],
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> AsyncLROPoller[_models.DscCompilationJob]:
- """Creates the Dsc compilation job of the configuration.
+ ) -> _models.RuntimeEnvironment:
+ """Create or update Runtime Environment.
.. seealso::
- - http://aka.ms/azureautomationsdk/dscconfigurationcompilejoboperations
+ - http://aka.ms/azureautomationsdk/runtimeEnvironmentOperations
:param resource_group_name: Name of an Azure Resource group. Required.
:type resource_group_name: str
:param automation_account_name: The name of the automation account. Required.
:type automation_account_name: str
- :param compilation_job_name: The DSC configuration Id. Required.
- :type compilation_job_name: str
- :param parameters: The parameters supplied to the create compilation job operation. Required.
+ :param runtime_environment_name: The name of the Runtime Environment. Required.
+ :type runtime_environment_name: str
+ :param parameters: Parameters supplied to the create the runtime environment. Required.
:type parameters: IO[bytes]
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of AsyncLROPoller that returns either DscCompilationJob or the result of
- cls(response)
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.automation.models.DscCompilationJob]
+ :return: RuntimeEnvironment or the result of cls(response)
+ :rtype: ~azure.mgmt.automation.models.RuntimeEnvironment
:raises ~azure.core.exceptions.HttpResponseError:
"""
@distributed_trace_async
- async def begin_create(
+ async def create(
self,
resource_group_name: str,
automation_account_name: str,
- compilation_job_name: str,
- parameters: Union[_models.DscCompilationJobCreateParameters, IO[bytes]],
+ runtime_environment_name: str,
+ parameters: Union[_models.RuntimeEnvironment, IO[bytes]],
**kwargs: Any
- ) -> AsyncLROPoller[_models.DscCompilationJob]:
- """Creates the Dsc compilation job of the configuration.
+ ) -> _models.RuntimeEnvironment:
+ """Create or update Runtime Environment.
.. seealso::
- - http://aka.ms/azureautomationsdk/dscconfigurationcompilejoboperations
+ - http://aka.ms/azureautomationsdk/runtimeEnvironmentOperations
:param resource_group_name: Name of an Azure Resource group. Required.
:type resource_group_name: str
:param automation_account_name: The name of the automation account. Required.
:type automation_account_name: str
- :param compilation_job_name: The DSC configuration Id. Required.
- :type compilation_job_name: str
- :param parameters: The parameters supplied to the create compilation job operation. Is either a
- DscCompilationJobCreateParameters type or a IO[bytes] type. Required.
- :type parameters: ~azure.mgmt.automation.models.DscCompilationJobCreateParameters or IO[bytes]
- :return: An instance of AsyncLROPoller that returns either DscCompilationJob or the result of
- cls(response)
- :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.automation.models.DscCompilationJob]
+ :param runtime_environment_name: The name of the Runtime Environment. Required.
+ :type runtime_environment_name: str
+ :param parameters: Parameters supplied to the create the runtime environment. Is either a
+ RuntimeEnvironment type or a IO[bytes] type. Required.
+ :type parameters: ~azure.mgmt.automation.models.RuntimeEnvironment or IO[bytes]
+ :return: RuntimeEnvironment or the result of cls(response)
+ :rtype: ~azure.mgmt.automation.models.RuntimeEnvironment
:raises ~azure.core.exceptions.HttpResponseError:
"""
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
_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", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.DscCompilationJob] = kwargs.pop("cls", None)
- polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = await self._create_initial(
- resource_group_name=resource_group_name,
- automation_account_name=automation_account_name,
- compilation_job_name=compilation_job_name,
- parameters=parameters,
- api_version=api_version,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- await raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
-
- def get_long_running_output(pipeline_response):
- deserialized = self._deserialize("DscCompilationJob", pipeline_response.http_response)
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
- return deserialized
+ cls: ClsType[_models.RuntimeEnvironment] = kwargs.pop("cls", None)
- if polling is True:
- polling_method: AsyncPollingMethod = cast(AsyncPollingMethod, AsyncARMPolling(lro_delay, **kwargs))
- elif polling is False:
- polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
+ content_type = content_type or "application/json"
+ _json = None
+ _content = None
+ if isinstance(parameters, (IOBase, bytes)):
+ _content = parameters
else:
- polling_method = polling
- if cont_token:
- return AsyncLROPoller[_models.DscCompilationJob].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return AsyncLROPoller[_models.DscCompilationJob](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
+ _json = self._serialize.body(parameters, "RuntimeEnvironment")
+
+ _request = build_create_request(
+ resource_group_name=resource_group_name,
+ automation_account_name=automation_account_name,
+ runtime_environment_name=runtime_environment_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ content_type=content_type,
+ json=_json,
+ content=_content,
+ headers=_headers,
+ params=_params,
+ )
+ _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, 201]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize("RuntimeEnvironment", pipeline_response.http_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+
+ return deserialized # type: ignore
+
+ @distributed_trace_async
+ async def delete(
+ self, resource_group_name: str, automation_account_name: str, runtime_environment_name: str, **kwargs: Any
+ ) -> None:
+ """Delete the Runtime Environment.
+
+ .. seealso::
+ - http://aka.ms/azureautomationsdk/runtimeEnvironmentOperations
+
+ :param resource_group_name: Name of an Azure Resource group. Required.
+ :type resource_group_name: str
+ :param automation_account_name: The name of the automation account. Required.
+ :type automation_account_name: str
+ :param runtime_environment_name: The name of the Runtime Environment. Required.
+ :type runtime_environment_name: str
+ :return: None or the result of cls(response)
+ :rtype: None
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map: MutableMapping = {
+ 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_delete_request(
+ resource_group_name=resource_group_name,
+ automation_account_name=automation_account_name,
+ runtime_environment_name=runtime_environment_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ headers=_headers,
+ params=_params,
+ )
+ _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, 204]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ if cls:
+ return cls(pipeline_response, None, {}) # type: ignore
+
@distributed_trace_async
async def get(
- self, resource_group_name: str, automation_account_name: str, compilation_job_name: str, **kwargs: Any
- ) -> _models.DscCompilationJob:
- """Retrieve the Dsc configuration compilation job identified by job id.
+ self, resource_group_name: str, automation_account_name: str, runtime_environment_name: str, **kwargs: Any
+ ) -> _models.RuntimeEnvironment:
+ """Get information about the Runtime Environment.
.. seealso::
- - http://aka.ms/azureautomationsdk/dsccompilationjoboperations
+ - http://aka.ms/azureautomationsdk/runtimeEnvironmentOperations
:param resource_group_name: Name of an Azure Resource group. Required.
:type resource_group_name: str
:param automation_account_name: The name of the automation account. Required.
:type automation_account_name: str
- :param compilation_job_name: The DSC configuration Id. Required.
- :type compilation_job_name: str
- :return: DscCompilationJob or the result of cls(response)
- :rtype: ~azure.mgmt.automation.models.DscCompilationJob
+ :param runtime_environment_name: The name of the Runtime Environment. Required.
+ :type runtime_environment_name: str
+ :return: RuntimeEnvironment or the result of cls(response)
+ :rtype: ~azure.mgmt.automation.models.RuntimeEnvironment
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -306,13 +445,13 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview"))
- cls: ClsType[_models.DscCompilationJob] = kwargs.pop("cls", None)
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ cls: ClsType[_models.RuntimeEnvironment] = kwargs.pop("cls", None)
_request = build_get_request(
resource_group_name=resource_group_name,
automation_account_name=automation_account_name,
- compilation_job_name=compilation_job_name,
+ runtime_environment_name=runtime_environment_name,
subscription_id=self._config.subscription_id,
api_version=api_version,
headers=_headers,
@@ -332,7 +471,7 @@ async def get(
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
- deserialized = self._deserialize("DscCompilationJob", pipeline_response.http_response)
+ deserialized = self._deserialize("RuntimeEnvironment", pipeline_response.http_response)
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -341,31 +480,29 @@ async def get(
@distributed_trace
def list_by_automation_account(
- self, resource_group_name: str, automation_account_name: str, filter: Optional[str] = None, **kwargs: Any
- ) -> AsyncIterable["_models.DscCompilationJob"]:
- """Retrieve a list of dsc compilation jobs.
+ self, resource_group_name: str, automation_account_name: str, **kwargs: Any
+ ) -> AsyncIterable["_models.RuntimeEnvironment"]:
+ """Retrieve a list of RuntimeEnvironments.
.. seealso::
- - http://aka.ms/azureautomationsdk/compilationjoboperations
+ - http://aka.ms/azureautomationsdk/runbookoperations
:param resource_group_name: Name of an Azure Resource group. Required.
:type resource_group_name: str
:param automation_account_name: The name of the automation account. Required.
:type automation_account_name: str
- :param filter: The filter to apply on the operation. Default value is None.
- :type filter: str
- :return: An iterator like instance of either DscCompilationJob or the result of cls(response)
+ :return: An iterator like instance of either RuntimeEnvironment or the result of cls(response)
:rtype:
- ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.automation.models.DscCompilationJob]
+ ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.automation.models.RuntimeEnvironment]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview"))
- cls: ClsType[_models.DscCompilationJobListResult] = kwargs.pop("cls", None)
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ cls: ClsType[_models.RuntimeEnvironmentListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -380,7 +517,6 @@ def prepare_request(next_link=None):
resource_group_name=resource_group_name,
automation_account_name=automation_account_name,
subscription_id=self._config.subscription_id,
- filter=filter,
api_version=api_version,
headers=_headers,
params=_params,
@@ -388,13 +524,24 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
async def extract_data(pipeline_response):
- deserialized = self._deserialize("DscCompilationJobListResult", pipeline_response)
+ deserialized = self._deserialize("RuntimeEnvironmentListResult", pipeline_response)
list_of_elem = deserialized.value
if cls:
list_of_elem = cls(list_of_elem) # type: ignore
@@ -417,69 +564,3 @@ async def get_next(next_link=None):
return pipeline_response
return AsyncItemPaged(get_next, extract_data)
-
- @distributed_trace_async
- async def get_stream(
- self, resource_group_name: str, automation_account_name: str, job_id: str, job_stream_id: str, **kwargs: Any
- ) -> _models.JobStream:
- """Retrieve the job stream identified by job stream id.
-
- .. seealso::
- - http://aka.ms/azureautomationsdk/jobstreamoperations
-
- :param resource_group_name: Name of an Azure Resource group. Required.
- :type resource_group_name: str
- :param automation_account_name: The name of the automation account. Required.
- :type automation_account_name: str
- :param job_id: The job id. Required.
- :type job_id: str
- :param job_stream_id: The job stream id. Required.
- :type job_stream_id: str
- :return: JobStream or the result of cls(response)
- :rtype: ~azure.mgmt.automation.models.JobStream
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
- 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", "2020-01-13-preview"))
- cls: ClsType[_models.JobStream] = kwargs.pop("cls", None)
-
- _request = build_get_stream_request(
- resource_group_name=resource_group_name,
- automation_account_name=automation_account_name,
- job_id=job_id,
- job_stream_id=job_stream_id,
- subscription_id=self._config.subscription_id,
- api_version=api_version,
- headers=_headers,
- params=_params,
- )
- _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.ErrorResponse, pipeline_response)
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- deserialized = self._deserialize("JobStream", pipeline_response.http_response)
-
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
-
- return deserialized # type: ignore
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_schedule_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_schedule_operations.py
index 4eb112524313..4134cc7eeb7f 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_schedule_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_schedule_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,8 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload
+from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload
+import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import (
@@ -38,7 +38,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -155,7 +155,7 @@ async def create_or_update(
:rtype: ~azure.mgmt.automation.models.Schedule or None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -166,7 +166,7 @@ async def create_or_update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[Optional[_models.Schedule]] = kwargs.pop("cls", None)
@@ -303,7 +303,7 @@ async def update(
:rtype: ~azure.mgmt.automation.models.Schedule
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -314,7 +314,7 @@ async def update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Schedule] = kwargs.pop("cls", None)
@@ -378,7 +378,7 @@ async def get(
:rtype: ~azure.mgmt.automation.models.Schedule
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -389,7 +389,7 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.Schedule] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -423,7 +423,7 @@ async def get(
return deserialized # type: ignore
@distributed_trace_async
- async def delete( # pylint: disable=inconsistent-return-statements
+ async def delete(
self, resource_group_name: str, automation_account_name: str, schedule_name: str, **kwargs: Any
) -> None:
"""Delete the schedule identified by schedule name.
@@ -441,7 +441,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -452,7 +452,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_delete_request(
@@ -501,10 +501,10 @@ def list_by_automation_account(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ScheduleListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -526,7 +526,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_software_update_configuration_machine_runs_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_software_update_configuration_machine_runs_operations.py
index cbda0360da8e..5c7c85b2da0c 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_software_update_configuration_machine_runs_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_software_update_configuration_machine_runs_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,7 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, Callable, Dict, Optional, Type, TypeVar
+from typing import Any, Callable, Dict, Optional, TypeVar
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -32,7 +31,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -83,7 +82,7 @@ async def get_by_id(
:rtype: ~azure.mgmt.automation.models.SoftwareUpdateConfigurationMachineRun
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -94,7 +93,7 @@ async def get_by_id(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.SoftwareUpdateConfigurationMachineRun] = kwargs.pop("cls", None)
_request = build_get_by_id_request(
@@ -163,7 +162,7 @@ async def list(
:rtype: ~azure.mgmt.automation.models.SoftwareUpdateConfigurationMachineRunListResult
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -174,7 +173,7 @@ async def list(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.SoftwareUpdateConfigurationMachineRunListResult] = kwargs.pop("cls", None)
_request = build_list_request(
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_software_update_configuration_runs_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_software_update_configuration_runs_operations.py
index 4bb51db6836c..5f4c4e8f22e1 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_software_update_configuration_runs_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_software_update_configuration_runs_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,7 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, Callable, Dict, Optional, Type, TypeVar
+from typing import Any, Callable, Dict, Optional, TypeVar
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -29,7 +28,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -80,7 +79,7 @@ async def get_by_id(
:rtype: ~azure.mgmt.automation.models.SoftwareUpdateConfigurationRun
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -91,7 +90,7 @@ async def get_by_id(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.SoftwareUpdateConfigurationRun] = kwargs.pop("cls", None)
_request = build_get_by_id_request(
@@ -160,7 +159,7 @@ async def list(
:rtype: ~azure.mgmt.automation.models.SoftwareUpdateConfigurationRunListResult
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -171,7 +170,7 @@ async def list(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.SoftwareUpdateConfigurationRunListResult] = kwargs.pop("cls", None)
_request = build_list_request(
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_software_update_configurations_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_software_update_configurations_operations.py
index bcc0ca752f4f..7bd02ffdf792 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_software_update_configurations_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_software_update_configurations_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload
+from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -35,7 +34,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -162,7 +161,7 @@ async def create(
:rtype: ~azure.mgmt.automation.models.SoftwareUpdateConfiguration
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -173,7 +172,7 @@ async def create(
_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", "2019-06-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.SoftwareUpdateConfiguration] = kwargs.pop("cls", None)
@@ -246,7 +245,7 @@ async def get_by_name(
:rtype: ~azure.mgmt.automation.models.SoftwareUpdateConfiguration
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -257,7 +256,7 @@ async def get_by_name(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.SoftwareUpdateConfiguration] = kwargs.pop("cls", None)
_request = build_get_by_name_request(
@@ -292,7 +291,7 @@ async def get_by_name(
return deserialized # type: ignore
@distributed_trace_async
- async def delete( # pylint: disable=inconsistent-return-statements
+ async def delete(
self,
resource_group_name: str,
automation_account_name: str,
@@ -318,7 +317,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -329,7 +328,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_delete_request(
@@ -385,7 +384,7 @@ async def list(
:rtype: ~azure.mgmt.automation.models.SoftwareUpdateConfigurationListResult
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -396,7 +395,7 @@ async def list(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.SoftwareUpdateConfigurationListResult] = kwargs.pop("cls", None)
_request = build_list_request(
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_source_control_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_source_control_operations.py
index ab96aeedcc28..7e537cd36303 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_source_control_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_source_control_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,8 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload
+from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload
+import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import (
@@ -38,7 +38,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -156,7 +156,7 @@ async def create_or_update(
:rtype: ~azure.mgmt.automation.models.SourceControl
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -167,7 +167,7 @@ async def create_or_update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.SourceControl] = kwargs.pop("cls", None)
@@ -303,7 +303,7 @@ async def update(
:rtype: ~azure.mgmt.automation.models.SourceControl
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -314,7 +314,7 @@ async def update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.SourceControl] = kwargs.pop("cls", None)
@@ -360,7 +360,7 @@ async def update(
return deserialized # type: ignore
@distributed_trace_async
- async def delete( # pylint: disable=inconsistent-return-statements
+ async def delete(
self, resource_group_name: str, automation_account_name: str, source_control_name: str, **kwargs: Any
) -> None:
"""Delete the source control.
@@ -378,7 +378,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -389,7 +389,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_delete_request(
@@ -437,7 +437,7 @@ async def get(
:rtype: ~azure.mgmt.automation.models.SourceControl
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -448,7 +448,7 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.SourceControl] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -503,10 +503,10 @@ def list_by_automation_account(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.SourceControlListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -529,7 +529,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_source_control_sync_job_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_source_control_sync_job_operations.py
index 55db95ab3fe9..4151b65cd8d1 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_source_control_sync_job_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_source_control_sync_job_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,8 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload
+from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload
+import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import (
@@ -36,7 +36,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -163,7 +163,7 @@ async def create(
:rtype: ~azure.mgmt.automation.models.SourceControlSyncJob
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -174,7 +174,7 @@ async def create(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.SourceControlSyncJob] = kwargs.pop("cls", None)
@@ -246,7 +246,7 @@ async def get(
:rtype: ~azure.mgmt.automation.models.SourceControlSyncJobById
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -257,7 +257,7 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.SourceControlSyncJobById] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -322,10 +322,10 @@ def list_by_automation_account(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.SourceControlSyncJobListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -349,7 +349,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_source_control_sync_job_streams_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_source_control_sync_job_streams_operations.py
index f32413ae0e0e..a9cec6a346a9 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_source_control_sync_job_streams_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_source_control_sync_job_streams_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,8 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar
+from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar
+import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import (
@@ -31,7 +31,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -89,10 +89,10 @@ def list_by_sync_job(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.SourceControlSyncJobStreamsListBySyncJob] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -117,7 +117,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
@@ -176,7 +187,7 @@ async def get(
:rtype: ~azure.mgmt.automation.models.SourceControlSyncJobStreamById
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -187,7 +198,7 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.SourceControlSyncJobStreamById] = kwargs.pop("cls", None)
_request = build_get_request(
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_statistics_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_statistics_operations.py
index e83b2440adab..6a3bab1611e3 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_statistics_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_statistics_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,8 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar
+from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar
+import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import (
@@ -30,7 +30,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -76,10 +76,10 @@ def list_by_automation_account(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.StatisticsListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -102,7 +102,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_test_job_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_test_job_operations.py
index 0d4f4d1b1307..fb977232f9c1 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_test_job_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_test_job_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload
+from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -36,7 +35,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -151,7 +150,7 @@ async def create(
:rtype: ~azure.mgmt.automation.models.TestJob
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -162,7 +161,7 @@ async def create(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.TestJob] = kwargs.pop("cls", None)
@@ -226,7 +225,7 @@ async def get(
:rtype: ~azure.mgmt.automation.models.TestJob
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -237,7 +236,7 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.TestJob] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -271,7 +270,7 @@ async def get(
return deserialized # type: ignore
@distributed_trace_async
- async def resume( # pylint: disable=inconsistent-return-statements
+ async def resume(
self, resource_group_name: str, automation_account_name: str, runbook_name: str, **kwargs: Any
) -> None:
"""Resume the test job.
@@ -289,7 +288,7 @@ async def resume( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -300,7 +299,7 @@ async def resume( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_resume_request(
@@ -330,7 +329,7 @@ async def resume( # pylint: disable=inconsistent-return-statements
return cls(pipeline_response, None, {}) # type: ignore
@distributed_trace_async
- async def stop( # pylint: disable=inconsistent-return-statements
+ async def stop(
self, resource_group_name: str, automation_account_name: str, runbook_name: str, **kwargs: Any
) -> None:
"""Stop the test job.
@@ -348,7 +347,7 @@ async def stop( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -359,7 +358,7 @@ async def stop( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_stop_request(
@@ -389,7 +388,7 @@ async def stop( # pylint: disable=inconsistent-return-statements
return cls(pipeline_response, None, {}) # type: ignore
@distributed_trace_async
- async def suspend( # pylint: disable=inconsistent-return-statements
+ async def suspend(
self, resource_group_name: str, automation_account_name: str, runbook_name: str, **kwargs: Any
) -> None:
"""Suspend the test job.
@@ -407,7 +406,7 @@ async def suspend( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -418,7 +417,7 @@ async def suspend( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_suspend_request(
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_test_job_streams_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_test_job_streams_operations.py
index 4f53f697e7c7..a91e4c79c631 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_test_job_streams_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_test_job_streams_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,8 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar
+from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar
+import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import (
@@ -31,7 +31,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -81,7 +81,7 @@ async def get(
:rtype: ~azure.mgmt.automation.models.JobStream
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -92,7 +92,7 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.JobStream] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -155,10 +155,10 @@ def list_by_test_job(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.JobStreamListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -182,7 +182,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_usages_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_usages_operations.py
index 23ec59e137ad..8dd2eb62312c 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_usages_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_usages_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,8 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar
+from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar
+import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import (
@@ -30,7 +30,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -74,10 +74,10 @@ def list_by_automation_account(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.UsageListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -99,7 +99,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_variable_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_variable_operations.py
index 8b5963884993..b83c93c6a041 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_variable_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_variable_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,8 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload
+from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload
+import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import (
@@ -38,7 +38,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -155,7 +155,7 @@ async def create_or_update(
:rtype: ~azure.mgmt.automation.models.Variable
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -166,7 +166,7 @@ async def create_or_update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Variable] = kwargs.pop("cls", None)
@@ -302,7 +302,7 @@ async def update(
:rtype: ~azure.mgmt.automation.models.Variable
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -313,7 +313,7 @@ async def update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Variable] = kwargs.pop("cls", None)
@@ -359,7 +359,7 @@ async def update(
return deserialized # type: ignore
@distributed_trace_async
- async def delete( # pylint: disable=inconsistent-return-statements
+ async def delete(
self, resource_group_name: str, automation_account_name: str, variable_name: str, **kwargs: Any
) -> None:
"""Delete the variable.
@@ -377,7 +377,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -388,7 +388,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_delete_request(
@@ -436,7 +436,7 @@ async def get(
:rtype: ~azure.mgmt.automation.models.Variable
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -447,7 +447,7 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.Variable] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -500,10 +500,10 @@ def list_by_automation_account(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.VariableListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -525,7 +525,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_watcher_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_watcher_operations.py
index c49a4b969e2f..5f950d034d3b 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_watcher_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_watcher_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,8 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload
+from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload
+import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import (
@@ -40,7 +40,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -155,7 +155,7 @@ async def create_or_update(
:rtype: ~azure.mgmt.automation.models.Watcher
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -166,7 +166,7 @@ async def create_or_update(
_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", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Watcher] = kwargs.pop("cls", None)
@@ -230,7 +230,7 @@ async def get(
:rtype: ~azure.mgmt.automation.models.Watcher
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -241,7 +241,7 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.Watcher] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -365,7 +365,7 @@ async def update(
:rtype: ~azure.mgmt.automation.models.Watcher
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -376,7 +376,7 @@ async def update(
_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", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Watcher] = kwargs.pop("cls", None)
@@ -422,7 +422,7 @@ async def update(
return deserialized # type: ignore
@distributed_trace_async
- async def delete( # pylint: disable=inconsistent-return-statements
+ async def delete(
self, resource_group_name: str, automation_account_name: str, watcher_name: str, **kwargs: Any
) -> None:
"""Delete the watcher by name.
@@ -440,7 +440,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -451,7 +451,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_delete_request(
@@ -481,7 +481,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
return cls(pipeline_response, None, {}) # type: ignore
@distributed_trace_async
- async def start( # pylint: disable=inconsistent-return-statements
+ async def start(
self, resource_group_name: str, automation_account_name: str, watcher_name: str, **kwargs: Any
) -> None:
"""Resume the watcher identified by watcher name.
@@ -499,7 +499,7 @@ async def start( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -510,7 +510,7 @@ async def start( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_start_request(
@@ -540,7 +540,7 @@ async def start( # pylint: disable=inconsistent-return-statements
return cls(pipeline_response, None, {}) # type: ignore
@distributed_trace_async
- async def stop( # pylint: disable=inconsistent-return-statements
+ async def stop(
self, resource_group_name: str, automation_account_name: str, watcher_name: str, **kwargs: Any
) -> None:
"""Resume the watcher identified by watcher name.
@@ -558,7 +558,7 @@ async def stop( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -569,7 +569,7 @@ async def stop( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_stop_request(
@@ -620,10 +620,10 @@ def list_by_automation_account(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.WatcherListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -646,7 +646,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_webhook_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_webhook_operations.py
index 376103325151..e65b25e38bce 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_webhook_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_webhook_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,8 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload
+from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload
+import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import (
@@ -39,7 +39,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -78,7 +78,7 @@ async def generate_uri(self, resource_group_name: str, automation_account_name:
:rtype: str
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -89,7 +89,7 @@ async def generate_uri(self, resource_group_name: str, automation_account_name:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-31"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[str] = kwargs.pop("cls", None)
_request = build_generate_uri_request(
@@ -122,7 +122,7 @@ async def generate_uri(self, resource_group_name: str, automation_account_name:
return deserialized # type: ignore
@distributed_trace_async
- async def delete( # pylint: disable=inconsistent-return-statements
+ async def delete(
self, resource_group_name: str, automation_account_name: str, webhook_name: str, **kwargs: Any
) -> None:
"""Delete the webhook by name.
@@ -140,7 +140,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -151,7 +151,7 @@ async def delete( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-31"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_delete_request(
@@ -199,7 +199,7 @@ async def get(
:rtype: ~azure.mgmt.automation.models.Webhook
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -210,7 +210,7 @@ async def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-31"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.Webhook] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -334,7 +334,7 @@ async def create_or_update(
:rtype: ~azure.mgmt.automation.models.Webhook
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -345,7 +345,7 @@ async def create_or_update(
_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", "2015-10-31"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Webhook] = kwargs.pop("cls", None)
@@ -481,7 +481,7 @@ async def update(
:rtype: ~azure.mgmt.automation.models.Webhook
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -492,7 +492,7 @@ async def update(
_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", "2015-10-31"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Webhook] = kwargs.pop("cls", None)
@@ -559,10 +559,10 @@ def list_by_automation_account(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-31"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.WebhookListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -585,7 +585,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/models/__init__.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/models/__init__.py
index c8280851cdf8..53c7c3b97e7e 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/models/__init__.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/models/__init__.py
@@ -5,226 +5,246 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
+# pylint: disable=wrong-import-position
-from ._models_py3 import Activity
-from ._models_py3 import ActivityListResult
-from ._models_py3 import ActivityOutputType
-from ._models_py3 import ActivityParameter
-from ._models_py3 import ActivityParameterSet
-from ._models_py3 import ActivityParameterValidationSet
-from ._models_py3 import AdvancedSchedule
-from ._models_py3 import AdvancedScheduleMonthlyOccurrence
-from ._models_py3 import AgentRegistration
-from ._models_py3 import AgentRegistrationKeys
-from ._models_py3 import AgentRegistrationRegenerateKeyParameter
-from ._models_py3 import AutomationAccount
-from ._models_py3 import AutomationAccountCreateOrUpdateParameters
-from ._models_py3 import AutomationAccountListResult
-from ._models_py3 import AutomationAccountUpdateParameters
-from ._models_py3 import AzureQueryProperties
-from ._models_py3 import Certificate
-from ._models_py3 import CertificateCreateOrUpdateParameters
-from ._models_py3 import CertificateListResult
-from ._models_py3 import CertificateUpdateParameters
-from ._models_py3 import Connection
-from ._models_py3 import ConnectionCreateOrUpdateParameters
-from ._models_py3 import ConnectionListResult
-from ._models_py3 import ConnectionType
-from ._models_py3 import ConnectionTypeAssociationProperty
-from ._models_py3 import ConnectionTypeCreateOrUpdateParameters
-from ._models_py3 import ConnectionTypeListResult
-from ._models_py3 import ConnectionUpdateParameters
-from ._models_py3 import ContentHash
-from ._models_py3 import ContentLink
-from ._models_py3 import ContentSource
-from ._models_py3 import Credential
-from ._models_py3 import CredentialCreateOrUpdateParameters
-from ._models_py3 import CredentialListResult
-from ._models_py3 import CredentialUpdateParameters
-from ._models_py3 import DeletedAutomationAccount
-from ._models_py3 import DeletedAutomationAccountListResult
-from ._models_py3 import Dimension
-from ._models_py3 import DscCompilationJob
-from ._models_py3 import DscCompilationJobCreateParameters
-from ._models_py3 import DscCompilationJobListResult
-from ._models_py3 import DscConfiguration
-from ._models_py3 import DscConfigurationAssociationProperty
-from ._models_py3 import DscConfigurationCreateOrUpdateParameters
-from ._models_py3 import DscConfigurationListResult
-from ._models_py3 import DscConfigurationParameter
-from ._models_py3 import DscConfigurationUpdateParameters
-from ._models_py3 import DscMetaConfiguration
-from ._models_py3 import DscNode
-from ._models_py3 import DscNodeConfiguration
-from ._models_py3 import DscNodeConfigurationCreateOrUpdateParameters
-from ._models_py3 import DscNodeConfigurationListResult
-from ._models_py3 import DscNodeExtensionHandlerAssociationProperty
-from ._models_py3 import DscNodeListResult
-from ._models_py3 import DscNodeReport
-from ._models_py3 import DscNodeReportListResult
-from ._models_py3 import DscNodeUpdateParameters
-from ._models_py3 import DscNodeUpdateParametersProperties
-from ._models_py3 import DscReportError
-from ._models_py3 import DscReportResource
-from ._models_py3 import DscReportResourceNavigation
-from ._models_py3 import EncryptionProperties
-from ._models_py3 import EncryptionPropertiesIdentity
-from ._models_py3 import ErrorResponse
-from ._models_py3 import FieldDefinition
-from ._models_py3 import GraphicalRunbookContent
-from ._models_py3 import HybridRunbookWorker
-from ._models_py3 import HybridRunbookWorkerCreateParameters
-from ._models_py3 import HybridRunbookWorkerGroup
-from ._models_py3 import HybridRunbookWorkerGroupCreateOrUpdateParameters
-from ._models_py3 import HybridRunbookWorkerGroupsListResult
-from ._models_py3 import HybridRunbookWorkerMoveParameters
-from ._models_py3 import HybridRunbookWorkersListResult
-from ._models_py3 import Identity
-from ._models_py3 import Job
-from ._models_py3 import JobCollectionItem
-from ._models_py3 import JobCreateParameters
-from ._models_py3 import JobListResultV2
-from ._models_py3 import JobNavigation
-from ._models_py3 import JobSchedule
-from ._models_py3 import JobScheduleCreateParameters
-from ._models_py3 import JobScheduleListResult
-from ._models_py3 import JobStream
-from ._models_py3 import JobStreamListResult
-from ._models_py3 import Key
-from ._models_py3 import KeyListResult
-from ._models_py3 import KeyVaultProperties
-from ._models_py3 import LinkedWorkspace
-from ._models_py3 import LinuxProperties
-from ._models_py3 import LogSpecification
-from ._models_py3 import MetricSpecification
-from ._models_py3 import Module
-from ._models_py3 import ModuleCreateOrUpdateParameters
-from ._models_py3 import ModuleErrorInfo
-from ._models_py3 import ModuleListResult
-from ._models_py3 import ModuleUpdateParameters
-from ._models_py3 import NodeCount
-from ._models_py3 import NodeCountProperties
-from ._models_py3 import NodeCounts
-from ._models_py3 import NonAzureQueryProperties
-from ._models_py3 import Operation
-from ._models_py3 import OperationDisplay
-from ._models_py3 import OperationListResult
-from ._models_py3 import OperationPropertiesFormatServiceSpecification
-from ._models_py3 import PrivateEndpointConnection
-from ._models_py3 import PrivateEndpointConnectionListResult
-from ._models_py3 import PrivateEndpointProperty
-from ._models_py3 import PrivateLinkResource
-from ._models_py3 import PrivateLinkResourceListResult
-from ._models_py3 import PrivateLinkServiceConnectionStateProperty
-from ._models_py3 import ProxyResource
-from ._models_py3 import PythonPackageCreateParameters
-from ._models_py3 import PythonPackageUpdateParameters
-from ._models_py3 import RawGraphicalRunbookContent
-from ._models_py3 import Resource
-from ._models_py3 import RunAsCredentialAssociationProperty
-from ._models_py3 import Runbook
-from ._models_py3 import RunbookAssociationProperty
-from ._models_py3 import RunbookCreateOrUpdateDraftParameters
-from ._models_py3 import RunbookCreateOrUpdateDraftProperties
-from ._models_py3 import RunbookCreateOrUpdateParameters
-from ._models_py3 import RunbookDraft
-from ._models_py3 import RunbookDraftUndoEditResult
-from ._models_py3 import RunbookListResult
-from ._models_py3 import RunbookParameter
-from ._models_py3 import RunbookUpdateParameters
-from ._models_py3 import SUCScheduleProperties
-from ._models_py3 import Schedule
-from ._models_py3 import ScheduleAssociationProperty
-from ._models_py3 import ScheduleCreateOrUpdateParameters
-from ._models_py3 import ScheduleListResult
-from ._models_py3 import ScheduleUpdateParameters
-from ._models_py3 import Sku
-from ._models_py3 import SoftwareUpdateConfiguration
-from ._models_py3 import SoftwareUpdateConfigurationCollectionItem
-from ._models_py3 import SoftwareUpdateConfigurationListResult
-from ._models_py3 import SoftwareUpdateConfigurationMachineRun
-from ._models_py3 import SoftwareUpdateConfigurationMachineRunListResult
-from ._models_py3 import SoftwareUpdateConfigurationRun
-from ._models_py3 import SoftwareUpdateConfigurationRunListResult
-from ._models_py3 import SoftwareUpdateConfigurationRunTaskProperties
-from ._models_py3 import SoftwareUpdateConfigurationRunTasks
-from ._models_py3 import SoftwareUpdateConfigurationTasks
-from ._models_py3 import SourceControl
-from ._models_py3 import SourceControlCreateOrUpdateParameters
-from ._models_py3 import SourceControlListResult
-from ._models_py3 import SourceControlSecurityTokenProperties
-from ._models_py3 import SourceControlSyncJob
-from ._models_py3 import SourceControlSyncJobById
-from ._models_py3 import SourceControlSyncJobCreateParameters
-from ._models_py3 import SourceControlSyncJobListResult
-from ._models_py3 import SourceControlSyncJobStream
-from ._models_py3 import SourceControlSyncJobStreamById
-from ._models_py3 import SourceControlSyncJobStreamsListBySyncJob
-from ._models_py3 import SourceControlUpdateParameters
-from ._models_py3 import Statistics
-from ._models_py3 import StatisticsListResult
-from ._models_py3 import SystemData
-from ._models_py3 import TagSettingsProperties
-from ._models_py3 import TargetProperties
-from ._models_py3 import TaskProperties
-from ._models_py3 import TestJob
-from ._models_py3 import TestJobCreateParameters
-from ._models_py3 import TrackedResource
-from ._models_py3 import TypeField
-from ._models_py3 import TypeFieldListResult
-from ._models_py3 import UpdateConfiguration
-from ._models_py3 import UpdateConfigurationNavigation
-from ._models_py3 import Usage
-from ._models_py3 import UsageCounterName
-from ._models_py3 import UsageListResult
-from ._models_py3 import UserAssignedIdentitiesProperties
-from ._models_py3 import Variable
-from ._models_py3 import VariableCreateOrUpdateParameters
-from ._models_py3 import VariableListResult
-from ._models_py3 import VariableUpdateParameters
-from ._models_py3 import Watcher
-from ._models_py3 import WatcherListResult
-from ._models_py3 import WatcherUpdateParameters
-from ._models_py3 import Webhook
-from ._models_py3 import WebhookCreateOrUpdateParameters
-from ._models_py3 import WebhookListResult
-from ._models_py3 import WebhookUpdateParameters
-from ._models_py3 import WindowsProperties
+from typing import TYPE_CHECKING
-from ._automation_client_enums import AgentRegistrationKeyName
-from ._automation_client_enums import AutomationAccountState
-from ._automation_client_enums import AutomationKeyName
-from ._automation_client_enums import AutomationKeyPermissions
-from ._automation_client_enums import ContentSourceType
-from ._automation_client_enums import CountType
-from ._automation_client_enums import CreatedByType
-from ._automation_client_enums import DscConfigurationState
-from ._automation_client_enums import EncryptionKeySourceType
-from ._automation_client_enums import GraphRunbookType
-from ._automation_client_enums import GroupTypeEnum
-from ._automation_client_enums import HttpStatusCode
-from ._automation_client_enums import JobProvisioningState
-from ._automation_client_enums import JobStatus
-from ._automation_client_enums import JobStreamType
-from ._automation_client_enums import LinuxUpdateClasses
-from ._automation_client_enums import ModuleProvisioningState
-from ._automation_client_enums import OperatingSystemType
-from ._automation_client_enums import ProvisioningState
-from ._automation_client_enums import ResourceIdentityType
-from ._automation_client_enums import RunbookState
-from ._automation_client_enums import RunbookTypeEnum
-from ._automation_client_enums import ScheduleDay
-from ._automation_client_enums import ScheduleFrequency
-from ._automation_client_enums import SkuNameEnum
-from ._automation_client_enums import SourceType
-from ._automation_client_enums import StreamType
-from ._automation_client_enums import SyncType
-from ._automation_client_enums import TagOperators
-from ._automation_client_enums import TokenType
-from ._automation_client_enums import WindowsUpdateClasses
-from ._automation_client_enums import WorkerType
+if TYPE_CHECKING:
+ from ._patch import * # pylint: disable=unused-wildcard-import
+
+
+from ._models_py3 import ( # type: ignore
+ Activity,
+ ActivityListResult,
+ ActivityOutputType,
+ ActivityParameter,
+ ActivityParameterSet,
+ ActivityParameterValidationSet,
+ AdvancedSchedule,
+ AdvancedScheduleMonthlyOccurrence,
+ AgentRegistration,
+ AgentRegistrationKeys,
+ AgentRegistrationRegenerateKeyParameter,
+ AutomationAccount,
+ AutomationAccountCreateOrUpdateParameters,
+ AutomationAccountListResult,
+ AutomationAccountUpdateParameters,
+ AzureQueryProperties,
+ Certificate,
+ CertificateCreateOrUpdateParameters,
+ CertificateListResult,
+ CertificateUpdateParameters,
+ Connection,
+ ConnectionCreateOrUpdateParameters,
+ ConnectionListResult,
+ ConnectionType,
+ ConnectionTypeAssociationProperty,
+ ConnectionTypeCreateOrUpdateParameters,
+ ConnectionTypeListResult,
+ ConnectionUpdateParameters,
+ ContentHash,
+ ContentLink,
+ ContentSource,
+ Credential,
+ CredentialCreateOrUpdateParameters,
+ CredentialListResult,
+ CredentialUpdateParameters,
+ DeletedAutomationAccount,
+ DeletedAutomationAccountListResult,
+ DeletedRunbook,
+ DeletedRunbookListResult,
+ Dimension,
+ DscConfiguration,
+ DscConfigurationAssociationProperty,
+ DscConfigurationCreateOrUpdateParameters,
+ DscConfigurationListResult,
+ DscConfigurationParameter,
+ DscConfigurationUpdateParameters,
+ DscMetaConfiguration,
+ DscNode,
+ DscNodeConfiguration,
+ DscNodeConfigurationCreateOrUpdateParameters,
+ DscNodeConfigurationListResult,
+ DscNodeExtensionHandlerAssociationProperty,
+ DscNodeListResult,
+ DscNodeReport,
+ DscNodeReportListResult,
+ DscNodeUpdateParameters,
+ DscNodeUpdateParametersProperties,
+ DscReportError,
+ DscReportResource,
+ DscReportResourceNavigation,
+ EncryptionProperties,
+ EncryptionPropertiesIdentity,
+ ErrorResponse,
+ FieldDefinition,
+ GraphicalRunbookContent,
+ HybridRunbookWorker,
+ HybridRunbookWorkerCreateParameters,
+ HybridRunbookWorkerGroup,
+ HybridRunbookWorkerGroupCreateOrUpdateParameters,
+ HybridRunbookWorkerGroupsListResult,
+ HybridRunbookWorkerMoveParameters,
+ HybridRunbookWorkersListResult,
+ Identity,
+ Job,
+ JobCollectionItem,
+ JobCreateParameters,
+ JobListResultV2,
+ JobNavigation,
+ JobRuntimeEnvironment,
+ JobSchedule,
+ JobScheduleCreateParameters,
+ JobScheduleListResult,
+ JobStream,
+ JobStreamListResult,
+ Key,
+ KeyListResult,
+ KeyVaultProperties,
+ LinkedWorkspace,
+ LinuxProperties,
+ LogSpecification,
+ MetricSpecification,
+ Module,
+ ModuleCreateOrUpdateParameters,
+ ModuleErrorInfo,
+ ModuleListResult,
+ ModuleUpdateParameters,
+ NodeCount,
+ NodeCountProperties,
+ NodeCounts,
+ NonAzureQueryProperties,
+ Operation,
+ OperationDisplay,
+ OperationListResult,
+ OperationPropertiesFormatServiceSpecification,
+ Package,
+ PackageCreateOrUpdateParameters,
+ PackageErrorInfo,
+ PackageListResult,
+ PackageUpdateParameters,
+ PrivateEndpointConnection,
+ PrivateEndpointConnectionListResult,
+ PrivateEndpointProperty,
+ PrivateLinkResource,
+ PrivateLinkResourceListResult,
+ PrivateLinkServiceConnectionStateProperty,
+ ProxyResource,
+ PythonPackageCreateParameters,
+ PythonPackageUpdateParameters,
+ RawGraphicalRunbookContent,
+ Resource,
+ RunAsCredentialAssociationProperty,
+ Runbook,
+ RunbookAssociationProperty,
+ RunbookCreateOrUpdateDraftParameters,
+ RunbookCreateOrUpdateDraftProperties,
+ RunbookCreateOrUpdateParameters,
+ RunbookDraft,
+ RunbookDraftUndoEditResult,
+ RunbookListResult,
+ RunbookParameter,
+ RunbookUpdateParameters,
+ RuntimeEnvironment,
+ RuntimeEnvironmentListResult,
+ RuntimeEnvironmentUpdateParameters,
+ SUCScheduleProperties,
+ Schedule,
+ ScheduleAssociationProperty,
+ ScheduleCreateOrUpdateParameters,
+ ScheduleListResult,
+ ScheduleUpdateParameters,
+ Sku,
+ SoftwareUpdateConfiguration,
+ SoftwareUpdateConfigurationCollectionItem,
+ SoftwareUpdateConfigurationListResult,
+ SoftwareUpdateConfigurationMachineRun,
+ SoftwareUpdateConfigurationMachineRunListResult,
+ SoftwareUpdateConfigurationRun,
+ SoftwareUpdateConfigurationRunListResult,
+ SoftwareUpdateConfigurationRunTaskProperties,
+ SoftwareUpdateConfigurationRunTasks,
+ SoftwareUpdateConfigurationTasks,
+ SourceControl,
+ SourceControlCreateOrUpdateParameters,
+ SourceControlListResult,
+ SourceControlSecurityTokenProperties,
+ SourceControlSyncJob,
+ SourceControlSyncJobById,
+ SourceControlSyncJobCreateParameters,
+ SourceControlSyncJobListResult,
+ SourceControlSyncJobStream,
+ SourceControlSyncJobStreamById,
+ SourceControlSyncJobStreamsListBySyncJob,
+ SourceControlUpdateParameters,
+ Statistics,
+ StatisticsListResult,
+ SystemData,
+ TagSettingsProperties,
+ TargetProperties,
+ TaskProperties,
+ TestJob,
+ TestJobCreateParameters,
+ TrackedResource,
+ TypeField,
+ TypeFieldListResult,
+ UpdateConfiguration,
+ UpdateConfigurationNavigation,
+ Usage,
+ UsageCounterName,
+ UsageListResult,
+ UserAssignedIdentitiesProperties,
+ Variable,
+ VariableCreateOrUpdateParameters,
+ VariableListResult,
+ VariableUpdateParameters,
+ Watcher,
+ WatcherListResult,
+ WatcherUpdateParameters,
+ Webhook,
+ WebhookCreateOrUpdateParameters,
+ WebhookListResult,
+ WebhookUpdateParameters,
+ WindowsProperties,
+)
+
+from ._automation_client_enums import ( # type: ignore
+ AgentRegistrationKeyName,
+ AutomationAccountState,
+ AutomationKeyName,
+ AutomationKeyPermissions,
+ ContentSourceType,
+ CountType,
+ CreatedByType,
+ DscConfigurationState,
+ EncryptionKeySourceType,
+ GraphRunbookType,
+ GroupTypeEnum,
+ HttpStatusCode,
+ JobProvisioningState,
+ JobStatus,
+ JobStreamType,
+ LinuxUpdateClasses,
+ ModuleProvisioningState,
+ OperatingSystemType,
+ PackageProvisioningState,
+ ProvisioningState,
+ ResourceIdentityType,
+ RunbookState,
+ RunbookTypeEnum,
+ ScheduleDay,
+ ScheduleFrequency,
+ SkuNameEnum,
+ SourceType,
+ StreamType,
+ SyncType,
+ TagOperators,
+ TokenType,
+ WindowsUpdateClasses,
+ WorkerType,
+)
from ._patch import __all__ as _patch_all
-from ._patch import * # pylint: disable=unused-wildcard-import
+from ._patch import *
from ._patch import patch_sdk as _patch_sdk
__all__ = [
@@ -265,10 +285,9 @@
"CredentialUpdateParameters",
"DeletedAutomationAccount",
"DeletedAutomationAccountListResult",
+ "DeletedRunbook",
+ "DeletedRunbookListResult",
"Dimension",
- "DscCompilationJob",
- "DscCompilationJobCreateParameters",
- "DscCompilationJobListResult",
"DscConfiguration",
"DscConfigurationAssociationProperty",
"DscConfigurationCreateOrUpdateParameters",
@@ -307,6 +326,7 @@
"JobCreateParameters",
"JobListResultV2",
"JobNavigation",
+ "JobRuntimeEnvironment",
"JobSchedule",
"JobScheduleCreateParameters",
"JobScheduleListResult",
@@ -332,6 +352,11 @@
"OperationDisplay",
"OperationListResult",
"OperationPropertiesFormatServiceSpecification",
+ "Package",
+ "PackageCreateOrUpdateParameters",
+ "PackageErrorInfo",
+ "PackageListResult",
+ "PackageUpdateParameters",
"PrivateEndpointConnection",
"PrivateEndpointConnectionListResult",
"PrivateEndpointProperty",
@@ -354,6 +379,9 @@
"RunbookListResult",
"RunbookParameter",
"RunbookUpdateParameters",
+ "RuntimeEnvironment",
+ "RuntimeEnvironmentListResult",
+ "RuntimeEnvironmentUpdateParameters",
"SUCScheduleProperties",
"Schedule",
"ScheduleAssociationProperty",
@@ -430,6 +458,7 @@
"LinuxUpdateClasses",
"ModuleProvisioningState",
"OperatingSystemType",
+ "PackageProvisioningState",
"ProvisioningState",
"ResourceIdentityType",
"RunbookState",
@@ -445,5 +474,5 @@
"WindowsUpdateClasses",
"WorkerType",
]
-__all__.extend([p for p in _patch_all if p not in __all__])
+__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
_patch_sdk()
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/models/_automation_client_enums.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/models/_automation_client_enums.py
index d1b234768c1e..ed31cdcd53fc 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/models/_automation_client_enums.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/models/_automation_client_enums.py
@@ -209,7 +209,7 @@ class ModuleProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
MODULE_IMPORT_RUNBOOK_COMPLETE = "ModuleImportRunbookComplete"
SUCCEEDED = "Succeeded"
FAILED = "Failed"
- CANCELLED = "Cancelled"
+ CANCELED = "Canceled"
UPDATING = "Updating"
@@ -220,6 +220,27 @@ class OperatingSystemType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
LINUX = "Linux"
+class PackageProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """Gets or sets the provisioning state of the Package."""
+
+ CREATED = "Created"
+ CREATING = "Creating"
+ STARTING_IMPORT_MODULE_RUNBOOK = "StartingImportModuleRunbook"
+ RUNNING_IMPORT_MODULE_RUNBOOK = "RunningImportModuleRunbook"
+ CONTENT_RETRIEVED = "ContentRetrieved"
+ CONTENT_DOWNLOADED = "ContentDownloaded"
+ CONTENT_VALIDATED = "ContentValidated"
+ CONNECTION_TYPE_IMPORTED = "ConnectionTypeImported"
+ CONTENT_STORED = "ContentStored"
+ MODULE_DATA_STORED = "ModuleDataStored"
+ ACTIVITIES_STORED = "ActivitiesStored"
+ MODULE_IMPORT_RUNBOOK_COMPLETE = "ModuleImportRunbookComplete"
+ SUCCEEDED = "Succeeded"
+ FAILED = "Failed"
+ CANCELED = "Canceled"
+ UPDATING = "Updating"
+
+
class ProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""The provisioning state of the job."""
@@ -256,6 +277,8 @@ class RunbookTypeEnum(str, Enum, metaclass=CaseInsensitiveEnumMeta):
GRAPH_POWER_SHELL = "GraphPowerShell"
PYTHON2 = "Python2"
PYTHON3 = "Python3"
+ PYTHON = "Python"
+ POWER_SHELL72 = "PowerShell72"
class ScheduleDay(str, Enum, metaclass=CaseInsensitiveEnumMeta):
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/models/_models_py3.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/models/_models_py3.py
index fc62b1c71a21..aec032bb4729 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/models/_models_py3.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/models/_models_py3.py
@@ -1,5 +1,5 @@
-# coding=utf-8
# 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.
@@ -16,10 +16,9 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
if TYPE_CHECKING:
- # pylint: disable=unused-import,ungrouped-imports
from .. import models as _models
JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object
@@ -495,28 +494,35 @@ def __init__(self, *, key_name: Union[str, "_models.AgentRegistrationKeyName"],
class Resource(_serialization.Model):
- """The core properties of ARM resources.
+ """Common fields that are returned in the response for all Azure Resource Manager resources.
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource.
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
+ :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
+ information.
+ :vartype system_data: ~azure.mgmt.automation.models.SystemData
"""
_validation = {
"id": {"readonly": True},
"name": {"readonly": True},
"type": {"readonly": True},
+ "system_data": {"readonly": True},
}
_attribute_map = {
"id": {"key": "id", "type": "str"},
"name": {"key": "name", "type": "str"},
"type": {"key": "type", "type": "str"},
+ "system_data": {"key": "systemData", "type": "SystemData"},
}
def __init__(self, **kwargs: Any) -> None:
@@ -525,22 +531,31 @@ def __init__(self, **kwargs: Any) -> None:
self.id = None
self.name = None
self.type = None
+ self.system_data = None
class TrackedResource(Resource):
- """The resource model definition for a ARM tracked top level resource.
+ """The resource model definition for an Azure Resource Manager tracked top level resource which
+ has 'tags' and a 'location'.
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource.
+ All required parameters must be populated in order to send to server.
+
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
+ :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
+ information.
+ :vartype system_data: ~azure.mgmt.automation.models.SystemData
:ivar tags: Resource tags.
:vartype tags: dict[str, str]
- :ivar location: The Azure Region where the resource lives.
+ :ivar location: The geo-location where the resource lives. Required.
:vartype location: str
"""
@@ -548,21 +563,24 @@ class TrackedResource(Resource):
"id": {"readonly": True},
"name": {"readonly": True},
"type": {"readonly": True},
+ "system_data": {"readonly": True},
+ "location": {"required": True},
}
_attribute_map = {
"id": {"key": "id", "type": "str"},
"name": {"key": "name", "type": "str"},
"type": {"key": "type", "type": "str"},
+ "system_data": {"key": "systemData", "type": "SystemData"},
"tags": {"key": "tags", "type": "{str}"},
"location": {"key": "location", "type": "str"},
}
- def __init__(self, *, tags: Optional[Dict[str, str]] = None, location: Optional[str] = None, **kwargs: Any) -> None:
+ def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None:
"""
:keyword tags: Resource tags.
:paramtype tags: dict[str, str]
- :keyword location: The Azure Region where the resource lives.
+ :keyword location: The geo-location where the resource lives. Required.
:paramtype location: str
"""
super().__init__(**kwargs)
@@ -570,27 +588,32 @@ def __init__(self, *, tags: Optional[Dict[str, str]] = None, location: Optional[
self.location = location
-class AutomationAccount(TrackedResource): # pylint: disable=too-many-instance-attributes
+class AutomationAccount(TrackedResource):
"""Definition of the automation account type.
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource.
+ All required parameters must be populated in order to send to server.
+
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
+ :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
+ information.
+ :vartype system_data: ~azure.mgmt.automation.models.SystemData
:ivar tags: Resource tags.
:vartype tags: dict[str, str]
- :ivar location: The Azure Region where the resource lives.
+ :ivar location: The geo-location where the resource lives. Required.
:vartype location: str
:ivar etag: Gets or sets the etag of the resource.
:vartype etag: str
:ivar identity: Identity for the resource.
:vartype identity: ~azure.mgmt.automation.models.Identity
- :ivar system_data: Resource system metadata.
- :vartype system_data: ~azure.mgmt.automation.models.SystemData
:ivar sku: Gets or sets the SKU of account.
:vartype sku: ~azure.mgmt.automation.models.Sku
:ivar last_modified_by: Gets or sets the last modified by.
@@ -624,6 +647,7 @@ class AutomationAccount(TrackedResource): # pylint: disable=too-many-instance-a
"name": {"readonly": True},
"type": {"readonly": True},
"system_data": {"readonly": True},
+ "location": {"required": True},
"state": {"readonly": True},
"creation_time": {"readonly": True},
"last_modified_time": {"readonly": True},
@@ -633,11 +657,11 @@ class AutomationAccount(TrackedResource): # pylint: disable=too-many-instance-a
"id": {"key": "id", "type": "str"},
"name": {"key": "name", "type": "str"},
"type": {"key": "type", "type": "str"},
+ "system_data": {"key": "systemData", "type": "SystemData"},
"tags": {"key": "tags", "type": "{str}"},
"location": {"key": "location", "type": "str"},
"etag": {"key": "etag", "type": "str"},
"identity": {"key": "identity", "type": "Identity"},
- "system_data": {"key": "systemData", "type": "SystemData"},
"sku": {"key": "properties.sku", "type": "Sku"},
"last_modified_by": {"key": "properties.lastModifiedBy", "type": "str"},
"state": {"key": "properties.state", "type": "str"},
@@ -657,8 +681,8 @@ class AutomationAccount(TrackedResource): # pylint: disable=too-many-instance-a
def __init__(
self,
*,
+ location: str,
tags: Optional[Dict[str, str]] = None,
- location: Optional[str] = None,
etag: Optional[str] = None,
identity: Optional["_models.Identity"] = None,
sku: Optional["_models.Sku"] = None,
@@ -674,7 +698,7 @@ def __init__(
"""
:keyword tags: Resource tags.
:paramtype tags: dict[str, str]
- :keyword location: The Azure Region where the resource lives.
+ :keyword location: The geo-location where the resource lives. Required.
:paramtype location: str
:keyword etag: Gets or sets the etag of the resource.
:paramtype etag: str
@@ -705,7 +729,6 @@ def __init__(
super().__init__(tags=tags, location=location, **kwargs)
self.etag = etag
self.identity = identity
- self.system_data = None
self.sku = sku
self.last_modified_by = last_modified_by
self.state = None
@@ -945,16 +968,22 @@ def __init__(
class ProxyResource(Resource):
- """ARM proxy resource.
+ """The resource model definition for a Azure Resource Manager proxy resource. It will not have
+ tags and a location.
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource.
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
+ :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
+ information.
+ :vartype system_data: ~azure.mgmt.automation.models.SystemData
"""
@@ -963,12 +992,17 @@ class Certificate(ProxyResource):
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource.
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
+ :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
+ information.
+ :vartype system_data: ~azure.mgmt.automation.models.SystemData
:ivar thumbprint: Gets the thumbprint of the certificate.
:vartype thumbprint: str
:ivar expiry_time: Gets the expiry time of the certificate.
@@ -987,6 +1021,7 @@ class Certificate(ProxyResource):
"id": {"readonly": True},
"name": {"readonly": True},
"type": {"readonly": True},
+ "system_data": {"readonly": True},
"thumbprint": {"readonly": True},
"expiry_time": {"readonly": True},
"is_exportable": {"readonly": True},
@@ -998,6 +1033,7 @@ class Certificate(ProxyResource):
"id": {"key": "id", "type": "str"},
"name": {"key": "name", "type": "str"},
"type": {"key": "type", "type": "str"},
+ "system_data": {"key": "systemData", "type": "SystemData"},
"thumbprint": {"key": "properties.thumbprint", "type": "str"},
"expiry_time": {"key": "properties.expiryTime", "type": "iso-8601"},
"is_exportable": {"key": "properties.isExportable", "type": "bool"},
@@ -1139,12 +1175,17 @@ class Connection(ProxyResource):
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource.
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
+ :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
+ information.
+ :vartype system_data: ~azure.mgmt.automation.models.SystemData
:ivar connection_type: Gets or sets the connectionType of the connection.
:vartype connection_type: ~azure.mgmt.automation.models.ConnectionTypeAssociationProperty
:ivar field_definition_values: Gets the field definition values of the connection.
@@ -1161,6 +1202,7 @@ class Connection(ProxyResource):
"id": {"readonly": True},
"name": {"readonly": True},
"type": {"readonly": True},
+ "system_data": {"readonly": True},
"field_definition_values": {"readonly": True},
"creation_time": {"readonly": True},
"last_modified_time": {"readonly": True},
@@ -1170,6 +1212,7 @@ class Connection(ProxyResource):
"id": {"key": "id", "type": "str"},
"name": {"key": "name", "type": "str"},
"type": {"key": "type", "type": "str"},
+ "system_data": {"key": "systemData", "type": "SystemData"},
"connection_type": {"key": "properties.connectionType", "type": "ConnectionTypeAssociationProperty"},
"field_definition_values": {"key": "properties.fieldDefinitionValues", "type": "{str}"},
"creation_time": {"key": "properties.creationTime", "type": "iso-8601"},
@@ -1519,7 +1562,7 @@ def __init__(self, *, algorithm: str, value: str, **kwargs: Any) -> None:
class ContentLink(_serialization.Model):
"""Definition of the content link.
- :ivar uri: Gets or sets the uri of the runbook content.
+ :ivar uri: Gets or sets the uri of content.
:vartype uri: str
:ivar content_hash: Gets or sets the hash.
:vartype content_hash: ~azure.mgmt.automation.models.ContentHash
@@ -1542,7 +1585,7 @@ def __init__(
**kwargs: Any
) -> None:
"""
- :keyword uri: Gets or sets the uri of the runbook content.
+ :keyword uri: Gets or sets the uri of content.
:paramtype uri: str
:keyword content_hash: Gets or sets the hash.
:paramtype content_hash: ~azure.mgmt.automation.models.ContentHash
@@ -1609,12 +1652,17 @@ class Credential(ProxyResource):
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource.
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
+ :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
+ information.
+ :vartype system_data: ~azure.mgmt.automation.models.SystemData
:ivar user_name: Gets the user name of the credential.
:vartype user_name: str
:ivar creation_time: Gets the creation time.
@@ -1629,6 +1677,7 @@ class Credential(ProxyResource):
"id": {"readonly": True},
"name": {"readonly": True},
"type": {"readonly": True},
+ "system_data": {"readonly": True},
"user_name": {"readonly": True},
"creation_time": {"readonly": True},
"last_modified_time": {"readonly": True},
@@ -1638,6 +1687,7 @@ class Credential(ProxyResource):
"id": {"key": "id", "type": "str"},
"name": {"key": "name", "type": "str"},
"type": {"key": "type", "type": "str"},
+ "system_data": {"key": "systemData", "type": "SystemData"},
"user_name": {"key": "properties.userName", "type": "str"},
"creation_time": {"key": "properties.creationTime", "type": "iso-8601"},
"last_modified_time": {"key": "properties.lastModifiedTime", "type": "iso-8601"},
@@ -1875,249 +1925,107 @@ def __init__(self, *, value: Optional[List["_models.DeletedAutomationAccount"]]
self.value = value
-class Dimension(_serialization.Model):
- """Dimension of the metric.
-
- :ivar name: The name of the dimension.
- :vartype name: str
- :ivar display_name: The display name of the dimension.
- :vartype display_name: str
- """
-
- _attribute_map = {
- "name": {"key": "name", "type": "str"},
- "display_name": {"key": "displayName", "type": "str"},
- }
-
- def __init__(self, *, name: Optional[str] = None, display_name: Optional[str] = None, **kwargs: Any) -> None:
- """
- :keyword name: The name of the dimension.
- :paramtype name: str
- :keyword display_name: The display name of the dimension.
- :paramtype display_name: str
- """
- super().__init__(**kwargs)
- self.name = name
- self.display_name = display_name
-
-
-class DscCompilationJob(ProxyResource): # pylint: disable=too-many-instance-attributes
- """Definition of the Dsc Compilation job.
-
- Variables are only populated by the server, and will be ignored when sending a request.
+class DeletedRunbook(_serialization.Model):
+ """Definition of deleted runbook.
- :ivar id: Fully qualified resource Id for the resource.
+ :ivar id: The resource id.
:vartype id: str
- :ivar name: The name of the resource.
- :vartype name: str
- :ivar type: The type of the resource.
- :vartype type: str
- :ivar configuration: Gets or sets the configuration.
- :vartype configuration: ~azure.mgmt.automation.models.DscConfigurationAssociationProperty
- :ivar started_by: Gets the compilation job started by.
- :vartype started_by: str
- :ivar job_id: Gets the id of the job.
- :vartype job_id: str
- :ivar creation_time: Gets the creation time of the job.
- :vartype creation_time: ~datetime.datetime
- :ivar provisioning_state: The current provisioning state of the job. Known values are:
- "Failed", "Succeeded", "Suspended", and "Processing".
- :vartype provisioning_state: str or ~azure.mgmt.automation.models.JobProvisioningState
- :ivar run_on: Gets or sets the runOn which specifies the group name where the job is to be
- executed.
- :vartype run_on: str
- :ivar status: Gets or sets the status of the job. Known values are: "New", "Activating",
- "Running", "Completed", "Failed", "Stopped", "Blocked", "Suspended", "Disconnected",
- "Suspending", "Stopping", "Resuming", and "Removing".
- :vartype status: str or ~azure.mgmt.automation.models.JobStatus
- :ivar status_details: Gets or sets the status details of the job.
- :vartype status_details: str
- :ivar start_time: Gets the start time of the job.
- :vartype start_time: ~datetime.datetime
- :ivar end_time: Gets the end time of the job.
- :vartype end_time: ~datetime.datetime
- :ivar exception: Gets the exception of the job.
- :vartype exception: str
- :ivar last_modified_time: Gets the last modified time of the job.
- :vartype last_modified_time: ~datetime.datetime
- :ivar last_status_modified_time: Gets the last status modified time of the job.
- :vartype last_status_modified_time: ~datetime.datetime
- :ivar parameters: Gets or sets the parameters of the job.
- :vartype parameters: dict[str, str]
- """
-
- _validation = {
- "id": {"readonly": True},
- "name": {"readonly": True},
- "type": {"readonly": True},
- "started_by": {"readonly": True},
- "job_id": {"readonly": True},
- "creation_time": {"readonly": True},
- "start_time": {"readonly": True},
- "end_time": {"readonly": True},
- "exception": {"readonly": True},
- "last_modified_time": {"readonly": True},
- "last_status_modified_time": {"readonly": True},
- }
-
- _attribute_map = {
- "id": {"key": "id", "type": "str"},
- "name": {"key": "name", "type": "str"},
- "type": {"key": "type", "type": "str"},
- "configuration": {"key": "properties.configuration", "type": "DscConfigurationAssociationProperty"},
- "started_by": {"key": "properties.startedBy", "type": "str"},
- "job_id": {"key": "properties.jobId", "type": "str"},
- "creation_time": {"key": "properties.creationTime", "type": "iso-8601"},
- "provisioning_state": {"key": "properties.provisioningState", "type": "str"},
- "run_on": {"key": "properties.runOn", "type": "str"},
- "status": {"key": "properties.status", "type": "str"},
- "status_details": {"key": "properties.statusDetails", "type": "str"},
- "start_time": {"key": "properties.startTime", "type": "iso-8601"},
- "end_time": {"key": "properties.endTime", "type": "iso-8601"},
- "exception": {"key": "properties.exception", "type": "str"},
- "last_modified_time": {"key": "properties.lastModifiedTime", "type": "iso-8601"},
- "last_status_modified_time": {"key": "properties.lastStatusModifiedTime", "type": "iso-8601"},
- "parameters": {"key": "properties.parameters", "type": "{str}"},
- }
-
- def __init__(
- self,
- *,
- configuration: Optional["_models.DscConfigurationAssociationProperty"] = None,
- provisioning_state: Optional[Union[str, "_models.JobProvisioningState"]] = None,
- run_on: Optional[str] = None,
- status: Optional[Union[str, "_models.JobStatus"]] = None,
- status_details: Optional[str] = None,
- parameters: Optional[Dict[str, str]] = None,
- **kwargs: Any
- ) -> None:
- """
- :keyword configuration: Gets or sets the configuration.
- :paramtype configuration: ~azure.mgmt.automation.models.DscConfigurationAssociationProperty
- :keyword provisioning_state: The current provisioning state of the job. Known values are:
- "Failed", "Succeeded", "Suspended", and "Processing".
- :paramtype provisioning_state: str or ~azure.mgmt.automation.models.JobProvisioningState
- :keyword run_on: Gets or sets the runOn which specifies the group name where the job is to be
- executed.
- :paramtype run_on: str
- :keyword status: Gets or sets the status of the job. Known values are: "New", "Activating",
- "Running", "Completed", "Failed", "Stopped", "Blocked", "Suspended", "Disconnected",
- "Suspending", "Stopping", "Resuming", and "Removing".
- :paramtype status: str or ~azure.mgmt.automation.models.JobStatus
- :keyword status_details: Gets or sets the status details of the job.
- :paramtype status_details: str
- :keyword parameters: Gets or sets the parameters of the job.
- :paramtype parameters: dict[str, str]
- """
- super().__init__(**kwargs)
- self.configuration = configuration
- self.started_by = None
- self.job_id = None
- self.creation_time = None
- self.provisioning_state = provisioning_state
- self.run_on = run_on
- self.status = status
- self.status_details = status_details
- self.start_time = None
- self.end_time = None
- self.exception = None
- self.last_modified_time = None
- self.last_status_modified_time = None
- self.parameters = parameters
-
-
-class DscCompilationJobCreateParameters(_serialization.Model):
- """The parameters supplied to the create compilation job operation.
-
- All required parameters must be populated in order to send to server.
-
:ivar name: Gets or sets name of the resource.
:vartype name: str
:ivar location: Gets or sets the location of the resource.
:vartype location: str
- :ivar tags: Gets or sets the tags attached to the resource.
- :vartype tags: dict[str, str]
- :ivar configuration: Gets or sets the configuration. Required.
- :vartype configuration: ~azure.mgmt.automation.models.DscConfigurationAssociationProperty
- :ivar parameters: Gets or sets the parameters of the job.
- :vartype parameters: dict[str, str]
- :ivar increment_node_configuration_build: If a new build version of NodeConfiguration is
- required.
- :vartype increment_node_configuration_build: bool
+ :ivar runbook_id: Gets or sets the Runbook Id.
+ :vartype runbook_id: str
+ :ivar runbook_type: Type of the runbook.
+ :vartype runbook_type: str
+ :ivar runtime: Gets or sets runtime of the runbook.
+ :vartype runtime: str
+ :ivar runtime_environment: Environment of the runbook.
+ :vartype runtime_environment: str
+ :ivar creation_time: Gets or sets the creation time.
+ :vartype creation_time: ~datetime.datetime
+ :ivar deletion_time: Gets or sets the last modified time.
+ :vartype deletion_time: ~datetime.datetime
"""
- _validation = {
- "configuration": {"required": True},
- }
-
_attribute_map = {
+ "id": {"key": "id", "type": "str"},
"name": {"key": "name", "type": "str"},
"location": {"key": "location", "type": "str"},
- "tags": {"key": "tags", "type": "{str}"},
- "configuration": {"key": "properties.configuration", "type": "DscConfigurationAssociationProperty"},
- "parameters": {"key": "properties.parameters", "type": "{str}"},
- "increment_node_configuration_build": {"key": "properties.incrementNodeConfigurationBuild", "type": "bool"},
+ "runbook_id": {"key": "properties.runbookId", "type": "str"},
+ "runbook_type": {"key": "properties.runbookType", "type": "str"},
+ "runtime": {"key": "properties.runtime", "type": "str"},
+ "runtime_environment": {"key": "properties.runtimeEnvironment", "type": "str"},
+ "creation_time": {"key": "properties.creationTime", "type": "iso-8601"},
+ "deletion_time": {"key": "properties.deletionTime", "type": "iso-8601"},
}
def __init__(
self,
*,
- configuration: "_models.DscConfigurationAssociationProperty",
+ id: Optional[str] = None, # pylint: disable=redefined-builtin
name: Optional[str] = None,
location: Optional[str] = None,
- tags: Optional[Dict[str, str]] = None,
- parameters: Optional[Dict[str, str]] = None,
- increment_node_configuration_build: Optional[bool] = None,
+ runbook_id: Optional[str] = None,
+ runbook_type: Optional[str] = None,
+ runtime: Optional[str] = None,
+ runtime_environment: Optional[str] = None,
+ creation_time: Optional[datetime.datetime] = None,
+ deletion_time: Optional[datetime.datetime] = None,
**kwargs: Any
) -> None:
"""
+ :keyword id: The resource id.
+ :paramtype id: str
:keyword name: Gets or sets name of the resource.
:paramtype name: str
:keyword location: Gets or sets the location of the resource.
:paramtype location: str
- :keyword tags: Gets or sets the tags attached to the resource.
- :paramtype tags: dict[str, str]
- :keyword configuration: Gets or sets the configuration. Required.
- :paramtype configuration: ~azure.mgmt.automation.models.DscConfigurationAssociationProperty
- :keyword parameters: Gets or sets the parameters of the job.
- :paramtype parameters: dict[str, str]
- :keyword increment_node_configuration_build: If a new build version of NodeConfiguration is
- required.
- :paramtype increment_node_configuration_build: bool
+ :keyword runbook_id: Gets or sets the Runbook Id.
+ :paramtype runbook_id: str
+ :keyword runbook_type: Type of the runbook.
+ :paramtype runbook_type: str
+ :keyword runtime: Gets or sets runtime of the runbook.
+ :paramtype runtime: str
+ :keyword runtime_environment: Environment of the runbook.
+ :paramtype runtime_environment: str
+ :keyword creation_time: Gets or sets the creation time.
+ :paramtype creation_time: ~datetime.datetime
+ :keyword deletion_time: Gets or sets the last modified time.
+ :paramtype deletion_time: ~datetime.datetime
"""
super().__init__(**kwargs)
+ self.id = id
self.name = name
self.location = location
- self.tags = tags
- self.configuration = configuration
- self.parameters = parameters
- self.increment_node_configuration_build = increment_node_configuration_build
+ self.runbook_id = runbook_id
+ self.runbook_type = runbook_type
+ self.runtime = runtime
+ self.runtime_environment = runtime_environment
+ self.creation_time = creation_time
+ self.deletion_time = deletion_time
-class DscCompilationJobListResult(_serialization.Model):
- """The response model for the list job operation.
+class DeletedRunbookListResult(_serialization.Model):
+ """The response model for the list deleted runbook.
- :ivar value: Gets or sets a list of Dsc Compilation jobs.
- :vartype value: list[~azure.mgmt.automation.models.DscCompilationJob]
+ :ivar value: List of deleted runbooks in automation account.
+ :vartype value: list[~azure.mgmt.automation.models.DeletedRunbook]
:ivar next_link: Gets or sets the next link.
:vartype next_link: str
"""
_attribute_map = {
- "value": {"key": "value", "type": "[DscCompilationJob]"},
+ "value": {"key": "value", "type": "[DeletedRunbook]"},
"next_link": {"key": "nextLink", "type": "str"},
}
def __init__(
- self,
- *,
- value: Optional[List["_models.DscCompilationJob"]] = None,
- next_link: Optional[str] = None,
- **kwargs: Any
+ self, *, value: Optional[List["_models.DeletedRunbook"]] = None, next_link: Optional[str] = None, **kwargs: Any
) -> None:
"""
- :keyword value: Gets or sets a list of Dsc Compilation jobs.
- :paramtype value: list[~azure.mgmt.automation.models.DscCompilationJob]
+ :keyword value: List of deleted runbooks in automation account.
+ :paramtype value: list[~azure.mgmt.automation.models.DeletedRunbook]
:keyword next_link: Gets or sets the next link.
:paramtype next_link: str
"""
@@ -2126,20 +2034,53 @@ def __init__(
self.next_link = next_link
-class DscConfiguration(TrackedResource): # pylint: disable=too-many-instance-attributes
+class Dimension(_serialization.Model):
+ """Dimension of the metric.
+
+ :ivar name: The name of the dimension.
+ :vartype name: str
+ :ivar display_name: The display name of the dimension.
+ :vartype display_name: str
+ """
+
+ _attribute_map = {
+ "name": {"key": "name", "type": "str"},
+ "display_name": {"key": "displayName", "type": "str"},
+ }
+
+ def __init__(self, *, name: Optional[str] = None, display_name: Optional[str] = None, **kwargs: Any) -> None:
+ """
+ :keyword name: The name of the dimension.
+ :paramtype name: str
+ :keyword display_name: The display name of the dimension.
+ :paramtype display_name: str
+ """
+ super().__init__(**kwargs)
+ self.name = name
+ self.display_name = display_name
+
+
+class DscConfiguration(TrackedResource):
"""Definition of the configuration type.
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource.
+ All required parameters must be populated in order to send to server.
+
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
+ :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
+ information.
+ :vartype system_data: ~azure.mgmt.automation.models.SystemData
:ivar tags: Resource tags.
:vartype tags: dict[str, str]
- :ivar location: The Azure Region where the resource lives.
+ :ivar location: The geo-location where the resource lives. Required.
:vartype location: str
:ivar etag: Gets or sets the etag of the resource.
:vartype etag: str
@@ -2171,12 +2112,15 @@ class DscConfiguration(TrackedResource): # pylint: disable=too-many-instance-at
"id": {"readonly": True},
"name": {"readonly": True},
"type": {"readonly": True},
+ "system_data": {"readonly": True},
+ "location": {"required": True},
}
_attribute_map = {
"id": {"key": "id", "type": "str"},
"name": {"key": "name", "type": "str"},
"type": {"key": "type", "type": "str"},
+ "system_data": {"key": "systemData", "type": "SystemData"},
"tags": {"key": "tags", "type": "{str}"},
"location": {"key": "location", "type": "str"},
"etag": {"key": "etag", "type": "str"},
@@ -2195,8 +2139,8 @@ class DscConfiguration(TrackedResource): # pylint: disable=too-many-instance-at
def __init__(
self,
*,
+ location: str,
tags: Optional[Dict[str, str]] = None,
- location: Optional[str] = None,
etag: Optional[str] = None,
provisioning_state: Optional[Literal["Succeeded"]] = None,
job_count: Optional[int] = None,
@@ -2213,7 +2157,7 @@ def __init__(
"""
:keyword tags: Resource tags.
:paramtype tags: dict[str, str]
- :keyword location: The Azure Region where the resource lives.
+ :keyword location: The geo-location where the resource lives. Required.
:paramtype location: str
:keyword etag: Gets or sets the etag of the resource.
:paramtype etag: str
@@ -2585,17 +2529,22 @@ def __init__(
self.allow_module_overwrite = allow_module_overwrite
-class DscNode(ProxyResource): # pylint: disable=too-many-instance-attributes
+class DscNode(ProxyResource):
"""Definition of a DscNode.
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource.
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
+ :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
+ information.
+ :vartype system_data: ~azure.mgmt.automation.models.SystemData
:ivar last_seen: Gets or sets the last seen time of the node.
:vartype last_seen: ~datetime.datetime
:ivar registration_time: Gets or sets the registration time of the node.
@@ -2624,12 +2573,14 @@ class DscNode(ProxyResource): # pylint: disable=too-many-instance-attributes
"id": {"readonly": True},
"name": {"readonly": True},
"type": {"readonly": True},
+ "system_data": {"readonly": True},
}
_attribute_map = {
"id": {"key": "id", "type": "str"},
"name": {"key": "name", "type": "str"},
"type": {"key": "type", "type": "str"},
+ "system_data": {"key": "systemData", "type": "SystemData"},
"last_seen": {"key": "properties.lastSeen", "type": "iso-8601"},
"registration_time": {"key": "properties.registrationTime", "type": "iso-8601"},
"ip": {"key": "properties.ip", "type": "str"},
@@ -2702,12 +2653,17 @@ class DscNodeConfiguration(ProxyResource):
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource.
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
+ :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
+ information.
+ :vartype system_data: ~azure.mgmt.automation.models.SystemData
:ivar last_modified_time: Gets or sets the last modified time.
:vartype last_modified_time: ~datetime.datetime
:ivar creation_time: Gets or sets creation time.
@@ -2727,12 +2683,14 @@ class DscNodeConfiguration(ProxyResource):
"id": {"readonly": True},
"name": {"readonly": True},
"type": {"readonly": True},
+ "system_data": {"readonly": True},
}
_attribute_map = {
"id": {"key": "id", "type": "str"},
"name": {"key": "name", "type": "str"},
"type": {"key": "type", "type": "str"},
+ "system_data": {"key": "systemData", "type": "SystemData"},
"last_modified_time": {"key": "properties.lastModifiedTime", "type": "iso-8601"},
"creation_time": {"key": "properties.creationTime", "type": "iso-8601"},
"configuration": {"key": "properties.configuration", "type": "DscConfigurationAssociationProperty"},
@@ -2935,7 +2893,7 @@ def __init__(
self.total_count = total_count
-class DscNodeReport(_serialization.Model): # pylint: disable=too-many-instance-attributes
+class DscNodeReport(_serialization.Model):
"""Definition of the dsc node report type.
:ivar end_time: Gets or sets the end time of the node report.
@@ -3501,19 +3459,28 @@ def __init__(
self.graph_runbook_json = graph_runbook_json
-class HybridRunbookWorker(Resource):
+class HybridRunbookWorker(TrackedResource):
"""Definition of hybrid runbook worker.
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource.
+ All required parameters must be populated in order to send to server.
+
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
- :ivar system_data: Resource system metadata.
+ :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
+ information.
:vartype system_data: ~azure.mgmt.automation.models.SystemData
+ :ivar tags: Resource tags.
+ :vartype tags: dict[str, str]
+ :ivar location: The geo-location where the resource lives. Required.
+ :vartype location: str
:ivar ip: Gets or sets the assigned machine IP address.
:vartype ip: str
:ivar registered_date_time: Gets or sets the registration time of the worker machine.
@@ -3533,6 +3500,7 @@ class HybridRunbookWorker(Resource):
"name": {"readonly": True},
"type": {"readonly": True},
"system_data": {"readonly": True},
+ "location": {"required": True},
}
_attribute_map = {
@@ -3540,6 +3508,8 @@ class HybridRunbookWorker(Resource):
"name": {"key": "name", "type": "str"},
"type": {"key": "type", "type": "str"},
"system_data": {"key": "systemData", "type": "SystemData"},
+ "tags": {"key": "tags", "type": "{str}"},
+ "location": {"key": "location", "type": "str"},
"ip": {"key": "properties.ip", "type": "str"},
"registered_date_time": {"key": "properties.registeredDateTime", "type": "iso-8601"},
"last_seen_date_time": {"key": "properties.lastSeenDateTime", "type": "iso-8601"},
@@ -3551,6 +3521,8 @@ class HybridRunbookWorker(Resource):
def __init__(
self,
*,
+ location: str,
+ tags: Optional[Dict[str, str]] = None,
ip: Optional[str] = None,
registered_date_time: Optional[datetime.datetime] = None,
last_seen_date_time: Optional[datetime.datetime] = None,
@@ -3560,6 +3532,10 @@ def __init__(
**kwargs: Any
) -> None:
"""
+ :keyword tags: Resource tags.
+ :paramtype tags: dict[str, str]
+ :keyword location: The geo-location where the resource lives. Required.
+ :paramtype location: str
:keyword ip: Gets or sets the assigned machine IP address.
:paramtype ip: str
:keyword registered_date_time: Gets or sets the registration time of the worker machine.
@@ -3573,8 +3549,7 @@ def __init__(
:keyword worker_name: Name of the HybridWorker.
:paramtype worker_name: str
"""
- super().__init__(**kwargs)
- self.system_data = None
+ super().__init__(tags=tags, location=location, **kwargs)
self.ip = ip
self.registered_date_time = registered_date_time
self.last_seen_date_time = last_seen_date_time
@@ -3586,42 +3561,55 @@ def __init__(
class HybridRunbookWorkerCreateParameters(_serialization.Model):
"""The parameters supplied to the create hybrid runbook worker operation.
+ Variables are only populated by the server, and will be ignored when sending a request.
+
:ivar name: Gets or sets the name of the resource.
:vartype name: str
:ivar vm_resource_id: Azure Resource Manager Id for a virtual machine.
:vartype vm_resource_id: str
"""
+ _validation = {
+ "name": {"readonly": True},
+ }
+
_attribute_map = {
"name": {"key": "name", "type": "str"},
"vm_resource_id": {"key": "properties.vmResourceId", "type": "str"},
}
- def __init__(self, *, name: Optional[str] = None, vm_resource_id: Optional[str] = None, **kwargs: Any) -> None:
+ def __init__(self, *, vm_resource_id: Optional[str] = None, **kwargs: Any) -> None:
"""
- :keyword name: Gets or sets the name of the resource.
- :paramtype name: str
:keyword vm_resource_id: Azure Resource Manager Id for a virtual machine.
:paramtype vm_resource_id: str
"""
super().__init__(**kwargs)
- self.name = name
+ self.name = None
self.vm_resource_id = vm_resource_id
-class HybridRunbookWorkerGroup(Resource):
+class HybridRunbookWorkerGroup(TrackedResource):
"""Definition of hybrid runbook worker group.
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource.
+ All required parameters must be populated in order to send to server.
+
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
- :ivar system_data: Resource system metadata.
+ :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
+ information.
:vartype system_data: ~azure.mgmt.automation.models.SystemData
+ :ivar tags: Resource tags.
+ :vartype tags: dict[str, str]
+ :ivar location: The geo-location where the resource lives. Required.
+ :vartype location: str
:ivar group_type: Type of the HybridWorkerGroup. Known values are: "User" and "System".
:vartype group_type: str or ~azure.mgmt.automation.models.GroupTypeEnum
:ivar credential: Sets the credential of a worker group.
@@ -3633,6 +3621,7 @@ class HybridRunbookWorkerGroup(Resource):
"name": {"readonly": True},
"type": {"readonly": True},
"system_data": {"readonly": True},
+ "location": {"required": True},
}
_attribute_map = {
@@ -3640,6 +3629,8 @@ class HybridRunbookWorkerGroup(Resource):
"name": {"key": "name", "type": "str"},
"type": {"key": "type", "type": "str"},
"system_data": {"key": "systemData", "type": "SystemData"},
+ "tags": {"key": "tags", "type": "{str}"},
+ "location": {"key": "location", "type": "str"},
"group_type": {"key": "properties.groupType", "type": "str"},
"credential": {"key": "properties.credential", "type": "RunAsCredentialAssociationProperty"},
}
@@ -3647,18 +3638,23 @@ class HybridRunbookWorkerGroup(Resource):
def __init__(
self,
*,
+ location: str,
+ tags: Optional[Dict[str, str]] = None,
group_type: Optional[Union[str, "_models.GroupTypeEnum"]] = None,
credential: Optional["_models.RunAsCredentialAssociationProperty"] = None,
**kwargs: Any
) -> None:
"""
+ :keyword tags: Resource tags.
+ :paramtype tags: dict[str, str]
+ :keyword location: The geo-location where the resource lives. Required.
+ :paramtype location: str
:keyword group_type: Type of the HybridWorkerGroup. Known values are: "User" and "System".
:paramtype group_type: str or ~azure.mgmt.automation.models.GroupTypeEnum
:keyword credential: Sets the credential of a worker group.
:paramtype credential: ~azure.mgmt.automation.models.RunAsCredentialAssociationProperty
"""
- super().__init__(**kwargs)
- self.system_data = None
+ super().__init__(tags=tags, location=location, **kwargs)
self.group_type = group_type
self.credential = credential
@@ -3784,7 +3780,7 @@ class Identity(_serialization.Model):
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar principal_id: The principal ID of resource identity.
+ :ivar principal_id: The principal ID of resource identity. The value must be an UUID.
:vartype principal_id: str
:ivar tenant_id: The tenant ID of resource.
:vartype tenant_id: str
@@ -3834,17 +3830,22 @@ def __init__(
self.user_assigned_identities = user_assigned_identities
-class Job(ProxyResource): # pylint: disable=too-many-instance-attributes
+class Job(ProxyResource):
"""Definition of the job.
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource.
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
+ :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
+ information.
+ :vartype system_data: ~azure.mgmt.automation.models.SystemData
:ivar runbook: Gets or sets the runbook.
:vartype runbook: ~azure.mgmt.automation.models.RunbookAssociationProperty
:ivar started_by: Gets or sets the job started by.
@@ -3852,6 +3853,8 @@ class Job(ProxyResource): # pylint: disable=too-many-instance-attributes
:ivar run_on: Gets or sets the runOn which specifies the group name where the job is to be
executed.
:vartype run_on: str
+ :ivar job_runtime_environment: Runtime Environment Property.
+ :vartype job_runtime_environment: ~azure.mgmt.automation.models.JobRuntimeEnvironment
:ivar job_id: Gets or sets the id of the job.
:vartype job_id: str
:ivar creation_time: Gets or sets the creation time of the job.
@@ -3883,15 +3886,19 @@ class Job(ProxyResource): # pylint: disable=too-many-instance-attributes
"id": {"readonly": True},
"name": {"readonly": True},
"type": {"readonly": True},
+ "system_data": {"readonly": True},
+ "provisioning_state": {"readonly": True},
}
_attribute_map = {
"id": {"key": "id", "type": "str"},
"name": {"key": "name", "type": "str"},
"type": {"key": "type", "type": "str"},
+ "system_data": {"key": "systemData", "type": "SystemData"},
"runbook": {"key": "properties.runbook", "type": "RunbookAssociationProperty"},
"started_by": {"key": "properties.startedBy", "type": "str"},
"run_on": {"key": "properties.runOn", "type": "str"},
+ "job_runtime_environment": {"key": "properties.jobRuntimeEnvironment", "type": "JobRuntimeEnvironment"},
"job_id": {"key": "properties.jobId", "type": "str"},
"creation_time": {"key": "properties.creationTime", "type": "iso-8601"},
"status": {"key": "properties.status", "type": "str"},
@@ -3911,6 +3918,7 @@ def __init__(
runbook: Optional["_models.RunbookAssociationProperty"] = None,
started_by: Optional[str] = None,
run_on: Optional[str] = None,
+ job_runtime_environment: Optional["_models.JobRuntimeEnvironment"] = None,
job_id: Optional[str] = None,
creation_time: Optional[datetime.datetime] = None,
status: Optional[Union[str, "_models.JobStatus"]] = None,
@@ -3921,7 +3929,6 @@ def __init__(
last_modified_time: Optional[datetime.datetime] = None,
last_status_modified_time: Optional[datetime.datetime] = None,
parameters: Optional[Dict[str, str]] = None,
- provisioning_state: Optional[Union[str, "_models.JobProvisioningState"]] = None,
**kwargs: Any
) -> None:
"""
@@ -3932,6 +3939,8 @@ def __init__(
:keyword run_on: Gets or sets the runOn which specifies the group name where the job is to be
executed.
:paramtype run_on: str
+ :keyword job_runtime_environment: Runtime Environment Property.
+ :paramtype job_runtime_environment: ~azure.mgmt.automation.models.JobRuntimeEnvironment
:keyword job_id: Gets or sets the id of the job.
:paramtype job_id: str
:keyword creation_time: Gets or sets the creation time of the job.
@@ -3954,14 +3963,12 @@ def __init__(
:paramtype last_status_modified_time: ~datetime.datetime
:keyword parameters: Gets or sets the parameters of the job.
:paramtype parameters: dict[str, str]
- :keyword provisioning_state: The current provisioning state of the job. Known values are:
- "Failed", "Succeeded", "Suspended", and "Processing".
- :paramtype provisioning_state: str or ~azure.mgmt.automation.models.JobProvisioningState
"""
super().__init__(**kwargs)
self.runbook = runbook
self.started_by = started_by
self.run_on = run_on
+ self.job_runtime_environment = job_runtime_environment
self.job_id = job_id
self.creation_time = creation_time
self.status = status
@@ -3972,24 +3979,31 @@ def __init__(
self.last_modified_time = last_modified_time
self.last_status_modified_time = last_status_modified_time
self.parameters = parameters
- self.provisioning_state = provisioning_state
+ self.provisioning_state = None
-class JobCollectionItem(ProxyResource): # pylint: disable=too-many-instance-attributes
+class JobCollectionItem(ProxyResource):
"""Job collection item properties.
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource.
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
+ :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
+ information.
+ :vartype system_data: ~azure.mgmt.automation.models.SystemData
:ivar runbook: The runbook association.
:vartype runbook: ~azure.mgmt.automation.models.RunbookAssociationProperty
:ivar job_id: The id of the job.
:vartype job_id: str
+ :ivar started_by: Gets or sets the job started by.
+ :vartype started_by: str
:ivar creation_time: The creation time of the job.
:vartype creation_time: ~datetime.datetime
:ivar status: The status of the job. Known values are: "New", "Activating", "Running",
@@ -4004,6 +4018,8 @@ class JobCollectionItem(ProxyResource): # pylint: disable=too-many-instance-att
:vartype last_modified_time: ~datetime.datetime
:ivar provisioning_state: The provisioning state of a resource.
:vartype provisioning_state: str
+ :ivar job_runtime_environment: Runtime Environment Property.
+ :vartype job_runtime_environment: ~azure.mgmt.automation.models.JobRuntimeEnvironment
:ivar run_on: Specifies the runOn group name where the job was executed.
:vartype run_on: str
"""
@@ -4012,8 +4028,10 @@ class JobCollectionItem(ProxyResource): # pylint: disable=too-many-instance-att
"id": {"readonly": True},
"name": {"readonly": True},
"type": {"readonly": True},
+ "system_data": {"readonly": True},
"runbook": {"readonly": True},
"job_id": {"readonly": True},
+ "started_by": {"readonly": True},
"creation_time": {"readonly": True},
"status": {"readonly": True},
"start_time": {"readonly": True},
@@ -4026,31 +4044,44 @@ class JobCollectionItem(ProxyResource): # pylint: disable=too-many-instance-att
"id": {"key": "id", "type": "str"},
"name": {"key": "name", "type": "str"},
"type": {"key": "type", "type": "str"},
+ "system_data": {"key": "systemData", "type": "SystemData"},
"runbook": {"key": "properties.runbook", "type": "RunbookAssociationProperty"},
"job_id": {"key": "properties.jobId", "type": "str"},
+ "started_by": {"key": "properties.startedBy", "type": "str"},
"creation_time": {"key": "properties.creationTime", "type": "iso-8601"},
"status": {"key": "properties.status", "type": "str"},
"start_time": {"key": "properties.startTime", "type": "iso-8601"},
"end_time": {"key": "properties.endTime", "type": "iso-8601"},
"last_modified_time": {"key": "properties.lastModifiedTime", "type": "iso-8601"},
"provisioning_state": {"key": "properties.provisioningState", "type": "str"},
+ "job_runtime_environment": {"key": "properties.jobRuntimeEnvironment", "type": "JobRuntimeEnvironment"},
"run_on": {"key": "properties.runOn", "type": "str"},
}
- def __init__(self, *, run_on: Optional[str] = None, **kwargs: Any) -> None:
+ def __init__(
+ self,
+ *,
+ job_runtime_environment: Optional["_models.JobRuntimeEnvironment"] = None,
+ run_on: Optional[str] = None,
+ **kwargs: Any
+ ) -> None:
"""
+ :keyword job_runtime_environment: Runtime Environment Property.
+ :paramtype job_runtime_environment: ~azure.mgmt.automation.models.JobRuntimeEnvironment
:keyword run_on: Specifies the runOn group name where the job was executed.
:paramtype run_on: str
"""
super().__init__(**kwargs)
self.runbook = None
self.job_id = None
+ self.started_by = None
self.creation_time = None
self.status = None
self.start_time = None
self.end_time = None
self.last_modified_time = None
self.provisioning_state = None
+ self.job_runtime_environment = job_runtime_environment
self.run_on = run_on
@@ -4148,6 +4179,26 @@ def __init__(self, **kwargs: Any) -> None:
self.id = None
+class JobRuntimeEnvironment(_serialization.Model):
+ """The runbook property associated with the entity.
+
+ :ivar runtime_environment_name: Name of Runtime Environment.
+ :vartype runtime_environment_name: str
+ """
+
+ _attribute_map = {
+ "runtime_environment_name": {"key": "runtimeEnvironmentName", "type": "str"},
+ }
+
+ def __init__(self, *, runtime_environment_name: Optional[str] = None, **kwargs: Any) -> None:
+ """
+ :keyword runtime_environment_name: Name of Runtime Environment.
+ :paramtype runtime_environment_name: str
+ """
+ super().__init__(**kwargs)
+ self.runtime_environment_name = runtime_environment_name
+
+
class JobSchedule(_serialization.Model):
"""Definition of the job schedule.
@@ -4663,20 +4714,27 @@ def __init__(
self.dimensions = dimensions
-class Module(TrackedResource): # pylint: disable=too-many-instance-attributes
+class Module(TrackedResource):
"""Definition of the module type.
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource.
+ All required parameters must be populated in order to send to server.
+
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
+ :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
+ information.
+ :vartype system_data: ~azure.mgmt.automation.models.SystemData
:ivar tags: Resource tags.
:vartype tags: dict[str, str]
- :ivar location: The Azure Region where the resource lives.
+ :ivar location: The geo-location where the resource lives. Required.
:vartype location: str
:ivar etag: Gets or sets the etag of the resource.
:vartype etag: str
@@ -4692,7 +4750,7 @@ class Module(TrackedResource): # pylint: disable=too-many-instance-attributes
"Created", "Creating", "StartingImportModuleRunbook", "RunningImportModuleRunbook",
"ContentRetrieved", "ContentDownloaded", "ContentValidated", "ConnectionTypeImported",
"ContentStored", "ModuleDataStored", "ActivitiesStored", "ModuleImportRunbookComplete",
- "Succeeded", "Failed", "Cancelled", and "Updating".
+ "Succeeded", "Failed", "Canceled", and "Updating".
:vartype provisioning_state: str or ~azure.mgmt.automation.models.ModuleProvisioningState
:ivar content_link: Gets or sets the contentLink of the module.
:vartype content_link: ~azure.mgmt.automation.models.ContentLink
@@ -4712,12 +4770,15 @@ class Module(TrackedResource): # pylint: disable=too-many-instance-attributes
"id": {"readonly": True},
"name": {"readonly": True},
"type": {"readonly": True},
+ "system_data": {"readonly": True},
+ "location": {"required": True},
}
_attribute_map = {
"id": {"key": "id", "type": "str"},
"name": {"key": "name", "type": "str"},
"type": {"key": "type", "type": "str"},
+ "system_data": {"key": "systemData", "type": "SystemData"},
"tags": {"key": "tags", "type": "{str}"},
"location": {"key": "location", "type": "str"},
"etag": {"key": "etag", "type": "str"},
@@ -4737,8 +4798,8 @@ class Module(TrackedResource): # pylint: disable=too-many-instance-attributes
def __init__(
self,
*,
+ location: str,
tags: Optional[Dict[str, str]] = None,
- location: Optional[str] = None,
etag: Optional[str] = None,
is_global: Optional[bool] = None,
version: Optional[str] = None,
@@ -4756,7 +4817,7 @@ def __init__(
"""
:keyword tags: Resource tags.
:paramtype tags: dict[str, str]
- :keyword location: The Azure Region where the resource lives.
+ :keyword location: The geo-location where the resource lives. Required.
:paramtype location: str
:keyword etag: Gets or sets the etag of the resource.
:paramtype etag: str
@@ -4772,7 +4833,7 @@ def __init__(
are: "Created", "Creating", "StartingImportModuleRunbook", "RunningImportModuleRunbook",
"ContentRetrieved", "ContentDownloaded", "ContentValidated", "ConnectionTypeImported",
"ContentStored", "ModuleDataStored", "ActivitiesStored", "ModuleImportRunbookComplete",
- "Succeeded", "Failed", "Cancelled", and "Updating".
+ "Succeeded", "Failed", "Canceled", and "Updating".
:paramtype provisioning_state: str or ~azure.mgmt.automation.models.ModuleProvisioningState
:keyword content_link: Gets or sets the contentLink of the module.
:paramtype content_link: ~azure.mgmt.automation.models.ContentLink
@@ -4911,6 +4972,8 @@ def __init__(
class ModuleUpdateParameters(_serialization.Model):
"""The parameters supplied to the update module operation.
+ Variables are only populated by the server, and will be ignored when sending a request.
+
:ivar name: Gets or sets name of the resource.
:vartype name: str
:ivar location: Gets or sets the location of the resource.
@@ -4921,6 +4984,11 @@ class ModuleUpdateParameters(_serialization.Model):
:vartype content_link: ~azure.mgmt.automation.models.ContentLink
"""
+ _validation = {
+ "name": {"readonly": True},
+ "location": {"readonly": True},
+ }
+
_attribute_map = {
"name": {"key": "name", "type": "str"},
"location": {"key": "location", "type": "str"},
@@ -4931,25 +4999,19 @@ class ModuleUpdateParameters(_serialization.Model):
def __init__(
self,
*,
- name: Optional[str] = None,
- location: Optional[str] = None,
tags: Optional[Dict[str, str]] = None,
content_link: Optional["_models.ContentLink"] = None,
**kwargs: Any
) -> None:
"""
- :keyword name: Gets or sets name of the resource.
- :paramtype name: str
- :keyword location: Gets or sets the location of the resource.
- :paramtype location: str
:keyword tags: Gets or sets the tags attached to the resource.
:paramtype tags: dict[str, str]
:keyword content_link: Gets or sets the module content link.
:paramtype content_link: ~azure.mgmt.automation.models.ContentLink
"""
super().__init__(**kwargs)
- self.name = name
- self.location = location
+ self.name = None
+ self.location = None
self.tags = tags
self.content_link = content_link
@@ -5061,150 +5123,380 @@ def __init__(
class Operation(_serialization.Model):
"""Automation REST API operation.
- :ivar name: Operation name: {provider}/{resource}/{operation}.
- :vartype name: str
- :ivar display: Provider, Resource and Operation values.
- :vartype display: ~azure.mgmt.automation.models.OperationDisplay
- :ivar origin: Origin of the operation.
- :vartype origin: str
- :ivar service_specification: Specification of the service.
- :vartype service_specification:
- ~azure.mgmt.automation.models.OperationPropertiesFormatServiceSpecification
+ :ivar name: Operation name: {provider}/{resource}/{operation}.
+ :vartype name: str
+ :ivar display: Provider, Resource and Operation values.
+ :vartype display: ~azure.mgmt.automation.models.OperationDisplay
+ :ivar origin: Origin of the operation.
+ :vartype origin: str
+ :ivar service_specification: Specification of the service.
+ :vartype service_specification:
+ ~azure.mgmt.automation.models.OperationPropertiesFormatServiceSpecification
+ """
+
+ _attribute_map = {
+ "name": {"key": "name", "type": "str"},
+ "display": {"key": "display", "type": "OperationDisplay"},
+ "origin": {"key": "origin", "type": "str"},
+ "service_specification": {
+ "key": "properties.serviceSpecification",
+ "type": "OperationPropertiesFormatServiceSpecification",
+ },
+ }
+
+ def __init__(
+ self,
+ *,
+ name: Optional[str] = None,
+ display: Optional["_models.OperationDisplay"] = None,
+ origin: Optional[str] = None,
+ service_specification: Optional["_models.OperationPropertiesFormatServiceSpecification"] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword name: Operation name: {provider}/{resource}/{operation}.
+ :paramtype name: str
+ :keyword display: Provider, Resource and Operation values.
+ :paramtype display: ~azure.mgmt.automation.models.OperationDisplay
+ :keyword origin: Origin of the operation.
+ :paramtype origin: str
+ :keyword service_specification: Specification of the service.
+ :paramtype service_specification:
+ ~azure.mgmt.automation.models.OperationPropertiesFormatServiceSpecification
+ """
+ super().__init__(**kwargs)
+ self.name = name
+ self.display = display
+ self.origin = origin
+ self.service_specification = service_specification
+
+
+class OperationDisplay(_serialization.Model):
+ """Provider, Resource and Operation values.
+
+ :ivar provider: Service provider: Microsoft.Automation.
+ :vartype provider: str
+ :ivar resource: Resource on which the operation is performed: Runbooks, Jobs etc.
+ :vartype resource: str
+ :ivar operation: Operation type: Read, write, delete, etc.
+ :vartype operation: str
+ :ivar description: Description of the operation.
+ :vartype description: str
+ """
+
+ _attribute_map = {
+ "provider": {"key": "provider", "type": "str"},
+ "resource": {"key": "resource", "type": "str"},
+ "operation": {"key": "operation", "type": "str"},
+ "description": {"key": "description", "type": "str"},
+ }
+
+ def __init__(
+ self,
+ *,
+ provider: Optional[str] = None,
+ resource: Optional[str] = None,
+ operation: Optional[str] = None,
+ description: Optional[str] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword provider: Service provider: Microsoft.Automation.
+ :paramtype provider: str
+ :keyword resource: Resource on which the operation is performed: Runbooks, Jobs etc.
+ :paramtype resource: str
+ :keyword operation: Operation type: Read, write, delete, etc.
+ :paramtype operation: str
+ :keyword description: Description of the operation.
+ :paramtype description: str
+ """
+ super().__init__(**kwargs)
+ self.provider = provider
+ self.resource = resource
+ self.operation = operation
+ self.description = description
+
+
+class OperationListResult(_serialization.Model):
+ """The response model for the list of Automation operations.
+
+ :ivar value: List of Automation operations supported by the Automation resource provider.
+ :vartype value: list[~azure.mgmt.automation.models.Operation]
+ """
+
+ _attribute_map = {
+ "value": {"key": "value", "type": "[Operation]"},
+ }
+
+ def __init__(self, *, value: Optional[List["_models.Operation"]] = None, **kwargs: Any) -> None:
+ """
+ :keyword value: List of Automation operations supported by the Automation resource provider.
+ :paramtype value: list[~azure.mgmt.automation.models.Operation]
+ """
+ super().__init__(**kwargs)
+ self.value = value
+
+
+class OperationPropertiesFormatServiceSpecification(_serialization.Model): # pylint: disable=name-too-long
+ """Specification of the service.
+
+ :ivar metric_specifications: Operation service specification.
+ :vartype metric_specifications: list[~azure.mgmt.automation.models.MetricSpecification]
+ :ivar log_specifications: Operation log specification.
+ :vartype log_specifications: list[~azure.mgmt.automation.models.LogSpecification]
+ """
+
+ _attribute_map = {
+ "metric_specifications": {"key": "metricSpecifications", "type": "[MetricSpecification]"},
+ "log_specifications": {"key": "logSpecifications", "type": "[LogSpecification]"},
+ }
+
+ def __init__(
+ self,
+ *,
+ metric_specifications: Optional[List["_models.MetricSpecification"]] = None,
+ log_specifications: Optional[List["_models.LogSpecification"]] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword metric_specifications: Operation service specification.
+ :paramtype metric_specifications: list[~azure.mgmt.automation.models.MetricSpecification]
+ :keyword log_specifications: Operation log specification.
+ :paramtype log_specifications: list[~azure.mgmt.automation.models.LogSpecification]
+ """
+ super().__init__(**kwargs)
+ self.metric_specifications = metric_specifications
+ self.log_specifications = log_specifications
+
+
+class Package(TrackedResource):
+ """Definition of the Package type.
+
+ 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 server.
+
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
+ :vartype id: str
+ :ivar name: The name of the resource.
+ :vartype name: str
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
+ :vartype type: str
+ :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
+ information.
+ :vartype system_data: ~azure.mgmt.automation.models.SystemData
+ :ivar tags: Resource tags.
+ :vartype tags: dict[str, str]
+ :ivar location: The geo-location where the resource lives. Required.
+ :vartype location: str
+ :ivar default: Gets or sets the isGlobal flag of the package.
+ :vartype default: bool
+ :ivar version: Gets or sets the version of the Package.
+ :vartype version: str
+ :ivar size_in_bytes: Gets or sets the size in bytes of the Package.
+ :vartype size_in_bytes: int
+ :ivar provisioning_state: Gets or sets the provisioning state of the Package. Known values are:
+ "Created", "Creating", "StartingImportModuleRunbook", "RunningImportModuleRunbook",
+ "ContentRetrieved", "ContentDownloaded", "ContentValidated", "ConnectionTypeImported",
+ "ContentStored", "ModuleDataStored", "ActivitiesStored", "ModuleImportRunbookComplete",
+ "Succeeded", "Failed", "Canceled", and "Updating".
+ :vartype provisioning_state: str or ~azure.mgmt.automation.models.PackageProvisioningState
+ :ivar content_link: Gets or sets the contentLink of the Package.
+ :vartype content_link: ~azure.mgmt.automation.models.ContentLink
+ :ivar error: Gets or sets the error info of the Package.
+ :vartype error: ~azure.mgmt.automation.models.PackageErrorInfo
+ :ivar all_of: Metadata pertaining to creation and last modification of the resource.
+ :vartype all_of: ~azure.mgmt.automation.models.SystemData
+ """
+
+ _validation = {
+ "id": {"readonly": True},
+ "name": {"readonly": True},
+ "type": {"readonly": True},
+ "system_data": {"readonly": True},
+ "location": {"required": True},
+ "provisioning_state": {"readonly": True},
+ "all_of": {"readonly": True},
+ }
+
+ _attribute_map = {
+ "id": {"key": "id", "type": "str"},
+ "name": {"key": "name", "type": "str"},
+ "type": {"key": "type", "type": "str"},
+ "system_data": {"key": "systemData", "type": "SystemData"},
+ "tags": {"key": "tags", "type": "{str}"},
+ "location": {"key": "location", "type": "str"},
+ "default": {"key": "properties.default", "type": "bool"},
+ "version": {"key": "properties.version", "type": "str"},
+ "size_in_bytes": {"key": "properties.sizeInBytes", "type": "int"},
+ "provisioning_state": {"key": "properties.provisioningState", "type": "str"},
+ "content_link": {"key": "properties.contentLink", "type": "ContentLink"},
+ "error": {"key": "properties.error", "type": "PackageErrorInfo"},
+ "all_of": {"key": "properties.allOf", "type": "SystemData"},
+ }
+
+ def __init__(
+ self,
+ *,
+ location: str,
+ tags: Optional[Dict[str, str]] = None,
+ default: Optional[bool] = None,
+ version: Optional[str] = None,
+ size_in_bytes: Optional[int] = None,
+ content_link: Optional["_models.ContentLink"] = None,
+ error: Optional["_models.PackageErrorInfo"] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword tags: Resource tags.
+ :paramtype tags: dict[str, str]
+ :keyword location: The geo-location where the resource lives. Required.
+ :paramtype location: str
+ :keyword default: Gets or sets the isGlobal flag of the package.
+ :paramtype default: bool
+ :keyword version: Gets or sets the version of the Package.
+ :paramtype version: str
+ :keyword size_in_bytes: Gets or sets the size in bytes of the Package.
+ :paramtype size_in_bytes: int
+ :keyword content_link: Gets or sets the contentLink of the Package.
+ :paramtype content_link: ~azure.mgmt.automation.models.ContentLink
+ :keyword error: Gets or sets the error info of the Package.
+ :paramtype error: ~azure.mgmt.automation.models.PackageErrorInfo
+ """
+ super().__init__(tags=tags, location=location, **kwargs)
+ self.default = default
+ self.version = version
+ self.size_in_bytes = size_in_bytes
+ self.provisioning_state = None
+ self.content_link = content_link
+ self.error = error
+ self.all_of = None
+
+
+class PackageCreateOrUpdateParameters(_serialization.Model):
+ """The parameters supplied to the create or update package operation.
+
+ All required parameters must be populated in order to send to server.
+
+ :ivar all_of: The resource model definition for an Azure Resource Manager tracked top level
+ resource which has 'tags' and a 'location'.
+ :vartype all_of: ~azure.mgmt.automation.models.TrackedResource
+ :ivar content_link: Gets or sets the package content link. Required.
+ :vartype content_link: ~azure.mgmt.automation.models.ContentLink
"""
+ _validation = {
+ "content_link": {"required": True},
+ }
+
_attribute_map = {
- "name": {"key": "name", "type": "str"},
- "display": {"key": "display", "type": "OperationDisplay"},
- "origin": {"key": "origin", "type": "str"},
- "service_specification": {
- "key": "properties.serviceSpecification",
- "type": "OperationPropertiesFormatServiceSpecification",
- },
+ "all_of": {"key": "allOf", "type": "TrackedResource"},
+ "content_link": {"key": "properties.contentLink", "type": "ContentLink"},
}
def __init__(
- self,
- *,
- name: Optional[str] = None,
- display: Optional["_models.OperationDisplay"] = None,
- origin: Optional[str] = None,
- service_specification: Optional["_models.OperationPropertiesFormatServiceSpecification"] = None,
- **kwargs: Any
+ self, *, content_link: "_models.ContentLink", all_of: Optional["_models.TrackedResource"] = None, **kwargs: Any
) -> None:
"""
- :keyword name: Operation name: {provider}/{resource}/{operation}.
- :paramtype name: str
- :keyword display: Provider, Resource and Operation values.
- :paramtype display: ~azure.mgmt.automation.models.OperationDisplay
- :keyword origin: Origin of the operation.
- :paramtype origin: str
- :keyword service_specification: Specification of the service.
- :paramtype service_specification:
- ~azure.mgmt.automation.models.OperationPropertiesFormatServiceSpecification
+ :keyword all_of: The resource model definition for an Azure Resource Manager tracked top level
+ resource which has 'tags' and a 'location'.
+ :paramtype all_of: ~azure.mgmt.automation.models.TrackedResource
+ :keyword content_link: Gets or sets the package content link. Required.
+ :paramtype content_link: ~azure.mgmt.automation.models.ContentLink
"""
super().__init__(**kwargs)
- self.name = name
- self.display = display
- self.origin = origin
- self.service_specification = service_specification
+ self.all_of = all_of
+ self.content_link = content_link
-class OperationDisplay(_serialization.Model):
- """Provider, Resource and Operation values.
+class PackageErrorInfo(_serialization.Model):
+ """Definition of the package error info type.
- :ivar provider: Service provider: Microsoft.Automation.
- :vartype provider: str
- :ivar resource: Resource on which the operation is performed: Runbooks, Jobs etc.
- :vartype resource: str
- :ivar operation: Operation type: Read, write, delete, etc.
- :vartype operation: str
- :ivar description: Description of the operation.
- :vartype description: str
+ :ivar code: Package import error code.
+ :vartype code: str
+ :ivar message: Package import error message.
+ :vartype message: str
"""
_attribute_map = {
- "provider": {"key": "provider", "type": "str"},
- "resource": {"key": "resource", "type": "str"},
- "operation": {"key": "operation", "type": "str"},
- "description": {"key": "description", "type": "str"},
+ "code": {"key": "code", "type": "str"},
+ "message": {"key": "message", "type": "str"},
}
- def __init__(
- self,
- *,
- provider: Optional[str] = None,
- resource: Optional[str] = None,
- operation: Optional[str] = None,
- description: Optional[str] = None,
- **kwargs: Any
- ) -> None:
+ def __init__(self, *, code: Optional[str] = None, message: Optional[str] = None, **kwargs: Any) -> None:
"""
- :keyword provider: Service provider: Microsoft.Automation.
- :paramtype provider: str
- :keyword resource: Resource on which the operation is performed: Runbooks, Jobs etc.
- :paramtype resource: str
- :keyword operation: Operation type: Read, write, delete, etc.
- :paramtype operation: str
- :keyword description: Description of the operation.
- :paramtype description: str
+ :keyword code: Package import error code.
+ :paramtype code: str
+ :keyword message: Package import error message.
+ :paramtype message: str
"""
super().__init__(**kwargs)
- self.provider = provider
- self.resource = resource
- self.operation = operation
- self.description = description
+ self.code = code
+ self.message = message
-class OperationListResult(_serialization.Model):
- """The response model for the list of Automation operations.
+class PackageListResult(_serialization.Model):
+ """The response model for the list runtime environments operation.
- :ivar value: List of Automation operations supported by the Automation resource provider.
- :vartype value: list[~azure.mgmt.automation.models.Operation]
+ :ivar value: list of the Packages of the runtime environment.
+ :vartype value: list[~azure.mgmt.automation.models.Package]
+ :ivar next_link: Gets the next link.
+ :vartype next_link: str
"""
_attribute_map = {
- "value": {"key": "value", "type": "[Operation]"},
+ "value": {"key": "value", "type": "[Package]"},
+ "next_link": {"key": "nextLink", "type": "str"},
}
- def __init__(self, *, value: Optional[List["_models.Operation"]] = None, **kwargs: Any) -> None:
+ def __init__(
+ self, *, value: Optional[List["_models.Package"]] = None, next_link: Optional[str] = None, **kwargs: Any
+ ) -> None:
"""
- :keyword value: List of Automation operations supported by the Automation resource provider.
- :paramtype value: list[~azure.mgmt.automation.models.Operation]
+ :keyword value: list of the Packages of the runtime environment.
+ :paramtype value: list[~azure.mgmt.automation.models.Package]
+ :keyword next_link: Gets the next link.
+ :paramtype next_link: str
"""
super().__init__(**kwargs)
self.value = value
+ self.next_link = next_link
-class OperationPropertiesFormatServiceSpecification(_serialization.Model): # pylint: disable=name-too-long
- """Specification of the service.
+class PackageUpdateParameters(_serialization.Model):
+ """The parameters supplied to the update package operation.
- :ivar metric_specifications: Operation service specification.
- :vartype metric_specifications: list[~azure.mgmt.automation.models.MetricSpecification]
- :ivar log_specifications: Operation log specification.
- :vartype log_specifications: list[~azure.mgmt.automation.models.LogSpecification]
+ :ivar all_of: The resource model definition for an Azure Resource Manager tracked top level
+ resource which has 'tags' and a 'location'.
+ :vartype all_of: ~azure.mgmt.automation.models.TrackedResource
+ :ivar content_link: Gets or sets the package content link.
+ :vartype content_link: ~azure.mgmt.automation.models.ContentLink
"""
_attribute_map = {
- "metric_specifications": {"key": "metricSpecifications", "type": "[MetricSpecification]"},
- "log_specifications": {"key": "logSpecifications", "type": "[LogSpecification]"},
+ "all_of": {"key": "allOf", "type": "TrackedResource"},
+ "content_link": {"key": "properties.contentLink", "type": "ContentLink"},
}
def __init__(
self,
*,
- metric_specifications: Optional[List["_models.MetricSpecification"]] = None,
- log_specifications: Optional[List["_models.LogSpecification"]] = None,
+ all_of: Optional["_models.TrackedResource"] = None,
+ content_link: Optional["_models.ContentLink"] = None,
**kwargs: Any
) -> None:
"""
- :keyword metric_specifications: Operation service specification.
- :paramtype metric_specifications: list[~azure.mgmt.automation.models.MetricSpecification]
- :keyword log_specifications: Operation log specification.
- :paramtype log_specifications: list[~azure.mgmt.automation.models.LogSpecification]
+ :keyword all_of: The resource model definition for an Azure Resource Manager tracked top level
+ resource which has 'tags' and a 'location'.
+ :paramtype all_of: ~azure.mgmt.automation.models.TrackedResource
+ :keyword content_link: Gets or sets the package content link.
+ :paramtype content_link: ~azure.mgmt.automation.models.ContentLink
"""
super().__init__(**kwargs)
- self.metric_specifications = metric_specifications
- self.log_specifications = log_specifications
+ self.all_of = all_of
+ self.content_link = content_link
class PrivateEndpointConnection(ProxyResource):
@@ -5212,12 +5504,17 @@ class PrivateEndpointConnection(ProxyResource):
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource.
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
+ :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
+ information.
+ :vartype system_data: ~azure.mgmt.automation.models.SystemData
:ivar private_endpoint: Private endpoint which the connection belongs to.
:vartype private_endpoint: ~azure.mgmt.automation.models.PrivateEndpointProperty
:ivar group_ids: Gets the groupIds.
@@ -5232,12 +5529,14 @@ class PrivateEndpointConnection(ProxyResource):
"id": {"readonly": True},
"name": {"readonly": True},
"type": {"readonly": True},
+ "system_data": {"readonly": True},
}
_attribute_map = {
"id": {"key": "id", "type": "str"},
"name": {"key": "name", "type": "str"},
"type": {"key": "type", "type": "str"},
+ "system_data": {"key": "systemData", "type": "SystemData"},
"private_endpoint": {"key": "properties.privateEndpoint", "type": "PrivateEndpointProperty"},
"group_ids": {"key": "properties.groupIds", "type": "[str]"},
"private_link_service_connection_state": {
@@ -5315,12 +5614,17 @@ class PrivateLinkResource(ProxyResource):
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource.
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
+ :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
+ information.
+ :vartype system_data: ~azure.mgmt.automation.models.SystemData
:ivar group_id: The private link resource group id.
:vartype group_id: str
:ivar required_members: The private link resource required member names.
@@ -5331,6 +5635,7 @@ class PrivateLinkResource(ProxyResource):
"id": {"readonly": True},
"name": {"readonly": True},
"type": {"readonly": True},
+ "system_data": {"readonly": True},
"group_id": {"readonly": True},
"required_members": {"readonly": True},
}
@@ -5339,6 +5644,7 @@ class PrivateLinkResource(ProxyResource):
"id": {"key": "id", "type": "str"},
"name": {"key": "name", "type": "str"},
"type": {"key": "type", "type": "str"},
+ "system_data": {"key": "systemData", "type": "SystemData"},
"group_id": {"key": "properties.groupId", "type": "str"},
"required_members": {"key": "properties.requiredMembers", "type": "[str]"},
}
@@ -5522,26 +5828,35 @@ def __init__(self, *, name: Optional[str] = None, **kwargs: Any) -> None:
self.name = name
-class Runbook(TrackedResource): # pylint: disable=too-many-instance-attributes
+class Runbook(TrackedResource):
"""Definition of the runbook type.
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource.
+ All required parameters must be populated in order to send to server.
+
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
+ :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
+ information.
+ :vartype system_data: ~azure.mgmt.automation.models.SystemData
:ivar tags: Resource tags.
:vartype tags: dict[str, str]
- :ivar location: The Azure Region where the resource lives.
+ :ivar location: The geo-location where the resource lives. Required.
:vartype location: str
:ivar etag: Gets or sets the etag of the resource.
:vartype etag: str
+ :ivar runtime_environment: Runtime Environment of the runbook execution.
+ :vartype runtime_environment: str
:ivar runbook_type: Gets or sets the type of the runbook. Known values are: "Script", "Graph",
"PowerShellWorkflow", "PowerShell", "GraphPowerShellWorkflow", "GraphPowerShell", "Python2",
- and "Python3".
+ "Python3", "Python", and "PowerShell72".
:vartype runbook_type: str or ~azure.mgmt.automation.models.RunbookTypeEnum
:ivar publish_content_link: Gets or sets the published runbook content link.
:vartype publish_content_link: ~azure.mgmt.automation.models.ContentLink
@@ -5579,15 +5894,19 @@ class Runbook(TrackedResource): # pylint: disable=too-many-instance-attributes
"id": {"readonly": True},
"name": {"readonly": True},
"type": {"readonly": True},
+ "system_data": {"readonly": True},
+ "location": {"required": True},
}
_attribute_map = {
"id": {"key": "id", "type": "str"},
"name": {"key": "name", "type": "str"},
"type": {"key": "type", "type": "str"},
+ "system_data": {"key": "systemData", "type": "SystemData"},
"tags": {"key": "tags", "type": "{str}"},
"location": {"key": "location", "type": "str"},
"etag": {"key": "etag", "type": "str"},
+ "runtime_environment": {"key": "properties.runtimeEnvironment", "type": "str"},
"runbook_type": {"key": "properties.runbookType", "type": "str"},
"publish_content_link": {"key": "properties.publishContentLink", "type": "ContentLink"},
"state": {"key": "properties.state", "type": "str"},
@@ -5608,9 +5927,10 @@ class Runbook(TrackedResource): # pylint: disable=too-many-instance-attributes
def __init__(
self,
*,
+ location: str,
tags: Optional[Dict[str, str]] = None,
- location: Optional[str] = None,
etag: Optional[str] = None,
+ runtime_environment: Optional[str] = None,
runbook_type: Optional[Union[str, "_models.RunbookTypeEnum"]] = None,
publish_content_link: Optional["_models.ContentLink"] = None,
state: Optional[Union[str, "_models.RunbookState"]] = None,
@@ -5631,13 +5951,15 @@ def __init__(
"""
:keyword tags: Resource tags.
:paramtype tags: dict[str, str]
- :keyword location: The Azure Region where the resource lives.
+ :keyword location: The geo-location where the resource lives. Required.
:paramtype location: str
:keyword etag: Gets or sets the etag of the resource.
:paramtype etag: str
+ :keyword runtime_environment: Runtime Environment of the runbook execution.
+ :paramtype runtime_environment: str
:keyword runbook_type: Gets or sets the type of the runbook. Known values are: "Script",
"Graph", "PowerShellWorkflow", "PowerShell", "GraphPowerShellWorkflow", "GraphPowerShell",
- "Python2", and "Python3".
+ "Python2", "Python3", "Python", and "PowerShell72".
:paramtype runbook_type: str or ~azure.mgmt.automation.models.RunbookTypeEnum
:keyword publish_content_link: Gets or sets the published runbook content link.
:paramtype publish_content_link: ~azure.mgmt.automation.models.ContentLink
@@ -5672,6 +5994,7 @@ def __init__(
"""
super().__init__(tags=tags, location=location, **kwargs)
self.etag = etag
+ self.runtime_environment = runtime_environment
self.runbook_type = runbook_type
self.publish_content_link = publish_content_link
self.state = state
@@ -5744,9 +6067,11 @@ class RunbookCreateOrUpdateDraftProperties(_serialization.Model):
:vartype log_verbose: bool
:ivar log_progress: Gets or sets progress log option.
:vartype log_progress: bool
+ :ivar runtime_environment: Environment of the runbook.
+ :vartype runtime_environment: str
:ivar runbook_type: Gets or sets the type of the runbook. Required. Known values are: "Script",
"Graph", "PowerShellWorkflow", "PowerShell", "GraphPowerShellWorkflow", "GraphPowerShell",
- "Python2", and "Python3".
+ "Python2", "Python3", "Python", and "PowerShell72".
:vartype runbook_type: str or ~azure.mgmt.automation.models.RunbookTypeEnum
:ivar draft: Gets or sets the draft runbook properties. Required.
:vartype draft: ~azure.mgmt.automation.models.RunbookDraft
@@ -5764,6 +6089,7 @@ class RunbookCreateOrUpdateDraftProperties(_serialization.Model):
_attribute_map = {
"log_verbose": {"key": "logVerbose", "type": "bool"},
"log_progress": {"key": "logProgress", "type": "bool"},
+ "runtime_environment": {"key": "runtimeEnvironment", "type": "str"},
"runbook_type": {"key": "runbookType", "type": "str"},
"draft": {"key": "draft", "type": "RunbookDraft"},
"description": {"key": "description", "type": "str"},
@@ -5777,6 +6103,7 @@ def __init__(
draft: "_models.RunbookDraft",
log_verbose: Optional[bool] = None,
log_progress: Optional[bool] = None,
+ runtime_environment: Optional[str] = None,
description: Optional[str] = None,
log_activity_trace: Optional[int] = None,
**kwargs: Any
@@ -5786,9 +6113,11 @@ def __init__(
:paramtype log_verbose: bool
:keyword log_progress: Gets or sets progress log option.
:paramtype log_progress: bool
+ :keyword runtime_environment: Environment of the runbook.
+ :paramtype runtime_environment: str
:keyword runbook_type: Gets or sets the type of the runbook. Required. Known values are:
"Script", "Graph", "PowerShellWorkflow", "PowerShell", "GraphPowerShellWorkflow",
- "GraphPowerShell", "Python2", and "Python3".
+ "GraphPowerShell", "Python2", "Python3", "Python", and "PowerShell72".
:paramtype runbook_type: str or ~azure.mgmt.automation.models.RunbookTypeEnum
:keyword draft: Gets or sets the draft runbook properties. Required.
:paramtype draft: ~azure.mgmt.automation.models.RunbookDraft
@@ -5800,6 +6129,7 @@ def __init__(
super().__init__(**kwargs)
self.log_verbose = log_verbose
self.log_progress = log_progress
+ self.runtime_environment = runtime_environment
self.runbook_type = runbook_type
self.draft = draft
self.description = description
@@ -5821,9 +6151,11 @@ class RunbookCreateOrUpdateParameters(_serialization.Model):
:vartype log_verbose: bool
:ivar log_progress: Gets or sets progress log option.
:vartype log_progress: bool
+ :ivar runtime_environment: Environment of the runbook.
+ :vartype runtime_environment: str
:ivar runbook_type: Gets or sets the type of the runbook. Required. Known values are: "Script",
"Graph", "PowerShellWorkflow", "PowerShell", "GraphPowerShellWorkflow", "GraphPowerShell",
- "Python2", and "Python3".
+ "Python2", "Python3", "Python", and "PowerShell72".
:vartype runbook_type: str or ~azure.mgmt.automation.models.RunbookTypeEnum
:ivar draft: Gets or sets the draft runbook properties.
:vartype draft: ~azure.mgmt.automation.models.RunbookDraft
@@ -5845,6 +6177,7 @@ class RunbookCreateOrUpdateParameters(_serialization.Model):
"tags": {"key": "tags", "type": "{str}"},
"log_verbose": {"key": "properties.logVerbose", "type": "bool"},
"log_progress": {"key": "properties.logProgress", "type": "bool"},
+ "runtime_environment": {"key": "properties.runtimeEnvironment", "type": "str"},
"runbook_type": {"key": "properties.runbookType", "type": "str"},
"draft": {"key": "properties.draft", "type": "RunbookDraft"},
"publish_content_link": {"key": "properties.publishContentLink", "type": "ContentLink"},
@@ -5861,6 +6194,7 @@ def __init__(
tags: Optional[Dict[str, str]] = None,
log_verbose: Optional[bool] = None,
log_progress: Optional[bool] = None,
+ runtime_environment: Optional[str] = None,
draft: Optional["_models.RunbookDraft"] = None,
publish_content_link: Optional["_models.ContentLink"] = None,
description: Optional[str] = None,
@@ -5878,9 +6212,11 @@ def __init__(
:paramtype log_verbose: bool
:keyword log_progress: Gets or sets progress log option.
:paramtype log_progress: bool
+ :keyword runtime_environment: Environment of the runbook.
+ :paramtype runtime_environment: str
:keyword runbook_type: Gets or sets the type of the runbook. Required. Known values are:
"Script", "Graph", "PowerShellWorkflow", "PowerShell", "GraphPowerShellWorkflow",
- "GraphPowerShell", "Python2", and "Python3".
+ "GraphPowerShell", "Python2", "Python3", "Python", and "PowerShell72".
:paramtype runbook_type: str or ~azure.mgmt.automation.models.RunbookTypeEnum
:keyword draft: Gets or sets the draft runbook properties.
:paramtype draft: ~azure.mgmt.automation.models.RunbookDraft
@@ -5897,6 +6233,7 @@ def __init__(
self.tags = tags
self.log_verbose = log_verbose
self.log_progress = log_progress
+ self.runtime_environment = runtime_environment
self.runbook_type = runbook_type
self.draft = draft
self.publish_content_link = publish_content_link
@@ -6157,17 +6494,169 @@ def __init__(
self.log_activity_trace = log_activity_trace
-class Schedule(ProxyResource): # pylint: disable=too-many-instance-attributes
+class RuntimeEnvironment(TrackedResource):
+ """Definition of the Runtime Environment type.
+
+ 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 server.
+
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
+ :vartype id: str
+ :ivar name: The name of the resource.
+ :vartype name: str
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
+ :vartype type: str
+ :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
+ information.
+ :vartype system_data: ~azure.mgmt.automation.models.SystemData
+ :ivar tags: Resource tags.
+ :vartype tags: dict[str, str]
+ :ivar location: The geo-location where the resource lives. Required.
+ :vartype location: str
+ :ivar default_packages: List of Default packages for Environment.
+ :vartype default_packages: dict[str, str]
+ :ivar description: Gets or sets the description.
+ :vartype description: str
+ :ivar language: Language of Runtime Environment.
+ :vartype language: str
+ :ivar version: Version of Language.
+ :vartype version: str
+ """
+
+ _validation = {
+ "id": {"readonly": True},
+ "name": {"readonly": True},
+ "type": {"readonly": True},
+ "system_data": {"readonly": True},
+ "location": {"required": True},
+ }
+
+ _attribute_map = {
+ "id": {"key": "id", "type": "str"},
+ "name": {"key": "name", "type": "str"},
+ "type": {"key": "type", "type": "str"},
+ "system_data": {"key": "systemData", "type": "SystemData"},
+ "tags": {"key": "tags", "type": "{str}"},
+ "location": {"key": "location", "type": "str"},
+ "default_packages": {"key": "properties.defaultPackages", "type": "{str}"},
+ "description": {"key": "properties.description", "type": "str"},
+ "language": {"key": "properties.runtime.language", "type": "str"},
+ "version": {"key": "properties.runtime.version", "type": "str"},
+ }
+
+ def __init__(
+ self,
+ *,
+ location: str,
+ tags: Optional[Dict[str, str]] = None,
+ default_packages: Optional[Dict[str, str]] = None,
+ description: Optional[str] = None,
+ language: Optional[str] = None,
+ version: Optional[str] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword tags: Resource tags.
+ :paramtype tags: dict[str, str]
+ :keyword location: The geo-location where the resource lives. Required.
+ :paramtype location: str
+ :keyword default_packages: List of Default packages for Environment.
+ :paramtype default_packages: dict[str, str]
+ :keyword description: Gets or sets the description.
+ :paramtype description: str
+ :keyword language: Language of Runtime Environment.
+ :paramtype language: str
+ :keyword version: Version of Language.
+ :paramtype version: str
+ """
+ super().__init__(tags=tags, location=location, **kwargs)
+ self.default_packages = default_packages
+ self.description = description
+ self.language = language
+ self.version = version
+
+
+class RuntimeEnvironmentListResult(_serialization.Model):
+ """List of all the Runtime Environments of automation account.
+
+ :ivar value: list of RuntimeEnvironment.
+ :vartype value: list[~azure.mgmt.automation.models.RuntimeEnvironment]
+ :ivar next_link: Gets or sets the next link.
+ :vartype next_link: str
+ """
+
+ _attribute_map = {
+ "value": {"key": "value", "type": "[RuntimeEnvironment]"},
+ "next_link": {"key": "nextLink", "type": "str"},
+ }
+
+ def __init__(
+ self,
+ *,
+ value: Optional[List["_models.RuntimeEnvironment"]] = None,
+ next_link: Optional[str] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword value: list of RuntimeEnvironment.
+ :paramtype value: list[~azure.mgmt.automation.models.RuntimeEnvironment]
+ :keyword next_link: Gets or sets the next link.
+ :paramtype next_link: str
+ """
+ super().__init__(**kwargs)
+ self.value = value
+ self.next_link = next_link
+
+
+class RuntimeEnvironmentUpdateParameters(_serialization.Model):
+ """The parameters supplied to the update automation account operation.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar system_data: Metadata pertaining to creation and last modification of the resource.
+ :vartype system_data: ~azure.mgmt.automation.models.SystemData
+ :ivar default_packages: List of Default packages for Environment.
+ :vartype default_packages: dict[str, str]
+ """
+
+ _validation = {
+ "system_data": {"readonly": True},
+ }
+
+ _attribute_map = {
+ "system_data": {"key": "systemData", "type": "SystemData"},
+ "default_packages": {"key": "properties.defaultPackages", "type": "{str}"},
+ }
+
+ def __init__(self, *, default_packages: Optional[Dict[str, str]] = None, **kwargs: Any) -> None:
+ """
+ :keyword default_packages: List of Default packages for Environment.
+ :paramtype default_packages: dict[str, str]
+ """
+ super().__init__(**kwargs)
+ self.system_data = None
+ self.default_packages = default_packages
+
+
+class Schedule(ProxyResource):
"""Definition of the schedule.
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource.
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
+ :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
+ information.
+ :vartype system_data: ~azure.mgmt.automation.models.SystemData
:ivar start_time: Gets or sets the start time of the schedule.
:vartype start_time: ~datetime.datetime
:ivar start_time_offset_minutes: Gets the start time's offset in minutes.
@@ -6203,6 +6692,7 @@ class Schedule(ProxyResource): # pylint: disable=too-many-instance-attributes
"id": {"readonly": True},
"name": {"readonly": True},
"type": {"readonly": True},
+ "system_data": {"readonly": True},
"start_time_offset_minutes": {"readonly": True},
}
@@ -6210,6 +6700,7 @@ class Schedule(ProxyResource): # pylint: disable=too-many-instance-attributes
"id": {"key": "id", "type": "str"},
"name": {"key": "name", "type": "str"},
"type": {"key": "type", "type": "str"},
+ "system_data": {"key": "systemData", "type": "SystemData"},
"start_time": {"key": "properties.startTime", "type": "iso-8601"},
"start_time_offset_minutes": {"key": "properties.startTimeOffsetMinutes", "type": "float"},
"expiry_time": {"key": "properties.expiryTime", "type": "iso-8601"},
@@ -6508,7 +6999,7 @@ def __init__(
self.capacity = capacity
-class SoftwareUpdateConfiguration(_serialization.Model): # pylint: disable=too-many-instance-attributes
+class SoftwareUpdateConfiguration(_serialization.Model):
"""Software update configuration properties.
Variables are only populated by the server, and will be ignored when sending a request.
@@ -6716,7 +7207,7 @@ def __init__(
self.value = value
-class SoftwareUpdateConfigurationMachineRun(_serialization.Model): # pylint: disable=too-many-instance-attributes
+class SoftwareUpdateConfigurationMachineRun(_serialization.Model):
"""Software update configuration machine run model.
Variables are only populated by the server, and will be ignored when sending a request.
@@ -6873,7 +7364,7 @@ def __init__(
self.next_link = next_link
-class SoftwareUpdateConfigurationRun(_serialization.Model): # pylint: disable=too-many-instance-attributes
+class SoftwareUpdateConfigurationRun(_serialization.Model):
"""Software update configuration Run properties.
Variables are only populated by the server, and will be ignored when sending a request.
@@ -7111,17 +7602,22 @@ def __init__(
self.post_task = post_task
-class SourceControl(ProxyResource): # pylint: disable=too-many-instance-attributes
+class SourceControl(ProxyResource):
"""Definition of the source control.
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource.
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
+ :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
+ information.
+ :vartype system_data: ~azure.mgmt.automation.models.SystemData
:ivar repo_url: The repo url of the source control.
:vartype repo_url: str
:ivar branch: The repo branch of the source control. Include branch as empty string for
@@ -7148,12 +7644,14 @@ class SourceControl(ProxyResource): # pylint: disable=too-many-instance-attribu
"id": {"readonly": True},
"name": {"readonly": True},
"type": {"readonly": True},
+ "system_data": {"readonly": True},
}
_attribute_map = {
"id": {"key": "id", "type": "str"},
"name": {"key": "name", "type": "str"},
"type": {"key": "type", "type": "str"},
+ "system_data": {"key": "systemData", "type": "SystemData"},
"repo_url": {"key": "properties.repoUrl", "type": "str"},
"branch": {"key": "properties.branch", "type": "str"},
"folder_path": {"key": "properties.folderPath", "type": "str"},
@@ -7858,7 +8356,7 @@ def __init__(self, *, value: Optional[List["_models.Statistics"]] = None, **kwar
self.value = value
-class SUCScheduleProperties(_serialization.Model): # pylint: disable=too-many-instance-attributes
+class SUCScheduleProperties(_serialization.Model):
"""Definition of schedule parameters.
Variables are only populated by the server, and will be ignored when sending a request.
@@ -8137,7 +8635,7 @@ def __init__(
self.source = source
-class TestJob(_serialization.Model): # pylint: disable=too-many-instance-attributes
+class TestJob(_serialization.Model):
"""Definition of the test job.
:ivar creation_time: Gets or sets the creation time of the test job.
@@ -8242,15 +8740,23 @@ class TestJobCreateParameters(_serialization.Model):
:ivar run_on: Gets or sets the runOn which specifies the group name where the job is to be
executed.
:vartype run_on: str
+ :ivar runtime_environment: The runtime Environment Name on which job needs to be tested.
+ :vartype runtime_environment: str
"""
_attribute_map = {
"parameters": {"key": "parameters", "type": "{str}"},
"run_on": {"key": "runOn", "type": "str"},
+ "runtime_environment": {"key": "runtimeEnvironment", "type": "str"},
}
def __init__(
- self, *, parameters: Optional[Dict[str, str]] = None, run_on: Optional[str] = None, **kwargs: Any
+ self,
+ *,
+ parameters: Optional[Dict[str, str]] = None,
+ run_on: Optional[str] = None,
+ runtime_environment: Optional[str] = None,
+ **kwargs: Any
) -> None:
"""
:keyword parameters: Gets or sets the parameters of the test job.
@@ -8258,10 +8764,13 @@ def __init__(
:keyword run_on: Gets or sets the runOn which specifies the group name where the job is to be
executed.
:paramtype run_on: str
+ :keyword runtime_environment: The runtime Environment Name on which job needs to be tested.
+ :paramtype runtime_environment: str
"""
super().__init__(**kwargs)
self.parameters = parameters
self.run_on = run_on
+ self.runtime_environment = runtime_environment
class TypeField(_serialization.Model):
@@ -8554,12 +9063,17 @@ class Variable(ProxyResource):
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource.
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
+ :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
+ information.
+ :vartype system_data: ~azure.mgmt.automation.models.SystemData
:ivar value: Gets or sets the value of the variable.
:vartype value: str
:ivar is_encrypted: Gets or sets the encrypted flag of the variable.
@@ -8576,12 +9090,14 @@ class Variable(ProxyResource):
"id": {"readonly": True},
"name": {"readonly": True},
"type": {"readonly": True},
+ "system_data": {"readonly": True},
}
_attribute_map = {
"id": {"key": "id", "type": "str"},
"name": {"key": "name", "type": "str"},
"type": {"key": "type", "type": "str"},
+ "system_data": {"key": "systemData", "type": "SystemData"},
"value": {"key": "properties.value", "type": "str"},
"is_encrypted": {"key": "properties.isEncrypted", "type": "bool"},
"creation_time": {"key": "properties.creationTime", "type": "iso-8601"},
@@ -8738,17 +9254,22 @@ def __init__(
self.description = description
-class Watcher(Resource): # pylint: disable=too-many-instance-attributes
+class Watcher(Resource):
"""Definition of the watcher type.
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource.
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
+ :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
+ information.
+ :vartype system_data: ~azure.mgmt.automation.models.SystemData
:ivar etag: Gets or sets the etag of the resource.
:vartype etag: str
:ivar tags: Resource tags.
@@ -8781,6 +9302,7 @@ class Watcher(Resource): # pylint: disable=too-many-instance-attributes
"id": {"readonly": True},
"name": {"readonly": True},
"type": {"readonly": True},
+ "system_data": {"readonly": True},
"status": {"readonly": True},
"creation_time": {"readonly": True},
"last_modified_time": {"readonly": True},
@@ -8791,6 +9313,7 @@ class Watcher(Resource): # pylint: disable=too-many-instance-attributes
"id": {"key": "id", "type": "str"},
"name": {"key": "name", "type": "str"},
"type": {"key": "type", "type": "str"},
+ "system_data": {"key": "systemData", "type": "SystemData"},
"etag": {"key": "etag", "type": "str"},
"tags": {"key": "tags", "type": "{str}"},
"location": {"key": "location", "type": "str"},
@@ -8912,17 +9435,22 @@ def __init__(
self.execution_frequency_in_seconds = execution_frequency_in_seconds
-class Webhook(ProxyResource): # pylint: disable=too-many-instance-attributes
+class Webhook(ProxyResource):
"""Definition of the webhook type.
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar id: Fully qualified resource Id for the resource.
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
:vartype id: str
:ivar name: The name of the resource.
:vartype name: str
- :ivar type: The type of the resource.
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
:vartype type: str
+ :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
+ information.
+ :vartype system_data: ~azure.mgmt.automation.models.SystemData
:ivar is_enabled: Gets or sets the value of the enabled flag of the webhook.
:vartype is_enabled: bool
:ivar uri: Gets or sets the webhook uri.
@@ -8952,12 +9480,14 @@ class Webhook(ProxyResource): # pylint: disable=too-many-instance-attributes
"id": {"readonly": True},
"name": {"readonly": True},
"type": {"readonly": True},
+ "system_data": {"readonly": True},
}
_attribute_map = {
"id": {"key": "id", "type": "str"},
"name": {"key": "name", "type": "str"},
"type": {"key": "type", "type": "str"},
+ "system_data": {"key": "systemData", "type": "SystemData"},
"is_enabled": {"key": "properties.isEnabled", "type": "bool"},
"uri": {"key": "properties.uri", "type": "str"},
"expiry_time": {"key": "properties.expiryTime", "type": "iso-8601"},
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/__init__.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/__init__.py
index ceadd5d1de73..46ebbfa5f78c 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/__init__.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/__init__.py
@@ -5,72 +5,73 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
+# pylint: disable=wrong-import-position
-from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations
-from ._private_link_resources_operations import PrivateLinkResourcesOperations
-from ._agent_registration_information_operations import AgentRegistrationInformationOperations
-from ._dsc_node_operations import DscNodeOperations
-from ._node_reports_operations import NodeReportsOperations
-from ._dsc_compilation_job_operations import DscCompilationJobOperations
-from ._dsc_compilation_job_stream_operations import DscCompilationJobStreamOperations
-from ._node_count_information_operations import NodeCountInformationOperations
-from ._watcher_operations import WatcherOperations
-from ._software_update_configurations_operations import SoftwareUpdateConfigurationsOperations
-from ._webhook_operations import WebhookOperations
-from ._deleted_automation_accounts_operations import DeletedAutomationAccountsOperations
-from ._automation_account_operations import AutomationAccountOperations
-from ._statistics_operations import StatisticsOperations
-from ._usages_operations import UsagesOperations
-from ._keys_operations import KeysOperations
-from ._certificate_operations import CertificateOperations
-from ._connection_operations import ConnectionOperations
-from ._connection_type_operations import ConnectionTypeOperations
-from ._credential_operations import CredentialOperations
-from ._dsc_configuration_operations import DscConfigurationOperations
-from ._dsc_node_configuration_operations import DscNodeConfigurationOperations
-from ._hybrid_runbook_workers_operations import HybridRunbookWorkersOperations
-from ._hybrid_runbook_worker_group_operations import HybridRunbookWorkerGroupOperations
-from ._job_operations import JobOperations
-from ._job_stream_operations import JobStreamOperations
-from ._job_schedule_operations import JobScheduleOperations
-from ._linked_workspace_operations import LinkedWorkspaceOperations
-from ._activity_operations import ActivityOperations
-from ._module_operations import ModuleOperations
-from ._object_data_types_operations import ObjectDataTypesOperations
-from ._fields_operations import FieldsOperations
-from ._operations import Operations
-from ._automation_client_operations import AutomationClientOperationsMixin
-from ._python2_package_operations import Python2PackageOperations
-from ._python3_package_operations import Python3PackageOperations
-from ._runbook_draft_operations import RunbookDraftOperations
-from ._runbook_operations import RunbookOperations
-from ._test_job_streams_operations import TestJobStreamsOperations
-from ._test_job_operations import TestJobOperations
-from ._schedule_operations import ScheduleOperations
-from ._software_update_configuration_machine_runs_operations import SoftwareUpdateConfigurationMachineRunsOperations
-from ._software_update_configuration_runs_operations import SoftwareUpdateConfigurationRunsOperations
-from ._source_control_operations import SourceControlOperations
-from ._source_control_sync_job_operations import SourceControlSyncJobOperations
-from ._source_control_sync_job_streams_operations import SourceControlSyncJobStreamsOperations
-from ._variable_operations import VariableOperations
+from typing import TYPE_CHECKING
+
+if TYPE_CHECKING:
+ from ._patch import * # pylint: disable=unused-wildcard-import
+
+from ._node_count_information_operations import NodeCountInformationOperations # type: ignore
+from ._software_update_configurations_operations import SoftwareUpdateConfigurationsOperations # type: ignore
+from ._deleted_automation_accounts_operations import DeletedAutomationAccountsOperations # type: ignore
+from ._private_link_resources_operations import PrivateLinkResourcesOperations # type: ignore
+from ._agent_registration_information_operations import AgentRegistrationInformationOperations # type: ignore
+from ._dsc_node_operations import DscNodeOperations # type: ignore
+from ._node_reports_operations import NodeReportsOperations # type: ignore
+from ._automation_account_operations import AutomationAccountOperations # type: ignore
+from ._statistics_operations import StatisticsOperations # type: ignore
+from ._usages_operations import UsagesOperations # type: ignore
+from ._keys_operations import KeysOperations # type: ignore
+from ._certificate_operations import CertificateOperations # type: ignore
+from ._connection_operations import ConnectionOperations # type: ignore
+from ._connection_type_operations import ConnectionTypeOperations # type: ignore
+from ._credential_operations import CredentialOperations # type: ignore
+from ._dsc_configuration_operations import DscConfigurationOperations # type: ignore
+from ._dsc_node_configuration_operations import DscNodeConfigurationOperations # type: ignore
+from ._hybrid_runbook_workers_operations import HybridRunbookWorkersOperations # type: ignore
+from ._hybrid_runbook_worker_group_operations import HybridRunbookWorkerGroupOperations # type: ignore
+from ._job_operations import JobOperations # type: ignore
+from ._job_stream_operations import JobStreamOperations # type: ignore
+from ._job_schedule_operations import JobScheduleOperations # type: ignore
+from ._linked_workspace_operations import LinkedWorkspaceOperations # type: ignore
+from ._activity_operations import ActivityOperations # type: ignore
+from ._module_operations import ModuleOperations # type: ignore
+from ._object_data_types_operations import ObjectDataTypesOperations # type: ignore
+from ._fields_operations import FieldsOperations # type: ignore
+from ._operations import Operations # type: ignore
+from ._automation_client_operations import AutomationClientOperationsMixin # type: ignore
+from ._package_operations import PackageOperations # type: ignore
+from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations # type: ignore
+from ._python2_package_operations import Python2PackageOperations # type: ignore
+from ._python3_package_operations import Python3PackageOperations # type: ignore
+from ._runbook_draft_operations import RunbookDraftOperations # type: ignore
+from ._runbook_operations import RunbookOperations # type: ignore
+from ._test_job_streams_operations import TestJobStreamsOperations # type: ignore
+from ._test_job_operations import TestJobOperations # type: ignore
+from ._runtime_environments_operations import RuntimeEnvironmentsOperations # type: ignore
+from ._schedule_operations import ScheduleOperations # type: ignore
+from ._software_update_configuration_machine_runs_operations import SoftwareUpdateConfigurationMachineRunsOperations # type: ignore
+from ._software_update_configuration_runs_operations import SoftwareUpdateConfigurationRunsOperations # type: ignore
+from ._source_control_operations import SourceControlOperations # type: ignore
+from ._source_control_sync_job_operations import SourceControlSyncJobOperations # type: ignore
+from ._source_control_sync_job_streams_operations import SourceControlSyncJobStreamsOperations # type: ignore
+from ._variable_operations import VariableOperations # type: ignore
+from ._watcher_operations import WatcherOperations # type: ignore
+from ._webhook_operations import WebhookOperations # type: ignore
from ._patch import __all__ as _patch_all
-from ._patch import * # pylint: disable=unused-wildcard-import
+from ._patch import *
from ._patch import patch_sdk as _patch_sdk
__all__ = [
- "PrivateEndpointConnectionsOperations",
+ "NodeCountInformationOperations",
+ "SoftwareUpdateConfigurationsOperations",
+ "DeletedAutomationAccountsOperations",
"PrivateLinkResourcesOperations",
"AgentRegistrationInformationOperations",
"DscNodeOperations",
"NodeReportsOperations",
- "DscCompilationJobOperations",
- "DscCompilationJobStreamOperations",
- "NodeCountInformationOperations",
- "WatcherOperations",
- "SoftwareUpdateConfigurationsOperations",
- "WebhookOperations",
- "DeletedAutomationAccountsOperations",
"AutomationAccountOperations",
"StatisticsOperations",
"UsagesOperations",
@@ -93,12 +94,15 @@
"FieldsOperations",
"Operations",
"AutomationClientOperationsMixin",
+ "PackageOperations",
+ "PrivateEndpointConnectionsOperations",
"Python2PackageOperations",
"Python3PackageOperations",
"RunbookDraftOperations",
"RunbookOperations",
"TestJobStreamsOperations",
"TestJobOperations",
+ "RuntimeEnvironmentsOperations",
"ScheduleOperations",
"SoftwareUpdateConfigurationMachineRunsOperations",
"SoftwareUpdateConfigurationRunsOperations",
@@ -106,6 +110,8 @@
"SourceControlSyncJobOperations",
"SourceControlSyncJobStreamsOperations",
"VariableOperations",
+ "WatcherOperations",
+ "WebhookOperations",
]
-__all__.extend([p for p in _patch_all if p not in __all__])
+__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
_patch_sdk()
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_activity_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_activity_operations.py
index 50bb28659528..202106ff98dc 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_activity_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_activity_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,8 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar
+from typing import Any, Callable, Dict, Iterable, Optional, TypeVar
+import urllib.parse
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -30,7 +30,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -49,7 +49,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -84,7 +84,7 @@ def build_list_by_module_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -157,7 +157,7 @@ def get(
:rtype: ~azure.mgmt.automation.models.Activity
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -168,7 +168,7 @@ def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.Activity] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -224,10 +224,10 @@ def list_by_module(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ActivityListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -250,7 +250,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_agent_registration_information_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_agent_registration_information_operations.py
index e3bb03b0acb3..76ddfb87a60f 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_agent_registration_information_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_agent_registration_information_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload
+from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -30,7 +29,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -44,7 +43,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", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -77,7 +76,7 @@ def build_regenerate_key_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", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -141,7 +140,7 @@ def get(self, resource_group_name: str, automation_account_name: str, **kwargs:
:rtype: ~azure.mgmt.automation.models.AgentRegistration
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -152,7 +151,7 @@ def get(self, resource_group_name: str, automation_account_name: str, **kwargs:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.AgentRegistration] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -267,7 +266,7 @@ def regenerate_key(
:rtype: ~azure.mgmt.automation.models.AgentRegistration
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -278,7 +277,7 @@ def regenerate_key(
_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", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.AgentRegistration] = kwargs.pop("cls", None)
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_automation_account_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_automation_account_operations.py
index 83d5e3ac8b09..1b207c95aa45 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_automation_account_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_automation_account_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,8 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload
+from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload
+import urllib.parse
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -31,7 +31,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -45,7 +45,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -81,7 +81,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -117,7 +117,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -150,7 +150,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -181,7 +181,7 @@ def build_list_by_resource_group_request(resource_group_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -211,7 +211,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -233,6 +233,41 @@ def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest:
return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
+def build_list_deleted_runbooks_request(
+ resource_group_name: str, automation_account_name: 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", "2024-10-23"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/listDeletedRunbooks",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "resourceGroupName": _SERIALIZER.url(
+ "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._]+$"
+ ),
+ "automationAccountName": _SERIALIZER.url(
+ "automation_account_name", automation_account_name, "str", pattern=r"^[a-zA-Z][a-zA-Z-_0-9]*$"
+ ),
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_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 AutomationAccountOperations:
"""
.. warning::
@@ -334,7 +369,7 @@ def update(
:rtype: ~azure.mgmt.automation.models.AutomationAccount
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -345,7 +380,7 @@ def update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.AutomationAccount] = kwargs.pop("cls", None)
@@ -472,7 +507,7 @@ def create_or_update(
:rtype: ~azure.mgmt.automation.models.AutomationAccount
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -483,7 +518,7 @@ def create_or_update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.AutomationAccount] = kwargs.pop("cls", None)
@@ -544,7 +579,7 @@ def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -555,7 +590,7 @@ def delete( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_delete_request(
@@ -598,7 +633,7 @@ def get(self, resource_group_name: str, automation_account_name: str, **kwargs:
:rtype: ~azure.mgmt.automation.models.AutomationAccount
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -609,7 +644,7 @@ def get(self, resource_group_name: str, automation_account_name: str, **kwargs:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.AutomationAccount] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -657,10 +692,10 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.AutomationAccountListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -681,7 +716,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
@@ -724,10 +770,10 @@ def list(self, **kwargs: Any) -> Iterable["_models.AutomationAccount"]:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.AutomationAccountListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -747,7 +793,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
@@ -776,3 +833,86 @@ def get_next(next_link=None):
return pipeline_response
return ItemPaged(get_next, extract_data)
+
+ @distributed_trace
+ def list_deleted_runbooks(
+ self, resource_group_name: str, automation_account_name: str, **kwargs: Any
+ ) -> Iterable["_models.DeletedRunbook"]:
+ """Retrieve the deleted runbooks for an automation account.
+
+ :param resource_group_name: Name of an Azure Resource group. Required.
+ :type resource_group_name: str
+ :param automation_account_name: The name of the automation account. Required.
+ :type automation_account_name: str
+ :return: An iterator like instance of either DeletedRunbook or the result of cls(response)
+ :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.automation.models.DeletedRunbook]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _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[_models.DeletedRunbookListResult] = kwargs.pop("cls", None)
+
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ def prepare_request(next_link=None):
+ if not next_link:
+
+ _request = build_list_deleted_runbooks_request(
+ resource_group_name=resource_group_name,
+ automation_account_name=automation_account_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ else:
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
+ _request.url = self._client.format_url(_request.url)
+ _request.method = "GET"
+ return _request
+
+ def extract_data(pipeline_response):
+ deserialized = self._deserialize("DeletedRunbookListResult", pipeline_response)
+ list_of_elem = deserialized.value
+ if cls:
+ list_of_elem = cls(list_of_elem) # type: ignore
+ return deserialized.next_link or None, iter(list_of_elem)
+
+ def get_next(next_link=None):
+ _request = prepare_request(next_link)
+
+ _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.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return ItemPaged(get_next, extract_data)
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_automation_client_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_automation_client_operations.py
index adee29c50c2a..83847906fa3f 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_automation_client_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_automation_client_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload
+from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -31,7 +30,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -45,7 +44,7 @@ def build_convert_graph_runbook_content_request( # pylint: disable=name-too-lon
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -150,7 +149,7 @@ def convert_graph_runbook_content(
:rtype: ~azure.mgmt.automation.models.GraphicalRunbookContent
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -161,7 +160,7 @@ def convert_graph_runbook_content(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.GraphicalRunbookContent] = kwargs.pop("cls", None)
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_certificate_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_certificate_operations.py
index bc2182270c5d..0853753250da 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_certificate_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_certificate_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,8 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload
+from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload
+import urllib.parse
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -31,7 +31,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -45,7 +45,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -79,7 +79,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -113,7 +113,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -150,7 +150,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -187,7 +187,7 @@ def build_list_by_automation_account_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -252,7 +252,7 @@ def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -263,7 +263,7 @@ def delete( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_delete_request(
@@ -311,7 +311,7 @@ def get(
:rtype: ~azure.mgmt.automation.models.Certificate
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -322,7 +322,7 @@ def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.Certificate] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -452,7 +452,7 @@ def create_or_update(
:rtype: ~azure.mgmt.automation.models.Certificate
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -463,7 +463,7 @@ def create_or_update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Certificate] = kwargs.pop("cls", None)
@@ -599,7 +599,7 @@ def update(
:rtype: ~azure.mgmt.automation.models.Certificate
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -610,7 +610,7 @@ def update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Certificate] = kwargs.pop("cls", None)
@@ -675,10 +675,10 @@ def list_by_automation_account(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.CertificateListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -700,7 +700,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_connection_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_connection_operations.py
index df8712d1010f..3b276d4d9f96 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_connection_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_connection_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,8 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload
+from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload
+import urllib.parse
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -31,7 +31,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -45,7 +45,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -79,7 +79,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -113,7 +113,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -150,7 +150,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -187,7 +187,7 @@ def build_list_by_automation_account_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -252,7 +252,7 @@ def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -263,7 +263,7 @@ def delete( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_delete_request(
@@ -311,7 +311,7 @@ def get(
:rtype: ~azure.mgmt.automation.models.Connection
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -322,7 +322,7 @@ def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.Connection] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -451,7 +451,7 @@ def create_or_update(
:rtype: ~azure.mgmt.automation.models.Connection
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -462,7 +462,7 @@ def create_or_update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Connection] = kwargs.pop("cls", None)
@@ -598,7 +598,7 @@ def update(
:rtype: ~azure.mgmt.automation.models.Connection
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -609,7 +609,7 @@ def update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Connection] = kwargs.pop("cls", None)
@@ -674,10 +674,10 @@ def list_by_automation_account(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ConnectionListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -699,7 +699,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_connection_type_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_connection_type_operations.py
index 50ac0f4b715b..1b49cf2cdb08 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_connection_type_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_connection_type_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,8 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload
+from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload
+import urllib.parse
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -31,7 +31,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -49,7 +49,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -87,7 +87,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -125,7 +125,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -162,7 +162,7 @@ def build_list_by_automation_account_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -227,7 +227,7 @@ def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -238,7 +238,7 @@ def delete( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_delete_request(
@@ -286,7 +286,7 @@ def get(
:rtype: ~azure.mgmt.automation.models.ConnectionType
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -297,7 +297,7 @@ def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ConnectionType] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -427,7 +427,7 @@ def create_or_update(
:rtype: ~azure.mgmt.automation.models.ConnectionType
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -438,7 +438,7 @@ def create_or_update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.ConnectionType] = kwargs.pop("cls", None)
@@ -503,10 +503,10 @@ def list_by_automation_account(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ConnectionTypeListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -528,7 +528,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_credential_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_credential_operations.py
index 372bc426007e..f3f0345e30a1 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_credential_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_credential_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,8 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload
+from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload
+import urllib.parse
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -31,7 +31,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -45,7 +45,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -79,7 +79,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -113,7 +113,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -150,7 +150,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -187,7 +187,7 @@ def build_list_by_automation_account_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -252,7 +252,7 @@ def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -263,7 +263,7 @@ def delete( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_delete_request(
@@ -311,7 +311,7 @@ def get(
:rtype: ~azure.mgmt.automation.models.Credential
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -322,7 +322,7 @@ def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.Credential] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -451,7 +451,7 @@ def create_or_update(
:rtype: ~azure.mgmt.automation.models.Credential
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -462,7 +462,7 @@ def create_or_update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Credential] = kwargs.pop("cls", None)
@@ -598,7 +598,7 @@ def update(
:rtype: ~azure.mgmt.automation.models.Credential
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -609,7 +609,7 @@ def update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Credential] = kwargs.pop("cls", None)
@@ -674,10 +674,10 @@ def list_by_automation_account(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.CredentialListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -699,7 +699,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_deleted_automation_accounts_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_deleted_automation_accounts_operations.py
index 83a91a3d95c6..be31997aca95 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_deleted_automation_accounts_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_deleted_automation_accounts_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,7 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, Callable, Dict, Optional, Type, TypeVar
+from typing import Any, Callable, Dict, Optional, TypeVar
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -29,7 +28,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -41,7 +40,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H
_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", "2022-01-31"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -90,7 +89,7 @@ def list_by_subscription(self, **kwargs: Any) -> _models.DeletedAutomationAccoun
:rtype: ~azure.mgmt.automation.models.DeletedAutomationAccountListResult
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -101,7 +100,7 @@ def list_by_subscription(self, **kwargs: Any) -> _models.DeletedAutomationAccoun
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-01-31"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.DeletedAutomationAccountListResult] = kwargs.pop("cls", None)
_request = build_list_by_subscription_request(
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_compilation_job_stream_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_compilation_job_stream_operations.py
deleted file mode 100644
index 697d7941fffe..000000000000
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_compilation_job_stream_operations.py
+++ /dev/null
@@ -1,154 +0,0 @@
-# pylint: disable=too-many-lines,too-many-statements
-# 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 sys
-from typing import Any, Callable, Dict, Optional, Type, TypeVar
-
-from azure.core.exceptions import (
- ClientAuthenticationError,
- HttpResponseError,
- ResourceExistsError,
- ResourceNotFoundError,
- ResourceNotModifiedError,
- map_error,
-)
-from azure.core.pipeline import PipelineResponse
-from azure.core.rest import HttpRequest, HttpResponse
-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
-
-if sys.version_info >= (3, 9):
- from collections.abc import MutableMapping
-else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
-T = TypeVar("T")
-ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
-
-_SERIALIZER = Serializer()
-_SERIALIZER.client_side_validation = False
-
-
-def build_list_by_job_request(
- resource_group_name: str, automation_account_name: str, job_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", "2020-01-13-preview"))
- accept = _headers.pop("Accept", "application/json")
-
- # Construct URL
- _url = kwargs.pop(
- "template_url",
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/compilationjobs/{jobId}/streams",
- ) # pylint: disable=line-too-long
- path_format_arguments = {
- "resourceGroupName": _SERIALIZER.url(
- "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._]+$"
- ),
- "automationAccountName": _SERIALIZER.url("automation_account_name", automation_account_name, "str"),
- "jobId": _SERIALIZER.url("job_id", job_id, "str"),
- "subscriptionId": _SERIALIZER.url("subscription_id", subscription_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="GET", url=_url, params=_params, headers=_headers, **kwargs)
-
-
-class DscCompilationJobStreamOperations:
- """
- .. warning::
- **DO NOT** instantiate this class directly.
-
- Instead, you should access the following operations through
- :class:`~azure.mgmt.automation.AutomationClient`'s
- :attr:`dsc_compilation_job_stream` 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 list_by_job(
- self, resource_group_name: str, automation_account_name: str, job_id: str, **kwargs: Any
- ) -> _models.JobStreamListResult:
- """Retrieve all the job streams for the compilation Job.
-
- .. seealso::
- - http://aka.ms/azureautomationsdk/jobstreamoperations
-
- :param resource_group_name: Name of an Azure Resource group. Required.
- :type resource_group_name: str
- :param automation_account_name: The name of the automation account. Required.
- :type automation_account_name: str
- :param job_id: The job id. Required.
- :type job_id: str
- :return: JobStreamListResult or the result of cls(response)
- :rtype: ~azure.mgmt.automation.models.JobStreamListResult
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
- 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", "2020-01-13-preview"))
- cls: ClsType[_models.JobStreamListResult] = kwargs.pop("cls", None)
-
- _request = build_list_by_job_request(
- resource_group_name=resource_group_name,
- automation_account_name=automation_account_name,
- job_id=job_id,
- subscription_id=self._config.subscription_id,
- api_version=api_version,
- headers=_headers,
- params=_params,
- )
- _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.ErrorResponse, pipeline_response)
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- deserialized = self._deserialize("JobStreamListResult", pipeline_response.http_response)
-
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
-
- return deserialized # type: ignore
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_configuration_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_configuration_operations.py
index 4ba5b0c2322f..73d7c2021994 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_configuration_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_configuration_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,8 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, Callable, Dict, Iterable, Iterator, Optional, Type, TypeVar, Union, overload
+from typing import Any, Callable, Dict, Iterable, Iterator, Optional, TypeVar, Union, overload
+import urllib.parse
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -32,7 +32,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -46,7 +46,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -80,7 +80,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -114,7 +114,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -151,7 +151,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -188,7 +188,7 @@ def build_get_content_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "text/powershell")
# Construct URL
@@ -230,7 +230,7 @@ def build_list_by_automation_account_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -303,7 +303,7 @@ def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -314,7 +314,7 @@ def delete( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_delete_request(
@@ -362,7 +362,7 @@ def get(
:rtype: ~azure.mgmt.automation.models.DscConfiguration
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -373,7 +373,7 @@ def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.DscConfiguration] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -497,7 +497,7 @@ def create_or_update(
:rtype: ~azure.mgmt.automation.models.DscConfiguration
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -508,7 +508,7 @@ def create_or_update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.DscConfiguration] = kwargs.pop("cls", None)
@@ -644,7 +644,7 @@ def update(
:rtype: ~azure.mgmt.automation.models.DscConfiguration
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -655,7 +655,7 @@ def update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.DscConfiguration] = kwargs.pop("cls", None)
@@ -725,7 +725,7 @@ def get_content(
:rtype: Iterator[bytes]
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -736,7 +736,7 @@ def get_content(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
_request = build_get_content_request(
@@ -808,10 +808,10 @@ def list_by_automation_account(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.DscConfigurationListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -837,7 +837,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_node_configuration_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_node_configuration_operations.py
index fc27aa85c5cc..30f1b753a052 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_node_configuration_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_node_configuration_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,8 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload
+import urllib.parse
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -35,7 +35,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -53,7 +53,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -91,7 +91,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -129,7 +129,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -174,7 +174,7 @@ def build_list_by_automation_account_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -247,7 +247,7 @@ def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -258,7 +258,7 @@ def delete( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_delete_request(
@@ -306,7 +306,7 @@ def get(
:rtype: ~azure.mgmt.automation.models.DscNodeConfiguration
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -317,7 +317,7 @@ def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.DscNodeConfiguration] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -358,7 +358,7 @@ def _create_or_update_initial(
parameters: Union[_models.DscNodeConfigurationCreateOrUpdateParameters, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -369,7 +369,7 @@ def _create_or_update_initial(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
@@ -517,7 +517,7 @@ def begin_create_or_update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[None] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
@@ -598,10 +598,10 @@ def list_by_automation_account(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.DscNodeConfigurationListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -627,7 +627,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_node_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_node_operations.py
index 8eb8870812c8..b8a48b1a4e2b 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_node_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_node_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,8 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload
+from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload
+import urllib.parse
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -31,7 +31,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -45,7 +45,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", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -79,7 +79,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", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -113,7 +113,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", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -158,7 +158,7 @@ def build_list_by_automation_account_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", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -231,7 +231,7 @@ def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -242,7 +242,7 @@ def delete( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_delete_request(
@@ -290,7 +290,7 @@ def get(
:rtype: ~azure.mgmt.automation.models.DscNode
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -301,7 +301,7 @@ def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.DscNode] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -426,7 +426,7 @@ def update(
:rtype: ~azure.mgmt.automation.models.DscNode
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -437,7 +437,7 @@ def update(
_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", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.DscNode] = kwargs.pop("cls", None)
@@ -517,10 +517,10 @@ def list_by_automation_account(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.DscNodeListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -546,7 +546,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_fields_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_fields_operations.py
index c7c71d1e5b98..dc54459bf232 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_fields_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_fields_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,8 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar
+from typing import Any, Callable, Dict, Iterable, Optional, TypeVar
+import urllib.parse
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -30,7 +30,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -49,7 +49,7 @@ def build_list_by_type_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -121,10 +121,10 @@ def list_by_type(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.TypeFieldListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -148,7 +148,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_hybrid_runbook_worker_group_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_hybrid_runbook_worker_group_operations.py
index 951dda65a1c9..0c76afd6c989 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_hybrid_runbook_worker_group_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_hybrid_runbook_worker_group_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,8 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload
+from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload
+import urllib.parse
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -31,7 +31,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -49,7 +49,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -89,7 +89,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -129,7 +129,7 @@ def build_create_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -172,7 +172,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -216,7 +216,7 @@ def build_list_by_automation_account_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -287,7 +287,7 @@ def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -298,7 +298,7 @@ def delete( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_delete_request(
@@ -350,7 +350,7 @@ def get(
:rtype: ~azure.mgmt.automation.models.HybridRunbookWorkerGroup
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -361,7 +361,7 @@ def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.HybridRunbookWorkerGroup] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -492,7 +492,7 @@ def create(
:rtype: ~azure.mgmt.automation.models.HybridRunbookWorkerGroup
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -503,7 +503,7 @@ def create(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.HybridRunbookWorkerGroup] = kwargs.pop("cls", None)
@@ -647,7 +647,7 @@ def update(
:rtype: ~azure.mgmt.automation.models.HybridRunbookWorkerGroup
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -658,7 +658,7 @@ def update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.HybridRunbookWorkerGroup] = kwargs.pop("cls", None)
@@ -728,10 +728,10 @@ def list_by_automation_account(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.HybridRunbookWorkerGroupsListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -754,7 +754,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_hybrid_runbook_workers_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_hybrid_runbook_workers_operations.py
index 8ca987be9bb0..b70cfc1db19b 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_hybrid_runbook_workers_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_hybrid_runbook_workers_operations.py
@@ -1,4 +1,4 @@
-# pylint: disable=too-many-lines,too-many-statements
+# pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +8,8 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload
+from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload
+import urllib.parse
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -31,7 +32,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -50,7 +51,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -92,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -134,7 +135,7 @@ def build_create_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -168,6 +169,51 @@ def build_create_request(
return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs)
+def build_patch_request(
+ resource_group_name: str,
+ automation_account_name: str,
+ hybrid_runbook_worker_group_name: str,
+ hybrid_runbook_worker_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", "2024-10-23"))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/hybridRunbookWorkerGroups/{hybridRunbookWorkerGroupName}/hybridRunbookWorkers/{hybridRunbookWorkerId}",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "resourceGroupName": _SERIALIZER.url(
+ "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._]+$"
+ ),
+ "automationAccountName": _SERIALIZER.url("automation_account_name", automation_account_name, "str"),
+ "hybridRunbookWorkerGroupName": _SERIALIZER.url(
+ "hybrid_runbook_worker_group_name", hybrid_runbook_worker_group_name, "str"
+ ),
+ "hybridRunbookWorkerId": _SERIALIZER.url("hybrid_runbook_worker_id", hybrid_runbook_worker_id, "str"),
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_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
+ if content_type is not None:
+ _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
+ _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
+
+ return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs)
+
+
def build_move_request(
resource_group_name: str,
automation_account_name: str,
@@ -179,7 +225,7 @@ def build_move_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -225,7 +271,7 @@ def build_list_by_hybrid_runbook_worker_group_request( # pylint: disable=name-t
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -302,7 +348,7 @@ def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -313,7 +359,7 @@ def delete( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_delete_request(
@@ -369,7 +415,7 @@ def get(
:rtype: ~azure.mgmt.automation.models.HybridRunbookWorker
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -380,7 +426,7 @@ def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.HybridRunbookWorker] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -519,7 +565,7 @@ def create(
:rtype: ~azure.mgmt.automation.models.HybridRunbookWorker
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -530,7 +576,7 @@ def create(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.HybridRunbookWorker] = kwargs.pop("cls", None)
@@ -579,7 +625,176 @@ def create(
return deserialized # type: ignore
@overload
- def move( # pylint: disable=inconsistent-return-statements
+ def patch(
+ self,
+ resource_group_name: str,
+ automation_account_name: str,
+ hybrid_runbook_worker_group_name: str,
+ hybrid_runbook_worker_id: str,
+ hybrid_runbook_worker_creation_parameters: Optional[_models.HybridRunbookWorkerCreateParameters] = None,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> _models.HybridRunbookWorker:
+ """Update a hybrid runbook worker.
+
+ .. seealso::
+ - http://aka.ms/azureautomationsdk/hybridrunbookworkeroperations
+
+ :param resource_group_name: Name of an Azure Resource group. Required.
+ :type resource_group_name: str
+ :param automation_account_name: The name of the automation account. Required.
+ :type automation_account_name: str
+ :param hybrid_runbook_worker_group_name: The hybrid runbook worker group name. Required.
+ :type hybrid_runbook_worker_group_name: str
+ :param hybrid_runbook_worker_id: The hybrid runbook worker id. Required.
+ :type hybrid_runbook_worker_id: str
+ :param hybrid_runbook_worker_creation_parameters: The create or update parameters for hybrid
+ runbook worker. Default value is None.
+ :type hybrid_runbook_worker_creation_parameters:
+ ~azure.mgmt.automation.models.HybridRunbookWorkerCreateParameters
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: HybridRunbookWorker or the result of cls(response)
+ :rtype: ~azure.mgmt.automation.models.HybridRunbookWorker
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @overload
+ def patch(
+ self,
+ resource_group_name: str,
+ automation_account_name: str,
+ hybrid_runbook_worker_group_name: str,
+ hybrid_runbook_worker_id: str,
+ hybrid_runbook_worker_creation_parameters: Optional[IO[bytes]] = None,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> _models.HybridRunbookWorker:
+ """Update a hybrid runbook worker.
+
+ .. seealso::
+ - http://aka.ms/azureautomationsdk/hybridrunbookworkeroperations
+
+ :param resource_group_name: Name of an Azure Resource group. Required.
+ :type resource_group_name: str
+ :param automation_account_name: The name of the automation account. Required.
+ :type automation_account_name: str
+ :param hybrid_runbook_worker_group_name: The hybrid runbook worker group name. Required.
+ :type hybrid_runbook_worker_group_name: str
+ :param hybrid_runbook_worker_id: The hybrid runbook worker id. Required.
+ :type hybrid_runbook_worker_id: str
+ :param hybrid_runbook_worker_creation_parameters: The create or update parameters for hybrid
+ runbook worker. Default value is None.
+ :type hybrid_runbook_worker_creation_parameters: IO[bytes]
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: HybridRunbookWorker or the result of cls(response)
+ :rtype: ~azure.mgmt.automation.models.HybridRunbookWorker
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @distributed_trace
+ def patch(
+ self,
+ resource_group_name: str,
+ automation_account_name: str,
+ hybrid_runbook_worker_group_name: str,
+ hybrid_runbook_worker_id: str,
+ hybrid_runbook_worker_creation_parameters: Optional[
+ Union[_models.HybridRunbookWorkerCreateParameters, IO[bytes]]
+ ] = None,
+ **kwargs: Any
+ ) -> _models.HybridRunbookWorker:
+ """Update a hybrid runbook worker.
+
+ .. seealso::
+ - http://aka.ms/azureautomationsdk/hybridrunbookworkeroperations
+
+ :param resource_group_name: Name of an Azure Resource group. Required.
+ :type resource_group_name: str
+ :param automation_account_name: The name of the automation account. Required.
+ :type automation_account_name: str
+ :param hybrid_runbook_worker_group_name: The hybrid runbook worker group name. Required.
+ :type hybrid_runbook_worker_group_name: str
+ :param hybrid_runbook_worker_id: The hybrid runbook worker id. Required.
+ :type hybrid_runbook_worker_id: str
+ :param hybrid_runbook_worker_creation_parameters: The create or update parameters for hybrid
+ runbook worker. Is either a HybridRunbookWorkerCreateParameters type or a IO[bytes] type.
+ Default value is None.
+ :type hybrid_runbook_worker_creation_parameters:
+ ~azure.mgmt.automation.models.HybridRunbookWorkerCreateParameters or IO[bytes]
+ :return: HybridRunbookWorker or the result of cls(response)
+ :rtype: ~azure.mgmt.automation.models.HybridRunbookWorker
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ _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", self._config.api_version))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ cls: ClsType[_models.HybridRunbookWorker] = kwargs.pop("cls", None)
+
+ content_type = content_type or "application/json"
+ _json = None
+ _content = None
+ if isinstance(hybrid_runbook_worker_creation_parameters, (IOBase, bytes)):
+ _content = hybrid_runbook_worker_creation_parameters
+ else:
+ if hybrid_runbook_worker_creation_parameters is not None:
+ _json = self._serialize.body(
+ hybrid_runbook_worker_creation_parameters, "HybridRunbookWorkerCreateParameters"
+ )
+ else:
+ _json = None
+
+ _request = build_patch_request(
+ resource_group_name=resource_group_name,
+ automation_account_name=automation_account_name,
+ hybrid_runbook_worker_group_name=hybrid_runbook_worker_group_name,
+ hybrid_runbook_worker_id=hybrid_runbook_worker_id,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ content_type=content_type,
+ json=_json,
+ content=_content,
+ headers=_headers,
+ params=_params,
+ )
+ _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.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize("HybridRunbookWorker", pipeline_response.http_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+
+ return deserialized # type: ignore
+
+ @overload
+ def move(
self,
resource_group_name: str,
automation_account_name: str,
@@ -616,7 +831,7 @@ def move( # pylint: disable=inconsistent-return-statements
"""
@overload
- def move( # pylint: disable=inconsistent-return-statements
+ def move(
self,
resource_group_name: str,
automation_account_name: str,
@@ -682,7 +897,7 @@ def move( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -693,7 +908,7 @@ def move( # pylint: disable=inconsistent-return-statements
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[None] = kwargs.pop("cls", None)
@@ -764,10 +979,10 @@ def list_by_hybrid_runbook_worker_group(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.HybridRunbookWorkersListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -791,7 +1006,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_job_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_job_operations.py
index 9f12d52e13f8..0155c32e9b81 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_job_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_job_operations.py
@@ -1,4 +1,4 @@
-# pylint: disable=too-many-lines,too-many-statements
+# pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +8,8 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload
+from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload
+import urllib.parse
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -31,7 +32,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -51,7 +52,7 @@ def build_get_output_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "text/plain")
# Construct URL
@@ -93,7 +94,7 @@ def build_get_runbook_content_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "text/powershell")
# Construct URL
@@ -135,7 +136,7 @@ def build_suspend_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -177,7 +178,7 @@ def build_stop_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -219,7 +220,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -261,7 +262,7 @@ def build_create_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -306,7 +307,7 @@ def build_list_by_automation_account_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -349,7 +350,7 @@ def build_resume_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -424,7 +425,7 @@ def get_output(
:rtype: str
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -435,7 +436,7 @@ def get_output(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[str] = kwargs.pop("cls", None)
_request = build_get_output_request(
@@ -494,7 +495,7 @@ def get_runbook_content(
:rtype: str
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -505,7 +506,7 @@ def get_runbook_content(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[str] = kwargs.pop("cls", None)
_request = build_get_runbook_content_request(
@@ -564,7 +565,7 @@ def suspend( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -575,7 +576,7 @@ def suspend( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_suspend_request(
@@ -631,7 +632,7 @@ def stop( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -642,7 +643,7 @@ def stop( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_stop_request(
@@ -698,7 +699,7 @@ def get(
:rtype: ~azure.mgmt.automation.models.Job
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -709,7 +710,7 @@ def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.Job] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -843,7 +844,7 @@ def create(
:rtype: ~azure.mgmt.automation.models.Job
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -854,7 +855,7 @@ def create(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Job] = kwargs.pop("cls", None)
@@ -929,10 +930,10 @@ def list_by_automation_account(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.JobListResultV2] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -956,7 +957,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
@@ -1012,7 +1024,7 @@ def resume( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1023,7 +1035,7 @@ def resume( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_resume_request(
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_job_schedule_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_job_schedule_operations.py
index ef27bd3221c9..f84480e16421 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_job_schedule_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_job_schedule_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,8 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload
+from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload
+import urllib.parse
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -31,7 +31,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -45,7 +45,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -79,7 +79,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -113,7 +113,7 @@ def build_create_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -155,7 +155,7 @@ def build_list_by_automation_account_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -222,7 +222,7 @@ def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -233,7 +233,7 @@ def delete( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_delete_request(
@@ -281,7 +281,7 @@ def get(
:rtype: ~azure.mgmt.automation.models.JobSchedule
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -292,7 +292,7 @@ def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.JobSchedule] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -416,7 +416,7 @@ def create(
:rtype: ~azure.mgmt.automation.models.JobSchedule
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -427,7 +427,7 @@ def create(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.JobSchedule] = kwargs.pop("cls", None)
@@ -494,10 +494,10 @@ def list_by_automation_account(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.JobScheduleListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -520,7 +520,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_job_stream_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_job_stream_operations.py
index 1f9344ccced1..74df85b0e078 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_job_stream_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_job_stream_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,8 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar
+from typing import Any, Callable, Dict, Iterable, Optional, TypeVar
+import urllib.parse
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -30,7 +30,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -51,7 +51,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -95,7 +95,7 @@ def build_list_by_job_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -175,7 +175,7 @@ def get(
:rtype: ~azure.mgmt.automation.models.JobStream
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -186,7 +186,7 @@ def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.JobStream] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -253,10 +253,10 @@ def list_by_job(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.JobStreamListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -281,7 +281,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_keys_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_keys_operations.py
index 7e4ad0127fb8..636a11161ee4 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_keys_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_keys_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,7 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, Callable, Dict, Optional, Type, TypeVar
+from typing import Any, Callable, Dict, Optional, TypeVar
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -29,7 +28,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -43,7 +42,7 @@ def build_list_by_automation_account_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -103,7 +102,7 @@ def list_by_automation_account(
:rtype: ~azure.mgmt.automation.models.KeyListResult
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -114,7 +113,7 @@ def list_by_automation_account(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.KeyListResult] = kwargs.pop("cls", None)
_request = build_list_by_automation_account_request(
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_linked_workspace_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_linked_workspace_operations.py
index cdb3dcd4d2e1..147328ee3c50 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_linked_workspace_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_linked_workspace_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,7 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, Callable, Dict, Optional, Type, TypeVar
+from typing import Any, Callable, Dict, Optional, TypeVar
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -29,7 +28,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -43,7 +42,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -104,7 +103,7 @@ def get(self, resource_group_name: str, automation_account_name: str, **kwargs:
:rtype: ~azure.mgmt.automation.models.LinkedWorkspace
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -115,7 +114,7 @@ def get(self, resource_group_name: str, automation_account_name: str, **kwargs:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.LinkedWorkspace] = kwargs.pop("cls", None)
_request = build_get_request(
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_module_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_module_operations.py
index 4fa315903480..31bd545f10eb 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_module_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_module_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,8 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload
+from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload
+import urllib.parse
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -31,7 +31,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -45,7 +45,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -79,7 +79,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -113,7 +113,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -150,7 +150,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -187,7 +187,7 @@ def build_list_by_automation_account_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -252,7 +252,7 @@ def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -263,7 +263,7 @@ def delete( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_delete_request(
@@ -311,7 +311,7 @@ def get(
:rtype: ~azure.mgmt.automation.models.Module
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -322,7 +322,7 @@ def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.Module] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -446,7 +446,7 @@ def create_or_update(
:rtype: ~azure.mgmt.automation.models.Module
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -457,7 +457,7 @@ def create_or_update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Module] = kwargs.pop("cls", None)
@@ -593,7 +593,7 @@ def update(
:rtype: ~azure.mgmt.automation.models.Module
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -604,7 +604,7 @@ def update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Module] = kwargs.pop("cls", None)
@@ -669,10 +669,10 @@ def list_by_automation_account(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ModuleListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -694,7 +694,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_node_count_information_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_node_count_information_operations.py
index 4178caf1583e..b8b81ee6b055 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_node_count_information_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_node_count_information_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,7 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, Callable, Dict, Optional, Type, TypeVar, Union
+from typing import Any, Callable, Dict, Optional, TypeVar, Union
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -29,7 +28,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -47,7 +46,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", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -118,7 +117,7 @@ def get(
:rtype: ~azure.mgmt.automation.models.NodeCounts
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -129,7 +128,7 @@ def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.NodeCounts] = kwargs.pop("cls", None)
_request = build_get_request(
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_node_reports_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_node_reports_operations.py
index d1c3cc3bef93..e1aeb75f7c17 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_node_reports_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_node_reports_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,8 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar
+from typing import Any, Callable, Dict, Iterable, Optional, TypeVar
+import urllib.parse
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -30,7 +30,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -51,7 +51,7 @@ def build_list_by_node_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", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -92,7 +92,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", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -132,7 +132,7 @@ def build_get_content_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", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -209,10 +209,10 @@ def list_by_node(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.DscNodeReportListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -236,7 +236,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
@@ -287,7 +298,7 @@ def get(
:rtype: ~azure.mgmt.automation.models.DscNodeReport
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -298,7 +309,7 @@ def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.DscNodeReport] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -353,7 +364,7 @@ def get_content(
:rtype: JSON
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -364,7 +375,7 @@ def get_content(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[JSON] = kwargs.pop("cls", None)
_request = build_get_content_request(
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_object_data_types_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_object_data_types_operations.py
index 14c94d3ebed4..96155708a7b4 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_object_data_types_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_object_data_types_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,8 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar
+from typing import Any, Callable, Dict, Iterable, Optional, TypeVar
+import urllib.parse
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -30,7 +30,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -49,7 +49,7 @@ def build_list_fields_by_module_and_type_request( # pylint: disable=name-too-lo
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -84,7 +84,7 @@ def build_list_fields_by_type_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -155,10 +155,10 @@ def list_fields_by_module_and_type(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.TypeFieldListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -182,7 +182,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
@@ -234,10 +245,10 @@ def list_fields_by_type(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.TypeFieldListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -260,7 +271,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_operations.py
index 48c1d46f32db..8243d144327b 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,8 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar
+from typing import Any, Callable, Dict, Iterable, Optional, TypeVar
+import urllib.parse
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -30,7 +30,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -42,7 +42,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -87,10 +87,10 @@ def list(self, **kwargs: Any) -> Iterable["_models.Operation"]:
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -109,7 +109,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_package_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_package_operations.py
new file mode 100644
index 000000000000..22cea5d57d86
--- /dev/null
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_package_operations.py
@@ -0,0 +1,815 @@
+# 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 io import IOBase
+import sys
+from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload
+import urllib.parse
+
+from azure.core.exceptions import (
+ ClientAuthenticationError,
+ HttpResponseError,
+ ResourceExistsError,
+ ResourceNotFoundError,
+ ResourceNotModifiedError,
+ map_error,
+)
+from azure.core.paging import ItemPaged
+from azure.core.pipeline import PipelineResponse
+from azure.core.rest import HttpRequest, HttpResponse
+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
+
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore
+T = TypeVar("T")
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
+
+_SERIALIZER = Serializer()
+_SERIALIZER.client_side_validation = False
+
+
+def build_delete_request(
+ resource_group_name: str,
+ automation_account_name: str,
+ runtime_environment_name: str,
+ package_name: 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", "2024-10-23"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments/{runtimeEnvironmentName}/packages/{packageName}",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "resourceGroupName": _SERIALIZER.url(
+ "resource_group_name", resource_group_name, "str", max_length=90, min_length=1
+ ),
+ "automationAccountName": _SERIALIZER.url("automation_account_name", automation_account_name, "str"),
+ "runtimeEnvironmentName": _SERIALIZER.url(
+ "runtime_environment_name", runtime_environment_name, "str", pattern=r"^[a-zA-Z][a-zA-Z-_0-9]*$"
+ ),
+ "packageName": _SERIALIZER.url("package_name", package_name, "str"),
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_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="DELETE", url=_url, params=_params, headers=_headers, **kwargs)
+
+
+def build_get_request(
+ resource_group_name: str,
+ automation_account_name: str,
+ runtime_environment_name: str,
+ package_name: 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", "2024-10-23"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments/{runtimeEnvironmentName}/packages/{packageName}",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "resourceGroupName": _SERIALIZER.url(
+ "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._]+$"
+ ),
+ "automationAccountName": _SERIALIZER.url("automation_account_name", automation_account_name, "str"),
+ "runtimeEnvironmentName": _SERIALIZER.url(
+ "runtime_environment_name", runtime_environment_name, "str", pattern=r"^[a-zA-Z][a-zA-Z-_0-9]*$"
+ ),
+ "packageName": _SERIALIZER.url("package_name", package_name, "str"),
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_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="GET", url=_url, params=_params, headers=_headers, **kwargs)
+
+
+def build_create_or_update_request(
+ resource_group_name: str,
+ automation_account_name: str,
+ runtime_environment_name: str,
+ package_name: 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", "2024-10-23"))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments/{runtimeEnvironmentName}/packages/{packageName}",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "resourceGroupName": _SERIALIZER.url(
+ "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._]+$"
+ ),
+ "automationAccountName": _SERIALIZER.url("automation_account_name", automation_account_name, "str"),
+ "runtimeEnvironmentName": _SERIALIZER.url(
+ "runtime_environment_name", runtime_environment_name, "str", pattern=r"^[a-zA-Z][a-zA-Z-_0-9]*$"
+ ),
+ "packageName": _SERIALIZER.url("package_name", package_name, "str"),
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_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
+ if content_type is not None:
+ _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
+ _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
+
+ return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs)
+
+
+def build_update_request(
+ resource_group_name: str,
+ automation_account_name: str,
+ runtime_environment_name: str,
+ package_name: 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", "2024-10-23"))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments/{runtimeEnvironmentName}/packages/{packageName}",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "resourceGroupName": _SERIALIZER.url(
+ "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._]+$"
+ ),
+ "automationAccountName": _SERIALIZER.url("automation_account_name", automation_account_name, "str"),
+ "runtimeEnvironmentName": _SERIALIZER.url(
+ "runtime_environment_name", runtime_environment_name, "str", pattern=r"^[a-zA-Z][a-zA-Z-_0-9]*$"
+ ),
+ "packageName": _SERIALIZER.url("package_name", package_name, "str"),
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_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
+ if content_type is not None:
+ _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
+ _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
+
+ return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs)
+
+
+def build_list_by_runtime_environment_request( # pylint: disable=name-too-long
+ resource_group_name: str,
+ automation_account_name: str,
+ runtime_environment_name: 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", "2024-10-23"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments/{runtimeEnvironmentName}/packages",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "resourceGroupName": _SERIALIZER.url(
+ "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._]+$"
+ ),
+ "automationAccountName": _SERIALIZER.url("automation_account_name", automation_account_name, "str"),
+ "runtimeEnvironmentName": _SERIALIZER.url(
+ "runtime_environment_name", runtime_environment_name, "str", pattern=r"^[a-zA-Z][a-zA-Z-_0-9]*$"
+ ),
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_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="GET", url=_url, params=_params, headers=_headers, **kwargs)
+
+
+class PackageOperations:
+ """
+ .. warning::
+ **DO NOT** instantiate this class directly.
+
+ Instead, you should access the following operations through
+ :class:`~azure.mgmt.automation.AutomationClient`'s
+ :attr:`package` 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 delete( # pylint: disable=inconsistent-return-statements
+ self,
+ resource_group_name: str,
+ automation_account_name: str,
+ runtime_environment_name: str,
+ package_name: str,
+ **kwargs: Any
+ ) -> None:
+ """Delete the package by name.
+
+ .. seealso::
+ - http://aka.ms/azureautomationsdk/packageoperations
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param automation_account_name: The name of the automation account. Required.
+ :type automation_account_name: str
+ :param runtime_environment_name: The name of the Runtime Environment. Required.
+ :type runtime_environment_name: str
+ :param package_name: The Package name. Required.
+ :type package_name: str
+ :return: None or the result of cls(response)
+ :rtype: None
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map: MutableMapping = {
+ 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_delete_request(
+ resource_group_name=resource_group_name,
+ automation_account_name=automation_account_name,
+ runtime_environment_name=runtime_environment_name,
+ package_name=package_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ headers=_headers,
+ params=_params,
+ )
+ _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, 204]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ if cls:
+ return cls(pipeline_response, None, {}) # type: ignore
+
+ @distributed_trace
+ def get(
+ self,
+ resource_group_name: str,
+ automation_account_name: str,
+ runtime_environment_name: str,
+ package_name: str,
+ **kwargs: Any
+ ) -> _models.Package:
+ """Retrieve the Package identified by Package name.
+
+ .. seealso::
+ - http://aka.ms/azureautomationsdk/packageoperations
+
+ :param resource_group_name: Name of an Azure Resource group. Required.
+ :type resource_group_name: str
+ :param automation_account_name: The name of the automation account. Required.
+ :type automation_account_name: str
+ :param runtime_environment_name: The name of the Runtime Environment. Required.
+ :type runtime_environment_name: str
+ :param package_name: The Package name. Required.
+ :type package_name: str
+ :return: Package or the result of cls(response)
+ :rtype: ~azure.mgmt.automation.models.Package
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map: MutableMapping = {
+ 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[_models.Package] = kwargs.pop("cls", None)
+
+ _request = build_get_request(
+ resource_group_name=resource_group_name,
+ automation_account_name=automation_account_name,
+ runtime_environment_name=runtime_environment_name,
+ package_name=package_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ headers=_headers,
+ params=_params,
+ )
+ _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.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize("Package", pipeline_response.http_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+
+ return deserialized # type: ignore
+
+ @overload
+ def create_or_update(
+ self,
+ resource_group_name: str,
+ automation_account_name: str,
+ runtime_environment_name: str,
+ package_name: str,
+ parameters: _models.PackageCreateOrUpdateParameters,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> _models.Package:
+ """Create or update the package identified by package name.
+
+ .. seealso::
+ - http://aka.ms/azureautomationsdk/packageoperations
+
+ :param resource_group_name: Name of an Azure Resource group. Required.
+ :type resource_group_name: str
+ :param automation_account_name: The name of the automation account. Required.
+ :type automation_account_name: str
+ :param runtime_environment_name: The name of the Runtime Environment. Required.
+ :type runtime_environment_name: str
+ :param package_name: The name of Package. Required.
+ :type package_name: str
+ :param parameters: The create or update parameters for Package. Required.
+ :type parameters: ~azure.mgmt.automation.models.PackageCreateOrUpdateParameters
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: Package or the result of cls(response)
+ :rtype: ~azure.mgmt.automation.models.Package
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @overload
+ def create_or_update(
+ self,
+ resource_group_name: str,
+ automation_account_name: str,
+ runtime_environment_name: str,
+ package_name: str,
+ parameters: IO[bytes],
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> _models.Package:
+ """Create or update the package identified by package name.
+
+ .. seealso::
+ - http://aka.ms/azureautomationsdk/packageoperations
+
+ :param resource_group_name: Name of an Azure Resource group. Required.
+ :type resource_group_name: str
+ :param automation_account_name: The name of the automation account. Required.
+ :type automation_account_name: str
+ :param runtime_environment_name: The name of the Runtime Environment. Required.
+ :type runtime_environment_name: str
+ :param package_name: The name of Package. Required.
+ :type package_name: str
+ :param parameters: The create or update parameters for Package. Required.
+ :type parameters: IO[bytes]
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: Package or the result of cls(response)
+ :rtype: ~azure.mgmt.automation.models.Package
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @distributed_trace
+ def create_or_update(
+ self,
+ resource_group_name: str,
+ automation_account_name: str,
+ runtime_environment_name: str,
+ package_name: str,
+ parameters: Union[_models.PackageCreateOrUpdateParameters, IO[bytes]],
+ **kwargs: Any
+ ) -> _models.Package:
+ """Create or update the package identified by package name.
+
+ .. seealso::
+ - http://aka.ms/azureautomationsdk/packageoperations
+
+ :param resource_group_name: Name of an Azure Resource group. Required.
+ :type resource_group_name: str
+ :param automation_account_name: The name of the automation account. Required.
+ :type automation_account_name: str
+ :param runtime_environment_name: The name of the Runtime Environment. Required.
+ :type runtime_environment_name: str
+ :param package_name: The name of Package. Required.
+ :type package_name: str
+ :param parameters: The create or update parameters for Package. Is either a
+ PackageCreateOrUpdateParameters type or a IO[bytes] type. Required.
+ :type parameters: ~azure.mgmt.automation.models.PackageCreateOrUpdateParameters or IO[bytes]
+ :return: Package or the result of cls(response)
+ :rtype: ~azure.mgmt.automation.models.Package
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ _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", self._config.api_version))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ cls: ClsType[_models.Package] = kwargs.pop("cls", None)
+
+ content_type = content_type or "application/json"
+ _json = None
+ _content = None
+ if isinstance(parameters, (IOBase, bytes)):
+ _content = parameters
+ else:
+ _json = self._serialize.body(parameters, "PackageCreateOrUpdateParameters")
+
+ _request = build_create_or_update_request(
+ resource_group_name=resource_group_name,
+ automation_account_name=automation_account_name,
+ runtime_environment_name=runtime_environment_name,
+ package_name=package_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ content_type=content_type,
+ json=_json,
+ content=_content,
+ headers=_headers,
+ params=_params,
+ )
+ _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, 201]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize("Package", pipeline_response.http_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+
+ return deserialized # type: ignore
+
+ @overload
+ def update(
+ self,
+ resource_group_name: str,
+ automation_account_name: str,
+ runtime_environment_name: str,
+ package_name: str,
+ parameters: _models.PackageUpdateParameters,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> _models.Package:
+ """Update the Package identified by Package name.
+
+ .. seealso::
+ - http://aka.ms/azureautomationsdk/packageoperations
+
+ :param resource_group_name: Name of an Azure Resource group. Required.
+ :type resource_group_name: str
+ :param automation_account_name: The name of the automation account. Required.
+ :type automation_account_name: str
+ :param runtime_environment_name: The name of the Runtime Environment. Required.
+ :type runtime_environment_name: str
+ :param package_name: The name of Package. Required.
+ :type package_name: str
+ :param parameters: The update parameters for Package. Required.
+ :type parameters: ~azure.mgmt.automation.models.PackageUpdateParameters
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: Package or the result of cls(response)
+ :rtype: ~azure.mgmt.automation.models.Package
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @overload
+ def update(
+ self,
+ resource_group_name: str,
+ automation_account_name: str,
+ runtime_environment_name: str,
+ package_name: str,
+ parameters: IO[bytes],
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> _models.Package:
+ """Update the Package identified by Package name.
+
+ .. seealso::
+ - http://aka.ms/azureautomationsdk/packageoperations
+
+ :param resource_group_name: Name of an Azure Resource group. Required.
+ :type resource_group_name: str
+ :param automation_account_name: The name of the automation account. Required.
+ :type automation_account_name: str
+ :param runtime_environment_name: The name of the Runtime Environment. Required.
+ :type runtime_environment_name: str
+ :param package_name: The name of Package. Required.
+ :type package_name: str
+ :param parameters: The update parameters for Package. Required.
+ :type parameters: IO[bytes]
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: Package or the result of cls(response)
+ :rtype: ~azure.mgmt.automation.models.Package
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @distributed_trace
+ def update(
+ self,
+ resource_group_name: str,
+ automation_account_name: str,
+ runtime_environment_name: str,
+ package_name: str,
+ parameters: Union[_models.PackageUpdateParameters, IO[bytes]],
+ **kwargs: Any
+ ) -> _models.Package:
+ """Update the Package identified by Package name.
+
+ .. seealso::
+ - http://aka.ms/azureautomationsdk/packageoperations
+
+ :param resource_group_name: Name of an Azure Resource group. Required.
+ :type resource_group_name: str
+ :param automation_account_name: The name of the automation account. Required.
+ :type automation_account_name: str
+ :param runtime_environment_name: The name of the Runtime Environment. Required.
+ :type runtime_environment_name: str
+ :param package_name: The name of Package. Required.
+ :type package_name: str
+ :param parameters: The update parameters for Package. Is either a PackageUpdateParameters type
+ or a IO[bytes] type. Required.
+ :type parameters: ~azure.mgmt.automation.models.PackageUpdateParameters or IO[bytes]
+ :return: Package or the result of cls(response)
+ :rtype: ~azure.mgmt.automation.models.Package
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ _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", self._config.api_version))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ cls: ClsType[_models.Package] = kwargs.pop("cls", None)
+
+ content_type = content_type or "application/json"
+ _json = None
+ _content = None
+ if isinstance(parameters, (IOBase, bytes)):
+ _content = parameters
+ else:
+ _json = self._serialize.body(parameters, "PackageUpdateParameters")
+
+ _request = build_update_request(
+ resource_group_name=resource_group_name,
+ automation_account_name=automation_account_name,
+ runtime_environment_name=runtime_environment_name,
+ package_name=package_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ content_type=content_type,
+ json=_json,
+ content=_content,
+ headers=_headers,
+ params=_params,
+ )
+ _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.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize("Package", pipeline_response.http_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+
+ return deserialized # type: ignore
+
+ @distributed_trace
+ def list_by_runtime_environment(
+ self, resource_group_name: str, automation_account_name: str, runtime_environment_name: str, **kwargs: Any
+ ) -> Iterable["_models.Package"]:
+ """Retrieve the a list of Packages.
+
+ .. seealso::
+ - http://aka.ms/azureautomationsdk/packageoperations
+
+ :param resource_group_name: Name of an Azure Resource group. Required.
+ :type resource_group_name: str
+ :param automation_account_name: The name of the automation account. Required.
+ :type automation_account_name: str
+ :param runtime_environment_name: The name of the Runtime Environment. Required.
+ :type runtime_environment_name: str
+ :return: An iterator like instance of either Package or the result of cls(response)
+ :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.automation.models.Package]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _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[_models.PackageListResult] = kwargs.pop("cls", None)
+
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ def prepare_request(next_link=None):
+ if not next_link:
+
+ _request = build_list_by_runtime_environment_request(
+ resource_group_name=resource_group_name,
+ automation_account_name=automation_account_name,
+ runtime_environment_name=runtime_environment_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ else:
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
+ _request.url = self._client.format_url(_request.url)
+ _request.method = "GET"
+ return _request
+
+ def extract_data(pipeline_response):
+ deserialized = self._deserialize("PackageListResult", pipeline_response)
+ list_of_elem = deserialized.value
+ if cls:
+ list_of_elem = cls(list_of_elem) # type: ignore
+ return deserialized.next_link or None, iter(list_of_elem)
+
+ def get_next(next_link=None):
+ _request = prepare_request(next_link)
+
+ _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.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ return pipeline_response
+
+ return ItemPaged(get_next, extract_data)
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_private_endpoint_connections_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_private_endpoint_connections_operations.py
index 367a4f502bfd..b2a3baf0eed8 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_private_endpoint_connections_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_private_endpoint_connections_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,8 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload
+import urllib.parse
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -35,7 +35,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -49,7 +49,7 @@ def build_list_by_automation_account_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", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -86,7 +86,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", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -126,7 +126,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", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
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_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", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -236,10 +236,10 @@ def list_by_automation_account(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -261,7 +261,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
@@ -310,7 +321,7 @@ def get(
:rtype: ~azure.mgmt.automation.models.PrivateEndpointConnection
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -321,7 +332,7 @@ def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -361,7 +372,7 @@ def _create_or_update_initial(
parameters: Union[_models.PrivateEndpointConnection, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -372,7 +383,7 @@ def _create_or_update_initial(
_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", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
@@ -509,7 +520,7 @@ def begin_create_or_update(
_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", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
@@ -561,7 +572,7 @@ def _delete_initial(
private_endpoint_connection_name: str,
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -572,7 +583,7 @@ def _delete_initial(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
_request = build_delete_request(
@@ -603,10 +614,14 @@ def _delete_initial(
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+ response_headers = {}
+ if response.status_code == 202:
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
return deserialized # type: ignore
@@ -633,7 +648,7 @@ def begin_delete(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_private_link_resources_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_private_link_resources_operations.py
index 51bcaec91899..c43124c45974 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_private_link_resources_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_private_link_resources_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,8 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar
+from typing import Any, Callable, Dict, Iterable, Optional, TypeVar
+import urllib.parse
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -30,7 +30,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -44,7 +44,7 @@ def build_automation_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", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -107,10 +107,10 @@ def automation(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.PrivateLinkResourceListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -132,7 +132,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_python2_package_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_python2_package_operations.py
index 1861bc05d17a..974d2ce7bb19 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_python2_package_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_python2_package_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,8 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload
+from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload
+import urllib.parse
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -31,7 +31,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -45,7 +45,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -79,7 +79,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -113,7 +113,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -150,7 +150,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -187,7 +187,7 @@ def build_list_by_automation_account_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -252,7 +252,7 @@ def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -263,7 +263,7 @@ def delete( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_delete_request(
@@ -311,7 +311,7 @@ def get(
:rtype: ~azure.mgmt.automation.models.Module
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -322,7 +322,7 @@ def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.Module] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -446,7 +446,7 @@ def create_or_update(
:rtype: ~azure.mgmt.automation.models.Module
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -457,7 +457,7 @@ def create_or_update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Module] = kwargs.pop("cls", None)
@@ -593,7 +593,7 @@ def update(
:rtype: ~azure.mgmt.automation.models.Module
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -604,7 +604,7 @@ def update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Module] = kwargs.pop("cls", None)
@@ -669,10 +669,10 @@ def list_by_automation_account(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ModuleListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -694,7 +694,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_python3_package_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_python3_package_operations.py
index a1c584644e47..d18b62a94b91 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_python3_package_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_python3_package_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,8 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload
+from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload
+import urllib.parse
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -31,7 +31,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -45,7 +45,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -79,7 +79,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -113,7 +113,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -150,7 +150,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -187,7 +187,7 @@ def build_list_by_automation_account_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -252,7 +252,7 @@ def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -263,7 +263,7 @@ def delete( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_delete_request(
@@ -311,7 +311,7 @@ def get(
:rtype: ~azure.mgmt.automation.models.Module
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -322,7 +322,7 @@ def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.Module] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -446,7 +446,7 @@ def create_or_update(
:rtype: ~azure.mgmt.automation.models.Module
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -457,7 +457,7 @@ def create_or_update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Module] = kwargs.pop("cls", None)
@@ -593,7 +593,7 @@ def update(
:rtype: ~azure.mgmt.automation.models.Module
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -604,7 +604,7 @@ def update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Module] = kwargs.pop("cls", None)
@@ -669,10 +669,10 @@ def list_by_automation_account(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ModuleListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -694,7 +694,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_runbook_draft_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_runbook_draft_operations.py
index 56b31a6817d7..5308318d23f8 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_runbook_draft_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_runbook_draft_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,7 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, Callable, Dict, IO, Iterator, Optional, Type, TypeVar, Union, cast
+from typing import Any, Callable, Dict, IO, Iterator, Optional, TypeVar, Union, cast
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -33,7 +32,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -47,7 +46,7 @@ def build_get_content_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "text/powershell")
# Construct URL
@@ -87,7 +86,7 @@ def build_replace_content_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -124,7 +123,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -158,7 +157,7 @@ def build_undo_edit_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -224,7 +223,7 @@ def get_content(
:rtype: Iterator[bytes]
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -235,7 +234,7 @@ def get_content(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
_request = build_get_content_request(
@@ -280,7 +279,7 @@ def _replace_content_initial(
runbook_content: IO[bytes],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -291,7 +290,7 @@ def _replace_content_initial(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
@@ -368,7 +367,7 @@ def begin_replace_content(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
@@ -434,7 +433,7 @@ def get(
:rtype: ~azure.mgmt.automation.models.RunbookDraft
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -445,7 +444,7 @@ def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.RunbookDraft] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -497,7 +496,7 @@ def undo_edit(
:rtype: ~azure.mgmt.automation.models.RunbookDraftUndoEditResult
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -508,7 +507,7 @@ def undo_edit(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.RunbookDraftUndoEditResult] = kwargs.pop("cls", None)
_request = build_undo_edit_request(
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_runbook_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_runbook_operations.py
index 046eaee61268..8f17ba087402 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_runbook_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_runbook_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,8 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload
+import urllib.parse
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -35,7 +35,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -49,7 +49,7 @@ def build_publish_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -83,7 +83,7 @@ def build_get_content_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "text/powershell")
# Construct URL
@@ -117,7 +117,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -151,7 +151,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -188,7 +188,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -225,7 +225,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -259,7 +259,7 @@ def build_list_by_automation_account_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -308,7 +308,7 @@ def __init__(self, *args, **kwargs):
def _publish_initial(
self, resource_group_name: str, automation_account_name: str, runbook_name: str, **kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -319,7 +319,7 @@ def _publish_initial(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
_request = build_publish_request(
@@ -382,7 +382,7 @@ def begin_publish(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
@@ -439,7 +439,7 @@ def get_content(
:rtype: Iterator[bytes]
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -450,7 +450,7 @@ def get_content(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
_request = build_get_content_request(
@@ -506,7 +506,7 @@ def get(
:rtype: ~azure.mgmt.automation.models.Runbook
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -517,7 +517,7 @@ def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.Runbook] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -644,7 +644,7 @@ def create_or_update(
:rtype: ~azure.mgmt.automation.models.Runbook
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -655,7 +655,7 @@ def create_or_update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Runbook] = kwargs.pop("cls", None)
@@ -791,7 +791,7 @@ def update(
:rtype: ~azure.mgmt.automation.models.Runbook
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -802,7 +802,7 @@ def update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Runbook] = kwargs.pop("cls", None)
@@ -866,7 +866,7 @@ def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -877,7 +877,7 @@ def delete( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_delete_request(
@@ -926,10 +926,10 @@ def list_by_automation_account(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.RunbookListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -951,7 +951,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_compilation_job_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_runtime_environments_operations.py
similarity index 56%
rename from sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_compilation_job_operations.py
rename to sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_runtime_environments_operations.py
index 354ec09bb30a..3277ce3af6dc 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_compilation_job_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_runtime_environments_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,8 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload
+import urllib.parse
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -16,18 +16,14 @@
ResourceExistsError,
ResourceNotFoundError,
ResourceNotModifiedError,
- StreamClosedError,
- StreamConsumedError,
map_error,
)
from azure.core.paging import ItemPaged
from azure.core.pipeline import PipelineResponse
-from azure.core.polling import LROPoller, NoPolling, PollingMethod
from azure.core.rest import HttpRequest, HttpResponse
from azure.core.tracing.decorator import distributed_trace
from azure.core.utils import case_insensitive_dict
from azure.mgmt.core.exceptions import ARMErrorFormat
-from azure.mgmt.core.polling.arm_polling import ARMPolling
from .. import models as _models
from .._serialization import Serializer
@@ -35,7 +31,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -43,31 +39,33 @@
_SERIALIZER.client_side_validation = False
-def build_create_request(
+def build_update_request(
resource_group_name: str,
automation_account_name: str,
- compilation_job_name: str,
+ runtime_environment_name: 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", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
# Construct URL
_url = kwargs.pop(
"template_url",
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/compilationjobs/{compilationJobName}",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments/{runtimeEnvironmentName}",
) # pylint: disable=line-too-long
path_format_arguments = {
"resourceGroupName": _SERIALIZER.url(
"resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._]+$"
),
"automationAccountName": _SERIALIZER.url("automation_account_name", automation_account_name, "str"),
- "compilationJobName": _SERIALIZER.url("compilation_job_name", compilation_job_name, "str"),
+ "runtimeEnvironmentName": _SERIALIZER.url(
+ "runtime_environment_name", runtime_environment_name, "str", pattern=r"^[a-zA-Z][a-zA-Z-_0-9]*$"
+ ),
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
}
@@ -81,33 +79,36 @@ def build_create_request(
_headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
- return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs)
+ return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs)
-def build_get_request(
+def build_create_request(
resource_group_name: str,
automation_account_name: str,
- compilation_job_name: str,
+ runtime_environment_name: 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", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
# Construct URL
_url = kwargs.pop(
"template_url",
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/compilationjobs/{compilationJobName}",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments/{runtimeEnvironmentName}",
) # pylint: disable=line-too-long
path_format_arguments = {
"resourceGroupName": _SERIALIZER.url(
"resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._]+$"
),
"automationAccountName": _SERIALIZER.url("automation_account_name", automation_account_name, "str"),
- "compilationJobName": _SERIALIZER.url("compilation_job_name", compilation_job_name, "str"),
+ "runtimeEnvironmentName": _SERIALIZER.url(
+ "runtime_environment_name", runtime_environment_name, "str", pattern=r"^[a-zA-Z][a-zA-Z-_0-9]*$"
+ ),
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
}
@@ -117,78 +118,113 @@ def build_get_request(
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
# Construct headers
+ if content_type is not None:
+ _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
- return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
+ return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs)
-def build_list_by_automation_account_request(
+def build_delete_request(
resource_group_name: str,
automation_account_name: str,
+ runtime_environment_name: str,
subscription_id: str,
- *,
- filter: Optional[str] = None,
**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", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
_url = kwargs.pop(
"template_url",
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/compilationjobs",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments/{runtimeEnvironmentName}",
) # pylint: disable=line-too-long
path_format_arguments = {
"resourceGroupName": _SERIALIZER.url(
"resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._]+$"
),
"automationAccountName": _SERIALIZER.url("automation_account_name", automation_account_name, "str"),
+ "runtimeEnvironmentName": _SERIALIZER.url(
+ "runtime_environment_name", runtime_environment_name, "str", pattern=r"^[a-zA-Z][a-zA-Z-_0-9]*$"
+ ),
"subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
}
_url: str = _url.format(**path_format_arguments) # type: ignore
# Construct parameters
- if filter is not None:
- _params["$filter"] = _SERIALIZER.query("filter", filter, "str")
_params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
# Construct headers
_headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
- return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
+ return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs)
-def build_get_stream_request(
+def build_get_request(
resource_group_name: str,
automation_account_name: str,
- job_id: str,
- job_stream_id: str,
+ runtime_environment_name: 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", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
_url = kwargs.pop(
"template_url",
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/compilationjobs/{jobId}/streams/{jobStreamId}",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments/{runtimeEnvironmentName}",
) # pylint: disable=line-too-long
path_format_arguments = {
"resourceGroupName": _SERIALIZER.url(
"resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._]+$"
),
"automationAccountName": _SERIALIZER.url("automation_account_name", automation_account_name, "str"),
- "jobId": _SERIALIZER.url("job_id", job_id, "str"),
- "jobStreamId": _SERIALIZER.url("job_stream_id", job_stream_id, "str"),
+ "runtimeEnvironmentName": _SERIALIZER.url(
+ "runtime_environment_name", runtime_environment_name, "str", pattern=r"^[a-zA-Z][a-zA-Z-_0-9]*$"
+ ),
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_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="GET", url=_url, params=_params, headers=_headers, **kwargs)
+
+
+def build_list_by_automation_account_request(
+ resource_group_name: str, automation_account_name: 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", "2024-10-23"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/runtimeEnvironments",
+ ) # 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, pattern=r"^[-\w\._]+$"
+ ),
+ "automationAccountName": _SERIALIZER.url("automation_account_name", automation_account_name, "str"),
}
_url: str = _url.format(**path_format_arguments) # type: ignore
@@ -202,14 +238,14 @@ def build_get_stream_request(
return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
-class DscCompilationJobOperations:
+class RuntimeEnvironmentsOperations:
"""
.. warning::
**DO NOT** instantiate this class directly.
Instead, you should access the following operations through
:class:`~azure.mgmt.automation.AutomationClient`'s
- :attr:`dsc_compilation_job` attribute.
+ :attr:`runtime_environments` attribute.
"""
models = _models
@@ -221,15 +257,98 @@ def __init__(self, *args, **kwargs):
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")
- def _create_initial(
+ @overload
+ def update(
+ self,
+ resource_group_name: str,
+ automation_account_name: str,
+ runtime_environment_name: str,
+ parameters: _models.RuntimeEnvironmentUpdateParameters,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> _models.RuntimeEnvironment:
+ """Update an Runtime Environment.
+
+ .. seealso::
+ - http://aka.ms/azureautomationsdk/automationaccountoperations
+
+ :param resource_group_name: Name of an Azure Resource group. Required.
+ :type resource_group_name: str
+ :param automation_account_name: The name of the automation account. Required.
+ :type automation_account_name: str
+ :param runtime_environment_name: The name of the Runtime Environment. Required.
+ :type runtime_environment_name: str
+ :param parameters: Parameters supplied to the Runtime Environment. Required.
+ :type parameters: ~azure.mgmt.automation.models.RuntimeEnvironmentUpdateParameters
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: RuntimeEnvironment or the result of cls(response)
+ :rtype: ~azure.mgmt.automation.models.RuntimeEnvironment
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @overload
+ def update(
+ self,
+ resource_group_name: str,
+ automation_account_name: str,
+ runtime_environment_name: str,
+ parameters: IO[bytes],
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> _models.RuntimeEnvironment:
+ """Update an Runtime Environment.
+
+ .. seealso::
+ - http://aka.ms/azureautomationsdk/automationaccountoperations
+
+ :param resource_group_name: Name of an Azure Resource group. Required.
+ :type resource_group_name: str
+ :param automation_account_name: The name of the automation account. Required.
+ :type automation_account_name: str
+ :param runtime_environment_name: The name of the Runtime Environment. Required.
+ :type runtime_environment_name: str
+ :param parameters: Parameters supplied to the Runtime Environment. Required.
+ :type parameters: IO[bytes]
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: RuntimeEnvironment or the result of cls(response)
+ :rtype: ~azure.mgmt.automation.models.RuntimeEnvironment
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @distributed_trace
+ def update(
self,
resource_group_name: str,
automation_account_name: str,
- compilation_job_name: str,
- parameters: Union[_models.DscCompilationJobCreateParameters, IO[bytes]],
+ runtime_environment_name: str,
+ parameters: Union[_models.RuntimeEnvironmentUpdateParameters, IO[bytes]],
**kwargs: Any
- ) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ ) -> _models.RuntimeEnvironment:
+ """Update an Runtime Environment.
+
+ .. seealso::
+ - http://aka.ms/azureautomationsdk/automationaccountoperations
+
+ :param resource_group_name: Name of an Azure Resource group. Required.
+ :type resource_group_name: str
+ :param automation_account_name: The name of the automation account. Required.
+ :type automation_account_name: str
+ :param runtime_environment_name: The name of the Runtime Environment. Required.
+ :type runtime_environment_name: str
+ :param parameters: Parameters supplied to the Runtime Environment. Is either a
+ RuntimeEnvironmentUpdateParameters type or a IO[bytes] type. Required.
+ :type parameters: ~azure.mgmt.automation.models.RuntimeEnvironmentUpdateParameters or IO[bytes]
+ :return: RuntimeEnvironment or the result of cls(response)
+ :rtype: ~azure.mgmt.automation.models.RuntimeEnvironment
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -240,9 +359,9 @@ def _create_initial(
_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", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
+ cls: ClsType[_models.RuntimeEnvironment] = kwargs.pop("cls", None)
content_type = content_type or "application/json"
_json = None
@@ -250,12 +369,12 @@ def _create_initial(
if isinstance(parameters, (IOBase, bytes)):
_content = parameters
else:
- _json = self._serialize.body(parameters, "DscCompilationJobCreateParameters")
+ _json = self._serialize.body(parameters, "RuntimeEnvironmentUpdateParameters")
- _request = build_create_request(
+ _request = build_update_request(
resource_group_name=resource_group_name,
automation_account_name=automation_account_name,
- compilation_job_name=compilation_job_name,
+ runtime_environment_name=runtime_environment_name,
subscription_id=self._config.subscription_id,
api_version=api_version,
content_type=content_type,
@@ -266,24 +385,19 @@ def _create_initial(
)
_request.url = self._client.format_url(_request.url)
- _decompress = kwargs.pop("decompress", True)
- _stream = True
+ _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 [201]:
- try:
- response.read() # Load the body in memory and close the socket
- except (StreamConsumedError, StreamClosedError):
- pass
+ 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.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
- deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
+ deserialized = self._deserialize("RuntimeEnvironment", pipeline_response.http_response)
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -291,167 +405,231 @@ def _create_initial(
return deserialized # type: ignore
@overload
- def begin_create(
+ def create(
self,
resource_group_name: str,
automation_account_name: str,
- compilation_job_name: str,
- parameters: _models.DscCompilationJobCreateParameters,
+ runtime_environment_name: str,
+ parameters: _models.RuntimeEnvironment,
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.DscCompilationJob]:
- """Creates the Dsc compilation job of the configuration.
+ ) -> _models.RuntimeEnvironment:
+ """Create or update Runtime Environment.
.. seealso::
- - http://aka.ms/azureautomationsdk/dscconfigurationcompilejoboperations
+ - http://aka.ms/azureautomationsdk/runtimeEnvironmentOperations
:param resource_group_name: Name of an Azure Resource group. Required.
:type resource_group_name: str
:param automation_account_name: The name of the automation account. Required.
:type automation_account_name: str
- :param compilation_job_name: The DSC configuration Id. Required.
- :type compilation_job_name: str
- :param parameters: The parameters supplied to the create compilation job operation. Required.
- :type parameters: ~azure.mgmt.automation.models.DscCompilationJobCreateParameters
+ :param runtime_environment_name: The name of the Runtime Environment. Required.
+ :type runtime_environment_name: str
+ :param parameters: Parameters supplied to the create the runtime environment. Required.
+ :type parameters: ~azure.mgmt.automation.models.RuntimeEnvironment
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns either DscCompilationJob or the result of
- cls(response)
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.automation.models.DscCompilationJob]
+ :return: RuntimeEnvironment or the result of cls(response)
+ :rtype: ~azure.mgmt.automation.models.RuntimeEnvironment
:raises ~azure.core.exceptions.HttpResponseError:
"""
@overload
- def begin_create(
+ def create(
self,
resource_group_name: str,
automation_account_name: str,
- compilation_job_name: str,
+ runtime_environment_name: str,
parameters: IO[bytes],
*,
content_type: str = "application/json",
**kwargs: Any
- ) -> LROPoller[_models.DscCompilationJob]:
- """Creates the Dsc compilation job of the configuration.
+ ) -> _models.RuntimeEnvironment:
+ """Create or update Runtime Environment.
.. seealso::
- - http://aka.ms/azureautomationsdk/dscconfigurationcompilejoboperations
+ - http://aka.ms/azureautomationsdk/runtimeEnvironmentOperations
:param resource_group_name: Name of an Azure Resource group. Required.
:type resource_group_name: str
:param automation_account_name: The name of the automation account. Required.
:type automation_account_name: str
- :param compilation_job_name: The DSC configuration Id. Required.
- :type compilation_job_name: str
- :param parameters: The parameters supplied to the create compilation job operation. Required.
+ :param runtime_environment_name: The name of the Runtime Environment. Required.
+ :type runtime_environment_name: str
+ :param parameters: Parameters supplied to the create the runtime environment. Required.
:type parameters: IO[bytes]
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
Default value is "application/json".
:paramtype content_type: str
- :return: An instance of LROPoller that returns either DscCompilationJob or the result of
- cls(response)
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.automation.models.DscCompilationJob]
+ :return: RuntimeEnvironment or the result of cls(response)
+ :rtype: ~azure.mgmt.automation.models.RuntimeEnvironment
:raises ~azure.core.exceptions.HttpResponseError:
"""
@distributed_trace
- def begin_create(
+ def create(
self,
resource_group_name: str,
automation_account_name: str,
- compilation_job_name: str,
- parameters: Union[_models.DscCompilationJobCreateParameters, IO[bytes]],
+ runtime_environment_name: str,
+ parameters: Union[_models.RuntimeEnvironment, IO[bytes]],
**kwargs: Any
- ) -> LROPoller[_models.DscCompilationJob]:
- """Creates the Dsc compilation job of the configuration.
+ ) -> _models.RuntimeEnvironment:
+ """Create or update Runtime Environment.
.. seealso::
- - http://aka.ms/azureautomationsdk/dscconfigurationcompilejoboperations
+ - http://aka.ms/azureautomationsdk/runtimeEnvironmentOperations
:param resource_group_name: Name of an Azure Resource group. Required.
:type resource_group_name: str
:param automation_account_name: The name of the automation account. Required.
:type automation_account_name: str
- :param compilation_job_name: The DSC configuration Id. Required.
- :type compilation_job_name: str
- :param parameters: The parameters supplied to the create compilation job operation. Is either a
- DscCompilationJobCreateParameters type or a IO[bytes] type. Required.
- :type parameters: ~azure.mgmt.automation.models.DscCompilationJobCreateParameters or IO[bytes]
- :return: An instance of LROPoller that returns either DscCompilationJob or the result of
- cls(response)
- :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.automation.models.DscCompilationJob]
+ :param runtime_environment_name: The name of the Runtime Environment. Required.
+ :type runtime_environment_name: str
+ :param parameters: Parameters supplied to the create the runtime environment. Is either a
+ RuntimeEnvironment type or a IO[bytes] type. Required.
+ :type parameters: ~azure.mgmt.automation.models.RuntimeEnvironment or IO[bytes]
+ :return: RuntimeEnvironment or the result of cls(response)
+ :rtype: ~azure.mgmt.automation.models.RuntimeEnvironment
:raises ~azure.core.exceptions.HttpResponseError:
"""
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
_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", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
- cls: ClsType[_models.DscCompilationJob] = kwargs.pop("cls", None)
- polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
- lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
- cont_token: Optional[str] = kwargs.pop("continuation_token", None)
- if cont_token is None:
- raw_result = self._create_initial(
- resource_group_name=resource_group_name,
- automation_account_name=automation_account_name,
- compilation_job_name=compilation_job_name,
- parameters=parameters,
- api_version=api_version,
- content_type=content_type,
- cls=lambda x, y, z: x,
- headers=_headers,
- params=_params,
- **kwargs
- )
- raw_result.http_response.read() # type: ignore
- kwargs.pop("error_map", None)
+ cls: ClsType[_models.RuntimeEnvironment] = kwargs.pop("cls", None)
- def get_long_running_output(pipeline_response):
- deserialized = self._deserialize("DscCompilationJob", pipeline_response.http_response)
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
- return deserialized
-
- if polling is True:
- polling_method: PollingMethod = cast(PollingMethod, ARMPolling(lro_delay, **kwargs))
- elif polling is False:
- polling_method = cast(PollingMethod, NoPolling())
+ content_type = content_type or "application/json"
+ _json = None
+ _content = None
+ if isinstance(parameters, (IOBase, bytes)):
+ _content = parameters
else:
- polling_method = polling
- if cont_token:
- return LROPoller[_models.DscCompilationJob].from_continuation_token(
- polling_method=polling_method,
- continuation_token=cont_token,
- client=self._client,
- deserialization_callback=get_long_running_output,
- )
- return LROPoller[_models.DscCompilationJob](
- self._client, raw_result, get_long_running_output, polling_method # type: ignore
+ _json = self._serialize.body(parameters, "RuntimeEnvironment")
+
+ _request = build_create_request(
+ resource_group_name=resource_group_name,
+ automation_account_name=automation_account_name,
+ runtime_environment_name=runtime_environment_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ content_type=content_type,
+ json=_json,
+ content=_content,
+ headers=_headers,
+ params=_params,
)
+ _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, 201]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ deserialized = self._deserialize("RuntimeEnvironment", pipeline_response.http_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+
+ return deserialized # type: ignore
+
+ @distributed_trace
+ def delete( # pylint: disable=inconsistent-return-statements
+ self, resource_group_name: str, automation_account_name: str, runtime_environment_name: str, **kwargs: Any
+ ) -> None:
+ """Delete the Runtime Environment.
+
+ .. seealso::
+ - http://aka.ms/azureautomationsdk/runtimeEnvironmentOperations
+
+ :param resource_group_name: Name of an Azure Resource group. Required.
+ :type resource_group_name: str
+ :param automation_account_name: The name of the automation account. Required.
+ :type automation_account_name: str
+ :param runtime_environment_name: The name of the Runtime Environment. Required.
+ :type runtime_environment_name: str
+ :return: None or the result of cls(response)
+ :rtype: None
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map: MutableMapping = {
+ 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_delete_request(
+ resource_group_name=resource_group_name,
+ automation_account_name=automation_account_name,
+ runtime_environment_name=runtime_environment_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ headers=_headers,
+ params=_params,
+ )
+ _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, 204]:
+ map_error(status_code=response.status_code, response=response, error_map=error_map)
+ error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
+ raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
+
+ if cls:
+ return cls(pipeline_response, None, {}) # type: ignore
@distributed_trace
def get(
- self, resource_group_name: str, automation_account_name: str, compilation_job_name: str, **kwargs: Any
- ) -> _models.DscCompilationJob:
- """Retrieve the Dsc configuration compilation job identified by job id.
+ self, resource_group_name: str, automation_account_name: str, runtime_environment_name: str, **kwargs: Any
+ ) -> _models.RuntimeEnvironment:
+ """Get information about the Runtime Environment.
.. seealso::
- - http://aka.ms/azureautomationsdk/dsccompilationjoboperations
+ - http://aka.ms/azureautomationsdk/runtimeEnvironmentOperations
:param resource_group_name: Name of an Azure Resource group. Required.
:type resource_group_name: str
:param automation_account_name: The name of the automation account. Required.
:type automation_account_name: str
- :param compilation_job_name: The DSC configuration Id. Required.
- :type compilation_job_name: str
- :return: DscCompilationJob or the result of cls(response)
- :rtype: ~azure.mgmt.automation.models.DscCompilationJob
+ :param runtime_environment_name: The name of the Runtime Environment. Required.
+ :type runtime_environment_name: str
+ :return: RuntimeEnvironment or the result of cls(response)
+ :rtype: ~azure.mgmt.automation.models.RuntimeEnvironment
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -462,13 +640,13 @@ def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview"))
- cls: ClsType[_models.DscCompilationJob] = kwargs.pop("cls", None)
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ cls: ClsType[_models.RuntimeEnvironment] = kwargs.pop("cls", None)
_request = build_get_request(
resource_group_name=resource_group_name,
automation_account_name=automation_account_name,
- compilation_job_name=compilation_job_name,
+ runtime_environment_name=runtime_environment_name,
subscription_id=self._config.subscription_id,
api_version=api_version,
headers=_headers,
@@ -488,7 +666,7 @@ def get(
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
- deserialized = self._deserialize("DscCompilationJob", pipeline_response.http_response)
+ deserialized = self._deserialize("RuntimeEnvironment", pipeline_response.http_response)
if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
@@ -497,30 +675,28 @@ def get(
@distributed_trace
def list_by_automation_account(
- self, resource_group_name: str, automation_account_name: str, filter: Optional[str] = None, **kwargs: Any
- ) -> Iterable["_models.DscCompilationJob"]:
- """Retrieve a list of dsc compilation jobs.
+ self, resource_group_name: str, automation_account_name: str, **kwargs: Any
+ ) -> Iterable["_models.RuntimeEnvironment"]:
+ """Retrieve a list of RuntimeEnvironments.
.. seealso::
- - http://aka.ms/azureautomationsdk/compilationjoboperations
+ - http://aka.ms/azureautomationsdk/runbookoperations
:param resource_group_name: Name of an Azure Resource group. Required.
:type resource_group_name: str
:param automation_account_name: The name of the automation account. Required.
:type automation_account_name: str
- :param filter: The filter to apply on the operation. Default value is None.
- :type filter: str
- :return: An iterator like instance of either DscCompilationJob or the result of cls(response)
- :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.automation.models.DscCompilationJob]
+ :return: An iterator like instance of either RuntimeEnvironment or the result of cls(response)
+ :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.automation.models.RuntimeEnvironment]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview"))
- cls: ClsType[_models.DscCompilationJobListResult] = kwargs.pop("cls", None)
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
+ cls: ClsType[_models.RuntimeEnvironmentListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -535,7 +711,6 @@ def prepare_request(next_link=None):
resource_group_name=resource_group_name,
automation_account_name=automation_account_name,
subscription_id=self._config.subscription_id,
- filter=filter,
api_version=api_version,
headers=_headers,
params=_params,
@@ -543,13 +718,24 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
def extract_data(pipeline_response):
- deserialized = self._deserialize("DscCompilationJobListResult", pipeline_response)
+ deserialized = self._deserialize("RuntimeEnvironmentListResult", pipeline_response)
list_of_elem = deserialized.value
if cls:
list_of_elem = cls(list_of_elem) # type: ignore
@@ -572,69 +758,3 @@ def get_next(next_link=None):
return pipeline_response
return ItemPaged(get_next, extract_data)
-
- @distributed_trace
- def get_stream(
- self, resource_group_name: str, automation_account_name: str, job_id: str, job_stream_id: str, **kwargs: Any
- ) -> _models.JobStream:
- """Retrieve the job stream identified by job stream id.
-
- .. seealso::
- - http://aka.ms/azureautomationsdk/jobstreamoperations
-
- :param resource_group_name: Name of an Azure Resource group. Required.
- :type resource_group_name: str
- :param automation_account_name: The name of the automation account. Required.
- :type automation_account_name: str
- :param job_id: The job id. Required.
- :type job_id: str
- :param job_stream_id: The job stream id. Required.
- :type job_stream_id: str
- :return: JobStream or the result of cls(response)
- :rtype: ~azure.mgmt.automation.models.JobStream
- :raises ~azure.core.exceptions.HttpResponseError:
- """
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
- 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", "2020-01-13-preview"))
- cls: ClsType[_models.JobStream] = kwargs.pop("cls", None)
-
- _request = build_get_stream_request(
- resource_group_name=resource_group_name,
- automation_account_name=automation_account_name,
- job_id=job_id,
- job_stream_id=job_stream_id,
- subscription_id=self._config.subscription_id,
- api_version=api_version,
- headers=_headers,
- params=_params,
- )
- _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.ErrorResponse, pipeline_response)
- raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
-
- deserialized = self._deserialize("JobStream", pipeline_response.http_response)
-
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
-
- return deserialized # type: ignore
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_schedule_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_schedule_operations.py
index ccd44a875fb5..b708440b973e 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_schedule_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_schedule_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,8 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload
+from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload
+import urllib.parse
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -31,7 +31,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -45,7 +45,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -82,7 +82,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -119,7 +119,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -153,7 +153,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -187,7 +187,7 @@ def build_list_by_automation_account_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -326,7 +326,7 @@ def create_or_update(
:rtype: ~azure.mgmt.automation.models.Schedule or None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -337,7 +337,7 @@ def create_or_update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[Optional[_models.Schedule]] = kwargs.pop("cls", None)
@@ -474,7 +474,7 @@ def update(
:rtype: ~azure.mgmt.automation.models.Schedule
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -485,7 +485,7 @@ def update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Schedule] = kwargs.pop("cls", None)
@@ -549,7 +549,7 @@ def get(
:rtype: ~azure.mgmt.automation.models.Schedule
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -560,7 +560,7 @@ def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.Schedule] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -612,7 +612,7 @@ def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -623,7 +623,7 @@ def delete( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_delete_request(
@@ -672,10 +672,10 @@ def list_by_automation_account(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ScheduleListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -697,7 +697,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_software_update_configuration_machine_runs_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_software_update_configuration_machine_runs_operations.py
index 19241fc84238..7f918674e19d 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_software_update_configuration_machine_runs_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_software_update_configuration_machine_runs_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,7 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, Callable, Dict, Optional, Type, TypeVar
+from typing import Any, Callable, Dict, Optional, TypeVar
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -29,7 +28,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -49,7 +48,7 @@ def build_get_by_id_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -95,7 +94,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -176,7 +175,7 @@ def get_by_id(
:rtype: ~azure.mgmt.automation.models.SoftwareUpdateConfigurationMachineRun
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -187,7 +186,7 @@ def get_by_id(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.SoftwareUpdateConfigurationMachineRun] = kwargs.pop("cls", None)
_request = build_get_by_id_request(
@@ -256,7 +255,7 @@ def list(
:rtype: ~azure.mgmt.automation.models.SoftwareUpdateConfigurationMachineRunListResult
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -267,7 +266,7 @@ def list(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.SoftwareUpdateConfigurationMachineRunListResult] = kwargs.pop("cls", None)
_request = build_list_request(
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_software_update_configuration_runs_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_software_update_configuration_runs_operations.py
index bd1fe3f8b742..5e46e5035893 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_software_update_configuration_runs_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_software_update_configuration_runs_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,7 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, Callable, Dict, Optional, Type, TypeVar
+from typing import Any, Callable, Dict, Optional, TypeVar
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -29,7 +28,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -49,7 +48,7 @@ def build_get_by_id_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -95,7 +94,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -176,7 +175,7 @@ def get_by_id(
:rtype: ~azure.mgmt.automation.models.SoftwareUpdateConfigurationRun
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -187,7 +186,7 @@ def get_by_id(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.SoftwareUpdateConfigurationRun] = kwargs.pop("cls", None)
_request = build_get_by_id_request(
@@ -256,7 +255,7 @@ def list(
:rtype: ~azure.mgmt.automation.models.SoftwareUpdateConfigurationRunListResult
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -267,7 +266,7 @@ def list(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.SoftwareUpdateConfigurationRunListResult] = kwargs.pop("cls", None)
_request = build_list_request(
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_software_update_configurations_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_software_update_configurations_operations.py
index 177164de050d..20bf4e5ee319 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_software_update_configurations_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_software_update_configurations_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload
+from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -30,7 +29,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -50,7 +49,7 @@ def build_create_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", "2019-06-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -97,7 +96,7 @@ def build_get_by_name_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", "2019-06-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -141,7 +140,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", "2019-06-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -185,7 +184,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", "2019-06-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -338,7 +337,7 @@ def create(
:rtype: ~azure.mgmt.automation.models.SoftwareUpdateConfiguration
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -349,7 +348,7 @@ def create(
_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", "2019-06-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.SoftwareUpdateConfiguration] = kwargs.pop("cls", None)
@@ -422,7 +421,7 @@ def get_by_name(
:rtype: ~azure.mgmt.automation.models.SoftwareUpdateConfiguration
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -433,7 +432,7 @@ def get_by_name(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.SoftwareUpdateConfiguration] = kwargs.pop("cls", None)
_request = build_get_by_name_request(
@@ -494,7 +493,7 @@ def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -505,7 +504,7 @@ def delete( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_delete_request(
@@ -561,7 +560,7 @@ def list(
:rtype: ~azure.mgmt.automation.models.SoftwareUpdateConfigurationListResult
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -572,7 +571,7 @@ def list(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.SoftwareUpdateConfigurationListResult] = kwargs.pop("cls", None)
_request = build_list_request(
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_source_control_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_source_control_operations.py
index ae0f54c21f62..833fcfe6f13e 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_source_control_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_source_control_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,8 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload
+from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload
+import urllib.parse
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -31,7 +31,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -49,7 +49,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -90,7 +90,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -131,7 +131,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -169,7 +169,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -208,7 +208,7 @@ def build_list_by_automation_account_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -350,7 +350,7 @@ def create_or_update(
:rtype: ~azure.mgmt.automation.models.SourceControl
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -361,7 +361,7 @@ def create_or_update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.SourceControl] = kwargs.pop("cls", None)
@@ -497,7 +497,7 @@ def update(
:rtype: ~azure.mgmt.automation.models.SourceControl
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -508,7 +508,7 @@ def update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.SourceControl] = kwargs.pop("cls", None)
@@ -572,7 +572,7 @@ def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -583,7 +583,7 @@ def delete( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_delete_request(
@@ -631,7 +631,7 @@ def get(
:rtype: ~azure.mgmt.automation.models.SourceControl
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -642,7 +642,7 @@ def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.SourceControl] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -697,10 +697,10 @@ def list_by_automation_account(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.SourceControlListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -723,7 +723,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_source_control_sync_job_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_source_control_sync_job_operations.py
index 3c08b3580b64..8089b356f45a 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_source_control_sync_job_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_source_control_sync_job_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,8 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload
+from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload
+import urllib.parse
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -31,7 +31,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -50,7 +50,7 @@ def build_create_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -134,7 +134,7 @@ def build_list_by_automation_account_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -286,7 +286,7 @@ def create(
:rtype: ~azure.mgmt.automation.models.SourceControlSyncJob
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -297,7 +297,7 @@ def create(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.SourceControlSyncJob] = kwargs.pop("cls", None)
@@ -369,7 +369,7 @@ def get(
:rtype: ~azure.mgmt.automation.models.SourceControlSyncJobById
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -380,7 +380,7 @@ def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.SourceControlSyncJobById] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -444,10 +444,10 @@ def list_by_automation_account(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.SourceControlSyncJobListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -471,7 +471,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_source_control_sync_job_streams_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_source_control_sync_job_streams_operations.py
index 8cbe16483af5..fae45d09ac0f 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_source_control_sync_job_streams_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_source_control_sync_job_streams_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,8 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar
+from typing import Any, Callable, Dict, Iterable, Optional, TypeVar
+import urllib.parse
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -30,7 +30,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -51,7 +51,7 @@ def build_list_by_sync_job_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -94,7 +94,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -176,10 +176,10 @@ def list_by_sync_job(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.SourceControlSyncJobStreamsListBySyncJob] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -204,7 +204,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
@@ -263,7 +274,7 @@ def get(
:rtype: ~azure.mgmt.automation.models.SourceControlSyncJobStreamById
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -274,7 +285,7 @@ def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.SourceControlSyncJobStreamById] = kwargs.pop("cls", None)
_request = build_get_request(
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_statistics_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_statistics_operations.py
index fa8e9486ac9f..3a8bd9f37fd4 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_statistics_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_statistics_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,8 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar
+from typing import Any, Callable, Dict, Iterable, Optional, TypeVar
+import urllib.parse
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -30,7 +30,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -49,7 +49,7 @@ def build_list_by_automation_account_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -119,10 +119,10 @@ def list_by_automation_account(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.StatisticsListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -145,7 +145,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_test_job_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_test_job_operations.py
index a2e9f3f7dc87..1431ec0fd51d 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_test_job_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_test_job_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload
+from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -30,7 +29,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -44,7 +43,7 @@ def build_create_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -81,7 +80,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -115,7 +114,7 @@ def build_resume_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -149,7 +148,7 @@ def build_stop_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -183,7 +182,7 @@ def build_suspend_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -321,7 +320,7 @@ def create(
:rtype: ~azure.mgmt.automation.models.TestJob
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -332,7 +331,7 @@ def create(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.TestJob] = kwargs.pop("cls", None)
@@ -396,7 +395,7 @@ def get(
:rtype: ~azure.mgmt.automation.models.TestJob
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -407,7 +406,7 @@ def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.TestJob] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -459,7 +458,7 @@ def resume( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -470,7 +469,7 @@ def resume( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_resume_request(
@@ -518,7 +517,7 @@ def stop( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -529,7 +528,7 @@ def stop( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_stop_request(
@@ -577,7 +576,7 @@ def suspend( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -588,7 +587,7 @@ def suspend( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_suspend_request(
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_test_job_streams_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_test_job_streams_operations.py
index badaf1afaaf3..2e8852c1061a 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_test_job_streams_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_test_job_streams_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,8 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar
+from typing import Any, Callable, Dict, Iterable, Optional, TypeVar
+import urllib.parse
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -30,7 +30,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -49,7 +49,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -90,7 +90,7 @@ def build_list_by_test_job_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -165,7 +165,7 @@ def get(
:rtype: ~azure.mgmt.automation.models.JobStream
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -176,7 +176,7 @@ def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.JobStream] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -239,10 +239,10 @@ def list_by_test_job(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.JobStreamListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -266,7 +266,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_usages_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_usages_operations.py
index 50dc6442834b..d5ef061a56e6 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_usages_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_usages_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,8 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar
+from typing import Any, Callable, Dict, Iterable, Optional, TypeVar
+import urllib.parse
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -30,7 +30,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -44,7 +44,7 @@ def build_list_by_automation_account_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -110,10 +110,10 @@ def list_by_automation_account(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.UsageListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -135,7 +135,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_variable_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_variable_operations.py
index 695581ec7d09..d3838a37186f 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_variable_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_variable_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,8 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload
+from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload
+import urllib.parse
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -31,7 +31,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -45,7 +45,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -82,7 +82,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -119,7 +119,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -153,7 +153,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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -187,7 +187,7 @@ def build_list_by_automation_account_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -326,7 +326,7 @@ def create_or_update(
:rtype: ~azure.mgmt.automation.models.Variable
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -337,7 +337,7 @@ def create_or_update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Variable] = kwargs.pop("cls", None)
@@ -473,7 +473,7 @@ def update(
:rtype: ~azure.mgmt.automation.models.Variable
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -484,7 +484,7 @@ def update(
_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", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Variable] = kwargs.pop("cls", None)
@@ -548,7 +548,7 @@ def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -559,7 +559,7 @@ def delete( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_delete_request(
@@ -607,7 +607,7 @@ def get(
:rtype: ~azure.mgmt.automation.models.Variable
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -618,7 +618,7 @@ def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.Variable] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -671,10 +671,10 @@ def list_by_automation_account(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.VariableListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -696,7 +696,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_watcher_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_watcher_operations.py
index e912b470dc4d..a3c6e426327f 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_watcher_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_watcher_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,8 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload
+from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload
+import urllib.parse
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -31,7 +31,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -45,7 +45,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", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -82,7 +82,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", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -116,7 +116,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", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -153,7 +153,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", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -187,7 +187,7 @@ def build_start_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", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -221,7 +221,7 @@ def build_stop_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", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -260,7 +260,7 @@ def build_list_by_automation_account_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", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -399,7 +399,7 @@ def create_or_update(
:rtype: ~azure.mgmt.automation.models.Watcher
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -410,7 +410,7 @@ def create_or_update(
_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", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Watcher] = kwargs.pop("cls", None)
@@ -474,7 +474,7 @@ def get(
:rtype: ~azure.mgmt.automation.models.Watcher
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -485,7 +485,7 @@ def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.Watcher] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -609,7 +609,7 @@ def update(
:rtype: ~azure.mgmt.automation.models.Watcher
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -620,7 +620,7 @@ def update(
_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", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Watcher] = kwargs.pop("cls", None)
@@ -684,7 +684,7 @@ def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -695,7 +695,7 @@ def delete( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_delete_request(
@@ -743,7 +743,7 @@ def start( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -754,7 +754,7 @@ def start( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_start_request(
@@ -802,7 +802,7 @@ def stop( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -813,7 +813,7 @@ def stop( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_stop_request(
@@ -864,10 +864,10 @@ def list_by_automation_account(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.WatcherListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -890,7 +890,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_webhook_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_webhook_operations.py
index ef9fa5e2dc8a..3a9421e5c1ea 100644
--- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_webhook_operations.py
+++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_webhook_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,8 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload
+from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload
+import urllib.parse
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -31,7 +31,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -45,7 +45,7 @@ def build_generate_uri_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", "2015-10-31"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -78,7 +78,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", "2015-10-31"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -112,7 +112,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", "2015-10-31"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -146,7 +146,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", "2015-10-31"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -183,7 +183,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", "2015-10-31"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -225,7 +225,7 @@ def build_list_by_automation_account_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", "2015-10-31"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-23"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -288,7 +288,7 @@ def generate_uri(self, resource_group_name: str, automation_account_name: str, *
:rtype: str
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -299,7 +299,7 @@ def generate_uri(self, resource_group_name: str, automation_account_name: str, *
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-31"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[str] = kwargs.pop("cls", None)
_request = build_generate_uri_request(
@@ -350,7 +350,7 @@ def delete( # pylint: disable=inconsistent-return-statements
:rtype: None
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -361,7 +361,7 @@ def delete( # pylint: disable=inconsistent-return-statements
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-31"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
_request = build_delete_request(
@@ -409,7 +409,7 @@ def get(
:rtype: ~azure.mgmt.automation.models.Webhook
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -420,7 +420,7 @@ def get(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-31"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.Webhook] = kwargs.pop("cls", None)
_request = build_get_request(
@@ -544,7 +544,7 @@ def create_or_update(
:rtype: ~azure.mgmt.automation.models.Webhook
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -555,7 +555,7 @@ def create_or_update(
_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", "2015-10-31"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Webhook] = kwargs.pop("cls", None)
@@ -691,7 +691,7 @@ def update(
:rtype: ~azure.mgmt.automation.models.Webhook
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -702,7 +702,7 @@ def update(
_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", "2015-10-31"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
cls: ClsType[_models.Webhook] = kwargs.pop("cls", None)
@@ -769,10 +769,10 @@ def list_by_automation_account(
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-31"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.WebhookListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -795,7 +795,18 @@ def prepare_request(next_link=None):
_request.url = self._client.format_url(_request.url)
else:
- _request = HttpRequest("GET", next_link)
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
_request.url = self._client.format_url(_request.url)
_request.method = "GET"
return _request
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/create_job_schedule.py b/sdk/automation/azure-mgmt-automation/generated_samples/create_job_schedule.py
index 2b493b70c91e..a135da78b4b4 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/create_job_schedule.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/create_job_schedule.py
@@ -45,6 +45,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/createJobSchedule.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/createJobSchedule.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_automation_account.py b/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_automation_account.py
index 32f749004516..74b397a4929d 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_automation_account.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_automation_account.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/createOrUpdateAutomationAccount.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/createOrUpdateAutomationAccount.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_certificate.py b/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_certificate.py
index 906c342af734..1778f8b76483 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_certificate.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_certificate.py
@@ -47,6 +47,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/createOrUpdateCertificate.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/createOrUpdateCertificate.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_connection.py b/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_connection.py
index 9ebe7f199b81..8af5342ffcb2 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_connection.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_connection.py
@@ -46,6 +46,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/createOrUpdateConnection.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/createOrUpdateConnection.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_connection_type.py b/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_connection_type.py
index 881ffe38d2a8..3e5036d4b2c4 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_connection_type.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_connection_type.py
@@ -49,6 +49,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/createOrUpdateConnectionType.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/createOrUpdateConnectionType.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_credential.py b/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_credential.py
index 9b116f2a2012..6e70b95cc6e8 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_credential.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_credential.py
@@ -46,6 +46,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/createOrUpdateCredential.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/createOrUpdateCredential.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_dsc_configuration.py b/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_dsc_configuration.py
index 6b0f35c3a81f..cb7d7825bec9 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_dsc_configuration.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_dsc_configuration.py
@@ -53,6 +53,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/createOrUpdateDscConfiguration.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/createOrUpdateDscConfiguration.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_dsc_node_configuration.py b/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_dsc_node_configuration.py
index 8b97a7fd18a7..c5e2c9f4a6c3 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_dsc_node_configuration.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_dsc_node_configuration.py
@@ -54,6 +54,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/createOrUpdateDscNodeConfiguration.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/createOrUpdateDscNodeConfiguration.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_module.py b/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_module.py
index 60031b022195..49d402823480 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_module.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_module.py
@@ -50,6 +50,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/createOrUpdateModule.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/createOrUpdateModule.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_python2_package.py b/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_python2_package.py
index 281a320d14e8..5f5366330add 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_python2_package.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_python2_package.py
@@ -51,6 +51,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/createOrUpdatePython2Package.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/createOrUpdatePython2Package.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_python3_package.py b/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_python3_package.py
index 4a575bb3a6c6..e898f206f896 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_python3_package.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_python3_package.py
@@ -51,6 +51,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/createOrUpdatePython3Package.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/createOrUpdatePython3Package.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_schedule.py b/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_schedule.py
index df6827f35c0e..30d7a93426d3 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_schedule.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_schedule.py
@@ -49,6 +49,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/createOrUpdateSchedule.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/createOrUpdateSchedule.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_variable.py b/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_variable.py
index 2051e1ab82cb..6a11012ca292 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_variable.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_variable.py
@@ -42,6 +42,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/createOrUpdateVariable.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/createOrUpdateVariable.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_watcher.py b/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_watcher.py
index adfaad839c82..9b56d212dc73 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_watcher.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_watcher.py
@@ -52,6 +52,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/createOrUpdateWatcher.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/createOrUpdateWatcher.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_webhook.py b/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_webhook.py
index c623f757ad3e..8f530aafec43 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_webhook.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_webhook.py
@@ -47,6 +47,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2015-10-31/examples/createOrUpdateWebhook.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/createOrUpdateWebhook.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/delete_automation_account.py b/sdk/automation/azure-mgmt-automation/generated_samples/delete_automation_account.py
index 21c7a0276da9..d61a367a31ec 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/delete_automation_account.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/delete_automation_account.py
@@ -36,6 +36,6 @@ def main():
)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/deleteAutomationAccount.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/deleteAutomationAccount.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/delete_certificate.py b/sdk/automation/azure-mgmt-automation/generated_samples/delete_certificate.py
index 6e3ee25dc7b6..75d3a2c21903 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/delete_certificate.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/delete_certificate.py
@@ -37,6 +37,6 @@ def main():
)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/deleteCertificate.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/deleteCertificate.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/delete_connection.py b/sdk/automation/azure-mgmt-automation/generated_samples/delete_connection.py
index 5a0aede34e19..2e1e26310e35 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/delete_connection.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/delete_connection.py
@@ -37,6 +37,6 @@ def main():
)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/deleteConnection.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/deleteConnection.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/delete_connection_type.py b/sdk/automation/azure-mgmt-automation/generated_samples/delete_connection_type.py
index 021920d3bfcf..6baecbe0a35c 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/delete_connection_type.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/delete_connection_type.py
@@ -37,6 +37,6 @@ def main():
)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/deleteConnectionType.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/deleteConnectionType.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/delete_credential_existing.py b/sdk/automation/azure-mgmt-automation/generated_samples/delete_credential_existing.py
index 7ed67c055345..7ba87f1a6182 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/delete_credential_existing.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/delete_credential_existing.py
@@ -37,6 +37,6 @@ def main():
)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/deleteCredentialExisting.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/deleteCredentialExisting.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/delete_dsc_configuration.py b/sdk/automation/azure-mgmt-automation/generated_samples/delete_dsc_configuration.py
index 5891714faca5..9af7e98d84a5 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/delete_dsc_configuration.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/delete_dsc_configuration.py
@@ -37,6 +37,6 @@ def main():
)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/deleteDscConfiguration.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/deleteDscConfiguration.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/delete_dsc_node.py b/sdk/automation/azure-mgmt-automation/generated_samples/delete_dsc_node.py
index 54ea48a9ef7d..573677395d2e 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/delete_dsc_node.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/delete_dsc_node.py
@@ -37,6 +37,6 @@ def main():
)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/deleteDscNode.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/deleteDscNode.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/delete_dsc_node_configuration.py b/sdk/automation/azure-mgmt-automation/generated_samples/delete_dsc_node_configuration.py
index 9c9c1e22ed69..94fe4a424ce4 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/delete_dsc_node_configuration.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/delete_dsc_node_configuration.py
@@ -37,6 +37,6 @@ def main():
)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/deleteDscNodeConfiguration.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/deleteDscNodeConfiguration.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/delete_hybrid_runbook_worker.py b/sdk/automation/azure-mgmt-automation/generated_samples/delete_hybrid_runbook_worker.py
index 1562d3e9c23b..2aa57139f584 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/delete_hybrid_runbook_worker.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/delete_hybrid_runbook_worker.py
@@ -38,6 +38,6 @@ def main():
)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/deleteHybridRunbookWorker.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/deleteHybridRunbookWorker.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/delete_hybrid_runbook_worker_group.py b/sdk/automation/azure-mgmt-automation/generated_samples/delete_hybrid_runbook_worker_group.py
index 1f04d428dd28..1c4b9c417dda 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/delete_hybrid_runbook_worker_group.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/delete_hybrid_runbook_worker_group.py
@@ -37,6 +37,6 @@ def main():
)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/deleteHybridRunbookWorkerGroup.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/deleteHybridRunbookWorkerGroup.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/delete_job_schedule.py b/sdk/automation/azure-mgmt-automation/generated_samples/delete_job_schedule.py
index 2b5b097295de..b8f93ad42e0d 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/delete_job_schedule.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/delete_job_schedule.py
@@ -37,6 +37,6 @@ def main():
)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/deleteJobSchedule.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/deleteJobSchedule.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/delete_module.py b/sdk/automation/azure-mgmt-automation/generated_samples/delete_module.py
index 19b5ab3dca39..68b684f84054 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/delete_module.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/delete_module.py
@@ -37,6 +37,6 @@ def main():
)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/deleteModule.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/deleteModule.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/delete_python2_package.py b/sdk/automation/azure-mgmt-automation/generated_samples/delete_python2_package.py
index 66562e1fccc8..5ae1dee72b33 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/delete_python2_package.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/delete_python2_package.py
@@ -37,6 +37,6 @@ def main():
)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/deletePython2Package.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/deletePython2Package.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/delete_python3_package.py b/sdk/automation/azure-mgmt-automation/generated_samples/delete_python3_package.py
index 35135ec74ff4..ff492a945502 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/delete_python3_package.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/delete_python3_package.py
@@ -37,6 +37,6 @@ def main():
)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/deletePython3Package.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/deletePython3Package.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/delete_schedule.py b/sdk/automation/azure-mgmt-automation/generated_samples/delete_schedule.py
index 155fec22e92b..4a5237447d88 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/delete_schedule.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/delete_schedule.py
@@ -37,6 +37,6 @@ def main():
)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/deleteSchedule.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/deleteSchedule.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/delete_variable.py b/sdk/automation/azure-mgmt-automation/generated_samples/delete_variable.py
index f6d03a28720b..dbb771f15ca1 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/delete_variable.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/delete_variable.py
@@ -37,6 +37,6 @@ def main():
)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/deleteVariable.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/deleteVariable.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/delete_watcher.py b/sdk/automation/azure-mgmt-automation/generated_samples/delete_watcher.py
index 0f5e527b3e10..a2f7033b746e 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/delete_watcher.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/delete_watcher.py
@@ -37,6 +37,6 @@ def main():
)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/deleteWatcher.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/deleteWatcher.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/delete_webhook.py b/sdk/automation/azure-mgmt-automation/generated_samples/delete_webhook.py
index 5cb27ce8e4d3..daf7d55d6c49 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/delete_webhook.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/delete_webhook.py
@@ -37,6 +37,6 @@ def main():
)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2015-10-31/examples/deleteWebhook.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/deleteWebhook.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/deserialize_graph_runbook_content.py b/sdk/automation/azure-mgmt-automation/generated_samples/deserialize_graph_runbook_content.py
index f86cab907cbc..43079e802705 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/deserialize_graph_runbook_content.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/deserialize_graph_runbook_content.py
@@ -44,6 +44,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/deserializeGraphRunbookContent.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/deserializeGraphRunbookContent.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/get_activity_in_amodule.py b/sdk/automation/azure-mgmt-automation/generated_samples/get_activity_in_amodule.py
index dbcf81260843..b311d365d656 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/get_activity_in_amodule.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/get_activity_in_amodule.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/getActivityInAModule.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/getActivityInAModule.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/get_agent_registration.py b/sdk/automation/azure-mgmt-automation/generated_samples/get_agent_registration.py
index 2bc7dcaddabf..d944fc935d42 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/get_agent_registration.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/get_agent_registration.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getAgentRegistration.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/getAgentRegistration.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/get_all_connection_types_first100.py b/sdk/automation/azure-mgmt-automation/generated_samples/get_all_connection_types_first100.py
index 1d19ccb5d2d2..335a2aff8c1b 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/get_all_connection_types_first100.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/get_all_connection_types_first100.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/getAllConnectionTypes_First100.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/getAllConnectionTypes_First100.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/get_all_connection_types_next100.py b/sdk/automation/azure-mgmt-automation/generated_samples/get_all_connection_types_next100.py
index f8fb0eaee5cf..1c0e4a6663dd 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/get_all_connection_types_next100.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/get_all_connection_types_next100.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/getAllConnectionTypes_Next100.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/getAllConnectionTypes_Next100.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/get_all_dsc_configurations.py b/sdk/automation/azure-mgmt-automation/generated_samples/get_all_dsc_configurations.py
index b530bfd16d06..73247758480d 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/get_all_dsc_configurations.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/get_all_dsc_configurations.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/getAllDscConfigurations.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/getAllDscConfigurations.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/get_automation_account.py b/sdk/automation/azure-mgmt-automation/generated_samples/get_automation_account.py
index 112f56333758..4f68c60d3bce 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/get_automation_account.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/get_automation_account.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/getAutomationAccount.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/getAutomationAccount.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/get_certificate.py b/sdk/automation/azure-mgmt-automation/generated_samples/get_certificate.py
index ec4b5054e5b3..56ec814e34c9 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/get_certificate.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/get_certificate.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/getCertificate.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/getCertificate.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/get_connection.py b/sdk/automation/azure-mgmt-automation/generated_samples/get_connection.py
index 1eaaacdc23cd..8cae56bfd96d 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/get_connection.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/get_connection.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/getConnection.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/getConnection.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/get_connection_type.py b/sdk/automation/azure-mgmt-automation/generated_samples/get_connection_type.py
index 102d0a442017..aeeacc3629e9 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/get_connection_type.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/get_connection_type.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/getConnectionType.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/getConnectionType.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/get_credential.py b/sdk/automation/azure-mgmt-automation/generated_samples/get_credential.py
index e0d13b966860..1e5c0cfeed9d 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/get_credential.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/get_credential.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/getCredential.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/getCredential.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/get_deleted_automation_account.py b/sdk/automation/azure-mgmt-automation/generated_samples/get_deleted_automation_account.py
index 5e58ce87cbd9..707d76a567fa 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/get_deleted_automation_account.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/get_deleted_automation_account.py
@@ -34,6 +34,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-01-31/examples/getDeletedAutomationAccount.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/getDeletedAutomationAccount.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/get_dsc_configuration.py b/sdk/automation/azure-mgmt-automation/generated_samples/get_dsc_configuration.py
index 5c61696eed14..5e8b7b4e49e1 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/get_dsc_configuration.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/get_dsc_configuration.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/getDscConfiguration.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/getDscConfiguration.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/get_dsc_configuration_content.py b/sdk/automation/azure-mgmt-automation/generated_samples/get_dsc_configuration_content.py
index f4864cea78e2..11c7559b5a7d 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/get_dsc_configuration_content.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/get_dsc_configuration_content.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/getDscConfigurationContent.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/getDscConfigurationContent.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/get_dsc_node.py b/sdk/automation/azure-mgmt-automation/generated_samples/get_dsc_node.py
index 7db59ba56d3f..10a23a6a45c5 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/get_dsc_node.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/get_dsc_node.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getDscNode.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/getDscNode.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/get_dsc_node_configuration.py b/sdk/automation/azure-mgmt-automation/generated_samples/get_dsc_node_configuration.py
index 462d5028e2d0..22569375e5b9 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/get_dsc_node_configuration.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/get_dsc_node_configuration.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/getDscNodeConfiguration.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/getDscNodeConfiguration.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/get_dsc_node_report.py b/sdk/automation/azure-mgmt-automation/generated_samples/get_dsc_node_report.py
index 84f583c63fd7..7ae6523fd9aa 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/get_dsc_node_report.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/get_dsc_node_report.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getDscNodeReport.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/getDscNodeReport.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/get_dsc_node_report_content.py b/sdk/automation/azure-mgmt-automation/generated_samples/get_dsc_node_report_content.py
index 1df8a0e9f91f..dabab2ed0c14 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/get_dsc_node_report_content.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/get_dsc_node_report_content.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getDscNodeReportContent.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/getDscNodeReportContent.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/get_hybrid_runbook_worker.py b/sdk/automation/azure-mgmt-automation/generated_samples/get_hybrid_runbook_worker.py
index 96b8158acf99..dedd9993bf40 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/get_hybrid_runbook_worker.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/get_hybrid_runbook_worker.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/getHybridRunbookWorker.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/getHybridRunbookWorker.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/get_hybrid_runbook_worker_group.py b/sdk/automation/azure-mgmt-automation/generated_samples/get_hybrid_runbook_worker_group.py
index 076f0498f37d..ca4d704b492c 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/get_hybrid_runbook_worker_group.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/get_hybrid_runbook_worker_group.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/getHybridRunbookWorkerGroup.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/getHybridRunbookWorkerGroup.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/get_job_schedule.py b/sdk/automation/azure-mgmt-automation/generated_samples/get_job_schedule.py
index 6da142fd6b4d..b782a6f63ef3 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/get_job_schedule.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/get_job_schedule.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/getJobSchedule.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/getJobSchedule.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/get_linked_workspace.py b/sdk/automation/azure-mgmt-automation/generated_samples/get_linked_workspace.py
index c009392c12a6..f692cba69844 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/get_linked_workspace.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/get_linked_workspace.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/getLinkedWorkspace.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/getLinkedWorkspace.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/get_module.py b/sdk/automation/azure-mgmt-automation/generated_samples/get_module.py
index d48eb91a8c41..c58b1060d221 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/get_module.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/get_module.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/getModule.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/getModule.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/get_paged_dsc_configurations_with_no_filter.py b/sdk/automation/azure-mgmt-automation/generated_samples/get_paged_dsc_configurations_with_no_filter.py
index df525b4530ea..850bd2849b2f 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/get_paged_dsc_configurations_with_no_filter.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/get_paged_dsc_configurations_with_no_filter.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/getPagedDscConfigurationsWithNoFilter.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/getPagedDscConfigurationsWithNoFilter.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/get_pagedl_dsc_configurations_with_name_filter.py b/sdk/automation/azure-mgmt-automation/generated_samples/get_pagedl_dsc_configurations_with_name_filter.py
index c5d76a9315eb..56e2bcb597c8 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/get_pagedl_dsc_configurations_with_name_filter.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/get_pagedl_dsc_configurations_with_name_filter.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/getPagedlDscConfigurationsWithNameFilter.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/getPagedlDscConfigurationsWithNameFilter.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/get_python2_package.py b/sdk/automation/azure-mgmt-automation/generated_samples/get_python2_package.py
index b81bbb76d425..487e1ad294b7 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/get_python2_package.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/get_python2_package.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/getPython2Package.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/getPython2Package.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/get_python3_package.py b/sdk/automation/azure-mgmt-automation/generated_samples/get_python3_package.py
index c9cb5e7393ee..b95f601e5d00 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/get_python3_package.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/get_python3_package.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/getPython3Package.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/getPython3Package.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/get_schedule.py b/sdk/automation/azure-mgmt-automation/generated_samples/get_schedule.py
index 8516fdd0f501..9547dfaac31d 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/get_schedule.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/get_schedule.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/getSchedule.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/getSchedule.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/get_statistics_of_automation_account.py b/sdk/automation/azure-mgmt-automation/generated_samples/get_statistics_of_automation_account.py
index 80dce470fae6..897b3a55e784 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/get_statistics_of_automation_account.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/get_statistics_of_automation_account.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/getStatisticsOfAutomationAccount.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/getStatisticsOfAutomationAccount.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/get_usages_of_automation_account.py b/sdk/automation/azure-mgmt-automation/generated_samples/get_usages_of_automation_account.py
index 8345b9669af4..f29e878c8731 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/get_usages_of_automation_account.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/get_usages_of_automation_account.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/getUsagesOfAutomationAccount.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/getUsagesOfAutomationAccount.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/get_variable.py b/sdk/automation/azure-mgmt-automation/generated_samples/get_variable.py
index 2459f3c72f78..e209f1703e98 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/get_variable.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/get_variable.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/getVariable.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/getVariable.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/get_watcher.py b/sdk/automation/azure-mgmt-automation/generated_samples/get_watcher.py
index 075a8a4c3e6e..19beb1157eda 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/get_watcher.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/get_watcher.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getWatcher.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/getWatcher.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/get_webhook.py b/sdk/automation/azure-mgmt-automation/generated_samples/get_webhook.py
index 9143bac1cedc..6af5cf39f2f2 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/get_webhook.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/get_webhook.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2015-10-31/examples/getWebhook.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/getWebhook.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/job/create_job.py b/sdk/automation/azure-mgmt-automation/generated_samples/job/create_job.py
index 51c3e0412194..d77eecb555b1 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/job/create_job.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/job/create_job.py
@@ -45,6 +45,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/job/createJob.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/job/createJob.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/job/get_job.py b/sdk/automation/azure-mgmt-automation/generated_samples/job/get_job.py
index e80855f8290c..478e029a3ce4 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/job/get_job.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/job/get_job.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/job/getJob.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/job/getJob.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/job/get_job_output.py b/sdk/automation/azure-mgmt-automation/generated_samples/job/get_job_output.py
index 34a722de2e6b..d99abc203610 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/job/get_job_output.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/job/get_job_output.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/job/getJobOutput.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/job/getJobOutput.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/job/get_job_runbook_content.py b/sdk/automation/azure-mgmt-automation/generated_samples/job/get_job_runbook_content.py
index b35965b0b585..be31a8ffe463 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/job/get_job_runbook_content.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/job/get_job_runbook_content.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/job/getJobRunbookContent.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/job/getJobRunbookContent.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/job/get_job_stream.py b/sdk/automation/azure-mgmt-automation/generated_samples/job/get_job_stream.py
index ae21fa845fa8..dd71b5539ea7 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/job/get_job_stream.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/job/get_job_stream.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/job/getJobStream.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/job/getJobStream.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/job/list_job_streams_by_job.py b/sdk/automation/azure-mgmt-automation/generated_samples/job/list_job_streams_by_job.py
index c232e74b0847..6301b16f86ed 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/job/list_job_streams_by_job.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/job/list_job_streams_by_job.py
@@ -39,6 +39,6 @@ def main():
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/job/listJobStreamsByJob.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/job/listJobStreamsByJob.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/job/list_jobs_by_automation_account.py b/sdk/automation/azure-mgmt-automation/generated_samples/job/list_jobs_by_automation_account.py
index 5d1d6a16023b..9951fe49c9c7 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/job/list_jobs_by_automation_account.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/job/list_jobs_by_automation_account.py
@@ -32,12 +32,12 @@ def main():
response = client.job.list_by_automation_account(
resource_group_name="mygroup",
- automation_account_name="ContoseAutomationAccount",
+ automation_account_name="ContosoAutomationAccount",
)
for item in response:
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/job/listJobsByAutomationAccount.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/job/listJobsByAutomationAccount.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/job/resume_job.py b/sdk/automation/azure-mgmt-automation/generated_samples/job/resume_job.py
index 106090cf85fe..4a0305244d7a 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/job/resume_job.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/job/resume_job.py
@@ -37,6 +37,6 @@ def main():
)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/job/resumeJob.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/job/resumeJob.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/job/stop_job.py b/sdk/automation/azure-mgmt-automation/generated_samples/job/stop_job.py
index 71a9b3bbf343..2aa203c652ae 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/job/stop_job.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/job/stop_job.py
@@ -37,6 +37,6 @@ def main():
)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/job/stopJob.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/job/stopJob.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/job/suspend_job.py b/sdk/automation/azure-mgmt-automation/generated_samples/job/suspend_job.py
index 10a921caadc6..7893a0caa225 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/job/suspend_job.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/job/suspend_job.py
@@ -37,6 +37,6 @@ def main():
)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/job/suspendJob.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/job/suspendJob.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/list_activities_by_module.py b/sdk/automation/azure-mgmt-automation/generated_samples/list_activities_by_module.py
index 1d091a0b99c1..ec5188f62305 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/list_activities_by_module.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/list_activities_by_module.py
@@ -39,6 +39,6 @@ def main():
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/listActivitiesByModule.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/listActivitiesByModule.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/list_all_dsc_nodes_by_automation_account.py b/sdk/automation/azure-mgmt-automation/generated_samples/list_all_dsc_nodes_by_automation_account.py
index cbcbaa13f653..67fdecae1070 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/list_all_dsc_nodes_by_automation_account.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/list_all_dsc_nodes_by_automation_account.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listAllDscNodesByAutomationAccount.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/listAllDscNodesByAutomationAccount.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/list_all_job_schedules_by_automation_account.py b/sdk/automation/azure-mgmt-automation/generated_samples/list_all_job_schedules_by_automation_account.py
index c09acb29fed9..c33d83fd2920 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/list_all_job_schedules_by_automation_account.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/list_all_job_schedules_by_automation_account.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/listAllJobSchedulesByAutomationAccount.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/listAllJobSchedulesByAutomationAccount.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/list_automation_account_deleted_runbooks.py b/sdk/automation/azure-mgmt-automation/generated_samples/list_automation_account_deleted_runbooks.py
new file mode 100644
index 000000000000..3da84fe9f24a
--- /dev/null
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/list_automation_account_deleted_runbooks.py
@@ -0,0 +1,43 @@
+# 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.automation import AutomationClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-automation
+# USAGE
+ python list_automation_account_deleted_runbooks.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 = AutomationClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="subid",
+ )
+
+ response = client.automation_account.list_deleted_runbooks(
+ resource_group_name="rg",
+ automation_account_name="MyAutomationAccount",
+ )
+ for item in response:
+ print(item)
+
+
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/listAutomationAccountDeletedRunbooks.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/list_automation_account_keys.py b/sdk/automation/azure-mgmt-automation/generated_samples/list_automation_account_keys.py
index 3eb175567278..49093eb922d8 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/list_automation_account_keys.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/list_automation_account_keys.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/listAutomationAccountKeys.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/listAutomationAccountKeys.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/list_automation_accounts_by_resource_group.py b/sdk/automation/azure-mgmt-automation/generated_samples/list_automation_accounts_by_resource_group.py
index a062928fc86d..615cd5d23600 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/list_automation_accounts_by_resource_group.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/list_automation_accounts_by_resource_group.py
@@ -37,6 +37,6 @@ def main():
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/listAutomationAccountsByResourceGroup.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/listAutomationAccountsByResourceGroup.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/list_automation_accounts_by_subscription.py b/sdk/automation/azure-mgmt-automation/generated_samples/list_automation_accounts_by_subscription.py
index ce5f98428294..237fd592db0b 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/list_automation_accounts_by_subscription.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/list_automation_accounts_by_subscription.py
@@ -35,6 +35,6 @@ def main():
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/listAutomationAccountsBySubscription.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/listAutomationAccountsBySubscription.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/list_certificates_by_automation_account.py b/sdk/automation/azure-mgmt-automation/generated_samples/list_certificates_by_automation_account.py
index 267bf1857323..808127d04c19 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/list_certificates_by_automation_account.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/list_certificates_by_automation_account.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/listCertificatesByAutomationAccount.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/listCertificatesByAutomationAccount.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/list_connections_by_automation_account_first100.py b/sdk/automation/azure-mgmt-automation/generated_samples/list_connections_by_automation_account_first100.py
index f3a7d2d69c62..63a204b732d4 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/list_connections_by_automation_account_first100.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/list_connections_by_automation_account_first100.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/listConnectionsByAutomationAccount_First100.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/listConnectionsByAutomationAccount_First100.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/list_connections_by_automation_account_next100.py b/sdk/automation/azure-mgmt-automation/generated_samples/list_connections_by_automation_account_next100.py
index 98b377a54c6a..b33efc0cf99a 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/list_connections_by_automation_account_next100.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/list_connections_by_automation_account_next100.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/listConnectionsByAutomationAccount_Next100.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/listConnectionsByAutomationAccount_Next100.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/list_credentials_by_automation_account.py b/sdk/automation/azure-mgmt-automation/generated_samples/list_credentials_by_automation_account.py
index 2192aecf1ebd..dfd1456e56b3 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/list_credentials_by_automation_account.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/list_credentials_by_automation_account.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/listCredentialsByAutomationAccount.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/listCredentialsByAutomationAccount.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/list_credentials_by_automation_account_next100_using_next_link.py b/sdk/automation/azure-mgmt-automation/generated_samples/list_credentials_by_automation_account_next100_using_next_link.py
index 96f65c2c8960..45cd24e71fb7 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/list_credentials_by_automation_account_next100_using_next_link.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/list_credentials_by_automation_account_next100_using_next_link.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/listCredentialsByAutomationAccount_next100_using_nextLink.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/listCredentialsByAutomationAccount_next100_using_nextLink.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/list_dsc_node_configurations.py b/sdk/automation/azure-mgmt-automation/generated_samples/list_dsc_node_configurations.py
index 828e6ddafb96..68f8c1bb72ee 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/list_dsc_node_configurations.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/list_dsc_node_configurations.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/listDscNodeConfigurations.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/listDscNodeConfigurations.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/list_dsc_node_reports_by_node.py b/sdk/automation/azure-mgmt-automation/generated_samples/list_dsc_node_reports_by_node.py
index d840bc47801d..c282cf92a6d4 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/list_dsc_node_reports_by_node.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/list_dsc_node_reports_by_node.py
@@ -39,6 +39,6 @@ def main():
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listDscNodeReportsByNode.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/listDscNodeReportsByNode.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/list_fields_by_module_and_type.py b/sdk/automation/azure-mgmt-automation/generated_samples/list_fields_by_module_and_type.py
index 587de076fb21..6c8dfdb32e42 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/list_fields_by_module_and_type.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/list_fields_by_module_and_type.py
@@ -40,6 +40,6 @@ def main():
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/listFieldsByModuleAndType.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/listFieldsByModuleAndType.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/list_fields_by_type.py b/sdk/automation/azure-mgmt-automation/generated_samples/list_fields_by_type.py
index c08fd26e49c9..a79f515f110d 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/list_fields_by_type.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/list_fields_by_type.py
@@ -39,6 +39,6 @@ def main():
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/listFieldsByType.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/listFieldsByType.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/list_hybrid_runbook_worker.py b/sdk/automation/azure-mgmt-automation/generated_samples/list_hybrid_runbook_worker.py
index ab9ab368fe26..59cd3a5227eb 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/list_hybrid_runbook_worker.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/list_hybrid_runbook_worker.py
@@ -39,6 +39,6 @@ def main():
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/listHybridRunbookWorker.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/listHybridRunbookWorker.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/list_hybrid_runbook_worker_group.py b/sdk/automation/azure-mgmt-automation/generated_samples/list_hybrid_runbook_worker_group.py
index d6a80f6593e5..ec69480a2337 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/list_hybrid_runbook_worker_group.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/list_hybrid_runbook_worker_group.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/listHybridRunbookWorkerGroup.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/listHybridRunbookWorkerGroup.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/list_modules_by_automation_account.py b/sdk/automation/azure-mgmt-automation/generated_samples/list_modules_by_automation_account.py
index c77c0ab6fe8f..28ae01b17bf3 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/list_modules_by_automation_account.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/list_modules_by_automation_account.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/listModulesByAutomationAccount.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/listModulesByAutomationAccount.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/list_paged_dsc_node_configuration_counts.py b/sdk/automation/azure-mgmt-automation/generated_samples/list_paged_dsc_node_configuration_counts.py
index 7f4bd7e2d624..aececd355aeb 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/list_paged_dsc_node_configuration_counts.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/list_paged_dsc_node_configuration_counts.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listPagedDscNodeConfigurationCounts.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/listPagedDscNodeConfigurationCounts.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/list_paged_dsc_node_configurations_with_name_filter.py b/sdk/automation/azure-mgmt-automation/generated_samples/list_paged_dsc_node_configurations_with_name_filter.py
index 802a5bf0f740..f80ad2e38981 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/list_paged_dsc_node_configurations_with_name_filter.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/list_paged_dsc_node_configurations_with_name_filter.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/listPagedDscNodeConfigurationsWithNameFilter.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/listPagedDscNodeConfigurationsWithNameFilter.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/list_paged_dsc_node_configurations_with_no_filter.py b/sdk/automation/azure-mgmt-automation/generated_samples/list_paged_dsc_node_configurations_with_no_filter.py
index 5b2a1dd08c1a..ecec5c983a25 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/list_paged_dsc_node_configurations_with_no_filter.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/list_paged_dsc_node_configurations_with_no_filter.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/listPagedDscNodeConfigurationsWithNoFilter.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/listPagedDscNodeConfigurationsWithNoFilter.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/list_paged_dsc_node_reports_by_node.py b/sdk/automation/azure-mgmt-automation/generated_samples/list_paged_dsc_node_reports_by_node.py
index 661384c40b96..9cf751feff0f 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/list_paged_dsc_node_reports_by_node.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/list_paged_dsc_node_reports_by_node.py
@@ -39,6 +39,6 @@ def main():
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listPagedDscNodeReportsByNode.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/listPagedDscNodeReportsByNode.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/list_paged_dsc_node_status_counts.py b/sdk/automation/azure-mgmt-automation/generated_samples/list_paged_dsc_node_status_counts.py
index 1a0ba7cbcf85..d8e7af4ed572 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/list_paged_dsc_node_status_counts.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/list_paged_dsc_node_status_counts.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listPagedDscNodeStatusCounts.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/listPagedDscNodeStatusCounts.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/list_paged_dsc_nodes_by_automation_account_with_composite_filter.py b/sdk/automation/azure-mgmt-automation/generated_samples/list_paged_dsc_nodes_by_automation_account_with_composite_filter.py
index 4ec9eedbd300..d2956806c8c2 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/list_paged_dsc_nodes_by_automation_account_with_composite_filter.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/list_paged_dsc_nodes_by_automation_account_with_composite_filter.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listPagedDscNodesByAutomationAccountWithCompositeFilter.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/listPagedDscNodesByAutomationAccountWithCompositeFilter.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/list_paged_dsc_nodes_by_automation_account_with_name_filter.py b/sdk/automation/azure-mgmt-automation/generated_samples/list_paged_dsc_nodes_by_automation_account_with_name_filter.py
index e962db24a88e..e316bd6ad688 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/list_paged_dsc_nodes_by_automation_account_with_name_filter.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/list_paged_dsc_nodes_by_automation_account_with_name_filter.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listPagedDscNodesByAutomationAccountWithNameFilter.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/listPagedDscNodesByAutomationAccountWithNameFilter.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/list_paged_dsc_nodes_by_automation_account_with_no_filter.py b/sdk/automation/azure-mgmt-automation/generated_samples/list_paged_dsc_nodes_by_automation_account_with_no_filter.py
index c2e508e489d2..9f2260bccf68 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/list_paged_dsc_nodes_by_automation_account_with_no_filter.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/list_paged_dsc_nodes_by_automation_account_with_no_filter.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listPagedDscNodesByAutomationAccountWithNoFilter.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/listPagedDscNodesByAutomationAccountWithNoFilter.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/list_paged_dsc_nodes_by_automation_account_with_node_configuration_custom_filter.py b/sdk/automation/azure-mgmt-automation/generated_samples/list_paged_dsc_nodes_by_automation_account_with_node_configuration_custom_filter.py
index 53da5b881cf8..4701c69a1deb 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/list_paged_dsc_nodes_by_automation_account_with_node_configuration_custom_filter.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/list_paged_dsc_nodes_by_automation_account_with_node_configuration_custom_filter.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listPagedDscNodesByAutomationAccountWithNodeConfigurationCustomFilter.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/listPagedDscNodesByAutomationAccountWithNodeConfigurationCustomFilter.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/list_paged_dsc_nodes_by_automation_account_with_node_configuration_not_assigned_filter.py b/sdk/automation/azure-mgmt-automation/generated_samples/list_paged_dsc_nodes_by_automation_account_with_node_configuration_not_assigned_filter.py
index 9456fcda2be3..b5065d692319 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/list_paged_dsc_nodes_by_automation_account_with_node_configuration_not_assigned_filter.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/list_paged_dsc_nodes_by_automation_account_with_node_configuration_not_assigned_filter.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listPagedDscNodesByAutomationAccountWithNodeConfigurationNotAssignedFilter.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/listPagedDscNodesByAutomationAccountWithNodeConfigurationNotAssignedFilter.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/list_paged_dsc_nodes_by_automation_account_with_status_filter.py b/sdk/automation/azure-mgmt-automation/generated_samples/list_paged_dsc_nodes_by_automation_account_with_status_filter.py
index e048cf4cfac0..ce9e309a7e22 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/list_paged_dsc_nodes_by_automation_account_with_status_filter.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/list_paged_dsc_nodes_by_automation_account_with_status_filter.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listPagedDscNodesByAutomationAccountWithStatusFilter.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/listPagedDscNodesByAutomationAccountWithStatusFilter.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/list_paged_dsc_nodes_by_automation_account_with_version_filter.py b/sdk/automation/azure-mgmt-automation/generated_samples/list_paged_dsc_nodes_by_automation_account_with_version_filter.py
index fe2822958fed..79170feb2614 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/list_paged_dsc_nodes_by_automation_account_with_version_filter.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/list_paged_dsc_nodes_by_automation_account_with_version_filter.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listPagedDscNodesByAutomationAccountWithVersionFilter.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/listPagedDscNodesByAutomationAccountWithVersionFilter.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/list_python2_packages_by_automation_account.py b/sdk/automation/azure-mgmt-automation/generated_samples/list_python2_packages_by_automation_account.py
index 89b6c30d141b..41d4d375dd56 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/list_python2_packages_by_automation_account.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/list_python2_packages_by_automation_account.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/listPython2PackagesByAutomationAccount.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/listPython2PackagesByAutomationAccount.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/list_python3_packages_by_automation_account.py b/sdk/automation/azure-mgmt-automation/generated_samples/list_python3_packages_by_automation_account.py
index 83bae23c3d21..f9f89f5aa1a0 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/list_python3_packages_by_automation_account.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/list_python3_packages_by_automation_account.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/listPython3PackagesByAutomationAccount.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/listPython3PackagesByAutomationAccount.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/list_rest_api_operations.py b/sdk/automation/azure-mgmt-automation/generated_samples/list_rest_api_operations.py
index 101fedcf2f46..72e9b70c4ba0 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/list_rest_api_operations.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/list_rest_api_operations.py
@@ -35,6 +35,6 @@ def main():
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/listRestAPIOperations.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/listRestAPIOperations.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/list_schedules_by_automation_account_first100.py b/sdk/automation/azure-mgmt-automation/generated_samples/list_schedules_by_automation_account_first100.py
index f3bf7c7b5753..e1e9fcbe3c8c 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/list_schedules_by_automation_account_first100.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/list_schedules_by_automation_account_first100.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/listSchedulesByAutomationAccount_First100.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/listSchedulesByAutomationAccount_First100.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/list_schedules_by_automation_account_next100.py b/sdk/automation/azure-mgmt-automation/generated_samples/list_schedules_by_automation_account_next100.py
index b445264ef04e..999fc5ea9d4b 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/list_schedules_by_automation_account_next100.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/list_schedules_by_automation_account_next100.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/listSchedulesByAutomationAccount_Next100.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/listSchedulesByAutomationAccount_Next100.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/list_variables_first100.py b/sdk/automation/azure-mgmt-automation/generated_samples/list_variables_first100.py
index 939d797553c0..2a1efa55b761 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/list_variables_first100.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/list_variables_first100.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/listVariables_First100.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/listVariables_First100.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/list_variables_next100.py b/sdk/automation/azure-mgmt-automation/generated_samples/list_variables_next100.py
index 3eff82dd7952..d377c3f00f19 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/list_variables_next100.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/list_variables_next100.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/listVariables_Next100.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/listVariables_Next100.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/list_watchers_by_automation_account.py b/sdk/automation/azure-mgmt-automation/generated_samples/list_watchers_by_automation_account.py
index 875b9f5aad88..2f26052bd1de 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/list_watchers_by_automation_account.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/list_watchers_by_automation_account.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listWatchersByAutomationAccount.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/listWatchersByAutomationAccount.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/list_webhooks_by_automation_account.py b/sdk/automation/azure-mgmt-automation/generated_samples/list_webhooks_by_automation_account.py
index aeba21f7af44..c356b93da05c 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/list_webhooks_by_automation_account.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/list_webhooks_by_automation_account.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2015-10-31/examples/listWebhooksByAutomationAccount.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/listWebhooksByAutomationAccount.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/package/create_or_update_package.py b/sdk/automation/azure-mgmt-automation/generated_samples/package/create_or_update_package.py
new file mode 100644
index 000000000000..572a3ea01dd4
--- /dev/null
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/package/create_or_update_package.py
@@ -0,0 +1,55 @@
+# 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.automation import AutomationClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-automation
+# USAGE
+ python create_or_update_package.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 = AutomationClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="subid",
+ )
+
+ response = client.package.create_or_update(
+ resource_group_name="rg",
+ automation_account_name="myAutomationAccount33",
+ runtime_environment_name="runtimeEnvironmentName",
+ package_name="OmsCompositeResources",
+ parameters={
+ "properties": {
+ "contentLink": {
+ "contentHash": {
+ "algorithm": "sha265",
+ "value": "07E108A962B81DD9C9BAA89BB47C0F6EE52B29E83758B07795E408D258B2B87A",
+ },
+ "uri": "https://teststorage.blob.core.windows.net/dsccomposite/OmsCompositeResources.zip",
+ }
+ }
+ },
+ )
+ print(response)
+
+
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/package/createOrUpdatePackage.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/compilation_job_stream_list.py b/sdk/automation/azure-mgmt-automation/generated_samples/package/delete_package.py
similarity index 83%
rename from sdk/automation/azure-mgmt-automation/generated_samples/compilation_job_stream_list.py
rename to sdk/automation/azure-mgmt-automation/generated_samples/package/delete_package.py
index 69fac35af76b..c0f7a5cb26a9 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/compilation_job_stream_list.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/package/delete_package.py
@@ -15,7 +15,7 @@
pip install azure-identity
pip install azure-mgmt-automation
# USAGE
- python compilation_job_stream_list.py
+ python delete_package.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,
@@ -30,14 +30,14 @@ def main():
subscription_id="subid",
)
- response = client.dsc_compilation_job_stream.list_by_job(
+ client.package.delete(
resource_group_name="rg",
automation_account_name="myAutomationAccount33",
- job_id="836d4e06-2d88-46b4-8500-7febd4906838",
+ runtime_environment_name="runtimeEnvironmentName",
+ package_name="OmsCompositeResources",
)
- print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/compilationJobStreamList.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/package/deletePackage.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/get_compilation_job.py b/sdk/automation/azure-mgmt-automation/generated_samples/package/get_package.py
similarity index 85%
rename from sdk/automation/azure-mgmt-automation/generated_samples/get_compilation_job.py
rename to sdk/automation/azure-mgmt-automation/generated_samples/package/get_package.py
index 825278c23f5a..985270c6fa8b 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/get_compilation_job.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/package/get_package.py
@@ -15,7 +15,7 @@
pip install azure-identity
pip install azure-mgmt-automation
# USAGE
- python get_compilation_job.py
+ python get_package.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,
@@ -30,14 +30,15 @@ def main():
subscription_id="subid",
)
- response = client.dsc_compilation_job.get(
+ response = client.package.get(
resource_group_name="rg",
automation_account_name="myAutomationAccount33",
- compilation_job_name="TestCompilationJob",
+ runtime_environment_name="runtimeEnvironmentName",
+ package_name="OmsCompositeResources",
)
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/getCompilationJob.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/package/getPackage.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/list_compilation_jobs_by_automation_account.py b/sdk/automation/azure-mgmt-automation/generated_samples/package/list_packages_by_runtime_environment.py
similarity index 84%
rename from sdk/automation/azure-mgmt-automation/generated_samples/list_compilation_jobs_by_automation_account.py
rename to sdk/automation/azure-mgmt-automation/generated_samples/package/list_packages_by_runtime_environment.py
index 2f888903c6fd..6f543cf1665f 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/list_compilation_jobs_by_automation_account.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/package/list_packages_by_runtime_environment.py
@@ -15,7 +15,7 @@
pip install azure-identity
pip install azure-mgmt-automation
# USAGE
- python list_compilation_jobs_by_automation_account.py
+ python list_packages_by_runtime_environment.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,
@@ -30,14 +30,15 @@ def main():
subscription_id="subid",
)
- response = client.dsc_compilation_job.list_by_automation_account(
+ response = client.package.list_by_runtime_environment(
resource_group_name="rg",
automation_account_name="myAutomationAccount33",
+ runtime_environment_name="runtimeEnvironmentName",
)
for item in response:
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/listCompilationJobsByAutomationAccount.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/package/listPackagesByRuntimeEnvironment.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/package/update_package.py b/sdk/automation/azure-mgmt-automation/generated_samples/package/update_package.py
new file mode 100644
index 000000000000..cbf80d3d05e3
--- /dev/null
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/package/update_package.py
@@ -0,0 +1,55 @@
+# 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.automation import AutomationClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-automation
+# USAGE
+ python update_package.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 = AutomationClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="subid",
+ )
+
+ response = client.package.update(
+ resource_group_name="rg",
+ automation_account_name="MyAutomationAccount",
+ runtime_environment_name="runtimeEnvironmentName",
+ package_name="OmsCompositeResources",
+ parameters={
+ "properties": {
+ "contentLink": {
+ "contentHash": {
+ "algorithm": "sha265",
+ "value": "07E108A962B81DD9C9BAA89BB47C0F6EE52B29E83758B07795E408D258B2B87A",
+ },
+ "uri": "https://teststorage.blob.core.windows.net/mycontainer/MyModule.zip",
+ }
+ }
+ },
+ )
+ print(response)
+
+
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/package/updatePackage.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/create_compilation_job.py b/sdk/automation/azure-mgmt-automation/generated_samples/patch_hybrid_runbook_worker.py
similarity index 77%
rename from sdk/automation/azure-mgmt-automation/generated_samples/create_compilation_job.py
rename to sdk/automation/azure-mgmt-automation/generated_samples/patch_hybrid_runbook_worker.py
index b8e496c696e9..20125b65f7cc 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/create_compilation_job.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/patch_hybrid_runbook_worker.py
@@ -15,7 +15,7 @@
pip install azure-identity
pip install azure-mgmt-automation
# USAGE
- python create_compilation_job.py
+ python patch_hybrid_runbook_worker.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,
@@ -30,15 +30,15 @@ def main():
subscription_id="subid",
)
- response = client.dsc_compilation_job.begin_create(
+ response = client.hybrid_runbook_workers.patch(
resource_group_name="rg",
- automation_account_name="myAutomationAccount33",
- compilation_job_name="TestCompilationJob",
- parameters={"properties": {"configuration": {"name": "SetupServer"}}},
- ).result()
+ automation_account_name="testaccount",
+ hybrid_runbook_worker_group_name="TestHybridGroup",
+ hybrid_runbook_worker_id="c010ad12-ef14-4a2a-aa9e-ef22c4745ddd",
+ )
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/createCompilationJob.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/patchHybridRunbookWorker.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/private_endpoint_connection_delete.py b/sdk/automation/azure-mgmt-automation/generated_samples/private_endpoint_connection/private_endpoint_connection_delete.py
similarity index 90%
rename from sdk/automation/azure-mgmt-automation/generated_samples/private_endpoint_connection_delete.py
rename to sdk/automation/azure-mgmt-automation/generated_samples/private_endpoint_connection/private_endpoint_connection_delete.py
index c5d94257f205..3b592e64a739 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/private_endpoint_connection_delete.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/private_endpoint_connection/private_endpoint_connection_delete.py
@@ -32,11 +32,11 @@ def main():
client.private_endpoint_connections.begin_delete(
resource_group_name="rg1",
- automation_account_name="ddb1",
+ automation_account_name="automationAccountName",
private_endpoint_connection_name="privateEndpointConnectionName",
).result()
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/PrivateEndpointConnectionDelete.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/privateEndpointConnection/PrivateEndpointConnectionDelete.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/private_endpoint_connection_get.py b/sdk/automation/azure-mgmt-automation/generated_samples/private_endpoint_connection/private_endpoint_connection_get.py
similarity index 90%
rename from sdk/automation/azure-mgmt-automation/generated_samples/private_endpoint_connection_get.py
rename to sdk/automation/azure-mgmt-automation/generated_samples/private_endpoint_connection/private_endpoint_connection_get.py
index 3a187bf89a0b..9201d45d5a46 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/private_endpoint_connection_get.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/private_endpoint_connection/private_endpoint_connection_get.py
@@ -32,12 +32,12 @@ def main():
response = client.private_endpoint_connections.get(
resource_group_name="rg1",
- automation_account_name="ddb1",
+ automation_account_name="automationAccountName",
private_endpoint_connection_name="privateEndpointConnectionName",
)
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/PrivateEndpointConnectionGet.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/privateEndpointConnection/PrivateEndpointConnectionGet.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/private_endpoint_connection_list_get.py b/sdk/automation/azure-mgmt-automation/generated_samples/private_endpoint_connection/private_endpoint_connection_list_get.py
similarity index 89%
rename from sdk/automation/azure-mgmt-automation/generated_samples/private_endpoint_connection_list_get.py
rename to sdk/automation/azure-mgmt-automation/generated_samples/private_endpoint_connection/private_endpoint_connection_list_get.py
index 85ea3a55fd8d..9e7b8478baba 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/private_endpoint_connection_list_get.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/private_endpoint_connection/private_endpoint_connection_list_get.py
@@ -32,12 +32,12 @@ def main():
response = client.private_endpoint_connections.list_by_automation_account(
resource_group_name="rg1",
- automation_account_name="ddb1",
+ automation_account_name="automationAccountName",
)
for item in response:
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/PrivateEndpointConnectionListGet.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/privateEndpointConnection/PrivateEndpointConnectionListGet.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/private_endpoint_connection_update.py b/sdk/automation/azure-mgmt-automation/generated_samples/private_endpoint_connection/private_endpoint_connection_update.py
similarity index 91%
rename from sdk/automation/azure-mgmt-automation/generated_samples/private_endpoint_connection_update.py
rename to sdk/automation/azure-mgmt-automation/generated_samples/private_endpoint_connection/private_endpoint_connection_update.py
index 9f21bc166882..ba3e76b86f70 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/private_endpoint_connection_update.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/private_endpoint_connection/private_endpoint_connection_update.py
@@ -32,7 +32,7 @@ def main():
response = client.private_endpoint_connections.begin_create_or_update(
resource_group_name="rg1",
- automation_account_name="ddb1",
+ automation_account_name="automationAccountName",
private_endpoint_connection_name="privateEndpointConnectionName",
parameters={
"properties": {
@@ -46,6 +46,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/PrivateEndpointConnectionUpdate.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/privateEndpointConnection/PrivateEndpointConnectionUpdate.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/private_link_resource_list_get.py b/sdk/automation/azure-mgmt-automation/generated_samples/private_link_resource_list_get.py
index 13292b098f19..1fa131e089d2 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/private_link_resource_list_get.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/private_link_resource_list_get.py
@@ -27,17 +27,17 @@
def main():
client = AutomationClient(
credential=DefaultAzureCredential(),
- subscription_id="00000000-1111-2222-3333-444444444444",
+ subscription_id="subid",
)
response = client.private_link_resources.automation(
resource_group_name="rg1",
- automation_account_name="ddb1",
+ automation_account_name="testaccount",
)
for item in response:
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/PrivateLinkResourceListGet.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/PrivateLinkResourceListGet.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/regenerate_agent_registration_key.py b/sdk/automation/azure-mgmt-automation/generated_samples/regenerate_agent_registration_key.py
index 56eda5a2fae1..17fbfdb8e6e8 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/regenerate_agent_registration_key.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/regenerate_agent_registration_key.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/regenerateAgentRegistrationKey.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/regenerateAgentRegistrationKey.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_runbook.py b/sdk/automation/azure-mgmt-automation/generated_samples/runbook/create_or_update_runbook.py
similarity index 92%
rename from sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_runbook.py
rename to sdk/automation/azure-mgmt-automation/generated_samples/runbook/create_or_update_runbook.py
index 0dd495e8c95a..b365c7f77c0f 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_runbook.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/runbook/create_or_update_runbook.py
@@ -49,7 +49,8 @@ def main():
},
"uri": "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-automation-runbook-getvms/Runbooks/Get-AzureVMTutorial.ps1",
},
- "runbookType": "PowerShellWorkflow",
+ "runbookType": "PowerShell",
+ "runtimeEnvironment": "environmentName",
},
"tags": {"tag01": "value01", "tag02": "value02"},
},
@@ -57,6 +58,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/createOrUpdateRunbook.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/runbook/createOrUpdateRunbook.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/create_runbook_as_draft.py b/sdk/automation/azure-mgmt-automation/generated_samples/runbook/create_runbook_as_draft.py
similarity index 91%
rename from sdk/automation/azure-mgmt-automation/generated_samples/create_runbook_as_draft.py
rename to sdk/automation/azure-mgmt-automation/generated_samples/runbook/create_runbook_as_draft.py
index 124279b78ff8..925246953ea6 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/create_runbook_as_draft.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/runbook/create_runbook_as_draft.py
@@ -42,7 +42,8 @@ def main():
"draft": {},
"logProgress": False,
"logVerbose": False,
- "runbookType": "PowerShellWorkflow",
+ "runbookType": "PowerShell",
+ "runtimeEnvironment": "environmentName",
},
"tags": {"tag01": "value01", "tag02": "value02"},
},
@@ -50,6 +51,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/createRunbookAsDraft.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/runbook/createRunbookAsDraft.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/create_test_job.py b/sdk/automation/azure-mgmt-automation/generated_samples/runbook/create_test_job.py
similarity index 85%
rename from sdk/automation/azure-mgmt-automation/generated_samples/create_test_job.py
rename to sdk/automation/azure-mgmt-automation/generated_samples/runbook/create_test_job.py
index 7a1a2ef8cc52..1a5b5fa8c712 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/create_test_job.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/runbook/create_test_job.py
@@ -34,11 +34,15 @@ def main():
resource_group_name="mygroup",
automation_account_name="ContoseAutomationAccount",
runbook_name="Get-AzureVMTutorial",
- parameters={"parameters": {"key01": "value01", "key02": "value02"}, "runOn": ""},
+ parameters={
+ "parameters": {"key01": "value01", "key02": "value02"},
+ "runOn": "",
+ "runtimeEnvironment": "runtimeEnvironmentName",
+ },
)
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/createTestJob.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/runbook/createTestJob.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/delete_runbook.py b/sdk/automation/azure-mgmt-automation/generated_samples/runbook/delete_runbook.py
similarity index 95%
rename from sdk/automation/azure-mgmt-automation/generated_samples/delete_runbook.py
rename to sdk/automation/azure-mgmt-automation/generated_samples/runbook/delete_runbook.py
index 7f7417137c03..8879180355b7 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/delete_runbook.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/runbook/delete_runbook.py
@@ -37,6 +37,6 @@ def main():
)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/deleteRunbook.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/runbook/deleteRunbook.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/get_runbook.py b/sdk/automation/azure-mgmt-automation/generated_samples/runbook/get_runbook.py
similarity index 95%
rename from sdk/automation/azure-mgmt-automation/generated_samples/get_runbook.py
rename to sdk/automation/azure-mgmt-automation/generated_samples/runbook/get_runbook.py
index 59b66b934cc0..d5e18e813fa0 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/get_runbook.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/runbook/get_runbook.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/getRunbook.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/runbook/getRunbook.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/get_runbook_content.py b/sdk/automation/azure-mgmt-automation/generated_samples/runbook/get_runbook_content.py
similarity index 95%
rename from sdk/automation/azure-mgmt-automation/generated_samples/get_runbook_content.py
rename to sdk/automation/azure-mgmt-automation/generated_samples/runbook/get_runbook_content.py
index 59d7c00d708d..6e77b2f319e9 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/get_runbook_content.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/runbook/get_runbook_content.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/getRunbookContent.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/runbook/getRunbookContent.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/get_runbook_draft.py b/sdk/automation/azure-mgmt-automation/generated_samples/runbook/get_runbook_draft.py
similarity index 95%
rename from sdk/automation/azure-mgmt-automation/generated_samples/get_runbook_draft.py
rename to sdk/automation/azure-mgmt-automation/generated_samples/runbook/get_runbook_draft.py
index ecf87d437745..a101783f3609 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/get_runbook_draft.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/runbook/get_runbook_draft.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/getRunbookDraft.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/runbook/getRunbookDraft.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/get_runbook_draft_content.py b/sdk/automation/azure-mgmt-automation/generated_samples/runbook/get_runbook_draft_content.py
similarity index 94%
rename from sdk/automation/azure-mgmt-automation/generated_samples/get_runbook_draft_content.py
rename to sdk/automation/azure-mgmt-automation/generated_samples/runbook/get_runbook_draft_content.py
index b62afb4e4f73..4e525ff25808 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/get_runbook_draft_content.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/runbook/get_runbook_draft_content.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/getRunbookDraftContent.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/runbook/getRunbookDraftContent.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/get_test_job.py b/sdk/automation/azure-mgmt-automation/generated_samples/runbook/get_test_job.py
similarity index 95%
rename from sdk/automation/azure-mgmt-automation/generated_samples/get_test_job.py
rename to sdk/automation/azure-mgmt-automation/generated_samples/runbook/get_test_job.py
index 9df0b8082a8a..23d82cc9c012 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/get_test_job.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/runbook/get_test_job.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/getTestJob.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/runbook/getTestJob.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/get_test_job_stream.py b/sdk/automation/azure-mgmt-automation/generated_samples/runbook/get_test_job_stream.py
similarity index 95%
rename from sdk/automation/azure-mgmt-automation/generated_samples/get_test_job_stream.py
rename to sdk/automation/azure-mgmt-automation/generated_samples/runbook/get_test_job_stream.py
index bd9942ebb29e..146239486498 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/get_test_job_stream.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/runbook/get_test_job_stream.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/getTestJobStream.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/runbook/getTestJobStream.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/list_runbooks_by_automation_account.py b/sdk/automation/azure-mgmt-automation/generated_samples/runbook/list_runbooks_by_automation_account.py
similarity index 94%
rename from sdk/automation/azure-mgmt-automation/generated_samples/list_runbooks_by_automation_account.py
rename to sdk/automation/azure-mgmt-automation/generated_samples/runbook/list_runbooks_by_automation_account.py
index 29b4e1ff8865..41b16fc1a0bd 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/list_runbooks_by_automation_account.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/runbook/list_runbooks_by_automation_account.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/listRunbooksByAutomationAccount.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/runbook/listRunbooksByAutomationAccount.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/list_test_job_streams_by_job.py b/sdk/automation/azure-mgmt-automation/generated_samples/runbook/list_test_job_streams_by_job.py
similarity index 94%
rename from sdk/automation/azure-mgmt-automation/generated_samples/list_test_job_streams_by_job.py
rename to sdk/automation/azure-mgmt-automation/generated_samples/runbook/list_test_job_streams_by_job.py
index 0d5656b9bb0e..47a435c24ab7 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/list_test_job_streams_by_job.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/runbook/list_test_job_streams_by_job.py
@@ -39,6 +39,6 @@ def main():
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/listTestJobStreamsByJob.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/runbook/listTestJobStreamsByJob.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/publish_runbook.py b/sdk/automation/azure-mgmt-automation/generated_samples/runbook/publish_runbook.py
similarity index 95%
rename from sdk/automation/azure-mgmt-automation/generated_samples/publish_runbook.py
rename to sdk/automation/azure-mgmt-automation/generated_samples/runbook/publish_runbook.py
index 973e4a547b29..a0d7243ec2e1 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/publish_runbook.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/runbook/publish_runbook.py
@@ -37,6 +37,6 @@ def main():
).result()
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/publishRunbook.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/runbook/publishRunbook.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/replace_runbook_draft_content.py b/sdk/automation/azure-mgmt-automation/generated_samples/runbook/replace_runbook_draft_content.py
similarity index 96%
rename from sdk/automation/azure-mgmt-automation/generated_samples/replace_runbook_draft_content.py
rename to sdk/automation/azure-mgmt-automation/generated_samples/runbook/replace_runbook_draft_content.py
index 5da3ec9fad43..2673acaeb4a1 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/replace_runbook_draft_content.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/runbook/replace_runbook_draft_content.py
@@ -35,7 +35,7 @@ def main():
automation_account_name="ContoseAutomationAccount",
runbook_name="Get-AzureVMTutorial",
runbook_content="""<#
- .DESCRIPTION
+ .DESCRIPTION
An example runbook which prints out the first10 Azure VMs in your subscription (ordered alphabetically).
For more information about how this runbook authenticates to your Azure subscription, see our documentation here: http: //aka.ms/fxu3mn
@@ -78,6 +78,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/replaceRunbookDraftContent.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/runbook/replaceRunbookDraftContent.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/resume_test_job.py b/sdk/automation/azure-mgmt-automation/generated_samples/runbook/resume_test_job.py
similarity index 95%
rename from sdk/automation/azure-mgmt-automation/generated_samples/resume_test_job.py
rename to sdk/automation/azure-mgmt-automation/generated_samples/runbook/resume_test_job.py
index bb6a97f7a025..b09edfcdc48b 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/resume_test_job.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/runbook/resume_test_job.py
@@ -37,6 +37,6 @@ def main():
)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/resumeTestJob.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/runbook/resumeTestJob.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/stop_test_job.py b/sdk/automation/azure-mgmt-automation/generated_samples/runbook/stop_test_job.py
similarity index 95%
rename from sdk/automation/azure-mgmt-automation/generated_samples/stop_test_job.py
rename to sdk/automation/azure-mgmt-automation/generated_samples/runbook/stop_test_job.py
index 158d9a00f06d..5c376de06982 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/stop_test_job.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/runbook/stop_test_job.py
@@ -37,6 +37,6 @@ def main():
)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/stopTestJob.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/runbook/stopTestJob.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/suspend_test_job.py b/sdk/automation/azure-mgmt-automation/generated_samples/runbook/suspend_test_job.py
similarity index 95%
rename from sdk/automation/azure-mgmt-automation/generated_samples/suspend_test_job.py
rename to sdk/automation/azure-mgmt-automation/generated_samples/runbook/suspend_test_job.py
index ed9117b25f55..3b1492afea3a 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/suspend_test_job.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/runbook/suspend_test_job.py
@@ -37,6 +37,6 @@ def main():
)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/suspendTestJob.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/runbook/suspendTestJob.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/undo_draft_edit_to_last_known_published_state.py b/sdk/automation/azure-mgmt-automation/generated_samples/runbook/undo_draft_edit_to_last_known_published_state.py
similarity index 93%
rename from sdk/automation/azure-mgmt-automation/generated_samples/undo_draft_edit_to_last_known_published_state.py
rename to sdk/automation/azure-mgmt-automation/generated_samples/runbook/undo_draft_edit_to_last_known_published_state.py
index fc1d4816a700..a90df4dd0fe1 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/undo_draft_edit_to_last_known_published_state.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/runbook/undo_draft_edit_to_last_known_published_state.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/undoDraftEditToLastKnownPublishedState.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/runbook/undoDraftEditToLastKnownPublishedState.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/update_runbook.py b/sdk/automation/azure-mgmt-automation/generated_samples/runbook/update_runbook.py
similarity index 95%
rename from sdk/automation/azure-mgmt-automation/generated_samples/update_runbook.py
rename to sdk/automation/azure-mgmt-automation/generated_samples/runbook/update_runbook.py
index 751924e59c1a..7449082bd3ae 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/update_runbook.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/runbook/update_runbook.py
@@ -46,6 +46,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/updateRunbook.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/runbook/updateRunbook.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/compilation_job_stream_by_job_stream_id.py b/sdk/automation/azure-mgmt-automation/generated_samples/runtime_environment/create_runtime_environment.py
similarity index 72%
rename from sdk/automation/azure-mgmt-automation/generated_samples/compilation_job_stream_by_job_stream_id.py
rename to sdk/automation/azure-mgmt-automation/generated_samples/runtime_environment/create_runtime_environment.py
index 0370d2121cfc..4599d84da920 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/compilation_job_stream_by_job_stream_id.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/runtime_environment/create_runtime_environment.py
@@ -15,7 +15,7 @@
pip install azure-identity
pip install azure-mgmt-automation
# USAGE
- python compilation_job_stream_by_job_stream_id.py
+ python create_runtime_environment.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,
@@ -30,15 +30,18 @@ def main():
subscription_id="subid",
)
- response = client.dsc_compilation_job.get_stream(
+ response = client.runtime_environments.create(
resource_group_name="rg",
- automation_account_name="myAutomationAccount33",
- job_id="836d4e06-2d88-46b4-8500-7febd4906838",
- job_stream_id="836d4e06-2d88-46b4-8500-7febd4906838_00636481062421684835_00000000000000000008",
+ automation_account_name="myAutomationAccount9",
+ runtime_environment_name="myRuntimeEnvironmentName",
+ parameters={
+ "location": "East US 2",
+ "properties": {"defaultPackages": {"Az": "8.3.0"}, "runtime": {"language": "PowerShell", "version": "7.1"}},
+ },
)
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/compilationJobStreamByJobStreamId.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/runtimeEnvironment/createRuntimeEnvironment.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/runtime_environment/delete_runtime_environment.py b/sdk/automation/azure-mgmt-automation/generated_samples/runtime_environment/delete_runtime_environment.py
new file mode 100644
index 000000000000..13e6d9bd7989
--- /dev/null
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/runtime_environment/delete_runtime_environment.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.automation import AutomationClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-automation
+# USAGE
+ python delete_runtime_environment.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 = AutomationClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="subid",
+ )
+
+ client.runtime_environments.delete(
+ resource_group_name="rg",
+ automation_account_name="myAutomationAccount9",
+ runtime_environment_name="myRuntimeEnvironmentName",
+ )
+
+
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/runtimeEnvironment/deleteRuntimeEnvironment.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/runtime_environment/get_runtime_environment.py b/sdk/automation/azure-mgmt-automation/generated_samples/runtime_environment/get_runtime_environment.py
new file mode 100644
index 000000000000..c6d2852cfd68
--- /dev/null
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/runtime_environment/get_runtime_environment.py
@@ -0,0 +1,43 @@
+# 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.automation import AutomationClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-automation
+# USAGE
+ python get_runtime_environment.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 = AutomationClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="subid",
+ )
+
+ response = client.runtime_environments.get(
+ resource_group_name="rg",
+ automation_account_name="myAutomationAccount9",
+ runtime_environment_name="myRuntimeEnvironmentName",
+ )
+ print(response)
+
+
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/runtimeEnvironment/getRuntimeEnvironment.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/runtime_environment/list_runtime_environments_by_automation_account.py b/sdk/automation/azure-mgmt-automation/generated_samples/runtime_environment/list_runtime_environments_by_automation_account.py
new file mode 100644
index 000000000000..087ad9de4681
--- /dev/null
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/runtime_environment/list_runtime_environments_by_automation_account.py
@@ -0,0 +1,43 @@
+# 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.automation import AutomationClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-automation
+# USAGE
+ python list_runtime_environments_by_automation_account.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 = AutomationClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="subid",
+ )
+
+ response = client.runtime_environments.list_by_automation_account(
+ resource_group_name="rg",
+ automation_account_name="ContoseAutomationAccount",
+ )
+ for item in response:
+ print(item)
+
+
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/runtimeEnvironment/listRuntimeEnvironmentsByAutomationAccount.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/runtime_environment/update_runtime_environment.py b/sdk/automation/azure-mgmt-automation/generated_samples/runtime_environment/update_runtime_environment.py
new file mode 100644
index 000000000000..58a69e972070
--- /dev/null
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/runtime_environment/update_runtime_environment.py
@@ -0,0 +1,44 @@
+# 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.automation import AutomationClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-automation
+# USAGE
+ python update_runtime_environment.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 = AutomationClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="subid",
+ )
+
+ response = client.runtime_environments.update(
+ resource_group_name="rg",
+ automation_account_name="myAutomationAccount9",
+ runtime_environment_name="myRuntimeEnvironmentName",
+ parameters={"properties": {"defaultPackages": {"Az": "8.3.0"}}},
+ )
+ print(response)
+
+
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/runtimeEnvironment/updateRuntimeEnvironment.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/serialize_graph_runbook_content.py b/sdk/automation/azure-mgmt-automation/generated_samples/serialize_graph_runbook_content.py
index 222ab365c372..03b713713fbf 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/serialize_graph_runbook_content.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/serialize_graph_runbook_content.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/serializeGraphRunbookContent.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/serializeGraphRunbookContent.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/software_update_configuration/create_software_update_configuration.py b/sdk/automation/azure-mgmt-automation/generated_samples/software_update_configuration/create_software_update_configuration.py
index 1a608daf41d9..6799db3d5c99 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/software_update_configuration/create_software_update_configuration.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/software_update_configuration/create_software_update_configuration.py
@@ -91,6 +91,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/softwareUpdateConfiguration/createSoftwareUpdateConfiguration.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/softwareUpdateConfiguration/createSoftwareUpdateConfiguration.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/software_update_configuration/delete_software_update_configuration.py b/sdk/automation/azure-mgmt-automation/generated_samples/software_update_configuration/delete_software_update_configuration.py
index 4860444270ac..fc9d452dc8e5 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/software_update_configuration/delete_software_update_configuration.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/software_update_configuration/delete_software_update_configuration.py
@@ -37,6 +37,6 @@ def main():
)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/softwareUpdateConfiguration/deleteSoftwareUpdateConfiguration.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/softwareUpdateConfiguration/deleteSoftwareUpdateConfiguration.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/software_update_configuration/get_software_update_configuration_by_name.py b/sdk/automation/azure-mgmt-automation/generated_samples/software_update_configuration/get_software_update_configuration_by_name.py
index 70bbcd54b012..a62fc3d30c76 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/software_update_configuration/get_software_update_configuration_by_name.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/software_update_configuration/get_software_update_configuration_by_name.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/softwareUpdateConfiguration/getSoftwareUpdateConfigurationByName.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/softwareUpdateConfiguration/getSoftwareUpdateConfigurationByName.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/software_update_configuration/list_software_update_configurations.py b/sdk/automation/azure-mgmt-automation/generated_samples/software_update_configuration/list_software_update_configurations.py
index fe1173dad307..3aab0abd9c97 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/software_update_configuration/list_software_update_configurations.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/software_update_configuration/list_software_update_configurations.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/softwareUpdateConfiguration/listSoftwareUpdateConfigurations.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/softwareUpdateConfiguration/listSoftwareUpdateConfigurations.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/software_update_configuration/list_software_update_configurations_by_vm.py b/sdk/automation/azure-mgmt-automation/generated_samples/software_update_configuration/list_software_update_configurations_by_vm.py
index 0b62afe1a129..df85bab1c720 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/software_update_configuration/list_software_update_configurations_by_vm.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/software_update_configuration/list_software_update_configurations_by_vm.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/examples/softwareUpdateConfiguration/listSoftwareUpdateConfigurationsByVm.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/softwareUpdateConfiguration/listSoftwareUpdateConfigurationsByVm.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/software_update_configuration_machine_run/get_software_update_configuration_machine_run_by_id.py b/sdk/automation/azure-mgmt-automation/generated_samples/software_update_configuration_machine_run/get_software_update_configuration_machine_run_by_id.py
index 10be30ba1c57..0cfff0eb4f24 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/software_update_configuration_machine_run/get_software_update_configuration_machine_run_by_id.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/software_update_configuration_machine_run/get_software_update_configuration_machine_run_by_id.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/softwareUpdateConfigurationMachineRun/getSoftwareUpdateConfigurationMachineRunById.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/softwareUpdateConfigurationMachineRun/getSoftwareUpdateConfigurationMachineRunById.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/software_update_configuration_machine_run/list_software_update_configuration_machine_runs.py b/sdk/automation/azure-mgmt-automation/generated_samples/software_update_configuration_machine_run/list_software_update_configuration_machine_runs.py
index 0a5b1be28b81..57d2633a62af 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/software_update_configuration_machine_run/list_software_update_configuration_machine_runs.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/software_update_configuration_machine_run/list_software_update_configuration_machine_runs.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/softwareUpdateConfigurationMachineRun/listSoftwareUpdateConfigurationMachineRuns.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/softwareUpdateConfigurationMachineRun/listSoftwareUpdateConfigurationMachineRuns.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/software_update_configuration_machine_run/list_software_update_configuration_machine_runs_by_run.py b/sdk/automation/azure-mgmt-automation/generated_samples/software_update_configuration_machine_run/list_software_update_configuration_machine_runs_by_run.py
index df3ecdfebadb..4427ad11ee27 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/software_update_configuration_machine_run/list_software_update_configuration_machine_runs_by_run.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/software_update_configuration_machine_run/list_software_update_configuration_machine_runs_by_run.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/softwareUpdateConfigurationMachineRun/listSoftwareUpdateConfigurationMachineRunsByRun.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/softwareUpdateConfigurationMachineRun/listSoftwareUpdateConfigurationMachineRunsByRun.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/software_update_configuration_run/get_software_update_configuration_run_by_id.py b/sdk/automation/azure-mgmt-automation/generated_samples/software_update_configuration_run/get_software_update_configuration_run_by_id.py
index 8f0d22504e1c..7d08d2526d6b 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/software_update_configuration_run/get_software_update_configuration_run_by_id.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/software_update_configuration_run/get_software_update_configuration_run_by_id.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/softwareUpdateConfigurationRun/getSoftwareUpdateConfigurationRunById.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/softwareUpdateConfigurationRun/getSoftwareUpdateConfigurationRunById.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/software_update_configuration_run/list_failed_software_update_configuration_runs.py b/sdk/automation/azure-mgmt-automation/generated_samples/software_update_configuration_run/list_failed_software_update_configuration_runs.py
index e56ef71fd25c..180d8d2f8825 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/software_update_configuration_run/list_failed_software_update_configuration_runs.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/software_update_configuration_run/list_failed_software_update_configuration_runs.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/softwareUpdateConfigurationRun/listFailedSoftwareUpdateConfigurationRuns.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/softwareUpdateConfigurationRun/listFailedSoftwareUpdateConfigurationRuns.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/software_update_configuration_run/list_software_update_configuration_runs.py b/sdk/automation/azure-mgmt-automation/generated_samples/software_update_configuration_run/list_software_update_configuration_runs.py
index fdf7df941e06..3fa86ae33b4e 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/software_update_configuration_run/list_software_update_configuration_runs.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/software_update_configuration_run/list_software_update_configuration_runs.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/softwareUpdateConfigurationRun/listSoftwareUpdateConfigurationRuns.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/softwareUpdateConfigurationRun/listSoftwareUpdateConfigurationRuns.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/source_control/create_or_update_source_control.py b/sdk/automation/azure-mgmt-automation/generated_samples/source_control/create_or_update_source_control.py
index 61c04091108c..ae7fedbaac41 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/source_control/create_or_update_source_control.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/source_control/create_or_update_source_control.py
@@ -50,6 +50,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/sourceControl/createOrUpdateSourceControl.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/sourceControl/createOrUpdateSourceControl.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/source_control/delete_source_control.py b/sdk/automation/azure-mgmt-automation/generated_samples/source_control/delete_source_control.py
index 22be9405d9dd..ebd38e2281a6 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/source_control/delete_source_control.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/source_control/delete_source_control.py
@@ -37,6 +37,6 @@ def main():
)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/sourceControl/deleteSourceControl.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/sourceControl/deleteSourceControl.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/source_control/get_all_source_controls.py b/sdk/automation/azure-mgmt-automation/generated_samples/source_control/get_all_source_controls.py
index 359d3c5ce389..4e31792e5d23 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/source_control/get_all_source_controls.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/source_control/get_all_source_controls.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/sourceControl/getAllSourceControls.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/sourceControl/getAllSourceControls.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/source_control/get_source_control.py b/sdk/automation/azure-mgmt-automation/generated_samples/source_control/get_source_control.py
index 070c9fd71d20..37896753d358 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/source_control/get_source_control.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/source_control/get_source_control.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/sourceControl/getSourceControl.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/sourceControl/getSourceControl.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/source_control/update_source_control_patch.py b/sdk/automation/azure-mgmt-automation/generated_samples/source_control/update_source_control_patch.py
index d34218b9e6f4..f2f729971eb1 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/source_control/update_source_control_patch.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/source_control/update_source_control_patch.py
@@ -48,6 +48,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/sourceControl/updateSourceControl_patch.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/sourceControl/updateSourceControl_patch.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/source_control_sync_job/create_source_control_sync_job.py b/sdk/automation/azure-mgmt-automation/generated_samples/source_control_sync_job/create_source_control_sync_job.py
index f7c35d05bc10..06732b61d747 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/source_control_sync_job/create_source_control_sync_job.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/source_control_sync_job/create_source_control_sync_job.py
@@ -40,6 +40,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/sourceControlSyncJob/createSourceControlSyncJob.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/sourceControlSyncJob/createSourceControlSyncJob.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/source_control_sync_job/get_all_source_control_sync_jobs.py b/sdk/automation/azure-mgmt-automation/generated_samples/source_control_sync_job/get_all_source_control_sync_jobs.py
index 1e059f06a789..af1f8a04b4a3 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/source_control_sync_job/get_all_source_control_sync_jobs.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/source_control_sync_job/get_all_source_control_sync_jobs.py
@@ -39,6 +39,6 @@ def main():
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/sourceControlSyncJob/getAllSourceControlSyncJobs.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/sourceControlSyncJob/getAllSourceControlSyncJobs.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/source_control_sync_job/get_source_control_sync_job.py b/sdk/automation/azure-mgmt-automation/generated_samples/source_control_sync_job/get_source_control_sync_job.py
index 3f5e5f23f14c..20b3ef107126 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/source_control_sync_job/get_source_control_sync_job.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/source_control_sync_job/get_source_control_sync_job.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/sourceControlSyncJob/getSourceControlSyncJob.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/sourceControlSyncJob/getSourceControlSyncJob.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/source_control_sync_job_streams/get_source_control_sync_job_streams.py b/sdk/automation/azure-mgmt-automation/generated_samples/source_control_sync_job_streams/get_source_control_sync_job_streams.py
index bb1e987f19c2..389a2ec76c49 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/source_control_sync_job_streams/get_source_control_sync_job_streams.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/source_control_sync_job_streams/get_source_control_sync_job_streams.py
@@ -40,6 +40,6 @@ def main():
print(item)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/sourceControlSyncJobStreams/getSourceControlSyncJobStreams.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/sourceControlSyncJobStreams/getSourceControlSyncJobStreams.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/source_control_sync_job_streams/get_source_control_sync_job_streams_by_stream_id.py b/sdk/automation/azure-mgmt-automation/generated_samples/source_control_sync_job_streams/get_source_control_sync_job_streams_by_stream_id.py
index 780b444b46fe..05496f6650b7 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/source_control_sync_job_streams/get_source_control_sync_job_streams_by_stream_id.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/source_control_sync_job_streams/get_source_control_sync_job_streams_by_stream_id.py
@@ -40,6 +40,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/sourceControlSyncJobStreams/getSourceControlSyncJobStreamsByStreamId.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/sourceControlSyncJobStreams/getSourceControlSyncJobStreamsByStreamId.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/start_watcher.py b/sdk/automation/azure-mgmt-automation/generated_samples/start_watcher.py
index 1a3e21177d58..a5d17f065be6 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/start_watcher.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/start_watcher.py
@@ -37,6 +37,6 @@ def main():
)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/startWatcher.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/startWatcher.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/stop_watcher.py b/sdk/automation/azure-mgmt-automation/generated_samples/stop_watcher.py
index ae4333efca6f..ee9d62607c92 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/stop_watcher.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/stop_watcher.py
@@ -37,6 +37,6 @@ def main():
)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/stopWatcher.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/stopWatcher.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/update_automation_account.py b/sdk/automation/azure-mgmt-automation/generated_samples/update_automation_account.py
index 114151f2625e..739129430ec8 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/update_automation_account.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/update_automation_account.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/updateAutomationAccount.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/updateAutomationAccount.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/update_certificate.py b/sdk/automation/azure-mgmt-automation/generated_samples/update_certificate.py
index 3e0ce7ca415f..443a48146432 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/update_certificate.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/update_certificate.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/updateCertificate.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/updateCertificate.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/update_connection.py b/sdk/automation/azure-mgmt-automation/generated_samples/update_connection.py
index bfa3d4743350..cd118f9327c2 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/update_connection.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/update_connection.py
@@ -48,6 +48,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/updateConnection.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/updateConnection.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/update_credential_patch.py b/sdk/automation/azure-mgmt-automation/generated_samples/update_credential_patch.py
index 56d40d8b4906..90b971914daf 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/update_credential_patch.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/update_credential_patch.py
@@ -46,6 +46,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/updateCredential_patch.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/updateCredential_patch.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/update_dsc_configuration.py b/sdk/automation/azure-mgmt-automation/generated_samples/update_dsc_configuration.py
index f7a24077b27e..244a80abb54e 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/update_dsc_configuration.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/update_dsc_configuration.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/updateDscConfiguration.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/updateDscConfiguration.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/update_dsc_node.py b/sdk/automation/azure-mgmt-automation/generated_samples/update_dsc_node.py
index c7b099834651..6dfb6579da80 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/update_dsc_node.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/update_dsc_node.py
@@ -42,6 +42,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/updateDscNode.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/updateDscNode.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/update_module.py b/sdk/automation/azure-mgmt-automation/generated_samples/update_module.py
index a7bdc4aad44c..8b713ec75b49 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/update_module.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/update_module.py
@@ -50,6 +50,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/updateModule.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/updateModule.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/update_python2_package.py b/sdk/automation/azure-mgmt-automation/generated_samples/update_python2_package.py
index a4a3ea98fd67..82fc9631681b 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/update_python2_package.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/update_python2_package.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/updatePython2Package.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/updatePython2Package.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/update_python3_package.py b/sdk/automation/azure-mgmt-automation/generated_samples/update_python3_package.py
index 256145744f3f..3897bce1eda3 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/update_python3_package.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/update_python3_package.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/updatePython3Package.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/updatePython3Package.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/update_schedule.py b/sdk/automation/azure-mgmt-automation/generated_samples/update_schedule.py
index 38c74a101cac..ee61f678c90f 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/update_schedule.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/update_schedule.py
@@ -42,6 +42,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/updateSchedule.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/updateSchedule.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/update_variable_patch.py b/sdk/automation/azure-mgmt-automation/generated_samples/update_variable_patch.py
index 8ea86d4d0c6b..8925ea2e0722 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/update_variable_patch.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/update_variable_patch.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2022-08-08/examples/updateVariable_patch.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/updateVariable_patch.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/update_watcher.py b/sdk/automation/azure-mgmt-automation/generated_samples/update_watcher.py
index f752cf3666f8..eec98bae497b 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/update_watcher.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/update_watcher.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/preview/2020-01-13-preview/examples/updateWatcher.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/updateWatcher.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/update_webhook.py b/sdk/automation/azure-mgmt-automation/generated_samples/update_webhook.py
index 9554b836849a..ab549b3f08ff 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/update_webhook.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/update_webhook.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2015-10-31/examples/updateWebhook.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/updateWebhook.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/webhook_generate_uri.py b/sdk/automation/azure-mgmt-automation/generated_samples/webhook_generate_uri.py
index 625199184011..66cf7045156e 100644
--- a/sdk/automation/azure-mgmt-automation/generated_samples/webhook_generate_uri.py
+++ b/sdk/automation/azure-mgmt-automation/generated_samples/webhook_generate_uri.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2015-10-31/examples/webhookGenerateUri.json
+# x-ms-original-file: specification/automation/resource-manager/Microsoft.Automation/stable/2024-10-23/examples/webhookGenerateUri.json
if __name__ == "__main__":
main()
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/conftest.py b/sdk/automation/azure-mgmt-automation/generated_tests/conftest.py
index 1b401bd0756c..36f067926275 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/conftest.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/conftest.py
@@ -18,7 +18,7 @@
load_dotenv()
-# aovid record sensitive identity information in recordings
+# For security, please avoid record sensitive identity information in recordings
@pytest.fixture(scope="session", autouse=True)
def add_sanitizers(test_proxy):
automation_subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000")
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation.py
index 156f486b72ef..80aebf05752c 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation.py
@@ -28,7 +28,7 @@ def test_convert_graph_runbook_content(self, resource_group):
"graphRunbookJson": "str",
"rawContent": {"runbookDefinition": "str", "runbookType": "str", "schemaVersion": "str"},
},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_activity_operations.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_activity_operations.py
index 90dc45d7ecc9..d7849dfe148c 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_activity_operations.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_activity_operations.py
@@ -20,13 +20,13 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_activity_get(self, resource_group):
response = self.client.activity.get(
resource_group_name=resource_group.name,
automation_account_name="str",
module_name="str",
activity_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -34,12 +34,12 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_by_module(self, resource_group):
+ def test_activity_list_by_module(self, resource_group):
response = self.client.activity.list_by_module(
resource_group_name=resource_group.name,
automation_account_name="str",
module_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_activity_operations_async.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_activity_operations_async.py
index e7f250cc6fc7..30b32a5e6f91 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_activity_operations_async.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_activity_operations_async.py
@@ -21,13 +21,13 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_activity_get(self, resource_group):
response = await self.client.activity.get(
resource_group_name=resource_group.name,
automation_account_name="str",
module_name="str",
activity_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -35,12 +35,12 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_by_module(self, resource_group):
+ async def test_activity_list_by_module(self, resource_group):
response = self.client.activity.list_by_module(
resource_group_name=resource_group.name,
automation_account_name="str",
module_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r async for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_agent_registration_information_operations.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_agent_registration_information_operations.py
index dcfc1c6c2ba9..60765f8d05bf 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_agent_registration_information_operations.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_agent_registration_information_operations.py
@@ -20,11 +20,11 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_agent_registration_information_get(self, resource_group):
response = self.client.agent_registration_information.get(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2020-01-13-preview",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -32,12 +32,12 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_regenerate_key(self, resource_group):
+ def test_agent_registration_information_regenerate_key(self, resource_group):
response = self.client.agent_registration_information.regenerate_key(
resource_group_name=resource_group.name,
automation_account_name="str",
parameters={"keyName": "str"},
- api_version="2020-01-13-preview",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_agent_registration_information_operations_async.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_agent_registration_information_operations_async.py
index 069b167f661c..b5be5fd4cd87 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_agent_registration_information_operations_async.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_agent_registration_information_operations_async.py
@@ -21,11 +21,11 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_agent_registration_information_get(self, resource_group):
response = await self.client.agent_registration_information.get(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2020-01-13-preview",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -33,12 +33,12 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_regenerate_key(self, resource_group):
+ async def test_agent_registration_information_regenerate_key(self, resource_group):
response = await self.client.agent_registration_information.regenerate_key(
resource_group_name=resource_group.name,
automation_account_name="str",
parameters={"keyName": "str"},
- api_version="2020-01-13-preview",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_async.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_async.py
index 0a606eff6fb8..535e4ac2bbad 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_async.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_async.py
@@ -29,7 +29,7 @@ async def test_convert_graph_runbook_content(self, resource_group):
"graphRunbookJson": "str",
"rawContent": {"runbookDefinition": "str", "runbookType": "str", "schemaVersion": "str"},
},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_automation_account_operations.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_automation_account_operations.py
index 826e87b5b82c..af6f7a23bc17 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_automation_account_operations.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_automation_account_operations.py
@@ -20,7 +20,7 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_update(self, resource_group):
+ def test_automation_account_update(self, resource_group):
response = self.client.automation_account.update(
resource_group_name=resource_group.name,
automation_account_name="str",
@@ -43,7 +43,7 @@ def test_update(self, resource_group):
"sku": {"name": "str", "capacity": 0, "family": "str"},
"tags": {"str": "str"},
},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -51,7 +51,7 @@ def test_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_create_or_update(self, resource_group):
+ def test_automation_account_create_or_update(self, resource_group):
response = self.client.automation_account.create_or_update(
resource_group_name=resource_group.name,
automation_account_name="str",
@@ -74,7 +74,7 @@ def test_create_or_update(self, resource_group):
"sku": {"name": "str", "capacity": 0, "family": "str"},
"tags": {"str": "str"},
},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -82,11 +82,11 @@ def test_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_delete(self, resource_group):
+ def test_automation_account_delete(self, resource_group):
response = self.client.automation_account.delete(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -94,11 +94,11 @@ def test_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_automation_account_get(self, resource_group):
response = self.client.automation_account.get(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -106,10 +106,10 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_by_resource_group(self, resource_group):
+ def test_automation_account_list_by_resource_group(self, resource_group):
response = self.client.automation_account.list_by_resource_group(
resource_group_name=resource_group.name,
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r for r in response]
# please add some check logic here by yourself
@@ -117,9 +117,21 @@ def test_list_by_resource_group(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list(self, resource_group):
+ def test_automation_account_list(self, resource_group):
response = self.client.automation_account.list(
- api_version="2022-08-08",
+ api_version="2024-10-23",
+ )
+ result = [r for r in response]
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy
+ def test_automation_account_list_deleted_runbooks(self, resource_group):
+ response = self.client.automation_account.list_deleted_runbooks(
+ resource_group_name=resource_group.name,
+ automation_account_name="str",
+ api_version="2024-10-23",
)
result = [r for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_automation_account_operations_async.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_automation_account_operations_async.py
index 5aaa5efc4db4..e8ad8f47c664 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_automation_account_operations_async.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_automation_account_operations_async.py
@@ -21,7 +21,7 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_update(self, resource_group):
+ async def test_automation_account_update(self, resource_group):
response = await self.client.automation_account.update(
resource_group_name=resource_group.name,
automation_account_name="str",
@@ -44,7 +44,7 @@ async def test_update(self, resource_group):
"sku": {"name": "str", "capacity": 0, "family": "str"},
"tags": {"str": "str"},
},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -52,7 +52,7 @@ async def test_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_create_or_update(self, resource_group):
+ async def test_automation_account_create_or_update(self, resource_group):
response = await self.client.automation_account.create_or_update(
resource_group_name=resource_group.name,
automation_account_name="str",
@@ -75,7 +75,7 @@ async def test_create_or_update(self, resource_group):
"sku": {"name": "str", "capacity": 0, "family": "str"},
"tags": {"str": "str"},
},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -83,11 +83,11 @@ async def test_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_delete(self, resource_group):
+ async def test_automation_account_delete(self, resource_group):
response = await self.client.automation_account.delete(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -95,11 +95,11 @@ async def test_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_automation_account_get(self, resource_group):
response = await self.client.automation_account.get(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -107,10 +107,10 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_by_resource_group(self, resource_group):
+ async def test_automation_account_list_by_resource_group(self, resource_group):
response = self.client.automation_account.list_by_resource_group(
resource_group_name=resource_group.name,
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r async for r in response]
# please add some check logic here by yourself
@@ -118,9 +118,21 @@ async def test_list_by_resource_group(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list(self, resource_group):
+ async def test_automation_account_list(self, resource_group):
response = self.client.automation_account.list(
- api_version="2022-08-08",
+ api_version="2024-10-23",
+ )
+ result = [r async for r in response]
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy_async
+ async def test_automation_account_list_deleted_runbooks(self, resource_group):
+ response = self.client.automation_account.list_deleted_runbooks(
+ resource_group_name=resource_group.name,
+ automation_account_name="str",
+ api_version="2024-10-23",
)
result = [r async for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_certificate_operations.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_certificate_operations.py
index 8ccbd8d220c2..4a29c77dfaf1 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_certificate_operations.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_certificate_operations.py
@@ -20,12 +20,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_delete(self, resource_group):
+ def test_certificate_delete(self, resource_group):
response = self.client.certificate.delete(
resource_group_name=resource_group.name,
automation_account_name="str",
certificate_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -33,12 +33,12 @@ def test_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_certificate_get(self, resource_group):
response = self.client.certificate.get(
resource_group_name=resource_group.name,
automation_account_name="str",
certificate_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -46,7 +46,7 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_create_or_update(self, resource_group):
+ def test_certificate_create_or_update(self, resource_group):
response = self.client.certificate.create_or_update(
resource_group_name=resource_group.name,
automation_account_name="str",
@@ -58,7 +58,7 @@ def test_create_or_update(self, resource_group):
"isExportable": bool,
"thumbprint": "str",
},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -66,13 +66,13 @@ def test_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_update(self, resource_group):
+ def test_certificate_update(self, resource_group):
response = self.client.certificate.update(
resource_group_name=resource_group.name,
automation_account_name="str",
certificate_name="str",
parameters={"description": "str", "name": "str"},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -80,11 +80,11 @@ def test_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_by_automation_account(self, resource_group):
+ def test_certificate_list_by_automation_account(self, resource_group):
response = self.client.certificate.list_by_automation_account(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_certificate_operations_async.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_certificate_operations_async.py
index e57bad9afa3f..65fec34e9db5 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_certificate_operations_async.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_certificate_operations_async.py
@@ -21,12 +21,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_delete(self, resource_group):
+ async def test_certificate_delete(self, resource_group):
response = await self.client.certificate.delete(
resource_group_name=resource_group.name,
automation_account_name="str",
certificate_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -34,12 +34,12 @@ async def test_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_certificate_get(self, resource_group):
response = await self.client.certificate.get(
resource_group_name=resource_group.name,
automation_account_name="str",
certificate_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -47,7 +47,7 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_create_or_update(self, resource_group):
+ async def test_certificate_create_or_update(self, resource_group):
response = await self.client.certificate.create_or_update(
resource_group_name=resource_group.name,
automation_account_name="str",
@@ -59,7 +59,7 @@ async def test_create_or_update(self, resource_group):
"isExportable": bool,
"thumbprint": "str",
},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -67,13 +67,13 @@ async def test_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_update(self, resource_group):
+ async def test_certificate_update(self, resource_group):
response = await self.client.certificate.update(
resource_group_name=resource_group.name,
automation_account_name="str",
certificate_name="str",
parameters={"description": "str", "name": "str"},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -81,11 +81,11 @@ async def test_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_by_automation_account(self, resource_group):
+ async def test_certificate_list_by_automation_account(self, resource_group):
response = self.client.certificate.list_by_automation_account(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r async for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_connection_operations.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_connection_operations.py
index 26c4ed542bd0..9395cde89b35 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_connection_operations.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_connection_operations.py
@@ -20,12 +20,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_delete(self, resource_group):
+ def test_connection_delete(self, resource_group):
response = self.client.connection.delete(
resource_group_name=resource_group.name,
automation_account_name="str",
connection_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -33,12 +33,12 @@ def test_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_connection_get(self, resource_group):
response = self.client.connection.get(
resource_group_name=resource_group.name,
automation_account_name="str",
connection_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -46,7 +46,7 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_create_or_update(self, resource_group):
+ def test_connection_create_or_update(self, resource_group):
response = self.client.connection.create_or_update(
resource_group_name=resource_group.name,
automation_account_name="str",
@@ -57,7 +57,7 @@ def test_create_or_update(self, resource_group):
"description": "str",
"fieldDefinitionValues": {"str": "str"},
},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -65,13 +65,13 @@ def test_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_update(self, resource_group):
+ def test_connection_update(self, resource_group):
response = self.client.connection.update(
resource_group_name=resource_group.name,
automation_account_name="str",
connection_name="str",
parameters={"description": "str", "fieldDefinitionValues": {"str": "str"}, "name": "str"},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -79,11 +79,11 @@ def test_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_by_automation_account(self, resource_group):
+ def test_connection_list_by_automation_account(self, resource_group):
response = self.client.connection.list_by_automation_account(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_connection_operations_async.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_connection_operations_async.py
index 962e672ba755..e14c82d57685 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_connection_operations_async.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_connection_operations_async.py
@@ -21,12 +21,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_delete(self, resource_group):
+ async def test_connection_delete(self, resource_group):
response = await self.client.connection.delete(
resource_group_name=resource_group.name,
automation_account_name="str",
connection_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -34,12 +34,12 @@ async def test_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_connection_get(self, resource_group):
response = await self.client.connection.get(
resource_group_name=resource_group.name,
automation_account_name="str",
connection_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -47,7 +47,7 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_create_or_update(self, resource_group):
+ async def test_connection_create_or_update(self, resource_group):
response = await self.client.connection.create_or_update(
resource_group_name=resource_group.name,
automation_account_name="str",
@@ -58,7 +58,7 @@ async def test_create_or_update(self, resource_group):
"description": "str",
"fieldDefinitionValues": {"str": "str"},
},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -66,13 +66,13 @@ async def test_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_update(self, resource_group):
+ async def test_connection_update(self, resource_group):
response = await self.client.connection.update(
resource_group_name=resource_group.name,
automation_account_name="str",
connection_name="str",
parameters={"description": "str", "fieldDefinitionValues": {"str": "str"}, "name": "str"},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -80,11 +80,11 @@ async def test_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_by_automation_account(self, resource_group):
+ async def test_connection_list_by_automation_account(self, resource_group):
response = self.client.connection.list_by_automation_account(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r async for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_connection_type_operations.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_connection_type_operations.py
index 3000097da240..938f6f56fc24 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_connection_type_operations.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_connection_type_operations.py
@@ -20,12 +20,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_delete(self, resource_group):
+ def test_connection_type_delete(self, resource_group):
response = self.client.connection_type.delete(
resource_group_name=resource_group.name,
automation_account_name="str",
connection_type_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -33,12 +33,12 @@ def test_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_connection_type_get(self, resource_group):
response = self.client.connection_type.get(
resource_group_name=resource_group.name,
automation_account_name="str",
connection_type_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -46,7 +46,7 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_create_or_update(self, resource_group):
+ def test_connection_type_create_or_update(self, resource_group):
response = self.client.connection_type.create_or_update(
resource_group_name=resource_group.name,
automation_account_name="str",
@@ -56,7 +56,7 @@ def test_create_or_update(self, resource_group):
"name": "str",
"isGlobal": bool,
},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -64,11 +64,11 @@ def test_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_by_automation_account(self, resource_group):
+ def test_connection_type_list_by_automation_account(self, resource_group):
response = self.client.connection_type.list_by_automation_account(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_connection_type_operations_async.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_connection_type_operations_async.py
index 60f6c4e88229..175c488ded0a 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_connection_type_operations_async.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_connection_type_operations_async.py
@@ -21,12 +21,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_delete(self, resource_group):
+ async def test_connection_type_delete(self, resource_group):
response = await self.client.connection_type.delete(
resource_group_name=resource_group.name,
automation_account_name="str",
connection_type_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -34,12 +34,12 @@ async def test_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_connection_type_get(self, resource_group):
response = await self.client.connection_type.get(
resource_group_name=resource_group.name,
automation_account_name="str",
connection_type_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -47,7 +47,7 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_create_or_update(self, resource_group):
+ async def test_connection_type_create_or_update(self, resource_group):
response = await self.client.connection_type.create_or_update(
resource_group_name=resource_group.name,
automation_account_name="str",
@@ -57,7 +57,7 @@ async def test_create_or_update(self, resource_group):
"name": "str",
"isGlobal": bool,
},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -65,11 +65,11 @@ async def test_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_by_automation_account(self, resource_group):
+ async def test_connection_type_list_by_automation_account(self, resource_group):
response = self.client.connection_type.list_by_automation_account(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r async for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_credential_operations.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_credential_operations.py
index 1b3141fb9d9f..4b0da9cf8b41 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_credential_operations.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_credential_operations.py
@@ -20,12 +20,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_delete(self, resource_group):
+ def test_credential_delete(self, resource_group):
response = self.client.credential.delete(
resource_group_name=resource_group.name,
automation_account_name="str",
credential_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -33,12 +33,12 @@ def test_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_credential_get(self, resource_group):
response = self.client.credential.get(
resource_group_name=resource_group.name,
automation_account_name="str",
credential_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -46,13 +46,13 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_create_or_update(self, resource_group):
+ def test_credential_create_or_update(self, resource_group):
response = self.client.credential.create_or_update(
resource_group_name=resource_group.name,
automation_account_name="str",
credential_name="str",
parameters={"name": "str", "password": "str", "userName": "str", "description": "str"},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -60,13 +60,13 @@ def test_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_update(self, resource_group):
+ def test_credential_update(self, resource_group):
response = self.client.credential.update(
resource_group_name=resource_group.name,
automation_account_name="str",
credential_name="str",
parameters={"description": "str", "name": "str", "password": "str", "userName": "str"},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -74,11 +74,11 @@ def test_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_by_automation_account(self, resource_group):
+ def test_credential_list_by_automation_account(self, resource_group):
response = self.client.credential.list_by_automation_account(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_credential_operations_async.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_credential_operations_async.py
index 52cc29ac7b39..bd06c1e1f573 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_credential_operations_async.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_credential_operations_async.py
@@ -21,12 +21,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_delete(self, resource_group):
+ async def test_credential_delete(self, resource_group):
response = await self.client.credential.delete(
resource_group_name=resource_group.name,
automation_account_name="str",
credential_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -34,12 +34,12 @@ async def test_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_credential_get(self, resource_group):
response = await self.client.credential.get(
resource_group_name=resource_group.name,
automation_account_name="str",
credential_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -47,13 +47,13 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_create_or_update(self, resource_group):
+ async def test_credential_create_or_update(self, resource_group):
response = await self.client.credential.create_or_update(
resource_group_name=resource_group.name,
automation_account_name="str",
credential_name="str",
parameters={"name": "str", "password": "str", "userName": "str", "description": "str"},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -61,13 +61,13 @@ async def test_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_update(self, resource_group):
+ async def test_credential_update(self, resource_group):
response = await self.client.credential.update(
resource_group_name=resource_group.name,
automation_account_name="str",
credential_name="str",
parameters={"description": "str", "name": "str", "password": "str", "userName": "str"},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -75,11 +75,11 @@ async def test_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_by_automation_account(self, resource_group):
+ async def test_credential_list_by_automation_account(self, resource_group):
response = self.client.credential.list_by_automation_account(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r async for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_deleted_automation_accounts_operations.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_deleted_automation_accounts_operations.py
index 42183b89a940..a4fed3d5084c 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_deleted_automation_accounts_operations.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_deleted_automation_accounts_operations.py
@@ -20,9 +20,9 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_by_subscription(self, resource_group):
+ def test_deleted_automation_accounts_list_by_subscription(self, resource_group):
response = self.client.deleted_automation_accounts.list_by_subscription(
- api_version="2022-01-31",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_deleted_automation_accounts_operations_async.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_deleted_automation_accounts_operations_async.py
index 1e4611aaf6f4..e721727aa864 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_deleted_automation_accounts_operations_async.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_deleted_automation_accounts_operations_async.py
@@ -21,9 +21,9 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_by_subscription(self, resource_group):
+ async def test_deleted_automation_accounts_list_by_subscription(self, resource_group):
response = await self.client.deleted_automation_accounts.list_by_subscription(
- api_version="2022-01-31",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_dsc_configuration_operations.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_dsc_configuration_operations.py
index d6d88071242a..0b2cb9a90c55 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_dsc_configuration_operations.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_dsc_configuration_operations.py
@@ -20,12 +20,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_delete(self, resource_group):
+ def test_dsc_configuration_delete(self, resource_group):
response = self.client.dsc_configuration.delete(
resource_group_name=resource_group.name,
automation_account_name="str",
configuration_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -33,12 +33,12 @@ def test_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_dsc_configuration_get(self, resource_group):
response = self.client.dsc_configuration.get(
resource_group_name=resource_group.name,
automation_account_name="str",
configuration_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -46,7 +46,7 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_create_or_update(self, resource_group):
+ def test_dsc_configuration_create_or_update(self, resource_group):
response = self.client.dsc_configuration.create_or_update(
resource_group_name=resource_group.name,
automation_account_name="str",
@@ -66,7 +66,7 @@ def test_create_or_update(self, resource_group):
"parameters": {"str": {"defaultValue": "str", "isMandatory": bool, "position": 0, "type": "str"}},
"tags": {"str": "str"},
},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -74,12 +74,12 @@ def test_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_update(self, resource_group):
+ def test_dsc_configuration_update(self, resource_group):
response = self.client.dsc_configuration.update(
resource_group_name=resource_group.name,
automation_account_name="str",
configuration_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -87,12 +87,12 @@ def test_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get_content(self, resource_group):
+ def test_dsc_configuration_get_content(self, resource_group):
response = self.client.dsc_configuration.get_content(
resource_group_name=resource_group.name,
automation_account_name="str",
configuration_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -100,11 +100,11 @@ def test_get_content(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_by_automation_account(self, resource_group):
+ def test_dsc_configuration_list_by_automation_account(self, resource_group):
response = self.client.dsc_configuration.list_by_automation_account(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_dsc_configuration_operations_async.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_dsc_configuration_operations_async.py
index 24340c9332d5..2f3765b671a5 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_dsc_configuration_operations_async.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_dsc_configuration_operations_async.py
@@ -21,12 +21,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_delete(self, resource_group):
+ async def test_dsc_configuration_delete(self, resource_group):
response = await self.client.dsc_configuration.delete(
resource_group_name=resource_group.name,
automation_account_name="str",
configuration_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -34,12 +34,12 @@ async def test_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_dsc_configuration_get(self, resource_group):
response = await self.client.dsc_configuration.get(
resource_group_name=resource_group.name,
automation_account_name="str",
configuration_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -47,7 +47,7 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_create_or_update(self, resource_group):
+ async def test_dsc_configuration_create_or_update(self, resource_group):
response = await self.client.dsc_configuration.create_or_update(
resource_group_name=resource_group.name,
automation_account_name="str",
@@ -67,7 +67,7 @@ async def test_create_or_update(self, resource_group):
"parameters": {"str": {"defaultValue": "str", "isMandatory": bool, "position": 0, "type": "str"}},
"tags": {"str": "str"},
},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -75,12 +75,12 @@ async def test_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_update(self, resource_group):
+ async def test_dsc_configuration_update(self, resource_group):
response = await self.client.dsc_configuration.update(
resource_group_name=resource_group.name,
automation_account_name="str",
configuration_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -88,12 +88,12 @@ async def test_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get_content(self, resource_group):
+ async def test_dsc_configuration_get_content(self, resource_group):
response = await self.client.dsc_configuration.get_content(
resource_group_name=resource_group.name,
automation_account_name="str",
configuration_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -101,11 +101,11 @@ async def test_get_content(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_by_automation_account(self, resource_group):
+ async def test_dsc_configuration_list_by_automation_account(self, resource_group):
response = self.client.dsc_configuration.list_by_automation_account(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r async for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_dsc_node_configuration_operations.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_dsc_node_configuration_operations.py
index 361d17ae9f61..0390b42df59f 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_dsc_node_configuration_operations.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_dsc_node_configuration_operations.py
@@ -20,12 +20,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_delete(self, resource_group):
+ def test_dsc_node_configuration_delete(self, resource_group):
response = self.client.dsc_node_configuration.delete(
resource_group_name=resource_group.name,
automation_account_name="str",
node_configuration_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -33,12 +33,12 @@ def test_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_dsc_node_configuration_get(self, resource_group):
response = self.client.dsc_node_configuration.get(
resource_group_name=resource_group.name,
automation_account_name="str",
node_configuration_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -46,7 +46,7 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_create_or_update(self, resource_group):
+ def test_dsc_node_configuration_begin_create_or_update(self, resource_group):
response = self.client.dsc_node_configuration.begin_create_or_update(
resource_group_name=resource_group.name,
automation_account_name="str",
@@ -63,7 +63,7 @@ def test_begin_create_or_update(self, resource_group):
},
"tags": {"str": "str"},
},
- api_version="2022-08-08",
+ api_version="2024-10-23",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -71,11 +71,11 @@ def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_by_automation_account(self, resource_group):
+ def test_dsc_node_configuration_list_by_automation_account(self, resource_group):
response = self.client.dsc_node_configuration.list_by_automation_account(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_dsc_node_configuration_operations_async.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_dsc_node_configuration_operations_async.py
index f11525edd403..1d688f19036b 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_dsc_node_configuration_operations_async.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_dsc_node_configuration_operations_async.py
@@ -21,12 +21,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_delete(self, resource_group):
+ async def test_dsc_node_configuration_delete(self, resource_group):
response = await self.client.dsc_node_configuration.delete(
resource_group_name=resource_group.name,
automation_account_name="str",
node_configuration_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -34,12 +34,12 @@ async def test_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_dsc_node_configuration_get(self, resource_group):
response = await self.client.dsc_node_configuration.get(
resource_group_name=resource_group.name,
automation_account_name="str",
node_configuration_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -47,7 +47,7 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_create_or_update(self, resource_group):
+ async def test_dsc_node_configuration_begin_create_or_update(self, resource_group):
response = await (
await self.client.dsc_node_configuration.begin_create_or_update(
resource_group_name=resource_group.name,
@@ -65,7 +65,7 @@ async def test_begin_create_or_update(self, resource_group):
},
"tags": {"str": "str"},
},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
).result() # call '.result()' to poll until service return final result
@@ -74,11 +74,11 @@ async def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_by_automation_account(self, resource_group):
+ async def test_dsc_node_configuration_list_by_automation_account(self, resource_group):
response = self.client.dsc_node_configuration.list_by_automation_account(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r async for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_dsc_node_operations.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_dsc_node_operations.py
index 8cb548436357..dc2367f298cb 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_dsc_node_operations.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_dsc_node_operations.py
@@ -20,12 +20,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_delete(self, resource_group):
+ def test_dsc_node_delete(self, resource_group):
response = self.client.dsc_node.delete(
resource_group_name=resource_group.name,
automation_account_name="str",
node_id="str",
- api_version="2020-01-13-preview",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -33,12 +33,12 @@ def test_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_dsc_node_get(self, resource_group):
response = self.client.dsc_node.get(
resource_group_name=resource_group.name,
automation_account_name="str",
node_id="str",
- api_version="2020-01-13-preview",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -46,13 +46,13 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_update(self, resource_group):
+ def test_dsc_node_update(self, resource_group):
response = self.client.dsc_node.update(
resource_group_name=resource_group.name,
automation_account_name="str",
node_id="str",
dsc_node_update_parameters={"nodeId": "str", "properties": {"name": "str"}},
- api_version="2020-01-13-preview",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -60,11 +60,11 @@ def test_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_by_automation_account(self, resource_group):
+ def test_dsc_node_list_by_automation_account(self, resource_group):
response = self.client.dsc_node.list_by_automation_account(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2020-01-13-preview",
+ api_version="2024-10-23",
)
result = [r for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_dsc_node_operations_async.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_dsc_node_operations_async.py
index d793a8233cbe..8f2a4f854114 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_dsc_node_operations_async.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_dsc_node_operations_async.py
@@ -21,12 +21,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_delete(self, resource_group):
+ async def test_dsc_node_delete(self, resource_group):
response = await self.client.dsc_node.delete(
resource_group_name=resource_group.name,
automation_account_name="str",
node_id="str",
- api_version="2020-01-13-preview",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -34,12 +34,12 @@ async def test_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_dsc_node_get(self, resource_group):
response = await self.client.dsc_node.get(
resource_group_name=resource_group.name,
automation_account_name="str",
node_id="str",
- api_version="2020-01-13-preview",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -47,13 +47,13 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_update(self, resource_group):
+ async def test_dsc_node_update(self, resource_group):
response = await self.client.dsc_node.update(
resource_group_name=resource_group.name,
automation_account_name="str",
node_id="str",
dsc_node_update_parameters={"nodeId": "str", "properties": {"name": "str"}},
- api_version="2020-01-13-preview",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -61,11 +61,11 @@ async def test_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_by_automation_account(self, resource_group):
+ async def test_dsc_node_list_by_automation_account(self, resource_group):
response = self.client.dsc_node.list_by_automation_account(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2020-01-13-preview",
+ api_version="2024-10-23",
)
result = [r async for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_fields_operations.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_fields_operations.py
index 657bebde196f..f39bed9e15ba 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_fields_operations.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_fields_operations.py
@@ -20,13 +20,13 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_by_type(self, resource_group):
+ def test_fields_list_by_type(self, resource_group):
response = self.client.fields.list_by_type(
resource_group_name=resource_group.name,
automation_account_name="str",
module_name="str",
type_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_fields_operations_async.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_fields_operations_async.py
index 388ea94738f6..ad13010df152 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_fields_operations_async.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_fields_operations_async.py
@@ -21,13 +21,13 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_by_type(self, resource_group):
+ async def test_fields_list_by_type(self, resource_group):
response = self.client.fields.list_by_type(
resource_group_name=resource_group.name,
automation_account_name="str",
module_name="str",
type_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r async for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_hybrid_runbook_worker_group_operations.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_hybrid_runbook_worker_group_operations.py
index 67564bf0c005..244124484e69 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_hybrid_runbook_worker_group_operations.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_hybrid_runbook_worker_group_operations.py
@@ -20,12 +20,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_delete(self, resource_group):
+ def test_hybrid_runbook_worker_group_delete(self, resource_group):
response = self.client.hybrid_runbook_worker_group.delete(
resource_group_name=resource_group.name,
automation_account_name="str",
hybrid_runbook_worker_group_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -33,12 +33,12 @@ def test_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_hybrid_runbook_worker_group_get(self, resource_group):
response = self.client.hybrid_runbook_worker_group.get(
resource_group_name=resource_group.name,
automation_account_name="str",
hybrid_runbook_worker_group_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -46,13 +46,13 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_create(self, resource_group):
+ def test_hybrid_runbook_worker_group_create(self, resource_group):
response = self.client.hybrid_runbook_worker_group.create(
resource_group_name=resource_group.name,
automation_account_name="str",
hybrid_runbook_worker_group_name="str",
hybrid_runbook_worker_group_creation_parameters={"credential": {"name": "str"}, "name": "str"},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -60,13 +60,13 @@ def test_create(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_update(self, resource_group):
+ def test_hybrid_runbook_worker_group_update(self, resource_group):
response = self.client.hybrid_runbook_worker_group.update(
resource_group_name=resource_group.name,
automation_account_name="str",
hybrid_runbook_worker_group_name="str",
hybrid_runbook_worker_group_updation_parameters={"credential": {"name": "str"}, "name": "str"},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -74,11 +74,11 @@ def test_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_by_automation_account(self, resource_group):
+ def test_hybrid_runbook_worker_group_list_by_automation_account(self, resource_group):
response = self.client.hybrid_runbook_worker_group.list_by_automation_account(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_hybrid_runbook_worker_group_operations_async.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_hybrid_runbook_worker_group_operations_async.py
index c69be76a3f3e..79fe0fde4525 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_hybrid_runbook_worker_group_operations_async.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_hybrid_runbook_worker_group_operations_async.py
@@ -21,12 +21,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_delete(self, resource_group):
+ async def test_hybrid_runbook_worker_group_delete(self, resource_group):
response = await self.client.hybrid_runbook_worker_group.delete(
resource_group_name=resource_group.name,
automation_account_name="str",
hybrid_runbook_worker_group_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -34,12 +34,12 @@ async def test_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_hybrid_runbook_worker_group_get(self, resource_group):
response = await self.client.hybrid_runbook_worker_group.get(
resource_group_name=resource_group.name,
automation_account_name="str",
hybrid_runbook_worker_group_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -47,13 +47,13 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_create(self, resource_group):
+ async def test_hybrid_runbook_worker_group_create(self, resource_group):
response = await self.client.hybrid_runbook_worker_group.create(
resource_group_name=resource_group.name,
automation_account_name="str",
hybrid_runbook_worker_group_name="str",
hybrid_runbook_worker_group_creation_parameters={"credential": {"name": "str"}, "name": "str"},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -61,13 +61,13 @@ async def test_create(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_update(self, resource_group):
+ async def test_hybrid_runbook_worker_group_update(self, resource_group):
response = await self.client.hybrid_runbook_worker_group.update(
resource_group_name=resource_group.name,
automation_account_name="str",
hybrid_runbook_worker_group_name="str",
hybrid_runbook_worker_group_updation_parameters={"credential": {"name": "str"}, "name": "str"},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -75,11 +75,11 @@ async def test_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_by_automation_account(self, resource_group):
+ async def test_hybrid_runbook_worker_group_list_by_automation_account(self, resource_group):
response = self.client.hybrid_runbook_worker_group.list_by_automation_account(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r async for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_hybrid_runbook_workers_operations.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_hybrid_runbook_workers_operations.py
index ace4f4aa429b..4d0ab88990d3 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_hybrid_runbook_workers_operations.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_hybrid_runbook_workers_operations.py
@@ -20,13 +20,13 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_delete(self, resource_group):
+ def test_hybrid_runbook_workers_delete(self, resource_group):
response = self.client.hybrid_runbook_workers.delete(
resource_group_name=resource_group.name,
automation_account_name="str",
hybrid_runbook_worker_group_name="str",
hybrid_runbook_worker_id="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -34,13 +34,13 @@ def test_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_hybrid_runbook_workers_get(self, resource_group):
response = self.client.hybrid_runbook_workers.get(
resource_group_name=resource_group.name,
automation_account_name="str",
hybrid_runbook_worker_group_name="str",
hybrid_runbook_worker_id="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -48,14 +48,14 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_create(self, resource_group):
+ def test_hybrid_runbook_workers_create(self, resource_group):
response = self.client.hybrid_runbook_workers.create(
resource_group_name=resource_group.name,
automation_account_name="str",
hybrid_runbook_worker_group_name="str",
hybrid_runbook_worker_id="str",
hybrid_runbook_worker_creation_parameters={"name": "str", "vmResourceId": "str"},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -63,14 +63,28 @@ def test_create(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_move(self, resource_group):
+ def test_hybrid_runbook_workers_patch(self, resource_group):
+ response = self.client.hybrid_runbook_workers.patch(
+ resource_group_name=resource_group.name,
+ automation_account_name="str",
+ hybrid_runbook_worker_group_name="str",
+ hybrid_runbook_worker_id="str",
+ api_version="2024-10-23",
+ )
+
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy
+ def test_hybrid_runbook_workers_move(self, resource_group):
response = self.client.hybrid_runbook_workers.move(
resource_group_name=resource_group.name,
automation_account_name="str",
hybrid_runbook_worker_group_name="str",
hybrid_runbook_worker_id="str",
hybrid_runbook_worker_move_parameters={"hybridRunbookWorkerGroupName": "str"},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -78,12 +92,12 @@ def test_move(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_by_hybrid_runbook_worker_group(self, resource_group):
+ def test_hybrid_runbook_workers_list_by_hybrid_runbook_worker_group(self, resource_group):
response = self.client.hybrid_runbook_workers.list_by_hybrid_runbook_worker_group(
resource_group_name=resource_group.name,
automation_account_name="str",
hybrid_runbook_worker_group_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_hybrid_runbook_workers_operations_async.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_hybrid_runbook_workers_operations_async.py
index 850aad3f89be..0624eeb58dd6 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_hybrid_runbook_workers_operations_async.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_hybrid_runbook_workers_operations_async.py
@@ -21,13 +21,13 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_delete(self, resource_group):
+ async def test_hybrid_runbook_workers_delete(self, resource_group):
response = await self.client.hybrid_runbook_workers.delete(
resource_group_name=resource_group.name,
automation_account_name="str",
hybrid_runbook_worker_group_name="str",
hybrid_runbook_worker_id="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -35,13 +35,13 @@ async def test_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_hybrid_runbook_workers_get(self, resource_group):
response = await self.client.hybrid_runbook_workers.get(
resource_group_name=resource_group.name,
automation_account_name="str",
hybrid_runbook_worker_group_name="str",
hybrid_runbook_worker_id="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -49,14 +49,14 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_create(self, resource_group):
+ async def test_hybrid_runbook_workers_create(self, resource_group):
response = await self.client.hybrid_runbook_workers.create(
resource_group_name=resource_group.name,
automation_account_name="str",
hybrid_runbook_worker_group_name="str",
hybrid_runbook_worker_id="str",
hybrid_runbook_worker_creation_parameters={"name": "str", "vmResourceId": "str"},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -64,14 +64,28 @@ async def test_create(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_move(self, resource_group):
+ async def test_hybrid_runbook_workers_patch(self, resource_group):
+ response = await self.client.hybrid_runbook_workers.patch(
+ resource_group_name=resource_group.name,
+ automation_account_name="str",
+ hybrid_runbook_worker_group_name="str",
+ hybrid_runbook_worker_id="str",
+ api_version="2024-10-23",
+ )
+
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy_async
+ async def test_hybrid_runbook_workers_move(self, resource_group):
response = await self.client.hybrid_runbook_workers.move(
resource_group_name=resource_group.name,
automation_account_name="str",
hybrid_runbook_worker_group_name="str",
hybrid_runbook_worker_id="str",
hybrid_runbook_worker_move_parameters={"hybridRunbookWorkerGroupName": "str"},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -79,12 +93,12 @@ async def test_move(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_by_hybrid_runbook_worker_group(self, resource_group):
+ async def test_hybrid_runbook_workers_list_by_hybrid_runbook_worker_group(self, resource_group):
response = self.client.hybrid_runbook_workers.list_by_hybrid_runbook_worker_group(
resource_group_name=resource_group.name,
automation_account_name="str",
hybrid_runbook_worker_group_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r async for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_job_operations.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_job_operations.py
index e63e5afdc275..94ea8ef7bdea 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_job_operations.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_job_operations.py
@@ -20,12 +20,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get_output(self, resource_group):
+ def test_job_get_output(self, resource_group):
response = self.client.job.get_output(
resource_group_name=resource_group.name,
automation_account_name="str",
job_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -33,12 +33,12 @@ def test_get_output(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get_runbook_content(self, resource_group):
+ def test_job_get_runbook_content(self, resource_group):
response = self.client.job.get_runbook_content(
resource_group_name=resource_group.name,
automation_account_name="str",
job_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -46,12 +46,12 @@ def test_get_runbook_content(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_suspend(self, resource_group):
+ def test_job_suspend(self, resource_group):
response = self.client.job.suspend(
resource_group_name=resource_group.name,
automation_account_name="str",
job_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -59,12 +59,12 @@ def test_suspend(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_stop(self, resource_group):
+ def test_job_stop(self, resource_group):
response = self.client.job.stop(
resource_group_name=resource_group.name,
automation_account_name="str",
job_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -72,12 +72,12 @@ def test_stop(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_job_get(self, resource_group):
response = self.client.job.get(
resource_group_name=resource_group.name,
automation_account_name="str",
job_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -85,13 +85,13 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_create(self, resource_group):
+ def test_job_create(self, resource_group):
response = self.client.job.create(
resource_group_name=resource_group.name,
automation_account_name="str",
job_name="str",
parameters={"parameters": {"str": "str"}, "runOn": "str", "runbook": {"name": "str"}},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -99,11 +99,11 @@ def test_create(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_by_automation_account(self, resource_group):
+ def test_job_list_by_automation_account(self, resource_group):
response = self.client.job.list_by_automation_account(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r for r in response]
# please add some check logic here by yourself
@@ -111,12 +111,12 @@ def test_list_by_automation_account(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_resume(self, resource_group):
+ def test_job_resume(self, resource_group):
response = self.client.job.resume(
resource_group_name=resource_group.name,
automation_account_name="str",
job_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_job_operations_async.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_job_operations_async.py
index 2b93967f8087..35fa15f45026 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_job_operations_async.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_job_operations_async.py
@@ -21,12 +21,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get_output(self, resource_group):
+ async def test_job_get_output(self, resource_group):
response = await self.client.job.get_output(
resource_group_name=resource_group.name,
automation_account_name="str",
job_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -34,12 +34,12 @@ async def test_get_output(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get_runbook_content(self, resource_group):
+ async def test_job_get_runbook_content(self, resource_group):
response = await self.client.job.get_runbook_content(
resource_group_name=resource_group.name,
automation_account_name="str",
job_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -47,12 +47,12 @@ async def test_get_runbook_content(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_suspend(self, resource_group):
+ async def test_job_suspend(self, resource_group):
response = await self.client.job.suspend(
resource_group_name=resource_group.name,
automation_account_name="str",
job_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -60,12 +60,12 @@ async def test_suspend(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_stop(self, resource_group):
+ async def test_job_stop(self, resource_group):
response = await self.client.job.stop(
resource_group_name=resource_group.name,
automation_account_name="str",
job_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -73,12 +73,12 @@ async def test_stop(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_job_get(self, resource_group):
response = await self.client.job.get(
resource_group_name=resource_group.name,
automation_account_name="str",
job_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -86,13 +86,13 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_create(self, resource_group):
+ async def test_job_create(self, resource_group):
response = await self.client.job.create(
resource_group_name=resource_group.name,
automation_account_name="str",
job_name="str",
parameters={"parameters": {"str": "str"}, "runOn": "str", "runbook": {"name": "str"}},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -100,11 +100,11 @@ async def test_create(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_by_automation_account(self, resource_group):
+ async def test_job_list_by_automation_account(self, resource_group):
response = self.client.job.list_by_automation_account(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r async for r in response]
# please add some check logic here by yourself
@@ -112,12 +112,12 @@ async def test_list_by_automation_account(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_resume(self, resource_group):
+ async def test_job_resume(self, resource_group):
response = await self.client.job.resume(
resource_group_name=resource_group.name,
automation_account_name="str",
job_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_job_schedule_operations.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_job_schedule_operations.py
index 7faf5864ce52..568eeb84df4f 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_job_schedule_operations.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_job_schedule_operations.py
@@ -20,12 +20,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_delete(self, resource_group):
+ def test_job_schedule_delete(self, resource_group):
response = self.client.job_schedule.delete(
resource_group_name=resource_group.name,
automation_account_name="str",
job_schedule_id="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -33,12 +33,12 @@ def test_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_job_schedule_get(self, resource_group):
response = self.client.job_schedule.get(
resource_group_name=resource_group.name,
automation_account_name="str",
job_schedule_id="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -46,7 +46,7 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_create(self, resource_group):
+ def test_job_schedule_create(self, resource_group):
response = self.client.job_schedule.create(
resource_group_name=resource_group.name,
automation_account_name="str",
@@ -57,7 +57,7 @@ def test_create(self, resource_group):
"parameters": {"str": "str"},
"runOn": "str",
},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -65,11 +65,11 @@ def test_create(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_by_automation_account(self, resource_group):
+ def test_job_schedule_list_by_automation_account(self, resource_group):
response = self.client.job_schedule.list_by_automation_account(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_job_schedule_operations_async.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_job_schedule_operations_async.py
index 3ebbc24d1b48..16d1ae34c003 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_job_schedule_operations_async.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_job_schedule_operations_async.py
@@ -21,12 +21,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_delete(self, resource_group):
+ async def test_job_schedule_delete(self, resource_group):
response = await self.client.job_schedule.delete(
resource_group_name=resource_group.name,
automation_account_name="str",
job_schedule_id="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -34,12 +34,12 @@ async def test_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_job_schedule_get(self, resource_group):
response = await self.client.job_schedule.get(
resource_group_name=resource_group.name,
automation_account_name="str",
job_schedule_id="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -47,7 +47,7 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_create(self, resource_group):
+ async def test_job_schedule_create(self, resource_group):
response = await self.client.job_schedule.create(
resource_group_name=resource_group.name,
automation_account_name="str",
@@ -58,7 +58,7 @@ async def test_create(self, resource_group):
"parameters": {"str": "str"},
"runOn": "str",
},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -66,11 +66,11 @@ async def test_create(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_by_automation_account(self, resource_group):
+ async def test_job_schedule_list_by_automation_account(self, resource_group):
response = self.client.job_schedule.list_by_automation_account(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r async for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_job_stream_operations.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_job_stream_operations.py
index c1074efb57ea..e82bc501cc44 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_job_stream_operations.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_job_stream_operations.py
@@ -20,13 +20,13 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_job_stream_get(self, resource_group):
response = self.client.job_stream.get(
resource_group_name=resource_group.name,
automation_account_name="str",
job_name="str",
job_stream_id="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -34,12 +34,12 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_by_job(self, resource_group):
+ def test_job_stream_list_by_job(self, resource_group):
response = self.client.job_stream.list_by_job(
resource_group_name=resource_group.name,
automation_account_name="str",
job_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_job_stream_operations_async.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_job_stream_operations_async.py
index 493499a55942..fb5fd8e4e44d 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_job_stream_operations_async.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_job_stream_operations_async.py
@@ -21,13 +21,13 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_job_stream_get(self, resource_group):
response = await self.client.job_stream.get(
resource_group_name=resource_group.name,
automation_account_name="str",
job_name="str",
job_stream_id="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -35,12 +35,12 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_by_job(self, resource_group):
+ async def test_job_stream_list_by_job(self, resource_group):
response = self.client.job_stream.list_by_job(
resource_group_name=resource_group.name,
automation_account_name="str",
job_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r async for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_keys_operations.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_keys_operations.py
index 300341acbc14..8df698c6fe82 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_keys_operations.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_keys_operations.py
@@ -20,11 +20,11 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_by_automation_account(self, resource_group):
+ def test_keys_list_by_automation_account(self, resource_group):
response = self.client.keys.list_by_automation_account(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_keys_operations_async.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_keys_operations_async.py
index ef68a825ad90..074737ecf452 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_keys_operations_async.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_keys_operations_async.py
@@ -21,11 +21,11 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_by_automation_account(self, resource_group):
+ async def test_keys_list_by_automation_account(self, resource_group):
response = await self.client.keys.list_by_automation_account(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_linked_workspace_operations.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_linked_workspace_operations.py
index 610fb4f9b06d..55e8f726044b 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_linked_workspace_operations.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_linked_workspace_operations.py
@@ -20,11 +20,11 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_linked_workspace_get(self, resource_group):
response = self.client.linked_workspace.get(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_linked_workspace_operations_async.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_linked_workspace_operations_async.py
index f299edb64f00..4d5811df8948 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_linked_workspace_operations_async.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_linked_workspace_operations_async.py
@@ -21,11 +21,11 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_linked_workspace_get(self, resource_group):
response = await self.client.linked_workspace.get(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_module_operations.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_module_operations.py
index 7cc86633ac2a..797c67c5312b 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_module_operations.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_module_operations.py
@@ -20,12 +20,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_delete(self, resource_group):
+ def test_module_delete(self, resource_group):
response = self.client.module.delete(
resource_group_name=resource_group.name,
automation_account_name="str",
module_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -33,12 +33,12 @@ def test_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_module_get(self, resource_group):
response = self.client.module.get(
resource_group_name=resource_group.name,
automation_account_name="str",
module_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -46,7 +46,7 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_create_or_update(self, resource_group):
+ def test_module_create_or_update(self, resource_group):
response = self.client.module.create_or_update(
resource_group_name=resource_group.name,
automation_account_name="str",
@@ -57,7 +57,7 @@ def test_create_or_update(self, resource_group):
"name": "str",
"tags": {"str": "str"},
},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -65,7 +65,7 @@ def test_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_update(self, resource_group):
+ def test_module_update(self, resource_group):
response = self.client.module.update(
resource_group_name=resource_group.name,
automation_account_name="str",
@@ -76,7 +76,7 @@ def test_update(self, resource_group):
"name": "str",
"tags": {"str": "str"},
},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -84,11 +84,11 @@ def test_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_by_automation_account(self, resource_group):
+ def test_module_list_by_automation_account(self, resource_group):
response = self.client.module.list_by_automation_account(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_module_operations_async.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_module_operations_async.py
index 729b4a225570..f74e600bd996 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_module_operations_async.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_module_operations_async.py
@@ -21,12 +21,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_delete(self, resource_group):
+ async def test_module_delete(self, resource_group):
response = await self.client.module.delete(
resource_group_name=resource_group.name,
automation_account_name="str",
module_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -34,12 +34,12 @@ async def test_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_module_get(self, resource_group):
response = await self.client.module.get(
resource_group_name=resource_group.name,
automation_account_name="str",
module_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -47,7 +47,7 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_create_or_update(self, resource_group):
+ async def test_module_create_or_update(self, resource_group):
response = await self.client.module.create_or_update(
resource_group_name=resource_group.name,
automation_account_name="str",
@@ -58,7 +58,7 @@ async def test_create_or_update(self, resource_group):
"name": "str",
"tags": {"str": "str"},
},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -66,7 +66,7 @@ async def test_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_update(self, resource_group):
+ async def test_module_update(self, resource_group):
response = await self.client.module.update(
resource_group_name=resource_group.name,
automation_account_name="str",
@@ -77,7 +77,7 @@ async def test_update(self, resource_group):
"name": "str",
"tags": {"str": "str"},
},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -85,11 +85,11 @@ async def test_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_by_automation_account(self, resource_group):
+ async def test_module_list_by_automation_account(self, resource_group):
response = self.client.module.list_by_automation_account(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r async for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_node_count_information_operations.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_node_count_information_operations.py
index 6fb52c220ab0..ad8e0caf21a4 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_node_count_information_operations.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_node_count_information_operations.py
@@ -20,12 +20,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_node_count_information_get(self, resource_group):
response = self.client.node_count_information.get(
resource_group_name=resource_group.name,
automation_account_name="str",
count_type="str",
- api_version="2020-01-13-preview",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_node_count_information_operations_async.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_node_count_information_operations_async.py
index 96782f7d1ade..817a919d4001 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_node_count_information_operations_async.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_node_count_information_operations_async.py
@@ -21,12 +21,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_node_count_information_get(self, resource_group):
response = await self.client.node_count_information.get(
resource_group_name=resource_group.name,
automation_account_name="str",
count_type="str",
- api_version="2020-01-13-preview",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_node_reports_operations.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_node_reports_operations.py
index f97f92374aa2..cedff850569f 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_node_reports_operations.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_node_reports_operations.py
@@ -20,12 +20,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_by_node(self, resource_group):
+ def test_node_reports_list_by_node(self, resource_group):
response = self.client.node_reports.list_by_node(
resource_group_name=resource_group.name,
automation_account_name="str",
node_id="str",
- api_version="2020-01-13-preview",
+ api_version="2024-10-23",
)
result = [r for r in response]
# please add some check logic here by yourself
@@ -33,13 +33,13 @@ def test_list_by_node(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_node_reports_get(self, resource_group):
response = self.client.node_reports.get(
resource_group_name=resource_group.name,
automation_account_name="str",
node_id="str",
report_id="str",
- api_version="2020-01-13-preview",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -47,13 +47,13 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get_content(self, resource_group):
+ def test_node_reports_get_content(self, resource_group):
response = self.client.node_reports.get_content(
resource_group_name=resource_group.name,
automation_account_name="str",
node_id="str",
report_id="str",
- api_version="2020-01-13-preview",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_node_reports_operations_async.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_node_reports_operations_async.py
index bbe8f5dcf3d1..cec8c9a4bf1c 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_node_reports_operations_async.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_node_reports_operations_async.py
@@ -21,12 +21,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_by_node(self, resource_group):
+ async def test_node_reports_list_by_node(self, resource_group):
response = self.client.node_reports.list_by_node(
resource_group_name=resource_group.name,
automation_account_name="str",
node_id="str",
- api_version="2020-01-13-preview",
+ api_version="2024-10-23",
)
result = [r async for r in response]
# please add some check logic here by yourself
@@ -34,13 +34,13 @@ async def test_list_by_node(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_node_reports_get(self, resource_group):
response = await self.client.node_reports.get(
resource_group_name=resource_group.name,
automation_account_name="str",
node_id="str",
report_id="str",
- api_version="2020-01-13-preview",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -48,13 +48,13 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get_content(self, resource_group):
+ async def test_node_reports_get_content(self, resource_group):
response = await self.client.node_reports.get_content(
resource_group_name=resource_group.name,
automation_account_name="str",
node_id="str",
report_id="str",
- api_version="2020-01-13-preview",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_object_data_types_operations.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_object_data_types_operations.py
index d3d36455bb80..f0e163353c58 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_object_data_types_operations.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_object_data_types_operations.py
@@ -20,13 +20,13 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_fields_by_module_and_type(self, resource_group):
+ def test_object_data_types_list_fields_by_module_and_type(self, resource_group):
response = self.client.object_data_types.list_fields_by_module_and_type(
resource_group_name=resource_group.name,
automation_account_name="str",
module_name="str",
type_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r for r in response]
# please add some check logic here by yourself
@@ -34,12 +34,12 @@ def test_list_fields_by_module_and_type(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_fields_by_type(self, resource_group):
+ def test_object_data_types_list_fields_by_type(self, resource_group):
response = self.client.object_data_types.list_fields_by_type(
resource_group_name=resource_group.name,
automation_account_name="str",
type_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_object_data_types_operations_async.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_object_data_types_operations_async.py
index 4c86bbb90848..021264c6ab03 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_object_data_types_operations_async.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_object_data_types_operations_async.py
@@ -21,13 +21,13 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_fields_by_module_and_type(self, resource_group):
+ async def test_object_data_types_list_fields_by_module_and_type(self, resource_group):
response = self.client.object_data_types.list_fields_by_module_and_type(
resource_group_name=resource_group.name,
automation_account_name="str",
module_name="str",
type_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r async for r in response]
# please add some check logic here by yourself
@@ -35,12 +35,12 @@ async def test_list_fields_by_module_and_type(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_fields_by_type(self, resource_group):
+ async def test_object_data_types_list_fields_by_type(self, resource_group):
response = self.client.object_data_types.list_fields_by_type(
resource_group_name=resource_group.name,
automation_account_name="str",
type_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r async for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_operations.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_operations.py
index 5fb49d59f77b..2e95b2f6e6c3 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_operations.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_operations.py
@@ -20,9 +20,9 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list(self, resource_group):
+ def test_operations_list(self, resource_group):
response = self.client.operations.list(
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_operations_async.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_operations_async.py
index abc9066a7546..66e3b6de54c2 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_operations_async.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_operations_async.py
@@ -21,9 +21,9 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list(self, resource_group):
+ async def test_operations_list(self, resource_group):
response = self.client.operations.list(
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r async for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_package_operations.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_package_operations.py
new file mode 100644
index 000000000000..4b987fee6cc1
--- /dev/null
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_package_operations.py
@@ -0,0 +1,124 @@
+# 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 pytest
+from azure.mgmt.automation import AutomationClient
+
+from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy
+
+AZURE_LOCATION = "eastus"
+
+
+@pytest.mark.skip("you may need to update the auto-generated test case before run it")
+class TestAutomationPackageOperations(AzureMgmtRecordedTestCase):
+ def setup_method(self, method):
+ self.client = self.create_mgmt_client(AutomationClient)
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy
+ def test_package_delete(self, resource_group):
+ response = self.client.package.delete(
+ resource_group_name=resource_group.name,
+ automation_account_name="str",
+ runtime_environment_name="str",
+ package_name="str",
+ api_version="2024-10-23",
+ )
+
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy
+ def test_package_get(self, resource_group):
+ response = self.client.package.get(
+ resource_group_name=resource_group.name,
+ automation_account_name="str",
+ runtime_environment_name="str",
+ package_name="str",
+ api_version="2024-10-23",
+ )
+
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy
+ def test_package_create_or_update(self, resource_group):
+ response = self.client.package.create_or_update(
+ resource_group_name=resource_group.name,
+ automation_account_name="str",
+ runtime_environment_name="str",
+ package_name="str",
+ parameters={
+ "contentLink": {"contentHash": {"algorithm": "str", "value": "str"}, "uri": "str", "version": "str"},
+ "allOf": {
+ "location": "str",
+ "id": "str",
+ "name": "str",
+ "systemData": {
+ "createdAt": "2020-02-20 00:00:00",
+ "createdBy": "str",
+ "createdByType": "str",
+ "lastModifiedAt": "2020-02-20 00:00:00",
+ "lastModifiedBy": "str",
+ "lastModifiedByType": "str",
+ },
+ "tags": {"str": "str"},
+ "type": "str",
+ },
+ },
+ api_version="2024-10-23",
+ )
+
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy
+ def test_package_update(self, resource_group):
+ response = self.client.package.update(
+ resource_group_name=resource_group.name,
+ automation_account_name="str",
+ runtime_environment_name="str",
+ package_name="str",
+ parameters={
+ "allOf": {
+ "location": "str",
+ "id": "str",
+ "name": "str",
+ "systemData": {
+ "createdAt": "2020-02-20 00:00:00",
+ "createdBy": "str",
+ "createdByType": "str",
+ "lastModifiedAt": "2020-02-20 00:00:00",
+ "lastModifiedBy": "str",
+ "lastModifiedByType": "str",
+ },
+ "tags": {"str": "str"},
+ "type": "str",
+ },
+ "contentLink": {"contentHash": {"algorithm": "str", "value": "str"}, "uri": "str", "version": "str"},
+ },
+ api_version="2024-10-23",
+ )
+
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy
+ def test_package_list_by_runtime_environment(self, resource_group):
+ response = self.client.package.list_by_runtime_environment(
+ resource_group_name=resource_group.name,
+ automation_account_name="str",
+ runtime_environment_name="str",
+ api_version="2024-10-23",
+ )
+ result = [r for r in response]
+ # please add some check logic here by yourself
+ # ...
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_package_operations_async.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_package_operations_async.py
new file mode 100644
index 000000000000..faa1bc4a2843
--- /dev/null
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_package_operations_async.py
@@ -0,0 +1,125 @@
+# 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 pytest
+from azure.mgmt.automation.aio import AutomationClient
+
+from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer
+from devtools_testutils.aio import recorded_by_proxy_async
+
+AZURE_LOCATION = "eastus"
+
+
+@pytest.mark.skip("you may need to update the auto-generated test case before run it")
+class TestAutomationPackageOperationsAsync(AzureMgmtRecordedTestCase):
+ def setup_method(self, method):
+ self.client = self.create_mgmt_client(AutomationClient, is_async=True)
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy_async
+ async def test_package_delete(self, resource_group):
+ response = await self.client.package.delete(
+ resource_group_name=resource_group.name,
+ automation_account_name="str",
+ runtime_environment_name="str",
+ package_name="str",
+ api_version="2024-10-23",
+ )
+
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy_async
+ async def test_package_get(self, resource_group):
+ response = await self.client.package.get(
+ resource_group_name=resource_group.name,
+ automation_account_name="str",
+ runtime_environment_name="str",
+ package_name="str",
+ api_version="2024-10-23",
+ )
+
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy_async
+ async def test_package_create_or_update(self, resource_group):
+ response = await self.client.package.create_or_update(
+ resource_group_name=resource_group.name,
+ automation_account_name="str",
+ runtime_environment_name="str",
+ package_name="str",
+ parameters={
+ "contentLink": {"contentHash": {"algorithm": "str", "value": "str"}, "uri": "str", "version": "str"},
+ "allOf": {
+ "location": "str",
+ "id": "str",
+ "name": "str",
+ "systemData": {
+ "createdAt": "2020-02-20 00:00:00",
+ "createdBy": "str",
+ "createdByType": "str",
+ "lastModifiedAt": "2020-02-20 00:00:00",
+ "lastModifiedBy": "str",
+ "lastModifiedByType": "str",
+ },
+ "tags": {"str": "str"},
+ "type": "str",
+ },
+ },
+ api_version="2024-10-23",
+ )
+
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy_async
+ async def test_package_update(self, resource_group):
+ response = await self.client.package.update(
+ resource_group_name=resource_group.name,
+ automation_account_name="str",
+ runtime_environment_name="str",
+ package_name="str",
+ parameters={
+ "allOf": {
+ "location": "str",
+ "id": "str",
+ "name": "str",
+ "systemData": {
+ "createdAt": "2020-02-20 00:00:00",
+ "createdBy": "str",
+ "createdByType": "str",
+ "lastModifiedAt": "2020-02-20 00:00:00",
+ "lastModifiedBy": "str",
+ "lastModifiedByType": "str",
+ },
+ "tags": {"str": "str"},
+ "type": "str",
+ },
+ "contentLink": {"contentHash": {"algorithm": "str", "value": "str"}, "uri": "str", "version": "str"},
+ },
+ api_version="2024-10-23",
+ )
+
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy_async
+ async def test_package_list_by_runtime_environment(self, resource_group):
+ response = self.client.package.list_by_runtime_environment(
+ resource_group_name=resource_group.name,
+ automation_account_name="str",
+ runtime_environment_name="str",
+ api_version="2024-10-23",
+ )
+ result = [r async for r in response]
+ # please add some check logic here by yourself
+ # ...
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_private_endpoint_connections_operations.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_private_endpoint_connections_operations.py
index 644454f2f37b..5ac2eacf0846 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_private_endpoint_connections_operations.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_private_endpoint_connections_operations.py
@@ -20,11 +20,11 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_by_automation_account(self, resource_group):
+ def test_private_endpoint_connections_list_by_automation_account(self, resource_group):
response = self.client.private_endpoint_connections.list_by_automation_account(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2020-01-13-preview",
+ api_version="2024-10-23",
)
result = [r for r in response]
# please add some check logic here by yourself
@@ -32,12 +32,12 @@ def test_list_by_automation_account(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_private_endpoint_connections_get(self, resource_group):
response = self.client.private_endpoint_connections.get(
resource_group_name=resource_group.name,
automation_account_name="str",
private_endpoint_connection_name="str",
- api_version="2020-01-13-preview",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -45,7 +45,7 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_create_or_update(self, resource_group):
+ def test_private_endpoint_connections_begin_create_or_update(self, resource_group):
response = self.client.private_endpoint_connections.begin_create_or_update(
resource_group_name=resource_group.name,
automation_account_name="str",
@@ -56,9 +56,17 @@ def test_begin_create_or_update(self, resource_group):
"name": "str",
"privateEndpoint": {"id": "str"},
"privateLinkServiceConnectionState": {"actionsRequired": "str", "description": "str", "status": "str"},
+ "systemData": {
+ "createdAt": "2020-02-20 00:00:00",
+ "createdBy": "str",
+ "createdByType": "str",
+ "lastModifiedAt": "2020-02-20 00:00:00",
+ "lastModifiedBy": "str",
+ "lastModifiedByType": "str",
+ },
"type": "str",
},
- api_version="2020-01-13-preview",
+ api_version="2024-10-23",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -66,12 +74,12 @@ def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_delete(self, resource_group):
+ def test_private_endpoint_connections_begin_delete(self, resource_group):
response = self.client.private_endpoint_connections.begin_delete(
resource_group_name=resource_group.name,
automation_account_name="str",
private_endpoint_connection_name="str",
- api_version="2020-01-13-preview",
+ api_version="2024-10-23",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_private_endpoint_connections_operations_async.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_private_endpoint_connections_operations_async.py
index 7204890b0c33..721595a19a84 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_private_endpoint_connections_operations_async.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_private_endpoint_connections_operations_async.py
@@ -21,11 +21,11 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_by_automation_account(self, resource_group):
+ async def test_private_endpoint_connections_list_by_automation_account(self, resource_group):
response = self.client.private_endpoint_connections.list_by_automation_account(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2020-01-13-preview",
+ api_version="2024-10-23",
)
result = [r async for r in response]
# please add some check logic here by yourself
@@ -33,12 +33,12 @@ async def test_list_by_automation_account(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_private_endpoint_connections_get(self, resource_group):
response = await self.client.private_endpoint_connections.get(
resource_group_name=resource_group.name,
automation_account_name="str",
private_endpoint_connection_name="str",
- api_version="2020-01-13-preview",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -46,7 +46,7 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_create_or_update(self, resource_group):
+ async def test_private_endpoint_connections_begin_create_or_update(self, resource_group):
response = await (
await self.client.private_endpoint_connections.begin_create_or_update(
resource_group_name=resource_group.name,
@@ -62,9 +62,17 @@ async def test_begin_create_or_update(self, resource_group):
"description": "str",
"status": "str",
},
+ "systemData": {
+ "createdAt": "2020-02-20 00:00:00",
+ "createdBy": "str",
+ "createdByType": "str",
+ "lastModifiedAt": "2020-02-20 00:00:00",
+ "lastModifiedBy": "str",
+ "lastModifiedByType": "str",
+ },
"type": "str",
},
- api_version="2020-01-13-preview",
+ api_version="2024-10-23",
)
).result() # call '.result()' to poll until service return final result
@@ -73,13 +81,13 @@ async def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_delete(self, resource_group):
+ async def test_private_endpoint_connections_begin_delete(self, resource_group):
response = await (
await self.client.private_endpoint_connections.begin_delete(
resource_group_name=resource_group.name,
automation_account_name="str",
private_endpoint_connection_name="str",
- api_version="2020-01-13-preview",
+ api_version="2024-10-23",
)
).result() # call '.result()' to poll until service return final result
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_private_link_resources_operations.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_private_link_resources_operations.py
index dd9c6f4da5e8..f76cb3c83b08 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_private_link_resources_operations.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_private_link_resources_operations.py
@@ -20,11 +20,11 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_automation(self, resource_group):
+ def test_private_link_resources_automation(self, resource_group):
response = self.client.private_link_resources.automation(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2020-01-13-preview",
+ api_version="2024-10-23",
)
result = [r for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_private_link_resources_operations_async.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_private_link_resources_operations_async.py
index f07a4e78b988..9edca26efae3 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_private_link_resources_operations_async.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_private_link_resources_operations_async.py
@@ -21,11 +21,11 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_automation(self, resource_group):
+ async def test_private_link_resources_automation(self, resource_group):
response = self.client.private_link_resources.automation(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2020-01-13-preview",
+ api_version="2024-10-23",
)
result = [r async for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_python2_package_operations.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_python2_package_operations.py
index c2fe15f5bc55..c3b0e8da5abd 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_python2_package_operations.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_python2_package_operations.py
@@ -20,12 +20,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_delete(self, resource_group):
+ def test_python2_package_delete(self, resource_group):
response = self.client.python2_package.delete(
resource_group_name=resource_group.name,
automation_account_name="str",
package_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -33,12 +33,12 @@ def test_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_python2_package_get(self, resource_group):
response = self.client.python2_package.get(
resource_group_name=resource_group.name,
automation_account_name="str",
package_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -46,7 +46,7 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_create_or_update(self, resource_group):
+ def test_python2_package_create_or_update(self, resource_group):
response = self.client.python2_package.create_or_update(
resource_group_name=resource_group.name,
automation_account_name="str",
@@ -55,7 +55,7 @@ def test_create_or_update(self, resource_group):
"contentLink": {"contentHash": {"algorithm": "str", "value": "str"}, "uri": "str", "version": "str"},
"tags": {"str": "str"},
},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -63,13 +63,13 @@ def test_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_update(self, resource_group):
+ def test_python2_package_update(self, resource_group):
response = self.client.python2_package.update(
resource_group_name=resource_group.name,
automation_account_name="str",
package_name="str",
parameters={"tags": {"str": "str"}},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -77,11 +77,11 @@ def test_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_by_automation_account(self, resource_group):
+ def test_python2_package_list_by_automation_account(self, resource_group):
response = self.client.python2_package.list_by_automation_account(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_python2_package_operations_async.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_python2_package_operations_async.py
index 017bda396152..661f4e9c9659 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_python2_package_operations_async.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_python2_package_operations_async.py
@@ -21,12 +21,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_delete(self, resource_group):
+ async def test_python2_package_delete(self, resource_group):
response = await self.client.python2_package.delete(
resource_group_name=resource_group.name,
automation_account_name="str",
package_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -34,12 +34,12 @@ async def test_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_python2_package_get(self, resource_group):
response = await self.client.python2_package.get(
resource_group_name=resource_group.name,
automation_account_name="str",
package_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -47,7 +47,7 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_create_or_update(self, resource_group):
+ async def test_python2_package_create_or_update(self, resource_group):
response = await self.client.python2_package.create_or_update(
resource_group_name=resource_group.name,
automation_account_name="str",
@@ -56,7 +56,7 @@ async def test_create_or_update(self, resource_group):
"contentLink": {"contentHash": {"algorithm": "str", "value": "str"}, "uri": "str", "version": "str"},
"tags": {"str": "str"},
},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -64,13 +64,13 @@ async def test_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_update(self, resource_group):
+ async def test_python2_package_update(self, resource_group):
response = await self.client.python2_package.update(
resource_group_name=resource_group.name,
automation_account_name="str",
package_name="str",
parameters={"tags": {"str": "str"}},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -78,11 +78,11 @@ async def test_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_by_automation_account(self, resource_group):
+ async def test_python2_package_list_by_automation_account(self, resource_group):
response = self.client.python2_package.list_by_automation_account(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r async for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_python3_package_operations.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_python3_package_operations.py
index 5118fe4e6af1..041ee60ae46a 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_python3_package_operations.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_python3_package_operations.py
@@ -20,12 +20,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_delete(self, resource_group):
+ def test_python3_package_delete(self, resource_group):
response = self.client.python3_package.delete(
resource_group_name=resource_group.name,
automation_account_name="str",
package_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -33,12 +33,12 @@ def test_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_python3_package_get(self, resource_group):
response = self.client.python3_package.get(
resource_group_name=resource_group.name,
automation_account_name="str",
package_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -46,7 +46,7 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_create_or_update(self, resource_group):
+ def test_python3_package_create_or_update(self, resource_group):
response = self.client.python3_package.create_or_update(
resource_group_name=resource_group.name,
automation_account_name="str",
@@ -55,7 +55,7 @@ def test_create_or_update(self, resource_group):
"contentLink": {"contentHash": {"algorithm": "str", "value": "str"}, "uri": "str", "version": "str"},
"tags": {"str": "str"},
},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -63,13 +63,13 @@ def test_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_update(self, resource_group):
+ def test_python3_package_update(self, resource_group):
response = self.client.python3_package.update(
resource_group_name=resource_group.name,
automation_account_name="str",
package_name="str",
parameters={"tags": {"str": "str"}},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -77,11 +77,11 @@ def test_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_by_automation_account(self, resource_group):
+ def test_python3_package_list_by_automation_account(self, resource_group):
response = self.client.python3_package.list_by_automation_account(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_python3_package_operations_async.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_python3_package_operations_async.py
index 6c0a432c5512..e231e13e1d82 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_python3_package_operations_async.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_python3_package_operations_async.py
@@ -21,12 +21,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_delete(self, resource_group):
+ async def test_python3_package_delete(self, resource_group):
response = await self.client.python3_package.delete(
resource_group_name=resource_group.name,
automation_account_name="str",
package_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -34,12 +34,12 @@ async def test_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_python3_package_get(self, resource_group):
response = await self.client.python3_package.get(
resource_group_name=resource_group.name,
automation_account_name="str",
package_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -47,7 +47,7 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_create_or_update(self, resource_group):
+ async def test_python3_package_create_or_update(self, resource_group):
response = await self.client.python3_package.create_or_update(
resource_group_name=resource_group.name,
automation_account_name="str",
@@ -56,7 +56,7 @@ async def test_create_or_update(self, resource_group):
"contentLink": {"contentHash": {"algorithm": "str", "value": "str"}, "uri": "str", "version": "str"},
"tags": {"str": "str"},
},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -64,13 +64,13 @@ async def test_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_update(self, resource_group):
+ async def test_python3_package_update(self, resource_group):
response = await self.client.python3_package.update(
resource_group_name=resource_group.name,
automation_account_name="str",
package_name="str",
parameters={"tags": {"str": "str"}},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -78,11 +78,11 @@ async def test_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_by_automation_account(self, resource_group):
+ async def test_python3_package_list_by_automation_account(self, resource_group):
response = self.client.python3_package.list_by_automation_account(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r async for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_runbook_draft_operations.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_runbook_draft_operations.py
index 2b2b13680f87..35cd5b24fdba 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_runbook_draft_operations.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_runbook_draft_operations.py
@@ -20,12 +20,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get_content(self, resource_group):
+ def test_runbook_draft_get_content(self, resource_group):
response = self.client.runbook_draft.get_content(
resource_group_name=resource_group.name,
automation_account_name="str",
runbook_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -33,13 +33,13 @@ def test_get_content(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_replace_content(self, resource_group):
+ def test_runbook_draft_begin_replace_content(self, resource_group):
response = self.client.runbook_draft.begin_replace_content(
resource_group_name=resource_group.name,
automation_account_name="str",
runbook_name="str",
runbook_content=b"bytes",
- api_version="2022-08-08",
+ api_version="2024-10-23",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -47,12 +47,12 @@ def test_begin_replace_content(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_runbook_draft_get(self, resource_group):
response = self.client.runbook_draft.get(
resource_group_name=resource_group.name,
automation_account_name="str",
runbook_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -60,12 +60,12 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_undo_edit(self, resource_group):
+ def test_runbook_draft_undo_edit(self, resource_group):
response = self.client.runbook_draft.undo_edit(
resource_group_name=resource_group.name,
automation_account_name="str",
runbook_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_runbook_draft_operations_async.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_runbook_draft_operations_async.py
index 969c783ffb57..126464ca7546 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_runbook_draft_operations_async.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_runbook_draft_operations_async.py
@@ -21,12 +21,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get_content(self, resource_group):
+ async def test_runbook_draft_get_content(self, resource_group):
response = await self.client.runbook_draft.get_content(
resource_group_name=resource_group.name,
automation_account_name="str",
runbook_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -34,14 +34,14 @@ async def test_get_content(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_replace_content(self, resource_group):
+ async def test_runbook_draft_begin_replace_content(self, resource_group):
response = await (
await self.client.runbook_draft.begin_replace_content(
resource_group_name=resource_group.name,
automation_account_name="str",
runbook_name="str",
runbook_content=b"bytes",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
).result() # call '.result()' to poll until service return final result
@@ -50,12 +50,12 @@ async def test_begin_replace_content(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_runbook_draft_get(self, resource_group):
response = await self.client.runbook_draft.get(
resource_group_name=resource_group.name,
automation_account_name="str",
runbook_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -63,12 +63,12 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_undo_edit(self, resource_group):
+ async def test_runbook_draft_undo_edit(self, resource_group):
response = await self.client.runbook_draft.undo_edit(
resource_group_name=resource_group.name,
automation_account_name="str",
runbook_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_runbook_operations.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_runbook_operations.py
index 1299b95388b4..4f68c9b35e6c 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_runbook_operations.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_runbook_operations.py
@@ -20,12 +20,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_publish(self, resource_group):
+ def test_runbook_begin_publish(self, resource_group):
response = self.client.runbook.begin_publish(
resource_group_name=resource_group.name,
automation_account_name="str",
runbook_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -33,12 +33,12 @@ def test_begin_publish(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get_content(self, resource_group):
+ def test_runbook_get_content(self, resource_group):
response = self.client.runbook.get_content(
resource_group_name=resource_group.name,
automation_account_name="str",
runbook_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -46,12 +46,12 @@ def test_get_content(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_runbook_get(self, resource_group):
response = self.client.runbook.get(
resource_group_name=resource_group.name,
automation_account_name="str",
runbook_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -59,7 +59,7 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_create_or_update(self, resource_group):
+ def test_runbook_create_or_update(self, resource_group):
response = self.client.runbook.create_or_update(
resource_group_name=resource_group.name,
automation_account_name="str",
@@ -89,9 +89,10 @@ def test_create_or_update(self, resource_group):
"uri": "str",
"version": "str",
},
+ "runtimeEnvironment": "str",
"tags": {"str": "str"},
},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -99,7 +100,7 @@ def test_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_update(self, resource_group):
+ def test_runbook_update(self, resource_group):
response = self.client.runbook.update(
resource_group_name=resource_group.name,
automation_account_name="str",
@@ -113,7 +114,7 @@ def test_update(self, resource_group):
"name": "str",
"tags": {"str": "str"},
},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -121,12 +122,12 @@ def test_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_delete(self, resource_group):
+ def test_runbook_delete(self, resource_group):
response = self.client.runbook.delete(
resource_group_name=resource_group.name,
automation_account_name="str",
runbook_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -134,11 +135,11 @@ def test_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_by_automation_account(self, resource_group):
+ def test_runbook_list_by_automation_account(self, resource_group):
response = self.client.runbook.list_by_automation_account(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_runbook_operations_async.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_runbook_operations_async.py
index 85f9eb7d5a48..fa33cfd896b3 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_runbook_operations_async.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_runbook_operations_async.py
@@ -21,13 +21,13 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_publish(self, resource_group):
+ async def test_runbook_begin_publish(self, resource_group):
response = await (
await self.client.runbook.begin_publish(
resource_group_name=resource_group.name,
automation_account_name="str",
runbook_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
).result() # call '.result()' to poll until service return final result
@@ -36,12 +36,12 @@ async def test_begin_publish(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get_content(self, resource_group):
+ async def test_runbook_get_content(self, resource_group):
response = await self.client.runbook.get_content(
resource_group_name=resource_group.name,
automation_account_name="str",
runbook_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -49,12 +49,12 @@ async def test_get_content(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_runbook_get(self, resource_group):
response = await self.client.runbook.get(
resource_group_name=resource_group.name,
automation_account_name="str",
runbook_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -62,7 +62,7 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_create_or_update(self, resource_group):
+ async def test_runbook_create_or_update(self, resource_group):
response = await self.client.runbook.create_or_update(
resource_group_name=resource_group.name,
automation_account_name="str",
@@ -92,9 +92,10 @@ async def test_create_or_update(self, resource_group):
"uri": "str",
"version": "str",
},
+ "runtimeEnvironment": "str",
"tags": {"str": "str"},
},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -102,7 +103,7 @@ async def test_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_update(self, resource_group):
+ async def test_runbook_update(self, resource_group):
response = await self.client.runbook.update(
resource_group_name=resource_group.name,
automation_account_name="str",
@@ -116,7 +117,7 @@ async def test_update(self, resource_group):
"name": "str",
"tags": {"str": "str"},
},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -124,12 +125,12 @@ async def test_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_delete(self, resource_group):
+ async def test_runbook_delete(self, resource_group):
response = await self.client.runbook.delete(
resource_group_name=resource_group.name,
automation_account_name="str",
runbook_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -137,11 +138,11 @@ async def test_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_by_automation_account(self, resource_group):
+ async def test_runbook_list_by_automation_account(self, resource_group):
response = self.client.runbook.list_by_automation_account(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r async for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_runtime_environments_operations.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_runtime_environments_operations.py
new file mode 100644
index 000000000000..c46e6aac8747
--- /dev/null
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_runtime_environments_operations.py
@@ -0,0 +1,113 @@
+# 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 pytest
+from azure.mgmt.automation import AutomationClient
+
+from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy
+
+AZURE_LOCATION = "eastus"
+
+
+@pytest.mark.skip("you may need to update the auto-generated test case before run it")
+class TestAutomationRuntimeEnvironmentsOperations(AzureMgmtRecordedTestCase):
+ def setup_method(self, method):
+ self.client = self.create_mgmt_client(AutomationClient)
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy
+ def test_runtime_environments_update(self, resource_group):
+ response = self.client.runtime_environments.update(
+ resource_group_name=resource_group.name,
+ automation_account_name="str",
+ runtime_environment_name="str",
+ parameters={
+ "defaultPackages": {"str": "str"},
+ "systemData": {
+ "createdAt": "2020-02-20 00:00:00",
+ "createdBy": "str",
+ "createdByType": "str",
+ "lastModifiedAt": "2020-02-20 00:00:00",
+ "lastModifiedBy": "str",
+ "lastModifiedByType": "str",
+ },
+ },
+ api_version="2024-10-23",
+ )
+
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy
+ def test_runtime_environments_create(self, resource_group):
+ response = self.client.runtime_environments.create(
+ resource_group_name=resource_group.name,
+ automation_account_name="str",
+ runtime_environment_name="str",
+ parameters={
+ "location": "str",
+ "defaultPackages": {"str": "str"},
+ "description": "str",
+ "id": "str",
+ "language": "str",
+ "name": "str",
+ "systemData": {
+ "createdAt": "2020-02-20 00:00:00",
+ "createdBy": "str",
+ "createdByType": "str",
+ "lastModifiedAt": "2020-02-20 00:00:00",
+ "lastModifiedBy": "str",
+ "lastModifiedByType": "str",
+ },
+ "tags": {"str": "str"},
+ "type": "str",
+ "version": "str",
+ },
+ api_version="2024-10-23",
+ )
+
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy
+ def test_runtime_environments_delete(self, resource_group):
+ response = self.client.runtime_environments.delete(
+ resource_group_name=resource_group.name,
+ automation_account_name="str",
+ runtime_environment_name="str",
+ api_version="2024-10-23",
+ )
+
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy
+ def test_runtime_environments_get(self, resource_group):
+ response = self.client.runtime_environments.get(
+ resource_group_name=resource_group.name,
+ automation_account_name="str",
+ runtime_environment_name="str",
+ api_version="2024-10-23",
+ )
+
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy
+ def test_runtime_environments_list_by_automation_account(self, resource_group):
+ response = self.client.runtime_environments.list_by_automation_account(
+ resource_group_name=resource_group.name,
+ automation_account_name="str",
+ api_version="2024-10-23",
+ )
+ result = [r for r in response]
+ # please add some check logic here by yourself
+ # ...
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_runtime_environments_operations_async.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_runtime_environments_operations_async.py
new file mode 100644
index 000000000000..c886659616b4
--- /dev/null
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_runtime_environments_operations_async.py
@@ -0,0 +1,114 @@
+# 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 pytest
+from azure.mgmt.automation.aio import AutomationClient
+
+from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer
+from devtools_testutils.aio import recorded_by_proxy_async
+
+AZURE_LOCATION = "eastus"
+
+
+@pytest.mark.skip("you may need to update the auto-generated test case before run it")
+class TestAutomationRuntimeEnvironmentsOperationsAsync(AzureMgmtRecordedTestCase):
+ def setup_method(self, method):
+ self.client = self.create_mgmt_client(AutomationClient, is_async=True)
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy_async
+ async def test_runtime_environments_update(self, resource_group):
+ response = await self.client.runtime_environments.update(
+ resource_group_name=resource_group.name,
+ automation_account_name="str",
+ runtime_environment_name="str",
+ parameters={
+ "defaultPackages": {"str": "str"},
+ "systemData": {
+ "createdAt": "2020-02-20 00:00:00",
+ "createdBy": "str",
+ "createdByType": "str",
+ "lastModifiedAt": "2020-02-20 00:00:00",
+ "lastModifiedBy": "str",
+ "lastModifiedByType": "str",
+ },
+ },
+ api_version="2024-10-23",
+ )
+
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy_async
+ async def test_runtime_environments_create(self, resource_group):
+ response = await self.client.runtime_environments.create(
+ resource_group_name=resource_group.name,
+ automation_account_name="str",
+ runtime_environment_name="str",
+ parameters={
+ "location": "str",
+ "defaultPackages": {"str": "str"},
+ "description": "str",
+ "id": "str",
+ "language": "str",
+ "name": "str",
+ "systemData": {
+ "createdAt": "2020-02-20 00:00:00",
+ "createdBy": "str",
+ "createdByType": "str",
+ "lastModifiedAt": "2020-02-20 00:00:00",
+ "lastModifiedBy": "str",
+ "lastModifiedByType": "str",
+ },
+ "tags": {"str": "str"},
+ "type": "str",
+ "version": "str",
+ },
+ api_version="2024-10-23",
+ )
+
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy_async
+ async def test_runtime_environments_delete(self, resource_group):
+ response = await self.client.runtime_environments.delete(
+ resource_group_name=resource_group.name,
+ automation_account_name="str",
+ runtime_environment_name="str",
+ api_version="2024-10-23",
+ )
+
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy_async
+ async def test_runtime_environments_get(self, resource_group):
+ response = await self.client.runtime_environments.get(
+ resource_group_name=resource_group.name,
+ automation_account_name="str",
+ runtime_environment_name="str",
+ api_version="2024-10-23",
+ )
+
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy_async
+ async def test_runtime_environments_list_by_automation_account(self, resource_group):
+ response = self.client.runtime_environments.list_by_automation_account(
+ resource_group_name=resource_group.name,
+ automation_account_name="str",
+ api_version="2024-10-23",
+ )
+ result = [r async for r in response]
+ # please add some check logic here by yourself
+ # ...
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_schedule_operations.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_schedule_operations.py
index 0eca2643de90..eb531954c3ab 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_schedule_operations.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_schedule_operations.py
@@ -20,7 +20,7 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_create_or_update(self, resource_group):
+ def test_schedule_create_or_update(self, resource_group):
response = self.client.schedule.create_or_update(
resource_group_name=resource_group.name,
automation_account_name="str",
@@ -39,7 +39,7 @@ def test_create_or_update(self, resource_group):
"interval": {},
"timeZone": "str",
},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -47,13 +47,13 @@ def test_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_update(self, resource_group):
+ def test_schedule_update(self, resource_group):
response = self.client.schedule.update(
resource_group_name=resource_group.name,
automation_account_name="str",
schedule_name="str",
parameters={"description": "str", "isEnabled": bool, "name": "str"},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -61,12 +61,12 @@ def test_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_schedule_get(self, resource_group):
response = self.client.schedule.get(
resource_group_name=resource_group.name,
automation_account_name="str",
schedule_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -74,12 +74,12 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_delete(self, resource_group):
+ def test_schedule_delete(self, resource_group):
response = self.client.schedule.delete(
resource_group_name=resource_group.name,
automation_account_name="str",
schedule_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -87,11 +87,11 @@ def test_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_by_automation_account(self, resource_group):
+ def test_schedule_list_by_automation_account(self, resource_group):
response = self.client.schedule.list_by_automation_account(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_schedule_operations_async.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_schedule_operations_async.py
index f2894d5a68b9..3224ce5714ce 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_schedule_operations_async.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_schedule_operations_async.py
@@ -21,7 +21,7 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_create_or_update(self, resource_group):
+ async def test_schedule_create_or_update(self, resource_group):
response = await self.client.schedule.create_or_update(
resource_group_name=resource_group.name,
automation_account_name="str",
@@ -40,7 +40,7 @@ async def test_create_or_update(self, resource_group):
"interval": {},
"timeZone": "str",
},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -48,13 +48,13 @@ async def test_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_update(self, resource_group):
+ async def test_schedule_update(self, resource_group):
response = await self.client.schedule.update(
resource_group_name=resource_group.name,
automation_account_name="str",
schedule_name="str",
parameters={"description": "str", "isEnabled": bool, "name": "str"},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -62,12 +62,12 @@ async def test_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_schedule_get(self, resource_group):
response = await self.client.schedule.get(
resource_group_name=resource_group.name,
automation_account_name="str",
schedule_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -75,12 +75,12 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_delete(self, resource_group):
+ async def test_schedule_delete(self, resource_group):
response = await self.client.schedule.delete(
resource_group_name=resource_group.name,
automation_account_name="str",
schedule_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -88,11 +88,11 @@ async def test_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_by_automation_account(self, resource_group):
+ async def test_schedule_list_by_automation_account(self, resource_group):
response = self.client.schedule.list_by_automation_account(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r async for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_software_update_configuration_machine_runs_operations.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_software_update_configuration_machine_runs_operations.py
index 957a5fba5ac6..a7f3b91c892d 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_software_update_configuration_machine_runs_operations.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_software_update_configuration_machine_runs_operations.py
@@ -20,12 +20,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get_by_id(self, resource_group):
+ def test_software_update_configuration_machine_runs_get_by_id(self, resource_group):
response = self.client.software_update_configuration_machine_runs.get_by_id(
resource_group_name=resource_group.name,
automation_account_name="str",
software_update_configuration_machine_run_id="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -33,11 +33,11 @@ def test_get_by_id(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list(self, resource_group):
+ def test_software_update_configuration_machine_runs_list(self, resource_group):
response = self.client.software_update_configuration_machine_runs.list(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_software_update_configuration_machine_runs_operations_async.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_software_update_configuration_machine_runs_operations_async.py
index 8aade45d68d8..08799eaaba59 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_software_update_configuration_machine_runs_operations_async.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_software_update_configuration_machine_runs_operations_async.py
@@ -21,12 +21,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get_by_id(self, resource_group):
+ async def test_software_update_configuration_machine_runs_get_by_id(self, resource_group):
response = await self.client.software_update_configuration_machine_runs.get_by_id(
resource_group_name=resource_group.name,
automation_account_name="str",
software_update_configuration_machine_run_id="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -34,11 +34,11 @@ async def test_get_by_id(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list(self, resource_group):
+ async def test_software_update_configuration_machine_runs_list(self, resource_group):
response = await self.client.software_update_configuration_machine_runs.list(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_software_update_configuration_runs_operations.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_software_update_configuration_runs_operations.py
index d8b4e9b8ffd3..a59aa933d05e 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_software_update_configuration_runs_operations.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_software_update_configuration_runs_operations.py
@@ -20,12 +20,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get_by_id(self, resource_group):
+ def test_software_update_configuration_runs_get_by_id(self, resource_group):
response = self.client.software_update_configuration_runs.get_by_id(
resource_group_name=resource_group.name,
automation_account_name="str",
software_update_configuration_run_id="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -33,11 +33,11 @@ def test_get_by_id(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list(self, resource_group):
+ def test_software_update_configuration_runs_list(self, resource_group):
response = self.client.software_update_configuration_runs.list(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_software_update_configuration_runs_operations_async.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_software_update_configuration_runs_operations_async.py
index fa11372e579a..5a721678cfc1 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_software_update_configuration_runs_operations_async.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_software_update_configuration_runs_operations_async.py
@@ -21,12 +21,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get_by_id(self, resource_group):
+ async def test_software_update_configuration_runs_get_by_id(self, resource_group):
response = await self.client.software_update_configuration_runs.get_by_id(
resource_group_name=resource_group.name,
automation_account_name="str",
software_update_configuration_run_id="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -34,11 +34,11 @@ async def test_get_by_id(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list(self, resource_group):
+ async def test_software_update_configuration_runs_list(self, resource_group):
response = await self.client.software_update_configuration_runs.list(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_software_update_configurations_operations.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_software_update_configurations_operations.py
index 35f27fd47262..9899aecec8e3 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_software_update_configurations_operations.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_software_update_configurations_operations.py
@@ -20,7 +20,7 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_create(self, resource_group):
+ def test_software_update_configurations_create(self, resource_group):
response = self.client.software_update_configurations.create(
resource_group_name=resource_group.name,
automation_account_name="str",
@@ -88,7 +88,7 @@ def test_create(self, resource_group):
},
"type": "str",
},
- api_version="2019-06-01",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -96,12 +96,12 @@ def test_create(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get_by_name(self, resource_group):
+ def test_software_update_configurations_get_by_name(self, resource_group):
response = self.client.software_update_configurations.get_by_name(
resource_group_name=resource_group.name,
automation_account_name="str",
software_update_configuration_name="str",
- api_version="2019-06-01",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -109,12 +109,12 @@ def test_get_by_name(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_delete(self, resource_group):
+ def test_software_update_configurations_delete(self, resource_group):
response = self.client.software_update_configurations.delete(
resource_group_name=resource_group.name,
automation_account_name="str",
software_update_configuration_name="str",
- api_version="2019-06-01",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -122,11 +122,11 @@ def test_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list(self, resource_group):
+ def test_software_update_configurations_list(self, resource_group):
response = self.client.software_update_configurations.list(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2019-06-01",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_software_update_configurations_operations_async.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_software_update_configurations_operations_async.py
index b0026a00f9fd..fb767a9de4b3 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_software_update_configurations_operations_async.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_software_update_configurations_operations_async.py
@@ -21,7 +21,7 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_create(self, resource_group):
+ async def test_software_update_configurations_create(self, resource_group):
response = await self.client.software_update_configurations.create(
resource_group_name=resource_group.name,
automation_account_name="str",
@@ -89,7 +89,7 @@ async def test_create(self, resource_group):
},
"type": "str",
},
- api_version="2019-06-01",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -97,12 +97,12 @@ async def test_create(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get_by_name(self, resource_group):
+ async def test_software_update_configurations_get_by_name(self, resource_group):
response = await self.client.software_update_configurations.get_by_name(
resource_group_name=resource_group.name,
automation_account_name="str",
software_update_configuration_name="str",
- api_version="2019-06-01",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -110,12 +110,12 @@ async def test_get_by_name(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_delete(self, resource_group):
+ async def test_software_update_configurations_delete(self, resource_group):
response = await self.client.software_update_configurations.delete(
resource_group_name=resource_group.name,
automation_account_name="str",
software_update_configuration_name="str",
- api_version="2019-06-01",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -123,11 +123,11 @@ async def test_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list(self, resource_group):
+ async def test_software_update_configurations_list(self, resource_group):
response = await self.client.software_update_configurations.list(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2019-06-01",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_source_control_operations.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_source_control_operations.py
index eccb5dab5a43..832b5e3ca5a8 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_source_control_operations.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_source_control_operations.py
@@ -20,7 +20,7 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_create_or_update(self, resource_group):
+ def test_source_control_create_or_update(self, resource_group):
response = self.client.source_control.create_or_update(
resource_group_name=resource_group.name,
automation_account_name="str",
@@ -35,7 +35,7 @@ def test_create_or_update(self, resource_group):
"securityToken": {"accessToken": "str", "refreshToken": "str", "tokenType": "str"},
"sourceType": "str",
},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -43,7 +43,7 @@ def test_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_update(self, resource_group):
+ def test_source_control_update(self, resource_group):
response = self.client.source_control.update(
resource_group_name=resource_group.name,
automation_account_name="str",
@@ -56,7 +56,7 @@ def test_update(self, resource_group):
"publishRunbook": bool,
"securityToken": {"accessToken": "str", "refreshToken": "str", "tokenType": "str"},
},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -64,12 +64,12 @@ def test_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_delete(self, resource_group):
+ def test_source_control_delete(self, resource_group):
response = self.client.source_control.delete(
resource_group_name=resource_group.name,
automation_account_name="str",
source_control_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -77,12 +77,12 @@ def test_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_source_control_get(self, resource_group):
response = self.client.source_control.get(
resource_group_name=resource_group.name,
automation_account_name="str",
source_control_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -90,11 +90,11 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_by_automation_account(self, resource_group):
+ def test_source_control_list_by_automation_account(self, resource_group):
response = self.client.source_control.list_by_automation_account(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_source_control_operations_async.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_source_control_operations_async.py
index 190f18485aa5..e80832a8689d 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_source_control_operations_async.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_source_control_operations_async.py
@@ -21,7 +21,7 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_create_or_update(self, resource_group):
+ async def test_source_control_create_or_update(self, resource_group):
response = await self.client.source_control.create_or_update(
resource_group_name=resource_group.name,
automation_account_name="str",
@@ -36,7 +36,7 @@ async def test_create_or_update(self, resource_group):
"securityToken": {"accessToken": "str", "refreshToken": "str", "tokenType": "str"},
"sourceType": "str",
},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -44,7 +44,7 @@ async def test_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_update(self, resource_group):
+ async def test_source_control_update(self, resource_group):
response = await self.client.source_control.update(
resource_group_name=resource_group.name,
automation_account_name="str",
@@ -57,7 +57,7 @@ async def test_update(self, resource_group):
"publishRunbook": bool,
"securityToken": {"accessToken": "str", "refreshToken": "str", "tokenType": "str"},
},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -65,12 +65,12 @@ async def test_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_delete(self, resource_group):
+ async def test_source_control_delete(self, resource_group):
response = await self.client.source_control.delete(
resource_group_name=resource_group.name,
automation_account_name="str",
source_control_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -78,12 +78,12 @@ async def test_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_source_control_get(self, resource_group):
response = await self.client.source_control.get(
resource_group_name=resource_group.name,
automation_account_name="str",
source_control_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -91,11 +91,11 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_by_automation_account(self, resource_group):
+ async def test_source_control_list_by_automation_account(self, resource_group):
response = self.client.source_control.list_by_automation_account(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r async for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_source_control_sync_job_operations.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_source_control_sync_job_operations.py
index 6217202a8a9d..fcb2151eaff8 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_source_control_sync_job_operations.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_source_control_sync_job_operations.py
@@ -20,14 +20,14 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_create(self, resource_group):
+ def test_source_control_sync_job_create(self, resource_group):
response = self.client.source_control_sync_job.create(
resource_group_name=resource_group.name,
automation_account_name="str",
source_control_name="str",
source_control_sync_job_id="str",
parameters={"commitId": "str"},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -35,13 +35,13 @@ def test_create(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_source_control_sync_job_get(self, resource_group):
response = self.client.source_control_sync_job.get(
resource_group_name=resource_group.name,
automation_account_name="str",
source_control_name="str",
source_control_sync_job_id="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -49,12 +49,12 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_by_automation_account(self, resource_group):
+ def test_source_control_sync_job_list_by_automation_account(self, resource_group):
response = self.client.source_control_sync_job.list_by_automation_account(
resource_group_name=resource_group.name,
automation_account_name="str",
source_control_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_source_control_sync_job_operations_async.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_source_control_sync_job_operations_async.py
index c9827e3cc2eb..c4b1d44bef2d 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_source_control_sync_job_operations_async.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_source_control_sync_job_operations_async.py
@@ -21,14 +21,14 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_create(self, resource_group):
+ async def test_source_control_sync_job_create(self, resource_group):
response = await self.client.source_control_sync_job.create(
resource_group_name=resource_group.name,
automation_account_name="str",
source_control_name="str",
source_control_sync_job_id="str",
parameters={"commitId": "str"},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -36,13 +36,13 @@ async def test_create(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_source_control_sync_job_get(self, resource_group):
response = await self.client.source_control_sync_job.get(
resource_group_name=resource_group.name,
automation_account_name="str",
source_control_name="str",
source_control_sync_job_id="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -50,12 +50,12 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_by_automation_account(self, resource_group):
+ async def test_source_control_sync_job_list_by_automation_account(self, resource_group):
response = self.client.source_control_sync_job.list_by_automation_account(
resource_group_name=resource_group.name,
automation_account_name="str",
source_control_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r async for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_source_control_sync_job_streams_operations.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_source_control_sync_job_streams_operations.py
index 5c8ca89e9d5c..f8a87bc5d8e3 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_source_control_sync_job_streams_operations.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_source_control_sync_job_streams_operations.py
@@ -20,13 +20,13 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_by_sync_job(self, resource_group):
+ def test_source_control_sync_job_streams_list_by_sync_job(self, resource_group):
response = self.client.source_control_sync_job_streams.list_by_sync_job(
resource_group_name=resource_group.name,
automation_account_name="str",
source_control_name="str",
source_control_sync_job_id="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r for r in response]
# please add some check logic here by yourself
@@ -34,14 +34,14 @@ def test_list_by_sync_job(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_source_control_sync_job_streams_get(self, resource_group):
response = self.client.source_control_sync_job_streams.get(
resource_group_name=resource_group.name,
automation_account_name="str",
source_control_name="str",
source_control_sync_job_id="str",
stream_id="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_source_control_sync_job_streams_operations_async.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_source_control_sync_job_streams_operations_async.py
index 1ba2ea096215..fed19643c5d3 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_source_control_sync_job_streams_operations_async.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_source_control_sync_job_streams_operations_async.py
@@ -21,13 +21,13 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_by_sync_job(self, resource_group):
+ async def test_source_control_sync_job_streams_list_by_sync_job(self, resource_group):
response = self.client.source_control_sync_job_streams.list_by_sync_job(
resource_group_name=resource_group.name,
automation_account_name="str",
source_control_name="str",
source_control_sync_job_id="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r async for r in response]
# please add some check logic here by yourself
@@ -35,14 +35,14 @@ async def test_list_by_sync_job(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_source_control_sync_job_streams_get(self, resource_group):
response = await self.client.source_control_sync_job_streams.get(
resource_group_name=resource_group.name,
automation_account_name="str",
source_control_name="str",
source_control_sync_job_id="str",
stream_id="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_statistics_operations.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_statistics_operations.py
index f3a7397ad834..443a23f9a8e6 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_statistics_operations.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_statistics_operations.py
@@ -20,11 +20,11 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_by_automation_account(self, resource_group):
+ def test_statistics_list_by_automation_account(self, resource_group):
response = self.client.statistics.list_by_automation_account(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_statistics_operations_async.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_statistics_operations_async.py
index 94d1f12747fc..a66f5562eb69 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_statistics_operations_async.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_statistics_operations_async.py
@@ -21,11 +21,11 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_by_automation_account(self, resource_group):
+ async def test_statistics_list_by_automation_account(self, resource_group):
response = self.client.statistics.list_by_automation_account(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r async for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_test_job_operations.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_test_job_operations.py
index 2cbd264dd887..e47226d62abb 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_test_job_operations.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_test_job_operations.py
@@ -20,13 +20,13 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_create(self, resource_group):
+ def test_test_job_create(self, resource_group):
response = self.client.test_job.create(
resource_group_name=resource_group.name,
automation_account_name="str",
runbook_name="str",
- parameters={"parameters": {"str": "str"}, "runOn": "str"},
- api_version="2022-08-08",
+ parameters={"parameters": {"str": "str"}, "runOn": "str", "runtimeEnvironment": "str"},
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -34,12 +34,12 @@ def test_create(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_test_job_get(self, resource_group):
response = self.client.test_job.get(
resource_group_name=resource_group.name,
automation_account_name="str",
runbook_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -47,12 +47,12 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_resume(self, resource_group):
+ def test_test_job_resume(self, resource_group):
response = self.client.test_job.resume(
resource_group_name=resource_group.name,
automation_account_name="str",
runbook_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -60,12 +60,12 @@ def test_resume(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_stop(self, resource_group):
+ def test_test_job_stop(self, resource_group):
response = self.client.test_job.stop(
resource_group_name=resource_group.name,
automation_account_name="str",
runbook_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -73,12 +73,12 @@ def test_stop(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_suspend(self, resource_group):
+ def test_test_job_suspend(self, resource_group):
response = self.client.test_job.suspend(
resource_group_name=resource_group.name,
automation_account_name="str",
runbook_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_test_job_operations_async.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_test_job_operations_async.py
index 4caac8bad20e..06f054e09f45 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_test_job_operations_async.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_test_job_operations_async.py
@@ -21,13 +21,13 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_create(self, resource_group):
+ async def test_test_job_create(self, resource_group):
response = await self.client.test_job.create(
resource_group_name=resource_group.name,
automation_account_name="str",
runbook_name="str",
- parameters={"parameters": {"str": "str"}, "runOn": "str"},
- api_version="2022-08-08",
+ parameters={"parameters": {"str": "str"}, "runOn": "str", "runtimeEnvironment": "str"},
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -35,12 +35,12 @@ async def test_create(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_test_job_get(self, resource_group):
response = await self.client.test_job.get(
resource_group_name=resource_group.name,
automation_account_name="str",
runbook_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -48,12 +48,12 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_resume(self, resource_group):
+ async def test_test_job_resume(self, resource_group):
response = await self.client.test_job.resume(
resource_group_name=resource_group.name,
automation_account_name="str",
runbook_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -61,12 +61,12 @@ async def test_resume(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_stop(self, resource_group):
+ async def test_test_job_stop(self, resource_group):
response = await self.client.test_job.stop(
resource_group_name=resource_group.name,
automation_account_name="str",
runbook_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -74,12 +74,12 @@ async def test_stop(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_suspend(self, resource_group):
+ async def test_test_job_suspend(self, resource_group):
response = await self.client.test_job.suspend(
resource_group_name=resource_group.name,
automation_account_name="str",
runbook_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_test_job_streams_operations.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_test_job_streams_operations.py
index 6c29cc0e7a85..2795f582c7d2 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_test_job_streams_operations.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_test_job_streams_operations.py
@@ -20,13 +20,13 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_test_job_streams_get(self, resource_group):
response = self.client.test_job_streams.get(
resource_group_name=resource_group.name,
automation_account_name="str",
runbook_name="str",
job_stream_id="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -34,12 +34,12 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_by_test_job(self, resource_group):
+ def test_test_job_streams_list_by_test_job(self, resource_group):
response = self.client.test_job_streams.list_by_test_job(
resource_group_name=resource_group.name,
automation_account_name="str",
runbook_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_test_job_streams_operations_async.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_test_job_streams_operations_async.py
index b9d205d4ee79..83ef8f844ffa 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_test_job_streams_operations_async.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_test_job_streams_operations_async.py
@@ -21,13 +21,13 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_test_job_streams_get(self, resource_group):
response = await self.client.test_job_streams.get(
resource_group_name=resource_group.name,
automation_account_name="str",
runbook_name="str",
job_stream_id="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -35,12 +35,12 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_by_test_job(self, resource_group):
+ async def test_test_job_streams_list_by_test_job(self, resource_group):
response = self.client.test_job_streams.list_by_test_job(
resource_group_name=resource_group.name,
automation_account_name="str",
runbook_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r async for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_usages_operations.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_usages_operations.py
index 2199eff6eb48..a33b3a258c03 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_usages_operations.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_usages_operations.py
@@ -20,11 +20,11 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_by_automation_account(self, resource_group):
+ def test_usages_list_by_automation_account(self, resource_group):
response = self.client.usages.list_by_automation_account(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_usages_operations_async.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_usages_operations_async.py
index 90038264454d..9b3fef3a9019 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_usages_operations_async.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_usages_operations_async.py
@@ -21,11 +21,11 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_by_automation_account(self, resource_group):
+ async def test_usages_list_by_automation_account(self, resource_group):
response = self.client.usages.list_by_automation_account(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r async for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_variable_operations.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_variable_operations.py
index 83feff4db0b5..4d56efb1bbb7 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_variable_operations.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_variable_operations.py
@@ -20,13 +20,13 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_create_or_update(self, resource_group):
+ def test_variable_create_or_update(self, resource_group):
response = self.client.variable.create_or_update(
resource_group_name=resource_group.name,
automation_account_name="str",
variable_name="str",
parameters={"name": "str", "description": "str", "isEncrypted": bool, "value": "str"},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -34,13 +34,13 @@ def test_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_update(self, resource_group):
+ def test_variable_update(self, resource_group):
response = self.client.variable.update(
resource_group_name=resource_group.name,
automation_account_name="str",
variable_name="str",
parameters={"description": "str", "name": "str", "value": "str"},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -48,12 +48,12 @@ def test_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_delete(self, resource_group):
+ def test_variable_delete(self, resource_group):
response = self.client.variable.delete(
resource_group_name=resource_group.name,
automation_account_name="str",
variable_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -61,12 +61,12 @@ def test_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_variable_get(self, resource_group):
response = self.client.variable.get(
resource_group_name=resource_group.name,
automation_account_name="str",
variable_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -74,11 +74,11 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_by_automation_account(self, resource_group):
+ def test_variable_list_by_automation_account(self, resource_group):
response = self.client.variable.list_by_automation_account(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_variable_operations_async.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_variable_operations_async.py
index 1e3df50457f4..ee081eedd664 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_variable_operations_async.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_variable_operations_async.py
@@ -21,13 +21,13 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_create_or_update(self, resource_group):
+ async def test_variable_create_or_update(self, resource_group):
response = await self.client.variable.create_or_update(
resource_group_name=resource_group.name,
automation_account_name="str",
variable_name="str",
parameters={"name": "str", "description": "str", "isEncrypted": bool, "value": "str"},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -35,13 +35,13 @@ async def test_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_update(self, resource_group):
+ async def test_variable_update(self, resource_group):
response = await self.client.variable.update(
resource_group_name=resource_group.name,
automation_account_name="str",
variable_name="str",
parameters={"description": "str", "name": "str", "value": "str"},
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -49,12 +49,12 @@ async def test_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_delete(self, resource_group):
+ async def test_variable_delete(self, resource_group):
response = await self.client.variable.delete(
resource_group_name=resource_group.name,
automation_account_name="str",
variable_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -62,12 +62,12 @@ async def test_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_variable_get(self, resource_group):
response = await self.client.variable.get(
resource_group_name=resource_group.name,
automation_account_name="str",
variable_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -75,11 +75,11 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_by_automation_account(self, resource_group):
+ async def test_variable_list_by_automation_account(self, resource_group):
response = self.client.variable.list_by_automation_account(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2022-08-08",
+ api_version="2024-10-23",
)
result = [r async for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_watcher_operations.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_watcher_operations.py
index d7c9ee6897f4..d002dbd12c05 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_watcher_operations.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_watcher_operations.py
@@ -20,7 +20,7 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_create_or_update(self, resource_group):
+ def test_watcher_create_or_update(self, resource_group):
response = self.client.watcher.create_or_update(
resource_group_name=resource_group.name,
automation_account_name="str",
@@ -39,10 +39,18 @@ def test_create_or_update(self, resource_group):
"scriptParameters": {"str": "str"},
"scriptRunOn": "str",
"status": "str",
+ "systemData": {
+ "createdAt": "2020-02-20 00:00:00",
+ "createdBy": "str",
+ "createdByType": "str",
+ "lastModifiedAt": "2020-02-20 00:00:00",
+ "lastModifiedBy": "str",
+ "lastModifiedByType": "str",
+ },
"tags": {"str": "str"},
"type": "str",
},
- api_version="2020-01-13-preview",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -50,12 +58,12 @@ def test_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_watcher_get(self, resource_group):
response = self.client.watcher.get(
resource_group_name=resource_group.name,
automation_account_name="str",
watcher_name="str",
- api_version="2020-01-13-preview",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -63,13 +71,13 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_update(self, resource_group):
+ def test_watcher_update(self, resource_group):
response = self.client.watcher.update(
resource_group_name=resource_group.name,
automation_account_name="str",
watcher_name="str",
parameters={"executionFrequencyInSeconds": 0, "name": "str"},
- api_version="2020-01-13-preview",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -77,12 +85,12 @@ def test_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_delete(self, resource_group):
+ def test_watcher_delete(self, resource_group):
response = self.client.watcher.delete(
resource_group_name=resource_group.name,
automation_account_name="str",
watcher_name="str",
- api_version="2020-01-13-preview",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -90,12 +98,12 @@ def test_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_start(self, resource_group):
+ def test_watcher_start(self, resource_group):
response = self.client.watcher.start(
resource_group_name=resource_group.name,
automation_account_name="str",
watcher_name="str",
- api_version="2020-01-13-preview",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -103,12 +111,12 @@ def test_start(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_stop(self, resource_group):
+ def test_watcher_stop(self, resource_group):
response = self.client.watcher.stop(
resource_group_name=resource_group.name,
automation_account_name="str",
watcher_name="str",
- api_version="2020-01-13-preview",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -116,11 +124,11 @@ def test_stop(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_by_automation_account(self, resource_group):
+ def test_watcher_list_by_automation_account(self, resource_group):
response = self.client.watcher.list_by_automation_account(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2020-01-13-preview",
+ api_version="2024-10-23",
)
result = [r for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_watcher_operations_async.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_watcher_operations_async.py
index 2ad268a76f2e..3ba313cbb92b 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_watcher_operations_async.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_watcher_operations_async.py
@@ -21,7 +21,7 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_create_or_update(self, resource_group):
+ async def test_watcher_create_or_update(self, resource_group):
response = await self.client.watcher.create_or_update(
resource_group_name=resource_group.name,
automation_account_name="str",
@@ -40,10 +40,18 @@ async def test_create_or_update(self, resource_group):
"scriptParameters": {"str": "str"},
"scriptRunOn": "str",
"status": "str",
+ "systemData": {
+ "createdAt": "2020-02-20 00:00:00",
+ "createdBy": "str",
+ "createdByType": "str",
+ "lastModifiedAt": "2020-02-20 00:00:00",
+ "lastModifiedBy": "str",
+ "lastModifiedByType": "str",
+ },
"tags": {"str": "str"},
"type": "str",
},
- api_version="2020-01-13-preview",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -51,12 +59,12 @@ async def test_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_watcher_get(self, resource_group):
response = await self.client.watcher.get(
resource_group_name=resource_group.name,
automation_account_name="str",
watcher_name="str",
- api_version="2020-01-13-preview",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -64,13 +72,13 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_update(self, resource_group):
+ async def test_watcher_update(self, resource_group):
response = await self.client.watcher.update(
resource_group_name=resource_group.name,
automation_account_name="str",
watcher_name="str",
parameters={"executionFrequencyInSeconds": 0, "name": "str"},
- api_version="2020-01-13-preview",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -78,12 +86,12 @@ async def test_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_delete(self, resource_group):
+ async def test_watcher_delete(self, resource_group):
response = await self.client.watcher.delete(
resource_group_name=resource_group.name,
automation_account_name="str",
watcher_name="str",
- api_version="2020-01-13-preview",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -91,12 +99,12 @@ async def test_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_start(self, resource_group):
+ async def test_watcher_start(self, resource_group):
response = await self.client.watcher.start(
resource_group_name=resource_group.name,
automation_account_name="str",
watcher_name="str",
- api_version="2020-01-13-preview",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -104,12 +112,12 @@ async def test_start(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_stop(self, resource_group):
+ async def test_watcher_stop(self, resource_group):
response = await self.client.watcher.stop(
resource_group_name=resource_group.name,
automation_account_name="str",
watcher_name="str",
- api_version="2020-01-13-preview",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -117,11 +125,11 @@ async def test_stop(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_by_automation_account(self, resource_group):
+ async def test_watcher_list_by_automation_account(self, resource_group):
response = self.client.watcher.list_by_automation_account(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2020-01-13-preview",
+ api_version="2024-10-23",
)
result = [r async for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_webhook_operations.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_webhook_operations.py
index 8215ababf7db..57ca9622d150 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_webhook_operations.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_webhook_operations.py
@@ -20,11 +20,11 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_generate_uri(self, resource_group):
+ def test_webhook_generate_uri(self, resource_group):
response = self.client.webhook.generate_uri(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2015-10-31",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -32,12 +32,12 @@ def test_generate_uri(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_delete(self, resource_group):
+ def test_webhook_delete(self, resource_group):
response = self.client.webhook.delete(
resource_group_name=resource_group.name,
automation_account_name="str",
webhook_name="str",
- api_version="2015-10-31",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -45,12 +45,12 @@ def test_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_webhook_get(self, resource_group):
response = self.client.webhook.get(
resource_group_name=resource_group.name,
automation_account_name="str",
webhook_name="str",
- api_version="2015-10-31",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -58,7 +58,7 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_create_or_update(self, resource_group):
+ def test_webhook_create_or_update(self, resource_group):
response = self.client.webhook.create_or_update(
resource_group_name=resource_group.name,
automation_account_name="str",
@@ -72,7 +72,7 @@ def test_create_or_update(self, resource_group):
"runbook": {"name": "str"},
"uri": "str",
},
- api_version="2015-10-31",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -80,7 +80,7 @@ def test_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_update(self, resource_group):
+ def test_webhook_update(self, resource_group):
response = self.client.webhook.update(
resource_group_name=resource_group.name,
automation_account_name="str",
@@ -92,7 +92,7 @@ def test_update(self, resource_group):
"parameters": {"str": "str"},
"runOn": "str",
},
- api_version="2015-10-31",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -100,11 +100,11 @@ def test_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_by_automation_account(self, resource_group):
+ def test_webhook_list_by_automation_account(self, resource_group):
response = self.client.webhook.list_by_automation_account(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2015-10-31",
+ api_version="2024-10-23",
)
result = [r for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_webhook_operations_async.py b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_webhook_operations_async.py
index a9d4126a34c9..a40c58ee18be 100644
--- a/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_webhook_operations_async.py
+++ b/sdk/automation/azure-mgmt-automation/generated_tests/test_automation_webhook_operations_async.py
@@ -21,11 +21,11 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_generate_uri(self, resource_group):
+ async def test_webhook_generate_uri(self, resource_group):
response = await self.client.webhook.generate_uri(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2015-10-31",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -33,12 +33,12 @@ async def test_generate_uri(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_delete(self, resource_group):
+ async def test_webhook_delete(self, resource_group):
response = await self.client.webhook.delete(
resource_group_name=resource_group.name,
automation_account_name="str",
webhook_name="str",
- api_version="2015-10-31",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -46,12 +46,12 @@ async def test_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_webhook_get(self, resource_group):
response = await self.client.webhook.get(
resource_group_name=resource_group.name,
automation_account_name="str",
webhook_name="str",
- api_version="2015-10-31",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -59,7 +59,7 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_create_or_update(self, resource_group):
+ async def test_webhook_create_or_update(self, resource_group):
response = await self.client.webhook.create_or_update(
resource_group_name=resource_group.name,
automation_account_name="str",
@@ -73,7 +73,7 @@ async def test_create_or_update(self, resource_group):
"runbook": {"name": "str"},
"uri": "str",
},
- api_version="2015-10-31",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -81,7 +81,7 @@ async def test_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_update(self, resource_group):
+ async def test_webhook_update(self, resource_group):
response = await self.client.webhook.update(
resource_group_name=resource_group.name,
automation_account_name="str",
@@ -93,7 +93,7 @@ async def test_update(self, resource_group):
"parameters": {"str": "str"},
"runOn": "str",
},
- api_version="2015-10-31",
+ api_version="2024-10-23",
)
# please add some check logic here by yourself
@@ -101,11 +101,11 @@ async def test_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_by_automation_account(self, resource_group):
+ async def test_webhook_list_by_automation_account(self, resource_group):
response = self.client.webhook.list_by_automation_account(
resource_group_name=resource_group.name,
automation_account_name="str",
- api_version="2015-10-31",
+ api_version="2024-10-23",
)
result = [r async for r in response]
# please add some check logic here by yourself
diff --git a/sdk/automation/azure-mgmt-automation/setup.py b/sdk/automation/azure-mgmt-automation/setup.py
index 7a87494ce1bb..4e69a89494da 100644
--- a/sdk/automation/azure-mgmt-automation/setup.py
+++ b/sdk/automation/azure-mgmt-automation/setup.py
@@ -22,11 +22,9 @@
# Version extraction inspired from 'requests'
with open(
- (
- os.path.join(package_folder_path, "version.py")
- if os.path.exists(os.path.join(package_folder_path, "version.py"))
- else os.path.join(package_folder_path, "_version.py")
- ),
+ os.path.join(package_folder_path, "version.py")
+ if os.path.exists(os.path.join(package_folder_path, "version.py"))
+ else os.path.join(package_folder_path, "_version.py"),
"r",
) as fd:
version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1)