ElastiCache / Client / describe_cache_security_groups

describe_cache_security_groups#

ElastiCache.Client.describe_cache_security_groups(**kwargs)#

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. This applicable only when you have ElastiCache in Classic setup

See also: AWS API Documentation

Request Syntax

response = client.describe_cache_security_groups(
    CacheSecurityGroupName='string',
    MaxRecords=123,
    Marker='string'
)
Parameters:
  • CacheSecurityGroupName (string) – The name of the cache security group to return details for.

  • MaxRecords (integer) –

    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.

  • Marker (string) – An optional marker returned from a prior request. Use this marker for pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords.

Return type:

dict

Returns:

Response Syntax

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

Response Structure

  • (dict) –

    Represents the output of a DescribeCacheSecurityGroups operation.

    • Marker (string) –

      Provides an identifier to allow retrieval of paginated results.

    • CacheSecurityGroups (list) –

      A list of cache security groups. Each element in the list contains detailed information about one group.

      • (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

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.describe_cache_security_groups(
    CacheSecurityGroupName='my-sec-group',
)

print(response)

Expected Output:

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