Set legacy security settingsedit

Sets the legacy Shield security settings for a 2.x Elasticsearch cluster.

Requestedit

PUT /api/v1/clusters/elasticsearch/{cluster_id}/settings/security/legacy

Path parametersedit

Name Type Required Description

cluster_id

string

Y

The Elasticsearch cluster identifier.

Request bodyedit

(LegacySecuritySettings) (required) The legacy security settings

Responsesedit

200

(LegacySecuritySettings) The legacy security settings successfully changed.

404

(BasicFailedReply) The {cluster_id} can't be found. (code: 'clusters.cluster_not_found')

449

(BasicFailedReply) Elevated permissions are required. (code: '"root.needs_elevated_permissions"')

To perform this operation, you must be authenticated by means of one of the following methods: apiKey, basicAuth.

Request exampleedit

curl -XPUT {{hostname}}/api/v1/clusters/elasticsearch/{cluster_id}/settings/security/legacy \
-u $CLOUD_USER:$CLOUD_KEY \
-H 'Content-Type: application/json' \
-d '
{
   "roles_yaml" : "string",
   "users_roles_yaml" : "string",
   "users_yaml" : "string"
}
'