예제 #1
0
        public async Task DataFlowSample()
        {
            #region Snippet:CreateDataFlowClient
            // Replace the string below with your actual endpoint url.
            string endpoint = "<my-endpoint-url>";
            /*@@*/ endpoint = TestEnvironment.EndpointUrl;
            DataFlowClient client = new DataFlowClient(endpoint: new Uri(endpoint), credential: new DefaultAzureCredential());
            #endregion

            #region Snippet:CreateDataFlow
            DataFlowCreateOrUpdateDataFlowOperation operation       = client.StartCreateOrUpdateDataFlow("MyDataFlow", new DataFlowResource(new DataFlow()));
            Response <DataFlowResource>             createdDataflow = await operation.WaitForCompletionAsync();

            #endregion

            #region Snippet:RetrieveDataFlow
            DataFlowResource retrievedDataflow = client.GetDataFlow("MyDataFlow");
            #endregion

            #region Snippet:ListDataFlows
            Pageable <DataFlowResource> dataFlows = client.GetDataFlowsByWorkspace();
            foreach (DataFlowResource dataflow in dataFlows)
            {
                System.Console.WriteLine(dataflow.Name);
            }
            #endregion

            #region Snippet:DeleteDataFlow
            client.StartDeleteDataFlow("MyDataFlow");
            #endregion
        }
 public void RetrieveDataFlow()
 {
     #region Snippet:RetrieveDataFlow
     DataFlowResource dataFlow = DataFlowClient.GetDataFlow("MyDataFlow");
     #endregion
 }
 public DataFlowResource GetDataFlow(string dataFlowName)
 {
     return(_dataFlowClient.GetDataFlow(dataFlowName));
 }