public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; // create request var request = new Amazon.ElastiCache.Model.ResetCacheParameterGroupRequest(); if (cmdletContext.CacheParameterGroupName != null) { request.CacheParameterGroupName = cmdletContext.CacheParameterGroupName; } if (cmdletContext.ParameterNameValue != null) { request.ParameterNameValues = cmdletContext.ParameterNameValue; } if (cmdletContext.ResetAllParameter != null) { request.ResetAllParameters = cmdletContext.ResetAllParameter.Value; } CmdletOutput output; // issue call var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); try { var response = CallAWSServiceOperation(client, request); object pipelineOutput = null; pipelineOutput = cmdletContext.Select(response, this); output = new CmdletOutput { PipelineOutput = pipelineOutput, ServiceResponse = response }; } catch (Exception e) { output = new CmdletOutput { ErrorResponse = e }; } return(output); }
/// <summary> /// Initiates the asynchronous execution of the ResetCacheParameterGroup operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ResetCacheParameterGroup operation.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// <returns>The task object representing the asynchronous operation.</returns> public Task<ResetCacheParameterGroupResponse> ResetCacheParameterGroupAsync(ResetCacheParameterGroupRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new ResetCacheParameterGroupRequestMarshaller(); var unmarshaller = ResetCacheParameterGroupResponseUnmarshaller.Instance; return InvokeAsync<ResetCacheParameterGroupRequest,ResetCacheParameterGroupResponse>(request, marshaller, unmarshaller, cancellationToken); }
/// <summary> /// The <i>ResetCacheParameterGroup</i> operation modifies the parameters of a cache parameter /// group to the engine or system default value. You can reset specific parameters by /// submitting a list of parameter names. To reset the entire cache parameter group, specify /// the <i>ResetAllParameters</i> and <i>CacheParameterGroupName</i> parameters. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ResetCacheParameterGroup service method.</param> /// /// <returns>The response from the ResetCacheParameterGroup service method, as returned by ElastiCache.</returns> /// <exception cref="Amazon.ElastiCache.Model.CacheParameterGroupNotFoundException"> /// The requested cache parameter group name does not refer to an existing cache parameter /// group. /// </exception> /// <exception cref="Amazon.ElastiCache.Model.InvalidCacheParameterGroupStateException"> /// The current state of the cache parameter group does not allow the requested action /// to occur. /// </exception> /// <exception cref="Amazon.ElastiCache.Model.InvalidParameterCombinationException"> /// Two or more incompatible parameters were specified. /// </exception> /// <exception cref="Amazon.ElastiCache.Model.InvalidParameterValueException"> /// The value for a parameter is invalid. /// </exception> public ResetCacheParameterGroupResponse ResetCacheParameterGroup(ResetCacheParameterGroupRequest request) { var marshaller = new ResetCacheParameterGroupRequestMarshaller(); var unmarshaller = ResetCacheParameterGroupResponseUnmarshaller.Instance; return Invoke<ResetCacheParameterGroupRequest,ResetCacheParameterGroupResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the ResetCacheParameterGroup operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ResetCacheParameterGroup operation on AmazonElastiCacheClient.</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 EndResetCacheParameterGroup /// operation.</returns> public IAsyncResult BeginResetCacheParameterGroup(ResetCacheParameterGroupRequest request, AsyncCallback callback, object state) { var marshaller = new ResetCacheParameterGroupRequestMarshaller(); var unmarshaller = ResetCacheParameterGroupResponseUnmarshaller.Instance; return BeginInvoke<ResetCacheParameterGroupRequest>(request, marshaller, unmarshaller, callback, state); }
private Amazon.ElastiCache.Model.ResetCacheParameterGroupResponse CallAWSServiceOperation(IAmazonElastiCache client, Amazon.ElastiCache.Model.ResetCacheParameterGroupRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon ElastiCache", "ResetCacheParameterGroup"); try { #if DESKTOP return(client.ResetCacheParameterGroup(request)); #elif CORECLR return(client.ResetCacheParameterGroupAsync(request).GetAwaiter().GetResult()); #else #error "Unknown build edition" #endif } catch (AmazonServiceException exc) { var webException = exc.InnerException as System.Net.WebException; if (webException != null) { throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); } throw; } }
/// <summary> /// Initiates the asynchronous execution of the ResetCacheParameterGroup operation. /// <seealso cref="Amazon.ElastiCache.IAmazonElastiCache.ResetCacheParameterGroup"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ResetCacheParameterGroup operation.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// <returns>The task object representing the asynchronous operation.</returns> public Task<ResetCacheParameterGroupResponse> ResetCacheParameterGroupAsync(ResetCacheParameterGroupRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new ResetCacheParameterGroupRequestMarshaller(); var unmarshaller = ResetCacheParameterGroupResponseUnmarshaller.GetInstance(); return Invoke<IRequest, ResetCacheParameterGroupRequest, ResetCacheParameterGroupResponse>(request, marshaller, unmarshaller, signer, cancellationToken); }
IAsyncResult invokeResetCacheParameterGroup(ResetCacheParameterGroupRequest resetCacheParameterGroupRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new ResetCacheParameterGroupRequestMarshaller().Marshall(resetCacheParameterGroupRequest); var unmarshaller = ResetCacheParameterGroupResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// <para>The <i>ResetCacheParameterGroup</i> operation modifies the parameters of a cache parameter group to the engine or system default /// value. You can reset specific parameters by submitting a list of parameter names. To reset the entire cache parameter group, specify the /// <i>ResetAllParameters</i> and <i>CacheParameterGroupName</i> parameters.</para> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ResetCacheParameterGroup service method /// on AmazonElastiCache.</param> /// /// <returns>The response from the ResetCacheParameterGroup service method, as returned by AmazonElastiCache.</returns> /// /// <exception cref="T:Amazon.ElastiCache.Model.InvalidParameterValueException" /> /// <exception cref="T:Amazon.ElastiCache.Model.InvalidParameterCombinationException" /> /// <exception cref="T:Amazon.ElastiCache.Model.InvalidCacheParameterGroupStateException" /> /// <exception cref="T:Amazon.ElastiCache.Model.CacheParameterGroupNotFoundException" /> public ResetCacheParameterGroupResponse ResetCacheParameterGroup(ResetCacheParameterGroupRequest request) { var task = ResetCacheParameterGroupAsync(request); try { return task.Result; } catch(AggregateException e) { ExceptionDispatchInfo.Capture(e.InnerException).Throw(); return null; } }
/// <summary> /// Initiates the asynchronous execution of the ResetCacheParameterGroup operation. /// <seealso cref="Amazon.ElastiCache.IAmazonElastiCache.ResetCacheParameterGroup"/> /// </summary> /// /// <param name="resetCacheParameterGroupRequest">Container for the necessary parameters to execute the ResetCacheParameterGroup operation on /// AmazonElastiCache.</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 /// EndResetCacheParameterGroup operation.</returns> public IAsyncResult BeginResetCacheParameterGroup(ResetCacheParameterGroupRequest resetCacheParameterGroupRequest, AsyncCallback callback, object state) { return invokeResetCacheParameterGroup(resetCacheParameterGroupRequest, callback, state, false); }
/// <summary> /// <para>The <i>ResetCacheParameterGroup</i> operation modifies the parameters of a cache parameter group to the engine or system default /// value. You can reset specific parameters by submitting a list of parameter names. To reset the entire cache parameter group, specify the /// <i>ResetAllParameters</i> and <i>CacheParameterGroupName</i> parameters.</para> /// </summary> /// /// <param name="resetCacheParameterGroupRequest">Container for the necessary parameters to execute the ResetCacheParameterGroup service method /// on AmazonElastiCache.</param> /// /// <returns>The response from the ResetCacheParameterGroup service method, as returned by AmazonElastiCache.</returns> /// /// <exception cref="InvalidParameterValueException"/> /// <exception cref="InvalidParameterCombinationException"/> /// <exception cref="InvalidCacheParameterGroupStateException"/> /// <exception cref="CacheParameterGroupNotFoundException"/> public ResetCacheParameterGroupResponse ResetCacheParameterGroup(ResetCacheParameterGroupRequest resetCacheParameterGroupRequest) { IAsyncResult asyncResult = invokeResetCacheParameterGroup(resetCacheParameterGroupRequest, null, null, true); return EndResetCacheParameterGroup(asyncResult); }
/// <summary> /// <para>The <i>ResetCacheParameterGroup</i> operation modifies the parameters of a cache parameter group to the engine or system default /// value. You can reset specific parameters by submitting a list of parameter names. To reset the entire cache parameter group, specify the /// <i>ResetAllParameters</i> and <i>CacheParameterGroupName</i> parameters.</para> /// </summary> /// /// <param name="resetCacheParameterGroupRequest">Container for the necessary parameters to execute the ResetCacheParameterGroup service method /// on AmazonElastiCache.</param> /// /// <returns>The response from the ResetCacheParameterGroup service method, as returned by AmazonElastiCache.</returns> /// /// <exception cref="T:Amazon.ElastiCache.Model.InvalidParameterValueException" /> /// <exception cref="T:Amazon.ElastiCache.Model.InvalidParameterCombinationException" /> /// <exception cref="T:Amazon.ElastiCache.Model.InvalidCacheParameterGroupStateException" /> /// <exception cref="T:Amazon.ElastiCache.Model.CacheParameterGroupNotFoundException" /> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public async Task<ResetCacheParameterGroupResponse> ResetCacheParameterGroupAsync(ResetCacheParameterGroupRequest resetCacheParameterGroupRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new ResetCacheParameterGroupRequestMarshaller(); var unmarshaller = ResetCacheParameterGroupResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, ResetCacheParameterGroupRequest, ResetCacheParameterGroupResponse>(resetCacheParameterGroupRequest, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }
internal ResetCacheParameterGroupResponse ResetCacheParameterGroup(ResetCacheParameterGroupRequest request) { var task = ResetCacheParameterGroupAsync(request); try { return task.Result; } catch(AggregateException e) { throw e.InnerException; } }
/// <summary> /// <para> Modifies the parameters of a CacheParameterGroup to the engine or system default value. To reset specific parameters submit a list of /// the parameter names. To reset the entire CacheParameterGroup, specify the CacheParameterGroup name and ResetAllParameters parameters. /// </para> /// </summary> /// /// <param name="resetCacheParameterGroupRequest">Container for the necessary parameters to execute the ResetCacheParameterGroup service method /// on AmazonElastiCache.</param> /// /// <returns>The response from the ResetCacheParameterGroup service method, as returned by AmazonElastiCache.</returns> /// /// <exception cref="InvalidParameterValueException"/> /// <exception cref="InvalidParameterCombinationException"/> /// <exception cref="InvalidCacheParameterGroupStateException"/> /// <exception cref="CacheParameterGroupNotFoundException"/> public ResetCacheParameterGroupResponse ResetCacheParameterGroup(ResetCacheParameterGroupRequest resetCacheParameterGroupRequest) { IRequest<ResetCacheParameterGroupRequest> request = new ResetCacheParameterGroupRequestMarshaller().Marshall(resetCacheParameterGroupRequest); ResetCacheParameterGroupResponse response = Invoke<ResetCacheParameterGroupRequest, ResetCacheParameterGroupResponse> (request, this.signer, ResetCacheParameterGroupResponseUnmarshaller.GetInstance()); return response; }