Skip to content

Commit

Permalink
CodeGen from PR 14018 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Re-add a previously erroneously removed PUT API for /networkConfig/VirtualNetwork (Azure#14018)

* Add CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck, and site-level virtualNetworkSubnetId field

* Add site-level virtualNetworkSubnetId field

* Tabs vs spaces

* Removing the new property since it's technically a 'breaking change'

* Add changes needed for correct .NET SDK generation issues. Reference PR: Azure/azure-sdk-for-net#20300

* Fix prettier issue.

* Remove breaking changes other than property order changes

* Make it pretty again

* Added new properties SiteConfig.PublicNetworkAccess and Site.virtualNetworkSubnetId to enable azure policy

* Fix prettier and spellcheck issue

* Fix spellcheck issue

* Add virtualNetworkSubnetId prperty to Site objec tmodel

Co-authored-by: Naveed Aziz <[email protected]>
  • Loading branch information
SDKAuto and naveedaz committed May 1, 2021
1 parent 8dd26ca commit afebadb
Show file tree
Hide file tree
Showing 38 changed files with 83,878 additions and 61 deletions.
1 change: 1 addition & 0 deletions sdk/appservice/azure-mgmt-web/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
8 changes: 8 additions & 0 deletions sdk/appservice/azure-mgmt-web/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"autorest": "V2",
"use": "@microsoft.azure/autorest.python@~4.0.71",
"commit": "dceaa75fe47854ad7b0fcc0c7cf38677b4bb181f",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/web/resource-manager/readme.md --keep-version-file --multiapi --no-async --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk [email protected]/[email protected] --version=V2",
"readme": "specification/web/resource-manager/readme.md"
}
113 changes: 74 additions & 39 deletions sdk/appservice/azure-mgmt-web/azure/mgmt/web/_operations_mixin.py

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion sdk/appservice/azure-mgmt-web/azure/mgmt/web/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# --------------------------------------------------------------------------
from .v2016_03_01.models import *
from .v2018_02_01.models import *
from .v2020_09_01.models import *
from .v2020_12_01.models import *
Original file line number Diff line number Diff line change
Expand Up @@ -834,10 +834,10 @@ def get_ownership_identifier(
def create_or_update_ownership_identifier(
self, resource_group_name, domain_name, name, kind=None, ownership_id=None, custom_headers=None, raw=False, **operation_config):
"""Creates an ownership identifier for a domain or updates identifier
details for an existing identifer.
details for an existing identifier.
Creates an ownership identifier for a domain or updates identifier
details for an existing identifer.
details for an existing identifier.
:param resource_group_name: Name of the resource group to which the
resource belongs.
Expand Down Expand Up @@ -972,10 +972,10 @@ def delete_ownership_identifier(
def update_ownership_identifier(
self, resource_group_name, domain_name, name, kind=None, ownership_id=None, custom_headers=None, raw=False, **operation_config):
"""Creates an ownership identifier for a domain or updates identifier
details for an existing identifer.
details for an existing identifier.
Creates an ownership identifier for a domain or updates identifier
details for an existing identifer.
details for an existing identifier.
:param resource_group_name: Name of the resource group to which the
resource belongs.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -824,10 +824,10 @@ def get_ownership_identifier(
def create_or_update_ownership_identifier(
self, resource_group_name, domain_name, name, kind=None, ownership_id=None, custom_headers=None, raw=False, **operation_config):
"""Creates an ownership identifier for a domain or updates identifier
details for an existing identifer.
details for an existing identifier.
Creates an ownership identifier for a domain or updates identifier
details for an existing identifer.
details for an existing identifier.
:param resource_group_name: Name of the resource group to which the
resource belongs.
Expand Down Expand Up @@ -961,10 +961,10 @@ def delete_ownership_identifier(
def update_ownership_identifier(
self, resource_group_name, domain_name, name, kind=None, ownership_id=None, custom_headers=None, raw=False, **operation_config):
"""Creates an ownership identifier for a domain or updates identifier
details for an existing identifer.
details for an existing identifier.
Creates an ownership identifier for a domain or updates identifier
details for an existing identifer.
details for an existing identifier.
:param resource_group_name: Name of the resource group to which the
resource belongs.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -823,10 +823,10 @@ def get_ownership_identifier(
def create_or_update_ownership_identifier(
self, resource_group_name, domain_name, name, kind=None, ownership_id=None, custom_headers=None, raw=False, **operation_config):
"""Creates an ownership identifier for a domain or updates identifier
details for an existing identifer.
details for an existing identifier.
Description for Creates an ownership identifier for a domain or updates
identifier details for an existing identifer.
identifier details for an existing identifier.
:param resource_group_name: Name of the resource group to which the
resource belongs.
Expand Down Expand Up @@ -959,10 +959,10 @@ def delete_ownership_identifier(
def update_ownership_identifier(
self, resource_group_name, domain_name, name, kind=None, ownership_id=None, custom_headers=None, raw=False, **operation_config):
"""Creates an ownership identifier for a domain or updates identifier
details for an existing identifer.
details for an existing identifier.
Description for Creates an ownership identifier for a domain or updates
identifier details for an existing identifer.
identifier details for an existing identifier.
:param resource_group_name: Name of the resource group to which the
resource belongs.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -823,10 +823,10 @@ def get_ownership_identifier(
def create_or_update_ownership_identifier(
self, resource_group_name, domain_name, name, kind=None, ownership_id=None, custom_headers=None, raw=False, **operation_config):
"""Creates an ownership identifier for a domain or updates identifier
details for an existing identifer.
details for an existing identifier.
Description for Creates an ownership identifier for a domain or updates
identifier details for an existing identifer.
identifier details for an existing identifier.
:param resource_group_name: Name of the resource group to which the
resource belongs.
Expand Down Expand Up @@ -959,10 +959,10 @@ def delete_ownership_identifier(
def update_ownership_identifier(
self, resource_group_name, domain_name, name, kind=None, ownership_id=None, custom_headers=None, raw=False, **operation_config):
"""Creates an ownership identifier for a domain or updates identifier
details for an existing identifer.
details for an existing identifier.
Description for Creates an ownership identifier for a domain or updates
identifier details for an existing identifer.
identifier details for an existing identifier.
:param resource_group_name: Name of the resource group to which the
resource belongs.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -823,10 +823,10 @@ def get_ownership_identifier(
def create_or_update_ownership_identifier(
self, resource_group_name, domain_name, name, domain_ownership_identifier, custom_headers=None, raw=False, **operation_config):
"""Creates an ownership identifier for a domain or updates identifier
details for an existing identifer.
details for an existing identifier.
Description for Creates an ownership identifier for a domain or updates
identifier details for an existing identifer.
identifier details for an existing identifier.
:param resource_group_name: Name of the resource group to which the
resource belongs.
Expand Down Expand Up @@ -957,10 +957,10 @@ def delete_ownership_identifier(
def update_ownership_identifier(
self, resource_group_name, domain_name, name, domain_ownership_identifier, custom_headers=None, raw=False, **operation_config):
"""Creates an ownership identifier for a domain or updates identifier
details for an existing identifer.
details for an existing identifier.
Description for Creates an ownership identifier for a domain or updates
identifier details for an existing identifer.
identifier details for an existing identifier.
:param resource_group_name: Name of the resource group to which the
resource belongs.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from ._configuration import WebSiteManagementClientConfiguration
from ._web_site_management_client import WebSiteManagementClient
__all__ = ['WebSiteManagementClient', 'WebSiteManagementClientConfiguration']

from .version import VERSION

__version__ = VERSION

Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from msrestazure import AzureConfiguration

from .version import VERSION


class WebSiteManagementClientConfiguration(AzureConfiguration):
"""Configuration for WebSiteManagementClient
Note that all parameters used to create this instance are saved as instance
attributes.
:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: Your Azure subscription ID. This is a
GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).
:type subscription_id: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, base_url=None):

if credentials is None:
raise ValueError("Parameter 'credentials' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
if not base_url:
base_url = 'https://management.azure.com'

super(WebSiteManagementClientConfiguration, self).__init__(base_url)

# Starting Autorest.Python 4.0.64, make connection pool activated by default
self.keep_alive = True

self.add_user_agent('azure-mgmt-web/{}'.format(VERSION))
self.add_user_agent('Azure-SDK-For-Python')

self.credentials = credentials
self.subscription_id = subscription_id
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.service_client import SDKClient
from msrest import Serializer, Deserializer

from ._configuration import WebSiteManagementClientConfiguration
from .operations import WebSiteManagementClientOperationsMixin
from .operations import AppServiceCertificateOrdersOperations
from .operations import CertificateOrdersDiagnosticsOperations
from .operations import CertificateRegistrationProviderOperations
from .operations import DomainsOperations
from .operations import TopLevelDomainsOperations
from .operations import DomainRegistrationProviderOperations
from .operations import CertificatesOperations
from .operations import DeletedWebAppsOperations
from .operations import DiagnosticsOperations
from .operations import GlobalModelOperations
from .operations import ProviderOperations
from .operations import RecommendationsOperations
from .operations import WebAppsOperations
from .operations import StaticSitesOperations
from .operations import AppServiceEnvironmentsOperations
from .operations import AppServicePlansOperations
from .operations import ResourceHealthMetadataOperations
from . import models


class WebSiteManagementClient(WebSiteManagementClientOperationsMixin, SDKClient):
"""WebSite Management Client
:ivar config: Configuration for client.
:vartype config: WebSiteManagementClientConfiguration
:ivar app_service_certificate_orders: AppServiceCertificateOrders operations
:vartype app_service_certificate_orders: azure.mgmt.web.v2020_12_01.operations.AppServiceCertificateOrdersOperations
:ivar certificate_orders_diagnostics: CertificateOrdersDiagnostics operations
:vartype certificate_orders_diagnostics: azure.mgmt.web.v2020_12_01.operations.CertificateOrdersDiagnosticsOperations
:ivar certificate_registration_provider: CertificateRegistrationProvider operations
:vartype certificate_registration_provider: azure.mgmt.web.v2020_12_01.operations.CertificateRegistrationProviderOperations
:ivar domains: Domains operations
:vartype domains: azure.mgmt.web.v2020_12_01.operations.DomainsOperations
:ivar top_level_domains: TopLevelDomains operations
:vartype top_level_domains: azure.mgmt.web.v2020_12_01.operations.TopLevelDomainsOperations
:ivar domain_registration_provider: DomainRegistrationProvider operations
:vartype domain_registration_provider: azure.mgmt.web.v2020_12_01.operations.DomainRegistrationProviderOperations
:ivar certificates: Certificates operations
:vartype certificates: azure.mgmt.web.v2020_12_01.operations.CertificatesOperations
:ivar deleted_web_apps: DeletedWebApps operations
:vartype deleted_web_apps: azure.mgmt.web.v2020_12_01.operations.DeletedWebAppsOperations
:ivar diagnostics: Diagnostics operations
:vartype diagnostics: azure.mgmt.web.v2020_12_01.operations.DiagnosticsOperations
:ivar global_model: GlobalModel operations
:vartype global_model: azure.mgmt.web.v2020_12_01.operations.GlobalModelOperations
:ivar provider: Provider operations
:vartype provider: azure.mgmt.web.v2020_12_01.operations.ProviderOperations
:ivar recommendations: Recommendations operations
:vartype recommendations: azure.mgmt.web.v2020_12_01.operations.RecommendationsOperations
:ivar web_apps: WebApps operations
:vartype web_apps: azure.mgmt.web.v2020_12_01.operations.WebAppsOperations
:ivar static_sites: StaticSites operations
:vartype static_sites: azure.mgmt.web.v2020_12_01.operations.StaticSitesOperations
:ivar app_service_environments: AppServiceEnvironments operations
:vartype app_service_environments: azure.mgmt.web.v2020_12_01.operations.AppServiceEnvironmentsOperations
:ivar app_service_plans: AppServicePlans operations
:vartype app_service_plans: azure.mgmt.web.v2020_12_01.operations.AppServicePlansOperations
:ivar resource_health_metadata: ResourceHealthMetadata operations
:vartype resource_health_metadata: azure.mgmt.web.v2020_12_01.operations.ResourceHealthMetadataOperations
:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: Your Azure subscription ID. This is a
GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).
:type subscription_id: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, base_url=None):

self.config = WebSiteManagementClientConfiguration(credentials, subscription_id, base_url)
super(WebSiteManagementClient, self).__init__(self.config.credentials, self.config)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '2020-12-01'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.app_service_certificate_orders = AppServiceCertificateOrdersOperations(
self._client, self.config, self._serialize, self._deserialize)
self.certificate_orders_diagnostics = CertificateOrdersDiagnosticsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.certificate_registration_provider = CertificateRegistrationProviderOperations(
self._client, self.config, self._serialize, self._deserialize)
self.domains = DomainsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.top_level_domains = TopLevelDomainsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.domain_registration_provider = DomainRegistrationProviderOperations(
self._client, self.config, self._serialize, self._deserialize)
self.certificates = CertificatesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.deleted_web_apps = DeletedWebAppsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.diagnostics = DiagnosticsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.global_model = GlobalModelOperations(
self._client, self.config, self._serialize, self._deserialize)
self.provider = ProviderOperations(
self._client, self.config, self._serialize, self._deserialize)
self.recommendations = RecommendationsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.web_apps = WebAppsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.static_sites = StaticSitesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.app_service_environments = AppServiceEnvironmentsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.app_service_plans = AppServicePlansOperations(
self._client, self.config, self._serialize, self._deserialize)
self.resource_health_metadata = ResourceHealthMetadataOperations(
self._client, self.config, self._serialize, self._deserialize)
Loading

0 comments on commit afebadb

Please sign in to comment.