deleteWorkforce method

Future<void> deleteWorkforce({
  1. required String workforceName,
})

Use this operation to delete a workforce.

If you want to create a new workforce in an AWS Region where a workforce already exists, use this operation to delete the existing workforce and then use to create a new workforce.

Parameter workforceName : The name of the workforce.

Implementation

Future<void> deleteWorkforce({
  required String workforceName,
}) async {
  ArgumentError.checkNotNull(workforceName, 'workforceName');
  _s.validateStringLength(
    'workforceName',
    workforceName,
    1,
    63,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'SageMaker.DeleteWorkforce'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'WorkforceName': workforceName,
    },
  );
}