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 CreateCompilationJobInput struct { CompilationJobName *string `min:"1" type:"string" required:"true"` InputConfig *InputConfig `type:"structure" required:"true"` OutputConfig *OutputConfig `type:"structure" required:"true"` RoleArn *string `min:"20" type:"string" required:"true"` StoppingCondition *StoppingCondition `type:"structure" required:"true"` }


Type: *string

A name for the model compilation job. The name must be unique within the AWS Region and within your AWS account.

CompilationJobName is a required field


Contains information about the location of input model artifacts, the name and shape of the expected data inputs, and the framework in which the model was trained.


Contains information about the output location for the compiled model and the device (target) that the model runs on.


Type: *string

The Amazon Resource Name (ARN) of an IIAMAM role that enables Amazon SageMaker to perform tasks on your behalf.

During model compilation, Amazon SageMaker needs your permission to:

  • Read input data from an S3 bucket

  • Write model artifacts to an S3 bucket

  • Write logs to Amazon CloudWatch Logs

  • Publish metrics to Amazon CloudWatch

You grant permissions for all of these tasks to an IAM role. To pass this role to Amazon SageMaker, the caller of this API must have the iam:PassRole permission. For more information, see Amazon SageMaker Roles. (

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).



func (s CreateCompilationJobInput) GoString() string

GoString returns the string representation


func (s *CreateCompilationJobInput) SetCompilationJobName(v string) *CreateCompilationJobInput

SetCompilationJobName sets the CompilationJobName field's value.


func (s *CreateCompilationJobInput) SetInputConfig(v *InputConfig) *CreateCompilationJobInput

SetInputConfig sets the InputConfig field's value.


func (s *CreateCompilationJobInput) SetOutputConfig(v *OutputConfig) *CreateCompilationJobInput

SetOutputConfig sets the OutputConfig field's value.


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

SetRoleArn sets the RoleArn field's value.


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

SetStoppingCondition sets the StoppingCondition field's value.


func (s CreateCompilationJobInput) String() string

String returns the string representation


func (s *CreateCompilationJobInput) Validate() error

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

On this page: