Amazon ElastiCache

2016/05/26 - Amazon ElastiCache - 3 updated api methods

Changes  Update elasticache client to latest version

CopySnapshot (updated) Link ¶
Changes (request)
{'TargetBucket': 'string'}

The CopySnapshot action makes a copy of an existing snapshot.

Erorr Message:

  • Error Message: The authenticated user does not have sufficient permissions to perform the desired activity. Solution: Contact your system administrator to get the needed permissions.

Request Syntax

client.copy_snapshot(
    SourceSnapshotName='string',
    TargetSnapshotName='string',
    TargetBucket='string'
)
type SourceSnapshotName:

string

param SourceSnapshotName:

[REQUIRED]

The name of an existing snapshot from which to make a copy.

type TargetSnapshotName:

string

param TargetSnapshotName:

[REQUIRED]

A name for the snapshot copy. ElastiCache does not permit overwriting a snapshot, therefore this name must be unique within its context - ElastiCache or an Amazon S3 bucket if exporting.

Error Message

  • Error Message: The S3 bucket %s already contains an object with key %s. Solution: Give the TargetSnapshotName a new and unique value. If exporting a snapshot, you could alternatively create a new Amazon S3 bucket and use this same value for TargetSnapshotName.

type TargetBucket:

string

param TargetBucket:

The Amazon S3 bucket to which the snapshot will be exported. This parameter is used only when exporting a snapshot for external access.

When using this parameter to export a snapshot, be sure Amazon ElastiCache has the needed permissions to this S3 bucket. For more information, see Step 2: Grant ElastiCache Access to Your Amazon S3 Bucket in the Amazon ElastiCache User Guide.

Error Messages:

You could receive one of the following error messages.

Erorr Messages

  • Error Message: ElastiCache has not been granted READ permissions %s on the S3 Bucket. Solution: Add List and Read permissions on the bucket.

  • Error Message: ElastiCache has not been granted WRITE permissions %s on the S3 Bucket. Solution: Add Upload/Delete permissions on the bucket.

  • Error Message: ElastiCache has not been granted READ_ACP permissions %s on the S3 Bucket. Solution: Add View Permissions permissions on the bucket.

  • Error Message: The S3 bucket %s is outside of the region. Solution: Before exporting your snapshot, create a new Amazon S3 bucket in the same region as your snapshot. For more information, see Step 1: Create an Amazon S3 Bucket.

  • Error Message: The S3 bucket %s does not exist. Solution: Create an Amazon S3 bucket in the same region as your snapshot. For more information, see Step 1: Create an Amazon S3 Bucket.

  • Error Message: The S3 bucket %s is not owned by the authenticated user. Solution: Create an Amazon S3 bucket in the same region as your snapshot. For more information, see Step 1: Create an Amazon S3 Bucket.

  • Error Message: The authenticated user does not have sufficient permissions to perform the desired activity. Solution: Contact your system administrator to get the needed permissions.

For more information, see Exporting a Snapshot in the Amazon ElastiCache User Guide.

rtype:

dict

returns:

Response Syntax

{
    'Snapshot': {
        'SnapshotName': 'string',
        'CacheClusterId': 'string',
        'SnapshotStatus': 'string',
        'SnapshotSource': 'string',
        'CacheNodeType': 'string',
        'Engine': 'string',
        'EngineVersion': 'string',
        'NumCacheNodes': 123,
        'PreferredAvailabilityZone': 'string',
        'CacheClusterCreateTime': datetime(2015, 1, 1),
        'PreferredMaintenanceWindow': 'string',
        'TopicArn': 'string',
        'Port': 123,
        'CacheParameterGroupName': 'string',
        'CacheSubnetGroupName': 'string',
        'VpcId': 'string',
        'AutoMinorVersionUpgrade': True|False,
        'SnapshotRetentionLimit': 123,
        'SnapshotWindow': 'string',
        'NodeSnapshots': [
            {
                'CacheNodeId': 'string',
                'CacheSize': 'string',
                'CacheNodeCreateTime': datetime(2015, 1, 1),
                'SnapshotCreateTime': datetime(2015, 1, 1)
            },
        ]
    }
}

