/// <summary> /// Gets an endpoint for a specified stream for either reading or writing. Use this endpoint /// in your application to read from the specified stream (using the <code>GetMedia</code> /// or <code>GetMediaForFragmentList</code> operations) or write to it (using the <code>PutMedia</code> /// operation). /// /// <note> /// <para> /// The returned endpoint does not have the API name appended. The client needs to add /// the API name to the returned endpoint. /// </para> /// </note> /// <para> /// In the request, specify the stream either by <code>StreamName</code> or <code>StreamARN</code>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the GetDataEndpoint service method.</param> /// /// <returns>The response from the GetDataEndpoint service method, as returned by KinesisVideo.</returns> /// <exception cref="Amazon.KinesisVideo.Model.ClientLimitExceededException"> /// Kinesis Video Streams has throttled the request because you have exceeded the limit /// of allowed client calls. Try making the call later. /// </exception> /// <exception cref="Amazon.KinesisVideo.Model.InvalidArgumentException"> /// The value for this input parameter is invalid. /// </exception> /// <exception cref="Amazon.KinesisVideo.Model.NotAuthorizedException"> /// The caller is not authorized to perform this operation. /// </exception> /// <exception cref="Amazon.KinesisVideo.Model.ResourceNotFoundException"> /// Amazon Kinesis Video Streams can't find the stream that you specified. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/kinesisvideo-2017-09-30/GetDataEndpoint">REST API Reference for GetDataEndpoint Operation</seealso> public virtual GetDataEndpointResponse GetDataEndpoint(GetDataEndpointRequest request) { var marshaller = new GetDataEndpointRequestMarshaller(); var unmarshaller = GetDataEndpointResponseUnmarshaller.Instance; return(Invoke <GetDataEndpointRequest, GetDataEndpointResponse>(request, marshaller, unmarshaller)); }
public void GetDataEndpointMarshallTest() { var operation = service_model.FindOperation("GetDataEndpoint"); var request = InstantiateClassGenerator.Execute <GetDataEndpointRequest>(); var marshaller = new GetDataEndpointRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("GetDataEndpoint", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { { "x-amzn-RequestId", Guid.NewGuid().ToString() }, { "x-amz-crc32", "0" } } }; var payloadResponse = new JsonSampleGenerator(service_model, operation.ResponseStructure).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = GetDataEndpointResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as GetDataEndpointResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// Initiates the asynchronous execution of the GetDataEndpoint operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the GetDataEndpoint 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/kinesisvideo-2017-09-30/GetDataEndpoint">REST API Reference for GetDataEndpoint Operation</seealso> public virtual Task <GetDataEndpointResponse> GetDataEndpointAsync(GetDataEndpointRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new GetDataEndpointRequestMarshaller(); var unmarshaller = GetDataEndpointResponseUnmarshaller.Instance; return(InvokeAsync <GetDataEndpointRequest, GetDataEndpointResponse>(request, marshaller, unmarshaller, cancellationToken)); }