/// <summary> /// Returns the details of a single named query or a list of up to 50 queries, which you /// provide as an array of query ID strings. Use <a>ListNamedQueries</a> to get the list /// of named query IDs. If information could not be retrieved for a submitted query ID, /// information about the query ID submitted is listed under <a>UnprocessedNamedQueryId</a>. /// Named queries are different from executed queries. Use <a>BatchGetQueryExecution</a> /// to get details about each unique query execution, and <a>ListQueryExecutions</a> to /// get a list of query execution IDs. /// </summary> /// <param name="request">Container for the necessary parameters to execute the BatchGetNamedQuery service method.</param> /// /// <returns>The response from the BatchGetNamedQuery service method, as returned by Athena.</returns> /// <exception cref="Amazon.Athena.Model.InternalServerException"> /// Indicates a platform issue, which may be due to a transient condition or outage. /// </exception> /// <exception cref="Amazon.Athena.Model.InvalidRequestException"> /// Indicates that something is wrong with the input to the request. For example, a required /// parameter may be missing or out of range. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/BatchGetNamedQuery">REST API Reference for BatchGetNamedQuery Operation</seealso> public BatchGetNamedQueryResponse BatchGetNamedQuery(BatchGetNamedQueryRequest request) { var marshaller = new BatchGetNamedQueryRequestMarshaller(); var unmarshaller = BatchGetNamedQueryResponseUnmarshaller.Instance; return(Invoke <BatchGetNamedQueryRequest, BatchGetNamedQueryResponse>(request, marshaller, unmarshaller)); }
public void BatchGetNamedQueryMarshallTest() { var request = InstantiateClassGenerator.Execute <BatchGetNamedQueryRequest>(); var marshaller = new BatchGetNamedQueryRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content); Comparer.CompareObjectToJson <BatchGetNamedQueryRequest>(request, jsonRequest); var webResponse = new WebResponseData { Headers = { { "x-amzn-RequestId", Guid.NewGuid().ToString() }, { "x-amz-crc32", "0" } } }; var jsonResponse = new JsonSampleGenerator(service_model, service_model.FindOperation("BatchGetNamedQuery").ResponseStructure).Execute(); webResponse.Headers.Add("Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString()); UnmarshallerContext context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), false, webResponse); var response = BatchGetNamedQueryResponseUnmarshaller.Instance.Unmarshall(context) as BatchGetNamedQueryResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// Initiates the asynchronous execution of the BatchGetNamedQuery operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the BatchGetNamedQuery operation.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// <returns>The task object representing the asynchronous operation.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/athena-2017-05-18/BatchGetNamedQuery">REST API Reference for BatchGetNamedQuery Operation</seealso> public Task <BatchGetNamedQueryResponse> BatchGetNamedQueryAsync(BatchGetNamedQueryRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new BatchGetNamedQueryRequestMarshaller(); var unmarshaller = BatchGetNamedQueryResponseUnmarshaller.Instance; return(InvokeAsync <BatchGetNamedQueryRequest, BatchGetNamedQueryResponse>(request, marshaller, unmarshaller, cancellationToken)); }