'Gets the health of a Service Fabric cluster using health chunks.
Gets the health of a Service Fabric cluster using health chunks. The
health evaluation is done based on the input cluster health chunk
query description.
The query description allows users to specify health policies for
evaluating the cluster and its children.
Users can specify very flexible filters to select which cluster
entities to return. The selection can be done based on the entities
health state and based on the hierarchy.
The query can return multi-level children of the entities based on the
specified filters. For example, it can return one application with a
specified name, and for this application, return
only services that are in Error or Warning, and all partitions and
replicas for one of these services.
:param cluster_health_chunk_query_description: Describes the cluster
and application health policies used to evaluate the cluster health
and the filters to select which cluster entities to be returned.
If the cluster health policy is present, it is used to evaluate the
cluster events and the cluster nodes. If not present, the health
evaluation uses the cluster health policy defined in the cluster
manifest or the default cluster health policy.
By default, each application is evaluated using its specific
application health policy, defined in the application manifest, or
the default health policy, if no policy is defined in manifest.
If the application health policy map is specified, and it has an
entry for an application, the specified application health policy
is used to evaluate the application health.
Users can specify very flexible filters to select which cluster
entities to include in response. The selection can be done based on
the entities health state and based on the hierarchy.
The query can return multi-level children of the entities based on
the specified filters. For example, it can return one application
with a specified name, and for this application, return
only services that are in Error or Warning, and all partitions and
replicas for one of these services.
:type cluster_health_chunk_query_description:
:class:`ClusterHealthChunkQueryDescription
<azure.servicefabric.models.ClusterHealthChunkQueryDescription>`
:param timeout: The server timeout for performing the operation in
seconds. This specifies the time duration that the client is willing
to wait for the requested operation to complete. The default value
for this parameter is 60 seconds.
:type timeout: long
: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<msrest:optionsforoperations>`.
:rtype: :class:`ClusterHealthChunk
<azure.servicefabric.models.ClusterHealthChunk>`
:rtype: :class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>`
if raw=true
:raises:
:class:`FabricErrorException<azure.servicefabric.models.FabricErrorException>`'

def get_cluster_health_chunk_using_policy_and_advanced_filters(self, cluster_health_chunk_query_description=None, timeout=60, custom_headers=None, raw=False, **operation_config):

    api_version = '3.0'
    url = '/$/GetClusterHealthChunk'
    query_parameters = {}
    query_parameters['api-version'] = self._serialize.query('api_version', api_version, 'str')
    if (timeout is not None):
        query_parameters['timeout'] = self._serialize.query('timeout', timeout, 'long', maximum=4294967295, minimum=1)
    header_parameters = {}
    header_parameters['Content-Type'] = 'application/json;    charset=utf-8'
    if custom_headers:
        header_parameters.update(custom_headers)
    if (cluster_health_chunk_query_description is not None):
        body_content = self._serialize.body(cluster_health_chunk_query_description, 'ClusterHealthChunkQueryDescription')
    else:
        body_content = None
    request = self._client.post(url, query_parameters)
    response = self._client.send(request, header_parameters, body_content, **operation_config)
    if (response.status_code not in [200]):
        raise models.FabricErrorException(self._deserialize, response)
    deserialized = None
    if (response.status_code == 200):
        deserialized = self._deserialize('ClusterHealthChunk', response)
    if raw:
        client_raw_response = ClientRawResponse(deserialized, response)
        return client_raw_response
    return deserialized
