My understanding is that minimum and maximum can only be set with Auto Scaling policies for ECS services.
https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-auto-scaling.html.
You will need to create auto scaling policies to set these.
Service Auto Scaling is made possible by a combination of the Amazon ECS, CloudWatch, and Application Auto Scaling APIs.
In your case, just using Application AutoScaling API, registerScalableTarget method call should be enough. Here is Example.
https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-Aws.ApplicationAutoScaling.ApplicationAutoScalingClient.html
$result = $client->registerScalableTarget([
'MaxCapacity' => 20,
'MinCapacity' => 2,
'ResourceId' => 'service/default/sample-webapp', // REQUIRED
'RoleARN' => 'arn:aws:iam::012345678910:role/ApplicationAutoscalingECSRole',
'ScalableDimension' => 'ecs:service:DesiredCount', // REQUIRED
'ServiceNamespace' => 'ecs', // REQUIRED
]);