Ejemplo n.º 1
0
        private static void Demo_ListMySubscriptions(AdlClient.AzureClient az)
        {
            var subs = az.ListSubscriptions();

            foreach (var sub in subs)
            {
                Console.WriteLine("Sub: {0} {1}", sub.DisplayName, sub.Id);
            }
        }
Ejemplo n.º 2
0
        private static void Demo_ListMyResourceGroups(AdlClient.AzureClient az)
        {
            var subs = az.ListSubscriptions();
            var sub  = subs.First();
            var rgs  = az.ListResourceGroups(sub.SubscriptionId);

            foreach (var rg in rgs)
            {
                Console.WriteLine("Sub: {0}", rg.Name);
            }
        }
Ejemplo n.º 3
0
        private static void Demo_Resource_ListDataLakeStoreAccountsInSubscription(AdlClient.AzureClient az)
        {
            var sub = "045c28ea-c686-462f-9081-33c34e871ba3";

            var storage_accounts = az.Store.ListAccountsInSubscription(sub).ToList();

            foreach (var i in storage_accounts)
            {
                Console.WriteLine("----------------");
                Console.WriteLine("Name = {0}", i.Name);
                Console.WriteLine("Location = {0}", i.Location);
                Console.WriteLine("Type = {0}", i.Type);
            }
        }
Ejemplo n.º 4
0
        public void Initialize()
        {
            if (this.init == false)
            {
                string tenant = "microsoft.onmicrosoft.com";
                this.Authentication = new AdlClient.InteractiveAuthentication(tenant);
                Authentication.Authenticate();

                this.SubscriptionId = "ace74b35-b0de-428b-a1d9-55459d7a6e30";
                this.ResourceGroup  = "adlclienttest";

                var adla_account = new AdlClient.Models.AnalyticsAccountRef(this.SubscriptionId, this.ResourceGroup, "adlclientqa");
                var adls_account = new AdlClient.Models.StoreAccountRef(this.SubscriptionId, this.ResourceGroup, "adlclientqa");

                this.AzureClient     = new AdlClient.AzureClient(this.Authentication);
                this.StoreClient     = new AdlClient.StoreClient(this.Authentication, adls_account);
                this.AnalyticsClient = new AdlClient.AnalyticsClient(this.Authentication, adla_account);

                this.init = true;
            }
        }
Ejemplo n.º 5
0
        private static void Main(string[] args)
        {
            // Setup authentication for this demo
            var auth = new AdlClient.InteractiveAuthentication("microsoft.onmicrosoft.com"); // change this to YOUR tenant

            auth.Authenticate();

            // Collect info about the Azure resources needed for this demo
            string subid     = "ace74b35-b0de-428b-a1d9-55459d7a6e30";
            string rg        = "adlclienttest";
            string adla_name = "adlclientqa";
            string adls_name = "adlclientqa";

            // Identify the accounts
            var adla_account = new AdlClient.Models.AnalyticsAccountRef(subid, rg, adla_name);
            var adls_account = new AdlClient.Models.StoreAccountRef(subid, rg, adls_name);

            // Create the clients
            var az   = new AdlClient.AzureClient(auth);
            var adla = new AdlClient.AnalyticsClient(auth, adla_account);
            var adls = new AdlClient.StoreClient(auth, adls_account);

            // ------------------------------
            // Run the Demo
            // ------------------------------

            Demo_ListMySubscriptions(az);
            Demo_ListMyResourceGroups(az);

            Demo_JobsDetails(adla);
            Demo_Jobs_GetJobUrl(adla);

            RunDemos_Job_Summaries(adla);
            RunDemos_Job_Listing(adla);
            RunDemos_Catalog(adla);
            RunDemos_Analytics_Account_Management(adla);
            RunDemos_FileSystem(adls);
            RunDemos_Resource_Managementr(az);
        }
Ejemplo n.º 6
0
        private static void Main(string[] args)
        {
            // Setup authentication for this demo
            var auth = new AdlClient.Authentication("microsoft.onmicrosoft.com"); // change this to YOUR tenant

            auth.Authenticate();

            // Collect info about the Azure resources needed for this demo
            string subid     = "045c28ea-c686-462f-9081-33c34e871ba3";
            string rg        = "InsightServices";
            string adla_name = "datainsightsadhoc";
            string adls_name = "datainsightsadhoc";

            // Identify the accounts
            var adla_account = new AdlClient.AnalyticsAccount(subid, rg, adla_name);
            var adls_account = new AdlClient.StoreAccount(subid, rg, adls_name);

            // Create the clients
            var az   = new AdlClient.AzureClient(auth);
            var adla = new AdlClient.AnalyticsClient(auth, adla_account);
            var adls = new AdlClient.StoreClient(auth, adls_account);

            // ------------------------------
            // Run the Demo
            // ------------------------------

            Demo_ListMySubscriptions(az);
            Demo_ListMyResourceGroups(az);

            Demo_JobsDetails(adla);
            Demo_Jobs_GetJobUrl(adla);

            RunDemos_Job_Summaries(adla);
            RunDemos_Job_Listing(adla);
            RunDemos_Catalog(adla);
            RunDemos_Analytics_Account_Management(adla);
            RunDemos_FileSystem(adls);
            RunDemos_Resource_Managementr(az);
        }
Ejemplo n.º 7
0
 private static void RunDemos_Resource_Managementr(AdlClient.AzureClient az)
 {
     Demo_Resource_List_AnalyticsAccounts(az);
     Demo_Resource_ListDataLakeStoreAccountsInSubscription(az);
 }