Skip to content

update_workspaces_pool async

update_workspaces_pool(
    pool_id: WorkspacesPoolId,
    *,
    config_overrides: Optional[AsyncWorkSpacesClientConfig] = None,
    description: Optional[UpdateDescription] = None,
    bundle_id: Optional[BundleId] = None,
    directory_id: Optional[DirectoryId] = None,
    capacity: Optional[Capacity] = None,
    application_settings: Optional[ApplicationSettingsRequest] = None,
    timeout_settings: Optional[TimeoutSettings] = None,
    running_mode: Optional[PoolsRunningMode] = None,
) -> UpdateWorkspacesPoolResult

End of support notice: On December 31, 2027, Amazon Web Services will end support for Amazon WorkSpaces Pools. After December 31, 2027, you will no longer be able to access the Amazon WorkSpaces Pools console or Amazon WorkSpaces Pools resources. For more information, see Amazon WorkSpaces Pools end of support.

Updates the specified pool.

Parameters:

  • pool_id (WorkspacesPoolId) –

    The identifier of the specified pool to update.

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

    Describes the specified pool to update.

  • bundle_id (Optional[BundleId], default: None ) –

    The identifier of the bundle.

  • directory_id (Optional[DirectoryId], default: None ) –

    The identifier of the directory.

  • capacity (Optional[Capacity], default: None ) –

    The desired capacity for the pool.

  • application_settings (Optional[ApplicationSettingsRequest], default: None ) –

    The persistent application settings for users in the pool.

  • timeout_settings (Optional[TimeoutSettings], default: None ) –

    Indicates the timeout settings of the specified pool.

  • running_mode (Optional[PoolsRunningMode], default: None ) –

    The desired running mode for the pool. The running mode can only be updated when the pool is in a stopped state.

Raises:

Source code in docs_src/capo_workspaces/_services/async_work_spaces.py
async def update_workspaces_pool(
    self,
    pool_id: "capo_workspaces.types.workspaces_pool_id.WorkspacesPoolId",
    *,
    config_overrides: Optional[AsyncWorkSpacesClientConfig] = None,
    description: Optional[
        "capo_workspaces.types.update_description.UpdateDescription"
    ] = None,
    bundle_id: Optional["capo_workspaces.types.bundle_id.BundleId"] = None,
    directory_id: Optional["capo_workspaces.types.directory_id.DirectoryId"] = None,
    capacity: Optional["capo_workspaces.types.capacity.Capacity"] = None,
    application_settings: Optional[
        "capo_workspaces.types.application_settings_request.ApplicationSettingsRequest"
    ] = None,
    timeout_settings: Optional[
        "capo_workspaces.types.timeout_settings.TimeoutSettings"
    ] = None,
    running_mode: Optional[
        "capo_workspaces.types.pools_running_mode.PoolsRunningMode"
    ] = None,
) -> (
    "capo_workspaces.types.update_workspaces_pool_result.UpdateWorkspacesPoolResult"
):
    """<note> <p>End of support notice: On December 31, 2027, Amazon Web Services will end support for Amazon WorkSpaces Pools. After December 31, 2027, you will no longer be able to access the Amazon WorkSpaces Pools console or Amazon WorkSpaces Pools resources. For more information, see <a href="https://docs.aws.amazon.com/workspaces/latest/adminguide/wsp-pools-end-of-support.html">Amazon WorkSpaces Pools end of support</a>. </p> </note> <p>Updates the specified pool.</p>

    Args:
        pool_id: <p>The identifier of the specified pool to update.</p>
        description: <p>Describes the specified pool to update.</p>
        bundle_id: <p>The identifier of the bundle.</p>
        directory_id: <p>The identifier of the directory.</p>
        capacity: <p>The desired capacity for the pool.</p>
        application_settings: <p>The persistent application settings for users in the pool.</p>
        timeout_settings: <p>Indicates the timeout settings of the specified pool.</p>
        running_mode: <p>The desired running mode for the pool. The running mode can only be updated when the pool is in a stopped state.</p>

    Raises:
        capo_workspaces.errors.access_denied_exception.AccessDeniedException: <p>The user is not authorized to access a resource.</p>
        capo_workspaces.errors.invalid_parameter_values_exception.InvalidParameterValuesException: <p>One or more parameter values are not valid.</p>
        capo_workspaces.errors.invalid_resource_state_exception.InvalidResourceStateException: <p>The state of the resource is not valid for this operation.</p>
        capo_workspaces.errors.operation_in_progress_exception.OperationInProgressException: <p>The properties of this WorkSpace are currently being modified. Try again in a moment.</p>
        capo_workspaces.errors.operation_not_supported_exception.OperationNotSupportedException: <p>This operation is not supported.</p>
        capo_workspaces.errors.resource_limit_exceeded_exception.ResourceLimitExceededException: <p>Your resource limits have been exceeded.</p>
        capo_workspaces.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource could not be found.</p>
        capo_workspaces.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_workspaces.types.update_workspaces_pool_request.UpdateWorkspacesPoolRequest]",
    ) -> AsyncOperationResponse[
        "capo_workspaces.types.update_workspaces_pool_result.UpdateWorkspacesPoolResult"
    ]:
        import capo_workspaces._operations.workspaces_service.update_workspaces_pool

        (
            output,
            http_response,
        ) = await capo_workspaces._operations.workspaces_service.update_workspaces_pool.async_update_workspaces_pool(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateWorkspacesPool")
    )
    input_: capo_workspaces.types.update_workspaces_pool_request.UpdateWorkspacesPoolRequest = {
        "pool_id": pool_id
    }
    if description is not None:
        input_["description"] = description
    if bundle_id is not None:
        input_["bundle_id"] = bundle_id
    if directory_id is not None:
        input_["directory_id"] = directory_id
    if capacity is not None:
        input_["capacity"] = capacity
    if application_settings is not None:
        input_["application_settings"] = application_settings
    if timeout_settings is not None:
        input_["timeout_settings"] = timeout_settings
    if running_mode is not None:
        input_["running_mode"] = running_mode

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