modify_cache_subnet_group
(**kwargs)¶Modifies an existing cache subnet group.
See also: AWS API Documentation
Request Syntax
response = client.modify_cache_subnet_group(
CacheSubnetGroupName='string',
CacheSubnetGroupDescription='string',
SubnetIds=[
'string',
]
)
[REQUIRED]
The name for the cache subnet group. This value is stored as a lowercase string.
Constraints: Must contain no more than 255 alphanumeric characters or hyphens.
Example: mysubnetgroup
The EC2 subnet IDs for the cache subnet group.
dict
Response Syntax
{
'CacheSubnetGroup': {
'CacheSubnetGroupName': 'string',
'CacheSubnetGroupDescription': 'string',
'VpcId': 'string',
'Subnets': [
{
'SubnetIdentifier': 'string',
'SubnetAvailabilityZone': {
'Name': 'string'
},
'SubnetOutpost': {
'SubnetOutpostArn': 'string'
},
'SupportedNetworkTypes': [
'ipv4'|'ipv6'|'dual_stack',
]
},
],
'ARN': 'string',
'SupportedNetworkTypes': [
'ipv4'|'ipv6'|'dual_stack',
]
}
}
Response Structure
(dict) --
CacheSubnetGroup (dict) --
Represents the output of one of the following operations:
CreateCacheSubnetGroup
ModifyCacheSubnetGroup
CacheSubnetGroupName (string) --
The name of the cache subnet group.
CacheSubnetGroupDescription (string) --
The description of the cache subnet group.
VpcId (string) --
The Amazon Virtual Private Cloud identifier (VPC ID) of the cache subnet group.
Subnets (list) --
A list of subnets associated with the cache subnet group.
(dict) --
Represents the subnet associated with a cluster. This parameter refers to subnets defined in Amazon Virtual Private Cloud (Amazon VPC) and used with ElastiCache.
SubnetIdentifier (string) --
The unique identifier for the subnet.
SubnetAvailabilityZone (dict) --
The Availability Zone associated with the subnet.
Name (string) --
The name of the Availability Zone.
SubnetOutpost (dict) --
The outpost ARN of the subnet.
SubnetOutpostArn (string) --
The outpost ARN of the subnet.
SupportedNetworkTypes (list) --
Either ipv4
| ipv6
| dual_stack
. IPv6 is supported for workloads using Redis engine version 6.2 onward or Memcached engine version 1.6.6 on all instances built on the Nitro system.
ARN (string) --
The ARN (Amazon Resource Name) of the cache subnet group.
SupportedNetworkTypes (list) --
Either ipv4
| ipv6
| dual_stack
. IPv6 is supported for workloads using Redis engine version 6.2 onward or Memcached engine version 1.6.6 on all instances built on the Nitro system.
Exceptions
ElastiCache.Client.exceptions.CacheSubnetGroupNotFoundFault
ElastiCache.Client.exceptions.CacheSubnetQuotaExceededFault
ElastiCache.Client.exceptions.SubnetInUse
ElastiCache.Client.exceptions.InvalidSubnet
ElastiCache.Client.exceptions.SubnetNotAllowedFault
Examples
Modifies an existing ElastiCache subnet group.
response = client.modify_cache_subnet_group(
CacheSubnetGroupName='my-sn-grp',
SubnetIds=[
'subnet-bcde2345',
],
)
print(response)
Expected Output:
{
'CacheSubnetGroup': {
'CacheSubnetGroupDescription': 'My subnet group.',
'CacheSubnetGroupName': 'my-sn-grp',
'Subnets': [
{
'SubnetAvailabilityZone': {
'Name': 'us-east-1c',
},
'SubnetIdentifier': 'subnet-a1b2c3d4',
},
{
'SubnetAvailabilityZone': {
'Name': 'us-east-1e',
},
'SubnetIdentifier': 'subnet-1a2b3c4d',
},
{
'SubnetAvailabilityZone': {
'Name': 'us-east-1e',
},
'SubnetIdentifier': 'subnet-bcde2345',
},
{
'SubnetAvailabilityZone': {
'Name': 'us-east-1c',
},
'SubnetIdentifier': 'subnet-1234abcd',
},
{
'SubnetAvailabilityZone': {
'Name': 'us-east-1b',
},
'SubnetIdentifier': 'subnet-abcd1234',
},
],
'VpcId': 'vpc-91280df6',
},
'ResponseMetadata': {
'...': '...',
},
}