WorkDocsClient#
Auto-generated documentation for WorkDocs type annotations stubs module mypy-boto3-workdocs.
WorkDocsClient#
Type annotations and code completion for boto3.client("workdocs")
.
boto3 documentation
# WorkDocsClient usage example
from boto3.session import Session
from mypy_boto3_workdocs.client import WorkDocsClient
def get_workdocs_client() -> WorkDocsClient:
return Session().client("workdocs")
Exceptions#
boto3
client exceptions are generated in runtime.
This class provides code completion for boto3.client("workdocs").exceptions
structure.
# Exceptions.exceptions usage example
client = boto3.client("workdocs")
try:
do_something(client)
except (
client.exceptions.ClientError,
client.exceptions.ConcurrentModificationException,
client.exceptions.ConflictingOperationException,
client.exceptions.CustomMetadataLimitExceededException,
client.exceptions.DeactivatingLastSystemUserException,
client.exceptions.DocumentLockedForCommentsException,
client.exceptions.DraftUploadOutOfSyncException,
client.exceptions.EntityAlreadyExistsException,
client.exceptions.EntityNotExistsException,
client.exceptions.FailedDependencyException,
client.exceptions.IllegalUserStateException,
client.exceptions.InvalidArgumentException,
client.exceptions.InvalidCommentOperationException,
client.exceptions.InvalidOperationException,
client.exceptions.InvalidPasswordException,
client.exceptions.LimitExceededException,
client.exceptions.ProhibitedStateException,
client.exceptions.RequestedEntityTooLargeException,
client.exceptions.ResourceAlreadyCheckedOutException,
client.exceptions.ServiceUnavailableException,
client.exceptions.StorageLimitExceededException,
client.exceptions.StorageLimitWillExceedException,
client.exceptions.TooManyLabelsException,
client.exceptions.TooManySubscriptionsException,
client.exceptions.UnauthorizedOperationException,
client.exceptions.UnauthorizedResourceAccessException,
) as e:
print(e)
# Exceptions.exceptions type checking example
from mypy_boto3_workdocs.client import Exceptions
def handle_error(exc: Exceptions.ClientError) -> None:
...
Methods#
abort_document_version_upload#
Aborts the upload of the specified document version that was previously initiated by InitiateDocumentVersionUpload.
Type annotations and code completion for boto3.client("workdocs").abort_document_version_upload
method.
boto3 documentation
# abort_document_version_upload method definition
def abort_document_version_upload(
self,
*,
DocumentId: str,
VersionId: str,
AuthenticationToken: str = ...,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# abort_document_version_upload method usage example with argument unpacking
kwargs: AbortDocumentVersionUploadRequestRequestTypeDef = { # (1)
"DocumentId": ...,
"VersionId": ...,
}
parent.abort_document_version_upload(**kwargs)
activate_user#
Activates the specified user.
Type annotations and code completion for boto3.client("workdocs").activate_user
method.
boto3 documentation
# activate_user method definition
def activate_user(
self,
*,
UserId: str,
AuthenticationToken: str = ...,
) -> ActivateUserResponseTypeDef: # (1)
...
# activate_user method usage example with argument unpacking
kwargs: ActivateUserRequestRequestTypeDef = { # (1)
"UserId": ...,
}
parent.activate_user(**kwargs)
add_resource_permissions#
Creates a set of permissions for the specified folder or document.
Type annotations and code completion for boto3.client("workdocs").add_resource_permissions
method.
boto3 documentation
# add_resource_permissions method definition
def add_resource_permissions(
self,
*,
ResourceId: str,
Principals: Sequence[SharePrincipalTypeDef], # (1)
AuthenticationToken: str = ...,
NotificationOptions: NotificationOptionsTypeDef = ..., # (2)
) -> AddResourcePermissionsResponseTypeDef: # (3)
...
# add_resource_permissions method usage example with argument unpacking
kwargs: AddResourcePermissionsRequestRequestTypeDef = { # (1)
"ResourceId": ...,
"Principals": ...,
}
parent.add_resource_permissions(**kwargs)
can_paginate#
Check if an operation can be paginated.
Type annotations and code completion for boto3.client("workdocs").can_paginate
method.
boto3 documentation
# can_paginate method definition
def can_paginate(
self,
operation_name: str,
) -> bool:
...
close#
Closes underlying endpoint connections.
Type annotations and code completion for boto3.client("workdocs").close
method.
boto3 documentation
# close method definition
def close(
self,
) -> None:
...
create_comment#
Adds a new comment to the specified document version.
Type annotations and code completion for boto3.client("workdocs").create_comment
method.
boto3 documentation
# create_comment method definition
def create_comment(
self,
*,
DocumentId: str,
VersionId: str,
Text: str,
AuthenticationToken: str = ...,
ParentId: str = ...,
ThreadId: str = ...,
Visibility: CommentVisibilityTypeType = ..., # (1)
NotifyCollaborators: bool = ...,
) -> CreateCommentResponseTypeDef: # (2)
...
# create_comment method usage example with argument unpacking
kwargs: CreateCommentRequestRequestTypeDef = { # (1)
"DocumentId": ...,
"VersionId": ...,
"Text": ...,
}
parent.create_comment(**kwargs)
create_custom_metadata#
Adds one or more custom properties to the specified resource (a folder, document, or version).
Type annotations and code completion for boto3.client("workdocs").create_custom_metadata
method.
boto3 documentation
# create_custom_metadata method definition
def create_custom_metadata(
self,
*,
ResourceId: str,
CustomMetadata: Mapping[str, str],
AuthenticationToken: str = ...,
VersionId: str = ...,
) -> Dict[str, Any]:
...
# create_custom_metadata method usage example with argument unpacking
kwargs: CreateCustomMetadataRequestRequestTypeDef = { # (1)
"ResourceId": ...,
"CustomMetadata": ...,
}
parent.create_custom_metadata(**kwargs)
create_folder#
Creates a folder with the specified name and parent folder.
Type annotations and code completion for boto3.client("workdocs").create_folder
method.
boto3 documentation
# create_folder method definition
def create_folder(
self,
*,
ParentFolderId: str,
AuthenticationToken: str = ...,
Name: str = ...,
) -> CreateFolderResponseTypeDef: # (1)
...
# create_folder method usage example with argument unpacking
kwargs: CreateFolderRequestRequestTypeDef = { # (1)
"ParentFolderId": ...,
}
parent.create_folder(**kwargs)
create_labels#
Adds the specified list of labels to the given resource (a document or folder) See also: AWS API Documentation.
Type annotations and code completion for boto3.client("workdocs").create_labels
method.
boto3 documentation
# create_labels method definition
def create_labels(
self,
*,
ResourceId: str,
Labels: Sequence[str],
AuthenticationToken: str = ...,
) -> Dict[str, Any]:
...
# create_labels method usage example with argument unpacking
kwargs: CreateLabelsRequestRequestTypeDef = { # (1)
"ResourceId": ...,
"Labels": ...,
}
parent.create_labels(**kwargs)
create_notification_subscription#
Configure Amazon WorkDocs to use Amazon SNS notifications.
Type annotations and code completion for boto3.client("workdocs").create_notification_subscription
method.
boto3 documentation
# create_notification_subscription method definition
def create_notification_subscription(
self,
*,
OrganizationId: str,
Endpoint: str,
Protocol: SubscriptionProtocolTypeType, # (1)
SubscriptionType: SubscriptionTypeType, # (2)
) -> CreateNotificationSubscriptionResponseTypeDef: # (3)
...
- See SubscriptionProtocolTypeType
- See SubscriptionTypeType
- See CreateNotificationSubscriptionResponseTypeDef
# create_notification_subscription method usage example with argument unpacking
kwargs: CreateNotificationSubscriptionRequestRequestTypeDef = { # (1)
"OrganizationId": ...,
"Endpoint": ...,
"Protocol": ...,
"SubscriptionType": ...,
}
parent.create_notification_subscription(**kwargs)
create_user#
Creates a user in a Simple AD or Microsoft AD directory.
Type annotations and code completion for boto3.client("workdocs").create_user
method.
boto3 documentation
# create_user method definition
def create_user(
self,
*,
Username: str,
GivenName: str,
Surname: str,
Password: str,
OrganizationId: str = ...,
EmailAddress: str = ...,
TimeZoneId: str = ...,
StorageRule: StorageRuleTypeTypeDef = ..., # (1)
AuthenticationToken: str = ...,
) -> CreateUserResponseTypeDef: # (2)
...
# create_user method usage example with argument unpacking
kwargs: CreateUserRequestRequestTypeDef = { # (1)
"Username": ...,
"GivenName": ...,
"Surname": ...,
"Password": ...,
}
parent.create_user(**kwargs)
deactivate_user#
Deactivates the specified user, which revokes the user's access to Amazon WorkDocs.
Type annotations and code completion for boto3.client("workdocs").deactivate_user
method.
boto3 documentation
# deactivate_user method definition
def deactivate_user(
self,
*,
UserId: str,
AuthenticationToken: str = ...,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# deactivate_user method usage example with argument unpacking
kwargs: DeactivateUserRequestRequestTypeDef = { # (1)
"UserId": ...,
}
parent.deactivate_user(**kwargs)
delete_comment#
Deletes the specified comment from the document version.
Type annotations and code completion for boto3.client("workdocs").delete_comment
method.
boto3 documentation
# delete_comment method definition
def delete_comment(
self,
*,
DocumentId: str,
VersionId: str,
CommentId: str,
AuthenticationToken: str = ...,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# delete_comment method usage example with argument unpacking
kwargs: DeleteCommentRequestRequestTypeDef = { # (1)
"DocumentId": ...,
"VersionId": ...,
"CommentId": ...,
}
parent.delete_comment(**kwargs)
delete_custom_metadata#
Deletes custom metadata from the specified resource.
Type annotations and code completion for boto3.client("workdocs").delete_custom_metadata
method.
boto3 documentation
# delete_custom_metadata method definition
def delete_custom_metadata(
self,
*,
ResourceId: str,
AuthenticationToken: str = ...,
VersionId: str = ...,
Keys: Sequence[str] = ...,
DeleteAll: bool = ...,
) -> Dict[str, Any]:
...
# delete_custom_metadata method usage example with argument unpacking
kwargs: DeleteCustomMetadataRequestRequestTypeDef = { # (1)
"ResourceId": ...,
}
parent.delete_custom_metadata(**kwargs)
delete_document#
Permanently deletes the specified document and its associated metadata.
Type annotations and code completion for boto3.client("workdocs").delete_document
method.
boto3 documentation
# delete_document method definition
def delete_document(
self,
*,
DocumentId: str,
AuthenticationToken: str = ...,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# delete_document method usage example with argument unpacking
kwargs: DeleteDocumentRequestRequestTypeDef = { # (1)
"DocumentId": ...,
}
parent.delete_document(**kwargs)
delete_document_version#
Deletes a specific version of a document.
Type annotations and code completion for boto3.client("workdocs").delete_document_version
method.
boto3 documentation
# delete_document_version method definition
def delete_document_version(
self,
*,
DocumentId: str,
VersionId: str,
DeletePriorVersions: bool,
AuthenticationToken: str = ...,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# delete_document_version method usage example with argument unpacking
kwargs: DeleteDocumentVersionRequestRequestTypeDef = { # (1)
"DocumentId": ...,
"VersionId": ...,
"DeletePriorVersions": ...,
}
parent.delete_document_version(**kwargs)
delete_folder#
Permanently deletes the specified folder and its contents.
Type annotations and code completion for boto3.client("workdocs").delete_folder
method.
boto3 documentation
# delete_folder method definition
def delete_folder(
self,
*,
FolderId: str,
AuthenticationToken: str = ...,
) -> EmptyResponseMetadataTypeDef: # (1)
...
# delete_folder method usage example with argument unpacking
kwargs: DeleteFolderRequestRequestTypeDef = { # (1)
"FolderId": ...,
}
parent.delete_folder(**kwargs)