Skip to content

update_hub

update_hub(
    *,
    config_overrides: Optional[SageMakerClientConfig] = None,
    hub_name: Optional[HubNameOrArn] = None,
    hub_description: Optional[HubDescription] = None,
    hub_display_name: Optional[HubDisplayName] = None,
    hub_search_keywords: Optional[HubSearchKeywordList] = None,
) -> UpdateHubResponse

Update a hub.

Parameters:

Raises:

Source code in docs_src/capo_sagemaker/_services/sage_maker.py
def update_hub(
    self,
    *,
    config_overrides: Optional[SageMakerClientConfig] = None,
    hub_name: Optional["capo_sagemaker.types.hub_name_or_arn.HubNameOrArn"] = None,
    hub_description: Optional[
        "capo_sagemaker.types.hub_description.HubDescription"
    ] = None,
    hub_display_name: Optional[
        "capo_sagemaker.types.hub_display_name.HubDisplayName"
    ] = None,
    hub_search_keywords: Optional[
        "capo_sagemaker.types.hub_search_keyword_list.HubSearchKeywordList"
    ] = None,
) -> "capo_sagemaker.types.update_hub_response.UpdateHubResponse":
    """<p>Update a hub.</p>

    Args:
        hub_name: <p>The name of the hub to update.</p>
        hub_description: <p>A description of the updated hub.</p>
        hub_display_name: <p>The display name of the hub.</p>
        hub_search_keywords: <p>The searchable keywords for the hub.</p>

    Raises:
        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_hub_request.UpdateHubRequest]",
    ) -> OperationResponse[
        "capo_sagemaker.types.update_hub_response.UpdateHubResponse"
    ]:
        import capo_sagemaker._operations.sage_maker.update_hub

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateHub")
    )
    input_: capo_sagemaker.types.update_hub_request.UpdateHubRequest = {}
    if hub_name is not None:
        input_["hub_name"] = hub_name
    if hub_description is not None:
        input_["hub_description"] = hub_description
    if hub_display_name is not None:
        input_["hub_display_name"] = hub_display_name
    if hub_search_keywords is not None:
        input_["hub_search_keywords"] = hub_search_keywords

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