updateHubContent method
- required String hubContentName,
- required HubContentType hubContentType,
- required String hubContentVersion,
- required String hubName,
- String? hubContentDescription,
- String? hubContentDisplayName,
- String? hubContentMarkdown,
- List<
String> ? hubContentSearchKeywords, - HubContentSupportStatus? supportStatus,
Updates SageMaker hub content (either a Model or
Notebook resource).
You can update the metadata that describes the resource. In addition to the required request fields, specify at least one of the following fields to update:
-
HubContentDescription -
HubContentDisplayName -
HubContentMarkdown -
HubContentSearchKeywords -
SupportStatus
May throw ResourceInUse.
May throw ResourceNotFound.
Parameter hubContentName :
The name of the hub content resource that you want to update.
Parameter hubContentType :
The content type of the resource that you want to update. Only specify a
Model or Notebook resource for this API. To
update a ModelReference, use the
UpdateHubContentReference API instead.
Parameter hubContentVersion :
The hub content version that you want to update. For example, if you have
two versions of a resource in your hub, you can update the second version.
Parameter hubName :
The name of the SageMaker hub that contains the hub content you want to
update. You can optionally use the hub ARN instead.
Parameter hubContentDescription :
The description of the hub content.
Parameter hubContentDisplayName :
The display name of the hub content.
Parameter hubContentMarkdown :
A string that provides a description of the hub content. This string can
include links, tables, and standard markdown formatting.
Parameter hubContentSearchKeywords :
The searchable keywords of the hub content.
Parameter supportStatus :
Indicates the current status of the hub content resource.
Implementation
Future<UpdateHubContentResponse> updateHubContent({
required String hubContentName,
required HubContentType hubContentType,
required String hubContentVersion,
required String hubName,
String? hubContentDescription,
String? hubContentDisplayName,
String? hubContentMarkdown,
List<String>? hubContentSearchKeywords,
HubContentSupportStatus? supportStatus,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'SageMaker.UpdateHubContent'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'HubContentName': hubContentName,
'HubContentType': hubContentType.value,
'HubContentVersion': hubContentVersion,
'HubName': hubName,
if (hubContentDescription != null)
'HubContentDescription': hubContentDescription,
if (hubContentDisplayName != null)
'HubContentDisplayName': hubContentDisplayName,
if (hubContentMarkdown != null)
'HubContentMarkdown': hubContentMarkdown,
if (hubContentSearchKeywords != null)
'HubContentSearchKeywords': hubContentSearchKeywords,
if (supportStatus != null) 'SupportStatus': supportStatus.value,
},
);
return UpdateHubContentResponse.fromJson(jsonResponse.body);
}