/// <summary> /// Gets the details of a single retained message for the specified topic. /// /// /// <para> /// This action returns the message payload of the retained message, which can incur messaging /// costs. To list only the topic names of the retained messages, call <a href="/iot/latest/developerguide/API_iotdata_ListRetainedMessages.html">ListRetainedMessages</a>. /// </para> /// /// <para> /// Requires permission to access the <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiotfleethubfordevicemanagement.html#awsiotfleethubfordevicemanagement-actions-as-permissions">GetRetainedMessage</a> /// action. /// </para> /// /// <para> /// For more information about messaging costs, see <a href="http://aws.amazon.com/iot-core/pricing/#Messaging">Amazon /// Web Services IoT Core pricing - Messaging</a>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the GetRetainedMessage service method.</param> /// /// <returns>The response from the GetRetainedMessage service method, as returned by IotData.</returns> /// <exception cref="Amazon.IotData.Model.InternalFailureException"> /// An unexpected error has occurred. /// </exception> /// <exception cref="Amazon.IotData.Model.InvalidRequestException"> /// The request is not valid. /// </exception> /// <exception cref="Amazon.IotData.Model.MethodNotAllowedException"> /// The specified combination of HTTP verb and URI is not supported. /// </exception> /// <exception cref="Amazon.IotData.Model.ResourceNotFoundException"> /// The specified resource does not exist. /// </exception> /// <exception cref="Amazon.IotData.Model.ServiceUnavailableException"> /// The service is temporarily unavailable. /// </exception> /// <exception cref="Amazon.IotData.Model.ThrottlingException"> /// The rate exceeds the limit. /// </exception> /// <exception cref="Amazon.IotData.Model.UnauthorizedException"> /// You are not authorized to perform this operation. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/iot-data-2015-05-28/GetRetainedMessage">REST API Reference for GetRetainedMessage Operation</seealso> public virtual GetRetainedMessageResponse GetRetainedMessage(GetRetainedMessageRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = GetRetainedMessageRequestMarshaller.Instance; options.ResponseUnmarshaller = GetRetainedMessageResponseUnmarshaller.Instance; return(Invoke <GetRetainedMessageResponse>(request, options)); }
/// <summary> /// Initiates the asynchronous execution of the GetRetainedMessage operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the GetRetainedMessage operation on AmazonIotDataClient.</param> /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param> /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.</param> /// /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndGetRetainedMessage /// operation.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/iot-data-2015-05-28/GetRetainedMessage">REST API Reference for GetRetainedMessage Operation</seealso> public virtual IAsyncResult BeginGetRetainedMessage(GetRetainedMessageRequest request, AsyncCallback callback, object state) { var options = new InvokeOptions(); options.RequestMarshaller = GetRetainedMessageRequestMarshaller.Instance; options.ResponseUnmarshaller = GetRetainedMessageResponseUnmarshaller.Instance; return(BeginInvoke(request, options, callback, state)); }
/// <summary> /// Gets the details of a single retained message for the specified topic. /// /// /// <para> /// This action returns the message payload of the retained message, which can incur messaging /// costs. To list only the topic names of the retained messages, call <a href="/iot/latest/developerguide/API_iotdata_ListRetainedMessages.html">ListRetainedMessages</a>. /// </para> /// /// <para> /// Requires permission to access the <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiotfleethubfordevicemanagement.html#awsiotfleethubfordevicemanagement-actions-as-permissions">GetRetainedMessage</a> /// action. /// </para> /// /// <para> /// For more information about messaging costs, see <a href="http://aws.amazon.com/iot-core/pricing/#Messaging">IoT /// Core pricing - Messaging</a>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the GetRetainedMessage 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 GetRetainedMessage service method, as returned by IotData.</returns> /// <exception cref="Amazon.IotData.Model.InternalFailureException"> /// An unexpected error has occurred. /// </exception> /// <exception cref="Amazon.IotData.Model.InvalidRequestException"> /// The request is not valid. /// </exception> /// <exception cref="Amazon.IotData.Model.MethodNotAllowedException"> /// The specified combination of HTTP verb and URI is not supported. /// </exception> /// <exception cref="Amazon.IotData.Model.ResourceNotFoundException"> /// The specified resource does not exist. /// </exception> /// <exception cref="Amazon.IotData.Model.ServiceUnavailableException"> /// The service is temporarily unavailable. /// </exception> /// <exception cref="Amazon.IotData.Model.ThrottlingException"> /// The rate exceeds the limit. /// </exception> /// <exception cref="Amazon.IotData.Model.UnauthorizedException"> /// You are not authorized to perform this operation. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/iot-data-2015-05-28/GetRetainedMessage">REST API Reference for GetRetainedMessage Operation</seealso> public virtual Task <GetRetainedMessageResponse> GetRetainedMessageAsync(GetRetainedMessageRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = GetRetainedMessageRequestMarshaller.Instance; options.ResponseUnmarshaller = GetRetainedMessageResponseUnmarshaller.Instance; return(InvokeAsync <GetRetainedMessageResponse>(request, options, cancellationToken)); }