Beispiel #1
0
        /// <summary>Snippet for CreateExperimentAsync</summary>
        public async Task CreateExperimentResourceNamesAsync()
        {
            // Snippet: CreateExperimentAsync(EnvironmentName, Experiment, CallSettings)
            // Additional: CreateExperimentAsync(EnvironmentName, Experiment, CancellationToken)
            // Create client
            ExperimentsClient experimentsClient = await ExperimentsClient.CreateAsync();

            // Initialize request argument(s)
            EnvironmentName parent     = EnvironmentName.FromProjectLocationAgentEnvironment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]");
            Experiment      experiment = new Experiment();
            // Make the request
            Experiment response = await experimentsClient.CreateExperimentAsync(parent, experiment);

            // End snippet
        }
Beispiel #2
0
        /// <summary>Snippet for CreateExperimentAsync</summary>
        public async Task CreateExperimentAsync()
        {
            // Snippet: CreateExperimentAsync(string, Experiment, CallSettings)
            // Additional: CreateExperimentAsync(string, Experiment, CancellationToken)
            // Create client
            ExperimentsClient experimentsClient = await ExperimentsClient.CreateAsync();

            // Initialize request argument(s)
            string     parent     = "projects/[PROJECT]/locations/[LOCATION]/agents/[AGENT]/environments/[ENVIRONMENT]";
            Experiment experiment = new Experiment();
            // Make the request
            Experiment response = await experimentsClient.CreateExperimentAsync(parent, experiment);

            // End snippet
        }