protected override void ProcessRecord()
        {
            base.ProcessRecord();
            UpdateReportDefinitionRequest request;

            try
            {
                request = new UpdateReportDefinitionRequest
                {
                    ReportDefinitionId            = ReportDefinitionId,
                    UpdateReportDefinitionDetails = UpdateReportDefinitionDetails,
                    IfMatch       = IfMatch,
                    OpcRequestId  = OpcRequestId,
                    OpcRetryToken = OpcRetryToken
                };

                response = client.UpdateReportDefinition(request).GetAwaiter().GetResult();
                WriteOutput(response, CreateWorkRequestObject(response.OpcWorkRequestId));
                FinishProcessing(response);
            }
            catch (Exception ex)
            {
                TerminatingErrorDuringExecution(ex);
            }
        }
示例#2
0
        /// <summary>
        /// Initiates the asynchronous execution of the UpdateReportDefinition operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the UpdateReportDefinition operation on AmazonApplicationCostProfilerClient.</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 EndUpdateReportDefinition
        ///         operation.</returns>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/AWSApplicationCostProfiler-2020-09-10/UpdateReportDefinition">REST API Reference for UpdateReportDefinition Operation</seealso>
        public virtual IAsyncResult BeginUpdateReportDefinition(UpdateReportDefinitionRequest request, AsyncCallback callback, object state)
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = UpdateReportDefinitionRequestMarshaller.Instance;
            options.ResponseUnmarshaller = UpdateReportDefinitionResponseUnmarshaller.Instance;

            return(BeginInvoke(request, options, callback, state));
        }
示例#3
0
        /// <summary>
        /// Updates existing report in AWS Application Cost Profiler.
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the UpdateReportDefinition service method.</param>
        ///
        /// <returns>The response from the UpdateReportDefinition service method, as returned by ApplicationCostProfiler.</returns>
        /// <exception cref="Amazon.ApplicationCostProfiler.Model.AccessDeniedException">
        /// You do not have permission to perform this action.
        /// </exception>
        /// <exception cref="Amazon.ApplicationCostProfiler.Model.InternalServerException">
        /// An internal server error occurred. Retry your request.
        /// </exception>
        /// <exception cref="Amazon.ApplicationCostProfiler.Model.ThrottlingException">
        /// The calls to AWS Application Cost Profiler API are throttled. The request was denied.
        /// </exception>
        /// <exception cref="Amazon.ApplicationCostProfiler.Model.ValidationException">
        /// The input fails to satisfy the constraints for the API.
        /// </exception>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/AWSApplicationCostProfiler-2020-09-10/UpdateReportDefinition">REST API Reference for UpdateReportDefinition Operation</seealso>
        public virtual UpdateReportDefinitionResponse UpdateReportDefinition(UpdateReportDefinitionRequest request)
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = UpdateReportDefinitionRequestMarshaller.Instance;
            options.ResponseUnmarshaller = UpdateReportDefinitionResponseUnmarshaller.Instance;

            return(Invoke <UpdateReportDefinitionResponse>(request, options));
        }
示例#4
0
        /// <summary>
        /// Updates existing report in AWS Application Cost Profiler.
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the UpdateReportDefinition 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 UpdateReportDefinition service method, as returned by ApplicationCostProfiler.</returns>
        /// <exception cref="Amazon.ApplicationCostProfiler.Model.AccessDeniedException">
        /// You do not have permission to perform this action.
        /// </exception>
        /// <exception cref="Amazon.ApplicationCostProfiler.Model.InternalServerException">
        /// An internal server error occurred. Retry your request.
        /// </exception>
        /// <exception cref="Amazon.ApplicationCostProfiler.Model.ThrottlingException">
        /// The calls to AWS Application Cost Profiler API are throttled. The request was denied.
        /// </exception>
        /// <exception cref="Amazon.ApplicationCostProfiler.Model.ValidationException">
        /// The input fails to satisfy the constraints for the API.
        /// </exception>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/AWSApplicationCostProfiler-2020-09-10/UpdateReportDefinition">REST API Reference for UpdateReportDefinition Operation</seealso>
        public virtual Task <UpdateReportDefinitionResponse> UpdateReportDefinitionAsync(UpdateReportDefinitionRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = UpdateReportDefinitionRequestMarshaller.Instance;
            options.ResponseUnmarshaller = UpdateReportDefinitionResponseUnmarshaller.Instance;

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