Method: Aws::WorkDocs::Client#create_notification_subscription

Defined in:
lib/aws-sdk-workdocs/client.rb

#create_notification_subscription(params = {}) ⇒ Types::CreateNotificationSubscriptionResponse

Configure Amazon WorkDocs to use Amazon SNS notifications. The endpoint receives a confirmation message, and must confirm the subscription.

For more information, see [Setting up notifications for an IAM user or role] in the *Amazon WorkDocs Developer Guide*.

[1]: docs.aws.amazon.com/workdocs/latest/developerguide/manage-notifications.html

Examples:

Request syntax with placeholder values


resp = client.create_notification_subscription({
  organization_id: "IdType", # required
  endpoint: "SubscriptionEndPointType", # required
  protocol: "HTTPS", # required, accepts HTTPS, SQS
  subscription_type: "ALL", # required, accepts ALL
})

Response structure


resp.subscription.subscription_id #=> String
resp.subscription.end_point #=> String
resp.subscription.protocol #=> String, one of "HTTPS", "SQS"

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :organization_id (required, String)

    The ID of the organization.

  • :endpoint (required, String)

    The endpoint to receive the notifications. If the protocol is HTTPS, the endpoint is a URL that begins with ‘https`.

  • :protocol (required, String)

    The protocol to use. The supported value is https, which delivers JSON-encoded messages using HTTPS POST.

  • :subscription_type (required, String)

    The notification type.

Returns:

See Also:



873
874
875
876
# File 'lib/aws-sdk-workdocs/client.rb', line 873

def create_notification_subscription(params = {}, options = {})
  req = build_request(:create_notification_subscription, params)
  req.send_request(options)
end