Skip to content

update_root_domain_unit_owner async

update_root_domain_unit_owner(
    domain_identifier: DomainId,
    current_owner: UserIdentifier,
    new_owner: str,
    *,
    config_overrides: Optional[AsyncDataZoneClientConfig] = None,
    client_token: Optional[ClientToken] = None,
) -> UpdateRootDomainUnitOwnerOutput

Updates the owner of the root domain unit.

Parameters:

  • domain_identifier (DomainId) –

    The ID of the domain where the root domain unit owner is to be updated.

  • current_owner (UserIdentifier) –

    The current owner of the root domain unit.

  • new_owner (str) –

    The new owner of the root domain unit.

  • client_token (Optional[ClientToken], default: None ) –

    A unique, case-sensitive identifier to ensure idempotency of the request. This field is automatically populated if not provided.

Raises:

Source code in docs_src/capo_datazone/_services/async_data_zone.py
async def update_root_domain_unit_owner(
    self,
    domain_identifier: "capo_datazone.types.domain_id.DomainId",
    current_owner: "capo_datazone.types.user_identifier.UserIdentifier",
    new_owner: str,
    *,
    config_overrides: Optional[AsyncDataZoneClientConfig] = None,
    client_token: Optional["capo_datazone.types.client_token.ClientToken"] = None,
) -> "capo_datazone.types.update_root_domain_unit_owner_output.UpdateRootDomainUnitOwnerOutput":
    """<p>Updates the owner of the root domain unit.</p>

    Args:
        domain_identifier: <p>The ID of the domain where the root domain unit owner is to be updated.</p>
        current_owner: <p>The current owner of the root domain unit.</p>
        new_owner: <p>The new owner of the root domain unit.</p>
        client_token: <p>A unique, case-sensitive identifier to ensure idempotency of the request. This field is automatically populated if not provided.</p>

    Raises:
        capo_datazone.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_datazone.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_datazone.errors.unauthorized_exception.UnauthorizedException: <p>You do not have permission to perform this action.</p>
        capo_datazone.errors.conflict_exception.ConflictException: <p>There is a conflict while performing this action.</p>
        capo_datazone.errors.internal_server_exception.InternalServerException: <p>The request has failed because of an unknown error, exception or failure.</p>
        capo_datazone.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource cannot be found.</p>
        capo_datazone.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the Amazon Web Services service.</p>
        capo_datazone.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_datazone.types.update_root_domain_unit_owner_input.UpdateRootDomainUnitOwnerInput]",
    ) -> AsyncOperationResponse[
        "capo_datazone.types.update_root_domain_unit_owner_output.UpdateRootDomainUnitOwnerOutput"
    ]:
        import capo_datazone._operations.data_zone.update_root_domain_unit_owner

        (
            output,
            http_response,
        ) = await capo_datazone._operations.data_zone.update_root_domain_unit_owner.async_update_root_domain_unit_owner(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateRootDomainUnitOwner")
    )
    input_: capo_datazone.types.update_root_domain_unit_owner_input.UpdateRootDomainUnitOwnerInput = {
        "domain_identifier": domain_identifier,
        "current_owner": current_owner,
        "new_owner": new_owner,
    }
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output