WorkDocs / Client / create_notification_subscription

create_notification_subscription#

WorkDocs.Client.create_notification_subscription(**kwargs)#

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.

See also: AWS API Documentation

Request Syntax

response = client.create_notification_subscription(
    OrganizationId='string',
    Endpoint='string',
    Protocol='HTTPS'|'SQS',
    SubscriptionType='ALL'
)
Parameters:
  • OrganizationId (string) –

    [REQUIRED]

    The ID of the organization.

  • Endpoint (string) –

    [REQUIRED]

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

  • Protocol (string) –

    [REQUIRED]

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

  • SubscriptionType (string) –

    [REQUIRED]

    The notification type.

Return type:

dict

Returns:

Response Syntax

{
    'Subscription': {
        'SubscriptionId': 'string',
        'EndPoint': 'string',
        'Protocol': 'HTTPS'|'SQS'
    }
}

Response Structure

  • (dict) –

    • Subscription (dict) –

      The subscription.

      • SubscriptionId (string) –

        The ID of the subscription.

      • EndPoint (string) –

        The endpoint of the subscription.

      • Protocol (string) –

        The protocol of the subscription.

Exceptions

  • WorkDocs.Client.exceptions.UnauthorizedResourceAccessException

  • WorkDocs.Client.exceptions.TooManySubscriptionsException

  • WorkDocs.Client.exceptions.ServiceUnavailableException

  • WorkDocs.Client.exceptions.InvalidArgumentException