Documentation ¶
Index ¶
- Constants
- func IsDeleteEndpoint404Error(err error) bool
- func IsDeleteEndpointConfig404Error(err error) bool
- func IsDeleteHAP404Error(err error) bool
- func IsDeleteModel404Error(err error) bool
- func IsDescribeHAP404Error(err error) bool
- func IsHAPConcurrentUpdateExceptionError(err error) bool
- func IsHAPInternalServiceExceptionError(err error) bool
- func IsHDPendingError(err error) bool
- func IsRecoverableError(err error) bool
- func IsStopHyperParameterTuningJob404Error(err error) bool
- func IsStopTrainingJob404Error(err error) bool
- func IsUpdateEndpoint404Error(err error) bool
- type ApplicationAutoscalingClientWrapper
- type ApplicationAutoscalingClientWrapperProvider
- type SageMakerClientWrapper
- type SageMakerClientWrapperProvider
Constants ¶
const ( HAPObjectNotFoundExceptionCode = "ObjectNotFoundException" HAPInternalServiceExceptionCode = "InternalServiceException" HAPConcurrentUpdateExceptionCode = "ConcurrentUpdateException" HAPValidationExceptionCode = "ValidationException" HDPendingMessage = "The status should be in 'InService' to register it as a scalable target" )
Provides error codes and messages
const ( DescribeTrainingJob404Code = "ValidationException" DescribeTrainingJob404MessagePrefix = "Requested resource not found" StopTrainingJob404Code = "ValidationException" StopTrainingJob404MessagePrefix = "Requested resource not found" DescribeProcessingJob404Code = "ValidationException" DescribeProcessingJob404MessagePrefix = "Could not find requested job" DescribeHyperParameterTuningJob404Code = "ResourceNotFound" DescribeHyperParameterTuningJob404MessagePrefix = "Amazon SageMaker can't find a tuning job" StopHyperParameterTuningJob404Code = "ResourceNotFound" StopHyperParameterTuningJob404MessagePrefix = "Amazon SageMaker can't find a tuning job" DeleteEndpoint404MessagePrefix = "Could not find endpoint" DeleteEndpoint404Code = "ValidationException" DeleteEndpointInProgressMessagePrefix = "Cannot update in-progress endpoint" DeleteEndpointInProgressCode = "ValidationException" DescribeEndpoint404MessagePrefix = "Could not find endpoint" DescribeEndpoint404Code = "ValidationException" UpdateEndpoint404MessagePrefix = "Could not find endpoint" UpdateEndpoint404Code = "ValidationException" UpdateEndpointUnableToFindEndpointConfigMessagePrefix = "Could not find endpoint configuration" UpdateEndpointUnableToFindEndpointConfigCode = "ValidationException" DescribeEndpointConfig404MessagePrefix = "Could not find endpoint configuration" DescribeEndpointConfig404Code = "ValidationException" DeleteEndpointConfig404MessagePrefix = "Could not find endpoint configuration" DeleteEndpointConfig404Code = "ValidationException" DescribeModel404MessagePrefix = "Could not find model" DescribeModel404Code = "ValidationException" DeleteModel404MessagePrefix = "Could not find model" DeleteModel404Code = "ValidationException" )
Provides the prefixes and error codes relating to each endpoint
Variables ¶
This section is empty.
Functions ¶
func IsDeleteEndpoint404Error ¶
IsDeleteEndpoint404Error determines whether the given error is equivalent to an HTTP 404 status code.
func IsDeleteEndpointConfig404Error ¶
IsDeleteEndpointConfig404Error determines whether the given error is equivalent to an HTTP 404 status code.
func IsDeleteHAP404Error ¶ added in v1.2.0
IsDeleteHAP404Error determines whether the given error HAPObjectNotFoundExceptionCode, used for deletion.
func IsDeleteModel404Error ¶
IsDeleteModel404Error determines whether the given error is equivalent to an HTTP 404 status code.
func IsDescribeHAP404Error ¶ added in v1.2.0
IsDescribeHAP404Error detects if the error is a HAPValidationExceptionCode
func IsHAPConcurrentUpdateExceptionError ¶ added in v1.2.0
IsHAPConcurrentUpdateExceptionError detects if the error is a ConcurrentUpdateException
func IsHAPInternalServiceExceptionError ¶ added in v1.2.0
IsHAPInternalServiceExceptionError detects if the error is an InternalServiceException
func IsHDPendingError ¶ added in v1.2.0
IsHDPendingError is for the special case when the HD is in creating/updating status and HAP throws a validationException. Status is set to reconciling.
func IsRecoverableError ¶ added in v1.2.0
IsRecoverableError determines if type of error is trasient and can be resolved without user intervention by reconciling Before using this method determine if all other errors for your use-case can be categorized as non-recoverable Check SageMaker common errors and errors section for each APIs used in your operator. Example: Processing Create API specific errors: https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateProcessingJob.html#API_CreateProcessingJob_Errors and SageMaker Common errors: https://docs.aws.amazon.com/sagemaker/latest/APIReference/CommonErrors.html and
func IsStopHyperParameterTuningJob404Error ¶
IsStopHyperParameterTuningJob404Error determines whether the given error is equivalent to an HTTP 404 status code.
func IsStopTrainingJob404Error ¶
IsStopTrainingJob404Error determines whether the given error is equivalent to an HTTP 404 status code.
func IsUpdateEndpoint404Error ¶
IsUpdateEndpoint404Error determines whether the given error is equivalent to an HTTP 404 status code.
Types ¶
type ApplicationAutoscalingClientWrapper ¶ added in v1.2.0
type ApplicationAutoscalingClientWrapper interface { RegisterScalableTarget(ctx context.Context, autoscalingTarget *applicationautoscaling.RegisterScalableTargetInput) (*applicationautoscaling.RegisterScalableTargetOutput, error) PutScalingPolicy(ctx context.Context, autoscalingJob *applicationautoscaling.PutScalingPolicyInput) (*applicationautoscaling.PutScalingPolicyOutput, error) DeleteScalingPolicy(ctx context.Context, autoscalingJob *applicationautoscaling.DeleteScalingPolicyInput) (*applicationautoscaling.DeleteScalingPolicyOutput, error) DeregisterScalableTarget(ctx context.Context, autoscalingJob *applicationautoscaling.DeregisterScalableTargetInput) (*applicationautoscaling.DeregisterScalableTargetOutput, error) DescribeScalableTargets(ctx context.Context, resourceID string) (*applicationautoscaling.DescribeScalableTargetsOutput, error) DescribeScalingPolicies(ctx context.Context, policyName string, resourceID string) (*applicationautoscaling.ScalingPolicy, error) }
ApplicationAutoscalingClientWrapper interface for ApplicationAutoscalingClient wrapper
func NewApplicationAutoscalingClientWrapper ¶ added in v1.2.0
func NewApplicationAutoscalingClientWrapper(innerClient applicationautoscalingiface.ApplicationAutoScalingAPI) ApplicationAutoscalingClientWrapper
NewApplicationAutoscalingClientWrapper creates a ApplicationAutoscaling wrapper around an existing client.
type ApplicationAutoscalingClientWrapperProvider ¶ added in v1.2.0
type ApplicationAutoscalingClientWrapperProvider func(aws.Config) ApplicationAutoscalingClientWrapper
ApplicationAutoscalingClientWrapperProvider defines a function that returns a ApplicationAutoscaling client. Used for mocking.
type SageMakerClientWrapper ¶
type SageMakerClientWrapper interface { DescribeTrainingJob(ctx context.Context, trainingJobName string) (*sagemaker.DescribeTrainingJobOutput, error) CreateTrainingJob(ctx context.Context, trainingJob *sagemaker.CreateTrainingJobInput) (*sagemaker.CreateTrainingJobOutput, error) StopTrainingJob(ctx context.Context, trainingJobName string) (*sagemaker.StopTrainingJobOutput, error) DescribeProcessingJob(ctx context.Context, processingJobName string) (*sagemaker.DescribeProcessingJobOutput, error) CreateProcessingJob(ctx context.Context, processingJob *sagemaker.CreateProcessingJobInput) (*sagemaker.CreateProcessingJobOutput, error) StopProcessingJob(ctx context.Context, processingJobName string) (*sagemaker.StopProcessingJobOutput, error) DescribeHyperParameterTuningJob(ctx context.Context, tuningJobName string) (*sagemaker.DescribeHyperParameterTuningJobOutput, error) CreateHyperParameterTuningJob(ctx context.Context, tuningJob *sagemaker.CreateHyperParameterTuningJobInput) (*sagemaker.CreateHyperParameterTuningJobOutput, error) StopHyperParameterTuningJob(ctx context.Context, tuningJobName string) (*sagemaker.StopHyperParameterTuningJobOutput, error) ListTrainingJobsForHyperParameterTuningJob(ctx context.Context, tuningJobName string, nextToken *string) (*sagemaker.ListTrainingJobsForHyperParameterTuningJobOutput, error) DescribeEndpoint(ctx context.Context, endpointName string) (*sagemaker.DescribeEndpointOutput, error) CreateEndpoint(ctx context.Context, endpoint *sagemaker.CreateEndpointInput) (*sagemaker.CreateEndpointOutput, error) DeleteEndpoint(ctx context.Context, endpointName *string) (*sagemaker.DeleteEndpointOutput, error) UpdateEndpoint(ctx context.Context, endpointName, endpointConfigName string, retainAllVariantProperties *bool, excludeRetainedVariantProperties []*sagemaker.VariantProperty) (*sagemaker.UpdateEndpointOutput, error) DescribeModel(ctx context.Context, modelName string) (*sagemaker.DescribeModelOutput, error) CreateModel(ctx context.Context, model *sagemaker.CreateModelInput) (*sagemaker.CreateModelOutput, error) DeleteModel(ctx context.Context, model *sagemaker.DeleteModelInput) (*sagemaker.DeleteModelOutput, error) DescribeEndpointConfig(ctx context.Context, endpointConfigName string) (*sagemaker.DescribeEndpointConfigOutput, error) CreateEndpointConfig(ctx context.Context, endpointConfig *sagemaker.CreateEndpointConfigInput) (*sagemaker.CreateEndpointConfigOutput, error) DeleteEndpointConfig(ctx context.Context, endpointConfig *sagemaker.DeleteEndpointConfigInput) (*sagemaker.DeleteEndpointConfigOutput, error) }
SageMakerClientWrapper wraps the SageMaker client. "Not Found" errors are handled differently than in the Go SDK; here a method will return a nil pointer and a nil error if there is a 404. This simplifies code that interacts with SageMaker. Other errors are returned normally.
func NewSageMakerClientWrapper ¶
func NewSageMakerClientWrapper(innerClient sagemakeriface.SageMakerAPI) SageMakerClientWrapper
NewSageMakerClientWrapper creates a SageMaker wrapper around an existing client.
type SageMakerClientWrapperProvider ¶
type SageMakerClientWrapperProvider func(aws.Config) SageMakerClientWrapper
SageMakerClientWrapperProvider defines a function that returns a SageMaker client. Used for mocking.