Skip to content

Commit

Permalink
[AutoRelease] t2-maintenance-2021-04-20-69227 (#18166)
Browse files Browse the repository at this point in the history
* CodeGen from PR 13982 in Azure/azure-rest-api-specs
maintenance readme t2 config (#13982)

* maintenance readme t2 config

* readme t1 config

* version,CHANGELOG

* shared_requirements conflict change

Co-authored-by: SDKAuto <sdkautomation@microsoft.com>
Co-authored-by: PythonSdkPipelines <PythonSdkPipelines>
Co-authored-by: Zed <601306339@qq.com>
  • Loading branch information
3 people authored Apr 21, 2021
1 parent 127516e commit 81448f0
Show file tree
Hide file tree
Showing 37 changed files with 2,026 additions and 130 deletions.
17 changes: 17 additions & 0 deletions sdk/maintenance/azure-mgmt-maintenance/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Release History

## 1.0.0b2 (2021-04-20)

**Features**

- Model Resource has a new parameter system_data
- Model ApplyUpdate has a new parameter system_data
- Model ConfigurationAssignment has a new parameter system_data
- Model Operation has a new parameter is_data_action
- Model MaintenanceConfiguration has a new parameter system_data
- Model MaintenanceConfiguration has a new parameter install_patches
- Added operation ConfigurationAssignmentsOperations.get_parent
- Added operation ConfigurationAssignmentsOperations.get
- Added operation ApplyUpdatesOperations.list
- Added operation group ConfigurationAssignmentsWithinSubscriptionOperations
- Added operation group ApplyUpdateForResourceGroupOperations
- Added operation group MaintenanceConfigurationsForResourceGroupOperations

## 1.0.0b1 (2020-12-07)

This is beta preview version.
Expand Down
1 change: 1 addition & 0 deletions sdk/maintenance/azure-mgmt-maintenance/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include _meta.json
recursive-include tests *.py *.yaml
include *.md
include azure/__init__.py
Expand Down
2 changes: 1 addition & 1 deletion sdk/maintenance/azure-mgmt-maintenance/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Microsoft Azure SDK for Python

This is the Microsoft Azure MyService Management Client Library.
This is the Microsoft Azure Maintenance Management Client Library.
This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8.
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).

Expand Down
8 changes: 8 additions & 0 deletions sdk/maintenance/azure-mgmt-maintenance/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"autorest": "3.3.0",
"use": "@autorest/python@5.6.6",
"commit": "eb6d68be864349a8fd33d261e90bb2756e904e82",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/maintenance/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.6.6 --version=3.3.0",
"readme": "specification/maintenance/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def __init__(

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2020-07-01-preview"
self.api_version = "2021-04-01-preview"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-maintenance/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,16 @@
from typing import Any, Optional

from azure.core.credentials import TokenCredential
from azure.core.pipeline.transport import HttpRequest, HttpResponse

from ._configuration import MaintenanceClientConfiguration
from .operations import PublicMaintenanceConfigurationsOperations
from .operations import ApplyUpdatesOperations
from .operations import ConfigurationAssignmentsOperations
from .operations import MaintenanceConfigurationsOperations
from .operations import MaintenanceConfigurationsForResourceGroupOperations
from .operations import ApplyUpdateForResourceGroupOperations
from .operations import ConfigurationAssignmentsWithinSubscriptionOperations
from .operations import Operations
from .operations import UpdatesOperations
from . import models
Expand All @@ -38,6 +42,12 @@ class MaintenanceClient(object):
:vartype configuration_assignments: azure.mgmt.maintenance.operations.ConfigurationAssignmentsOperations
:ivar maintenance_configurations: MaintenanceConfigurationsOperations operations
:vartype maintenance_configurations: azure.mgmt.maintenance.operations.MaintenanceConfigurationsOperations
:ivar maintenance_configurations_for_resource_group: MaintenanceConfigurationsForResourceGroupOperations operations
:vartype maintenance_configurations_for_resource_group: azure.mgmt.maintenance.operations.MaintenanceConfigurationsForResourceGroupOperations
:ivar apply_update_for_resource_group: ApplyUpdateForResourceGroupOperations operations
:vartype apply_update_for_resource_group: azure.mgmt.maintenance.operations.ApplyUpdateForResourceGroupOperations
:ivar configuration_assignments_within_subscription: ConfigurationAssignmentsWithinSubscriptionOperations operations
:vartype configuration_assignments_within_subscription: azure.mgmt.maintenance.operations.ConfigurationAssignmentsWithinSubscriptionOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.maintenance.operations.Operations
:ivar updates: UpdatesOperations operations
Expand Down Expand Up @@ -75,11 +85,35 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize)
self.maintenance_configurations = MaintenanceConfigurationsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.maintenance_configurations_for_resource_group = MaintenanceConfigurationsForResourceGroupOperations(
self._client, self._config, self._serialize, self._deserialize)
self.apply_update_for_resource_group = ApplyUpdateForResourceGroupOperations(
self._client, self._config, self._serialize, self._deserialize)
self.configuration_assignments_within_subscription = ConfigurationAssignmentsWithinSubscriptionOperations(
self._client, self._config, self._serialize, self._deserialize)
self.operations = Operations(
self._client, self._config, self._serialize, self._deserialize)
self.updates = UpdatesOperations(
self._client, self._config, self._serialize, self._deserialize)

