Module org.elasticsearch.xcore
Class RemoteClusterPermissionGroup
java.lang.Object
org.elasticsearch.xpack.core.security.authz.permission.RemoteClusterPermissionGroup
- All Implemented Interfaces:
NamedWriteable,Writeable,org.elasticsearch.xcontent.ToXContent,org.elasticsearch.xcontent.ToXContentObject
public class RemoteClusterPermissionGroup
extends Object
implements NamedWriteable, org.elasticsearch.xcontent.ToXContentObject
Represents a group of permissions for a remote cluster. For example:
{
"privileges" : ["monitor_enrich"],
"clusters" : ["*"]
}
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionRemoteClusterPermissionGroup(String[] clusterPrivileges, String[] remoteClusterAliases) RemoteClusterPermissionGroup(Map<String, List<String>> remoteClusterGroup) -
Method Summary
Modifier and TypeMethodDescriptionString[]booleaninthashCode()booleanhasPrivileges(String remoteClusterAlias) String[]toMap()Converts the group to a map representation.toString()org.elasticsearch.xcontent.XContentBuildertoXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) voidwriteTo(StreamOutput out) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Field Details
-
NAME
- See Also:
-
-
Constructor Details
-
RemoteClusterPermissionGroup
- Throws:
IOException
-
RemoteClusterPermissionGroup
-
RemoteClusterPermissionGroup
- Parameters:
clusterPrivileges- The list of cluster privileges that are allowed for the remote cluster. must not be null or empty.remoteClusterAliases- The list of remote clusters that the privileges apply to. must not be null or empty.
-
-
Method Details
-
hasPrivileges
- Parameters:
remoteClusterAlias- The remote cluster alias to check to see if has privileges defined in this group.- Returns:
- true if the remote cluster alias has privileges defined in this group, false otherwise.
-
clusterPrivileges
- Returns:
- A copy of the cluster privileges.
-
remoteClusterAliases
- Returns:
- A copy of the cluster aliases.
-
toMap
Converts the group to a map representation.- Returns:
- A map representation of the group.
-
toXContent
public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceorg.elasticsearch.xcontent.ToXContent- Throws:
IOException
-
writeTo
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
equals
-
hashCode
public int hashCode() -
toString
-
getWriteableName
- Specified by:
getWriteableNamein interfaceNamedWriteable
-