invalidateapikey

package
v8.13.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 12 Imported by: 3

Documentation

Overview

Invalidates one or more API keys.

Index

Constants

This section is empty.

Variables

View Source
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 InvalidateApiKey

type InvalidateApiKey struct {
	// contains filtered or unexported fields
}

func (InvalidateApiKey) Do

func (r InvalidateApiKey) Do(providedCtx context.Context) (*Response, error)

Do runs the request through the transport, handle the response and returns a invalidateapikey.Response

func (*InvalidateApiKey) Header

func (r *InvalidateApiKey) Header(key, value string) *InvalidateApiKey

Header set a key, value pair in the InvalidateApiKey headers map.

func (*InvalidateApiKey) HttpRequest

func (r *InvalidateApiKey) HttpRequest(ctx context.Context) (*http.Request, error)

HttpRequest returns the http.Request object built from the given parameters.

func (*InvalidateApiKey) Id added in v8.9.0

API name: id

func (*InvalidateApiKey) Ids added in v8.9.0

func (r *InvalidateApiKey) Ids(ids ...string) *InvalidateApiKey

Ids A list of API key ids. This parameter cannot be used with any of `name`, `realm_name`, or `username`. API name: ids

func (*InvalidateApiKey) Name added in v8.9.0

func (r *InvalidateApiKey) Name(name string) *InvalidateApiKey

Name An API key name. This parameter cannot be used with any of `ids`, `realm_name` or `username`. API name: name

func (*InvalidateApiKey) Owner added in v8.9.0

func (r *InvalidateApiKey) Owner(owner bool) *InvalidateApiKey

Owner Can be used to query API keys owned by the currently authenticated user. The `realm_name` or `username` parameters cannot be specified when this parameter is set to `true` as they are assumed to be the currently authenticated ones. API name: owner

func (InvalidateApiKey) Perform added in v8.7.0

func (r InvalidateApiKey) Perform(providedCtx context.Context) (*http.Response, error)

Perform runs the http.Request through the provided transport and returns an http.Response.

func (*InvalidateApiKey) Raw

Raw takes a json payload as input which is then passed to the http.Request If specified Raw takes precedence on Request method.

func (*InvalidateApiKey) RealmName added in v8.9.0

func (r *InvalidateApiKey) RealmName(realmname string) *InvalidateApiKey

RealmName The name of an authentication realm. This parameter cannot be used with either `ids` or `name`, or when `owner` flag is set to `true`. API name: realm_name

func (*InvalidateApiKey) Request

func (r *InvalidateApiKey) Request(req *Request) *InvalidateApiKey

Request allows to set the request property with the appropriate payload.

func (*InvalidateApiKey) Username added in v8.9.0

func (r *InvalidateApiKey) Username(username string) *InvalidateApiKey

Username The username of a user. This parameter cannot be used with either `ids` or `name`, or when `owner` flag is set to `true`. API name: username

type NewInvalidateApiKey

type NewInvalidateApiKey func() *InvalidateApiKey

NewInvalidateApiKey type alias for index.

func NewInvalidateApiKeyFunc

func NewInvalidateApiKeyFunc(tp elastictransport.Interface) NewInvalidateApiKey

NewInvalidateApiKeyFunc returns a new instance of InvalidateApiKey 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 {
	Id *string `json:"id,omitempty"`
	// Ids A list of API key ids.
	// This parameter cannot be used with any of `name`, `realm_name`, or
	// `username`.
	Ids []string `json:"ids,omitempty"`
	// Name An API key name.
	// This parameter cannot be used with any of `ids`, `realm_name` or `username`.
	Name *string `json:"name,omitempty"`
	// Owner Can be used to query API keys owned by the currently authenticated user.
	// The `realm_name` or `username` parameters cannot be specified when this
	// parameter is set to `true` as they are assumed to be the currently
	// authenticated ones.
	Owner *bool `json:"owner,omitempty"`
	// RealmName The name of an authentication realm.
	// This parameter cannot be used with either `ids` or `name`, or when `owner`
	// flag is set to `true`.
	RealmName *string `json:"realm_name,omitempty"`
	// Username The username of a user.
	// This parameter cannot be used with either `ids` or `name`, or when `owner`
	// flag is set to `true`.
	Username *string `json:"username,omitempty"`
}

Request holds the request body struct for the package invalidateapikey

https://github.com/elastic/elasticsearch-specification/blob/5bf86339cd4bda77d07f6eaa6789b72f9c0279b1/specification/security/invalidate_api_key/SecurityInvalidateApiKeyRequest.ts#L23-L66

func NewRequest added in v8.5.0

func NewRequest() *Request

NewRequest returns a Request

func (*Request) FromJSON added in v8.5.0

func (r *Request) FromJSON(data string) (*Request, error)

FromJSON allows to load an arbitrary json into the request structure

func (*Request) UnmarshalJSON added in v8.12.1

func (s *Request) UnmarshalJSON(data []byte) error

type Response added in v8.7.0

type Response struct {
	ErrorCount                   int                `json:"error_count"`
	ErrorDetails                 []types.ErrorCause `json:"error_details,omitempty"`
	InvalidatedApiKeys           []string           `json:"invalidated_api_keys"`
	PreviouslyInvalidatedApiKeys []string           `json:"previously_invalidated_api_keys"`
}

Response holds the response body struct for the package invalidateapikey

https://github.com/elastic/elasticsearch-specification/blob/5bf86339cd4bda77d07f6eaa6789b72f9c0279b1/specification/security/invalidate_api_key/SecurityInvalidateApiKeyResponse.ts#L23-L30

func NewResponse added in v8.7.0

func NewResponse() *Response

NewResponse returns a Response

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL