'Deactivate a Service Fabric cluster node with the specified
deactivation intent.
Deactivate a Service Fabric cluster node with the specified
deactivation intent. Once the deactivation is in progress, the
deactivation intent can be increased, but not decreased (for example,
a node which is was deactivated with the Pause intent can be
deactivated further with Restart, but not the other way around. Nodes
may be reactivated using the Activate a node operation any time after
they are deactivated. If the deactivation is not complete this will
cancel the deactivation. A node which goes down and comes back up
while deactivated will still need to be reactivated before services
will be placed on that node.
:param node_name: The name of the node.
:type node_name: 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 deactivation_intent: Describes the intent or reason for
deactivating the node. The possible values are following.
- Pause - Indicates that the node should be paused. The value is 1.
- Restart - Indicates that the intent is for the node to be
restarted after a short period of time. The value is 2.
- RemoveData - Indicates the intent is for the node to remove data.
The value is 3.
. Possible values include: \'Pause\', \'Restart\', \'RemoveData\'
:type deactivation_intent: str
: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: None
:rtype: :class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>`
if raw=true
:raises:
:class:`FabricErrorException<azure.servicefabric.models.FabricErrorException>`'

def disable_node(self, node_name, timeout=60, deactivation_intent=None, custom_headers=None, raw=False, **operation_config):

    deactivation_intent_description = models.DeactivationIntentDescription(deactivation_intent=deactivation_intent)
    api_version = '3.0'
    url = '/Nodes/{nodeName}/$/Deactivate'
    path_format_arguments = {'nodeName': self._serialize.url('node_name', node_name, 'str')}
    url = self._client.format_url(url, **path_format_arguments)
    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)
    body_content = self._serialize.body(deactivation_intent_description, 'DeactivationIntentDescription')
    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)
    if raw:
        client_raw_response = ClientRawResponse(None, response)
        return client_raw_response
