TerminateInstances() private method

private TerminateInstances ( TerminateInstancesRequest request ) : TerminateInstancesResponse
request TerminateInstancesRequest
return TerminateInstancesResponse
コード例 #1
0
 private void TerminateAgents(AmazonEC2Client ec2Client, List<string> instanceIds)
 {
     var termRequest = new TerminateInstancesRequest {InstanceIds = instanceIds};
     TerminateInstancesResponse termResponse = ec2Client.TerminateInstances(termRequest);
     if (termResponse.HttpStatusCode != HttpStatusCode.OK)
     {
         throw new Exception("Agents were not terminated succesfully");
     }
 }