:doc:`SecurityIncidentResponse <../../security-ir>` / Client / create_membership

*****************
create_membership
*****************



.. py:method:: SecurityIncidentResponse.Client.create_membership(**kwargs)

  

  Creates a new membership.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/security-ir-2018-05-10/CreateMembership>`_  


  **Request Syntax**
  ::

    response = client.create_membership(
        clientToken='string',
        membershipName='string',
        incidentResponseTeam=[
            {
                'name': 'string',
                'jobTitle': 'string',
                'email': 'string',
                'communicationPreferences': [
                    'Case Created'|'Case Updated'|'Case Acknowledged'|'Case Closed'|'Case Updated To Service Managed'|'Case Status Updated'|'Case Pending Customer Action Reminder'|'Case Attachment Url Uploaded'|'Case Comment Added'|'Case Comment Updated'|'Membership Created'|'Membership Updated'|'Membership Cancelled'|'Register Delegated Administrator'|'Deregister Delegated Administrator'|'Disable AWS Service Access',
                ]
            },
        ],
        optInFeatures=[
            {
                'featureName': 'Triage',
                'isEnabled': True|False
            },
        ],
        tags={
            'string': 'string'
        },
        coverEntireOrganization=True|False
    )
    
  :type clientToken: string
  :param clientToken: 

    

    .. note::

      

      The ``clientToken`` field is an idempotency key used to ensure that repeated attempts for a single action will be ignored by the server during retries. A caller supplied unique ID (typically a UUID) should be provided.

      

    

    This field is autopopulated if not provided.

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

    Required element used in combination with CreateMembership to create a name for the membership.

    

  
  :type incidentResponseTeam: list
  :param incidentResponseTeam: **[REQUIRED]** 

    Required element used in combination with CreateMembership to add customer incident response team members and trusted partners to the membership.

    

  
    - *(dict) --* 

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

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

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

      
      - **communicationPreferences** *(list) --* 

      
        - *(string) --* 

        
    
    

  :type optInFeatures: list
  :param optInFeatures: 

    Optional element to enable the monitoring and investigation opt-in features for the service.

    

  
    - *(dict) --* 

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

      
      - **isEnabled** *(boolean) --* **[REQUIRED]** 

      
    

  :type tags: dict
  :param tags: 

    Optional element for customer configured tags.

    

  
    - *(string) --* 

    
      - *(string) --* 

      


  :type coverEntireOrganization: boolean
  :param coverEntireOrganization: 

    The ``coverEntireOrganization`` parameter is a boolean flag that determines whether the membership should be applied to the entire Amazon Web Services Organization. When set to true, the membership will be created for all accounts within the organization. When set to false, the membership will only be created for specified accounts.

     

    This parameter is optional. If not specified, the default value is false.

     

    
    * If set to *true*: The membership will automatically include all existing and future accounts in the Amazon Web Services Organization.
     
    * If set to *false*: The membership will only apply to explicitly specified accounts.
    

    

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

    
    ::

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

    

    - *(dict) --* 
      

      - **membershipId** *(string) --* 

        Response element for CreateMembership providing the newly created membership ID.

        
  
  **Exceptions**
  
  *   :py:class:`SecurityIncidentResponse.Client.exceptions.ServiceQuotaExceededException`

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

  
  *   :py:class:`SecurityIncidentResponse.Client.exceptions.ValidationException`

  
  *   :py:class:`SecurityIncidentResponse.Client.exceptions.SecurityIncidentResponseNotActiveException`

  
  *   :py:class:`SecurityIncidentResponse.Client.exceptions.InternalServerException`

  
  *   :py:class:`SecurityIncidentResponse.Client.exceptions.ThrottlingException`

  
  *   :py:class:`SecurityIncidentResponse.Client.exceptions.ConflictException`

  
  *   :py:class:`SecurityIncidentResponse.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`SecurityIncidentResponse.Client.exceptions.InvalidTokenException`

  