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 ¶
- Variables
- type NewUpdateCrossClusterApiKey
- type Request
- type Response
- type UpdateCrossClusterApiKey
- func (r *UpdateCrossClusterApiKey) Access(access *types.Access) *UpdateCrossClusterApiKey
- func (r UpdateCrossClusterApiKey) Do(providedCtx context.Context) (*Response, error)
- func (r *UpdateCrossClusterApiKey) ErrorTrace(errortrace bool) *UpdateCrossClusterApiKey
- func (r *UpdateCrossClusterApiKey) Expiration(duration types.Duration) *UpdateCrossClusterApiKey
- func (r *UpdateCrossClusterApiKey) FilterPath(filterpaths ...string) *UpdateCrossClusterApiKey
- func (r *UpdateCrossClusterApiKey) Header(key, value string) *UpdateCrossClusterApiKey
- func (r *UpdateCrossClusterApiKey) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *UpdateCrossClusterApiKey) Human(human bool) *UpdateCrossClusterApiKey
- func (r *UpdateCrossClusterApiKey) Metadata(metadata types.Metadata) *UpdateCrossClusterApiKey
- func (r UpdateCrossClusterApiKey) Perform(providedCtx context.Context) (*http.Response, error)
- func (r *UpdateCrossClusterApiKey) Pretty(pretty bool) *UpdateCrossClusterApiKey
- func (r *UpdateCrossClusterApiKey) Raw(raw io.Reader) *UpdateCrossClusterApiKey
- func (r *UpdateCrossClusterApiKey) Request(req *Request) *UpdateCrossClusterApiKey
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 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
func (*Request) UnmarshalJSON ¶
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
type UpdateCrossClusterApiKey ¶
type UpdateCrossClusterApiKey struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *UpdateCrossClusterApiKey
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.
func (*UpdateCrossClusterApiKey) Access ¶
func (r *UpdateCrossClusterApiKey) Access(access *types.Access) *UpdateCrossClusterApiKey
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 ¶
func (r *UpdateCrossClusterApiKey) Expiration(duration types.Duration) *UpdateCrossClusterApiKey
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 ¶
func (r *UpdateCrossClusterApiKey) Header(key, value string) *UpdateCrossClusterApiKey
Header set a key, value pair in the UpdateCrossClusterApiKey headers map.
func (*UpdateCrossClusterApiKey) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (*UpdateCrossClusterApiKey) Human ¶
func (r *UpdateCrossClusterApiKey) Human(human bool) *UpdateCrossClusterApiKey
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 ¶
func (r *UpdateCrossClusterApiKey) Metadata(metadata types.Metadata) *UpdateCrossClusterApiKey
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 ¶
Perform runs the http.Request through the provided transport and returns an http.Response.
func (*UpdateCrossClusterApiKey) Pretty ¶
func (r *UpdateCrossClusterApiKey) Pretty(pretty bool) *UpdateCrossClusterApiKey
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 ¶
func (r *UpdateCrossClusterApiKey) Raw(raw io.Reader) *UpdateCrossClusterApiKey
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 ¶
func (r *UpdateCrossClusterApiKey) Request(req *Request) *UpdateCrossClusterApiKey
Request allows to set the request property with the appropriate payload.