pools

package
v1.55.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AwsAllocationStrategyLowestPrice is allocation type for AWS Instance fleets
	AwsAllocationStrategyLowestPrice = "LOWEST_PRICE"
	// AwsAllocationStrategyCapacityOptimized is allocation type for AWS Instance fleets
	AwsAllocationStrategyCapacityOptimized = "CAPACITY_OPTIMIZED"
)

Variables

This section is empty.

Functions

func DataSourceInstancePool added in v1.8.0

func DataSourceInstancePool() common.Resource

DataSourceInstancePool returns information about instance pool specified by name

func ResourceInstancePool

func ResourceInstancePool() common.Resource

ResourceInstancePool ...

Types

type AwsAllocationStrategy added in v1.1.0

type AwsAllocationStrategy string

type AwsFleetLaunchTemplateOverride added in v1.1.0

type AwsFleetLaunchTemplateOverride struct {
	AvailabilityZone string `json:"availability_zone" tf:"force_new,suppress_diff"`
	InstanceType     string `json:"instance_type" tf:"force_new,suppress_diff"`
}

type AwsFleetOption added in v1.1.0

type AwsFleetOption struct {
	AllocationStrategy      AwsAllocationStrategy `json:"allocation_strategy" tf:"force_new,suppress_diff"`
	InstancePoolsToUseCount int32                 `json:"instance_pools_to_use_count,omitempty" tf:"suppress_diff"`
}

type AwsInstancePoolFleetAttributes added in v1.1.0

type AwsInstancePoolFleetAttributes struct {
	FleetSpotOption             *AwsFleetOption                  `json:"fleet_spot_option,omitempty" tf:"force_new,suppress_diff,conflicts:fleet_on_demand_option"`
	FleetOnDemandOption         *AwsFleetOption                  `json:"fleet_on_demand_option,omitempty" tf:"force_new,suppress_diff,conflicts:fleet_spot_option"`
	FleetLaunchTemplateOverride []AwsFleetLaunchTemplateOverride `json:"launch_template_overrides" tf:"suppress_diff,force_new,slice_set,alias:launch_template_override"`
}

type InstancePool

type InstancePool struct {
	InstancePoolID                     string                          `json:"instance_pool_id,omitempty" tf:"computed"`
	InstancePoolName                   string                          `json:"instance_pool_name"`
	MinIdleInstances                   int32                           `json:"min_idle_instances,omitempty"`
	MaxCapacity                        int32                           `json:"max_capacity,omitempty" tf:"suppress_diff"`
	IdleInstanceAutoTerminationMinutes int32                           `json:"idle_instance_autotermination_minutes"`
	AwsAttributes                      *InstancePoolAwsAttributes      `json:"aws_attributes,omitempty" tf:"force_new,suppress_diff"`
	AwsInstancePoolFleetAttributes     *AwsInstancePoolFleetAttributes `json:"instance_pool_fleet_attributes,omitempty" tf:"force_new,suppress_diff,conflicts:node_type_id"`
	AzureAttributes                    *InstancePoolAzureAttributes    `json:"azure_attributes,omitempty" tf:"force_new,suppress_diff"`
	GcpAttributes                      *InstancePoolGcpAttributes      `json:"gcp_attributes,omitempty" tf:"force_new,suppress_diff"`
	NodeTypeID                         string                          `json:"node_type_id,omitempty" tf:"suppress_diff,force_new,conflicts:instance_pool_fleet_attributes"`
	CustomTags                         map[string]string               `json:"custom_tags" tf:"optional"`
	EnableElasticDisk                  bool                            `json:"enable_elastic_disk,omitempty" tf:"force_new,suppress_diff"`
	DiskSpec                           *InstancePoolDiskSpec           `json:"disk_spec,omitempty" tf:"force_new"`
	PreloadedSparkVersions             []string                        `json:"preloaded_spark_versions,omitempty" tf:"force_new"`
	PreloadedDockerImages              []clusters.DockerImage          `json:"preloaded_docker_images,omitempty" tf:"force_new,slice_set,alias:preloaded_docker_image"`
}

InstancePool describes the instance pool object on Databricks

type InstancePoolAndStats

