sagemaker

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Endpoint

type Endpoint struct {
	EndpointName       string
	EndpointArn        string
	EndpointConfigName string
	EndpointStatus     EndpointStatus
	CreationTime       time.Time
	LastModifiedTime   time.Time
	FailureReason      string
	Tags               map[string]string
	Lifecycle          *lifecycle.Machine
}

type EndpointConfig

type EndpointConfig struct {
	EndpointConfigName string
	EndpointConfigArn  string
	ProductionVariants []map[string]any
	CreationTime       time.Time
	Tags               map[string]string
}

type EndpointStatus

type EndpointStatus string
const (
	EndpointCreating             EndpointStatus = "Creating"
	EndpointInService            EndpointStatus = "InService"
	EndpointUpdating             EndpointStatus = "Updating"
	EndpointDeleting             EndpointStatus = "Deleting"
	EndpointFailed               EndpointStatus = "Failed"
	EndpointSystemUpdating       EndpointStatus = "SystemUpdating"
	EndpointRollingBack          EndpointStatus = "RollingBack"
	EndpointUpdateRollbackFailed EndpointStatus = "UpdateRollbackFailed"
)

type Model

type Model struct {
	ModelName        string
	ModelArn         string
	PrimaryContainer map[string]any
	ExecutionRoleArn string
	CreationTime     time.Time
	Tags             map[string]string
}

type NotebookInstance

type NotebookInstance struct {
	NotebookInstanceName string
	NotebookInstanceArn  string
	InstanceType         string
	RoleArn              string
	Status               NotebookInstanceStatus
	SubnetId             string
	SecurityGroupIds     []string
	DirectInternetAccess string
	VolumeSizeInGB       int
	CreationTime         time.Time
	LastModifiedTime     time.Time
	Tags                 map[string]string
	Lifecycle            *lifecycle.Machine
}

type NotebookInstanceStatus

type NotebookInstanceStatus string
const (
	NotebookPending   NotebookInstanceStatus = "Pending"
	NotebookInService NotebookInstanceStatus = "InService"
	NotebookStopping  NotebookInstanceStatus = "Stopping"
	NotebookStopped   NotebookInstanceStatus = "Stopped"
	NotebookFailed    NotebookInstanceStatus = "Failed"
	NotebookDeleting  NotebookInstanceStatus = "Deleting"
	NotebookUpdating  NotebookInstanceStatus = "Updating"
)

type ProcessingJob

type ProcessingJob struct {
	ProcessingJobName      string
	ProcessingJobArn       string
	ProcessingJobStatus    ProcessingJobStatus
	RoleArn                string
	AppSpecification       map[string]any
	ProcessingResources    map[string]any
	ProcessingInputs       []map[string]any
	ProcessingOutputConfig map[string]any
	StoppingCondition      map[string]any
	CreationTime           time.Time
	ProcessingStartTime    *time.Time
	ProcessingEndTime      *time.Time
	FailureReason          string
	Tags                   map[string]string
	Lifecycle              *lifecycle.Machine
}

type ProcessingJobStatus

type ProcessingJobStatus string
const (
	ProcessingInProgress ProcessingJobStatus = "InProgress"
	ProcessingCompleted  ProcessingJobStatus = "Completed"
	ProcessingFailed     ProcessingJobStatus = "Failed"
	ProcessingStopping   ProcessingJobStatus = "Stopping"
	ProcessingStopped    ProcessingJobStatus = "Stopped"
)

type SageMakerService

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

SageMakerService is the cloudmock implementation of the AWS SageMaker API.

func New

func New(accountID, region string) *SageMakerService

New returns a new SageMakerService for the given AWS account ID and region.

func (*SageMakerService) Actions

func (s *SageMakerService) Actions() []service.Action

Actions returns the list of SageMaker API actions supported by this service.

func (*SageMakerService) HandleRequest

func (s *SageMakerService) HandleRequest(ctx *service.RequestContext) (*service.Response, error)

HandleRequest routes an incoming SageMaker request to the appropriate handler. SageMaker uses JSON protocol with TargetPrefix "SageMaker".

func (*SageMakerService) HealthCheck

func (s *SageMakerService) HealthCheck() error

HealthCheck always returns nil (no external dependencies).

func (*SageMakerService) Name

func (s *SageMakerService) Name() string

Name returns the AWS service name used for routing.

type Store

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

Store is the in-memory store for all SageMaker resources.

func NewStore

func NewStore(accountID, region string) *Store

NewStore creates a new SageMaker Store.

func (*Store) AddTags

func (s *Store) AddTags(arn string, tags map[string]string) *service.AWSError

func (*Store) CreateEndpoint

func (s *Store) CreateEndpoint(name, configName string, tags map[string]string) (*Endpoint, *service.AWSError)

func (*Store) CreateEndpointConfig

func (s *Store) CreateEndpointConfig(name string, productionVariants []map[string]any, tags map[string]string) (*EndpointConfig, *service.AWSError)

func (*Store) CreateModel

func (s *Store) CreateModel(name string, primaryContainer map[string]any, roleArn string, tags map[string]string) (*Model, *service.AWSError)

func (*Store) CreateNotebookInstance

func (s *Store) CreateNotebookInstance(name, instanceType, roleArn, subnetId, directInternetAccess string, securityGroupIds []string, volumeSize int, tags map[string]string) (*NotebookInstance, *service.AWSError)

func (*Store) CreateProcessingJob

func (s *Store) CreateProcessingJob(name, roleArn string, appSpec, resources map[string]any, inputs []map[string]any, outputConfig, stoppingCondition map[string]any, tags map[string]string) (*ProcessingJob, *service.AWSError)

