disassociateTrialComponent method
Disassociates a trial component from a trial. This doesn't effect other trials the component is associated with. Before you can delete a component, you must disassociate the component from all trials it is associated with. To associate a trial component with a trial, call the AssociateTrialComponent API.
To get a list of the trials a component is associated with, use the
Search API. Specify ExperimentTrialComponent
for the
Resource
parameter. The list appears in the response under
Results.TrialComponent.Parents
.
May throw ResourceNotFound.
Parameter trialComponentName
:
The name of the component to disassociate from the trial.
Parameter trialName
:
The name of the trial to disassociate from.
Implementation
Future<DisassociateTrialComponentResponse> disassociateTrialComponent({
required String trialComponentName,
required String trialName,
}) async {
ArgumentError.checkNotNull(trialComponentName, 'trialComponentName');
_s.validateStringLength(
'trialComponentName',
trialComponentName,
1,
120,
isRequired: true,
);
ArgumentError.checkNotNull(trialName, 'trialName');
_s.validateStringLength(
'trialName',
trialName,
1,
120,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'SageMaker.DisassociateTrialComponent'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'TrialComponentName': trialComponentName,
'TrialName': trialName,
},
);
return DisassociateTrialComponentResponse.fromJson(jsonResponse.body);
}