:doc:`GuardDuty <../../guardduty>` / Client / create_ip_set

*************
create_ip_set
*************



.. py:method:: GuardDuty.Client.create_ip_set(**kwargs)

  

  Creates a new IPSet, which is called a trusted IP list in the console user interface. An IPSet is a list of IP addresses that are trusted for secure communication with Amazon Web Services infrastructure and applications. GuardDuty doesn't generate findings for IP addresses that are included in IPSets. Only users from the administrator account can use this operation.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/guardduty-2017-11-28/CreateIPSet>`_  


  **Request Syntax**
  ::

    response = client.create_ip_set(
        DetectorId='string',
        Name='string',
        Format='TXT'|'STIX'|'OTX_CSV'|'ALIEN_VAULT'|'PROOF_POINT'|'FIRE_EYE',
        Location='string',
        Activate=True|False,
        ClientToken='string',
        Tags={
            'string': 'string'
        },
        ExpectedBucketOwner='string'
    )
    
  :type DetectorId: string
  :param DetectorId: **[REQUIRED]** 

    The unique ID of the detector of the GuardDuty account for which you want to create an IPSet.

     

    To find the ``detectorId`` in the current Region, see the Settings page in the GuardDuty console, or run the `ListDetectors <https://docs.aws.amazon.com/guardduty/latest/APIReference/API_ListDetectors.html>`__ API.

    

  
  :type Name: string
  :param Name: **[REQUIRED]** 

    The user-friendly name to identify the IPSet.

     

    Allowed characters are alphanumeric, whitespace, dash (-), and underscores (_).

    

  
  :type Format: string
  :param Format: **[REQUIRED]** 

    The format of the file that contains the IPSet.

    

  
  :type Location: string
  :param Location: **[REQUIRED]** 

    The URI of the file that contains the IPSet.

    

  
  :type Activate: boolean
  :param Activate: **[REQUIRED]** 

    A Boolean value that indicates whether GuardDuty is to start using the uploaded IPSet.

    

  
  :type ClientToken: string
  :param ClientToken: 

    The idempotency token for the create request.

    This field is autopopulated if not provided.

  
  :type Tags: dict
  :param Tags: 

    The tags to be added to a new IP set resource.

    

  
    - *(string) --* 

    
      - *(string) --* 

      


  :type ExpectedBucketOwner: string
  :param ExpectedBucketOwner: 

    The Amazon Web Services account ID that owns the Amazon S3 bucket specified in the **location** parameter.

    

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

    
    ::

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

    

    - *(dict) --* 
      

      - **IpSetId** *(string) --* 

        The ID of the IPSet resource.

        
  
  **Exceptions**
  
  *   :py:class:`GuardDuty.Client.exceptions.BadRequestException`

  
  *   :py:class:`GuardDuty.Client.exceptions.InternalServerErrorException`

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

  