deleteFargateProfile method

Future<DeleteFargateProfileResponse> deleteFargateProfile({
  1. required String clusterName,
  2. required String fargateProfileName,
})

Deletes an AWS Fargate profile.

When you delete a Fargate profile, any pods running on Fargate that were created with the profile are deleted. If those pods match another Fargate profile, then they are scheduled on Fargate with that profile. If they no longer match any Fargate profiles, then they are not scheduled on Fargate and they may remain in a pending state.

Only one Fargate profile in a cluster can be in the DELETING status at a time. You must wait for a Fargate profile to finish deleting before you can delete any other profiles in that cluster.

May throw InvalidParameterException. May throw ClientException. May throw ServerException. May throw ResourceNotFoundException.

Parameter clusterName : The name of the Amazon EKS cluster associated with the Fargate profile to delete.

Parameter fargateProfileName : The name of the Fargate profile to delete.

Implementation

Future<DeleteFargateProfileResponse> deleteFargateProfile({
  required String clusterName,
  required String fargateProfileName,
}) async {
  ArgumentError.checkNotNull(clusterName, 'clusterName');
  ArgumentError.checkNotNull(fargateProfileName, 'fargateProfileName');
  final response = await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri:
        '/clusters/${Uri.encodeComponent(clusterName)}/fargate-profiles/${Uri.encodeComponent(fargateProfileName)}',
    exceptionFnMap: _exceptionFns,
  );
  return DeleteFargateProfileResponse.fromJson(response);
}