Exemplo n.º 1
0
        /// <summary>
        /// Initiates the asynchronous execution of the ListReportDefinitions operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the ListReportDefinitions 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 EndListReportDefinitions
        ///         operation.</returns>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/AWSApplicationCostProfiler-2020-09-10/ListReportDefinitions">REST API Reference for ListReportDefinitions Operation</seealso>
        public virtual IAsyncResult BeginListReportDefinitions(ListReportDefinitionsRequest request, AsyncCallback callback, object state)
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = ListReportDefinitionsRequestMarshaller.Instance;
            options.ResponseUnmarshaller = ListReportDefinitionsResponseUnmarshaller.Instance;

            return(BeginInvoke(request, options, callback, state));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Retrieves a list of all reports and their configurations for your AWS account.
        ///
        ///
        /// <para>
        /// The maximum number of reports is one.
        /// </para>
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the ListReportDefinitions service method.</param>
        ///
        /// <returns>The response from the ListReportDefinitions 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/ListReportDefinitions">REST API Reference for ListReportDefinitions Operation</seealso>
        public virtual ListReportDefinitionsResponse ListReportDefinitions(ListReportDefinitionsRequest request)
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = ListReportDefinitionsRequestMarshaller.Instance;
            options.ResponseUnmarshaller = ListReportDefinitionsResponseUnmarshaller.Instance;

            return(Invoke <ListReportDefinitionsResponse>(request, options));
        }
        protected override void ProcessRecord()
        {
            base.ProcessRecord();
            ListReportDefinitionsRequest request;

            try
            {
                request = new ListReportDefinitionsRequest
                {
                    CompartmentId          = CompartmentId,
                    CompartmentIdInSubtree = CompartmentIdInSubtree,
                    AccessLevel            = AccessLevel,
                    DisplayName            = DisplayName,
                    Limit          = Limit,
                    Page           = Page,
                    SortOrder      = SortOrder,
                    SortBy         = SortBy,
                    OpcRequestId   = OpcRequestId,
                    IsSeeded       = IsSeeded,
                    DataSource     = DataSource,
                    LifecycleState = LifecycleState,
                    Category       = Category
                };
                IEnumerable <ListReportDefinitionsResponse> responses = GetRequestDelegate().Invoke(request);
                foreach (var item in responses)
                {
                    response = item;
                    WriteOutput(response, response.ReportDefinitionCollection, true);
                }
                if (!ParameterSetName.Equals(AllPageSet) && !ParameterSetName.Equals(LimitSet) && response.OpcNextPage != null)
                {
                    WriteWarning("This operation supports pagination and not all resources were returned. Re-run using the -All option to auto paginate and list all resources.");
                }
                FinishProcessing(response);
            }
            catch (Exception ex)
            {
                TerminatingErrorDuringExecution(ex);
            }
        }
Exemplo n.º 4
0
        /// <summary>
        /// Retrieves a list of all reports and their configurations for your AWS account.
        ///
        ///
        /// <para>
        /// The maximum number of reports is one.
        /// </para>
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the ListReportDefinitions 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 ListReportDefinitions 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/ListReportDefinitions">REST API Reference for ListReportDefinitions Operation</seealso>
        public virtual Task <ListReportDefinitionsResponse> ListReportDefinitionsAsync(ListReportDefinitionsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = ListReportDefinitionsRequestMarshaller.Instance;
            options.ResponseUnmarshaller = ListReportDefinitionsResponseUnmarshaller.Instance;

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