diff --git a/azure-mgmt-web/azure/mgmt/web/models/__init__.py b/azure-mgmt-web/azure/mgmt/web/models/__init__.py index 58b92b79aa50..0d022dec333e 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/__init__.py +++ b/azure-mgmt-web/azure/mgmt/web/models/__init__.py @@ -201,6 +201,7 @@ AutoHealActionType, ConnectionStringType, SslState, + HostType, OperationStatus, UsageState, SiteAvailabilityState, @@ -425,6 +426,7 @@ 'AutoHealActionType', 'ConnectionStringType', 'SslState', + 'HostType', 'OperationStatus', 'UsageState', 'SiteAvailabilityState', diff --git a/azure-mgmt-web/azure/mgmt/web/models/host_name_ssl_state.py b/azure-mgmt-web/azure/mgmt/web/models/host_name_ssl_state.py index 5894f11ab8b1..af85a53f2f8f 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/host_name_ssl_state.py +++ b/azure-mgmt-web/azure/mgmt/web/models/host_name_ssl_state.py @@ -27,6 +27,9 @@ class HostNameSslState(Model): :type thumbprint: str :param to_update: Set to true to update existing hostname. :type to_update: bool + :param host_type: Indicates whether the hostname is a standard or + repository hostname. Possible values include: 'Standard', 'Repository' + :type host_type: str or :class:`HostType ` """ _attribute_map = { @@ -35,11 +38,13 @@ class HostNameSslState(Model): 'virtual_ip': {'key': 'virtualIP', 'type': 'str'}, 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, 'to_update': {'key': 'toUpdate', 'type': 'bool'}, + 'host_type': {'key': 'hostType', 'type': 'HostType'}, } - def __init__(self, name=None, ssl_state=None, virtual_ip=None, thumbprint=None, to_update=None): + def __init__(self, name=None, ssl_state=None, virtual_ip=None, thumbprint=None, to_update=None, host_type=None): self.name = name self.ssl_state = ssl_state self.virtual_ip = virtual_ip self.thumbprint = thumbprint self.to_update = to_update + self.host_type = host_type diff --git a/azure-mgmt-web/azure/mgmt/web/models/web_site_management_client_enums.py b/azure-mgmt-web/azure/mgmt/web/models/web_site_management_client_enums.py index f21dad57ea27..ac18d628209d 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/web_site_management_client_enums.py +++ b/azure-mgmt-web/azure/mgmt/web/models/web_site_management_client_enums.py @@ -144,6 +144,12 @@ class SslState(Enum): ip_based_enabled = "IpBasedEnabled" +class HostType(Enum): + + standard = "Standard" + repository = "Repository" + + class OperationStatus(Enum): in_progress = "InProgress" diff --git a/azure-mgmt-web/azure/mgmt/web/web_site_management_client.py b/azure-mgmt-web/azure/mgmt/web/web_site_management_client.py index 270215c02a3e..1baa7f35d1d8 100644 --- a/azure-mgmt-web/azure/mgmt/web/web_site_management_client.py +++ b/azure-mgmt-web/azure/mgmt/web/web_site_management_client.py @@ -127,6 +127,122 @@ def __init__( self.deleted_web_apps = DeletedWebAppsOperations( self._client, self.config, self._serialize, self._deserialize) + def get_publishing_user( + self, custom_headers=None, raw=False, **operation_config): + """Gets publishing user. + + Gets publishing user. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :rtype: :class:`User ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + api_version = "2016-03-01" + + # Construct URL + url = '/providers/Microsoft.Web/publishingUsers/web' + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('User', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update_publishing_user( + self, user_details, custom_headers=None, raw=False, **operation_config): + """Updates publishing user. + + Updates publishing user. + + :param user_details: Details of publishing user + :type user_details: :class:`User ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :rtype: :class:`User ` + :rtype: :class:`ClientRawResponse` + if raw=true + :raises: :class:`CloudError` + """ + api_version = "2016-03-01" + + # Construct URL + url = '/providers/Microsoft.Web/publishingUsers/web' + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(user_details, 'User') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('User', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + def list_source_controls( self, custom_headers=None, raw=False, **operation_config): """Gets the source controls available for Azure websites. @@ -382,7 +498,7 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters) + request = self._client.get(url, query_parameters) response = self._client.send( request, header_parameters, **operation_config) @@ -470,131 +586,6 @@ def internal_paging(next_link=None, raw=False): return deserialized - def get_publishing_credentials( - self, custom_headers=None, raw=False, **operation_config): - """Get the publishing credentials for the subscription owner. - - Get the publishing credentials for the subscription owner. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :rtype: :class:`User ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - api_version = "2016-03-01" - - # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Web/publishingCredentials' - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('User', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update_publishing_credentials( - self, request_message, custom_headers=None, raw=False, **operation_config): - """Update the publishing credentials for the subscription owner. - - Update the publishing credentials for the subscription owner. - - :param request_message: A request message with the new publishing - credentials. - :type request_message: :class:`User ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :rtype: :class:`User ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - api_version = "2016-03-01" - - # Construct URL - url = '/subscriptions/{subscriptionId}/providers/Microsoft.Web/publishingCredentials' - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request_message, 'User') - - # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('User', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - def list_skus( self, custom_headers=None, raw=False, **operation_config): """List all SKUs.