/// <summary> /// <para> Adjusts the desired size of the AutoScalingGroup by initiating scaling activities. When reducing the size of the group, it is not /// possible to define which EC2 instances will be terminated. This applies to any auto-scaling decisions that might result in terminating /// instances. </para> <para> There are two common use cases for <c>SetDesiredCapacity</c> : /// one for users of the Auto Scaling triggering system, and another for developers who write their own triggering systems. Both use /// cases relate to the concept of cooldown. </para> <para> In the first case, if you use the Auto Scaling triggering system, /// <c>SetDesiredCapacity</c> changes the size of your Auto Scaling group without regard to the cooldown period. This could be useful, for /// example, if Auto Scaling did something unexpected for some reason. If your cooldown period is 10 minutes, Auto Scaling would normally reject /// requests to change the size of the group for that entire 10 minute period. The <c>SetDesiredCapacity</c> command allows you to circumvent /// this restriction and change the size of the group before the end of the cooldown period. </para> <para> In the second case, if you write /// your own triggering system, you can use <c>SetDesiredCapacity</c> to control the size of your Auto Scaling group. If you want the same /// cooldown functionality that Auto Scaling offers, you can configure <c>SetDesiredCapacity</c> to honor cooldown by setting the /// <c>HonorCooldown</c> parameter to <c>true</c> . /// </para> /// </summary> /// /// <param name="setDesiredCapacityRequest">Container for the necessary parameters to execute the SetDesiredCapacity service method on /// AmazonAutoScaling.</param> /// /// <exception cref="ScalingActivityInProgressException"/> public SetDesiredCapacityResponse SetDesiredCapacity(SetDesiredCapacityRequest setDesiredCapacityRequest) { IRequest <SetDesiredCapacityRequest> request = new SetDesiredCapacityRequestMarshaller().Marshall(setDesiredCapacityRequest); SetDesiredCapacityResponse response = Invoke <SetDesiredCapacityRequest, SetDesiredCapacityResponse> (request, this.signer, SetDesiredCapacityResponseUnmarshaller.GetInstance()); return(response); }
public void SetDesiredCapacityMarshallTest() { var operation = service_model.FindOperation("SetDesiredCapacity"); var request = InstantiateClassGenerator.Execute <SetDesiredCapacityRequest>(); var marshaller = new SetDesiredCapacityRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); }
/// <summary> /// Initiates the asynchronous execution of the SetDesiredCapacity operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the SetDesiredCapacity 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<SetDesiredCapacityResponse> SetDesiredCapacityAsync(SetDesiredCapacityRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new SetDesiredCapacityRequestMarshaller(); var unmarshaller = SetDesiredCapacityResponseUnmarshaller.Instance; return InvokeAsync<SetDesiredCapacityRequest,SetDesiredCapacityResponse>(request, marshaller, unmarshaller, cancellationToken); }
internal SetDesiredCapacityResponse SetDesiredCapacity(SetDesiredCapacityRequest request) { var marshaller = new SetDesiredCapacityRequestMarshaller(); var unmarshaller = SetDesiredCapacityResponseUnmarshaller.Instance; return Invoke<SetDesiredCapacityRequest,SetDesiredCapacityResponse>(request, marshaller, unmarshaller); }
IAsyncResult invokeSetDesiredCapacity(SetDesiredCapacityRequest setDesiredCapacityRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new SetDesiredCapacityRequestMarshaller().Marshall(setDesiredCapacityRequest); var unmarshaller = SetDesiredCapacityResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// Initiates the asynchronous execution of the SetDesiredCapacity operation. /// <seealso cref="Amazon.AutoScaling.IAmazonAutoScaling.SetDesiredCapacity"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the SetDesiredCapacity 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<SetDesiredCapacityResponse> SetDesiredCapacityAsync(SetDesiredCapacityRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new SetDesiredCapacityRequestMarshaller(); var unmarshaller = SetDesiredCapacityResponseUnmarshaller.GetInstance(); return Invoke<IRequest, SetDesiredCapacityRequest, SetDesiredCapacityResponse>(request, marshaller, unmarshaller, signer, cancellationToken); }
/// <summary> /// Initiates the asynchronous execution of the SetDesiredCapacity operation. /// <seealso cref="Amazon.AutoScaling.IAmazonAutoScaling"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the SetDesiredCapacity operation on AmazonAutoScalingClient.</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 EndSetDesiredCapacity /// operation.</returns> public IAsyncResult BeginSetDesiredCapacity(SetDesiredCapacityRequest request, AsyncCallback callback, object state) { var marshaller = new SetDesiredCapacityRequestMarshaller(); var unmarshaller = SetDesiredCapacityResponseUnmarshaller.Instance; return BeginInvoke<SetDesiredCapacityRequest>(request, marshaller, unmarshaller, callback, state); }
public void SetDesiredCapacityMarshallTest() { var operation = service_model.FindOperation("SetDesiredCapacity"); var request = InstantiateClassGenerator.Execute<SetDesiredCapacityRequest>(); var marshaller = new SetDesiredCapacityRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); }
/// <summary> /// <para> Adjusts the desired size of the AutoScalingGroup by initiating scaling activities. When reducing the size of the group, it is not /// possible to define which Amazon EC2 instances will be terminated. This applies to any Auto Scaling decisions that might result in /// terminating instances. </para> <para> There are two common use cases for <c>SetDesiredCapacity</c> : /// one for users of the Auto Scaling triggering system, and another for developers who write their own triggering systems. Both use /// cases relate to the concept of cooldown. </para> <para> In the first case, if you use the Auto Scaling triggering system, /// <c>SetDesiredCapacity</c> changes the size of your Auto Scaling group without regard to the cooldown period. This could be useful, for /// example, if Auto Scaling did something unexpected for some reason. If your cooldown period is 10 minutes, Auto Scaling would normally reject /// requests to change the size of the group for that entire 10-minute period. The <c>SetDesiredCapacity</c> command allows you to circumvent /// this restriction and change the size of the group before the end of the cooldown period. </para> <para> In the second case, if you write /// your own triggering system, you can use <c>SetDesiredCapacity</c> to control the size of your Auto Scaling group. If you want the same /// cooldown functionality that Auto Scaling offers, you can configure <c>SetDesiredCapacity</c> to honor cooldown by setting the /// <c>HonorCooldown</c> parameter to <c>true</c> . /// </para> /// </summary> /// /// <param name="setDesiredCapacityRequest">Container for the necessary parameters to execute the SetDesiredCapacity service method on /// AmazonAutoScaling.</param> /// /// <exception cref="ScalingActivityInProgressException"/> public SetDesiredCapacityResponse SetDesiredCapacity(SetDesiredCapacityRequest setDesiredCapacityRequest) { IRequest<SetDesiredCapacityRequest> request = new SetDesiredCapacityRequestMarshaller().Marshall(setDesiredCapacityRequest); SetDesiredCapacityResponse response = Invoke<SetDesiredCapacityRequest, SetDesiredCapacityResponse> (request, this.signer, SetDesiredCapacityResponseUnmarshaller.GetInstance()); return response; }
/// <summary> /// Initiates the asynchronous execution of the SetDesiredCapacity operation. /// <seealso cref="Amazon.AutoScaling.IAmazonAutoScaling.SetDesiredCapacity"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the SetDesiredCapacity 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 async Task<SetDesiredCapacityResponse> SetDesiredCapacityAsync(SetDesiredCapacityRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new SetDesiredCapacityRequestMarshaller(); var unmarshaller = SetDesiredCapacityResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, SetDesiredCapacityRequest, SetDesiredCapacityResponse>(request, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }