API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see

We welcome your feedback on this new version of the documentation. Send your comments to


import ""

type CreateTrainingJobInput struct { AlgorithmSpecification *AlgorithmSpecification `type:"structure" required:"true"` EnableInterContainerTrafficEncryption *bool `type:"boolean"` EnableNetworkIsolation *bool `type:"boolean"` HyperParameters map[string]*string `type:"map"` InputDataConfig []*Channel `min:"1" type:"list"` OutputDataConfig *OutputDataConfig `type:"structure" required:"true"` ResourceConfig *ResourceConfig `type:"structure" required:"true"` RoleArn *string `min:"20" type:"string" required:"true"` StoppingCondition *StoppingCondition `type:"structure" required:"true"` Tags []*Tag `type:"list"` TrainingJobName *string `min:"1" type:"string" required:"true"` VpcConfig *VpcConfig `type:"structure"` }


Specifies the training algorithm to use in a CreateTrainingJob ( request.

For more information about algorithms provided by Amazon SageMaker, see Algorithms ( For information about using your own algorithms, see Using Your Own Algorithms with Amazon SageMaker (


Type: *bool

To encrypt all communications between ML compute instances in distributed training, choose True,. Encryption provides greater security for distributed training, but training can take longer because of additional communications between ML compute instances.


Type: *bool

Isolates the training container. No inbound or outbound network calls can be made, except for calls between peers within a training cluster for distributed training. If you enable network isolation for training jobs that are configured to use a VPC, Amazon SageMaker downloads and uploads customer data and model artifacts through the specified VPC, but the training container does not have network access.

The Semantic Segmentation built-in algorithm does not support network isolation.


Type: map[string]*string

Algorithm-specific parameters that influence the quality of the model. You set hyperparameters before you start the learning process. For a list of hyperparameters for each training algorithm provided by Amazon SageMaker, see Algorithms (

You can specify a maximum of 100 hyperparameters. Each hyperparameter is a key-value pair. Each key and value is limited to 256 characters, as specified by the Length Constraint.


A channel is a named input source that training algorithms can consume.


Provides information about how to store model training results (model artifacts).


Describes the resources, including ML compute instances and ML storage volumes, to use for model training.


Type: *string

The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker can assume to perform tasks on your behalf.

During model training, Amazon SageMaker needs your permission to read input data from an S3 bucket, download a Docker image that contains training code, write model artifacts to an S3 bucket, write logs to Amazon CloudWatch Logs, and publish metrics to Amazon CloudWatch. You grant permissions for all of these tasks to an IAM role. For more information, see Amazon SageMaker Roles (

To be able to pass this role to Amazon SageMaker, the caller of this API must have the iam:PassRole permission.

RoleArn is a required field


Specifies how long model training can run. When model training reaches the limit, Amazon SageMaker ends the training job. Use this API to cap model training cost.

To stop a job, Amazon SageMaker sends the algorithm the SIGTERM signal, which delays job termination for120 seconds. Algorithms might use this 120-second window to save the model artifacts, so the results of training is not lost.

Training algorithms provided by Amazon SageMaker automatically saves the intermediate results of a model training job (it is best effort case, as model might not be ready to save as some stages, for example training just started). This intermediate data is a valid model artifact. You can use it to create a model (CreateModel).


Describes a tag.


Type: *string

The name of the training job. The name must be unique within an AWS Region in an AWS account.

TrainingJobName is a required field


Specifies a VPC that your training jobs and hosted models have access to. Control access to and from your training and model containers by configuring the VPC. For more information, see Protect Endpoints by Using an Amazon Virtual Private Cloud ( and Protect Training Jobs by Using an Amazon Virtual Private Cloud (



func (s CreateTrainingJobInput) GoString() string

GoString returns the string representation


func (s *CreateTrainingJobInput) SetAlgorithmSpecification(v *AlgorithmSpecification) *CreateTrainingJobInput

SetAlgorithmSpecification sets the AlgorithmSpecification field's value.


func (s *CreateTrainingJobInput) SetEnableInterContainerTrafficEncryption(v bool) *CreateTrainingJobInput

SetEnableInterContainerTrafficEncryption sets the EnableInterContainerTrafficEncryption field's value.


func (s *CreateTrainingJobInput) SetEnableNetworkIsolation(v bool) *CreateTrainingJobInput

SetEnableNetworkIsolation sets the EnableNetworkIsolation field's value.


func (s *CreateTrainingJobInput) SetHyperParameters(v map[string]*string) *CreateTrainingJobInput

SetHyperParameters sets the HyperParameters field's value.


func (s *CreateTrainingJobInput) SetInputDataConfig(v []*Channel) *CreateTrainingJobInput

SetInputDataConfig sets the InputDataConfig field's value.


func (s *CreateTrainingJobInput) SetOutputDataConfig(v *OutputDataConfig) *CreateTrainingJobInput

SetOutputDataConfig sets the OutputDataConfig field's value.


func (s *CreateTrainingJobInput) SetResourceConfig(v *ResourceConfig) *CreateTrainingJobInput

SetResourceConfig sets the ResourceConfig field's value.


func (s *CreateTrainingJobInput) SetRoleArn(v string) *CreateTrainingJobInput

SetRoleArn sets the RoleArn field's value.


func (s *CreateTrainingJobInput) SetStoppingCondition(v *StoppingCondition) *CreateTrainingJobInput

SetStoppingCondition sets the StoppingCondition field's value.


func (s *CreateTrainingJobInput) SetTags(v []*Tag) *CreateTrainingJobInput

SetTags sets the Tags field's value.


func (s *CreateTrainingJobInput) SetTrainingJobName(v string) *CreateTrainingJobInput

SetTrainingJobName sets the TrainingJobName field's value.


func (s *CreateTrainingJobInput) SetVpcConfig(v *VpcConfig) *CreateTrainingJobInput

SetVpcConfig sets the VpcConfig field's value.


func (s CreateTrainingJobInput) String() string

String returns the string representation


func (s *CreateTrainingJobInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

On this page: