Updates a WorkSpace bundle with a new image. For more information about updating WorkSpace bundles, see Update a Custom WorkSpaces Bundle.
Existing WorkSpaces aren't automatically updated when you update the bundle that they're based on. To update existing WorkSpaces that are based on a bundle that you've updated, you must either rebuild the WorkSpaces or delete and recreate them.
Parameters:
Raises:
Source code in docs_src/capo_workspaces/_services/work_spaces.py
| def update_workspace_bundle(
self,
*,
config_overrides: Optional[WorkSpacesClientConfig] = None,
bundle_id: Optional["capo_workspaces.types.bundle_id.BundleId"] = None,
image_id: Optional[
"capo_workspaces.types.workspace_image_id.WorkspaceImageId"
] = None,
) -> "capo_workspaces.types.update_workspace_bundle_result.UpdateWorkspaceBundleResult":
"""<p>Updates a WorkSpace bundle with a new image. For more information about updating WorkSpace bundles, see <a href="https://docs.aws.amazon.com/workspaces/latest/adminguide/update-custom-bundle.html"> Update a Custom WorkSpaces Bundle</a>.</p> <important> <p>Existing WorkSpaces aren't automatically updated when you update the bundle that they're based on. To update existing WorkSpaces that are based on a bundle that you've updated, you must either rebuild the WorkSpaces or delete and recreate them.</p> </important>
Args:
bundle_id: <p>The identifier of the bundle.</p>
image_id: <p>The identifier of the image.</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.operation_not_supported_exception.OperationNotSupportedException: <p>This operation is not supported.</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.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_workspaces.types.update_workspace_bundle_request.UpdateWorkspaceBundleRequest]",
) -> OperationResponse[
"capo_workspaces.types.update_workspace_bundle_result.UpdateWorkspaceBundleResult"
]:
import capo_workspaces._operations.workspaces_service.update_workspace_bundle
output, http_response = (
capo_workspaces._operations.workspaces_service.update_workspace_bundle.update_workspace_bundle(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateWorkspaceBundle")
)
input_: capo_workspaces.types.update_workspace_bundle_request.UpdateWorkspaceBundleRequest = {}
if bundle_id is not None:
input_["bundle_id"] = bundle_id
if image_id is not None:
input_["image_id"] = image_id
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|