public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems) { AmazonSageMakerConfig config = new AmazonSageMakerConfig(); config.RegionEndpoint = region; ConfigureClient(config); AmazonSageMakerClient client = new AmazonSageMakerClient(creds, config); ListPipelineExecutionStepsResponse resp = new ListPipelineExecutionStepsResponse(); do { ListPipelineExecutionStepsRequest req = new ListPipelineExecutionStepsRequest { NextToken = resp.NextToken , MaxResults = maxItems }; resp = client.ListPipelineExecutionSteps(req); CheckError(resp.HttpStatusCode, "200"); foreach (var obj in resp.PipelineExecutionSteps) { AddObject(obj); } }while (!string.IsNullOrEmpty(resp.NextToken)); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { ListPipelineExecutionStepsResponse response = new ListPipelineExecutionStepsResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("NextToken", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.NextToken = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("PipelineExecutionSteps", targetDepth)) { var unmarshaller = new ListUnmarshaller <PipelineExecutionStep, PipelineExecutionStepUnmarshaller>(PipelineExecutionStepUnmarshaller.Instance); response.PipelineExecutionSteps = unmarshaller.Unmarshall(context); continue; } } return(response); }