def detach_classic_link_vpc(instance_id, vpc_id, dry_run=false)
response = Excon::Response.new
vpc = self.data[:vpcs].find{ |v| v['vpcId'] == vpc_id }
instance = self.data[:instances][instance_id]
if vpc && instance
response.status = 200
response.body = {
'requestId' => Fog::AWS::Mock.request_id,
'return' => true
}
unless dry_run
instance['classicLinkSecurityGroups'] = nil
instance['classicLinkVpcId'] = nil
end
response
elsif !instance
raise Fog::Compute::AWS::NotFound.new("The instance ID '#{instance_id}' does not exist.")
elsif !vpc
raise Fog::Compute::AWS::NotFound.new("The VPC '#{vpc_id}' does not exist.")
end
end