示例#1
0
        /// <summary>
        /// Retrieves the latest deployed configuration. This API may return empty Configuration
        /// data if the client already has the latest version. See StartConfigurationSession to
        /// obtain an InitialConfigurationToken to call this API.
        ///
        ///  <important>
        /// <para>
        /// Each call to GetLatestConfiguration returns a new ConfigurationToken (NextPollConfigurationToken
        /// in the response). This new token MUST be provided to the next call to GetLatestConfiguration
        /// when polling for configuration updates.
        /// </para>
        ///
        /// <para>
        /// To avoid excess charges, we recommend that you include the <code>ClientConfigurationVersion</code>
        /// value with every call to <code>GetConfiguration</code>. This value must be saved on
        /// your client. Subsequent calls to <code>GetConfiguration</code> must pass this value
        /// by using the <code>ClientConfigurationVersion</code> parameter.
        /// </para>
        ///  </important>
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the GetLatestConfiguration service method.</param>
        ///
        /// <returns>The response from the GetLatestConfiguration service method, as returned by AppConfigData.</returns>
        /// <exception cref="Amazon.AppConfigData.Model.BadRequestException">
        /// The input fails to satisfy the constraints specified by the service.
        /// </exception>
        /// <exception cref="Amazon.AppConfigData.Model.InternalServerException">
        /// There was an internal failure in the service.
        /// </exception>
        /// <exception cref="Amazon.AppConfigData.Model.ResourceNotFoundException">
        /// The requested resource could not be found.
        /// </exception>
        /// <exception cref="Amazon.AppConfigData.Model.ThrottlingException">
        /// The request was denied due to request throttling.
        /// </exception>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/appconfigdata-2021-11-11/GetLatestConfiguration">REST API Reference for GetLatestConfiguration Operation</seealso>
        public virtual GetLatestConfigurationResponse GetLatestConfiguration(GetLatestConfigurationRequest request)
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = GetLatestConfigurationRequestMarshaller.Instance;
            options.ResponseUnmarshaller = GetLatestConfigurationResponseUnmarshaller.Instance;

            return(Invoke <GetLatestConfigurationResponse>(request, options));
        }
示例#2
0
        /// <summary>
        /// Initiates the asynchronous execution of the GetLatestConfiguration operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the GetLatestConfiguration operation on AmazonAppConfigDataClient.</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 EndGetLatestConfiguration
        ///         operation.</returns>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/appconfigdata-2021-11-11/GetLatestConfiguration">REST API Reference for GetLatestConfiguration Operation</seealso>
        public virtual IAsyncResult BeginGetLatestConfiguration(GetLatestConfigurationRequest request, AsyncCallback callback, object state)
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = GetLatestConfigurationRequestMarshaller.Instance;
            options.ResponseUnmarshaller = GetLatestConfigurationResponseUnmarshaller.Instance;

            return(BeginInvoke(request, options, callback, state));
        }
        /// <summary>
        /// Retrieves the latest deployed configuration. This API may return empty configuration
        /// data if the client already has the latest version. For more information about this
        /// API action and to view example CLI commands that show how to use it with the <a>StartConfigurationSession</a>
        /// API action, see <a href="http://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-retrieving-the-configuration">Receiving
        /// the configuration</a> in the <i>AppConfig User Guide</i>.
        ///
        ///  <important>
        /// <para>
        /// Note the following important information.
        /// </para>
        ///  <ul> <li>
        /// <para>
        /// Each configuration token is only valid for one call to <code>GetLatestConfiguration</code>.
        /// The <code>GetLatestConfiguration</code> response includes a <code>NextPollConfigurationToken</code>
        /// that should always replace the token used for the just-completed call in preparation
        /// for the next one.
        /// </para>
        ///  </li> <li>
        /// <para>
        ///  <code>GetLatestConfiguration</code> is a priced call. For more information, see <a
        /// href="https://aws.amazon.com/systems-manager/pricing/">Pricing</a>.
        /// </para>
        ///  </li> </ul> </important>
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the GetLatestConfiguration 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 GetLatestConfiguration service method, as returned by AppConfigData.</returns>
        /// <exception cref="Amazon.AppConfigData.Model.BadRequestException">
        /// The input fails to satisfy the constraints specified by the service.
        /// </exception>
        /// <exception cref="Amazon.AppConfigData.Model.InternalServerException">
        /// There was an internal failure in the service.
        /// </exception>
        /// <exception cref="Amazon.AppConfigData.Model.ResourceNotFoundException">
        /// The requested resource could not be found.
        /// </exception>
        /// <exception cref="Amazon.AppConfigData.Model.ThrottlingException">
        /// The request was denied due to request throttling.
        /// </exception>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/appconfigdata-2021-11-11/GetLatestConfiguration">REST API Reference for GetLatestConfiguration Operation</seealso>
        public virtual Task <GetLatestConfigurationResponse> GetLatestConfigurationAsync(GetLatestConfigurationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = GetLatestConfigurationRequestMarshaller.Instance;
            options.ResponseUnmarshaller = GetLatestConfigurationResponseUnmarshaller.Instance;

            return(InvokeAsync <GetLatestConfigurationResponse>(request, options, cancellationToken));
        }