requests

package
v0.0.0-...-5fa7f0c Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	Alias *Alias `json:"alias,omitempty"`
	// Allocate the index to a node with a specific attribute set
	Allocation *Allocation `json:"allocation,omitempty"`
	// Closes the managed index.
	Close *Close `json:"close,omitempty"`
	// Deletes a managed index.
	Delete *Delete `json:"delete,omitempty"`
	// Reduces the number of Lucene segments by merging the segments of individual shards.
	ForceMerge *ForceMerge `json:"force_merge,omitempty"`
	// Set the priority for the index in a specific state.
	IndexPriority *IndexPriority `json:"index_priority,omitempty"`
	//Name          string        `json:"name,omitempty"`
	Notification *Notification `json:"notification,omitempty"`
	// Opens a managed index.
	Open *Open `json:"open,omitempty"`
	// Sets a managed index to be read only.
	ReadOnly *ReadOnly `json:"read_only,omitempty"`
	// Sets a managed index to be writeable.
	ReadWrite *ReadWrite `json:"read_write,omitempty"`
	// Sets the number of replicas to assign to an index.
	ReplicaCount *ReplicaCount `json:"replica_count,omitempty"`
	// The retry configuration for the action.
	Retry *Retry `json:"retry,omitempty"`
	// Rolls an alias over to a new index when the managed index meets one of the rollover conditions.
	Rollover *Rollover `json:"rollover,omitempty"`
	// Periodically reduce data granularity by rolling up old data into summarized indexes.
	Rollup *Rollup `json:"rollup,omitempty"`
	// Allows you to reduce the number of primary shards in your indexes
	Shrink *Shrink `json:"shrink,omitempty"`
	// Back up your cluster’s indexes and state
	Snapshot *Snapshot `json:"snapshot,omitempty"`
	// The timeout period for the action.
	Timeout *string `json:"timeout,omitempty"`
}

Actions are the steps that the policy sequentially executes on entering a specific state.

type ActionGroup

type ActionGroup struct {
	AllowedActions []string `json:"allowed_actions"`
	Type           string   `json:"type,omitempty"`
	Description    string   `json:"description,omitempty"`
}

type Alias

type Alias struct {
	// Allocate the index to a node with a specified attribute.
	Actions []AliasAction `json:"actions"`
}

type AliasAction

type AliasAction struct {
	Add    *AliasDetails `json:"add,omitempty"`
	Remove *AliasDetails `json:"remove,omitempty"`
}

type AliasDetails

type AliasDetails struct {
	// The name of the index that the alias points to.
	Index *string `json:"index,omitempty"`
	// The name of the alias.
	Aliases []string `json:"aliases,omitempty"`
	// Limit search to an associated shard value
	Routing *string `json:"routing,omitempty"`
	// Specify the index that accepts any write operations to the alias.
	IsWriteIndex *bool `json:"is_write_index,omitempty"`
}

type Allocation

type Allocation struct {
	// Allocate the index to a node with a specified attribute.
	Exclude string `json:"exclude"`
	// Allocate the index to a node with any of the specified attributes.
	Include string `json:"include"`
	// Don’t allocate the index to a node with any of the specified attributes.
	Require string `json:"require"`
	// Wait for the policy to execute before allocating the index to a node with a specified attribute.
	WaitFor string `json:"wait_for"`
}

type Close

type Close struct{}

type ComponentTemplate

type ComponentTemplate struct {
	Template Index                 `json:"template"`
	Version  int                   `json:"version,omitempty"`
	Meta     *apiextensionsv1.JSON `json:"_meta,omitempty"`
}

type Condition

type Condition struct {
	// The cron job that triggers the transition if no other transition happens first.
	Cron *Cron `json:"cron,omitempty"`
	// The minimum document count of the index required to transition.
	MinDocCount *int64 `json:"min_doc_count,omitempty"`
	// The minimum age of the index required to transition.
	MinIndexAge *string `json:"min_index_age,omitempty"`
	// The minimum age required after a rollover has occurred to transition to the next state.
	MinRolloverAge *string `json:"min_rollover_age,omitempty"`
	// The minimum size of the total primary shard storage (not counting replicas) required to transition.
	MinSize *string `json:"min_size,omitempty"`
}

type Cron