Response Structure

  • (dict) --

    • Snapshot (dict) --

      Represents a copy of an entire cache cluster as of the time when the snapshot was taken.

      • SnapshotName (string) --

        The name of a snapshot. For an automatic snapshot, the name is system-generated; for a manual snapshot, this is the user-provided name.

      • CacheClusterId (string) --

        The user-supplied identifier of the source cache cluster.

      • SnapshotStatus (string) --

        The status of the snapshot. Valid values: creating | available | restoring | copying | deleting.

      • SnapshotSource (string) --

        Indicates whether the snapshot is from an automatic backup ( automated) or was created manually ( manual).

      • CacheNodeType (string) --

        The name of the compute and memory capacity node type for the source cache cluster.

        Valid node types are as follows:

        • General purpose:

          • Current generation: cache.t2.micro, cache.t2.small, cache.t2.medium, cache.m3.medium, cache.m3.large, cache.m3.xlarge, cache.m3.2xlarge

          • Previous generation: cache.t1.micro, cache.m1.small, cache.m1.medium, cache.m1.large, cache.m1.xlarge

        • Compute optimized: cache.c1.xlarge

        • Memory optimized:

          • Current generation: cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, cache.r3.4xlarge, cache.r3.8xlarge

          • Previous generation: cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge

        Notes:

        • All t2 instances are created in an Amazon Virtual Private Cloud (VPC).

        • Redis backup/restore is not supported for t2 instances.

        • Redis Append-only files (AOF) functionality is not supported for t1 or t2 instances.

        For a complete listing of cache node types and specifications, see Amazon ElastiCache Product Features and Details and Cache Node Type-Specific Parameters for Memcached or Cache Node Type-Specific Parameters for Redis.

      • Engine (string) --

        The name of the cache engine (memcached or redis) used by the source cache cluster.

      • EngineVersion (string) --

        The version of the cache engine version that is used by the source cache cluster.

      • NumCacheNodes (integer) --

        The number of cache nodes in the source cache cluster.

        For clusters running Redis, this value must be 1. For clusters running Memcached, this value must be between 1 and 20.

      • PreferredAvailabilityZone (string) --

        The name of the Availability Zone in which the source cache cluster is located.

      • CacheClusterCreateTime (datetime) --

        The date and time when the source cache cluster was created.

      • PreferredMaintenanceWindow (string) --

        Specifies the weekly time range during which maintenance on the cache cluster is performed. It is specified as a range in the format ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). The minimum maintenance window is a 60 minute period. Valid values for ddd are:

        • sun

        • mon

        • tue

        • wed

        • thu

        • fri

        • sat

        Example: sun:05:00-sun:09:00

      • TopicArn (string) --

        The Amazon Resource Name (ARN) for the topic used by the source cache cluster for publishing notifications.

      • Port (integer) --

        The port number used by each cache nodes in the source cache cluster.

      • CacheParameterGroupName (string) --

        The cache parameter group that is associated with the source cache cluster.

      • CacheSubnetGroupName (string) --

        The name of the cache subnet group associated with the source cache cluster.

      • VpcId (string) --

        The Amazon Virtual Private Cloud identifier (VPC ID) of the cache subnet group for the source cache cluster.

      • AutoMinorVersionUpgrade (boolean) --

        This parameter is currently disabled.

      • SnapshotRetentionLimit (integer) --

        For an automatic snapshot, the number of days for which ElastiCache will retain the snapshot before deleting it.

        For manual snapshots, this field reflects the SnapshotRetentionLimit for the source cache cluster when the snapshot was created. This field is otherwise ignored: Manual snapshots do not expire, and can only be deleted using the DeleteSnapshot action.

        Important If the value of SnapshotRetentionLimit is set to zero (0), backups are turned off.

      • SnapshotWindow (string) --

        The daily time range during which ElastiCache takes daily snapshots of the source cache cluster.

      • NodeSnapshots (list) --

        A list of the cache nodes in the source cache cluster.

        • (dict) --

          Represents an individual cache node in a snapshot of a cache cluster.

          • CacheNodeId (string) --

            The cache node identifier for the node in the source cache cluster.

          • CacheSize (string) --

            The size of the cache on the source cache node.

          • CacheNodeCreateTime (datetime) --

            The date and time when the cache node was created in the source cache cluster.

          • SnapshotCreateTime (datetime) --

            The date and time when the source node's metadata and cache data set was obtained for the snapshot.

DescribeCacheParameters (updated) Link ¶
Changes (response)
{'CacheNodeTypeSpecificParameters': {'ChangeType': 'immediate | '
                                                   'requires-reboot'},
 'Parameters': {'ChangeType': 'immediate | requires-reboot'}}

The DescribeCacheParameters action returns the detailed parameter list for a particular cache parameter group.

Request Syntax

