updatecrossclusterapikey

package
v8.17.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Update a cross-cluster API key.

Update the attributes of an existing cross-cluster API key, which is used for API key based remote cluster access.

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 NewUpdateCrossClusterApiKey

type NewUpdateCrossClusterApiKey func(id string) *UpdateCrossClusterApiKey

NewUpdateCrossClusterApiKey type alias for index.

func NewUpdateCrossClusterApiKeyFunc

func NewUpdateCrossClusterApiKeyFunc(tp elastictransport.Interface) NewUpdateCrossClusterApiKey

NewUpdateCrossClusterApiKeyFunc returns a new instance of UpdateCrossClusterApiKey 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 {

	// Access The access to be granted to this API key.
	// The access is composed of permissions for cross cluster search and cross
	// cluster replication.
	// At least one of them must be specified.
	// When specified, the new access assignment fully replaces the previously
	// assigned access.
	Access types.Access `json:"access"`
	// Expiration Expiration time for the API key.
	// By default, API keys never expire. This property can be omitted to leave the
	// value unchanged.
	Expiration types.Duration `json:"expiration,omitempty"`
	// Metadata Arbitrary metadata that you want to associate with the API key.
	// It supports nested data structure.
	// Within the metadata object, keys beginning with `_` are reserved for system
	// usage.
	// When specified, this information fully replaces metadata previously
	// associated with the API key.
	Metadata types.Metadata `json:"metadata,omitempty"`
}

Request holds the request body struct for the package updatecrossclusterapikey

https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/update_cross_cluster_api_key/UpdateCrossClusterApiKeyRequest.ts#L25-L61

func NewRequest

func NewRequest() *Request

NewRequest returns a Request

func (*Request) FromJSON

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

FromJSON allows to load an arbitrary json into the request structure

func (*Request) UnmarshalJSON

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

type Response

type Response struct {

	// Updated If `true`, the API key was updated.
	// If `false`, the API key didn’t change because no change was detected.
	Updated bool `json:"updated"`
}

Response holds the response body struct for the package updatecrossclusterapikey

https://github.com/elastic/elasticsearch-specification/blob/2f823ff6fcaa7f3f0f9b990dc90512d8901e5d64/specification/security/update_cross_cluster_api_key/UpdateCrossClusterApiKeyResponse.ts#L20-L28

func NewResponse

func NewResponse() *Response

NewResponse returns a Response

type UpdateCrossClusterApiKey

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

func New

Update a cross-cluster API key.

Update the attributes of an existing cross-cluster API key, which is used for API key based remote cluster access.

https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-update-cross-cluster-api-key.html

func (*UpdateCrossClusterApiKey) Access

Access The access to be granted to this API key. The access is composed of permissions for cross cluster search and cross cluster replication. At least one of them must be specified. When specified, the new access assignment fully replaces the previously assigned access. API name: access

func (UpdateCrossClusterApiKey) Do

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

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

func (*UpdateCrossClusterApiKey) ErrorTrace

func (r *UpdateCrossClusterApiKey) ErrorTrace(errortrace bool) *UpdateCrossClusterApiKey

ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors when they occur. API name: error_trace

func (*UpdateCrossClusterApiKey) Expiration

Expiration Expiration time for the API key. By default, API keys never expire. This property can be omitted to leave the value unchanged. API name: expiration

func (*UpdateCrossClusterApiKey) FilterPath

func (r *UpdateCrossClusterApiKey) FilterPath(filterpaths ...string) *UpdateCrossClusterApiKey

FilterPath Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch. API name: filter_path

func (*UpdateCrossClusterApiKey) Header

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

func (*UpdateCrossClusterApiKey) HttpRequest

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

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

func (*UpdateCrossClusterApiKey) Human

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 (*UpdateCrossClusterApiKey) Metadata

Metadata Arbitrary metadata that you want to associate with the API key. It supports nested data structure. Within the metadata object, keys beginning with `_` are reserved for system usage. When specified, this information fully replaces metadata previously associated with the API key. API name: metadata

func (UpdateCrossClusterApiKey) Perform

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

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

func (*UpdateCrossClusterApiKey) Pretty

Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use this option for debugging only. API name: pretty

func (*UpdateCrossClusterApiKey) 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 (*UpdateCrossClusterApiKey) Request

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

Jump to

Keyboard shortcuts

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