share_directory
¶
share_directory(
directory_id: DirectoryId,
share_target: ShareTarget,
share_method: ShareMethod,
*,
config_overrides: Optional[DirectoryServiceClientConfig] = None,
share_notes: Optional[Notes] = None,
) -> ShareDirectoryResult
Shares a specified directory (DirectoryId) in your Amazon Web Services account (directory owner) with another Amazon Web Services account (directory consumer). With this operation you can use your directory from any Amazon Web Services account and from any Amazon VPC within an Amazon Web Services Region.
When you share your Managed Microsoft AD directory, Directory Service creates a shared directory in the directory consumer account. This shared directory contains the metadata to provide access to the directory within the directory owner account. The shared directory is visible in all VPCs in the directory consumer account.
The ShareMethod parameter determines whether the specified directory can be shared between Amazon Web Services accounts inside the same Amazon Web Services organization (ORGANIZATIONS). It also determines whether you can share the directory with any other Amazon Web Services account either inside or outside of the organization (HANDSHAKE).
The ShareNotes parameter is only used when HANDSHAKE is called, which sends a directory sharing request to the directory consumer.
Parameters:
-
directory_id(DirectoryId) –Identifier of the Managed Microsoft AD directory that you want to share with other Amazon Web Services accounts.
-
share_notes(Optional[Notes], default:None) –A directory share request that is sent by the directory owner to the directory consumer. The request includes a typed message to help the directory consumer administrator determine whether to approve or reject the share invitation.
-
share_target(ShareTarget) –Identifier for the directory consumer account with whom the directory is to be shared.
-
share_method(ShareMethod) –The method used when sharing a directory to determine whether the directory should be shared within your Amazon Web Services organization (
ORGANIZATIONS) or with any Amazon Web Services account by sending a directory sharing request (HANDSHAKE).
Raises:
-
AccessDeniedException–You do not have sufficient access to perform this action.
-
ClientException–A client exception has occurred.
-
DirectoryAlreadySharedException–The specified directory has already been shared with this Amazon Web Services account.
-
EntityDoesNotExistException–The specified entity could not be found.
-
InvalidParameterException–One or more parameters are not valid.
-
InvalidTargetException–The specified shared target is not valid.
-
OrganizationsException–Exception encountered while trying to access your Amazon Web Services organization.
-
ServiceException–An exception has occurred in Directory Service.
-
ShareLimitExceededException–The maximum number of Amazon Web Services accounts that you can share with this directory has been reached.
-
UnsupportedOperationException–The operation is not supported.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_directory_service/_services/directory_service.py
5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 | |