revoke_cache_security_group_ingress

revoke_cache_security_group_ingress(**kwargs)

Revokes ingress from a cache security group. Use this operation to disallow access from an Amazon EC2 security group that had been previously authorized.

See also: AWS API Documentation

Request Syntax

response = client.revoke_cache_security_group_ingress(
    CacheSecurityGroupName='string',
    EC2SecurityGroupName='string',
    EC2SecurityGroupOwnerId='string'
)
Parameters
  • CacheSecurityGroupName (string) --

    [REQUIRED]

    The name of the cache security group to revoke ingress from.

  • EC2SecurityGroupName (string) --

    [REQUIRED]

    The name of the Amazon EC2 security group to revoke access from.

  • EC2SecurityGroupOwnerId (string) --

    [REQUIRED]

    The Amazon account number of the Amazon EC2 security group owner. Note that this is not the same thing as an Amazon access key ID - you must provide a valid Amazon account number for this parameter.

Return type

dict

Returns

Response Syntax

{
    'CacheSecurityGroup': {
        'OwnerId': 'string',
        'CacheSecurityGroupName': 'string',
        'Description': 'string',
        'EC2SecurityGroups': [
            {
                'Status': 'string',
                'EC2SecurityGroupName': 'string',
                'EC2SecurityGroupOwnerId': 'string'
            },
        ],
        'ARN': 'string'
    }
}

Response Structure

  • (dict) --

    • CacheSecurityGroup (dict) --

      Represents the output of one of the following operations:

      • AuthorizeCacheSecurityGroupIngress
      • CreateCacheSecurityGroup
      • RevokeCacheSecurityGroupIngress
      • OwnerId (string) --

        The Amazon account ID of the cache security group owner.

      • CacheSecurityGroupName (string) --

        The name of the cache security group.

      • Description (string) --

        The description of the cache security group.

      • EC2SecurityGroups (list) --

        A list of Amazon EC2 security groups that are associated with this cache security group.

        • (dict) --

          Provides ownership and status information for an Amazon EC2 security group.

          • Status (string) --

            The status of the Amazon EC2 security group.

          • EC2SecurityGroupName (string) --

            The name of the Amazon EC2 security group.

          • EC2SecurityGroupOwnerId (string) --

            The Amazon account ID of the Amazon EC2 security group owner.

      • ARN (string) --

        The ARN of the cache security group,

Exceptions

  • ElastiCache.Client.exceptions.CacheSecurityGroupNotFoundFault
  • ElastiCache.Client.exceptions.AuthorizationNotFoundFault
  • ElastiCache.Client.exceptions.InvalidCacheSecurityGroupStateFault
  • ElastiCache.Client.exceptions.InvalidParameterValueException
  • ElastiCache.Client.exceptions.InvalidParameterCombinationException

Examples

Returns a list of cache security group descriptions. If a cache security group name is specified, the list contains only the description of that group.

response = client.revoke_cache_security_group_ingress(
    CacheSecurityGroupName='my-sec-grp',
    EC2SecurityGroupName='my-ec2-sec-grp',
    EC2SecurityGroupOwnerId='1234567890',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}