Skip to content

modify_workspace_properties

modify_workspace_properties(
    workspace_id: WorkspaceId,
    *,
    config_overrides: Optional[WorkSpacesClientConfig] = None,
    workspace_properties: Optional[WorkspaceProperties] = None,
    data_replication: Optional[DataReplication] = None,
) -> ModifyWorkspacePropertiesResult

Modifies the specified WorkSpace properties. For important information about how to modify the size of the root and user volumes, see Modify a WorkSpace.

The MANUAL running mode value is only supported by Amazon WorkSpaces Core. Contact your account team to be allow-listed to use this value. For more information, see Amazon WorkSpaces Core.

Parameters:

Raises:

Source code in docs_src/capo_workspaces/_services/work_spaces.py
def modify_workspace_properties(
    self,
    workspace_id: "capo_workspaces.types.workspace_id.WorkspaceId",
    *,
    config_overrides: Optional[WorkSpacesClientConfig] = None,
    workspace_properties: Optional[
        "capo_workspaces.types.workspace_properties.WorkspaceProperties"
    ] = None,
    data_replication: Optional[
        "capo_workspaces.types.data_replication.DataReplication"
    ] = None,
) -> "capo_workspaces.types.modify_workspace_properties_result.ModifyWorkspacePropertiesResult":
    """<p>Modifies the specified WorkSpace properties. For important information about how to modify the size of the root and user volumes, see <a href="https://docs.aws.amazon.com/workspaces/latest/adminguide/modify-workspaces.html"> Modify a WorkSpace</a>. </p> <note> <p>The <code>MANUAL</code> running mode value is only supported by Amazon WorkSpaces Core. Contact your account team to be allow-listed to use this value. For more information, see <a href="http://aws.amazon.com/workspaces/core/">Amazon WorkSpaces Core</a>.</p> </note>

    Args:
        workspace_id: <p>The identifier of the WorkSpace.</p>
        workspace_properties: <p>The properties of the WorkSpace.</p>
        data_replication: <p>Indicates the data replication status.</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.resource_not_found_exception.ResourceNotFoundException: <p>The resource could not be found.</p>
        capo_workspaces.errors.resource_unavailable_exception.ResourceUnavailableException: <p>The specified resource is not available.</p>
        capo_workspaces.errors.unsupported_workspace_configuration_exception.UnsupportedWorkspaceConfigurationException: <p>The configuration of this WorkSpace is not supported for this operation. For more information, see <a href="https://docs.aws.amazon.com/workspaces/latest/adminguide/required-service-components.html">Required Configuration and Service Components for WorkSpaces </a>.</p>
        capo_workspaces.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_workspaces.types.modify_workspace_properties_request.ModifyWorkspacePropertiesRequest]",
    ) -> OperationResponse[
        "capo_workspaces.types.modify_workspace_properties_result.ModifyWorkspacePropertiesResult"
    ]:
        import capo_workspaces._operations.workspaces_service.modify_workspace_properties

        output, http_response = (
            capo_workspaces._operations.workspaces_service.modify_workspace_properties.modify_workspace_properties(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ModifyWorkspaceProperties")
    )
    input_: capo_workspaces.types.modify_workspace_properties_request.ModifyWorkspacePropertiesRequest = {
        "workspace_id": workspace_id
    }
    if workspace_properties is not None:
        input_["workspace_properties"] = workspace_properties
    if data_replication is not None:
        input_["data_replication"] = data_replication

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output