@distributed_trace_async
async def check_existence(self, resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, resource_type: str, resource_name: str, api_version: str, **kwargs: Any) -> bool:
    'Checks whether a resource exists.\n\n        :param resource_group_name: The name of the resource group containing the resource to check.\n         The name is case insensitive.\n        :type resource_group_name: str\n        :param resource_provider_namespace: The resource provider of the resource to check.\n        :type resource_provider_namespace: str\n        :param parent_resource_path: The parent resource identity.\n        :type parent_resource_path: str\n        :param resource_type: The resource type.\n        :type resource_type: str\n        :param resource_name: The name of the resource to check whether it exists.\n        :type resource_name: str\n        :param api_version: The API version to use for the operation.\n        :type api_version: str\n        :keyword callable cls: A custom type or function that will be passed the direct response\n        :return: bool, or the result of cls(response)\n        :rtype: bool\n        :raises: ~azure.core.exceptions.HttpResponseError\n        '
    cls = kwargs.pop('cls', None)
    error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
    error_map.update(kwargs.pop('error_map', {}))
    request = build_resources_check_existence_request(resource_group_name=resource_group_name, resource_provider_namespace=resource_provider_namespace, parent_resource_path=parent_resource_path, resource_type=resource_type, resource_name=resource_name, subscription_id=self._config.subscription_id, api_version=api_version, template_url=self.check_existence.metadata['url'])
    request = _convert_request(request)
    request.url = self._client.format_url(request.url)
    pipeline_response = (await self._client._pipeline.run(request, stream=False, **kwargs))
    response = pipeline_response.http_response
    if (response.status_code not in [204, 404]):
        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, {})
    return (200 <= response.status_code <= 299)
Checks whether a resource exists.

:param resource_group_name: The name of the resource group containing the resource to check.
 The name is case insensitive.
:type resource_group_name: str
:param resource_provider_namespace: The resource provider of the resource to check.
:type resource_provider_namespace: str
:param parent_resource_path: The parent resource identity.
:type parent_resource_path: str
:param resource_type: The resource type.
:type resource_type: str
:param resource_name: The name of the resource to check whether it exists.
:type resource_name: str
:param api_version: The API version to use for the operation.
:type api_version: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: bool, or the result of cls(response)
:rtype: bool
:raises: ~azure.core.exceptions.HttpResponseError
@distributed_trace_async
async def check_existence(self, resource_group_name: str, resource_provider_namespace: str, parent_resource_path: str, resource_type: str, resource_name: str, api_version: str, **kwargs: Any) -> bool:
    'Checks whether a resource exists.\n\n        :param resource_group_name: The name of the resource group containing the resource to check.\n         The name is case insensitive.\n        :type resource_group_name: str\n        :param resource_provider_namespace: The resource provider of the resource to check.\n        :type resource_provider_namespace: str\n        :param parent_resource_path: The parent resource identity.\n        :type parent_resource_path: str\n        :param resource_type: The resource type.\n        :type resource_type: str\n        :param resource_name: The name of the resource to check whether it exists.\n        :type resource_name: str\n        :param api_version: The API version to use for the operation.\n        :type api_version: str\n        :keyword callable cls: A custom type or function that will be passed the direct response\n        :return: bool, or the result of cls(response)\n        :rtype: bool\n        :raises: ~azure.core.exceptions.HttpResponseError\n        '
    cls = kwargs.pop('cls', None)
    error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
    error_map.update(kwargs.pop('error_map', {}))
    request = build_resources_check_existence_request(resource_group_name=resource_group_name, resource_provider_namespace=resource_provider_namespace, parent_resource_path=parent_resource_path, resource_type=resource_type, resource_name=resource_name, subscription_id=self._config.subscription_id, api_version=api_version, template_url=self.check_existence.metadata['url'])
    request = _convert_request(request)
    request.url = self._client.format_url(request.url)
    pipeline_response = (await self._client._pipeline.run(request, stream=False, **kwargs))
    response = pipeline_response.http_response
    if (response.status_code not in [204, 404]):
        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, {})
    return (200 <= response.status_code <= 299)