migratetodatatiers

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

Migrates the indices and ILM policies away from custom node attribute allocation routing to data tiers routing

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 MigrateToDataTiers

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

func New

Migrates the indices and ILM policies away from custom node attribute allocation routing to data tiers routing

https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-migrate-to-data-tiers.html

func (MigrateToDataTiers) Do

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

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

func (*MigrateToDataTiers) DryRun

func (r *MigrateToDataTiers) DryRun(dryrun bool) *MigrateToDataTiers

DryRun If true, simulates the migration from node attributes based allocation filters to data tiers, but does not perform the migration. This provides a way to retrieve the indices and ILM policies that need to be migrated. API name: dry_run

func (*MigrateToDataTiers) Header

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

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

func (*MigrateToDataTiers) HttpRequest

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

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

func (*MigrateToDataTiers) LegacyTemplateToDelete added in v8.9.0

func (r *MigrateToDataTiers) LegacyTemplateToDelete(legacytemplatetodelete string) *MigrateToDataTiers

API name: legacy_template_to_delete

func (*MigrateToDataTiers) NodeAttribute added in v8.9.0

func (r *MigrateToDataTiers) NodeAttribute(nodeattribute string) *MigrateToDataTiers

API name: node_attribute

func (MigrateToDataTiers) Perform added in v8.7.0

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

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

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

func (r *MigrateToDataTiers) Request(req *Request) *MigrateToDataTiers

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

type NewMigrateToDataTiers

type NewMigrateToDataTiers func() *MigrateToDataTiers

NewMigrateToDataTiers type alias for index.

func NewMigrateToDataTiersFunc

func NewMigrateToDataTiersFunc(tp elastictransport.Interface) NewMigrateToDataTiers

NewMigrateToDataTiersFunc returns a new instance of MigrateToDataTiers 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 {
	LegacyTemplateToDelete *string `json:"legacy_template_to_delete,omitempty"`
	NodeAttribute          *string `json:"node_attribute,omitempty"`
}

Request holds the request body struct for the package migratetodatatiers

https://github.com/elastic/elasticsearch-specification/blob/5bf86339cd4bda77d07f6eaa6789b72f9c0279b1/specification/ilm/migrate_to_data_tiers/Request.ts#L22-L43

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

type Response added in v8.7.0

type Response struct {
	DryRun                      bool     `json:"dry_run"`
	MigratedComponentTemplates  []string `json:"migrated_component_templates"`
	MigratedComposableTemplates []string `json:"migrated_composable_templates"`
	MigratedIlmPolicies         []string `json:"migrated_ilm_policies"`
	MigratedIndices             []string `json:"migrated_indices"`
	MigratedLegacyTemplates     []string `json:"migrated_legacy_templates"`
	RemovedLegacyTemplate       string   `json:"removed_legacy_template"`
}

Response holds the response body struct for the package migratetodatatiers

https://github.com/elastic/elasticsearch-specification/blob/5bf86339cd4bda77d07f6eaa6789b72f9c0279b1/specification/ilm/migrate_to_data_tiers/Response.ts#L22-L32

func NewResponse added in v8.7.0

func NewResponse() *Response

NewResponse returns a Response

func (*Response) UnmarshalJSON added in v8.7.1

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

Jump to

Keyboard shortcuts

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