type InstancePoolAndStats struct {
	InstancePoolID                     string                           `json:"instance_pool_id,omitempty" tf:"computed"`
	InstancePoolName                   string                           `json:"instance_pool_name"`
	MinIdleInstances                   int32                            `json:"min_idle_instances,omitempty"`
	MaxCapacity                        int32                            `json:"max_capacity,omitempty"`
	AwsAttributes                      *InstancePoolAwsAttributes       `json:"aws_attributes,omitempty"`
	AwsInstancePoolFleetAttributes     []AwsInstancePoolFleetAttributes `json:"instance_pool_fleet_attributes,omitempty"`
	AzureAttributes                    *InstancePoolAzureAttributes     `json:"azure_attributes,omitempty"`
	GcpAttributes                      *InstancePoolGcpAttributes       `json:"gcp_attributes,omitempty"`
	NodeTypeID                         string                           `json:"node_type_id,omitempty"`
	DefaultTags                        map[string]string                `json:"default_tags,omitempty" tf:"computed"`
	CustomTags                         map[string]string                `json:"custom_tags,omitempty"`
	IdleInstanceAutoTerminationMinutes int32                            `json:"idle_instance_autotermination_minutes"`
	EnableElasticDisk                  bool                             `json:"enable_elastic_disk,omitempty"`
	DiskSpec                           *InstancePoolDiskSpec            `json:"disk_spec,omitempty"`
	PreloadedSparkVersions             []string                         `json:"preloaded_spark_versions,omitempty"`
	State                              string                           `json:"state,omitempty"`
	Stats                              *InstancePoolStats               `json:"stats,omitempty"`
	PreloadedDockerImages              []clusters.DockerImage           `json:"preloaded_docker_images,omitempty" tf:"slice_set,alias:preloaded_docker_image"`
}

InstancePoolAndStats encapsulates a get response from the GET api for instance pools on Databricks

type InstancePoolAwsAttributes

type InstancePoolAwsAttributes struct {
	Availability        clusters.Availability `json:"availability,omitempty" tf:"force_new"`
	ZoneID              string                `json:"zone_id,omitempty" tf:"computed,force_new"`
	SpotBidPricePercent int32                 `json:"spot_bid_price_percent,omitempty" tf:"force_new"`
}

InstancePoolAwsAttributes contains aws attributes for AWS Databricks deployments for instance pools

type InstancePoolAzureAttributes

type InstancePoolAzureAttributes struct {
	Availability    clusters.Availability `json:"availability,omitempty" tf:"force_new"`
	SpotBidMaxPrice float64               `json:"spot_bid_max_price,omitempty" tf:"force_new"`
}

InstancePoolAzureAttributes contains aws attributes for Azure Databricks deployments for instance pools https://docs.microsoft.com/en-us/azure/databricks/dev-tools/api/latest/instance-pools#clusterinstancepoolazureattributes

type InstancePoolDiskSpec

type InstancePoolDiskSpec struct {
	DiskType  *InstancePoolDiskType `json:"disk_type,omitempty"`
	DiskCount int32                 `json:"disk_count,omitempty"`
	DiskSize  int32                 `json:"disk_size,omitempty"`
}

InstancePoolDiskSpec contains disk size, type and count information for the pool

type InstancePoolDiskType

type InstancePoolDiskType struct {
	AzureDiskVolumeType string `json:"azure_disk_volume_type,omitempty" tf:"force_new"`
	EbsVolumeType       string `json:"ebs_volume_type,omitempty" tf:"force_new"`
}

InstancePoolDiskType contains disk type information for each of the different cloud service providers

type InstancePoolGcpAttributes

type InstancePoolGcpAttributes struct {
	Availability  clusters.Availability `json:"gcp_availability,omitempty" tf:"force_new"`
	LocalSsdCount int32                 `json:"local_ssd_count,omitempty" tf:"computed,force_new"`
	ZoneID        string                `json:"zone_id,omitempty" tf:"computed,force_new"`
}

InstancePoolGcpAttributes contains aws attributes for GCP Databricks deployments for instance pools https://docs.gcp.databricks.com/dev-tools/api/latest/instance-pools.html#instancepoolgcpattributes

type InstancePoolList

type InstancePoolList struct {
	InstancePools []InstancePoolAndStats `json:"instance_pools"`
}

InstancePoolList shows list of instance pools

type InstancePoolStats

type InstancePoolStats struct {
	UsedCount        int32 `json:"used_count,omitempty"`
	IdleCount        int32 `json:"idle_count,omitempty"`
	PendingUsedCount int32 `json:"pending_used_count,omitempty"`
	PendingIdleCount int32 `json:"pending_idle_count,omitempty"`
}

InstancePoolStats contains the stats on a given pool

type InstancePoolsAPI

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

InstancePoolsAPI exposes the instance pools api

func NewInstancePoolsAPI

func NewInstancePoolsAPI(ctx context.Context, m any) InstancePoolsAPI

NewInstancePoolsAPI creates InstancePoolsAPI instance from provider meta

func (InstancePoolsAPI) Create

func (a InstancePoolsAPI) Create(instancePool InstancePool) (InstancePoolAndStats, error)

Create creates the instance pool to given the instance pool configuration

func (InstancePoolsAPI) Delete

func (a InstancePoolsAPI) Delete(instancePoolID string) error

Delete terminates a instance pool given its ID

func (InstancePoolsAPI) List

func (a InstancePoolsAPI) List() (ipl InstancePoolList, err error)

List retrieves the list of existing instance pools

func (InstancePoolsAPI) Read

func (a InstancePoolsAPI) Read(instancePoolID string) (ip InstancePool, err error)

Read retrieves the information for a instance pool given its identifier

func (InstancePoolsAPI) Update

func (a InstancePoolsAPI) Update(ip InstancePool) error

Update edits the configuration of a instance pool to match the provided attributes and size

Jump to

Keyboard shortcuts

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