syntax = "proto3";

package yandex.cloud.mdb.elasticsearch.v1;

import "yandex/cloud/validation.proto";

option go_package = "github.com/yandex-cloud/go-genproto/yandex/cloud/mdb/elasticsearch/v1;elasticsearch";
option java_package = "yandex.cloud.api.mdb.elasticsearch.v1";

// An Elasticsearch user.
message User {
  // Name of the Elasticsearch user.
  string name = 1;

  // ID of the Elasticsearch cluster the user belongs to.
  string cluster_id = 2;
}

message UserSpec {
  // Name of the Elasticsearch user.
  string name = 1 [(required) = true, (length) = "<=63", (pattern) = "[a-zA-Z0-9_]*"];

  // Password of the Elasticsearch user.
  string password = 2 [(required) = true, (length) = "8-128"];
}
