def delete(self, resource_group_name, availability_set_name, **kwargs):
    'Delete an availability set.\n\n        :param resource_group_name: The name of the resource group.\n        :type resource_group_name: str\n        :param availability_set_name: The name of the availability set.\n        :type availability_set_name: str\n        :keyword callable cls: A custom type or function that will be passed the direct response\n        :return: None, or the result of cls(response)\n        :rtype: None\n        :raises: ~azure.core.exceptions.HttpResponseError\n        '
    cls = kwargs.pop('cls', None)
    error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
    error_map.update(kwargs.pop('error_map', {}))
    api_version = '2018-10-01'
    url = self.delete.metadata['url']
    path_format_arguments = {'resourceGroupName': self._serialize.url('resource_group_name', resource_group_name, 'str'), 'availabilitySetName': self._serialize.url('availability_set_name', availability_set_name, 'str'), 'subscriptionId': self._serialize.url('self._config.subscription_id', self._config.subscription_id, 'str')}
    url = self._client.format_url(url, **path_format_arguments)
    query_parameters = {}
    query_parameters['api-version'] = self._serialize.query('api_version', api_version, 'str')
    header_parameters = {}
    request = self._client.delete(url, query_parameters, header_parameters)
    pipeline_response = self._client._pipeline.run(request, stream=False, **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)
        raise HttpResponseError(response=response, error_format=ARMErrorFormat)
    if cls:
        return cls(pipeline_response, None, {})
Delete an availability set.

:param resource_group_name: The name of the resource group.
:type resource_group_name: str
:param availability_set_name: The name of the availability set.
:type availability_set_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: None, or the result of cls(response)
:rtype: None
:raises: ~azure.core.exceptions.HttpResponseError
def delete(self, resource_group_name, availability_set_name, **kwargs):
    'Delete an availability set.\n\n        :param resource_group_name: The name of the resource group.\n        :type resource_group_name: str\n        :param availability_set_name: The name of the availability set.\n        :type availability_set_name: str\n        :keyword callable cls: A custom type or function that will be passed the direct response\n        :return: None, or the result of cls(response)\n        :rtype: None\n        :raises: ~azure.core.exceptions.HttpResponseError\n        '
    cls = kwargs.pop('cls', None)
    error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
    error_map.update(kwargs.pop('error_map', {}))
    api_version = '2018-10-01'
    url = self.delete.metadata['url']
    path_format_arguments = {'resourceGroupName': self._serialize.url('resource_group_name', resource_group_name, 'str'), 'availabilitySetName': self._serialize.url('availability_set_name', availability_set_name, 'str'), 'subscriptionId': self._serialize.url('self._config.subscription_id', self._config.subscription_id, 'str')}
    url = self._client.format_url(url, **path_format_arguments)
    query_parameters = {}
    query_parameters['api-version'] = self._serialize.query('api_version', api_version, 'str')
    header_parameters = {}
    request = self._client.delete(url, query_parameters, header_parameters)
    pipeline_response = self._client._pipeline.run(request, stream=False, **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)
        raise HttpResponseError(response=response, error_format=ARMErrorFormat)
    if cls:
        return cls(pipeline_response, None, {})