示例#1
0
        public void ModifySpotFleetRequestMarshallTest()
        {
            var operation = service_model.FindOperation("ModifySpotFleetRequest");

            var request = InstantiateClassGenerator.Execute<ModifySpotFleetRequestRequest>();
            var marshaller = new ModifySpotFleetRequestRequestMarshaller();
            var internalRequest = marshaller.Marshall(request);
            var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation);
            validator.Validate();


            var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute();
            UnmarshallerContext context = new EC2UnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, new WebResponseData());
            var response = ModifySpotFleetRequestResponseUnmarshaller.Instance.Unmarshall(context)
                as ModifySpotFleetRequestResponse;   
            InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);       
        }
示例#2
0
        /// <summary>
        /// Modifies the specified Spot fleet request.
        /// 
        ///  
        /// <para>
        /// While the Spot fleet request is being modified, it is in the <code>modifying</code>
        /// state.
        /// </para>
        ///  
        /// <para>
        /// To scale up your Spot fleet, increase its target capacity. The Spot fleet launches
        /// the additional Spot instances according to the allocation strategy for the Spot fleet
        /// request. If the allocation strategy is <code>lowestPrice</code>, the Spot fleet launches
        /// instances using the Spot pool with the lowest price. If the allocation strategy is
        /// <code>diversified</code>, the Spot fleet distributes the instances across the Spot
        /// pools.
        /// </para>
        ///  
        /// <para>
        /// To scale down your Spot fleet, decrease its target capacity. First, the Spot fleet
        /// cancels any open bids that exceed the new target capacity. You can request that the
        /// Spot fleet terminate Spot instances until the size of the fleet no longer exceeds
        /// the new target capacity. If the allocation strategy is <code>lowestPrice</code>, the
        /// Spot fleet terminates the instances with the highest price per unit. If the allocation
        /// strategy is <code>diversified</code>, the Spot fleet terminates instances across the
        /// Spot pools. Alternatively, you can request that the Spot fleet keep the fleet at its
        /// current size, but not replace any Spot instances that are interrupted or that you
        /// terminate manually.
        /// </para>
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the ModifySpotFleetRequest service method.</param>
        /// 
        /// <returns>The response from the ModifySpotFleetRequest service method, as returned by EC2.</returns>
        public ModifySpotFleetRequestResponse ModifySpotFleetRequest(ModifySpotFleetRequestRequest request)
        {
            var marshaller = new ModifySpotFleetRequestRequestMarshaller();
            var unmarshaller = ModifySpotFleetRequestResponseUnmarshaller.Instance;

            return Invoke<ModifySpotFleetRequestRequest,ModifySpotFleetRequestResponse>(request, marshaller, unmarshaller);
        }
示例#3
0
        /// <summary>
        /// Initiates the asynchronous execution of the ModifySpotFleetRequest operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the ModifySpotFleetRequest operation on AmazonEC2Client.</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 EndModifySpotFleetRequest
        ///         operation.</returns>
        public IAsyncResult BeginModifySpotFleetRequest(ModifySpotFleetRequestRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new ModifySpotFleetRequestRequestMarshaller();
            var unmarshaller = ModifySpotFleetRequestResponseUnmarshaller.Instance;

            return BeginInvoke<ModifySpotFleetRequestRequest>(request, marshaller, unmarshaller,
                callback, state);
        }
示例#4
0
        /// <summary>
        /// Initiates the asynchronous execution of the ModifySpotFleetRequest operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the ModifySpotFleetRequest 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<ModifySpotFleetRequestResponse> ModifySpotFleetRequestAsync(ModifySpotFleetRequestRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new ModifySpotFleetRequestRequestMarshaller();
            var unmarshaller = ModifySpotFleetRequestResponseUnmarshaller.Instance;

            return InvokeAsync<ModifySpotFleetRequestRequest,ModifySpotFleetRequestResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }