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);

            ListAppsResponse resp = new ListAppsResponse();

            do
            {
                ListAppsRequest req = new ListAppsRequest
                {
                    NextToken = resp.NextToken
                    ,
                    MaxResults = maxItems
                };

                resp = client.ListApps(req);
                CheckError(resp.HttpStatusCode, "200");

                foreach (var obj in resp.Apps)
                {
                    AddObject(obj);
                }
            }while (!string.IsNullOrEmpty(resp.NextToken));
        }
예제 #2
0
        internal virtual ListAppsResponse ListApps(ListAppsRequest request)
        {
            var marshaller   = ListAppsRequestMarshaller.Instance;
            var unmarshaller = ListAppsResponseUnmarshaller.Instance;

            return(Invoke <ListAppsRequest, ListAppsResponse>(request, marshaller, unmarshaller));
        }
예제 #3
0
        /// <summary>
        /// Initiates the asynchronous execution of the ListApps operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the ListApps operation.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// <returns>The task object representing the asynchronous operation.</returns>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/ListApps">REST API Reference for ListApps Operation</seealso>
        public virtual Task <ListAppsResponse> ListAppsAsync(ListAppsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = ListAppsRequestMarshaller.Instance;
            var unmarshaller = ListAppsResponseUnmarshaller.Instance;

            return(InvokeAsync <ListAppsRequest, ListAppsResponse>(request, marshaller,
                                                                   unmarshaller, cancellationToken));
        }
예제 #4
0
        /// <summary>
        /// Initiates the asynchronous execution of the ListApps operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the ListApps operation.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// <returns>The task object representing the asynchronous operation.</returns>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/ListApps">REST API Reference for ListApps Operation</seealso>
        public virtual Task <ListAppsResponse> ListAppsAsync(ListAppsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = ListAppsRequestMarshaller.Instance;
            options.ResponseUnmarshaller = ListAppsResponseUnmarshaller.Instance;

            return(InvokeAsync <ListAppsResponse>(request, options, cancellationToken));
        }
예제 #5
0
        internal virtual ListAppsResponse ListApps(ListAppsRequest request)
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = ListAppsRequestMarshaller.Instance;
            options.ResponseUnmarshaller = ListAppsResponseUnmarshaller.Instance;

            return(Invoke <ListAppsResponse>(request, options));
        }