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

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

            ListRoutesResponse resp = new ListRoutesResponse();

            do
            {
                ListRoutesRequest req = new ListRoutesRequest
                {
                    NextToken = resp.NextToken
                    ,
                    Limit = maxItems
                };

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

                foreach (var obj in resp.Routes)
                {
                    AddObject(obj);
                }
            }while (!string.IsNullOrEmpty(resp.NextToken));
        }
コード例 #2
0
        protected IAmazonAppMesh CreateClient(AWSCredentials credentials, RegionEndpoint region)
        {
            var config = new AmazonAppMeshConfig {
                RegionEndpoint = region
            };

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

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