/// <summary> /// Creates a Savings Plan. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateSavingsPlan service method.</param> /// /// <returns>The response from the CreateSavingsPlan service method, as returned by SavingsPlans.</returns> /// <exception cref="Amazon.SavingsPlans.Model.InternalServerException"> /// An unexpected error occurred. /// </exception> /// <exception cref="Amazon.SavingsPlans.Model.ResourceNotFoundException"> /// The specified resource was not found. /// </exception> /// <exception cref="Amazon.SavingsPlans.Model.ServiceQuotaExceededException"> /// A service quota has been exceeded. /// </exception> /// <exception cref="Amazon.SavingsPlans.Model.ValidationException"> /// One of the input parameters is not valid. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/savingsplans-2019-06-28/CreateSavingsPlan">REST API Reference for CreateSavingsPlan Operation</seealso> public virtual CreateSavingsPlanResponse CreateSavingsPlan(CreateSavingsPlanRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = CreateSavingsPlanRequestMarshaller.Instance; options.ResponseUnmarshaller = CreateSavingsPlanResponseUnmarshaller.Instance; return(Invoke <CreateSavingsPlanResponse>(request, options)); }
/// <summary> /// Creates a Savings Plan. /// </summary> /// <param name="request">Container for the necessary parameters to execute the CreateSavingsPlan 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 CreateSavingsPlan service method, as returned by SavingsPlans.</returns> /// <exception cref="Amazon.SavingsPlans.Model.InternalServerException"> /// An unexpected error occurred. /// </exception> /// <exception cref="Amazon.SavingsPlans.Model.ResourceNotFoundException"> /// The specified resource was not found. /// </exception> /// <exception cref="Amazon.SavingsPlans.Model.ServiceQuotaExceededException"> /// A service quota has been exceeded. /// </exception> /// <exception cref="Amazon.SavingsPlans.Model.ValidationException"> /// One of the input parameters is not valid. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/savingsplans-2019-06-28/CreateSavingsPlan">REST API Reference for CreateSavingsPlan Operation</seealso> public virtual Task <CreateSavingsPlanResponse> CreateSavingsPlanAsync(CreateSavingsPlanRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = CreateSavingsPlanRequestMarshaller.Instance; options.ResponseUnmarshaller = CreateSavingsPlanResponseUnmarshaller.Instance; return(InvokeAsync <CreateSavingsPlanResponse>(request, options, cancellationToken)); }
/// <summary> /// Initiates the asynchronous execution of the CreateSavingsPlan operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateSavingsPlan operation on AmazonSavingsPlansClient.</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 EndCreateSavingsPlan /// operation.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/savingsplans-2019-06-28/CreateSavingsPlan">REST API Reference for CreateSavingsPlan Operation</seealso> public virtual IAsyncResult BeginCreateSavingsPlan(CreateSavingsPlanRequest request, AsyncCallback callback, object state) { var options = new InvokeOptions(); options.RequestMarshaller = CreateSavingsPlanRequestMarshaller.Instance; options.ResponseUnmarshaller = CreateSavingsPlanResponseUnmarshaller.Instance; return(BeginInvoke(request, options, callback, state)); }