amazonka-sagemaker-1.6.0: Amazon SageMaker Service SDK.

Copyright(c) 2013-2018 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.SageMaker.CreateModel

Contents

Description

Creates a model in Amazon SageMaker. In the request, you name the model and describe one or more containers. For each container, you specify the docker image containing inference code, artifacts (from prior training), and custom environment map that the inference code uses when you deploy the model into production.

Use this API to create a model only if you want to use Amazon SageMaker hosting services. To host your model, you create an endpoint configuration with the CreateEndpointConfig API, and then create an endpoint with the CreateEndpoint API.

Amazon SageMaker then deploys all of the containers that you defined for the model in the hosting environment.

In the CreateModel request, you must define a container with the PrimaryContainer parameter.

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

Synopsis

Creating a Request

createModel Source #

Creates a value of CreateModel with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • cmVPCConfig - A object that specifies the VPC that you want your model to connect to. Control access to and from your training container by configuring the VPC. For more information, see 'host-vpc' .
  • cmTags - An array of key-value pairs. For more information, see Using Cost Allocation Tags in the AWS Billing and Cost Management User Guide .
  • cmModelName - The name of the new model.
  • cmPrimaryContainer - 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 into production.
  • cmExecutionRoleARN - The Amazon Resource Name (ARN) of the IAM role that Amazon SageMaker can assume to access model artifacts and docker image for deployment on ML compute instances. Deploying on ML compute instances is part of model hosting. For more information, see Amazon SageMaker Roles .

data CreateModel Source #

See: createModel smart constructor.

Instances

Eq CreateModel Source # 
Data CreateModel Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CreateModel -> c CreateModel #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CreateModel #

toConstr :: CreateModel -> Constr #

dataTypeOf :: CreateModel -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c CreateModel) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CreateModel) #

gmapT :: (forall b. Data b => b -> b) -> CreateModel -> CreateModel #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CreateModel -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CreateModel -> r #

gmapQ :: (forall d. Data d => d -> u) -> CreateModel -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CreateModel -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CreateModel -> m CreateModel #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateModel -> m CreateModel #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateModel -> m CreateModel #

Read CreateModel Source # 
Show CreateModel Source # 
Generic CreateModel Source # 

Associated Types

type Rep CreateModel :: * -> * #

Hashable CreateModel Source # 
ToJSON CreateModel Source # 
NFData CreateModel Source # 

Methods

rnf :: CreateModel -> () #

AWSRequest CreateModel Source # 
ToHeaders CreateModel Source # 

Methods

toHeaders :: CreateModel -> [Header] #

ToPath CreateModel Source # 
ToQuery CreateModel Source # 
type Rep CreateModel Source # 
type Rep CreateModel = D1 * (MetaData "CreateModel" "Network.AWS.SageMaker.CreateModel" "amazonka-sagemaker-1.6.0-9oNc2IB3ZCo9VZHXZi5zcA" False) (C1 * (MetaCons "CreateModel'" PrefixI True) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_cmVPCConfig") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe VPCConfig))) (S1 * (MetaSel (Just Symbol "_cmTags") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe [Tag])))) ((:*:) * (S1 * (MetaSel (Just Symbol "_cmModelName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text)) ((:*:) * (S1 * (MetaSel (Just Symbol "_cmPrimaryContainer") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * ContainerDefinition)) (S1 * (MetaSel (Just Symbol "_cmExecutionRoleARN") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text))))))
type Rs CreateModel Source # 

Request Lenses

cmVPCConfig :: Lens' CreateModel (Maybe VPCConfig) Source #

A object that specifies the VPC that you want your model to connect to. Control access to and from your training container by configuring the VPC. For more information, see 'host-vpc' .

cmTags :: Lens' CreateModel [Tag] Source #

An array of key-value pairs. For more information, see Using Cost Allocation Tags in the AWS Billing and Cost Management User Guide .

cmModelName :: Lens' CreateModel Text Source #

The name of the new model.

cmPrimaryContainer :: Lens' CreateModel 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 into production.

cmExecutionRoleARN :: Lens' CreateModel Text Source #

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

Destructuring the Response

createModelResponse Source #

Creates a value of CreateModelResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

data CreateModelResponse Source #

See: createModelResponse smart constructor.

Instances

Eq CreateModelResponse Source # 
Data CreateModelResponse Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CreateModelResponse -> c CreateModelResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CreateModelResponse #

toConstr :: CreateModelResponse -> Constr #

dataTypeOf :: CreateModelResponse -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c CreateModelResponse) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CreateModelResponse) #

gmapT :: (forall b. Data b => b -> b) -> CreateModelResponse -> CreateModelResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CreateModelResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CreateModelResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> CreateModelResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CreateModelResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CreateModelResponse -> m CreateModelResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateModelResponse -> m CreateModelResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CreateModelResponse -> m CreateModelResponse #

Read CreateModelResponse Source # 
Show CreateModelResponse Source # 
Generic CreateModelResponse Source # 
NFData CreateModelResponse Source # 

Methods

rnf :: CreateModelResponse -> () #

type Rep CreateModelResponse Source # 
type Rep CreateModelResponse = D1 * (MetaData "CreateModelResponse" "Network.AWS.SageMaker.CreateModel" "amazonka-sagemaker-1.6.0-9oNc2IB3ZCo9VZHXZi5zcA" False) (C1 * (MetaCons "CreateModelResponse'" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "_cmrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Int)) (S1 * (MetaSel (Just Symbol "_cmrsModelARN") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text))))

Response Lenses

cmrsResponseStatus :: Lens' CreateModelResponse Int Source #

  • - | The response status code.

cmrsModelARN :: Lens' CreateModelResponse Text Source #

The ARN of the model created in Amazon SageMaker.