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

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

            ListWorkflowsResponse resp = new ListWorkflowsResponse();

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

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

                foreach (var obj in resp.Workflows)
                {
                    AddObject(obj);
                }
            }while (!string.IsNullOrEmpty(resp.NextToken));
        }
Exemple #2
0
        protected IAmazonGlue CreateClient(AWSCredentials credentials, RegionEndpoint region)
        {
            var config = new AmazonGlueConfig {
                RegionEndpoint = region
            };

            Amazon.PowerShell.Utils.Common.PopulateConfig(this, config);
            this.CustomizeClientConfig(config);
            var client = new AmazonGlueClient(credentials, config);

            client.BeforeRequestEvent += RequestEventHandler;
            client.AfterResponseEvent += ResponseEventHandler;
            return(client);
        }