/// <summary> /// Gets information about the specified experiment. /// </summary> /// <param name="request">Container for the necessary parameters to execute the GetExperiment service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the GetExperiment service method, as returned by FIS.</returns> /// <exception cref="Amazon.FIS.Model.ResourceNotFoundException"> /// The specified resource cannot be found. /// </exception> /// <exception cref="Amazon.FIS.Model.ValidationException"> /// The specified input is not valid, or fails to satisfy the constraints for the request. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/fis-2020-12-01/GetExperiment">REST API Reference for GetExperiment Operation</seealso> public virtual Task <GetExperimentResponse> GetExperimentAsync(GetExperimentRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = GetExperimentRequestMarshaller.Instance; options.ResponseUnmarshaller = GetExperimentResponseUnmarshaller.Instance; return(InvokeAsync <GetExperimentResponse>(request, options, cancellationToken)); }
internal virtual GetExperimentResponse GetExperiment(GetExperimentRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = GetExperimentRequestMarshaller.Instance; options.ResponseUnmarshaller = GetExperimentResponseUnmarshaller.Instance; return(Invoke <GetExperimentResponse>(request, options)); }
/// <summary>Snippet for GetExperiment</summary> public void GetExperimentRequestObject() { // Snippet: GetExperiment(GetExperimentRequest, CallSettings) // Create client ExperimentsClient experimentsClient = ExperimentsClient.Create(); // Initialize request argument(s) GetExperimentRequest request = new GetExperimentRequest { ExperimentName = ExperimentName.FromProjectLocationAgentEnvironmentExperiment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]"), }; // Make the request Experiment response = experimentsClient.GetExperiment(request); // End snippet }
/// <summary>Snippet for GetExperimentAsync</summary> public async Task GetExperimentRequestObjectAsync() { // Snippet: GetExperimentAsync(GetExperimentRequest, CallSettings) // Additional: GetExperimentAsync(GetExperimentRequest, CancellationToken) // Create client ExperimentsClient experimentsClient = await ExperimentsClient.CreateAsync(); // Initialize request argument(s) GetExperimentRequest request = new GetExperimentRequest { ExperimentName = ExperimentName.FromProjectLocationAgentEnvironmentExperiment("[PROJECT]", "[LOCATION]", "[AGENT]", "[ENVIRONMENT]", "[EXPERIMENT]"), }; // Make the request Experiment response = await experimentsClient.GetExperimentAsync(request); // End snippet }