Documentation ¶
Overview ¶
Bulk delete roles.
The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. The bulk delete roles API cannot delete roles that are defined in roles files.
Index ¶
- Variables
- type BulkDeleteRole
- func (r BulkDeleteRole) Do(providedCtx context.Context) (*Response, error)
- func (r *BulkDeleteRole) ErrorTrace(errortrace bool) *BulkDeleteRole
- func (r *BulkDeleteRole) FilterPath(filterpaths ...string) *BulkDeleteRole
- func (r *BulkDeleteRole) Header(key, value string) *BulkDeleteRole
- func (r *BulkDeleteRole) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *BulkDeleteRole) Human(human bool) *BulkDeleteRole
- func (r *BulkDeleteRole) Names(names ...string) *BulkDeleteRole
- func (r BulkDeleteRole) Perform(providedCtx context.Context) (*http.Response, error)
- func (r *BulkDeleteRole) Pretty(pretty bool) *BulkDeleteRole
- func (r *BulkDeleteRole) Raw(raw io.Reader) *BulkDeleteRole
- func (r *BulkDeleteRole) Refresh(refresh refresh.Refresh) *BulkDeleteRole
- func (r *BulkDeleteRole) Request(req *Request) *BulkDeleteRole
- type NewBulkDeleteRole
- 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 BulkDeleteRole ¶
type BulkDeleteRole struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *BulkDeleteRole
Bulk delete roles.
The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. The bulk delete roles API cannot delete roles that are defined in roles files.
https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-bulk-delete-role.html
func (BulkDeleteRole) Do ¶
func (r BulkDeleteRole) Do(providedCtx context.Context) (*Response, error)
Do runs the request through the transport, handle the response and returns a bulkdeleterole.Response
func (*BulkDeleteRole) ErrorTrace ¶
func (r *BulkDeleteRole) ErrorTrace(errortrace bool) *BulkDeleteRole
ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors when they occur. API name: error_trace
func (*BulkDeleteRole) FilterPath ¶
func (r *BulkDeleteRole) FilterPath(filterpaths ...string) *BulkDeleteRole
FilterPath Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch. API name: filter_path
func (*BulkDeleteRole) Header ¶
func (r *BulkDeleteRole) Header(key, value string) *BulkDeleteRole
Header set a key, value pair in the BulkDeleteRole headers map.
func (*BulkDeleteRole) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (*BulkDeleteRole) Human ¶
func (r *BulkDeleteRole) Human(human bool) *BulkDeleteRole
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 (*BulkDeleteRole) Names ¶
func (r *BulkDeleteRole) Names(names ...string) *BulkDeleteRole
Names An array of role names to delete API name: names
func (BulkDeleteRole) Perform ¶
Perform runs the http.Request through the provided transport and returns an http.Response.
func (*BulkDeleteRole) Pretty ¶
func (r *BulkDeleteRole) Pretty(pretty bool) *BulkDeleteRole
Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use this option for debugging only. API name: pretty
func (*BulkDeleteRole) Raw ¶
func (r *BulkDeleteRole) Raw(raw io.Reader) *BulkDeleteRole
Raw takes a json payload as input which is then passed to the http.Request If specified Raw takes precedence on Request method.
func (*BulkDeleteRole) Refresh ¶
func (r *BulkDeleteRole) Refresh(refresh refresh.Refresh) *BulkDeleteRole
Refresh If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. API name: refresh
func (*BulkDeleteRole) Request ¶
func (r *BulkDeleteRole) Request(req *Request) *BulkDeleteRole
Request allows to set the request property with the appropriate payload.
type NewBulkDeleteRole ¶
type NewBulkDeleteRole func() *BulkDeleteRole
NewBulkDeleteRole type alias for index.
func NewBulkDeleteRoleFunc ¶
func NewBulkDeleteRoleFunc(tp elastictransport.Interface) NewBulkDeleteRole
NewBulkDeleteRoleFunc returns a new instance of BulkDeleteRole 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 { // Names An array of role names to delete Names []string `json:"names"` }
Request holds the request body struct for the package bulkdeleterole
type Response ¶
type Response struct { // Deleted Array of deleted roles Deleted []string `json:"deleted,omitempty"` // Errors Present if any deletes resulted in errors Errors *types.BulkError `json:"errors,omitempty"` // NotFound Array of roles that could not be found NotFound []string `json:"not_found,omitempty"` }
Response holds the response body struct for the package bulkdeleterole