Esempio n. 1
0
        public async Task RemoveInstancesAsync(string targetGroupArn, params string[] instanceIds)
        {
            #region Preconditions

            if (instanceIds == null)
            {
                throw new ArgumentNullException(nameof(instanceIds));
            }

            if (instanceIds.Length == 0)
            {
                throw new ArgumentException("May not be empty", nameof(instanceIds));
            }

            #endregion

            var targets = new TargetDescription[instanceIds.Length];

            for (var i = 0; i < targets.Length; i++)
            {
                targets[i] = new TargetDescription(instanceIds[i]);
            }

            var request = new DeregisterTargetsRequest(targetGroupArn, targets);

            await client.DeregisterTargetsAsync(request).ConfigureAwait(false);
        }
Esempio n. 2
0
 public Task <DeregisterTargetsResponse> DeregisterTargetsAsync(DeregisterTargetsRequest request)
 {
     return(SendAsync <DeregisterTargetsResponse>(request));
 }