client.describe_cache_parameters(
    CacheParameterGroupName='string',
    Source='string',
    MaxRecords=123,
    Marker='string'
)
type CacheParameterGroupName:

string

param CacheParameterGroupName:

[REQUIRED]

The name of a specific cache parameter group to return details for.

type Source:

string

param Source:

The parameter types to return.

Valid values: user | system | engine-default

type MaxRecords:

integer

param MaxRecords:

The maximum number of brecords to include in the response. If more records exist than the specified MaxRecords value, a marker is included in the response so that the remaining results can be retrieved.

Default: 100

Constraints: minimum 20; maximum 100.

type Marker:

string

param Marker:

An optional marker returned from a prior request. Use this marker for pagination of results from this action. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords.

rtype:

dict

returns:

Response Syntax

{
    'Marker': 'string',
    'Parameters': [
        {
            'ParameterName': 'string',
            'ParameterValue': 'string',
            'Description': 'string',
            'Source': 'string',
            'DataType': 'string',
            'AllowedValues': 'string',
            'IsModifiable': True|False,
            'MinimumEngineVersion': 'string',
            'ChangeType': 'immediate'|'requires-reboot'
        },
    ],
    'CacheNodeTypeSpecificParameters': [
        {
            'ParameterName': 'string',
            'Description': 'string',
            'Source': 'string',
            'DataType': 'string',
            'AllowedValues': 'string',
            'IsModifiable': True|False,
            'MinimumEngineVersion': 'string',
            'CacheNodeTypeSpecificValues': [
                {
                    'CacheNodeType': 'string',
                    'Value': 'string'
                },
            ],
            'ChangeType': 'immediate'|'requires-reboot'
        },
    ]
}

Response Structure

  • (dict) --

    Represents the output of a DescribeCacheParameters action.

    • Marker (string) --

      Provides an identifier to allow retrieval of paginated results.

    • Parameters (list) --

      A list of Parameter instances.

      • (dict) --

        Describes an individual setting that controls some aspect of ElastiCache behavior.

        • ParameterName (string) --

          The name of the parameter.

        • ParameterValue (string) --

          The value of the parameter.

        • Description (string) --

          A description of the parameter.

        • Source (string) --

          The source of the parameter.

        • DataType (string) --

          The valid data type for the parameter.

        • AllowedValues (string) --

          The valid range of values for the parameter.

        • IsModifiable (boolean) --

          Indicates whether ( true) or not ( false) the parameter can be modified. Some parameters have security or operational implications that prevent them from being changed.

        • MinimumEngineVersion (string) --

          The earliest cache engine version to which the parameter can apply.

        • ChangeType (string) --

          ChangeType indicates whether a change to the parameter will be applied immediately or requires a reboot for the change to be applied. You can force a reboot or wait until the next maintenance window's reboot. For more information, see Rebooting a Cluster.

    • CacheNodeTypeSpecificParameters (list) --

      A list of parameters specific to a particular cache node type. Each element in the list contains detailed information about one parameter.

      • (dict) --

        A parameter that has a different value for each cache node type it is applied to. For example, in a Redis cache cluster, a cache.m1.large cache node type would have a larger maxmemory value than a cache.m1.small type.

        • ParameterName (string) --

          The name of the parameter.

        • Description (string) --

          A description of the parameter.

        • Source (string) --

          The source of the parameter value.

        • DataType (string) --

          The valid data type for the parameter.

        • AllowedValues (string) --

          The valid range of values for the parameter.

        • IsModifiable (boolean) --

          Indicates whether ( true) or not ( false) the parameter can be modified. Some parameters have security or operational implications that prevent them from being changed.

        • MinimumEngineVersion (string) --

          The earliest cache engine version to which the parameter can apply.

        • CacheNodeTypeSpecificValues (list) --

          A list of cache node types and their corresponding values for this parameter.

          • (dict) --

            A value that applies only to a certain cache node type.

            • CacheNodeType (string) --

              The cache node type for which this value applies.

            • Value (string) --

              The value for the cache node type.

        • ChangeType (string) --

          ChangeType indicates whether a change to the parameter will be applied immediately or requires a reboot for the change to be applied. You can force a reboot or wait until the next maintenance window's reboot. For more information, see Rebooting a Cluster.

DescribeEngineDefaultParameters (updated) Link ¶
Changes (response)
{'EngineDefaults': {'CacheNodeTypeSpecificParameters': {'ChangeType': 'immediate '
                                                                      '| '
                                                                      'requires-reboot'},
                    'Parameters': {'ChangeType': 'immediate | '
                                                 'requires-reboot'}}}

