Skip to content

update_space

update_space(
    *,
    config_overrides: Optional[SageMakerClientConfig] = None,
    domain_id: Optional[DomainId] = None,
    space_name: Optional[SpaceName] = None,
    space_settings: Optional[SpaceSettings] = None,
    space_display_name: Optional[NonEmptyString64] = None,
) -> UpdateSpaceResponse

Updates the settings of a space.

You can't edit the app type of a space in the SpaceSettings.

Parameters:

  • domain_id (Optional[DomainId], default: None ) –

    The ID of the associated domain.

  • space_name (Optional[SpaceName], default: None ) –

    The name of the space.

  • space_settings (Optional[SpaceSettings], default: None ) –

    A collection of space settings.

  • space_display_name (Optional[NonEmptyString64], default: None ) –

    The name of the space that appears in the Amazon SageMaker Studio UI.

Raises:

Source code in docs_src/capo_sagemaker/_services/sage_maker.py
def update_space(
    self,
    *,
    config_overrides: Optional[SageMakerClientConfig] = None,
    domain_id: Optional["capo_sagemaker.types.domain_id.DomainId"] = None,
    space_name: Optional["capo_sagemaker.types.space_name.SpaceName"] = None,
    space_settings: Optional[
        "capo_sagemaker.types.space_settings.SpaceSettings"
    ] = None,
    space_display_name: Optional[
        "capo_sagemaker.types.non_empty_string64.NonEmptyString64"
    ] = None,
) -> "capo_sagemaker.types.update_space_response.UpdateSpaceResponse":
    """<p>Updates the settings of a space.</p> <note> <p>You can't edit the app type of a space in the <code>SpaceSettings</code>.</p> </note>

    Args:
        domain_id: <p>The ID of the associated domain.</p>
        space_name: <p>The name of the space.</p>
        space_settings: <p>A collection of space settings.</p>
        space_display_name: <p>The name of the space that appears in the Amazon SageMaker Studio UI.</p>

    Raises:
        capo_sagemaker.errors.resource_in_use.ResourceInUse: <p>Resource being accessed is in use.</p>
        capo_sagemaker.errors.resource_limit_exceeded.ResourceLimitExceeded: <p> You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created. </p>
        capo_sagemaker.errors.resource_not_found.ResourceNotFound: <p>Resource being access is not found.</p>
        capo_sagemaker.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_sagemaker.types.update_space_request.UpdateSpaceRequest]",
    ) -> OperationResponse[
        "capo_sagemaker.types.update_space_response.UpdateSpaceResponse"
    ]:
        import capo_sagemaker._operations.sage_maker.update_space

        output, http_response = (
            capo_sagemaker._operations.sage_maker.update_space.update_space(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateSpace")
    )
    input_: capo_sagemaker.types.update_space_request.UpdateSpaceRequest = {}
    if domain_id is not None:
        input_["domain_id"] = domain_id
    if space_name is not None:
        input_["space_name"] = space_name
    if space_settings is not None:
        input_["space_settings"] = space_settings
    if space_display_name is not None:
        input_["space_display_name"] = space_display_name

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