Skip to content

update_domain async

update_domain(
    identifier: DomainId,
    *,
    config_overrides: Optional[AsyncDataZoneClientConfig] = None,
    description: Optional[str] = None,
    single_sign_on: Optional[SingleSignOn] = None,
    domain_execution_role: Optional[RoleArn] = None,
    service_role: Optional[RoleArn] = None,
    name: Optional[str] = None,
    client_token: Optional[str] = None,
) -> UpdateDomainOutput

Updates a Amazon DataZone domain.

Parameters:

  • identifier (DomainId) –

    The ID of the Amazon Web Services domain that is to be updated.

  • description (Optional[str], default: None ) –

    The description to be updated as part of the UpdateDomain action.

  • single_sign_on (Optional[SingleSignOn], default: None ) –

    The single sign-on option to be updated as part of the UpdateDomain action.

  • domain_execution_role (Optional[RoleArn], default: None ) –

    The domain execution role to be updated as part of the UpdateDomain action.

  • service_role (Optional[RoleArn], default: None ) –

    The service role of the domain.

  • name (Optional[str], default: None ) –

    The name to be updated as part of the UpdateDomain action.

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

    A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.

Raises:

Source code in docs_src/capo_datazone/_services/async_data_zone.py
async def update_domain(
    self,
    identifier: "capo_datazone.types.domain_id.DomainId",
    *,
    config_overrides: Optional[AsyncDataZoneClientConfig] = None,
    description: Optional[str] = None,
    single_sign_on: Optional[
        "capo_datazone.types.single_sign_on.SingleSignOn"
    ] = None,
    domain_execution_role: Optional["capo_datazone.types.role_arn.RoleArn"] = None,
    service_role: Optional["capo_datazone.types.role_arn.RoleArn"] = None,
    name: Optional[str] = None,
    client_token: Optional[str] = None,
) -> "capo_datazone.types.update_domain_output.UpdateDomainOutput":
    """<p>Updates a Amazon DataZone domain.</p>

    Args:
        identifier: <p>The ID of the Amazon Web Services domain that is to be updated.</p>
        description: <p>The description to be updated as part of the <code>UpdateDomain</code> action.</p>
        single_sign_on: <p>The single sign-on option to be updated as part of the <code>UpdateDomain</code> action.</p>
        domain_execution_role: <p>The domain execution role to be updated as part of the <code>UpdateDomain</code> action.</p>
        service_role: <p>The service role of the domain.</p>
        name: <p>The name to be updated as part of the <code>UpdateDomain</code> action.</p>
        client_token: <p>A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.</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.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request has exceeded the specified service quota.</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_domain_input.UpdateDomainInput]",
    ) -> AsyncOperationResponse[
        "capo_datazone.types.update_domain_output.UpdateDomainOutput"
    ]:
        import capo_datazone._operations.data_zone.update_domain

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateDomain")
    )
    input_: capo_datazone.types.update_domain_input.UpdateDomainInput = {
        "identifier": identifier
    }
    if description is not None:
        input_["description"] = description
    if single_sign_on is not None:
        input_["single_sign_on"] = single_sign_on
    if domain_execution_role is not None:
        input_["domain_execution_role"] = domain_execution_role
    if service_role is not None:
        input_["service_role"] = service_role
    if name is not None:
        input_["name"] = name
    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