Amazon WorkDocs

2022/11/14 - Amazon WorkDocs - 2 new 2 updated api methods

Changes  Added 2 new document related operations, DeleteDocumentVersion and RestoreDocumentVersions.

DeleteDocumentVersion (new) Link ¶

Deletes a version of an Amazon WorkDocs document. Use the DeletePriorVersions parameter to delete prior versions.

See also: AWS API Documentation

Request Syntax

client.delete_document_version(
    AuthenticationToken='string',
    DocumentId='string',
    VersionId='string',
    DeletePriorVersions=True|False
)
type AuthenticationToken

string

param AuthenticationToken

Amazon WorkDocs authentication token. Not required when using AWS administrator credentials to access the API.

type DocumentId

string

param DocumentId

[REQUIRED]

The ID of a document.

type VersionId

string

param VersionId

[REQUIRED]

The version ID of a document.

type DeletePriorVersions

boolean

param DeletePriorVersions

[REQUIRED]

When set to TRUE , deletes the specified version and all prior versions of a document.

returns

None

RestoreDocumentVersions (new) Link ¶

Recovers a deleted version of an Amazon WorkDocs document.

See also: AWS API Documentation

Request Syntax

client.restore_document_versions(
    AuthenticationToken='string',
    DocumentId='string'
)
type AuthenticationToken

string

param AuthenticationToken

Amazon WorkDocs authentication token. Not required when using AWS administrator credentials to access the API.

type DocumentId

string

param DocumentId

[REQUIRED]

The ID of the document.

returns

None

CreateNotificationSubscription (updated) Link ¶
Changes (request, response)
Request
{'Protocol': {'SQS'}}
Response
{'Subscription': {'Protocol': {'SQS'}}}

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

client.create_notification_subscription(
    OrganizationId='string',
    Endpoint='string',
    Protocol='HTTPS'|'SQS',
    SubscriptionType='ALL'
)
type OrganizationId

string

param OrganizationId

[REQUIRED]

The ID of the organization.

type Endpoint

string

param Endpoint

[REQUIRED]

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

type Protocol

string

param Protocol

[REQUIRED]

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

type SubscriptionType

string

param SubscriptionType

[REQUIRED]

The notification type.

rtype

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.

DescribeNotificationSubscriptions (updated) Link ¶
Changes (response)
{'Subscriptions': {'Protocol': {'SQS'}}}

Lists the specified notification subscriptions.

See also: AWS API Documentation

Request Syntax

client.describe_notification_subscriptions(
    OrganizationId='string',
    Marker='string',
    Limit=123
)
type OrganizationId

string

param OrganizationId

[REQUIRED]

The ID of the organization.

type Marker

string

param Marker

The marker for the next set of results. (You received this marker from a previous call.)

type Limit

integer

param Limit

The maximum number of items to return with this call.

rtype

dict

returns

Response Syntax

{
    'Subscriptions': [
        {
            'SubscriptionId': 'string',
            'EndPoint': 'string',
            'Protocol': 'HTTPS'|'SQS'
        },
    ],
    'Marker': 'string'
}

Response Structure

  • (dict) --

    • Subscriptions (list) --

      The subscriptions.

      • (dict) --

        Describes a subscription.

        • SubscriptionId (string) --

          The ID of the subscription.

        • EndPoint (string) --

          The endpoint of the subscription.

        • Protocol (string) --

          The protocol of the subscription.

    • Marker (string) --

      The marker to use when requesting the next set of results. If there are no additional results, the string is empty.