amazonka-sagemaker-2.0: Amazon SageMaker Service SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.SageMaker.CreateModel

Description

Creates a model in SageMaker. In the request, you name the model and describe a primary container. For the primary container, you specify the Docker image that contains inference code, artifacts (from prior training), and a custom environment map that the inference code uses when you deploy the model for predictions.

Use this API to create a model if you want to use SageMaker hosting services or run a batch transform job.

To host your model, you create an endpoint configuration with the CreateEndpointConfig API, and then create an endpoint with the CreateEndpoint API. SageMaker then deploys all of the containers that you defined for the model in the hosting environment.

For an example that calls this method when deploying a model to SageMaker hosting services, see Create a Model (Amazon Web Services SDK for Python (Boto 3)).

To run a batch transform using your model, you start a job with the CreateTransformJob API. SageMaker uses your model and your dataset to get inferences which are then saved to a specified S3 location.

In the request, you also provide an IAM role that SageMaker can assume to access model artifacts and docker image for deployment on ML compute hosting instances or for batch transform jobs. In addition, you also use the IAM role to manage permissions the inference code needs. For example, if the inference code access any other Amazon Web Services resources, you grant necessary permissions via this role.

Synopsis

Creating a Request

data CreateModel Source #

See: newCreateModel smart constructor.

Constructors

CreateModel' 

Fields

Instances

Instances details
ToJSON CreateModel Source # 
Instance details

Defined in Amazonka.SageMaker.CreateModel

ToHeaders CreateModel Source # 
Instance details

Defined in Amazonka.SageMaker.CreateModel

Methods

toHeaders :: CreateModel -> [Header] #

ToPath CreateModel Source # 
Instance details

Defined in Amazonka.SageMaker.CreateModel

ToQuery CreateModel Source # 
Instance details

Defined in Amazonka.SageMaker.CreateModel

AWSRequest CreateModel Source # 
Instance details

Defined in Amazonka.SageMaker.CreateModel

Associated Types

type AWSResponse CreateModel #

Generic CreateModel Source # 
Instance details

Defined in Amazonka.SageMaker.CreateModel

Associated Types

type Rep CreateModel :: Type -> Type #

Read CreateModel Source # 
Instance details

Defined in Amazonka.SageMaker.CreateModel

Show CreateModel Source # 
Instance details

Defined in Amazonka.SageMaker.CreateModel

NFData CreateModel Source # 
Instance details

Defined in Amazonka.SageMaker.CreateModel

Methods

rnf :: CreateModel -> () #

Eq CreateModel Source # 
Instance details

Defined in Amazonka.SageMaker.CreateModel

Hashable CreateModel Source # 
Instance details

Defined in Amazonka.SageMaker.CreateModel

type AWSResponse CreateModel Source # 
Instance details

Defined in Amazonka.SageMaker.CreateModel

type Rep CreateModel Source # 
Instance details

Defined in Amazonka.SageMaker.CreateModel

newCreateModel Source #

Create a value of CreateModel with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

CreateModel, createModel_containers - Specifies the containers in the inference pipeline.

CreateModel, createModel_enableNetworkIsolation - Isolates the model container. No inbound or outbound network calls can be made to or from the model container.

CreateModel, createModel_inferenceExecutionConfig - Specifies details of how containers in a multi-container endpoint are called.

CreateModel, createModel_primaryContainer - The location of the primary docker image containing inference code, associated artifacts, and custom environment map that the inference code uses when the model is deployed for predictions.

CreateModel, createModel_tags - An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see Tagging Amazon Web Services Resources.

CreateModel, createModel_vpcConfig - A VpcConfig object that specifies the VPC that you want your model to connect to. Control access to and from your model container by configuring the VPC. VpcConfig is used in hosting services and in batch transform. For more information, see Protect Endpoints by Using an Amazon Virtual Private Cloud and Protect Data in Batch Transform Jobs by Using an Amazon Virtual Private Cloud.

CreateModel, createModel_modelName - The name of the new model.

CreateModel, createModel_executionRoleArn - The Amazon Resource Name (ARN) of the IAM role that SageMaker can assume to access model artifacts and docker image for deployment on ML compute instances or for batch transform jobs. Deploying on ML compute instances is part of model hosting. For more information, see SageMaker Roles.

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

Request Lenses

createModel_containers :: Lens' CreateModel (Maybe [ContainerDefinition]) Source #

Specifies the containers in the inference pipeline.

createModel_enableNetworkIsolation :: Lens' CreateModel (Maybe Bool) Source #

Isolates the model container. No inbound or outbound network calls can be made to or from the model container.

createModel_inferenceExecutionConfig :: Lens' CreateModel (Maybe InferenceExecutionConfig) Source #

Specifies details of how containers in a multi-container endpoint are called.

createModel_primaryContainer :: Lens' CreateModel (Maybe ContainerDefinition) Source #

The location of the primary docker image containing inference code, associated artifacts, and custom environment map that the inference code uses when the model is deployed for predictions.

createModel_tags :: Lens' CreateModel (Maybe [Tag]) Source #

An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see Tagging Amazon Web Services Resources.

createModel_vpcConfig :: Lens' CreateModel (Maybe VpcConfig) Source #

A VpcConfig object that specifies the VPC that you want your model to connect to. Control access to and from your model container by configuring the VPC. VpcConfig is used in hosting services and in batch transform. For more information, see Protect Endpoints by Using an Amazon Virtual Private Cloud and Protect Data in Batch Transform Jobs by Using an Amazon Virtual Private Cloud.

createModel_modelName :: Lens' CreateModel Text Source #

The name of the new model.

createModel_executionRoleArn :: Lens' CreateModel Text Source #

The Amazon Resource Name (ARN) of the IAM role that SageMaker can assume to access model artifacts and docker image for deployment on ML compute instances or for batch transform jobs. Deploying on ML compute instances is part of model hosting. For more information, see SageMaker Roles.

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

Destructuring the Response

data CreateModelResponse Source #

See: newCreateModelResponse smart constructor.

Constructors

CreateModelResponse' 

Fields

Instances

Instances details
Generic CreateModelResponse Source # 
Instance details

Defined in Amazonka.SageMaker.CreateModel

Associated Types

type Rep CreateModelResponse :: Type -> Type #

Read CreateModelResponse Source # 
Instance details

Defined in Amazonka.SageMaker.CreateModel

Show CreateModelResponse Source # 
Instance details

Defined in Amazonka.SageMaker.CreateModel

NFData CreateModelResponse Source # 
Instance details

Defined in Amazonka.SageMaker.CreateModel

Methods

rnf :: CreateModelResponse -> () #

Eq CreateModelResponse Source # 
Instance details

Defined in Amazonka.SageMaker.CreateModel

type Rep CreateModelResponse Source # 
Instance details

Defined in Amazonka.SageMaker.CreateModel

type Rep CreateModelResponse = D1 ('MetaData "CreateModelResponse" "Amazonka.SageMaker.CreateModel" "amazonka-sagemaker-2.0-9SyrKZ4KqhsL1qX9u3ILA3" 'False) (C1 ('MetaCons "CreateModelResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "modelArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))

newCreateModelResponse Source #

Create a value of CreateModelResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:httpStatus:CreateModelResponse', createModelResponse_httpStatus - The response's http status code.

CreateModelResponse, createModelResponse_modelArn - The ARN of the model created in SageMaker.

Response Lenses

createModelResponse_modelArn :: Lens' CreateModelResponse Text Source #

The ARN of the model created in SageMaker.