:doc:`WorkSpaces <../../workspaces>` / Client / create_ip_group

***************
create_ip_group
***************



.. py:method:: WorkSpaces.Client.create_ip_group(**kwargs)

  

  Creates an IP access control group.

   

  An IP access control group provides you with the ability to control the IP addresses from which users are allowed to access their WorkSpaces. To specify the CIDR address ranges, add rules to your IP access control group and then associate the group with your directory. You can add rules when you create the group or at any time using  AuthorizeIpRules.

   

  There is a default IP access control group associated with your directory. If you don't associate an IP access control group with your directory, the default group is used. The default group includes a default rule that allows users to access their WorkSpaces from anywhere. You cannot modify the default IP access control group for your directory.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/workspaces-2015-04-08/CreateIpGroup>`_  


  **Request Syntax**
  ::

    response = client.create_ip_group(
        GroupName='string',
        GroupDesc='string',
        UserRules=[
            {
                'ipRule': 'string',
                'ruleDesc': 'string'
            },
        ],
        Tags=[
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    )
    
  :type GroupName: string
  :param GroupName: **[REQUIRED]** 

    The name of the group.

    

  
  :type GroupDesc: string
  :param GroupDesc: 

    The description of the group.

    

  
  :type UserRules: list
  :param UserRules: 

    The rules to add to the group.

    

  
    - *(dict) --* 

      Describes a rule for an IP access control group.

      

    
      - **ipRule** *(string) --* 

        The IP address range, in CIDR notation.

        

      
      - **ruleDesc** *(string) --* 

        The description.

        

      
    

  :type Tags: list
  :param Tags: 

    The tags. Each WorkSpaces resource can have a maximum of 50 tags.

    

  
    - *(dict) --* 

      Describes a tag.

      

    
      - **Key** *(string) --* **[REQUIRED]** 

        The key of the tag.

        

      
      - **Value** *(string) --* 

        The value of the tag.

        

      
    

  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'GroupId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **GroupId** *(string) --* 

        The identifier of the group.

        
  
  **Exceptions**
  
  *   :py:class:`WorkSpaces.Client.exceptions.InvalidParameterValuesException`

  
  *   :py:class:`WorkSpaces.Client.exceptions.ResourceLimitExceededException`

  
  *   :py:class:`WorkSpaces.Client.exceptions.ResourceAlreadyExistsException`

  
  *   :py:class:`WorkSpaces.Client.exceptions.ResourceCreationFailedException`

  
  *   :py:class:`WorkSpaces.Client.exceptions.AccessDeniedException`

  