func (*Store) CreateTrainingJob

func (s *Store) CreateTrainingJob(name string, algorithmSpec map[string]any, roleArn string, inputDataConfig []map[string]any, outputDataConfig, resourceConfig, stoppingCondition map[string]any, hyperParams map[string]string, tags map[string]string) (*TrainingJob, *service.AWSError)

func (*Store) CreateTransformJob

func (s *Store) CreateTransformJob(name, modelName string, input, output, resources map[string]any, tags map[string]string) (*TransformJob, *service.AWSError)

func (*Store) DeleteEndpoint

func (s *Store) DeleteEndpoint(name string) *service.AWSError

func (*Store) DeleteEndpointConfig

func (s *Store) DeleteEndpointConfig(name string) *service.AWSError

func (*Store) DeleteModel

func (s *Store) DeleteModel(name string) *service.AWSError

func (*Store) DeleteNotebookInstance

func (s *Store) DeleteNotebookInstance(name string) *service.AWSError

func (*Store) DeleteTags

func (s *Store) DeleteTags(arn string, tagKeys []string) *service.AWSError

func (*Store) GetEndpoint

func (s *Store) GetEndpoint(name string) (*Endpoint, *service.AWSError)

func (*Store) GetEndpointConfig

func (s *Store) GetEndpointConfig(name string) (*EndpointConfig, *service.AWSError)

func (*Store) GetModel

func (s *Store) GetModel(name string) (*Model, *service.AWSError)

func (*Store) GetNotebookInstance

func (s *Store) GetNotebookInstance(name string) (*NotebookInstance, *service.AWSError)

func (*Store) GetProcessingJob

func (s *Store) GetProcessingJob(name string) (*ProcessingJob, *service.AWSError)

func (*Store) GetTrainingJob

func (s *Store) GetTrainingJob(name string) (*TrainingJob, *service.AWSError)

func (*Store) GetTransformJob

func (s *Store) GetTransformJob(name string) (*TransformJob, *service.AWSError)

func (*Store) ListEndpointConfigs

func (s *Store) ListEndpointConfigs() []*EndpointConfig

func (*Store) ListEndpoints

func (s *Store) ListEndpoints() []*Endpoint

func (*Store) ListModels

func (s *Store) ListModels() []*Model

func (*Store) ListNotebookInstances

func (s *Store) ListNotebookInstances() []*NotebookInstance

func (*Store) ListProcessingJobs

func (s *Store) ListProcessingJobs() []*ProcessingJob

func (*Store) ListTags

func (s *Store) ListTags(arn string) (map[string]string, *service.AWSError)

func (*Store) ListTrainingJobs

func (s *Store) ListTrainingJobs() []*TrainingJob

func (*Store) ListTransformJobs

func (s *Store) ListTransformJobs() []*TransformJob

func (*Store) StartNotebookInstance

func (s *Store) StartNotebookInstance(name string) *service.AWSError

func (*Store) StopNotebookInstance

func (s *Store) StopNotebookInstance(name string) *service.AWSError

func (*Store) StopProcessingJob

func (s *Store) StopProcessingJob(name string) *service.AWSError

func (*Store) StopTrainingJob

func (s *Store) StopTrainingJob(name string) *service.AWSError

func (*Store) StopTransformJob

func (s *Store) StopTransformJob(name string) *service.AWSError

func (*Store) UpdateEndpoint

func (s *Store) UpdateEndpoint(name, configName string) (*Endpoint, *service.AWSError)

func (*Store) UpdateNotebookInstance

func (s *Store) UpdateNotebookInstance(name, instanceType, roleArn string, volumeSize int) (*NotebookInstance, *service.AWSError)

type TrainingJob

type TrainingJob struct {
	TrainingJobName        string
	TrainingJobArn         string
	TrainingJobStatus      TrainingJobStatus
	SecondaryStatus        string
	AlgorithmSpecification map[string]any
	RoleArn                string
	InputDataConfig        []map[string]any
	OutputDataConfig       map[string]any
	ResourceConfig         map[string]any
	StoppingCondition      map[string]any
	HyperParameters        map[string]string
	CreationTime           time.Time
	TrainingStartTime      *time.Time
	TrainingEndTime        *time.Time
	LastModifiedTime       time.Time
	FailureReason          string
	ModelArtifacts         map[string]any
	Tags                   map[string]string
	Lifecycle              *lifecycle.Machine
}

type TrainingJobStatus

type TrainingJobStatus string
const (
	TrainingInProgress TrainingJobStatus = "InProgress"
	TrainingCompleted  TrainingJobStatus = "Completed"
	TrainingFailed     TrainingJobStatus = "Failed"
	TrainingStopping   TrainingJobStatus = "Stopping"
	TrainingStopped    TrainingJobStatus = "Stopped"
)

type TransformJob

type TransformJob struct {
	TransformJobName   string
	TransformJobArn    string
	TransformJobStatus TransformJobStatus
	ModelName          string
	TransformInput     map[string]any
	TransformOutput    map[string]any
	TransformResources map[string]any
	CreationTime       time.Time
	TransformStartTime *time.Time
	TransformEndTime   *time.Time
	FailureReason      string
	Tags               map[string]string
	Lifecycle          *lifecycle.Machine
}

type TransformJobStatus

type TransformJobStatus string
const (
	TransformInProgress TransformJobStatus = "InProgress"
	TransformCompleted  TransformJobStatus = "Completed"
	TransformFailed     TransformJobStatus = "Failed"
	TransformStopping   TransformJobStatus = "Stopping"
	TransformStopped    TransformJobStatus = "Stopped"
)

Jump to

Keyboard shortcuts

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