コード例 #1
0
        public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems)
        {
            AmazonXRayConfig config = new AmazonXRayConfig();

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

            GetGroupsResponse resp = new GetGroupsResponse();

            do
            {
                GetGroupsRequest req = new GetGroupsRequest
                {
                    NextToken = resp.NextToken
                };

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

                foreach (var obj in resp.Groups)
                {
                    AddObject(obj);
                }
            }while (!string.IsNullOrEmpty(resp.NextToken));
        }
コード例 #2
0
        private AmazonXRayClient CreateXRayClient(DaemonConfig endpoint)
        {
            var config = new AmazonXRayConfig();

            config.ServiceURL = "http://" + endpoint.TCPEndpoint.Address.ToString() + ":" + endpoint.TCPEndpoint.Port;
            AWSCredentials credentials = new AnonymousAWSCredentials(); // sends unsigned requests to daemon endpoint

            return(new AmazonXRayClient(credentials, config));
        }
コード例 #3
0
        protected static void ClassInit()
        {
            var config = new AmazonXRayConfig();

            config.ServiceURL           = "https://xray.us-east-1.amazonaws.com ";
            config.AuthenticationRegion = "us-east-1";

            XrayClient = new AmazonXRayClient(config);
            Recorder   = new AWSXRayRecorder();
        }
コード例 #4
0
        protected IAmazonXRay CreateClient(AWSCredentials credentials, RegionEndpoint region)
        {
            var config = new AmazonXRayConfig {
                RegionEndpoint = region
            };

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

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