type Cron struct {
	// The cron expression that triggers the transition.
	Expression string `json:"expression"`
	// The timezone that triggers the transition.
	Timezone string `json:"timezone"`
}

type Datastream

type Datastream struct {
	TimestampField *DatastreamTimestampFieldSpec `json:"timestamp_field,omitempty"`
}

type DatastreamTimestampFieldSpec

type DatastreamTimestampFieldSpec struct {
	Name string `json:"name"`
}

type Delete

type Delete struct{}

type Destination

type Destination struct {
	Slack         *DestinationURL `json:"slack,omitempty"`
	Amazon        *DestinationURL `json:"amazon,omitempty"`
	Chime         *DestinationURL `json:"chime,omitempty"`
	CustomWebhook *DestinationURL `json:"custom_webhook,omitempty"`
}

type DestinationURL

type DestinationURL struct {
	URL string `json:"url,omitempty"`
}

type ErrorNotification

type ErrorNotification struct {
	// The destination URL.
	Destination *Destination `json:"destination,omitempty"`
	Channel     string       `json:"channel,omitempty"`
	// The text of the message
	MessageTemplate *MessageTemplate `json:"message_template,omitempty"`
}

type ForceMerge

type ForceMerge struct {
	// The number of segments to reduce the shard to.
	MaxNumSegments int64 `json:"max_num_segments"`
}

type ISMPolicy

type ISMPolicy struct {
	// The default starting state for each index that uses this policy.
	DefaultState string `json:"default_state"`
	// A human-readable description of the policy.
	Description       string             `json:"description"`
	ErrorNotification *ErrorNotification `json:"error_notification,omitempty"`
	// Specify an ISM template pattern that matches the index to apply the policy.
	ISMTemplate []ISMTemplate `json:"ism_template,omitempty"`
	// The time the policy was last updated.
	// The states that you define in the policy.
	States []State `json:"states"`
}

ISMPolicySpec is the specification for the ISM policy for OS.

type ISMTemplate

type ISMTemplate struct {
	// Index patterns on which this policy has to be applied
	IndexPatterns []string `json:"index_patterns"`
	// Priority of the template, defaults to 0
	Priority int `json:"priority,omitempty"`
}

type Index

type Index struct {
	Settings *apiextensionsv1.JSON `json:"settings,omitempty"`
	Mappings *apiextensionsv1.JSON `json:"mappings,omitempty"`
	Aliases  map[string]IndexAlias `json:"aliases,omitempty"`
}

type IndexAlias

type IndexAlias struct {
	Index        string                `json:"index,omitempty"`
	Alias        string                `json:"alias,omitempty"`
	Filter       *apiextensionsv1.JSON `json:"filter,omitempty"`
	Routing      string                `json:"routing,omitempty"`
	IsWriteIndex bool                  `json:"is_write_index,omitempty"`
}

type IndexPermissionSpec

type IndexPermissionSpec struct {
	IndexPatterns         []string `json:"index_patterns,omitempty"`
	DocumentLevelSecurity string   `json:"dls,omitempty"`
	FieldLevelSecurity    []string `json:"fls,omitempty"`
	AllowedActions        []string `json:"allowed_actions,omitempty"`
	MaskedFields          []string `json:"masked_fields,omitempty"`
}

type IndexPriority

type IndexPriority struct {
	// The priority for the index as soon as it enters a state.
	Priority int64 `json:"priority"`
}

type IndexTemplate

type IndexTemplate struct {
	IndexPatterns []string              `json:"index_patterns"`
	DataStream    *Datastream           `json:"data_stream,omitempty"`
	Template      Index                 `json:"template,omitempty"`
	ComposedOf    []string              `json:"composed_of,omitempty"`
	Priority      int                   `json:"priority,omitempty"`
	Version       int                   `json:"version,omitempty"`
	Meta          *apiextensionsv1.JSON `json:"_meta,omitempty"`
}

type MessageTemplate

type MessageTemplate struct {
	Source string `json:"source,omitempty"`
}

type Notification

type Notification struct {
	Destination     string          `json:"destination"`
	MessageTemplate MessageTemplate `json:"message_template"`
}

type Open

type Open struct{}

type Policy

