예제 #1
0
        public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems)
        {
            AmazonLambdaConfig config = new AmazonLambdaConfig();

            config.RegionEndpoint = region;
            ConfigureClient(config);
            AmazonLambdaClient client = new AmazonLambdaClient(creds, config);

            ListEventSourceMappingsResponse resp = new ListEventSourceMappingsResponse();

            do
            {
                ListEventSourceMappingsRequest req = new ListEventSourceMappingsRequest
                {
                    Marker = resp.NextMarker
                    ,
                    MaxItems = maxItems
                };

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

                foreach (var obj in resp.EventSourceMappings)
                {
                    AddObject(obj);
                }
            }while (!string.IsNullOrEmpty(resp.NextMarker));
        }
예제 #2
0
        internal ListEventSourceMappingsResponse ListEventSourceMappings(ListEventSourceMappingsRequest request)
        {
            var marshaller   = new ListEventSourceMappingsRequestMarshaller();
            var unmarshaller = ListEventSourceMappingsResponseUnmarshaller.Instance;

            return(Invoke <ListEventSourceMappingsRequest, ListEventSourceMappingsResponse>(request, marshaller, unmarshaller));
        }
예제 #3
0
        /// <summary>
        /// Initiates the asynchronous execution of the ListEventSourceMappings operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the ListEventSourceMappings 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>
        public Task <ListEventSourceMappingsResponse> ListEventSourceMappingsAsync(ListEventSourceMappingsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new ListEventSourceMappingsRequestMarshaller();
            var unmarshaller = ListEventSourceMappingsResponseUnmarshaller.Instance;

            return(InvokeAsync <ListEventSourceMappingsRequest, ListEventSourceMappingsResponse>(request, marshaller,
                                                                                                 unmarshaller, cancellationToken));
        }
예제 #4
0
        /// <summary>
        /// Initiates the asynchronous execution of the ListEventSourceMappings operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the ListEventSourceMappings operation on AmazonLambdaClient.</param>
        /// <param name="callback">An Action delegate that is invoked when the operation completes.</param>
        /// <param name="options">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        public void ListEventSourceMappingsAsync(ListEventSourceMappingsRequest request, AmazonServiceCallback <ListEventSourceMappingsRequest, ListEventSourceMappingsResponse> callback, AsyncOptions options = null)
        {
            options = options == null?new AsyncOptions():options;
            var marshaller   = new ListEventSourceMappingsRequestMarshaller();
            var unmarshaller = ListEventSourceMappingsResponseUnmarshaller.Instance;
            Action <AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null;

            if (callback != null)
            {
                callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => {
                    AmazonServiceResult <ListEventSourceMappingsRequest, ListEventSourceMappingsResponse> responseObject
                        = new AmazonServiceResult <ListEventSourceMappingsRequest, ListEventSourceMappingsResponse>((ListEventSourceMappingsRequest)req, (ListEventSourceMappingsResponse)res, ex, ao.State);
                    callback(responseObject);
                }
            }
            ;
            BeginInvoke <ListEventSourceMappingsRequest>(request, marshaller, unmarshaller, options, callbackHelper);
        }
 public void ListEventSourceMappingsAsync(ListEventSourceMappingsRequest request, AmazonServiceCallback <ListEventSourceMappingsRequest, ListEventSourceMappingsResponse> callback, AsyncOptions options = null)
 {
     throw new System.NotImplementedException();
 }