/AWS1/IF_SGM=>CREATEENDPOINTCONFIG()¶
About CreateEndpointConfig¶
Creates an endpoint configuration that SageMaker hosting services uses to deploy models. In the configuration, you identify one or more models, created using the CreateModel API, to deploy and the resources that you want SageMaker to provision. Then you call the CreateEndpoint API.
Use this API if you want to use SageMaker hosting services to deploy models into production.
In the request, you define a ProductionVariant, for each model that you want to deploy. Each ProductionVariant parameter also describes the resources that you want SageMaker to provision. This includes the number and type of ML compute instances to deploy.
If you are hosting multiple models, you also assign a VariantWeight to specify how much traffic you want to allocate to each model. For example, suppose that you want to host two models, A and B, and you assign traffic weight 2 for model A and 1 for model B. SageMaker distributes two-thirds of the traffic to Model A, and one-third to model B.
When you call CreateEndpoint, a load call is made to DynamoDB to verify that your endpoint configuration exists. When you read data from a DynamoDB table supporting Eventually Consistent Reads , the response might not reflect the results of a recently completed write operation. The response might include some stale data. If the dependent entities are not yet in DynamoDB, this causes a validation error. If you repeat your read request after a short time, the response should return the latest data. So retry logic is recommended to handle these possible issues. We also recommend that customers call DescribeEndpointConfig before calling CreateEndpoint to minimize the potential impact of a DynamoDB eventually consistent read.
Method Signature¶
METHODS /AWS1/IF_SGM~CREATEENDPOINTCONFIG
IMPORTING
!IV_ENDPOINTCONFIGNAME TYPE /AWS1/SGMENDPOINTCONFIGNAME OPTIONAL
!IT_PRODUCTIONVARIANTS TYPE /AWS1/CL_SGMPRODUCTIONVARIANT=>TT_PRODUCTIONVARIANTLIST OPTIONAL
!IO_DATACAPTURECONFIG TYPE REF TO /AWS1/CL_SGMDATACAPTURECONFIG OPTIONAL
!IT_TAGS TYPE /AWS1/CL_SGMTAG=>TT_TAGLIST OPTIONAL
!IV_KMSKEYID TYPE /AWS1/SGMKMSKEYID OPTIONAL
!IO_ASYNCINFERENCECONFIG TYPE REF TO /AWS1/CL_SGMASYNCINFERENCECFG OPTIONAL
!IO_EXPLAINERCONFIG TYPE REF TO /AWS1/CL_SGMEXPLAINERCONFIG OPTIONAL
!IT_SHADOWPRODUCTIONVARIANTS TYPE /AWS1/CL_SGMPRODUCTIONVARIANT=>TT_PRODUCTIONVARIANTLIST OPTIONAL
!IV_EXECUTIONROLEARN TYPE /AWS1/SGMROLEARN OPTIONAL
!IO_VPCCONFIG TYPE REF TO /AWS1/CL_SGMVPCCONFIG OPTIONAL
!IV_ENABLENETWORKISOLATION TYPE /AWS1/SGMBOOLEAN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_sgmcreateendptcfgout
RAISING
/AWS1/CX_SGMRESOURCELIMITEXCD
/AWS1/CX_SGMCLIENTEXC
/AWS1/CX_SGMSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_endpointconfigname TYPE /AWS1/SGMENDPOINTCONFIGNAME /AWS1/SGMENDPOINTCONFIGNAME¶
The name of the endpoint configuration. You specify this name in a CreateEndpoint request.
it_productionvariants TYPE /AWS1/CL_SGMPRODUCTIONVARIANT=>TT_PRODUCTIONVARIANTLIST TT_PRODUCTIONVARIANTLIST¶
An array of
ProductionVariantobjects, one for each model that you want to host at this endpoint.
Optional arguments:¶
io_datacaptureconfig TYPE REF TO /AWS1/CL_SGMDATACAPTURECONFIG /AWS1/CL_SGMDATACAPTURECONFIG¶
DataCaptureConfig
it_tags TYPE /AWS1/CL_SGMTAG=>TT_TAGLIST TT_TAGLIST¶
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.
iv_kmskeyid TYPE /AWS1/SGMKMSKEYID /AWS1/SGMKMSKEYID¶
The Amazon Resource Name (ARN) of a Amazon Web Services Key Management Service key that SageMaker uses to encrypt data on the storage volume attached to the ML compute instance that hosts the endpoint.
The KmsKeyId can be any of the following formats:
Key ID:
1234abcd-12ab-34cd-56ef-1234567890abKey ARN:
arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890abAlias name:
alias/ExampleAliasAlias name ARN:
arn:aws:kms:us-west-2:111122223333:alias/ExampleAliasThe KMS key policy must grant permission to the IAM role that you specify in your
CreateEndpoint,UpdateEndpointrequests. For more information, refer to the Amazon Web Services Key Management Service section Using Key Policies in Amazon Web Services KMSCertain Nitro-based instances include local storage, dependent on the instance type. Local storage volumes are encrypted using a hardware module on the instance. You can't request a
KmsKeyIdwhen using an instance type with local storage. If any of the models that you specify in theProductionVariantsparameter use nitro-based instances with local storage, do not specify a value for theKmsKeyIdparameter. If you specify a value forKmsKeyIdwhen using any nitro-based instances with local storage, the call toCreateEndpointConfigfails.For a list of instance types that support local instance storage, see Instance Store Volumes.
For more information about local instance storage encryption, see SSD Instance Store Volumes.
io_asyncinferenceconfig TYPE REF TO /AWS1/CL_SGMASYNCINFERENCECFG /AWS1/CL_SGMASYNCINFERENCECFG¶
Specifies configuration for how an endpoint performs asynchronous inference. This is a required field in order for your Endpoint to be invoked using InvokeEndpointAsync.
io_explainerconfig TYPE REF TO /AWS1/CL_SGMEXPLAINERCONFIG /AWS1/CL_SGMEXPLAINERCONFIG¶
A member of
CreateEndpointConfigthat enables explainers.
it_shadowproductionvariants TYPE /AWS1/CL_SGMPRODUCTIONVARIANT=>TT_PRODUCTIONVARIANTLIST TT_PRODUCTIONVARIANTLIST¶
An array of
ProductionVariantobjects, one for each model that you want to host at this endpoint in shadow mode with production traffic replicated from the model specified onProductionVariants. If you use this field, you can only specify one variant forProductionVariantsand one variant forShadowProductionVariants.
iv_executionrolearn TYPE /AWS1/SGMROLEARN /AWS1/SGMROLEARN¶
The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker AI can assume to perform actions on your behalf. For more information, see SageMaker AI Roles.
To be able to pass this role to Amazon SageMaker AI, the caller of this action must have the
iam:PassRolepermission.
io_vpcconfig TYPE REF TO /AWS1/CL_SGMVPCCONFIG /AWS1/CL_SGMVPCCONFIG¶
VpcConfig
iv_enablenetworkisolation TYPE /AWS1/SGMBOOLEAN /AWS1/SGMBOOLEAN¶
Sets whether all model containers deployed to the endpoint are isolated. If they are, no inbound or outbound network calls can be made to or from the model containers.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_sgmcreateendptcfgout /AWS1/CL_SGMCREATEENDPTCFGOUT¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->createendpointconfig(
io_asyncinferenceconfig = new /aws1/cl_sgmasyncinferencecfg(
io_clientconfig = new /aws1/cl_sgmasyncinferencecl00( 123 )
io_outputconfig = new /aws1/cl_sgmasyncinferenceou00(
io_notificationconfig = new /aws1/cl_sgmasyncinferencent00(
it_includeinferencerspin = VALUE /aws1/cl_sgmasyncntftpctypel00=>tt_asyncnotiftopictypelist(
( new /aws1/cl_sgmasyncntftpctypel00( |string| ) )
)
iv_errortopic = |string|
iv_successtopic = |string|
)
iv_kmskeyid = |string|
iv_s3failurepath = |string|
iv_s3outputpath = |string|
)
)
io_datacaptureconfig = new /aws1/cl_sgmdatacaptureconfig(
io_capturecontenttypeheader = new /aws1/cl_sgmcaptureconttypeh00(
it_csvcontenttypes = VALUE /aws1/cl_sgmcsvcontenttypes_w=>tt_csvcontenttypes(
( new /aws1/cl_sgmcsvcontenttypes_w( |string| ) )
)
it_jsoncontenttypes = VALUE /aws1/cl_sgmjsoncontenttypes_w=>tt_jsoncontenttypes(
( new /aws1/cl_sgmjsoncontenttypes_w( |string| ) )
)
)
it_captureoptions = VALUE /aws1/cl_sgmcaptureoption=>tt_captureoptionlist(
( new /aws1/cl_sgmcaptureoption( |string| ) )
)
iv_destinations3uri = |string|
iv_enablecapture = ABAP_TRUE
iv_initialsamplingpercentage = 123
iv_kmskeyid = |string|
)
io_explainerconfig = new /aws1/cl_sgmexplainerconfig(
io_clarifyexplainerconfig = new /aws1/cl_sgmclarifyexplainer00(
io_inferenceconfig = new /aws1/cl_sgmclarifyinference00(
it_featureheaders = VALUE /aws1/cl_sgmclarifyftheaders_w=>tt_clarifyfeatureheaders(
( new /aws1/cl_sgmclarifyftheaders_w( |string| ) )
)
it_featuretypes = VALUE /aws1/cl_sgmclarifyfeattypes_w=>tt_clarifyfeaturetypes(
( new /aws1/cl_sgmclarifyfeattypes_w( |string| ) )
)
it_labelheaders = VALUE /aws1/cl_sgmclarifylabelhead00=>tt_clarifylabelheaders(
( new /aws1/cl_sgmclarifylabelhead00( |string| ) )
)
iv_contenttemplate = |string|
iv_featuresattribute = |string|
iv_labelattribute = |string|
iv_labelindex = 123
iv_maxpayloadinmb = 123
iv_maxrecordcount = 123
iv_probabilityattribute = |string|
iv_probabilityindex = 123
)
io_shapconfig = new /aws1/cl_sgmclarifyshapconfig(
io_shapbaselineconfig = new /aws1/cl_sgmclarifyshapbasel00(
iv_mimetype = |string|
iv_shapbaseline = |string|
iv_shapbaselineuri = |string|
)
io_textconfig = new /aws1/cl_sgmclarifytextconfig(
iv_granularity = |string|
iv_language = |string|
)
iv_numberofsamples = 123
iv_seed = 123
iv_uselogit = ABAP_TRUE
)
iv_enableexplanations = |string|
)
)
io_vpcconfig = new /aws1/cl_sgmvpcconfig(
it_securitygroupids = VALUE /aws1/cl_sgmvpcsecgroupids_w=>tt_vpcsecuritygroupids(
( new /aws1/cl_sgmvpcsecgroupids_w( |string| ) )
)
it_subnets = VALUE /aws1/cl_sgmsubnets_w=>tt_subnets(
( new /aws1/cl_sgmsubnets_w( |string| ) )
)
)
it_productionvariants = VALUE /aws1/cl_sgmproductionvariant=>tt_productionvariantlist(
(
new /aws1/cl_sgmproductionvariant(
io_capacityreservationconfig = new /aws1/cl_sgmproductionvarian07(
iv_capreservationpreference = |string|
iv_mlreservationarn = |string|
)
io_coredumpconfig = new /aws1/cl_sgmproductionvarian00(
iv_destinations3uri = |string|
iv_kmskeyid = |string|
)
io_managedinstancescaling = new /aws1/cl_sgmproductionvarian05(
iv_maxinstancecount = 123
iv_mininstancecount = 123
iv_status = |string|
)
io_routingconfig = new /aws1/cl_sgmproductionvarian06( |string| )
io_serverlessconfig = new /aws1/cl_sgmproductionvarian01(
iv_maxconcurrency = 123
iv_memorysizeinmb = 123
iv_provisionedconcurrency = 123
)
iv_acceleratortype = |string|
iv_containerstrtuphealthch00 = 123
iv_enablessmaccess = ABAP_TRUE
iv_inferenceamiversion = |string|
iv_initialinstancecount = 123
iv_initialvariantweight = '0.1'
iv_instancetype = |string|
iv_mdeldatadownloadtmoutin00 = 123
iv_modelname = |string|
iv_variantname = |string|
iv_volumesizeingb = 123
)
)
)
it_shadowproductionvariants = VALUE /aws1/cl_sgmproductionvariant=>tt_productionvariantlist(
(
new /aws1/cl_sgmproductionvariant(
io_capacityreservationconfig = new /aws1/cl_sgmproductionvarian07(
iv_capreservationpreference = |string|
iv_mlreservationarn = |string|
)
io_coredumpconfig = new /aws1/cl_sgmproductionvarian00(
iv_destinations3uri = |string|
iv_kmskeyid = |string|
)
io_managedinstancescaling = new /aws1/cl_sgmproductionvarian05(
iv_maxinstancecount = 123
iv_mininstancecount = 123
iv_status = |string|
)
io_routingconfig = new /aws1/cl_sgmproductionvarian06( |string| )
io_serverlessconfig = new /aws1/cl_sgmproductionvarian01(
iv_maxconcurrency = 123
iv_memorysizeinmb = 123
iv_provisionedconcurrency = 123
)
iv_acceleratortype = |string|
iv_containerstrtuphealthch00 = 123
iv_enablessmaccess = ABAP_TRUE
iv_inferenceamiversion = |string|
iv_initialinstancecount = 123
iv_initialvariantweight = '0.1'
iv_instancetype = |string|
iv_mdeldatadownloadtmoutin00 = 123
iv_modelname = |string|
iv_variantname = |string|
iv_volumesizeingb = 123
)
)
)
it_tags = VALUE /aws1/cl_sgmtag=>tt_taglist(
(
new /aws1/cl_sgmtag(
iv_key = |string|
iv_value = |string|
)
)
)
iv_enablenetworkisolation = ABAP_TRUE
iv_endpointconfigname = |string|
iv_executionrolearn = |string|
iv_kmskeyid = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_endpointconfigarn = lo_result->get_endpointconfigarn( ).
ENDIF.