share_directory
async
¶
share_directory(
directory_id: DirectoryId,
share_target: ShareTarget,
share_method: ShareMethod,
*,
config_overrides: Optional[AsyncDirectoryServiceClientConfig] = 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/async_directory_service.py
5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 | |