Documentation
¶
Overview ¶
Check user profile privileges.
Determine whether the users associated with the specified user profile IDs have all the requested privileges.
NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. Individual users and external applications should not call this API directly. Elastic reserves the right to change or remove this feature in future releases without prior notice.
Index ¶
- Variables
- type HasPrivilegesUserProfile
- func (r HasPrivilegesUserProfile) Do(providedCtx context.Context) (*Response, error)
- func (r *HasPrivilegesUserProfile) ErrorTrace(errortrace bool) *HasPrivilegesUserProfile
- func (r *HasPrivilegesUserProfile) FilterPath(filterpaths ...string) *HasPrivilegesUserProfile
- func (r *HasPrivilegesUserProfile) Header(key, value string) *HasPrivilegesUserProfile
- func (r *HasPrivilegesUserProfile) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *HasPrivilegesUserProfile) Human(human bool) *HasPrivilegesUserProfile
- func (r HasPrivilegesUserProfile) Perform(providedCtx context.Context) (*http.Response, error)
- func (r *HasPrivilegesUserProfile) Pretty(pretty bool) *HasPrivilegesUserProfile
- func (r *HasPrivilegesUserProfile) Privileges(privileges types.PrivilegesCheckVariant) *HasPrivilegesUserProfile
- func (r *HasPrivilegesUserProfile) Raw(raw io.Reader) *HasPrivilegesUserProfile
- func (r *HasPrivilegesUserProfile) Request(req *Request) *HasPrivilegesUserProfile
- func (r *HasPrivilegesUserProfile) Uids(uids ...string) *HasPrivilegesUserProfile
- type NewHasPrivilegesUserProfile
- type Request
- type Response
Constants ¶
This section is empty.
Variables ¶
var ErrBuildPath = errors.New("cannot build path, check for missing path parameters")
ErrBuildPath is returned in case of missing parameters within the build of the request.
Functions ¶
This section is empty.
Types ¶
type HasPrivilegesUserProfile ¶
type HasPrivilegesUserProfile struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *HasPrivilegesUserProfile
Check user profile privileges.
Determine whether the users associated with the specified user profile IDs have all the requested privileges.
NOTE: The user profile feature is designed only for use by Kibana and Elastic's Observability, Enterprise Search, and Elastic Security solutions. Individual users and external applications should not call this API directly. Elastic reserves the right to change or remove this feature in future releases without prior notice.
func (HasPrivilegesUserProfile) Do ¶
func (r HasPrivilegesUserProfile) Do(providedCtx context.Context) (*Response, error)
Do runs the request through the transport, handle the response and returns a hasprivilegesuserprofile.Response
func (*HasPrivilegesUserProfile) ErrorTrace ¶
func (r *HasPrivilegesUserProfile) ErrorTrace(errortrace bool) *HasPrivilegesUserProfile
ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors when they occur. API name: error_trace
func (*HasPrivilegesUserProfile) FilterPath ¶
func (r *HasPrivilegesUserProfile) FilterPath(filterpaths ...string) *HasPrivilegesUserProfile
FilterPath Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch. API name: filter_path
func (*HasPrivilegesUserProfile) Header ¶
func (r *HasPrivilegesUserProfile) Header(key, value string) *HasPrivilegesUserProfile
Header set a key, value pair in the HasPrivilegesUserProfile headers map.
func (*HasPrivilegesUserProfile) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (*HasPrivilegesUserProfile) Human ¶
func (r *HasPrivilegesUserProfile) Human(human bool) *HasPrivilegesUserProfile
Human When set to `true` will return statistics in a format suitable for humans. For example `"exists_time": "1h"` for humans and `"eixsts_time_in_millis": 3600000` for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines. API name: human
func (HasPrivilegesUserProfile) Perform ¶
Perform runs the http.Request through the provided transport and returns an http.Response.
func (*HasPrivilegesUserProfile) Pretty ¶
func (r *HasPrivilegesUserProfile) Pretty(pretty bool) *HasPrivilegesUserProfile
Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use this option for debugging only. API name: pretty
func (*HasPrivilegesUserProfile) Privileges ¶
func (r *HasPrivilegesUserProfile) Privileges(privileges types.PrivilegesCheckVariant) *HasPrivilegesUserProfile
An object containing all the privileges to be checked. API name: privileges
func (*HasPrivilegesUserProfile) Raw ¶
func (r *HasPrivilegesUserProfile) Raw(raw io.Reader) *HasPrivilegesUserProfile
Raw takes a json payload as input which is then passed to the http.Request If specified Raw takes precedence on Request method.
func (*HasPrivilegesUserProfile) Request ¶
func (r *HasPrivilegesUserProfile) Request(req *Request) *HasPrivilegesUserProfile
Request allows to set the request property with the appropriate payload.
func (*HasPrivilegesUserProfile) Uids ¶
func (r *HasPrivilegesUserProfile) Uids(uids ...string) *HasPrivilegesUserProfile
A list of profile IDs. The privileges are checked for associated users of the profiles. API name: uids
type NewHasPrivilegesUserProfile ¶
type NewHasPrivilegesUserProfile func() *HasPrivilegesUserProfile
NewHasPrivilegesUserProfile type alias for index.
func NewHasPrivilegesUserProfileFunc ¶
func NewHasPrivilegesUserProfileFunc(tp elastictransport.Interface) NewHasPrivilegesUserProfile
NewHasPrivilegesUserProfileFunc returns a new instance of HasPrivilegesUserProfile with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.
type Request ¶
type Request struct { // Privileges An object containing all the privileges to be checked. Privileges types.PrivilegesCheck `json:"privileges"` // Uids A list of profile IDs. The privileges are checked for associated users of the // profiles. Uids []string `json:"uids"` }
Request holds the request body struct for the package hasprivilegesuserprofile
type Response ¶
type Response struct { // Errors The subset of the requested profile IDs for which an error // was encountered. It does not include the missing profile IDs // or the profile IDs of the users that do not have all the // requested privileges. This field is absent if empty. Errors *types.HasPrivilegesUserProfileErrors `json:"errors,omitempty"` // HasPrivilegeUids The subset of the requested profile IDs of the users that // have all the requested privileges. HasPrivilegeUids []string `json:"has_privilege_uids"` }
Response holds the response body struct for the package hasprivilegesuserprofile