:doc:`DatabaseMigrationService <../../dms>` / Client / modify_event_subscription

*************************
modify_event_subscription
*************************



.. py:method:: DatabaseMigrationService.Client.modify_event_subscription(**kwargs)

  

  Modifies an existing DMS event notification subscription.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/ModifyEventSubscription>`_  


  **Request Syntax**
  ::

    response = client.modify_event_subscription(
        SubscriptionName='string',
        SnsTopicArn='string',
        SourceType='string',
        EventCategories=[
            'string',
        ],
        Enabled=True|False
    )
    
  :type SubscriptionName: string
  :param SubscriptionName: **[REQUIRED]** 

    The name of the DMS event notification subscription to be modified.

    

  
  :type SnsTopicArn: string
  :param SnsTopicArn: 

    The Amazon Resource Name (ARN) of the Amazon SNS topic created for event notification. The ARN is created by Amazon SNS when you create a topic and subscribe to it.

    

  
  :type SourceType: string
  :param SourceType: 

    The type of DMS resource that generates the events you want to subscribe to.

     

    Valid values: replication-instance | replication-task

    

  
  :type EventCategories: list
  :param EventCategories: 

    A list of event categories for a source type that you want to subscribe to. Use the ``DescribeEventCategories`` action to see a list of event categories.

    

  
    - *(string) --* 

    

  :type Enabled: boolean
  :param Enabled: 

    A Boolean value; set to **true** to activate the subscription.

    

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

    
    ::

      {
          'EventSubscription': {
              'CustomerAwsId': 'string',
              'CustSubscriptionId': 'string',
              'SnsTopicArn': 'string',
              'Status': 'string',
              'SubscriptionCreationTime': 'string',
              'SourceType': 'string',
              'SourceIdsList': [
                  'string',
              ],
              'EventCategoriesList': [
                  'string',
              ],
              'Enabled': True|False
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **EventSubscription** *(dict) --* 

        The modified event subscription.

        
        

        - **CustomerAwsId** *(string) --* 

          The Amazon Web Services customer account associated with the DMS event notification subscription.

          
        

        - **CustSubscriptionId** *(string) --* 

          The DMS event notification subscription Id.

          
        

        - **SnsTopicArn** *(string) --* 

          The topic ARN of the DMS event notification subscription.

          
        

        - **Status** *(string) --* 

          The status of the DMS event notification subscription.

           

          Constraints:

           

          Can be one of the following: creating | modifying | deleting | active | no-permission | topic-not-exist

           

          The status "no-permission" indicates that DMS no longer has permission to post to the SNS topic. The status "topic-not-exist" indicates that the topic was deleted after the subscription was created.

          
        

        - **SubscriptionCreationTime** *(string) --* 

          The time the DMS event notification subscription was created.

          
        

        - **SourceType** *(string) --* 

          The type of DMS resource that generates events.

           

          Valid values: replication-instance | replication-server | security-group | replication-task

          
        

        - **SourceIdsList** *(list) --* 

          A list of source Ids for the event subscription.

          
          

          - *(string) --* 
      
        

        - **EventCategoriesList** *(list) --* 

          A lists of event categories.

          
          

          - *(string) --* 
      
        

        - **Enabled** *(boolean) --* 

          Boolean value that indicates if the event subscription is enabled.

          
    
  
  **Exceptions**
  
  *   :py:class:`DatabaseMigrationService.Client.exceptions.ResourceQuotaExceededFault`

  
  *   :py:class:`DatabaseMigrationService.Client.exceptions.ResourceNotFoundFault`

  
  *   :py:class:`DatabaseMigrationService.Client.exceptions.SNSInvalidTopicFault`

  
  *   :py:class:`DatabaseMigrationService.Client.exceptions.SNSNoAuthorizationFault`

  
  *   :py:class:`DatabaseMigrationService.Client.exceptions.KMSAccessDeniedFault`

  
  *   :py:class:`DatabaseMigrationService.Client.exceptions.KMSDisabledFault`

  
  *   :py:class:`DatabaseMigrationService.Client.exceptions.KMSInvalidStateFault`

  
  *   :py:class:`DatabaseMigrationService.Client.exceptions.KMSNotFoundFault`

  
  *   :py:class:`DatabaseMigrationService.Client.exceptions.KMSThrottlingFault`

  
  *   :py:class:`DatabaseMigrationService.Client.exceptions.AccessDeniedFault`

  