def _send_request(self, http_request, **kwargs):
# type: (HttpRequest, Any) -> HttpResponse
"""Runs the network request through the client's chained policies.
:param http_request: The network request you want to make. Required.
:type http_request: ~azure.core.pipeline.transport.HttpRequest
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
:return: The response of your network call. Does not do error handling on your response.
:rtype: ~azure.core.pipeline.transport.HttpResponse
"""
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
}
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
stream = kwargs.pop("stream", True)
pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs)
return pipeline_response.http_response

def close(self):
# type: () -> None
self._client.close()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
{
"chosen_version": "2021-04-01-preview",
"total_api_version_list": ["2021-04-01-preview"],
"client": {
"name": "MaintenanceClient",
"filename": "_maintenance_client",
"description": "Maintenance Client.",
"base_url": "\u0027https://management.azure.com\u0027",
"custom_base_url": null,
"azure_arm": true,
"has_lro_operations": false,
"client_side_validation": false,
"sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MaintenanceClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}",
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MaintenanceClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}"
},
"global_parameters": {
"sync": {
"credential": {
"signature": "credential, # type: \"TokenCredential\"",
"description": "Credential needed for the client to connect to Azure.",
"docstring_type": "~azure.core.credentials.TokenCredential",
"required": true
},
"subscription_id": {
"signature": "subscription_id, # type: str",
"description": "Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.",
"docstring_type": "str",
"required": true
}
},
"async": {
"credential": {
"signature": "credential: \"AsyncTokenCredential\",",
"description": "Credential needed for the client to connect to Azure.",
"docstring_type": "~azure.core.credentials_async.AsyncTokenCredential",
"required": true
},
"subscription_id": {
"signature": "subscription_id: str,",
"description": "Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.",
"docstring_type": "str",
"required": true
}
},
"constant": {
},
"call": "credential, subscription_id",
"service_client_specific": {
"sync": {
"api_version": {
"signature": "api_version=None, # type: Optional[str]",
"description": "API version to use if no profile is provided, or if missing in profile.",
"docstring_type": "str",
"required": false
},
"base_url": {
"signature": "base_url=None, # type: Optional[str]",
"description": "Service URL",
"docstring_type": "str",
"required": false
},
"profile": {
"signature": "profile=KnownProfiles.default, # type: KnownProfiles",
"description": "A profile definition, from KnownProfiles to dict.",
"docstring_type": "azure.profiles.KnownProfiles",
"required": false
}
},
"async": {
"api_version": {
"signature": "api_version: Optional[str] = None,",
"description": "API version to use if no profile is provided, or if missing in profile.",
"docstring_type": "str",
"required": false
},
"base_url": {
"signature": "base_url: Optional[str] = None,",
"description": "Service URL",
"docstring_type": "str",
"required": false
},
"profile": {
"signature": "profile: KnownProfiles = KnownProfiles.default,",
"description": "A profile definition, from KnownProfiles to dict.",
"docstring_type": "azure.profiles.KnownProfiles",
"required": false
}
}
}
},
"config": {
"credential": true,
"credential_scopes": ["https://management.azure.com/.default"],
"credential_default_policy_type": "BearerTokenCredentialPolicy",
"credential_default_policy_type_has_async_version": true,
"credential_key_header_name": null,
"sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}",
"async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}"
},
"operation_groups": {
"public_maintenance_configurations": "PublicMaintenanceConfigurationsOperations",
"apply_updates": "ApplyUpdatesOperations",
"configuration_assignments": "ConfigurationAssignmentsOperations",
"maintenance_configurations": "MaintenanceConfigurationsOperations",
"maintenance_configurations_for_resource_group": "MaintenanceConfigurationsForResourceGroupOperations",
"apply_update_for_resource_group": "ApplyUpdateForResourceGroupOperations",
"configuration_assignments_within_subscription": "ConfigurationAssignmentsWithinSubscriptionOperations",
"operations": "Operations",
"updates": "UpdatesOperations"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "1.0.0b1"

VERSION = "1.0.0b2"
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2020-07-01-preview"
self.api_version = "2021-04-01-preview"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-maintenance/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from typing import Any, Optional, TYPE_CHECKING

from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
from azure.mgmt.core import AsyncARMPipelineClient
from msrest import Deserializer, Serializer

Expand All @@ -20,6 +21,9 @@
from .operations import ApplyUpdatesOperations
from .operations import ConfigurationAssignmentsOperations
from .operations import MaintenanceConfigurationsOperations
from .operations import MaintenanceConfigurationsForResourceGroupOperations
from .operations import ApplyUpdateForResourceGroupOperations
from .operations import ConfigurationAssignmentsWithinSubscriptionOperations
from .operations import Operations
from .operations import UpdatesOperations
from .. import models
Expand All @@ -36,6 +40,12 @@ class MaintenanceClient(object):
:vartype configuration_assignments: azure.mgmt.maintenance.aio.operations.ConfigurationAssignmentsOperations
:ivar maintenance_configurations: MaintenanceConfigurationsOperations operations
:vartype maintenance_configurations: azure.mgmt.maintenance.aio.operations.MaintenanceConfigurationsOperations
:ivar maintenance_configurations_for_resource_group: MaintenanceConfigurationsForResourceGroupOperations operations
:vartype maintenance_configurations_for_resource_group: azure.mgmt.maintenance.aio.operations.MaintenanceConfigurationsForResourceGroupOperations
:ivar apply_update_for_resource_group: ApplyUpdateForResourceGroupOperations operations
:vartype apply_update_for_resource_group: azure.mgmt.maintenance.aio.operations.ApplyUpdateForResourceGroupOperations
:ivar configuration_assignments_within_subscription: ConfigurationAssignmentsWithinSubscriptionOperations operations
:vartype configuration_assignments_within_subscription: azure.mgmt.maintenance.aio.operations.ConfigurationAssignmentsWithinSubscriptionOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.maintenance.aio.operations.Operations
:ivar updates: UpdatesOperations operations
Expand Down Expand Up @@ -72,11 +82,34 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize)
self.maintenance_configurations = MaintenanceConfigurationsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.maintenance_configurations_for_resource_group = MaintenanceConfigurationsForResourceGroupOperations(
self._client, self._config, self._serialize, self._deserialize)
self.apply_update_for_resource_group = ApplyUpdateForResourceGroupOperations(
self._client, self._config, self._serialize, self._deserialize)
self.configuration_assignments_within_subscription = ConfigurationAssignmentsWithinSubscriptionOperations(
self._client, self._config, self._serialize, self._deserialize)
self.operations = Operations(
self._client, self._config, self._serialize, self._deserialize)
self.updates = UpdatesOperations(
self._client, self._config, self._serialize, self._deserialize)

