modify_cache_cluster ( $cache_cluster_id, $opt )

Modifies the Cache Cluster settings. You can change one or more Cache Cluster configuration parameters by specifying the parameters and the new values in the request.

Access

public

Parameters

Parameter

Type

Required

Description

$cache_cluster_id

string

Required

The Cache Cluster identifier. This value is stored as a lowercase string.

$opt

array

Optional

An associative array of parameters that can have the following keys:

  • NumCacheNodes - integer - Optional - The number of Cache Nodes the Cache Cluster should have. If NumCacheNodes is greater than the existing number of Cache Nodes, Cache Nodes will be added. If NumCacheNodes is less than the existing number of Cache Nodes, Cache Nodes will be removed. When removing Cache Nodes, the Ids of the specific Cache Nodes to be removed must be supplied using the CacheNodeIdsToRemove parameter.
  • CacheNodeIdsToRemove - string|array - Optional - The list of Cache Node IDs to be removed. 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 new NumCacheNodes requested. Pass a string for a single value, or an indexed array for multiple values.
  • CacheSecurityGroupNames - string|array - Optional - 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”. Pass a string for a single value, or an indexed array for multiple values.
  • SecurityGroupIds - string|array - Optional - 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). Pass a string for a single value, or an indexed array for multiple values.
  • PreferredMaintenanceWindow - string - Optional - The weekly time range (in UTC) during which system maintenance can occur, which may result in an outage. This change is made immediately. If 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 pending changes are applied.
  • NotificationTopicArn - string - Optional - 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.

  • CacheParameterGroupName - string - Optional - 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.
  • NotificationTopicStatus - string - Optional - The status of the Amazon SNS notification topic. The value can be active or inactive. Notifications are sent only if the status is active.
  • ApplyImmediately - boolean - Optional - Specifies whether or not the modifications in this request and any pending modifications are asynchronously applied as soon as possible, regardless of the PreferredMaintenanceWindow setting for the Cache Cluster. If this parameter is passed as false, changes to the Cache Cluster are applied on the next maintenance reboot, or the next failure reboot, whichever occurs first. Default: false
  • EngineVersion - string - Optional - The version of the cache engine to upgrade this cluster to.
  • AutoMinorVersionUpgrade - boolean - Optional - Indicates that minor engine upgrades will be applied automatically to the Cache Cluster during the maintenance window. Default: true
  • curlopts - array - Optional - A set of values to pass directly into curl_setopt(), where the key is a pre-defined CURLOPT_* constant.
  • returnCurlHandle - boolean - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.

Returns

Type

Description

CFResponse

A CFResponse object containing a parsed HTTP response.

Source

Method defined in services/elasticache.class.php | Toggle source view (34 lines) | View on GitHub

public function modify_cache_cluster($cache_cluster_id, $opt = null)
{
    if (!$opt) $opt = array();
    $opt['CacheClusterId'] = $cache_cluster_id;
    
    // Optional list (non-map)
    if (isset($opt['CacheNodeIdsToRemove']))
    {
        $opt = array_merge($opt, CFComplexType::map(array(
            'CacheNodeIdsToRemove' => (is_array($opt['CacheNodeIdsToRemove']) ? $opt['CacheNodeIdsToRemove'] : array($opt['CacheNodeIdsToRemove']))
        ), 'member'));
        unset($opt['CacheNodeIdsToRemove']);
    }
    
    // Optional list (non-map)
    if (isset($opt['CacheSecurityGroupNames']))
    {
        $opt = array_merge($opt, CFComplexType::map(array(
            'CacheSecurityGroupNames' => (is_array($opt['CacheSecurityGroupNames']) ? $opt['CacheSecurityGroupNames'] : array($opt['CacheSecurityGroupNames']))
        ), 'member'));
        unset($opt['CacheSecurityGroupNames']);
    }
    
    // Optional list (non-map)
    if (isset($opt['SecurityGroupIds']))
    {
        $opt = array_merge($opt, CFComplexType::map(array(
            'SecurityGroupIds' => (is_array($opt['SecurityGroupIds']) ? $opt['SecurityGroupIds'] : array($opt['SecurityGroupIds']))
        ), 'member'));
        unset($opt['SecurityGroupIds']);
    }

    return $this->authenticate('ModifyCacheCluster', $opt);
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback