public void DescribeScalingPoliciesMarshallTest() { var request = InstantiateClassGenerator.Execute <DescribeScalingPoliciesRequest>(); var marshaller = new DescribeScalingPoliciesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content); Comparer.CompareObjectToJson <DescribeScalingPoliciesRequest>(request, jsonRequest); var webResponse = new WebResponseData { Headers = { { "x-amzn-RequestId", Guid.NewGuid().ToString() }, { "x-amz-crc32", "0" } } }; var jsonResponse = new JsonSampleGenerator(service_model, service_model.FindOperation("DescribeScalingPolicies").ResponseStructure).Execute(); webResponse.Headers.Add("Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString()); UnmarshallerContext context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), false, webResponse); var response = DescribeScalingPoliciesResponseUnmarshaller.Instance.Unmarshall(context) as DescribeScalingPoliciesResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
internal DescribeScalingPoliciesResponse DescribeScalingPolicies(DescribeScalingPoliciesRequest request) { var marshaller = new DescribeScalingPoliciesRequestMarshaller(); var unmarshaller = DescribeScalingPoliciesResponseUnmarshaller.Instance; return(Invoke <DescribeScalingPoliciesRequest, DescribeScalingPoliciesResponse>(request, marshaller, unmarshaller)); }
/// <summary> /// Initiates the asynchronous execution of the DescribeScalingPolicies operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeScalingPolicies 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> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/application-autoscaling-2016-02-06/DescribeScalingPolicies">REST API Reference for DescribeScalingPolicies Operation</seealso> public Task <DescribeScalingPoliciesResponse> DescribeScalingPoliciesAsync(DescribeScalingPoliciesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DescribeScalingPoliciesRequestMarshaller(); var unmarshaller = DescribeScalingPoliciesResponseUnmarshaller.Instance; return(InvokeAsync <DescribeScalingPoliciesRequest, DescribeScalingPoliciesResponse>(request, marshaller, unmarshaller, cancellationToken)); }
/// <summary> /// Initiates the asynchronous execution of the DescribeScalingPolicies operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeScalingPolicies operation on AmazonApplicationAutoScalingClient.</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 EndDescribeScalingPolicies /// operation.</returns> public IAsyncResult BeginDescribeScalingPolicies(DescribeScalingPoliciesRequest request, AsyncCallback callback, object state) { var marshaller = new DescribeScalingPoliciesRequestMarshaller(); var unmarshaller = DescribeScalingPoliciesResponseUnmarshaller.Instance; return(BeginInvoke <DescribeScalingPoliciesRequest>(request, marshaller, unmarshaller, callback, state)); }
/// <summary> /// Initiates the asynchronous execution of the DescribeScalingPolicies operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeScalingPolicies operation on AmazonApplicationAutoScalingClient.</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 EndDescribeScalingPolicies /// operation.</returns> public IAsyncResult BeginDescribeScalingPolicies(DescribeScalingPoliciesRequest request, AsyncCallback callback, object state) { var marshaller = new DescribeScalingPoliciesRequestMarshaller(); var unmarshaller = DescribeScalingPoliciesResponseUnmarshaller.Instance; return BeginInvoke<DescribeScalingPoliciesRequest>(request, marshaller, unmarshaller, callback, state); }
/// <summary> /// Provides descriptive information about the scaling policies in the specified namespace. /// /// /// <para> /// You can filter the results using the <code>ResourceId</code>, <code>ScalableDimension</code>, /// and <code>PolicyNames</code> parameters. /// </para> /// /// <para> /// To create a scaling policy or update an existing one, see <a>PutScalingPolicy</a>. /// If you are no longer using a scaling policy, you can delete it using <a>DeleteScalingPolicy</a>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeScalingPolicies service method.</param> /// /// <returns>The response from the DescribeScalingPolicies service method, as returned by ApplicationAutoScaling.</returns> /// <exception cref="Amazon.ApplicationAutoScaling.Model.ConcurrentUpdateException"> /// Concurrent updates caused an exception, for example, if you request an update to an /// Application Auto Scaling resource that already has a pending update. /// </exception> /// <exception cref="Amazon.ApplicationAutoScaling.Model.FailedResourceAccessException"> /// Failed access to resources caused an exception. This exception currently only applies /// to <a>DescribeScalingPolicies</a>. It is thrown when Application Auto Scaling is unable /// to retrieve the alarms associated with a scaling policy due to a client error, for /// example, if the role ARN specified for a scalable target does not have the proper /// permissions to call the CloudWatch <a href="http://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_DescribeAlarms.html">DescribeAlarms</a> /// API operation on behalf of your account. /// </exception> /// <exception cref="Amazon.ApplicationAutoScaling.Model.InternalServiceException"> /// The service encountered an internal error. /// </exception> /// <exception cref="Amazon.ApplicationAutoScaling.Model.InvalidNextTokenException"> /// The next token supplied was invalid. /// </exception> /// <exception cref="Amazon.ApplicationAutoScaling.Model.ValidationException"> /// An exception was thrown for a validation issue. Review the available parameters for /// the API request. /// </exception> public DescribeScalingPoliciesResponse DescribeScalingPolicies(DescribeScalingPoliciesRequest request) { var marshaller = new DescribeScalingPoliciesRequestMarshaller(); var unmarshaller = DescribeScalingPoliciesResponseUnmarshaller.Instance; return Invoke<DescribeScalingPoliciesRequest,DescribeScalingPoliciesResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the DescribeScalingPolicies operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeScalingPolicies 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<DescribeScalingPoliciesResponse> DescribeScalingPoliciesAsync(DescribeScalingPoliciesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DescribeScalingPoliciesRequestMarshaller(); var unmarshaller = DescribeScalingPoliciesResponseUnmarshaller.Instance; return InvokeAsync<DescribeScalingPoliciesRequest,DescribeScalingPoliciesResponse>(request, marshaller, unmarshaller, cancellationToken); }
public void DescribeScalingPoliciesMarshallTest() { var request = InstantiateClassGenerator.Execute<DescribeScalingPoliciesRequest>(); var marshaller = new DescribeScalingPoliciesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content); Comparer.CompareObjectToJson<DescribeScalingPoliciesRequest>(request,jsonRequest); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var jsonResponse = new JsonSampleGenerator(service_model, service_model.FindOperation("DescribeScalingPolicies").ResponseStructure).Execute(); webResponse.Headers.Add("Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString()); UnmarshallerContext context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), false, webResponse); var response = DescribeScalingPoliciesResponseUnmarshaller.Instance.Unmarshall(context) as DescribeScalingPoliciesResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }