Redshift / Client / create_cluster_security_group

create_cluster_security_group#

Redshift.Client.create_cluster_security_group(**kwargs)#

Creates a new Amazon Redshift security group. You use security groups to control access to non-VPC clusters.

For information about managing security groups, go to Amazon Redshift Cluster Security Groups in the Amazon Redshift Cluster Management Guide.

See also: AWS API Documentation

Request Syntax

response = client.create_cluster_security_group(
    ClusterSecurityGroupName='string',
    Description='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters:
  • ClusterSecurityGroupName (string) –

    [REQUIRED]

    The name for the security group. Amazon Redshift stores the value as a lowercase string.

    Constraints:

    • Must contain no more than 255 alphanumeric characters or hyphens.

    • Must not be “Default”.

    • Must be unique for all security groups that are created by your Amazon Web Services account.

    Example: examplesecuritygroup

  • Description (string) –

    [REQUIRED]

    A description for the security group.

  • Tags (list) –

    A list of tag instances.

    • (dict) –

      A tag consisting of a name/value pair for a resource.

      • Key (string) –

        The key, or name, for the resource tag.

      • Value (string) –

        The value for the resource tag.

Return type:

dict

Returns:

Response Syntax

{
    'ClusterSecurityGroup': {
        'ClusterSecurityGroupName': 'string',
        'Description': 'string',
        'EC2SecurityGroups': [
            {
                'Status': 'string',
                'EC2SecurityGroupName': 'string',
                'EC2SecurityGroupOwnerId': 'string',
                'Tags': [
                    {
                        'Key': 'string',
                        'Value': 'string'
                    },
                ]
            },
        ],
        'IPRanges': [
            {
                'Status': 'string',
                'CIDRIP': 'string',
                'Tags': [
                    {
                        'Key': 'string',
                        'Value': 'string'
                    },
                ]
            },
        ],
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) –

    • ClusterSecurityGroup (dict) –

      Describes a security group.

      • ClusterSecurityGroupName (string) –

        The name of the cluster security group to which the operation was applied.

      • Description (string) –

        A description of the security group.

      • EC2SecurityGroups (list) –

        A list of EC2 security groups that are permitted to access clusters associated with this cluster security group.

        • (dict) –

          Describes an Amazon EC2 security group.

          • Status (string) –

            The status of the EC2 security group.

          • EC2SecurityGroupName (string) –

            The name of the EC2 Security Group.

          • EC2SecurityGroupOwnerId (string) –

            The Amazon Web Services account ID of the owner of the EC2 security group specified in the EC2SecurityGroupName field.

          • Tags (list) –

            The list of tags for the EC2 security group.

            • (dict) –

              A tag consisting of a name/value pair for a resource.

              • Key (string) –

                The key, or name, for the resource tag.

              • Value (string) –

                The value for the resource tag.

      • IPRanges (list) –

        A list of IP ranges (CIDR blocks) that are permitted to access clusters associated with this cluster security group.

        • (dict) –

          Describes an IP range used in a security group.

          • Status (string) –

            The status of the IP range, for example, “authorized”.

          • CIDRIP (string) –

            The IP range in Classless Inter-Domain Routing (CIDR) notation.

          • Tags (list) –

            The list of tags for the IP range.

            • (dict) –

              A tag consisting of a name/value pair for a resource.

              • Key (string) –

                The key, or name, for the resource tag.

              • Value (string) –

                The value for the resource tag.

      • Tags (list) –

        The list of tags for the cluster security group.

        • (dict) –

          A tag consisting of a name/value pair for a resource.

          • Key (string) –

            The key, or name, for the resource tag.

          • Value (string) –

            The value for the resource tag.

Exceptions

  • Redshift.Client.exceptions.ClusterSecurityGroupAlreadyExistsFault

  • Redshift.Client.exceptions.ClusterSecurityGroupQuotaExceededFault

  • Redshift.Client.exceptions.TagLimitExceededFault

  • Redshift.Client.exceptions.InvalidTagFault