Skip to content

Commit

Permalink
Regenerating elasticache from latest service definition
Browse files Browse the repository at this point in the history
  • Loading branch information
brendanhay committed Aug 16, 2016
1 parent c44e801 commit 2e7c683
Show file tree
Hide file tree
Showing 17 changed files with 325 additions and 63 deletions.
5 changes: 5 additions & 0 deletions amazonka-elasticache/gen/Network/AWS/ElastiCache.hs
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,9 @@ module Network.AWS.ElastiCache
-- ** AutomaticFailoverStatus
, AutomaticFailoverStatus (..)

-- ** ChangeType
, ChangeType (..)

-- ** PendingAutomaticFailoverStatus
, PendingAutomaticFailoverStatus (..)

Expand Down Expand Up @@ -360,6 +363,7 @@ module Network.AWS.ElastiCache
, cntspAllowedValues
, cntspParameterName
, cntspDescription
, cntspChangeType

-- ** CacheNodeTypeSpecificValue
, CacheNodeTypeSpecificValue
Expand Down Expand Up @@ -479,6 +483,7 @@ module Network.AWS.ElastiCache
, pAllowedValues
, pParameterName
, pDescription
, pChangeType

-- ** ParameterNameValue
, ParameterNameValue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
--
-- The /AddTagsToResource/ action adds up to 10 cost allocation tags to the named resource. A /cost allocation tag/ is a key-value pair where the key and value are case-sensitive. Cost allocation tags can be used to categorize and track your AWS costs.
--
-- When you apply tags to your ElastiCache resources, AWS generates a cost allocation report as a comma-separated value (CSV) file with your usage and costs aggregated by your tags. You can apply tags that represent business categories (such as cost centers, application names, or owners) to organize your costs across multiple services. For more information, see <http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/Tagging.html Using Cost Allocation Tags in Amazon ElastiCache>.
-- When you apply tags to your ElastiCache resources, AWS generates a cost allocation report as a comma-separated value (CSV) file with your usage and costs aggregated by your tags. You can apply tags that represent business categories (such as cost centers, application names, or owners) to organize your costs across multiple services. For more information, see <http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/Tagging.html Using Cost Allocation Tags in Amazon ElastiCache> in the /ElastiCache User Guide/.
module Network.AWS.ElastiCache.AddTagsToResource
(
-- * Creating a Request
Expand Down
72 changes: 68 additions & 4 deletions amazonka-elasticache/gen/Network/AWS/ElastiCache/CopySnapshot.hs
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,22 @@
-- Portability : non-portable (GHC extensions)
--
-- The /CopySnapshot/ action makes a copy of an existing snapshot.
--
-- Users or groups that have permissions to use the /CopySnapshot/ API can create their own Amazon S3 buckets and copy snapshots to it. To control access to your snapshots, use an IAM policy to control who has the ability to use the /CopySnapshot/ API. For more information about using IAM to control the use of ElastiCache APIs, see <http://docs.aws.amazon.com/ElastiCache/latest/Snapshots.Exporting.html Exporting Snapshots> and <http://docs.aws.amazon.com/ElastiCache/latest/IAM.html Authentication & Access Control>.
--
-- __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.
--
module Network.AWS.ElastiCache.CopySnapshot
(
-- * Creating a Request
copySnapshot
, CopySnapshot
-- * Request Lenses
, csTargetBucket
, csSourceSnapshotName
, csTargetSnapshotName

Expand All @@ -47,14 +57,17 @@ import Network.AWS.Response
--
-- /See:/ 'copySnapshot' smart constructor.
data CopySnapshot = CopySnapshot'
{ _csSourceSnapshotName :: !Text
{ _csTargetBucket :: !(Maybe Text)
, _csSourceSnapshotName :: !Text
, _csTargetSnapshotName :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)

-- | Creates a value of 'CopySnapshot' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'csTargetBucket'
--
-- * 'csSourceSnapshotName'
--
-- * 'csTargetSnapshotName'
Expand All @@ -64,15 +77,65 @@ copySnapshot
-> CopySnapshot
copySnapshot pSourceSnapshotName_ pTargetSnapshotName_ =
CopySnapshot'
{ _csSourceSnapshotName = pSourceSnapshotName_
{ _csTargetBucket = Nothing
, _csSourceSnapshotName = pSourceSnapshotName_
, _csTargetSnapshotName = pTargetSnapshotName_
}

-- | The name of an existing snapshot from which to copy.
-- | 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 <http://docs.aws.amazon.com/AmazonElastiCache/AmazonElastiCache/latest/UserGuide/Snapshots.Exporting.html#Snapshots.Exporting.GrantAccess 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 <http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/Snapshots.Exporting.html#Snapshots.Exporting.CreateBucket 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 <http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/Snapshots.Exporting.html#Snapshots.Exporting.CreateBucket 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 <http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/Snapshots.Exporting.html#Snapshots.Exporting.CreateBucket 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 <http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/Snapshots.Exporting.html Exporting a Snapshot> in the /Amazon ElastiCache User Guide/.
csTargetBucket :: Lens' CopySnapshot (Maybe Text)
csTargetBucket = lens _csTargetBucket (\ s a -> s{_csTargetBucket = a});

-- | The name of an existing snapshot from which to make a copy.
csSourceSnapshotName :: Lens' CopySnapshot Text
csSourceSnapshotName = lens _csSourceSnapshotName (\ s a -> s{_csSourceSnapshotName = a});

-- | A name for the copied snapshot.
-- | 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/.
--
csTargetSnapshotName :: Lens' CopySnapshot Text
csTargetSnapshotName = lens _csTargetSnapshotName (\ s a -> s{_csTargetSnapshotName = a});

Expand Down Expand Up @@ -100,6 +163,7 @@ instance ToQuery CopySnapshot where
= mconcat
["Action" =: ("CopySnapshot" :: ByteString),
"Version" =: ("2015-02-02" :: ByteString),
"TargetBucket" =: _csTargetBucket,
"SourceSnapshotName" =: _csSourceSnapshotName,
"TargetSnapshotName" =: _csTargetSnapshotName]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,17 +178,25 @@ cccEngineVersion = lens _cccEngineVersion (\ s a -> s{_cccEngineVersion = a});
-- 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
--
-- - 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 <http://aws.amazon.com/elasticache/details Amazon ElastiCache Product Features and Details> and <http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/CacheParameterGroups.Memcached.html#CacheParameterGroups.Memcached.NodeSpecific Cache Node Type-Specific Parameters for Memcached> or <http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/CacheParameterGroups.Redis.html#CacheParameterGroups.Redis.NodeSpecific Cache Node Type-Specific Parameters for Redis>.
Expand All @@ -203,7 +211,7 @@ cccSecurityGroupIds = lens _cccSecurityGroupIds (\ s a -> s{_cccSecurityGroupIds

-- | A single-element string list containing an Amazon Resource Name (ARN) that uniquely identifies a Redis RDB snapshot file stored in Amazon S3. The snapshot file will be used to populate the node group. The Amazon S3 object name in the ARN cannot contain any commas.
--
-- __Note:__ This parameter is only valid if the 'Engine' parameter is 'redis'.
-- This parameter is only valid if the 'Engine' parameter is 'redis'.
--
-- Example of an Amazon S3 ARN: 'arn:aws:s3:::my_bucket\/snapshot1.rdb'
cccSnapshotARNs :: Lens' CreateCacheCluster [Text]
Expand Down Expand Up @@ -256,11 +264,17 @@ cccPreferredAvailabilityZones = lens _cccPreferredAvailabilityZones (\ s a -> s{
-- | 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'
Expand All @@ -283,7 +297,7 @@ cccPreferredAvailabilityZone = lens _cccPreferredAvailabilityZone (\ s a -> s{_c

-- | The number of days for which ElastiCache will retain automatic snapshots before deleting them. For example, if you set 'SnapshotRetentionLimit' to 5, then a snapshot that was taken today will be retained for 5 days before being deleted.
--
-- __Note:__ This parameter is only valid if the 'Engine' parameter is 'redis'.
-- This parameter is only valid if the 'Engine' parameter is 'redis'.
--
-- Default: 0 (i.e., automatic backups are disabled for this cache cluster).
cccSnapshotRetentionLimit :: Lens' CreateCacheCluster (Maybe Int)
Expand All @@ -299,15 +313,15 @@ cccAZMode = lens _cccAZMode (\ s a -> s{_cccAZMode = a});

-- | The name of a snapshot from which to restore data into the new node group. The snapshot status changes to 'restoring' while the new node group is being created.
--
-- __Note:__ This parameter is only valid if the 'Engine' parameter is 'redis'.
-- This parameter is only valid if the 'Engine' parameter is 'redis'.
cccSnapshotName :: Lens' CreateCacheCluster (Maybe Text)
cccSnapshotName = lens _cccSnapshotName (\ s a -> s{_cccSnapshotName = a});

-- | The ID of the replication group to which this cache cluster should belong. If this parameter is specified, the cache cluster will be added to the specified replication group as a read replica; otherwise, the cache cluster will be a standalone primary that is not part of any replication group.
--
-- If the specified replication group is Multi-AZ enabled and the availability zone is not specified, the cache cluster will be created in availability zones that provide the best spread of read replicas across availability zones.
--
-- __Note:__ This parameter is only valid if the 'Engine' parameter is 'redis'.
-- This parameter is only valid if the 'Engine' parameter is 'redis'.
cccReplicationGroupId :: Lens' CreateCacheCluster (Maybe Text)
cccReplicationGroupId = lens _cccReplicationGroupId (\ s a -> s{_cccReplicationGroupId = a});

Expand Down Expand Up @@ -341,11 +355,14 @@ cccCacheSecurityGroupNames = lens _cccCacheSecurityGroupNames (\ s a -> s{_cccCa

-- | The node group identifier. This parameter is stored as a lowercase string.
--
-- Constraints:
-- __Constraints:__
--
-- - A name must contain from 1 to 20 alphanumeric characters or hyphens.
--
-- - The first character must be a letter.
--
-- - A name cannot end with a hyphen or contain two consecutive hyphens.
--
cccCacheClusterId :: Lens' CreateCacheCluster Text
cccCacheClusterId = lens _cccCacheClusterId (\ s a -> s{_cccCacheClusterId = a});

Expand Down
Loading

0 comments on commit 2e7c683

Please sign in to comment.