Esempio n. 1
0
            public override async Task <Context> Execute(Context context)
            {
                var result = await sageMaker.CreateEndpointAsync(new CreateEndpointRequest
                {
                    EndpointName       = context.EndpointName,
                    EndpointConfigName = context.TrainingJobName
                });

                context.EndpointArn = result.EndpointArn;

                return(context);
            }
 private Amazon.SageMaker.Model.CreateEndpointResponse CallAWSServiceOperation(IAmazonSageMaker client, Amazon.SageMaker.Model.CreateEndpointRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon SageMaker Service", "CreateEndpoint");
     try
     {
         #if DESKTOP
         return(client.CreateEndpoint(request));
         #elif CORECLR
         return(client.CreateEndpointAsync(request).GetAwaiter().GetResult());
         #else
                 #error "Unknown build edition"
         #endif
     }
     catch (AmazonServiceException exc)
     {
         var webException = exc.InnerException as System.Net.WebException;
         if (webException != null)
         {
             throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException);
         }
         throw;
     }
 }