putautoscalingpolicy

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Creates a new autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.

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 NewPutAutoscalingPolicy

type NewPutAutoscalingPolicy func(name string) *PutAutoscalingPolicy

NewPutAutoscalingPolicy type alias for index.

func NewPutAutoscalingPolicyFunc

func NewPutAutoscalingPolicyFunc(tp elastictransport.Interface) NewPutAutoscalingPolicy

NewPutAutoscalingPolicyFunc returns a new instance of PutAutoscalingPolicy with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.

type PutAutoscalingPolicy

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

func New

Creates a new autoscaling policy. Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.

https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/autoscaling-put-autoscaling-policy.html

func (PutAutoscalingPolicy) Do

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

func (*PutAutoscalingPolicy) Header

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

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

func (*PutAutoscalingPolicy) HttpRequest

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

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

func (*PutAutoscalingPolicy) Name

Name the name of the autoscaling policy API Name: name

func (PutAutoscalingPolicy) Perform

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

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

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

type Response

type Response struct {

	// Acknowledged For a successful response, this value is always true. On failure, an
	// exception is returned instead.
	Acknowledged bool `json:"acknowledged"`
}

func NewResponse

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