type Policy struct {
	PolicyID       string    `json:"_id,omitempty"`
	PrimaryTerm    *int      `json:"_primary_term,omitempty"`
	SequenceNumber *int      `json:"_seq_no,omitempty"`
	Policy         ISMPolicy `json:"policy"`
}

type ReRouteMoveAction

type ReRouteMoveAction struct {
	Index    string `json:"index"`
	Shard    string `json:"shard"`
	FromNode string `json:"from_node"`
	ToNode   string `json:"to_node"`
}

type ReadOnly

type ReadOnly struct{}

type ReadWrite

type ReadWrite struct{}

type ReplicaCount

type ReplicaCount struct {
	NumberOfReplicas int64 `json:"number_of_replicas"`
}

type Retry

type Retry struct {
	// The backoff policy type to use when retrying.
	Backoff string `json:"backoff,omitempty"`
	// The number of retry counts.
	Count int64 `json:"count"`
	// The time to wait between retries.
	Delay string `json:"delay,omitempty"`
}

type Role

type Role struct {
	ClusterPermissions []string                `json:"cluster_permissions,omitempty"`
	IndexPermissions   []IndexPermissionSpec   `json:"index_permissions,omitempty"`
	TenantPermissions  []TenantPermissionsSpec `json:"tenant_permissions,omitempty"`
}

type RoleMapping

type RoleMapping struct {
	BackendRoles []string `json:"backend_roles,omitempty"`
	Hosts        []string `json:"hosts,omitempty"`
	Users        []string `json:"users,omitempty"`
}

type Rollover

type Rollover struct {
	// The minimum number of documents required to roll over the index.
	MinDocCount *int64 `json:"min_doc_count,omitempty"`
	// The minimum age required to roll over the index.
	MinIndexAge *string `json:"min_index_age,omitempty"`
	// The minimum storage size of a single primary shard required to roll over the index.
	MinPrimaryShardSize *string `json:"min_primary_shard_size,omitempty"`
	// The minimum size of the total primary shard storage (not counting replicas) required to roll over the index.
	MinSize *string `json:"min_size,omitempty"`
}

type Rollup

type Rollup struct{}

type Shrink

type Shrink struct {
	// If true, executes the shrink action even if there are no replicas.
	ForceUnsafe *bool `json:"force_unsafe,omitempty"`
	// The maximum size in bytes of a shard for the target index.
	MaxShardSize *string `json:"max_shard_size,omitempty"`
	// The maximum number of primary shards in the shrunken index.
	NumNewShards *int `json:"num_new_shards,omitempty"`
	// Percentage of the number of original primary shards to shrink.
	PercentageOfSourceShards *int64 `json:"percentage_of_source_shards,omitempty"`
	// The name of the shrunken index.
	TargetIndexNameTemplate *string `json:"target_index_name_template,omitempty"`
}

type Snapshot

type Snapshot struct {
	// The repository name that you register through the native snapshot API operations.
	Repository string `json:"repository"`
	// The name of the snapshot.
	Snapshot string `json:"snapshot"`
}

type SnapshotRepository

type SnapshotRepository struct {
	Type     string            `json:"type"`
	Settings map[string]string `json:"settings,omitempty"`
}

type State

type State struct {
	// The actions to execute after entering a state.
	Actions []Action `json:"actions"`
	// The name of the state.
	Name string `json:"name"`
	// The next states and the conditions required to transition to those states. If no transitions exist, the policy assumes that it’s complete and can now stop managing the index
	Transitions []Transition `json:"transitions,omitempty"`
}

type Tenant

type Tenant struct {
	Description string `json:"description"`
}

type TenantPermissionsSpec

type TenantPermissionsSpec struct {
	TenantPatterns []string `json:"tenant_patterns,omitempty"`
	AllowedActions []string `json:"allowed_actions,omitempty"`
}

type Transition

type Transition struct {
	// conditions for the transition.
	Conditions Condition `json:"conditions"`
	// The name of the state to transition to if the conditions are met.
	StateName string `json:"state_name"`
}

type User

type User struct {
	Password                string            `json:"password,omitempty"`
	OpendistroSecurityRoles []string          `json:"opendistro_security_roles,omitempty"`
	BackendRoles            []string          `json:"backend_roles,omitempty"`
	Attributes              map[string]string `json:"attributes,omitempty"`
}

Jump to

Keyboard shortcuts

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