AWS SDK を使用して SageMaker エンドポイントを作成する - AWS SDK コードサンプル

Doc AWS SDK Examples リポジトリには、他にも SDK の例があります。 AWS GitHub

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

AWS SDK を使用して SageMaker エンドポイントを作成する

次のコード例は、 SageMaker エンドポイントを作成する方法を示しています。

アクション例は、より大きなプログラムからのコードの抜粋であり、コンテキスト内で実行する必要があります。次のコード例で、このアクションのコンテキストを確認できます。

SAP ABAP
SDK for SAP ABAP
注記

には他にもがあります GitHub。用例一覧を検索し、AWS コードサンプルリポジトリでの設定と実行の方法を確認してください。

DATA lt_production_variants TYPE /aws1/cl_sgmproductionvariant=>tt_productionvariantlist. DATA lo_production_variants TYPE REF TO /aws1/cl_sgmproductionvariant. DATA oo_ep_config_result TYPE REF TO /aws1/cl_sgmcreateendptcfgout. "Create a production variant as an ABAP object." "Identifies a model that you want to host and the resources chosen to deploy for hosting it." CREATE OBJECT lo_production_variants EXPORTING iv_variantname = iv_variant_name iv_modelname = iv_model_name iv_initialinstancecount = iv_initial_instance_count iv_instancetype = iv_instance_type. INSERT lo_production_variants INTO TABLE lt_production_variants. "Create an endpoint configuration." TRY. oo_ep_config_result = lo_sgm->createendpointconfig( iv_endpointconfigname = iv_endpoint_config_name it_productionvariants = lt_production_variants ). MESSAGE 'Endpoint configuration created.' TYPE 'I'. CATCH /aws1/cx_sgmresourcelimitexcd. MESSAGE 'You have reached the limit on the number of resources.' TYPE 'E'. ENDTRY. "Create an endpoint." TRY. oo_result = lo_sgm->createendpoint( " oo_result is returned for testing purposes. " iv_endpointconfigname = iv_endpoint_config_name iv_endpointname = iv_endpoint_name ). MESSAGE 'Endpoint created.' TYPE 'I'. CATCH /aws1/cx_sgmresourcelimitexcd. MESSAGE 'You have reached the limit on the number of resources.' TYPE 'E'. ENDTRY.
  • API の詳細については、「AWS SDK for SAP ABAP API リファレンス」の以下のトピックを参照してください。