'The ModifyCacheCluster operation modifies the settings for a
cache cluster. You can use this operation to change one or
more cluster configuration parameters by specifying the
parameters and the new values.
:type cache_cluster_id: string
:param cache_cluster_id: The cache cluster identifier. This value is
stored as a lowercase string.
:type num_cache_nodes: integer
:param num_cache_nodes: The number of cache nodes that the cache
cluster should have. If the value for NumCacheNodes is greater than
the existing number of cache nodes, then more nodes will be added.
If the value is less than the existing number of cache nodes, then
cache nodes will be removed.
If you are removing cache nodes, you must use the CacheNodeIdsToRemove
parameter to provide the IDs of the specific cache nodes to be
removed.
:type cache_node_ids_to_remove: list
:param cache_node_ids_to_remove: A list of cache node IDs to be
removed. A node ID is a numeric identifier (0001, 0002, etc.). This
parameter is only valid when NumCacheNodes is less than the
existing number of cache nodes. The number of cache node IDs
supplied in this parameter must match the difference between the
existing number of cache nodes in the cluster and the value of
NumCacheNodes in the request.
:type cache_security_group_names: list
:param cache_security_group_names: A list of cache security group names
to authorize on this cache cluster. This change is asynchronously
applied as soon as possible.
This parameter can be used only with clusters that are created outside
of an Amazon Virtual Private Cloud (VPC).
Constraints: Must contain no more than 255 alphanumeric characters.
Must not be "Default".
:type security_group_ids: list
:param security_group_ids: Specifies the VPC Security Groups associated
with the cache cluster.
This parameter can be used only with clusters that are created in an
Amazon Virtual Private Cloud (VPC).
:type preferred_maintenance_window: string
:param preferred_maintenance_window: The weekly time range (in UTC)
during which system maintenance can occur. Note that system
maintenance may result in an outage. This change is made
immediately. If you are moving this window to the current time,
there must be at least 120 minutes between the current time and end
of the window to ensure that pending changes are applied.
:type notification_topic_arn: string
:param notification_topic_arn:
The Amazon Resource Name (ARN) of the SNS topic to which notifications
will be sent.
The SNS topic owner must be same as the cache cluster owner.
:type cache_parameter_group_name: string
:param cache_parameter_group_name: The name of the cache parameter
group to apply to this cache cluster. This change is asynchronously
applied as soon as possible for parameters when the
ApplyImmediately parameter is specified as true for this request.
:type notification_topic_status: string
:param notification_topic_status: The status of the Amazon SNS
notification topic. Notifications are sent only if the status is
active .
Valid values: `active` | `inactive`
:type apply_immediately: boolean
:param apply_immediately: If `True`, this parameter causes the
modifications in this request and any pending modifications to be
applied, asynchronously and as soon as possible, regardless of the
PreferredMaintenanceWindow setting for the cache cluster.
If `False`, then changes to the cache cluster are applied on the next
maintenance reboot, or the next failure reboot, whichever occurs
first.
Valid values: `True` | `False`
Default: `False`
:type engine_version: string
:param engine_version: The upgraded version of the cache engine to be
run on the cache cluster nodes.
:type auto_minor_version_upgrade: boolean
:param auto_minor_version_upgrade: If `True`, then minor engine
upgrades will be applied automatically to the cache cluster during
the maintenance window.
Valid values: `True` | `False`
Default: `True`'

def modify_cache_cluster(self, cache_cluster_id, num_cache_nodes=None, cache_node_ids_to_remove=None, cache_security_group_names=None, security_group_ids=None, preferred_maintenance_window=None, notification_topic_arn=None, cache_parameter_group_name=None, notification_topic_status=None, apply_immediately=None, engine_version=None, auto_minor_version_upgrade=None):

    params = {'CacheClusterId': cache_cluster_id}
    if (num_cache_nodes is not None):
        params['NumCacheNodes'] = num_cache_nodes
    if (cache_node_ids_to_remove is not None):
        self.build_list_params(params, cache_node_ids_to_remove, 'CacheNodeIdsToRemove.member')
    if (cache_security_group_names is not None):
        self.build_list_params(params, cache_security_group_names, 'CacheSecurityGroupNames.member')
    if (security_group_ids is not None):
        self.build_list_params(params, security_group_ids, 'SecurityGroupIds.member')
    if (preferred_maintenance_window is not None):
        params['PreferredMaintenanceWindow'] = preferred_maintenance_window
    if (notification_topic_arn is not None):
        params['NotificationTopicArn'] = notification_topic_arn
    if (cache_parameter_group_name is not None):
        params['CacheParameterGroupName'] = cache_parameter_group_name
    if (notification_topic_status is not None):
        params['NotificationTopicStatus'] = notification_topic_status
    if (apply_immediately is not None):
        params['ApplyImmediately'] = str(apply_immediately).lower()
    if (engine_version is not None):
        params['EngineVersion'] = engine_version
    if (auto_minor_version_upgrade is not None):
        params['AutoMinorVersionUpgrade'] = str(auto_minor_version_upgrade).lower()
    return self._make_request(action='ModifyCacheCluster', verb='POST', path='/', params=params)
