'Invokes an administrative command on the given Infrastructure Service
instance.
For clusters that have one or more instances of the Infrastructure
Service configured,
this API provides a way to send infrastructure-specific commands to a
particular
instance of the Infrastructure Service.
Available commands and their corresponding response formats vary
depending upon
the infrastructure on which the cluster is running.
This API supports the Service Fabric platform; it is not meant to be
used directly from your code.
:param command: The text of the command to be invoked. The content of
the command is infrastructure-specific.
:type command: str
:param service_id: The identity of the infrastructure service. This
is  the full name of the infrastructure service without the
\'fabric:\' URI scheme. This parameter required only for the cluster
that have more than one instance of infrastructure service running.
:type service_id: str
: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 callback: When specified, will be called with each chunk of
data that is streamed. The callback should take two arguments, the
bytes of the current chunk of data and the response object. If the
data is uploading, response will be None.
:type callback: Callable[Bytes, response=None]
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:rtype: Generator
:rtype: :class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>`
if raw=true
:raises:
:class:`FabricErrorException<azure.servicefabric.models.FabricErrorException>`'

def invoke_infrastructure_command(self, command, service_id=None, timeout=60, custom_headers=None, raw=False, callback=None, **operation_config):

    api_version = '3.0'
    url = '/$/InvokeInfrastructureCommand'
    query_parameters = {}
    query_parameters['api-version'] = self._serialize.query('api_version', api_version, 'str')
    query_parameters['Command'] = self._serialize.query('command', command, 'str')
    if (service_id is not None):
        query_parameters['ServiceId'] = self._serialize.query('service_id', service_id, '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)
    request = self._client.post(url, query_parameters)
    response = self._client.send(request, header_parameters, **operation_config)
    if (response.status_code not in [200]):
        raise models.FabricErrorException(self._deserialize, response)
    deserialized = None
    if (response.status_code == 200):
        deserialized = self._client.stream_download(response, callback)
    if raw:
        client_raw_response = ClientRawResponse(deserialized, response)
        return client_raw_response
    return deserialized