async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse:
"""Runs the network request through the client's chained policies.
:param http_request: The network request you want to make. Required.
:type http_request: ~azure.core.pipeline.transport.HttpRequest
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
:return: The response of your network call. Does not do error handling on your response.
:rtype: ~azure.core.pipeline.transport.AsyncHttpResponse
"""
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
}
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
stream = kwargs.pop("stream", True)
pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs)
return pipeline_response.http_response

async def close(self) -> None:
await self._client.close()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
from ._apply_updates_operations import ApplyUpdatesOperations
from ._configuration_assignments_operations import ConfigurationAssignmentsOperations
from ._maintenance_configurations_operations import MaintenanceConfigurationsOperations
from ._maintenance_configurations_for_resource_group_operations import MaintenanceConfigurationsForResourceGroupOperations
from ._apply_update_for_resource_group_operations import ApplyUpdateForResourceGroupOperations
from ._configuration_assignments_within_subscription_operations import ConfigurationAssignmentsWithinSubscriptionOperations
from ._operations import Operations
from ._updates_operations import UpdatesOperations

Expand All @@ -18,6 +21,9 @@
'ApplyUpdatesOperations',
'ConfigurationAssignmentsOperations',
'MaintenanceConfigurationsOperations',
'MaintenanceConfigurationsForResourceGroupOperations',
'ApplyUpdateForResourceGroupOperations',
'ConfigurationAssignmentsWithinSubscriptionOperations',
'Operations',
'UpdatesOperations',
]
Loading

0 comments on commit 81448f0

Please sign in to comment.