Kibana version: 7.x
Describe the bug: Multiple configurations for the same service/environment in APM agent configuration can be created.
Steps to reproduce:
curl 'http://admin:XXX@localhost:5601/api/apm/settings/agent-configuration/new' -H 'Accept: */*' -H 'kbn-version: 7.6.0' -H 'Content-Type: application/json' --data '{"service":{},"settings":{"transaction_sample_rate":1,"capture_body":"off","transaction_max_spans":500}}'
curl 'http://admin:XXX@localhost:5601/api/apm/settings/agent-configuration/new' -H 'Accept: */*' -H 'kbn-version: 7.6.0' -H 'Content-Type: application/json' --data '{"service":{},"settings":{"transaction_sample_rate":1,"capture_body":"off","transaction_max_spans":500}}'
Expected behavior:
2nd call should fail.
Screenshots (if relevant):

related to #57005
Kibana version: 7.x
Describe the bug: Multiple configurations for the same service/environment in APM agent configuration can be created.
Steps to reproduce:
curl 'http://admin:XXX@localhost:5601/api/apm/settings/agent-configuration/new' -H 'Accept: */*' -H 'kbn-version: 7.6.0' -H 'Content-Type: application/json' --data '{"service":{},"settings":{"transaction_sample_rate":1,"capture_body":"off","transaction_max_spans":500}}'curl 'http://admin:XXX@localhost:5601/api/apm/settings/agent-configuration/new' -H 'Accept: */*' -H 'kbn-version: 7.6.0' -H 'Content-Type: application/json' --data '{"service":{},"settings":{"transaction_sample_rate":1,"capture_body":"off","transaction_max_spans":500}}'Expected behavior:
2nd call should fail.
Screenshots (if relevant):
related to #57005