Skip to content

update_account_pool async

update_account_pool(
    domain_identifier: DomainId,
    identifier: AccountPoolId,
    *,
    config_overrides: Optional[AsyncDataZoneClientConfig] = None,
    name: Optional[AccountPoolName] = None,
    description: Optional[Description] = None,
    resolution_strategy: Optional[ResolutionStrategy] = None,
    account_source: Optional[AccountSource] = None,
) -> UpdateAccountPoolOutput

Updates the account pool.

Parameters:

  • domain_identifier (DomainId) –

    The domain ID where the account pool that is to be updated lives.

  • identifier (AccountPoolId) –

    The ID of the account pool that is to be updated.

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

    The name of the account pool that is to be updated.

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

    The description of the account pool that is to be udpated.

  • resolution_strategy (Optional[ResolutionStrategy], default: None ) –

    The mechanism used to resolve the account selection from the account pool.

  • account_source (Optional[AccountSource], default: None ) –

    The source of accounts for the account pool. In the current release, it's either a static list of accounts provided by the customer or a custom Amazon Web Services Lambda handler.

Raises:

Source code in docs_src/capo_datazone/_services/async_data_zone.py
async def update_account_pool(
    self,
    domain_identifier: "capo_datazone.types.domain_id.DomainId",
    identifier: "capo_datazone.types.account_pool_id.AccountPoolId",
    *,
    config_overrides: Optional[AsyncDataZoneClientConfig] = None,
    name: Optional["capo_datazone.types.account_pool_name.AccountPoolName"] = None,
    description: Optional["capo_datazone.types.description.Description"] = None,
    resolution_strategy: Optional[
        "capo_datazone.types.resolution_strategy.ResolutionStrategy"
    ] = None,
    account_source: Optional[
        "capo_datazone.types.account_source.AccountSource"
    ] = None,
) -> "capo_datazone.types.update_account_pool_output.UpdateAccountPoolOutput":
    """<p>Updates the account pool.</p>

    Args:
        domain_identifier: <p>The domain ID where the account pool that is to be updated lives.</p>
        identifier: <p>The ID of the account pool that is to be updated.</p>
        name: <p>The name of the account pool that is to be updated.</p>
        description: <p>The description of the account pool that is to be udpated.</p>
        resolution_strategy: <p>The mechanism used to resolve the account selection from the account pool.</p>
        account_source: <p>The source of accounts for the account pool. In the current release, it's either a static list of accounts provided by the customer or a custom Amazon Web Services Lambda handler. </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_account_pool_input.UpdateAccountPoolInput]",
    ) -> AsyncOperationResponse[
        "capo_datazone.types.update_account_pool_output.UpdateAccountPoolOutput"
    ]:
        import capo_datazone._operations.data_zone.update_account_pool

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

    def _redact_input(
        input_: "capo_datazone.types.update_account_pool_input.UpdateAccountPoolInput",
    ) -> dict[str, Any]:
        import capo_datazone.types.update_account_pool_input

        return capo_datazone.types.update_account_pool_input.redact_sensitive(
            input_
        )

    def _redact_output(
        output: "capo_datazone.types.update_account_pool_output.UpdateAccountPoolOutput",
    ) -> dict[str, Any]:
        import capo_datazone.types.update_account_pool_output

        return capo_datazone.types.update_account_pool_output.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "UpdateAccountPool",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_datazone.types.update_account_pool_input.UpdateAccountPoolInput = {
        "domain_identifier": domain_identifier,
        "identifier": identifier,
    }
    if name is not None:
        input_["name"] = name
    if description is not None:
        input_["description"] = description
    if resolution_strategy is not None:
        input_["resolution_strategy"] = resolution_strategy
    if account_source is not None:
        input_["account_source"] = account_source

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