forked from Azure/azure-sdk-for-python
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CodeGen from PR 17169 in Azure/azure-rest-api-specs
Add swagger definitions for deletedAutomationAccounts resource type (Azure#17169) * add swagger definitions for deletedAutomationAccounts resource type * fix semantic and model validation error * fix model validation error * fix date format and schema type * fix lint diff error * fix paths * fix lint diff * remove errorresponse schema * add errorresponse schema * add reference in readme * supress error schema * fix URI path to return list of deleted accounts * remove automation account name parameter Co-authored-by: Ravi Yadav <[email protected]>
- Loading branch information
SDKAuto
and
Ravi Yadav
committed
Jan 12, 2022
1 parent
e9ca031
commit 1d8642b
Showing
108 changed files
with
20,503 additions
and
16,966 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"autorest": "3.7.2", | ||
"use": [ | ||
"@autorest/[email protected]", | ||
"@autorest/[email protected]" | ||
], | ||
"commit": "cc7ba44cc488da87e751eb337d1d212df10445a9", | ||
"repository_url": "https://github.com/Azure/azure-rest-api-specs", | ||
"autorest_command": "autorest specification/automation/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --python3-only --track2 --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.7.2", | ||
"readme": "specification/automation/resource-manager/readme.md" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
314 changes: 141 additions & 173 deletions
314
sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_automation_client.py
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
163 changes: 163 additions & 0 deletions
163
sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_metadata.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,163 @@ | ||
{ | ||
"chosen_version": "", | ||
"total_api_version_list": ["2015-10-31", "2018-06-30", "2019-06-01", "2020-01-13-preview", "2021-06-22"], | ||
"client": { | ||
"name": "AutomationClient", | ||
"filename": "_automation_client", | ||
"description": "Automation Client.", | ||
"host_value": "\"https://management.azure.com\"", | ||
"parameterized_host_template": null, | ||
"azure_arm": true, | ||
"has_lro_operations": true, | ||
"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\": [\"AutomationClientConfiguration\"], \"._operations_mixin\": [\"AutomationClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", | ||
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"AutomationClientConfiguration\"], \"._operations_mixin\": [\"AutomationClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" | ||
}, | ||
"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": "Gets subscription credentials which uniquely identify 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": "Gets subscription credentials which uniquely identify 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=\"https://management.azure.com\", # type: 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: str = \"https://management.azure.com\",", | ||
"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_call_sync": "ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)", | ||
"credential_call_async": "AsyncARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)", | ||
"sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMChallengeAuthenticationPolicy\", \"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\", \"AsyncARMChallengeAuthenticationPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" | ||
}, | ||
"operation_groups": { | ||
"private_endpoint_connections": "PrivateEndpointConnectionsOperations", | ||
"private_link_resources": "PrivateLinkResourcesOperations", | ||
"python2_package": "Python2PackageOperations", | ||
"agent_registration_information": "AgentRegistrationInformationOperations", | ||
"dsc_node": "DscNodeOperations", | ||
"node_reports": "NodeReportsOperations", | ||
"dsc_node_configuration": "DscNodeConfigurationOperations", | ||
"dsc_compilation_job": "DscCompilationJobOperations", | ||
"dsc_compilation_job_stream": "DscCompilationJobStreamOperations", | ||
"node_count_information": "NodeCountInformationOperations", | ||
"source_control": "SourceControlOperations", | ||
"source_control_sync_job": "SourceControlSyncJobOperations", | ||
"source_control_sync_job_streams": "SourceControlSyncJobStreamsOperations", | ||
"automation_account": "AutomationAccountOperations", | ||
"statistics": "StatisticsOperations", | ||
"usages": "UsagesOperations", | ||
"keys": "KeysOperations", | ||
"certificate": "CertificateOperations", | ||
"connection": "ConnectionOperations", | ||
"connection_type": "ConnectionTypeOperations", | ||
"credential": "CredentialOperations", | ||
"hybrid_runbook_worker_group": "HybridRunbookWorkerGroupOperations", | ||
"job_schedule": "JobScheduleOperations", | ||
"linked_workspace": "LinkedWorkspaceOperations", | ||
"activity": "ActivityOperations", | ||
"module": "ModuleOperations", | ||
"object_data_types": "ObjectDataTypesOperations", | ||
"fields": "FieldsOperations", | ||
"schedule": "ScheduleOperations", | ||
"variable": "VariableOperations", | ||
"watcher": "WatcherOperations", | ||
"dsc_configuration": "DscConfigurationOperations", | ||
"job": "JobOperations", | ||
"job_stream": "JobStreamOperations", | ||
"operations": "Operations", | ||
"software_update_configurations": "SoftwareUpdateConfigurationsOperations", | ||
"software_update_configuration_runs": "SoftwareUpdateConfigurationRunsOperations", | ||
"software_update_configuration_machine_runs": "SoftwareUpdateConfigurationMachineRunsOperations", | ||
"runbook_draft": "RunbookDraftOperations", | ||
"runbook": "RunbookOperations", | ||
"test_job_streams": "TestJobStreamsOperations", | ||
"test_job": "TestJobOperations", | ||
"webhook": "WebhookOperations", | ||
"hybrid_runbook_workers": "HybridRunbookWorkersOperations" | ||
}, | ||
"operation_mixins": { | ||
"sync_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", | ||
"async_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", | ||
"operations": { | ||
"convert_graph_runbook_content" : { | ||
"sync": { | ||
"signature": "def convert_graph_runbook_content(\n self,\n resource_group_name, # type: str\n automation_account_name, # type: str\n parameters, # type: \"_models.GraphicalRunbookContent\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.GraphicalRunbookContent\"\n", | ||
"doc": "\"\"\"Post operation to serialize or deserialize GraphRunbookContent.\n\n:param resource_group_name: Name of an Azure Resource group.\n:type resource_group_name: str\n:param automation_account_name: The name of the automation account.\n:type automation_account_name: str\n:param parameters: Input data describing the graphical runbook.\n:type parameters: ~azure.mgmt.automation.models.GraphicalRunbookContent\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: GraphicalRunbookContent, or the result of cls(response)\n:rtype: ~azure.mgmt.automation.models.GraphicalRunbookContent\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" | ||
}, | ||
"async": { | ||
"coroutine": true, | ||
"signature": "async def convert_graph_runbook_content(\n self,\n resource_group_name: str,\n automation_account_name: str,\n parameters: \"_models.GraphicalRunbookContent\",\n **kwargs: Any\n) -\u003e \"_models.GraphicalRunbookContent\":\n", | ||
"doc": "\"\"\"Post operation to serialize or deserialize GraphRunbookContent.\n\n:param resource_group_name: Name of an Azure Resource group.\n:type resource_group_name: str\n:param automation_account_name: The name of the automation account.\n:type automation_account_name: str\n:param parameters: Input data describing the graphical runbook.\n:type parameters: ~azure.mgmt.automation.models.GraphicalRunbookContent\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: GraphicalRunbookContent, or the result of cls(response)\n:rtype: ~azure.mgmt.automation.models.GraphicalRunbookContent\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" | ||
}, | ||
"call": "resource_group_name, automation_account_name, parameters" | ||
} | ||
} | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_patch.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# | ||
# The MIT License (MIT) | ||
# | ||
# Permission is hereby granted, free of charge, to any person obtaining a copy | ||
# of this software and associated documentation files (the ""Software""), to | ||
# deal in the Software without restriction, including without limitation the | ||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | ||
# sell copies of the Software, and to permit persons to whom the Software is | ||
# furnished to do so, subject to the following conditions: | ||
# | ||
# The above copyright notice and this permission notice shall be included in | ||
# all copies or substantial portions of the Software. | ||
# | ||
# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS | ||
# IN THE SOFTWARE. | ||
# | ||
# -------------------------------------------------------------------------- | ||
|
||
# This file is used for handwritten extensions to the generated code. Example: | ||
# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md | ||
def patch_sdk(): | ||
pass |
27 changes: 27 additions & 0 deletions
27
sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_vendor.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# -------------------------------------------------------------------------- | ||
# 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.core.pipeline.transport import HttpRequest | ||
|
||
def _convert_request(request, files=None): | ||
data = request.content if not files else None | ||
request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) | ||
if files: | ||
request.set_formdata_body(files) | ||
return request | ||
|
||
def _format_url_section(template, **kwargs): | ||
components = template.split("/") | ||
while components: | ||
try: | ||
return template.format(**kwargs) | ||
except KeyError as key: | ||
formatted_components = template.split("/") | ||
components = [ | ||
c for c in formatted_components if "{}".format(key.args[0]) not in c | ||
] | ||
template = "/".join(components) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.