The DescribeEngineDefaultParameters action returns the default engine and system parameter information for the specified cache engine.

Request Syntax

client.describe_engine_default_parameters(
    CacheParameterGroupFamily='string',
    MaxRecords=123,
    Marker='string'
)
type CacheParameterGroupFamily:

string

param CacheParameterGroupFamily:

[REQUIRED]

The name of the cache parameter group family. Valid values are: memcached1.4 | redis2.6 | redis2.8

type MaxRecords:

integer

param MaxRecords:

The maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a marker is included in the response so that the remaining results can be retrieved.

Default: 100

Constraints: minimum 20; maximum 100.

type Marker:

string

param Marker:

An optional marker returned from a prior request. Use this marker for pagination of results from this action. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords.

rtype:

dict

returns:

Response Syntax

{
    'EngineDefaults': {
        'CacheParameterGroupFamily': 'string',
        'Marker': 'string',
        'Parameters': [
            {
                'ParameterName': 'string',
                'ParameterValue': 'string',
                'Description': 'string',
                'Source': 'string',
                'DataType': 'string',
                'AllowedValues': 'string',
                'IsModifiable': True|False,
                'MinimumEngineVersion': 'string',
                'ChangeType': 'immediate'|'requires-reboot'
            },
        ],
        'CacheNodeTypeSpecificParameters': [
            {
                'ParameterName': 'string',
                'Description': 'string',
                'Source': 'string',
                'DataType': 'string',
                'AllowedValues': 'string',
                'IsModifiable': True|False,
                'MinimumEngineVersion': 'string',
                'CacheNodeTypeSpecificValues': [
                    {
                        'CacheNodeType': 'string',
                        'Value': 'string'
                    },
                ],
                'ChangeType': 'immediate'|'requires-reboot'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • EngineDefaults (dict) --

      Represents the output of a DescribeEngineDefaultParameters action.

      • CacheParameterGroupFamily (string) --

        Specifies the name of the cache parameter group family to which the engine default parameters apply.

      • Marker (string) --

        Provides an identifier to allow retrieval of paginated results.

      • Parameters (list) --

        Contains a list of engine default parameters.

        • (dict) --

          Describes an individual setting that controls some aspect of ElastiCache behavior.

          • ParameterName (string) --

            The name of the parameter.

          • ParameterValue (string) --

            The value of the parameter.

          • Description (string) --

            A description of the parameter.

          • Source (string) --

            The source of the parameter.

          • DataType (string) --

            The valid data type for the parameter.

          • AllowedValues (string) --

            The valid range of values for the parameter.

          • IsModifiable (boolean) --

            Indicates whether ( true) or not ( false) the parameter can be modified. Some parameters have security or operational implications that prevent them from being changed.

          • MinimumEngineVersion (string) --

            The earliest cache engine version to which the parameter can apply.

          • ChangeType (string) --

            ChangeType indicates whether a change to the parameter will be applied immediately or requires a reboot for the change to be applied. You can force a reboot or wait until the next maintenance window's reboot. For more information, see Rebooting a Cluster.

      • CacheNodeTypeSpecificParameters (list) --

        A list of parameters specific to a particular cache node type. Each element in the list contains detailed information about one parameter.

        • (dict) --

          A parameter that has a different value for each cache node type it is applied to. For example, in a Redis cache cluster, a cache.m1.large cache node type would have a larger maxmemory value than a cache.m1.small type.

          • ParameterName (string) --

            The name of the parameter.

          • Description (string) --

            A description of the parameter.

          • Source (string) --

            The source of the parameter value.

          • DataType (string) --

            The valid data type for the parameter.

          • AllowedValues (string) --

            The valid range of values for the parameter.

          • IsModifiable (boolean) --

            Indicates whether ( true) or not ( false) the parameter can be modified. Some parameters have security or operational implications that prevent them from being changed.

          • MinimumEngineVersion (string) --

            The earliest cache engine version to which the parameter can apply.

          • CacheNodeTypeSpecificValues (list) --

            A list of cache node types and their corresponding values for this parameter.

            • (dict) --

              A value that applies only to a certain cache node type.

              • CacheNodeType (string) --

                The cache node type for which this value applies.

              • Value (string) --

                The value for the cache node type.

          • ChangeType (string) --

            ChangeType indicates whether a change to the parameter will be applied immediately or requires a reboot for the change to be applied. You can force a reboot or wait until the next maintenance window's reboot. For more information, see Rebooting a Cluster.