private static void CreateLinkedService()

in SamplesV1/ParameterizedPipelinesForAzureML/DeployDataFactory/DeployDataFactory/RetrainingPipeline.cs [287:339]


        private static void CreateLinkedService(
            string resourceGroupName, 
            string dataFactoryName, 
            DataFactoryManagementClient client, 
            IList<UpdateResourceEndpoint> endpoints, 
            string[] parameters)
        {
            // create Azure ML training linked services
            Console.WriteLine("Creating Azure ML training linked service");
            client.LinkedServices.CreateOrUpdate(resourceGroupName, dataFactoryName,
                new LinkedServiceCreateOrUpdateParameters()
                {
                    LinkedService = new LinkedService()
                    {
                        Name = "LinkedServiceRetraining-AzureML",
                        Properties = new LinkedServiceProperties
                        (
                            new AzureMLLinkedService(DataFactoryConfig.RetrainingEndPoint, DataFactoryConfig.RetrainingApiKey )
                            {                                
                            }
                        )
                    }
                }
            );

            int i = 0;
            foreach (UpdateResourceEndpoint endpoint in endpoints)
            {
                string[] parameterList = parameters[i].Split(',');
                string region = parameterList[0];

                // create Azure ML scoring linked services
                Console.WriteLine("Creating Azure ML scoring linked service for {0}", endpoint);
                client.LinkedServices.CreateOrUpdate(resourceGroupName, dataFactoryName,
                    new LinkedServiceCreateOrUpdateParameters()
                    {
                        LinkedService = new LinkedService()
                        {
                            // Note: The linked service names generated here are also used by the scoring pipeline. 
                            Name = Utilities.GetScoringLinkedServiceName(DataFactoryConfig.ScoringLinkedServiceNamePrefix, region),
                            Properties = new LinkedServiceProperties
                            (
                                new AzureMLLinkedService(endpoint.mlEndpoint, endpoint.apiKey) 
                                {
                                    UpdateResourceEndpoint = endpoint.updateResourceEndpointUrl
                                }
                            )
                        }
                    }
                );
                i++;
            }
        }