Esempio n. 1
0
        public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems)
        {
            AmazonSimpleWorkflowConfig config = new AmazonSimpleWorkflowConfig();

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

            ActivityTypeInfos resp = new ActivityTypeInfos();

            do
            {
                ListActivityTypesRequest req = new ListActivityTypesRequest
                {
                    NextPageToken = resp.NextPageToken
                    ,
                    MaximumPageSize = maxItems
                };

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

                foreach (var obj in resp.TypeInfos)
                {
                    AddObject(obj);
                }
            }while (!string.IsNullOrEmpty(resp.NextPageToken));
        }
        public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems)
        {
            AmazonSimpleWorkflowConfig config = new AmazonSimpleWorkflowConfig();

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

            DecisionTask resp = new DecisionTask();

            do
            {
                PollForDecisionTaskRequest req = new PollForDecisionTaskRequest
                {
                    NextPageToken = resp.NextPageToken
                    ,
                    MaximumPageSize = maxItems
                };

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

                foreach (var obj in resp.Events)
                {
                    AddObject(obj);
                }
            }while (!string.IsNullOrEmpty(resp.NextPageToken));
        }
Esempio n. 3
0
        public override IAmazonSimpleWorkflow CreateSimpleWorkflowClient()
        {
            var config = new AmazonSimpleWorkflowConfig()
            {
                RegionEndpoint = AWSRegion
            };

            return(new AmazonSimpleWorkflowClient(Credentials, config));
        }
        protected IAmazonSimpleWorkflow CreateClient(AWSCredentials credentials, RegionEndpoint region)
        {
            var config = new AmazonSimpleWorkflowConfig {
                RegionEndpoint = region
            };

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

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