updateHub method

Future<UpdateHubResponse> updateHub({
  1. required String hubName,
  2. String? hubDescription,
  3. String? hubDisplayName,
  4. List<String>? hubSearchKeywords,
})

Update a hub.

May throw ResourceNotFound.

Parameter hubName : The name of the hub to update.

Parameter hubDescription : A description of the updated hub.

Parameter hubDisplayName : The display name of the hub.

Parameter hubSearchKeywords : The searchable keywords for the hub.

Implementation

Future<UpdateHubResponse> updateHub({
  required String hubName,
  String? hubDescription,
  String? hubDisplayName,
  List<String>? hubSearchKeywords,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'SageMaker.UpdateHub'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'HubName': hubName,
      if (hubDescription != null) 'HubDescription': hubDescription,
      if (hubDisplayName != null) 'HubDisplayName': hubDisplayName,
      if (hubSearchKeywords != null) 'HubSearchKeywords': hubSearchKeywords,
    },
  );

  return UpdateHubResponse.fromJson(jsonResponse.body);
}