create_labels
async
¶
create_labels(
resource_id: ResourceIdType,
labels: SharedLabels,
*,
config_overrides: Optional[AsyncWorkDocsClientConfig] = None,
authentication_token: Optional[AuthenticationHeaderType] = None,
) -> CreateLabelsResponse
Adds the specified list of labels to the given resource (a document or folder)
Parameters:
-
resource_id(ResourceIdType) –The ID of the resource.
-
labels(SharedLabels) –List of labels to add to the resource.
-
authentication_token(Optional[AuthenticationHeaderType], default:None) –Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.
Raises:
-
EntityNotExistsException–The resource does not exist.
-
FailedDependencyException–The Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.
-
ServiceUnavailableException–One or more of the dependencies is unavailable.
-
TooManyLabelsException–The limit has been reached on the number of labels for the specified resource.
-
UnauthorizedOperationException–The operation is not permitted.
-
UnauthorizedResourceAccessException–The caller does not have access to perform the action on the resource.
-
UnknownServiceError–The service returned an error code this client does not model.