The following code examples show how to use DisableMetricsCollection
.
Action examples are code excerpts from larger programs and must be run in context. You can see this action in context in the following code example:
- SDK for .NET
-
Note
There's more on GitHub. Find the complete example and learn how to set up and run in the AWS Code Examples Repository
. /// <summary> /// Disable the collection of metric data for an Amazon EC2 Auto Scaling /// group. /// </summary> /// <param name="groupName">The name of the Auto Scaling group.</param> /// <returns>A Boolean value that indicates the success or failure of /// the operation.</returns> public async Task<bool> DisableMetricsCollectionAsync(string groupName) { var request = new DisableMetricsCollectionRequest { AutoScalingGroupName = groupName, }; var response = await _amazonAutoScaling.DisableMetricsCollectionAsync(request); return response.HttpStatusCode == System.Net.HttpStatusCode.OK; }
-
For API details, see DisableMetricsCollection in AWS SDK for .NET API Reference.
-
For a complete list of AWS SDK developer guides and code examples, see Using this service with an AWS SDK. This topic also includes information about getting started and details about previous SDK versions.