Managing S3 notification connections

S3 bucket notification connections are required to create the connectivity between the webhook server and the CES protocol nodes from where notifications are being sent. By using the mms3 notificationConnection command, you can add, delete, list, or update connection information.

The following procedure contains sample commands to manage connection configuration to use S3 bucket notification feature for an S3 bucket:

  1. Start of changeCreate a sample connection file in the .json format on the protocol node or cluster.
    cat /root/connection.json
    A sample file is as follows:
    {
    
    "agent_request_object":{
    
    "host":"Webhook server running host",
    
    "port":8080,
    
    "timeout":100
    
    },
    
    "request_options_object":{
    
    "auth":"username:Passwd",
    
    "path":"/webhook"
    
    },
    
    "notification_protocol":"http",
    
    "name":"http_notif"
    
    }
    End of change
  2. List an existing notification connection.
    mms3 notificationConnection list http_notif
    A sample output is as follows:
    
    Name           Notification Protocol       Host              Port       Timeout
    -----------    ----------------------      --------------    ------    -------
    http_notif     http                        webhook host      8080       100
  3. Update an existing notification connection.
    mms3 notificationConnection update http_notif --connectionKey “agent_request_object” --connectionValue 
    ‘{“host”:“192.168.20.11”,“port”:8082,“timeout”:100}’
    Connection http_notif updated successfully.
  4. After the update, list the notification connection.
    mms3 notificationConnection list http_notif
    A sample output is as follows:
    
    Name           Notification Protocol    Host              Port       Timeout
    -----------    -----------------------  ---------------   -------    --------
    http_notif     http                     192.168.20.11     8082       100
  5. Delete the notification connection.
    mms3 notificationConnection delete http_notif
    A sample output is as follows:
    Connection http_notif deleted successfully.