Updates the configuration of an existing hybrid directory. You can recover hybrid directory administrator account or modify self-managed instance settings.
Updates are applied asynchronously. Use DescribeHybridADUpdate to monitor the progress of configuration changes.
The InstanceIds must have a one-to-one correspondence with CustomerDnsIps, meaning that if the IP address for instance i-10243410 is 10.24.34.100 and the IP address for instance i-10243420 is 10.24.34.200, then the input arrays must maintain the same order relationship, either [10.24.34.100, 10.24.34.200] paired with [i-10243410, i-10243420] or [10.24.34.200, 10.24.34.100] paired with [i-10243420, i-10243410].
You must provide at least one update to UpdateHybridADRequest$HybridAdministratorAccountUpdate or UpdateHybridADRequest$SelfManagedInstancesSettings.
Parameters:
-
directory_id
(DirectoryId)
–
The identifier of the hybrid directory to update.
-
hybrid_administrator_account_update
(Optional[HybridAdministratorAccountUpdate], default:
None
)
–
We create a hybrid directory administrator account when we create a hybrid directory. Use HybridAdministratorAccountUpdate to recover the hybrid directory administrator account if you have deleted it.
To recover your hybrid directory administrator account, we need temporary access to a user in your self-managed AD with administrator permissions in the form of a secret from Amazon Web Services Secrets Manager. We use these credentials once during recovery and don't store them.
If your hybrid directory administrator account exists, then you don’t need to use HybridAdministratorAccountUpdate, even if you have updated your self-managed AD administrator user.
-
self_managed_instances_settings
(Optional[HybridCustomerInstancesSettings], default:
None
)
–
Updates to the self-managed AD configuration, including DNS server IP addresses and Amazon Web Services System Manager managed node identifiers.
Raises:
-
ADAssessmentLimitExceededException
–
A directory assessment is automatically created when you create a hybrid directory. There are two types of assessments: CUSTOMER and SYSTEM. Your Amazon Web Services account has a limit of 100 CUSTOMER directory assessments.
If you attempt to create a hybrid directory; and you already have 100 CUSTOMER directory assessments;, you will encounter an error. Delete assessments to free up capacity before trying again.
You can request an increase to your CUSTOMER directory assessment quota by contacting customer support or delete existing CUSTOMER directory assessments; to free up capacity.
-
ClientException
–
A client exception has occurred.
-
DirectoryDoesNotExistException
–
The specified directory does not exist in the system.
-
InvalidParameterException
–
One or more parameters are not valid.
-
ServiceException
–
An exception has occurred in Directory Service.
-
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
| def update_hybrid_ad(
self,
directory_id: "capo_directory_service.types.directory_id.DirectoryId",
*,
config_overrides: Optional[DirectoryServiceClientConfig] = None,
hybrid_administrator_account_update: Optional[
"capo_directory_service.types.hybrid_administrator_account_update.HybridAdministratorAccountUpdate"
] = None,
self_managed_instances_settings: Optional[
"capo_directory_service.types.hybrid_customer_instances_settings.HybridCustomerInstancesSettings"
] = None,
) -> "capo_directory_service.types.update_hybrid_ad_result.UpdateHybridADResult":
"""<p>Updates the configuration of an existing hybrid directory. You can recover hybrid directory administrator account or modify self-managed instance settings.</p> <p>Updates are applied asynchronously. Use <a>DescribeHybridADUpdate</a> to monitor the progress of configuration changes.</p> <p>The <code>InstanceIds</code> must have a one-to-one correspondence with <code>CustomerDnsIps</code>, meaning that if the IP address for instance i-10243410 is 10.24.34.100 and the IP address for instance i-10243420 is 10.24.34.200, then the input arrays must maintain the same order relationship, either [10.24.34.100, 10.24.34.200] paired with [i-10243410, i-10243420] or [10.24.34.200, 10.24.34.100] paired with [i-10243420, i-10243410].</p> <note> <p>You must provide at least one update to <a>UpdateHybridADRequest$HybridAdministratorAccountUpdate</a> or <a>UpdateHybridADRequest$SelfManagedInstancesSettings</a>.</p> </note>
Args:
directory_id: <p>The identifier of the hybrid directory to update.</p>
hybrid_administrator_account_update: <p>We create a hybrid directory administrator account when we create a hybrid directory. Use <code>HybridAdministratorAccountUpdate</code> to recover the hybrid directory administrator account if you have deleted it.</p> <p>To recover your hybrid directory administrator account, we need temporary access to a user in your self-managed AD with administrator permissions in the form of a secret from Amazon Web Services Secrets Manager. We use these credentials once during recovery and don't store them.</p> <p>If your hybrid directory administrator account exists, then you don’t need to use <code>HybridAdministratorAccountUpdate</code>, even if you have updated your self-managed AD administrator user.</p>
self_managed_instances_settings: <p>Updates to the self-managed AD configuration, including DNS server IP addresses and Amazon Web Services System Manager managed node identifiers.</p>
Raises:
capo_directory_service.errors.ad_assessment_limit_exceeded_exception.ADAssessmentLimitExceededException: <p>A directory assessment is automatically created when you create a hybrid directory. There are two types of assessments: <code>CUSTOMER</code> and <code>SYSTEM</code>. Your Amazon Web Services account has a limit of 100 <code>CUSTOMER</code> directory assessments.</p> <p>If you attempt to create a hybrid directory; and you already have 100 <code>CUSTOMER</code> directory assessments;, you will encounter an error. Delete assessments to free up capacity before trying again.</p> <p>You can request an increase to your <code>CUSTOMER</code> directory assessment quota by contacting customer support or delete existing CUSTOMER directory assessments; to free up capacity.</p>
capo_directory_service.errors.client_exception.ClientException: <p>A client exception has occurred.</p>
capo_directory_service.errors.directory_does_not_exist_exception.DirectoryDoesNotExistException: <p>The specified directory does not exist in the system.</p>
capo_directory_service.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters are not valid.</p>
capo_directory_service.errors.service_exception.ServiceException: <p>An exception has occurred in Directory Service.</p>
capo_directory_service.errors.unsupported_operation_exception.UnsupportedOperationException: <p>The operation is not supported.</p>
capo_directory_service.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_directory_service.types.update_hybrid_ad_request.UpdateHybridADRequest]",
) -> OperationResponse[
"capo_directory_service.types.update_hybrid_ad_result.UpdateHybridADResult"
]:
import capo_directory_service._operations.directory_service_20150416.update_hybrid_ad
output, http_response = (
capo_directory_service._operations.directory_service_20150416.update_hybrid_ad.update_hybrid_ad(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateHybridAD")
)
input_: capo_directory_service.types.update_hybrid_ad_request.UpdateHybridADRequest = {
"directory_id": directory_id
}
if hybrid_administrator_account_update is not None:
input_["hybrid_administrator_account_update"] = (
hybrid_administrator_account_update
)
if self_managed_instances_settings is not None:
input_["self_managed_instances_settings"] = self_managed_instances_settings
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|